* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --ink: #151515;
  --secondary: #5e6065;
  --line: #e8e8ea;
  --wash: #f6f6f7;
  --navy: #172748;
  --gold: #ad7d2e;
  font: 16px system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}
body { margin: 0; min-height: 100dvh; color: var(--ink); background: #fff; }
main { max-width: 672px; margin: auto; padding: max(8px, env(safe-area-inset-top)) clamp(16px,4vw,34px) calc(96px + env(safe-area-inset-bottom)); }
.top { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.brand { color: var(--navy); display: inline-flex; align-items: center; gap: clamp(7px, 2.5vw, 12px); text-decoration: none; }
.brand-emblem { display: block; width: clamp(34px, 10vw, 44px); height: auto; flex: none; }
.brand-type { display: grid; gap: 3px; line-height: 1; }
.brand-name { font-size: clamp(.94rem, 4.1vw, 1.32rem); font-weight: 780; letter-spacing: .095em; }
.brand-subtitle { color: #79531b; font-size: clamp(.49rem, 2vw, .58rem); font-weight: 700; letter-spacing: .19em; }
.top select { width: auto; min-width: 91px; padding: 6px 8px; min-height: 42px; }
.welcome { padding: clamp(24px,6vw,43px) 0 22px; }
.welcome h1 { font-size: clamp(1.95rem,6vw,3.3rem); line-height: 1.08; letter-spacing: -.056em; margin: 0 0 10px; }
.welcome p, .muted { margin: 0; color: var(--secondary); line-height: 1.52; }
button, input, select { color: inherit; font: inherit; min-height: 46px; border-radius: 10px; }
button { cursor: pointer; padding: 9px 14px; font-weight: 700; }
button:disabled { cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
input, select { background: #fff; border: 1px solid #aaaeb5; padding: 8px 11px; width: 100%; min-width: 0; }
.features, .profiles { list-style: none; padding: 0; margin: 0; }
.feature { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; text-align: start; gap: 11px; width: 100%; background: #fff; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 54px; padding: 8px 0; }
.feature:disabled { color: var(--secondary); }
.feature small { font-weight: 450; font-size: .8rem; color: var(--secondary); }
.feature.active { background: var(--ink); color: white; padding: 10px 15px; border: 0; border-radius: 12px; margin: 0; min-height: 56px; }
.feature.active .arrow { font-size: 1.2rem; }
.feature .symbol { text-align: center; font-size: 1.2rem; }
.people { padding: 28px 0 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.section-heading h2 { margin: 0; font-size: clamp(1.2rem,4vw,1.35rem); }
.section-heading span { color: var(--secondary); font-size: .83rem; }
.sample { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.sample strong { font-size: 1rem; overflow-wrap: anywhere; }
.sample p { color: var(--secondary); font-size: .87rem; margin: 2px 0 0; }
.portrait { flex: 0 0 48px; width: 48px; aspect-ratio: 1; border-radius: 50%; background: #e9e9e9 url("friends-portraits.jpg") no-repeat; background-size: 300% 100%; }
.portrait-one { background-position: left center; }
.portrait-two { background-position: center; }
.portrait-three { background-position: right center; }
.card { padding: clamp(14px,4vw,22px); border: 1px solid var(--line); border-radius: 16px; }
.narrow { margin: clamp(14px,4vw,28px) 0 0; }
.card h1 { font-size: 1.32rem; margin: 0 0 7px; }
.card label { display: grid; gap: 6px; margin: 14px 0; font-weight: 650; }
.primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.secondary, .quiet { color: var(--ink); background: #fff; border: 1px solid #aeb0b5; }
.card > button.primary, #profile > button, #join > button { width: 100%; }
#lobby button { margin: 12px 0 0; }
.chat { border: 0; padding: 0; border-radius: 0; }
.chat-head, .invite, #composer { display: flex; gap: 10px; align-items: center; }
.chat-head { padding: 4px 0 14px; border-bottom: 1px solid var(--line); }
.chat-head .quiet { margin-left: auto; flex-shrink: 0; }
.chat-head h1 { margin-bottom: 2px; overflow-wrap: anywhere; }
.avatar { flex: 0 0 44px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: var(--wash); border: 1px solid var(--line); font-weight: 800; }
.invite { margin: 14px 0; justify-content: space-between; background: var(--wash); border-radius: 12px; padding: 11px; }
.invite p { margin: 0 0 6px; }
.invite strong { overflow-wrap: anywhere; }
.mode, #chat-status { margin: 10px 0; color: var(--secondary); font-size: .9rem; }
#chat-status:empty { display: none; }
#messages { display: flex; flex-direction: column; min-height: 145px; max-height: 49dvh; overflow: auto; overscroll-behavior: contain; padding: 6px 0; }
.bubble, .bubble.mine { max-width: 88%; align-self: flex-start; padding: 10px 0; background: white; color: var(--ink); border: 0; border-bottom: 1px solid var(--line); border-radius: 0; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.6; }
.bubble.mine { align-self: flex-end; text-align: end; padding: 8px 13px; margin: 5px 0; background: var(--wash); border: 1px solid var(--line); border-radius: 15px 15px 4px 15px; }
.bubble p { margin: 0; }
.bubble summary, .bubble small { color: var(--secondary); font-size: .87rem; margin-top: 5px; }
.bubble summary { cursor: pointer; padding: 6px 0; }
.bubble button { margin-top: 7px; }
#composer { border-top: 1px solid var(--line); padding-top: 12px; }
#composer input { border-radius: 24px; padding-inline: 14px; }
#composer button { flex-shrink: 0; border-radius: 24px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 4px 8px max(5px,env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
.bottom-inner { max-width: 570px; margin: auto; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
.bottom button { display: grid; place-content: center; justify-items: center; gap: 2px; min-height: 54px; min-width: 0; padding: 4px 2px; border: 0; background: #fff; color: var(--secondary); font-size: .82rem; }
.bottom button[aria-current="page"] { background: var(--wash); color: var(--ink); }
.bottom button:disabled { color: #696b71; }
.bottom svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }


.scenery-banner { margin-top: 14px; }
.scenery-stage { height: 150px; position: relative; isolation: isolate; overflow: hidden; border-radius: 15px; background: #172748; touch-action: pan-y; }
.scenery-slide { position: absolute; inset: 0; margin: 0; opacity: 0; pointer-events: none; transition: opacity .55s ease; }
.scenery-slide.is-current { opacity: 1; }
.scenery-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scenery-slide[data-place="fuji"] img { object-position: 50% 54%; }
.scenery-slide[data-place="seoul"] img { object-position: 50% 30%; }
.scenery-slide[data-place="los-angeles"] img { object-position: 50% 60%; }
.scenery-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#101419a6,transparent 74%); }
.scenery-slide figcaption { position: absolute; left: 16px; bottom: 13px; z-index: 1; color: #fff; text-shadow: 0 1px 4px #000; display: grid; gap: 3px; }
.scenery-slide figcaption span { font-size: .80rem; letter-spacing: .045em; }
.scenery-slide figcaption strong { font-size: clamp(1.15rem,4.5vw,1.5rem); line-height: 1.14; }
.scenery-prev, .scenery-next, .scenery-pause { position: absolute; padding: 0; width: 42px; min-height: 42px; border-radius: 50%; color: white; border: 1px solid #ffffff65; background: #14182085; z-index: 2; }
.scenery-prev, .scenery-next { top: calc(50% - 27px); font-size: 1.45rem; }
.scenery-prev { left: 8px; }
.scenery-next { right: 8px; }
.scenery-pause { top: 8px; right: 8px; font-size: .95rem; }
.scenery-dots { display: flex; justify-content: center; }
.scenery-dots button { width: 38px; min-height: 32px; padding: 0; border: 0; background: transparent; }
.scenery-dots button::before { content: ""; display: block; margin: auto; width: 7px; height: 7px; border-radius: 7px; background: #b8bdc5; }
.scenery-dots button[aria-current="true"]::before { width: 17px; background: var(--navy); }
.public-preview { padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.preview-post { display: grid; grid-template-columns: 40px 1fr; gap: 11px; padding: 14px 0; border-top: 1px solid var(--line); }
.preview-post .portrait { width: 40px; margin: 0; }
.preview-post header { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.preview-post header span { color: var(--secondary); font-size: .82rem; }
.preview-post p { margin: 5px 0 0; line-height: 1.53; }
@media (prefers-reduced-motion: reduce) { .scenery-slide { transition: none; } }

.scenery-alternate .scenery-stage { height: clamp(190px, 52vw, 238px); }
.scenery-alternate .scenery-slide figcaption,
.scenery-alternate .scenery-slide::after { display: none; }
.scenery-alternate .scenery-slide[data-place="fuji"] img { object-position: 50% 20%; }
.scenery-alternate .scenery-slide[data-place="seoul"] img { object-position: 50% 19%; }
.scenery-alternate .scenery-slide[data-place="los-angeles"] img { object-position: 50% 21%; }
/* Keep the home actions within reach without compressing the chat views. */
#home { display: flex; flex-direction: column; gap: 12px; }
#scenery-preview:not([hidden]) { display: contents; }
#home .scenery-banner { order: -3; margin-top: 8px; }
#home .welcome { order: -2; padding: 0; }
#home .welcome h1 { font-size: clamp(1.35rem, 5vw, 1.8rem); margin-bottom: 4px; }
#home .welcome p { line-height: 1.4; }
#home .conversation-entry { order: -1; }
#home .feature.active { min-height: 46px; background: #111b2e; }
#home .features {
  order: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
#home .features .feature {
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: 7px;
  row-gap: 0;
  padding: 6px 9px;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: linear-gradient(180deg, #fff, #f8f9fb);
  box-shadow: 0 1px 3px #111b2e12;
  line-height: 1.25;
  overflow-wrap: anywhere;
}
#home .features .feature small { grid-column: 2; }
#home .features .feature:last-child { grid-column: 1 / -1; }
#home .people { order: 1; padding: 0; }
#home .profiles {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(86px, 1fr);
  gap: 6px;
  overflow-x: auto;
}
#home .sample {
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 3px;
  text-align: center;
  border: 0;
}
#home .sample .portrait { flex: none; width: 46px; }
#home .public-preview { order: 2; padding: 0 0 4px; }
#home .preview-post { gap: 8px; padding: 8px 0; }
#home .preview-post p { margin-top: 2px; line-height: 1.42; }
#home .scenery-stage { height: 105px; }
#home .scenery-alternate .scenery-stage { height: clamp(133px, 36.4vw, 167px); }
#home .scenery-dots button { min-height: 24px; }
#home .scenery-prev, #home .scenery-next { top: calc(50% - 21px); }
#home .preview-post header strong { font-size: 1rem; }
#home .preview-post header span { font-size: .75rem; }
#home :is(.scenery-prev, .scenery-next, .scenery-pause) {
  border-color: transparent;
  background: transparent;
}
#home :is(.scenery-prev, .scenery-next, .scenery-pause)::before {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  box-sizing: border-box;
  width: 31.5px;
  height: 31.5px;
  transform: translate(-50%, -50%);
  z-index: -1;
  border: 1px solid #ffffff65;
  border-radius: 50%;
  background: #14182085;
}
#home :is(.scenery-prev, .scenery-next) { font-size: 1.0875rem; }
#home .scenery-pause { font-size: .7125rem; }

/* Reference layout: mobile member list, photo profile, conversation and sign-up. */
:root { --navy:#151e39; --gold:#e4a322; --line:#e9e9ed; --blue:#b9cee4; --yellow:#ffea57; }
body { background:#eef0f4; }
main { width:100%; max-width:448px; min-height:100dvh; padding:0; background:white; position:relative; }
body[data-screen="home"] main { padding-bottom:76px; }
.world-clocks { display:flex; justify-content:space-between; gap:12px; padding:3px 16px; background:var(--navy); color:#f5d89c; font-size:.8125rem; line-height:1.25; font-variant-numeric:tabular-nums; }
body:not([data-screen="home"]) .world-clocks { display:none; }
.top { position:relative; min-height:78px; padding:10px 16px 10px 24px; background:var(--navy); color:#fff; border:0; gap:8px; }
.brand { color:#fff; gap:10px; }
.brand-emblem { width:clamp(33px,10vw,49px); }
.brand-name { font-size:clamp(1rem,5.8vw,1.68rem); letter-spacing:0; }
.top-actions { display:flex; align-items:center; gap:0; }
.top button, .conversation-head button { color:inherit; background:none; border:0; padding:3px; font-size:1.55rem; min-width:34px; min-height:44px; }
#ui-language:not([hidden]) { position:absolute; top:100%; right:10px; z-index:5; color:var(--ink); }
body:not([data-screen="home"]) .top-actions { display:none; }
body:not([data-screen="home"]) .top { justify-content:center; }
body:not([data-screen="home"]) #top-back { position:absolute; left:13px; }
body[data-screen="member-profile"] .top, body[data-screen="sample-chat"] .top,
body:not([data-screen="home"]) .bottom { display:none; }
#home { gap:0; }
.countries { display:grid; grid-template-columns:repeat(4,1fr); gap:2px; padding:14px 14px 11px; border-bottom:1px solid var(--line); }
.countries button { min-height:44px; border:0; background:white; padding:3px; border-radius:30px; font-size:clamp(.9rem,4.6vw,1.19rem); white-space:nowrap; }
.countries button[aria-pressed="true"] { background:var(--navy); color:#fff; }
#member-search { width:calc(100% - 28px); margin:10px 14px 0; }
#directory-note { margin:10px 14px; }
#members { padding:4px 14px 0; }
.member-row { width:100%; display:grid; grid-template-columns:clamp(64px,20vw,86px) minmax(0,1fr) auto; align-items:center; text-align:left; column-gap:clamp(8px,3vw,14px); background:white; border:0; border-bottom:1px solid var(--line); border-radius:0; padding:12px 0; min-height:104px; }
.member-photo { width:100%; aspect-ratio:1; display:block; position:relative; flex:none; }
.member-photo img { width:100%; height:100%; display:block; border-radius:50%; object-fit:cover; }
.online { position:absolute; right:1px; bottom:0; width:25%; aspect-ratio:1; background:#02af35; border:3px solid #fff; border-radius:100%; }
.member-info,.row-meta { display:grid; gap:3px; min-width:0; }
.member-name { font-size:clamp(1.1rem,5.6vw,1.55rem); line-height:1.18; overflow-wrap:anywhere; }
.member-age,.member-bio { font-size:clamp(.82rem,4.2vw,1.11rem); line-height:1.27; font-weight:550; overflow-wrap:anywhere; }
.row-meta { justify-items:end; align-self:start; padding-top:7px; color:#454957; }
.row-time { white-space:nowrap; font-size:clamp(.72rem,3.7vw,1rem); font-weight:480; }
.unread { background:#e93226; color:white; min-width:32px; min-height:32px; display:grid; place-items:center; font-size:1.12rem; border-radius:50%; margin-top:5px; }
.bottom { left:50%; right:auto; width:min(100%,448px); transform:translateX(-50%); padding:5px 5px max(5px,env(safe-area-inset-bottom)); }
.bottom-inner { grid-template-columns:repeat(5,minmax(0,1fr)); gap:0; }
.bottom button { color:#10121a; font-size:clamp(.76rem,3.7vw,.97rem); gap:4px; }
.bottom button[aria-current="page"] { background:#fff; color:#172351; }
.bottom i { display:grid; place-items:center; font-size:1.55rem; font-style:normal; min-height:32px; }
.top svg:not(.brand-emblem), .bottom svg, .conversation-head svg, .hero-actions svg, .message-bar svg { width:25px; height:25px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.bottom svg { width:31px; height:31px; }
.profile-hero { min-height:clamp(360px,111vw,493px); display:flex; align-items:end; isolation:isolate; position:relative; color:white; background:#171d33; }
#profile-cover { position:absolute; inset:0 0 auto; height:82%; width:100%; object-fit:cover; object-position:center 38%; z-index:-2; }
.profile-hero::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(0deg,#191e36 0%,#181d33 19%,#181d33aa 33%,transparent 70%); }
.round { position:absolute; top:18px; width:46px; min-height:46px; border:0; border-radius:50%; background:#1c1721ac; color:#fff; padding:0; font-size:1.75rem; }
.round.back { left:14px; } .round.more { right:14px; }
.hero-info { width:100%; padding:0 23px 14px; }
#profile-photo { width:26%; max-width:111px; margin-left:-10px; }
#profile-photo img { border:3px solid white; }
.hero-info h1 { font-size:clamp(1.7rem,7vw,2rem); margin:4px 0 0; line-height:1.15; }
.hero-info p { font-size:1.18rem; margin:3px 0 12px; }
.hero-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.hero-actions button { background:#131b2f80; border:2px solid #f7f8ff; color:white; min-height:44px; border-radius:14px; display:flex; align-items:center; justify-content:center; gap:8px; padding:3px; font-size:clamp(.98rem,4.5vw,1.25rem); }
.hero-actions button[aria-pressed="true"] { color:#ffdd81; border-color:#ffdd81; }
.profile-tabs { display:grid; grid-template-columns:repeat(2,1fr); border-bottom:1px solid var(--line); padding:0 13px; }
.profile-tabs button { color:#606478; background:white; border:0; border-bottom:4px solid transparent; border-radius:0; font-size:1.15rem; }
.profile-tabs [aria-pressed="true"] { color:#172351; border-bottom-color:#172351; }
#profile-panel { padding:12px 14px 16px 24px; }
#profile-panel > .member-photo { width:120px; }
.profile-fields { margin:0; display:grid; grid-template-columns:minmax(91px,33%) minmax(0,1fr); gap:6px 4px; font-size:clamp(.93rem,4.2vw,1.16rem); font-weight:650; }
.profile-fields dt { display:flex; gap:12px; align-items:flex-start; }
.profile-fields dd { margin:0; overflow-wrap:anywhere; }
.field-icon { width:22px; text-align:center; }
.profile-fields .bio-text { background:#f1f0f0; padding:8px 12px; border-radius:16px; line-height:1.43; }
.chat-screen { height:100dvh; display:flex; flex-direction:column; background:linear-gradient(130deg,#b4cae2,#c2d4e6); }
.conversation-head { display:flex; align-items:center; gap:8px; background:var(--navy); color:#fff; min-height:77px; padding:9px 12px; }
#sample-avatar { width:clamp(40px,13vw,55px); }
#sample-avatar img,.message-row img { border:2px solid #fff; }
.conversation-head .contact { flex:1; min-width:0; }
.conversation-head h1 { margin:0; font-size:clamp(1rem,5.3vw,1.45rem); line-height:1.2; overflow-wrap:anywhere; }
.conversation-head p { margin:4px 0 0; font-size:clamp(.77rem,4vw,1.1rem); }
.conversation-log { flex:1; overflow:auto; padding:17px 11px 12px; }
.sample-note { margin:10px 14px; color:var(--secondary); font-size:.88rem; }
.sample-view-controls { display:flex; flex-wrap:wrap; gap:5px 10px; align-items:center; padding:8px 12px; color:var(--navy); background:#ffffffcc; font-size:.88rem; }
.sample-view-controls select { width:auto; min-height:36px; padding:3px 6px; }
.sample-view-controls p { flex-basis:100%; margin:0; }
.message-date { width:max-content; margin:0 auto 18px; border-radius:30px; background:#6f8fa332; padding:8px 17px; font-weight:650; }
.message-row { display:flex; align-items:flex-end; gap:6px; margin-bottom:17px; }
.message-row .member-photo { align-self:start; width:clamp(32px,12vw,53px); }
.message-row time { color:#354553; font-size:clamp(.62rem,3.4vw,.88rem); white-space:nowrap; flex:none; padding-bottom:4px; }
.message-bubble { position:relative; min-width:0; max-width:73%; padding:10px 13px; background:#fff; border-radius:17px; white-space:pre-line; overflow-wrap:anywhere; line-height:1.45; font-size:clamp(.92rem,4.7vw,1.24rem); font-weight:650; }
.message-bubble p { margin:0; }
.message-bubble details { margin-top:5px; font-size:.83em; font-weight:480; }
.inbound .message-bubble { max-width:calc(100% - clamp(86px,25vw,111px)); border-top-left-radius:10px; }
.outbound { justify-content:end; }
.outbound .message-bubble { background:var(--yellow); border-top-right-radius:10px; }
.outbound time { order:-1; }
.message-bar { display:flex; gap:4px; margin:10px 12px max(22px,env(safe-area-inset-bottom)); padding:6px; background:white; border-radius:32px; }
.message-bar input { flex:1; border:0; border-radius:28px; min-width:0; background:#eef0f2; }
.message-bar button { padding:0; width:39px; min-height:41px; flex:none; border:0; border-radius:50%; background:white; font-size:1.46rem; }
.message-bar button:first-child { background:#f1f2f4; }
.signup { padding:12px 16px 22px; }
.signup h1 { text-align:center; color:var(--navy); margin:1px 0 12px; font-size:clamp(1.85rem,8vw,2.4rem); }
.steps { list-style:none; display:grid; grid-template-columns:repeat(3,1fr); margin:0 0 18px; padding:0; text-align:center; font-weight:700; color:#545969; }
.steps li { position:relative; display:grid; justify-items:center; gap:3px; }
.steps b { width:34px; height:34px; border:2px solid #abb0b9; border-radius:50%; display:grid; place-items:center; background:white; z-index:1; }
.steps li:not(:last-child)::after { content:""; position:absolute; left:50%; right:-50%; top:16px; height:2px; background:#abb0b9; }
.steps [aria-current="step"] { color:var(--navy); }
.steps [aria-current="step"] b { color:white; background:var(--navy); border-color:var(--navy); }
.signup-card { border:1px solid var(--line); border-radius:20px; padding:13px clamp(12px,7vw,35px) 23px; }
.signup-card fieldset { border:0; padding:0; margin:0; }
.signup-card legend { text-align:center; font-size:clamp(1rem,5vw,1.35rem); font-weight:800; color:var(--navy); }
.signup-card fieldset p { text-align:center; margin:6px 0 15px; color:#535862; font-size:clamp(.75rem,3.7vw,.98rem); }
#age-options { display:grid; gap:7px; }
#age-options label { display:flex; align-items:center; gap:20px; min-height:42px; padding:3px 18px; border:1px solid #cbced4; border-radius:26px; color:#10121a; font-size:1.2rem; font-weight:750; cursor:pointer; }
#age-options label:has(:checked) { background:#fcf4d6; }
#age-options input { width:24px; height:24px; min-height:0; padding:0; margin:0; accent-color:var(--navy); }
#signup-credentials label { display:grid; gap:5px; margin:8px 0 14px; font-weight:700; }
#signup-next { margin:30px 0 0; background:var(--navy); font-size:1.32rem; min-height:56px; border-radius:15px; }
#lobby,#chat { margin:14px; }
#messages { background:var(--blue); padding:10px; border-radius:12px; }
#messages .message-row { margin-bottom:7px; }
#messages .message-bubble { max-width:calc(100% - clamp(38px,14vw,59px)); padding:8px 12px; border-radius:14px; }
.comments { margin:20px 0 0; padding-top:12px; border-top:1px solid var(--line); }
.comments h2 { font-size:1.1rem; margin:0 0 8px; }
.comments p { overflow-wrap:anywhere; }
.comments form { display:flex; gap:6px; }
.comments button { white-space:nowrap; }
@media (min-width:480px) { main { box-shadow:0 0 13px #15213a25; } }
@media (max-width:370px) { .top { padding-inline:12px; } .top button { min-width:29px; } #members { padding-inline:10px; } .member-row { min-height:91px; } }

.flag-image { display:inline-block; width:1.32em; height:.94em; object-fit:fill; vertical-align:-.07em; border-radius:3px; margin-inline-start:.2em; }
/* Square member photos, including the portrait and conversation headers. */
.member-photo img { border-radius:0; object-view-box:inset(14%); }
#profile-photo img, #sample-avatar img, .message-row img { border-radius:0; }
.chat-head .avatar { border-radius:0; }
.member-initial { display:grid; place-items:center; width:100%; height:100%; background:#e7ebf4; color:var(--navy); font-size:1.75rem; font-weight:750; }
#account-dialog, #chat-availability-dialog { width:min(calc(100vw - 22px),420px); max-height:calc(100dvh - 32px); padding:15px; border:1px solid #c4c9d5; border-radius:18px; color:var(--ink); background:#fff; }
#account-dialog::backdrop, #chat-availability-dialog::backdrop { background:#141c3b9e; }
#install-bar { display:flex; justify-content:flex-end; padding:5px 16px; background:var(--navy); }
body:not([data-screen="home"]) #install-bar { display:none; }
#install-app { min-height:40px; padding:6px 14px; border:1px solid #e1bb79; border-radius:9px; color:#f5d89c; background:transparent; font-weight:750; }
@media (max-width:479px) {
  body[data-screen="home"] .top { min-height:68px; padding-block:7px; }
  #install-bar { padding-block:4px 0; }
}
#install-help { width:min(calc(100vw - 22px),400px); padding:18px; border:1px solid #c4c9d5; border-radius:18px; color:var(--ink); background:#fff; }
#install-help h2 { margin:0; color:var(--navy); }
#install-help::backdrop { background:#141c3b9e; }
#account-dialog header { display:flex; justify-content:space-between; align-items:center; gap:10px; padding-bottom:8px; color:var(--navy); }
#account-dialog h1 { margin:0; font-size:1.38rem; }
#account-dialog h2 { margin:18px 0 8px; font-size:1.11rem; color:var(--navy); }
.admin-view > main, .admin-view > .bottom { display:none; }
.admin-page { min-height:100dvh; background:#f1f3f8; }
.admin-header { display:flex; justify-content:space-between; align-items:center; gap:14px; background:var(--navy); color:#fff; padding:calc(12px + env(safe-area-inset-top)) max(16px,calc((100% - 1050px) / 2)) 14px; }
.admin-header h1 { margin:3px 0 0; font-size:clamp(1.4rem,5vw,2rem); }
.admin-header a { color:#fff; white-space:nowrap; }
.admin-header .admin-brand { color:#f5d89c; font-weight:700; }
.admin-body { max-width:1082px; margin:auto; padding:16px 16px calc(24px + env(safe-area-inset-bottom)); }
.admin-actions, .admin-member-controls { display:flex; flex-wrap:wrap; gap:8px; }
.admin-board { margin-top:16px; background:white; border:1px solid var(--line); border-radius:12px; padding:clamp(12px,3vw,24px); }
.admin-board h2 { margin:0 0 12px; font-size:1.18rem; }
.admin-board .account-search input { min-width:0; flex:1; }
.admin-board .account-search button { flex:none; white-space:nowrap; }
.admin-member { border-top:1px solid var(--line); padding-block:9px; }
.admin-member summary { cursor:pointer; padding:8px 2px; overflow-wrap:anywhere; }
.admin-avatar { width:44px; height:44px; object-fit:cover; border-radius:8px; vertical-align:middle; margin-inline-end:10px; }
#notifications { position:relative; }
#notifications.has-chat-alert::after { content:''; position:absolute; inset-block-start:3px; inset-inline-end:3px; width:9px; height:9px; border-radius:50%; background:#ffba63; }
.admin-member summary span { display:inline-block; margin-inline-start:12px; color:var(--secondary); }
.admin-member-controls { padding:4px 0; }
.admin-pagination { display:flex; justify-content:center; align-items:center; flex-wrap:wrap; gap:10px; margin-top:16px; }
.admin-pagination form { display:flex; align-items:center; gap:6px; }
.admin-pagination input { width:5em; }
.admin-body #account-content > form:not(.account-search) { max-width:440px; }
.feedback-text { white-space:pre-wrap; overflow-wrap:anywhere; }
.guide-languages { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0 12px; }
.guide-languages button { margin:0; }
.more-app-links a { display:inline-flex; align-items:center; min-height:44px; padding:8px 12px; border-radius:12px; text-decoration:none; }
.directory-pages { display:flex; align-items:center; justify-content:center; gap:12px; padding:14px 0; }
.account-menu, #account-content > form:not(.account-search) { display:grid; gap:9px; }
#account-content > .quiet { margin:4px 4px 3px 0; }
#account-content label { display:grid; gap:5px; font-weight:650; }
#account-content textarea { min-height:100px; padding:9px; font:inherit; border:1px solid #aaaeb5; border-radius:10px; resize:vertical; }
#account-content .primary, .comments .primary { color:white; background:var(--navy); border-color:var(--navy); }
.account-search,.account-row { display:flex; align-items:center; gap:8px; }
.account-row { justify-content:space-between; border-top:1px solid var(--line); padding:9px 0; overflow-wrap:anywhere; }
.account-row p { margin:0; }
.account-member { display:grid; }
.account-member button { margin-right:3px; padding-inline:9px; }
.account-member button:disabled { opacity:.45; }
#account-status:empty,#signup-error:empty { display:none; }
#account-status,#signup-error { font-weight:650; color:#842d32; }
.recovery-code { display:block; overflow-wrap:anywhere; padding:10px; background:#eef0f5; border-radius:8px; user-select:all; }
#signup-login { margin-top:10px; }
#profile-section-title { border-bottom:1px solid var(--line); color:#172351; font-size:1.15rem; margin:0; padding:12px 24px 9px; }
.uploaded-photo img { object-view-box:none; }
.chat-head .avatar { position:relative; overflow:hidden; }
.chat-head .avatar img { width:100%; height:100%; object-fit:cover; position:absolute; inset:0; }
.contact-link { display:block; text-align:center; border:1px solid var(--navy); border-radius:10px; padding:10px; margin:8px 0; color:var(--navy); font-weight:700; }
.photo-slot { border-top:1px solid var(--line); margin-top:12px; padding:4px 0 12px; }
.photo-slot img { display:block; width:100%; max-height:145px; object-fit:contain; object-position:left; margin-bottom:8px; }
.photo-slot button { margin-bottom:8px; }
#account-content .delete-confirmation { display:flex; align-items:center; gap:9px; }
#account-content .delete-confirmation input { width:19px; height:19px; min-height:0; flex:none; }
.signup-policy { margin-bottom:12px; color:var(--navy); line-height:1.45; }
.signup-policy summary { cursor:pointer; font-weight:700; }
.signup-policy p { color:#323947; margin:7px 0; }
#signup-credentials .signup-consent { display:flex; align-items:flex-start; gap:9px; font-size:.95rem; }
.signup-consent input { width:19px; height:19px; min-height:0; flex:none; margin:2px 0 0; }
.member-wall { margin-top:15px; }
