/* Soloim 2: warm neutral surfaces, ink typography and restrained green actions.
   Existing semantic tokens remain the contract for all vanilla UI modules. */
html:root body {
  --concept-cream: #f7f8f5;
  --concept-pink: #27664f;
  --concept-pink-strong: #245940;
  --concept-pink-soft: #eef4ef;
  --concept-purple: #5d6e63;
  --concept-purple-soft: #f0f3ef;
  --concept-lilac: var(--concept-purple-soft);
  --concept-text-secondary: #606d64;
  --concept-text-muted: #6c786f;
  --concept-border: #dfe5df;
  --concept-radius-card: 20px;
  --concept-radius-panel: 20px;
  --concept-radius-control: 12px;
  --concept-radius-chip: 8px;
  --concept-action-size: 56px;
  --concept-space-1: 4px;
  --concept-space-2: 8px;
  --concept-space-3: 12px;
  --concept-space-4: 16px;
  --concept-space-5: 24px;
  --concept-space-6: 32px;
  --concept-space-7: 40px;
  --concept-space-8: 48px;
  --concept-type-brand: 18px;
  --concept-type-title: 30px;
  --concept-type-section: 18px;
  --concept-type-name: 28px;
  --concept-type-body: 15px;
  --concept-type-caption: 13px;
  --concept-type-button: 14px;
  --concept-shadow: 0 8px 28px #26382b0a;
  --bg: var(--concept-cream);
  --surface: #fff;
  --ink: #202c25;
  --muted: var(--concept-text-secondary);
  --line: #e2e7e1;
  --control-line: #acb8ae;
  --soft: var(--concept-pink-soft);
  --accent: var(--concept-pink);
  --on-accent: #fff;
  --green: var(--concept-pink-strong);
  --bright: #dfede2;
  --danger: #a83939;
  --focus: var(--concept-pink-strong);
  --shadow: var(--concept-shadow);
  --toast-action: var(--concept-pink-strong);
  color-scheme: light;
  background: var(--bg);
  color: var(--ink);
}
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .topbar {
  height: 64px;
  background: var(--bg);
  border-bottom: 0;
  padding-inline: 32px;
}
body[data-authenticated="true"] #main { padding: 24px 32px 64px; }
body[data-authenticated="true"] .navigation { padding: 32px 18px 24px; border-color: var(--line); background: var(--surface); }
body[data-authenticated="true"] .brand { margin: 0 10px 40px; }
body[data-authenticated="true"] .brand > span { font-size: var(--concept-type-brand); letter-spacing: -.04em; }
body[data-authenticated="true"] .brand small { font-size: 12px; font-weight: 450; color: var(--muted); margin-top: 6px; }
.app-brand { display: inline-flex; align-items: center; gap: 8px; }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .app-brand { font-size: var(--concept-type-brand); letter-spacing: -.04em; }
.app-brand > .brand-symbol { width: 24px; height: 24px; flex: none; object-fit: contain; border-radius: 6px; }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .brand-tools { display: flex; align-items: center; gap: 24px; }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .feedback-trigger { min-height: 44px; font-size: 11px; }
body[data-authenticated="true"] .top-actions { gap: 8px; }
body[data-authenticated="true"] .logout-button { color: var(--muted); font-size: 12px; }
body[data-authenticated="true"] .nav-link { color: var(--muted); font-weight: 550; border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] .nav-link.active { background: var(--soft); color: var(--concept-pink-strong); }
body[data-authenticated="true"] .nav-link.active svg { stroke-width: 2.2; }
body[data-authenticated="true"] .nav-count { background: var(--accent); color: var(--on-accent); }
body[data-authenticated="true"] .page-heading h1 { font-size: var(--concept-type-title); letter-spacing: -.04em; }
body[data-authenticated="true"] .page-heading p { max-width: 560px; line-height: 1.75; }
body[data-authenticated="true"] .primary { background: var(--accent); color: var(--on-accent); border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] :is(.secondary, .danger, input, select, textarea) { border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] .secondary { border-color: var(--control-line); }
body[data-authenticated="true"] :is(.primary, .secondary, .danger) { font-size: var(--concept-type-button); }
body[data-authenticated="true"] input[type="checkbox"] { accent-color: var(--accent); }
body[data-authenticated="true"] .chip.selected { background: var(--soft); border-color: var(--accent); color: var(--concept-pink-strong); }
body[data-authenticated="true"] :is(.badge, .active-filter) { border-radius: var(--concept-radius-chip); }
body[data-authenticated="true"] .link-button { color: var(--muted); text-decoration: none; }
body[data-authenticated="true"] .link-button:hover { color: var(--concept-pink-strong); text-decoration: underline; }
body[data-authenticated="true"] dialog:not(.lightbox) { background: var(--surface); color: var(--ink); border-radius: var(--concept-radius-panel); box-shadow: 0 16px 64px #63374224; }
body[data-authenticated="true"] dialog::backdrop { background: #43343e66; }
body[data-authenticated="true"] .lightbox { background: var(--bg); }
body[data-authenticated="true"] .lightbox > .icon-button { color: var(--ink); background: var(--surface); }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .empty-state { background: var(--surface); border: 0; border-radius: var(--concept-radius-panel); padding-block: 56px; box-shadow: var(--concept-shadow); }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .empty-state > svg { width: 48px; height: 48px; padding: 10px; color: var(--accent); background: var(--soft); border-radius: 50%; }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .empty-state h2 { font-size: 21px; }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .toast { background: var(--surface); color: var(--ink); box-shadow: 0 5px 28px #63374224; border: 1px solid var(--line); border-radius: var(--concept-radius-control); }
body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .toast button { color: var(--concept-pink-strong); }
body[data-authenticated="true"] .chat-layout { border-radius: var(--concept-radius-panel); border-color: var(--line); box-shadow: var(--concept-shadow); }
body[data-authenticated="true"] .chat-list button { border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] .messages { background: var(--bg); }
body[data-authenticated="true"] .message p { border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); }
body[data-authenticated="true"] .message.mine p { background: var(--soft); border-color: transparent; color: var(--ink); border-radius: 16px 16px 4px 16px; }
body[data-authenticated="true"] .composer button { background: var(--accent); color: var(--on-accent); border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] .interest-item > img { border-radius: var(--concept-radius-control); }
body[data-authenticated="true"] :is(.tutorial-mark, .completion-mark, .notification-icon) { background: var(--soft); color: var(--concept-pink-strong); }
body[data-loading="true"] .loading-shell { padding-top: 0; }
body[data-loading="true"] :is(.loading-portrait, .loading-toolbar span, .loading-lines span, .loading-chat-list span, .loading-thread span, .loading-thread > div, .loading-rooms span) { background: #e8ede7; }
body[data-loading="true"] .loading-portrait { border-radius: var(--concept-radius-card); }

/* The portrait and a small set of decisions form one composition. */
body[data-authenticated="true"][data-route="browse"] .browse-heading { max-width: 940px; margin-bottom: 20px; }
body[data-authenticated="true"][data-route="browse"] .browse-heading h1 { font-size: 22px; letter-spacing: -.04em; }
body[data-authenticated="true"] .browse-layout { grid-template-columns: 160px minmax(280px, 400px) minmax(160px, 190px); gap: 32px; }
body[data-authenticated="true"] .browse-tools { padding-top: 4px; }
body[data-authenticated="true"] .browse-tools .toolbar { gap: 8px; }
body[data-authenticated="true"] .browse-tools .scope-select { background: var(--surface); border: 1px solid var(--line); border-radius: var(--concept-radius-control); padding: 8px 24px 8px 12px; }
body[data-authenticated="true"] .browse-tools .today-overview { border-color: var(--line); }
body[data-authenticated="true"] .right-rail .rail-heading h2 { font-size: 13px; }
body[data-authenticated="true"] .discovery-card { max-width: 400px; }
body[data-authenticated="true"] .photo-frame { border-radius: var(--concept-radius-card); }
body[data-authenticated="true"] .discovery-photo .photo-frame { box-shadow: 0 8px 24px #26382b10; }
body[data-authenticated="true"] .has-next .discovery-photo::before { inset: 8px -5px -9px 10px; border: 4px solid var(--surface); border-radius: var(--concept-radius-card); background: #e8ede7; box-shadow: 0 5px 15px #26382b08; }
.portrait-summary { position: absolute; inset: auto 0 0; padding: 64px 22px 22px; color: #fff; background: linear-gradient(transparent, #271d21bd); pointer-events: none; }
.portrait-summary .discovery-identity { gap: 4px 10px; }
body[data-authenticated="true"] .portrait-summary h2 { font-size: var(--concept-type-name); font-weight: 750; line-height: 1.25; letter-spacing: -.03em; overflow-wrap: anywhere; }
body[data-authenticated="true"] .portrait-summary .birth-line { font-size: 12px; margin: 0; color: #fff; }
body[data-authenticated="true"] .portrait-summary .profile-facts { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: 6px; font-size: 12px; color: #fff; }
body[data-authenticated="true"] .portrait-summary .profile-facts > span { overflow-wrap: anywhere; }
body[data-authenticated="true"] .portrait-summary .text-tags { display: flex; gap: 5px; margin-top: 10px; font-size: 11px; color: #fff; }
.portrait-summary .text-tags > span { padding: 3px 8px; background: #fffffff0; color: #4e4149; border-radius: var(--concept-radius-chip); }
.portrait-summary .text-tags > .profile-mbti { color: #624b7b; background: #f0f3eff5; }
body[data-authenticated="true"] .photo-position { top: 14px; bottom: auto; left: 14px; transform: none; background: #35262e66; font-weight: 500; border-radius: 20px; padding: 3px 9px; }
body[data-authenticated="true"] .gallery-controls { bottom: auto; top: 44%; left: 6px; right: 6px; }
body[data-authenticated="true"] .gallery-controls button { background: #35262e33; }
body[data-authenticated="true"] .save-photo { background: #fffffff0; color: #4e4149; box-shadow: none; }
body[data-authenticated="true"] .save-photo.saved { background: var(--soft); color: var(--concept-pink-strong); }
body[data-authenticated="true"] .discovery-copy { padding-top: 16px; gap: 4px; }
body[data-authenticated="true"] .discovery-copy .connection { justify-content: center; text-align: center; }
body[data-authenticated="true"] .discovery-detail { min-height: 36px; justify-content: center; }
body[data-authenticated="true"] .discovery-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 0; padding-top: 12px; }
body[data-authenticated="true"] .discovery-actions > button:not(.deck-next) { position: relative; width: 100%; height: var(--concept-action-size); min-height: var(--concept-action-size); border: 1px solid var(--line); padding: 0 14px; gap: 8px; border-radius: 14px; box-shadow: none; }
body[data-authenticated="true"] .discovery-actions > .secondary:not(.deck-next) { color: #606d64; background: var(--surface); }
body[data-authenticated="true"] .discovery-actions > button:not(.deck-next) svg { width: 22px; height: 22px; stroke-width: 2.2; }
body[data-authenticated="true"] .discovery-actions > .primary svg[data-lucide="heart"] { fill: currentColor; }
body[data-authenticated="true"] .discovery-actions .action-label { position: static; transform: none; color: inherit; width: auto; font-size: 14px; font-weight: 650; line-height: 1.5; text-align: center; }
body[data-authenticated="true"] .discovery-actions .deck-next { background: transparent; border: 0; border-radius: var(--concept-radius-control); min-height: 44px; padding: 8px; font-size: 12px; }
body[data-authenticated="true"] .discovery-status { justify-content: center; font-size: 12px; }
body[data-authenticated="true"] .discovery-copy .discovery-unavailable { text-align: center; }

@media (min-width: 768px) and (max-width: 1199px) {
  body[data-authenticated="true"] .app-shell { grid-template-columns: 164px minmax(0, 1fr); }
  body[data-authenticated="true"] .navigation { padding-inline: 12px; }
  body[data-authenticated="true"] .brand { margin-inline: 0; }
  body[data-authenticated="true"] .brand > span { font-size: 16px; }
  body[data-authenticated="true"] .browse-layout { grid-template-columns: 140px minmax(0, 380px); gap: 24px; }
  body[data-authenticated="true"] .right-rail { display: none; }
  body[data-authenticated="true"] #main { padding-inline: 24px; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .brand-tools { gap: 12px; }
}
@media (max-width: 767px) {
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .topbar { height: 56px; padding-inline: 18px; gap: 8px; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .brand-tools { display: flex; gap: 4px; min-width: 0; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .app-brand { font-size: 16px; gap: 5px; }
  .app-brand > .brand-symbol { width: 21px; height: 21px; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .feedback-trigger { width: 36px; min-height: 44px; justify-content: center; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .feedback-trigger span { display: none; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .feedback-trigger svg { width: 17px; height: 17px; }
  body[data-authenticated="true"] .top-actions { gap: 3px; }
  body[data-authenticated="true"] .top-actions > .icon-button { width: 36px; height: 44px; }
  body[data-authenticated="true"] .avatar-button { min-width: 36px; min-height: 44px; display: grid; place-items: center; }
  body[data-authenticated="true"] .logout-button { width: 36px; height: 44px; padding: 0; }
  body[data-authenticated="true"] .logout-button span { display: none; }
  body[data-authenticated="true"] .navigation { height: calc(68px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); border-top: 1px solid var(--line); box-shadow: 0 -4px 18px #63374204; }
  body[data-authenticated="true"] .navigation nav { height: 68px; }
  body[data-authenticated="true"] .nav-link { gap: 4px; font-size: 10px; border-radius: 0; }
  body[data-authenticated="true"] .nav-link.active { color: var(--concept-pink-strong); }
  body[data-authenticated="true"] .nav-link.active::before { content: ''; width: 24px; height: 3px; border-radius: 3px; background: var(--accent); position: absolute; top: 0; }
  body[data-authenticated="true"] #main { padding: 18px 20px 104px; }
  body[data-authenticated="true"] .page-heading { margin-bottom: 24px; }
  body[data-authenticated="true"] .page-heading h1 { font-size: 24px; }
  body[data-authenticated="true"][data-route="browse"] #main { padding: 12px 20px calc(204px + env(safe-area-inset-bottom)); }
  body[data-authenticated="true"][data-route="browse"] .browse-heading { margin-bottom: 1px; }
  body[data-authenticated="true"][data-route="browse"] .browse-heading h1 { font-size: 17px; }
  body[data-authenticated="true"] .browse-layout { display: flex; gap: 0; }
  body[data-authenticated="true"] .browse-tools { display: contents; }
  body[data-authenticated="true"] .browse-tools .toolbar { gap: 4px; margin-bottom: 9px; }
  body[data-authenticated="true"] .browse-tools .scope-select { border: 0; padding: 6px 18px 6px 0; background: transparent; font-size: 11px; max-width: none; min-width: 0; }
  body[data-authenticated="true"] .browse-tools .toolbar-actions { gap: 0; }
  body[data-authenticated="true"] .browse-tools .toolbar-actions .icon-button { width: 40px; }
  body[data-authenticated="true"] .browse-tools .filter-button { padding-inline: 4px; font-size: 11px; }
  body[data-authenticated="true"] .discovery-photo .photo-frame > button:first-child { height: clamp(230px, calc(100dvh - 350px), 510px); }
  body[data-authenticated="true"] .portrait-summary { padding: 60px 18px 20px; }
  body[data-authenticated="true"] .portrait-summary h2 { font-size: 26px; }
  body[data-authenticated="true"] .portrait-summary .profile-facts { gap: 0 8px; font-size: 11px; }
  body[data-authenticated="true"] .discovery-copy { padding-top: 18px; }
  body[data-authenticated="true"] .discovery-actions { position: fixed; bottom: calc(68px + env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; padding: 10px 20px 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; border-top: 1px solid var(--line); background: var(--bg); }
  body[data-authenticated="true"] .discovery-actions .deck-next { min-height: 44px; padding: 6px; }
  body[data-authenticated="true"] .discovery-copy .discovery-detail { min-height: 44px; }
  body[data-authenticated="true"] .discovery-story { margin-top: 6px; }
  body[data-authenticated="true"] .right-rail { display: none; }
  body[data-authenticated="true"] dialog:not(.lightbox) { border-radius: var(--concept-radius-panel); }
  body[data-authenticated="true"] .chat-layout { border-radius: 18px; }
  body[data-authenticated="true"] .chat-header { background: var(--surface); }
  body[data-loading="true"] .loading-portrait { height: clamp(230px, calc(100dvh - 350px), 510px); }
}
@media (max-width: 359px) {
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .topbar { padding-inline: 12px; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .app-brand { font-size: 14px; gap: 4px; }
  body:is([data-authenticated="true"], [data-loading="true"], [data-recovering="true"], [data-onboarding="true"]) .feedback-trigger { width: 28px; }
  body[data-authenticated="true"] .top-actions { gap: 0; }
  body[data-authenticated="true"] .top-actions > .icon-button, body[data-authenticated="true"] .logout-button { width: 32px; }
  body[data-authenticated="true"][data-route="browse"] #main { padding-inline: 18px; }
  body[data-authenticated="true"] .portrait-summary { padding-inline: 15px; }
  body[data-authenticated="true"] .portrait-summary .text-tags { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-authenticated="true"] * { scroll-behavior: auto; }
}

/* Curiosity activation: nonblocking first-use notice outside the photo layout. */
.curiosity-first-guide { position:fixed; z-index:18; top:calc(64px + env(safe-area-inset-top)); left:50%; transform:translateX(-50%); width:min(480px,calc(100vw - 24px)); display:flex; gap:12px; justify-content:space-between; align-items:center; padding:12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--surface); box-shadow:0 8px 28px #30212b23; }
.curiosity-first-guide strong { display:flex; align-items:center; gap:7px; font-size:13px; }
.curiosity-first-guide strong svg { width:16px; height:16px; }
.curiosity-first-guide p { margin:5px 0 0; color:var(--muted); font-size:11px; line-height:1.5; word-break:keep-all; }
.curiosity-first-guide button { flex-shrink:0; min-height:44px; }
.curiosity-shared-interest { display:flex; gap:6px; align-items:baseline; flex-wrap:wrap; font-size:12px; line-height:1.7; color:var(--muted); margin:9px 0; }
.curiosity-shared-interest strong { color:var(--ink); }
.curiosity-shared-interest svg { width:14px; height:14px; flex-shrink:0; align-self:center; color:var(--accent); }
body[data-authenticated="true"] .discovery-copy .curiosity-privacy-note, .profile-cta .curiosity-privacy-note { display:flex; justify-content:center; align-items:center; gap:5px; margin:5px 0; color:var(--muted); font-size:11px; line-height:1.6; text-align:center; word-break:keep-all; }
.curiosity-privacy-note svg { width:13px; height:13px; flex-shrink:0; }
@media(max-width:767px) { .curiosity-first-guide { top:calc(58px + env(safe-area-inset-top)); padding:10px 12px; gap:8px; } .curiosity-first-guide strong { font-size:12px; } .curiosity-first-guide p { font-size:11px; } }

/* On narrow phones, preserve the existing portrait height and fixed action geometry.
   Matching interests remain highlighted in the existing photo tags, with fuller explanations in the profile. */
body[data-authenticated="true"] .text-tags .curiosity-tag-shared { background:var(--soft); color:var(--accent); outline:1px solid var(--accent); outline-offset:0; }
@media(max-width:767px) { body[data-authenticated="true"] .discovery-copy .curiosity-privacy-note, body[data-authenticated="true"] .discovery-copy .curiosity-shared-interest { display:none; } }

/* Online presence is an ephemeral, privacy-filtered green dot, not last-seen tracking. */
.presence-indicator:not([hidden]) { display:inline-block; width:11px; height:11px; min-width:11px; border:2px solid #fff; border-radius:50%; background:#22b860; box-shadow:0 0 0 1px #10773f4d; vertical-align:middle; margin-left:5px; }
.presence-indicator[hidden] { display:none !important; }
.photo-frame > .presence-indicator:not([hidden]) { position:absolute; top:44px; right:16px; z-index:3; width:13px; height:13px; }
.person-photo { position:relative; }
.person-photo > .presence-indicator:not([hidden]) { position:absolute; right:9px; bottom:9px; z-index:3; width:13px; height:13px; pointer-events:none; }
.mini-person strong .presence-indicator:not([hidden]), [data-chat-contact] strong .presence-indicator:not([hidden]) { margin-left:7px; }
.presence-setting { align-items:center; }
.presence-setting > div { min-width:0; }
.presence-toggle { flex-shrink:0; min-height:44px; min-width:100px; }
.presence-toggle[aria-checked="false"] { opacity:.72; }
@media(max-width:359px) { .presence-setting { flex-wrap:wrap; } }

/* Approved room organizer presence shares the existing ephemeral green dot. */
.room-online-organizers { display:flex; flex-wrap:wrap; gap:7px 14px; margin:8px 0 18px; padding:10px 12px; border:1px solid var(--line); border-radius:12px; background:var(--surface); color:var(--muted); font-size:12px; }
.room-online-organizers > span { display:inline-flex; align-items:center; gap:4px; max-width:100%; overflow-wrap:anywhere; }
.room-online-organizers strong { color:var(--ink); font-weight:650; }
.room-online-organizers .presence-indicator:not([hidden]) { margin-left:3px; }
@media(max-width:359px) { .room-online-organizers { gap:6px 9px; font-size:11px; } }
