/* v6: currency, calls, room hosting, threaded replies, help pages, search pages, founder profile. */

/* ── currency ───────────────────────────────────────── */
.price-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 6px; }
.price-controls .billing-toggle { margin: 0; }
.currency-pick { position: relative; display: inline-flex; align-items: center; gap: 6px; padding-left: 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); }
.currency-pick select { height: 38px; padding: 0 12px 0 0; border: 0; background: transparent; color: var(--ink); font-weight: 600; font-size: var(--t-s); cursor: pointer; }
.currency-pick select:focus { outline: none; }
.currency-pick:focus-within { box-shadow: var(--focus); }
.currency-note { margin-bottom: 14px; }

/* ── call screen ────────────────────────────────────── */
.call-screen {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(20px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: radial-gradient(circle at 30% 20%, #26318f, transparent 55%), radial-gradient(circle at 80% 90%, #6b4a0e, transparent 50%), #0b1211;
  color: #eef2f0; animation: fade 200ms var(--ease);
}
.call-screen.is-closing { opacity: 0; transition: opacity 160ms; }
.call-inner { position: relative; width: min(100%, 420px); display: grid; justify-items: center; gap: 10px; text-align: center; }
.call-kind { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-s); color: #b8c4ff; font-weight: 600; }
.call-who { position: relative; display: grid; place-items: center; width: 220px; height: 220px; margin: 10px 0 6px; }
.call-who .avatar-xl { width: 128px; height: 128px; font-size: 2.6rem; box-shadow: none; position: relative; z-index: 1; }
.call-rings span { position: absolute; inset: 0; margin: auto; width: 128px; height: 128px; border-radius: 50%; border: 2px solid rgb(255 255 255 / 0.35); animation: ring-out 2.4s ease-out infinite; }
.call-rings span:last-child { animation-delay: 1.2s; border-color: rgb(229 162 35 / 0.6); }
@keyframes ring-out { from { transform: scale(1); opacity: 0.9; } to { transform: scale(1.7); opacity: 0; } }
.call-name { font-family: var(--f-display); font-weight: 400; font-size: 2rem; color: #fff; }
.call-name .name-mark { justify-content: center; }
.call-status { color: #cfd8d4; min-height: 1.4em; }
.call-note { font-size: var(--t-xs); color: #9fb0aa; max-width: 30ch; }
.call-self { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); top: max(16px, env(safe-area-inset-top, 0px)); width: 128px; aspect-ratio: 3 / 4; max-width: 30vw; border-radius: 14px; overflow: hidden; background: #1b2625; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 0.15); }
.call-self video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.call-self .tiny { position: absolute; left: 8px; bottom: 6px; color: #fff; }
.call-controls { display: flex; gap: 18px; margin-top: 26px; }
.call-btn { display: grid; justify-items: center; gap: 6px; width: 72px; padding: 0; border: 0; background: none; color: #eef2f0; font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.call-btn > svg { width: 60px; height: 60px; padding: 18px; border-radius: 50%; background: rgb(255 255 255 / 0.12); box-sizing: border-box; transition: background var(--dur); }
.call-btn:hover > svg { background: rgb(255 255 255 / 0.2); }
.call-btn.is-on > svg { background: #eef2f0; color: #0b1211; }
.call-end > svg { background: #d4304f; transform: rotate(135deg); }
.call-end:hover > svg { background: #e8455f; }
.call-btn:focus-visible { box-shadow: none; outline: none; }
.call-btn:focus-visible > svg { box-shadow: 0 0 0 3px #0b1211, 0 0 0 5px #b8c4ff; }
.call-line { align-self: center; display: inline-flex; align-items: center; gap: 6px; margin: 6px 0; padding: 4px 12px; border-radius: var(--r-pill); background: var(--sunk); color: var(--ink-2); font-size: var(--t-xs); }

/* ── rooms: hosting ─────────────────────────────────── */
.room-person { display: grid; justify-items: center; gap: 4px; width: 100%; padding: 4px; border: 0; border-radius: var(--r-m); background: none; color: var(--ink); text-align: center; cursor: pointer; }
.room-person:hover { background: color-mix(in oklab, var(--sunk) 70%, transparent); }
.stage > li { width: 112px; }
.listeners > li { width: 64px; }
.listeners .room-person .speaker-name { font-size: var(--t-xs); font-weight: 500; max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.room-person.is-speaker .speaker-av::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--overlap); opacity: 0; animation: talk 5.1s ease-in-out infinite; }
.stage > li:nth-child(2) .speaker-av::after { animation-delay: 1.7s; }
.stage > li:nth-child(3) .speaker-av::after { animation-delay: 3.4s; }
.hand-tag { position: absolute; right: -4px; top: -4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--marigold); color: #241a00; box-shadow: 0 0 0 2px var(--surface); }
.you-host { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: var(--r-pill); background: var(--ink); color: var(--paper); font-size: var(--t-xs); font-weight: 700; }
.mic-requests { padding: 12px 14px; border-radius: var(--r-m); background: color-mix(in oklab, var(--marigold-soft) 70%, var(--surface)); display: grid; gap: 8px; }
.mic-requests .eyebrow { display: flex; align-items: center; gap: 6px; color: var(--cat-values); }
.mic-requests ul { display: grid; gap: 8px; }
.mic-requests li { display: flex; align-items: center; gap: 10px; }
.mic-requests li > span:not(.avatar) { display: grid; flex: 1; min-width: 0; font-size: var(--t-s); }
.end-confirm { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.room-ended { justify-items: center; text-align: center; padding: 40px 22px; }
.dialog-person { width: min(100%, 380px); }
.rp-card { display: grid; justify-items: center; gap: 4px; text-align: center; }
.rp-card .avatar-xl { box-shadow: none; margin-bottom: 6px; }
.rp-bio { color: var(--ink-2); max-width: 32ch; margin-top: 4px; }
.rp-actions { display: grid; gap: 8px; }

/* ── threaded replies ───────────────────────────────── */
.reply-to-btn { justify-self: start; display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 3px 8px 3px 4px; border: 0; border-radius: var(--r-pill); background: none; color: var(--ink-3); font-size: var(--t-xs); font-weight: 600; cursor: pointer; }
.reply-to-btn:hover { background: var(--sunk); color: var(--cobalt); }
.reply-children { display: grid; margin-top: 6px; padding-left: 12px; border-left: 2px solid var(--line-soft); }
.reply.is-child { padding: 10px 0 4px; border-top: 0; }
.author-tag { padding: 1px 7px; border-radius: var(--r-pill); background: var(--cobalt-soft); color: var(--cobalt); font-size: 0.6875rem; font-weight: 700; }
.replying-to { display: flex; align-items: center; gap: 6px; margin-left: 44px; padding: 6px 6px 6px 10px; border-radius: var(--r-m); background: var(--paper); border-left: 3px solid var(--marigold); font-size: var(--t-s); color: var(--ink-2); }
.replying-to span { flex: 1; }
.replying-to .icon-btn { width: 28px; height: 28px; }

/* ── help & policy pages ────────────────────────────── */
.info-head { display: grid; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.info-head .notice { margin-top: 4px; }
.toc { padding: 14px 16px; border-radius: var(--r-m); background: var(--paper); }
.toc ol { margin: 6px 0 0; padding-left: 20px; list-style: decimal; display: grid; gap: 4px; }
.toc button { border: 0; background: none; padding: 2px 0; color: var(--cobalt); font-size: var(--t-s); cursor: pointer; text-align: left; }
.toc button:hover { text-decoration: underline; }
.info-section { scroll-margin-top: 80px; }
.info-section ul { margin: 6px 0 0; padding-left: 20px; list-style: disc; display: grid; gap: 6px; color: var(--ink-2); max-width: 66ch; }
.info-links a { display: inline-flex; align-items: center; gap: 2px; }
.help-search input { min-height: 48px; padding-left: 44px; }
.help-topics { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); gap: 8px; }
.help-topic { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: var(--r-m); border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); text-align: left; cursor: pointer; }
.help-topic > span:last-child { display: grid; }
.help-topic:hover { border-color: var(--cobalt); }
.help-list { display: grid; gap: 18px; }
.help-section { display: grid; gap: 6px; scroll-margin-top: 80px; }
.help-section .h3 { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.faq { border: 1px solid var(--line-soft); border-radius: var(--r-m); background: var(--surface); }
.faq summary { padding: 12px 14px; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink-3); font-weight: 400; font-size: 1.2rem; line-height: 1; }
.faq[open] summary::after { content: "–"; }
.faq p { padding: 0 14px 14px; color: var(--ink-2); }
.faq > a { display: inline-block; padding: 0 14px 12px; }

/* ── search: pages and side box ─────────────────────── */
.page-results { display: grid; gap: 6px; }
.page-result { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-m); border: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); text-decoration: none; }
.page-result > span:nth-child(2) { display: grid; flex: 1; min-width: 0; }
.page-result:hover { border-color: var(--cobalt); color: var(--ink); }
.help-results { display: grid; gap: 6px; }
.side-search input { min-height: 44px; padding-left: 42px; border-radius: var(--r-pill); background: var(--surface); }

/* ── founder profile ────────────────────────────────── */
.founder-card { padding: 22px; margin-bottom: 18px; display: grid; gap: 14px; background: linear-gradient(140deg, color-mix(in oklab, var(--fg-a) 10%, var(--surface)), var(--surface) 45%, color-mix(in oklab, var(--fg-c) 12%, var(--surface))); border-color: color-mix(in oklab, var(--fg-b) 30%, var(--line-soft)); }
.founder-head { display: flex; align-items: center; gap: 12px; }
.founder-note { display: grid; gap: 10px; font-family: var(--f-display); font-size: 1.08rem; line-height: 1.55; max-width: 62ch; }
.journey { display: grid; gap: 0; margin: 4px 0 0; padding: 0; list-style: none; border-left: 2px solid color-mix(in oklab, var(--fg-b) 45%, var(--line)); }
.journey li { position: relative; display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 10px; padding: 6px 0 6px 16px; font-size: var(--t-s); }
.journey li::before { content: ""; position: absolute; left: -6px; top: 12px; width: 10px; height: 10px; border-radius: 50%; background: var(--fg-b); box-shadow: 0 0 0 3px var(--surface); }
.journey-when { font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.founder-sign { font-family: var(--f-display); font-size: 1.2rem; color: var(--ink-2); }
/* own profile: tap the banner or photo to edit */
.profile-hero { position: relative; }
.cover-edit { position: absolute; top: 12px; right: 12px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 0.5); color: #fff; cursor: pointer; }
.cover-edit:hover { background: rgb(0 0 0 / 0.7); }
.avatar-edit { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.avatar-edit-cam { position: absolute; right: 2px; bottom: 6px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--ink); color: var(--paper); box-shadow: 0 0 0 3px var(--paper); }
.avatar-edit:hover .avatar-edit-cam { background: var(--cobalt); color: var(--on-cobalt); }

/* show / hide password */
.pw-wrap { position: relative; }
.pw-wrap input { width: 100%; padding-right: 92px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent; color: var(--ink-2, var(--ink)); font: 600 13px/1 var(--f-body); padding: 8px 10px; border-radius: 999px; cursor: pointer; }
.pw-toggle:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.pw-toggle:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 1px; }
.pw-toggle[aria-pressed="true"] { color: var(--cobalt); }
