:root {
  --app-sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --cream: #f7f3ea;
  --cream-deep: #efe9dc;
  --ink: #292624;
  --muted: #938d83;
  --accent: #e85f58;
  --accent-dark: #c94645;
  --white: #fffdf9;
  --line: rgba(41, 38, 36, .12);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--app-sans); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 3px solid rgba(232, 95, 88, .26); outline-offset: 3px; }

.phone-app { position: relative; container-type: inline-size; width: 100%; min-height: 100svh; overflow: hidden; background: var(--cream); }
.app-launch { position: absolute; z-index: 20; inset: 0; display: grid; place-items: center; color: #1d1d1b; background: #fbfaf7; opacity: 1; visibility: visible; pointer-events: auto; transition: opacity 640ms cubic-bezier(.22,1,.36,1), visibility 0s linear 640ms; }
.app-launch.is-dismissed { opacity: 0; visibility: hidden; pointer-events: none; }
.app-launch-lockup { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 3cqw, 13px); margin: 0; padding: 24px; font-family: var(--app-sans); text-align: center; }
.app-launch-wordmark { display: block; padding-left: .12em; color: #1d1d1b; font-family: inherit; font-size: clamp(36px, 10.6cqw, 46px); font-weight: 500; letter-spacing: .12em; line-height: 1.15; text-transform: uppercase; }
.app-launch-byline { display: block; padding-left: .045em; color: #65645f; font-family: inherit; font-size: clamp(12px, 3.2cqw, 14px); font-weight: 400; letter-spacing: .045em; line-height: 1.5; white-space: nowrap; }
.app-phone-status, .app-phone-island, .app-home-indicator { display: none; }
.app-header { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding: calc(20px + env(safe-area-inset-top)) 20px 17px; }
.wordmark { display: inline-flex; align-items: center; color: var(--ink); text-decoration: none; font-family: var(--app-sans); font-size: 17px; font-weight: 500; letter-spacing: .12em; line-height: 1.15; text-transform: uppercase; }.wordmark .wordmark-text { color: inherit; }
.profile-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: transparent; font-size: 10px; font-weight: 700; }
.home-screen { position: relative; min-height: calc(100svh - 72px); padding: 0 20px calc(120px + env(safe-area-inset-bottom)); transition: opacity .32s ease, transform .42s cubic-bezier(.22,.9,.3,1); }
.event-list { padding-top: 30px; }.event-list-head { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 12px; }.list-label { margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }.event-list-head > span { color: #aca397; font-size: 10px; }.event-row { display: flex; align-items: center; width: 100%; gap: 13px; padding: 15px; border: 1px solid rgba(41, 38, 36, .08); border-radius: 16px; color: var(--ink); text-align: left; background: rgba(255,253,249,.74); box-shadow: 0 10px 25px rgba(76, 59, 45, .045); transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }.event-row:hover { border-color: rgba(232, 95, 88, .32); box-shadow: 0 13px 28px rgba(76, 59, 45, .07); transform: translateY(-1px); }.event-icon { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border-radius: 13px; color: white; background: var(--accent); font-size: 16px; font-weight: 600; letter-spacing: -.03em; }.event-details { display: grid; flex: 1; gap: 5px; min-width: 0; }.event-details strong { overflow: hidden; color: #171412; font-size: 14px; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }.event-details small { color: var(--muted); font-size: 10px; letter-spacing: .01em; }.event-details small:first-of-type { color: #625d56; font-size: 11px; }.event-arrow { color: #a49a8e; font-size: 18px; transition: color .18s ease, transform .18s ease; }.event-row:hover .event-arrow { color: var(--accent); transform: translate(1px, -1px); }
.add-button { position: fixed; z-index: 5; right: 20px; bottom: calc(21px + env(safe-area-inset-bottom)); display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; color: white; background: var(--accent); box-shadow: 0 8px 18px rgba(203, 76, 70, .2); transition: transform .18s ease, background .18s ease; }.fab-plus { display: block; margin-top: -3px; font-size: 27px; font-weight: 300; line-height: 1; }.add-button:hover { background: var(--accent-dark); transform: translateY(-1px); }.add-button:active { transform: scale(.96); }
.sheet-backdrop { position: fixed; z-index: 10; inset: 0; display: flex; align-items: flex-end; background: rgba(41, 38, 36, .2); opacity: 0; pointer-events: none; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: opacity .28s ease; }.sheet-backdrop.is-open { opacity: 1; pointer-events: auto; }.sheet-backdrop[hidden] { display: none; }.add-sheet { position: relative; width: 100%; padding: 13px 22px calc(25px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: var(--white); box-shadow: 0 -14px 45px rgba(49, 39, 29, .12); transform: translateY(22px); opacity: 0; transition: transform .38s cubic-bezier(.2,.85,.25,1), opacity .26s ease; }.sheet-backdrop.is-open .add-sheet { transform: translateY(0); opacity: 1; }.sheet-handle { width: 38px; height: 4px; margin: 0 auto 27px; border-radius: 99px; background: #ded8cf; }.close-button { position: absolute; top: 16px; right: 18px; display: grid; place-items: center; width: 31px; height: 31px; padding: 0 0 2px; border: 0; border-radius: 50%; color: #7b746c; background: var(--cream-deep); font-size: 22px; font-weight: 300; line-height: 1; transition: background .2s ease, transform .2s ease; }.close-button:hover { background: #e5ded3; transform: rotate(90deg); }.sheet-kicker { display: flex; align-items: center; gap: 7px; margin: 0 0 13px; color: var(--accent-dark); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }.kicker-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(232,95,88,.12); }.add-sheet h1 { max-width: 280px; margin: 0 0 10px; color: var(--ink); font-size: 31px; letter-spacing: -.055em; line-height: 1.02; }.add-sheet h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }.sheet-copy { max-width: 330px; margin: 0 0 26px; color: var(--muted); font-size: 12px; line-height: 1.5; }.add-sheet label { display: block; margin-bottom: 7px; color: #625d56; font-size: 11px; font-weight: 700; }.code-field { display: flex; align-items: center; height: 52px; border: 1px solid #d9d3c8; border-radius: 12px; background: #fbfaf7; transition: border-color .2s ease, box-shadow .2s ease; }.code-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(232, 95, 88, .1); }.code-glyph { display: grid; place-items: center; width: 42px; height: 100%; color: var(--accent); font-size: 15px; }.add-sheet input { min-width: 0; flex: 1; height: 100%; padding: 0 4px; border: 0; color: var(--ink); outline: none; background: transparent; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }.add-sheet input::placeholder { color: #b9b1a6; letter-spacing: .02em; text-transform: none; }.code-count { padding: 0 14px 0 8px; color: #b3aba0; font-size: 10px; font-variant-numeric: tabular-nums; }.join-button { display: flex; align-items: center; justify-content: center; width: 100%; height: 50px; margin-top: 12px; border: 0; border-radius: 12px; color: white; background: var(--accent); font-size: 13px; font-weight: 700; transition: background .2s ease, transform .2s ease, opacity .2s ease; }.join-button span { margin-left: 9px; font-size: 17px; }.join-button:hover:not(:disabled) { background: var(--accent-dark); transform: translateY(-1px); }.join-button:disabled { cursor: default; opacity: .42; }.form-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 15px 0 0; color: #b0a89d; text-align: center; font-size: 10px; }.form-note span { color: var(--accent); font-size: 14px; }.toast { position: fixed; z-index: 20; left: 50%; bottom: calc(94px + env(safe-area-inset-bottom)); padding: 11px 15px; border-radius: 99px; color: white; background: var(--ink); font-size: 11px; box-shadow: 0 8px 22px rgba(41,38,36,.16); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; }.toast.show { animation: toastInOut 2.4s ease both; }
@keyframes toastInOut { 0%, 100% { opacity: 0; transform: translate(-50%, 20px); } 15%, 80% { opacity: 1; transform: translate(-50%, 0); } }
@keyframes softDotPulse { 0%, 100% { opacity: .78; box-shadow: 0 0 0 0 rgba(232,95,88,.18); transform: translate(-50%, -50%) scale(.94); } 50% { opacity: 1; box-shadow: 0 0 0 8px rgba(232,95,88,0); transform: translate(-50%, -50%) scale(1); } }

/* refined motion */
.event-row { will-change: transform; transition: border-color .22s ease, box-shadow .22s ease, transform .3s cubic-bezier(.22,1,.36,1), background .22s ease; }
.event-row:active, .event-row.is-pressed { border-color: rgba(232,95,88,.28); background: var(--white); box-shadow: 0 5px 16px rgba(76,59,45,.06); transform: scale(.982); }
.event-row:hover .event-arrow, .event-row.is-pressed .event-arrow { color: var(--accent); transform: translateX(2px); }
.org-mark svg { display: block; width: 22px; height: 22px; overflow: visible; }
.org-mark path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; opacity: .92; }
.org-mark circle { fill: currentColor; }
.event-sponsor-mark.discovery-card-host { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; margin: 0; }
.event-screen { transform: none !important; transition: opacity .4s cubic-bezier(.22,1,.36,1) !important; }
.phone-app.event-open .home-screen { transform: none !important; transition: opacity .36s ease !important; }
.phone-app.event-open .event-screen { transform: none !important; }
.waiting-state { transition: opacity .48s cubic-bezier(.22,1,.36,1); }
.waiting-state.is-leaving { opacity: 0; }
.matches-view { opacity: 0; pointer-events: none; transition: opacity .58s cubic-bezier(.22,1,.36,1) !important; }
.matches-view.is-entering { opacity: 1; pointer-events: auto; }
.preview-button { transition: background .34s ease, border-color .34s ease, transform .4s cubic-bezier(.22,1,.36,1) !important; }
.preview-button.is-pressed, .preview-button:active { border-color: rgba(232,95,88,.28); background: var(--white); transform: scale(.985); }
.swipe-deck { transition: opacity .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1) !important; }
.swipe-deck.is-swapping { opacity: .18; transform: translateX(-8px); }
.swipe-deck.is-swiping { pointer-events: none; }
.swipe-card { transition: transform .72s cubic-bezier(.16,1,.3,1), opacity .62s ease !important; }
.swipe-card.back-one { opacity: 1 !important; }
.swipe-card.swipe-left { transform: translateX(-124%) rotate(-8deg) !important; opacity: 0 !important; }
.swipe-card.swipe-right { transform: translateX(124%) rotate(8deg) !important; opacity: 0 !important; }
.swipe-card.front.is-promoting { transform: translateY(9px) scale(.965); opacity: 1; }
.swipe-action { transition: transform .34s cubic-bezier(.22,1,.36,1), background .34s ease !important; }
.swipe-action:active { transform: scale(.94); }
.waiting-visual { width: 72px !important; height: 72px !important; }
.waiting-visual::before { inset: 21px !important; border-color: rgba(232,95,88,.27) !important; }
.waiting-visual::after { position: absolute; inset: 12px; border: 1px solid rgba(232,95,88,.42); border-radius: 50%; content: ''; opacity: .26; box-shadow: 0 0 0 0 rgba(232,95,88,.14); animation: waitingHalo 2.4s ease-in-out infinite !important; }
.waiting-dot { z-index: 1; width: 9px !important; height: 9px !important; animation: waitingDot 2.4s ease-in-out infinite !important; }
@keyframes waitingHalo { 0%, 100% { opacity: .26; transform: scale(.82); box-shadow: 0 0 0 0 rgba(232,95,88,.14); } 50% { opacity: .92; transform: scale(1.08); box-shadow: 0 0 0 8px rgba(232,95,88,0); } }
@keyframes waitingDot { 0%, 100% { opacity: .78; box-shadow: 0 0 0 0 rgba(232,95,88,.2); transform: translate(-50%, -50%) scale(.92); } 50% { opacity: 1; box-shadow: 0 0 0 8px rgba(232,95,88,0); transform: translate(-50%, -50%) scale(1.1); } }

@media (min-width: 700px) {
  body { display: grid; place-items: center; min-height: 100svh; padding: 24px; background: #e9e5dc; }
  /* Preserve the demo's 393 × 852 phone proportions, fitting both dimensions. */
  .phone-app {
    width: min(393px, calc((100svh - 48px) * 393 / 852));
    height: auto;
    min-height: 0;
    aspect-ratio: 393 / 852;
    border-radius: 12.6% / 5.8%;
    box-shadow: 0 0 0 5px #202020, 0 0 0 6px #757575, 0 22px 55px -18px rgba(30,30,28,.25);
  }
  .add-button { position: absolute; }.sheet-backdrop { position: absolute; border-radius: 38px; }.toast { position: absolute; }
}

.phone-app [hidden] { display: none !important; }
.phone-app.event-open .add-button { display: none; }
.event-screen { position: absolute; z-index: 1; top: 72px; right: 0; bottom: 0; left: 0; min-height: 0; padding: 0 20px calc(30px + env(safe-area-inset-bottom)); overflow-y: auto; opacity: 0; pointer-events: none; transform: translateY(18px); transition: opacity .32s ease, transform .42s cubic-bezier(.22,.9,.3,1); }.phone-app.event-open .home-screen { opacity: 0; pointer-events: none; transform: translateY(-12px); }.phone-app.event-open .event-screen { opacity: 1; pointer-events: auto; transform: translateY(0); }
.event-screen-header { display: flex; align-items: center; justify-content: space-between; height: 46px; }.back-button, .more-button { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; }.back-button span:first-child { color: var(--ink); font-size: 21px; line-height: 1; }.screen-label { color: #80786e; font-size: 10px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; }.more-button { width: 28px; justify-content: flex-end; color: #a59c91; font-size: 15px; letter-spacing: 2px; }
.event-context { display: flex; align-items: center; gap: 12px; padding: 16px 0 29px; border-bottom: 1px solid rgba(41,38,36,.08); }.event-context-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; color: white; background: var(--accent); font-size: 16px; font-weight: 600; }.event-context p { margin: 0 0 4px; color: var(--muted); font-size: 10px; }.event-context h1 { margin: 0 0 5px; color: #171412; font-size: 17px; letter-spacing: -.035em; }.event-context span { color: #938a7f; font-size: 10px; }
.preview-button .preview-arrow { margin-left: 9px; color: var(--accent); font-size: 15px; }.waiting-state { display: flex; flex-direction: column; align-items: center; padding: 72px 15px 28px; text-align: center; }.waiting-visual { position: relative; width: 64px; height: 64px; margin-bottom: 31px; }.waiting-visual::before { position: absolute; inset: 17px; border: 1px solid rgba(232,95,88,.18); border-radius: 50%; content: ''; }.waiting-dot { position: absolute; top: 50%; left: 50%; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(232,95,88,.18); transform: translate(-50%, -50%); animation: softDotPulse 2.6s cubic-bezier(.45, 0, .25, 1) infinite; }.screen-eyebrow { margin: 0; color: var(--accent-dark); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }.waiting-state h2 { margin: 38px 0 13px; color: var(--ink); font-size: 30px; letter-spacing: -.055em; line-height: 1.02; }.matches-intro h2 { margin: 0 0 13px; color: var(--ink); font-size: 30px; letter-spacing: -.055em; line-height: 1.02; }.signup-meter { width: min(230px, 100%); height: 5px; margin-top: 32px; overflow: hidden; border-radius: 99px; background: #e9e2d8; }.signup-meter span { display: block; width: 58%; height: 100%; border-radius: inherit; background: var(--accent); }.waiting-meta { display: flex; justify-content: space-between; width: min(230px, 100%); margin-top: 9px; color: #a59c91; font-size: 10px; }.preview-button { display: flex; align-items: center; justify-content: center; margin-top: 34px; padding: 13px 17px; border: 1px solid rgba(41,38,36,.14); border-radius: 99px; color: var(--ink); background: transparent; font-size: 11px; font-weight: 700; transition: background .18s ease, transform .18s ease; }.preview-button span { margin-left: 9px; color: var(--accent); font-size: 15px; }.preview-button:hover:not(:disabled) { background: var(--white); transform: translateY(-1px); }
.matches-view { padding: 29px 0 8px; }.matches-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }.matches-intro h2 { font-size: 27px; }.matches-intro h2 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }.anonymous-note { padding-bottom: 3px; color: #a39a8f; font-size: 9px; line-height: 1.4; text-align: right; }.swipe-deck { position: relative; height: 344px; margin-top: 27px; }.swipe-card { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 22px; border: 1px solid rgba(41,38,36,.09); border-radius: 22px; background: var(--white); box-shadow: 0 16px 32px rgba(73,55,38,.08); transition: transform .3s ease, opacity .3s ease; }.swipe-card.back-one { z-index: 1; transform: translateY(9px) scale(.965); opacity: .5; }.swipe-card.back-two { z-index: 0; transform: translateY(17px) scale(.93); opacity: .22; }.swipe-card.front { z-index: 2; }.match-topline { display: flex; align-items: center; justify-content: space-between; margin-bottom: 31px; }.anonymous-badge { display: inline-flex; align-items: center; gap: 6px; color: #9b9187; font-size: 10px; }.anonymous-badge::before { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); content: ''; }.match-fit { color: var(--accent-dark); font-size: 10px; font-weight: 700; }.anonymous-avatar { display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 20px; border: 1px solid rgba(232,95,88,.2); border-radius: 50%; color: var(--accent); background: #fff2ed; font-size: 22px; }.match-role { margin: 0 0 8px; color: var(--muted); font-size: 11px; }.swipe-card h3 { max-width: 290px; margin: 0 0 16px; color: var(--ink); font-size: 25px; letter-spacing: -.05em; line-height: 1.04; }.match-looking { margin: 0; color: #777067; font-size: 12px; line-height: 1.5; }.match-looking strong { color: var(--ink); font-weight: 600; }.match-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: auto; }.match-tags span { padding: 7px 9px; border-radius: 99px; color: #766e65; background: #f3eee5; font-size: 9px; }.swipe-controls { display: flex; justify-content: center; gap: 17px; margin-top: 23px; }.swipe-action { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; transition: transform .18s ease, background .18s ease; }.pass-action { border: 1px solid #d8cfc4; color: #9b9187; }.connect-action { border: 0; color: white; background: var(--accent); box-shadow: 0 7px 16px rgba(203,76,70,.18); font-size: 27px; }.swipe-action:hover { transform: translateY(-2px); }.pass-action:hover { background: #f0ebe2; }.connect-action:hover { background: var(--accent-dark); }.swipe-hint { margin: 13px 0 0; color: #b0a79c; text-align: center; font-size: 10px; }

.chat-screen { position: relative; min-height: calc(100svh - 72px); padding: 34px 20px calc(120px + env(safe-area-inset-bottom)); }
.chat-screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.chat-screen h1 { margin: 8px 0 0; color: var(--ink); font-size: 32px; letter-spacing: -.06em; line-height: .98; }
.chat-status { padding-bottom: 3px; color: #a39a8f; font-size: 10px; }
.chat-empty { display: flex; flex-direction: column; align-items: center; padding: 126px 20px 30px; text-align: center; }
.chat-empty-mark { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 25px; border: 1px solid rgba(232,95,88,.22); border-radius: 21px; color: var(--accent); background: #fff2ed; }
.chat-empty-mark svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.25; }
.chat-empty-mark svg path:last-child { stroke-width: 1.5; }
.chat-empty h2 { margin: 0 0 13px; color: var(--ink); font-size: 28px; letter-spacing: -.055em; line-height: 1.02; }
.chat-empty h2 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.chat-empty p { max-width: 255px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.chat-list { padding-top: 34px; }
.chat-list-label { margin: 0 0 11px 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.chat-row { display: flex; align-items: center; width: 100%; gap: 12px; padding: 14px; border: 1px solid rgba(41,38,36,.08); border-radius: 16px; color: var(--ink); text-align: left; background: rgba(255,253,249,.74); box-shadow: 0 10px 25px rgba(76,59,45,.045); }
.chat-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 43px; height: 43px; border: 1px solid rgba(232,95,88,.2); border-radius: 13px; color: var(--accent); background: #fff2ed; font-size: 22px; }
.chat-details { display: grid; flex: 1; gap: 5px; min-width: 0; }
.chat-details strong { font-size: 13px; letter-spacing: -.02em; }
.chat-details small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.chat-time { align-self: flex-start; color: #aca397; font-size: 9px; }
.app-tabs { position: fixed; z-index: 4; right: 90px; bottom: calc(20px + env(safe-area-inset-bottom)); left: 20px; display: flex; align-items: center; gap: 3px; max-width: 190px; padding: 4px; border: 1px solid rgba(41,38,36,.08); border-radius: 18px; background: rgba(255,253,249,.92); box-shadow: 0 10px 24px rgba(76,59,45,.09); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.app-tab { position: relative; z-index: 1; display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 40px; padding: 0 11px; border: 0; border-radius: 13px; color: #a39a8f; background: transparent; font-size: 10px; font-weight: 700; transition: color .25s ease, background .25s ease, transform .25s ease; }
.app-tab svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.app-tab svg path:last-child { stroke-width: 1.7; }
.app-tab.is-active { color: var(--accent-dark); background: transparent; }
.app-tab:active { transform: scale(.96); }
.tab-count { display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; color: white; background: var(--accent); font-size: 8px; }
.phone-app.event-open .app-tabs { display: none !important; }

@media (min-width: 700px) {
  .app-tabs { position: absolute; }
}

/* Keep conversation inside the active event room. */
.app-tabs { display: none !important; }
.room-tabs { display: flex; align-items: center; gap: 3px; width: min(224px, 100%); margin: 0 auto 26px; padding: 4px; border: 1px solid rgba(41,38,36,.08); border-radius: 17px; background: rgba(255,253,249,.9); box-shadow: 0 8px 20px rgba(76,59,45,.06); }
.room-tab { display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 12px; color: #a39a8f; background: transparent; font-size: 10px; font-weight: 700; transition: color .25s ease, background .25s ease, transform .25s ease; }
.room-tab.is-active { color: var(--accent-dark); background: #fff2ed; box-shadow: 0 3px 10px rgba(203,76,70,.08); }
.room-tab:active { transform: scale(.97); }
.room-tab-count { display: grid; place-items: center; min-width: 15px; height: 15px; padding: 0 4px; border-radius: 99px; color: white; background: var(--accent); font-size: 8px; }
.matches-view.is-chat-mode { min-height: 0; padding-bottom: 0; }
.matches-view.is-chat-mode .matches-intro, .matches-view.is-chat-mode .swipe-deck, .matches-view.is-chat-mode .swipe-controls, .matches-view.is-chat-mode .swipe-hint { display: none; }
.event-chat-panel { display: none; padding: 4px 0 22px; }
.matches-view.is-chat-mode + .event-chat-panel { display: block; }
.event-chat-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.event-chat-head h2 { margin: 8px 0 0; color: var(--ink); font-size: 30px; letter-spacing: -.06em; line-height: .99; }
.chat-private { padding: 7px 10px; border: 1px solid rgba(232,95,88,.16); border-radius: 99px; color: var(--accent-dark); background: #fff2ed; font-size: 9px; font-weight: 700; }
.event-chat-empty, .event-chat-thread { display: flex; flex-direction: column; gap: 12px; margin-top: 42px; }
.chat-bubble { max-width: 82%; padding: 14px 16px; border: 1px solid rgba(41,38,36,.07); border-radius: 20px; font-size: 12px; line-height: 1.4; box-shadow: 0 10px 22px rgba(76,59,45,.06); }
.bubble-soft { align-self: flex-start; border-top-left-radius: 7px; color: #70685f; background: var(--white); }
.bubble-accent { align-self: flex-end; border: 0; border-bottom-right-radius: 7px; color: white; background: #006eff; box-shadow: none; }
.chat-composer { display: flex; align-items: center; justify-content: space-between; height: 52px; margin-top: 38px; padding: 0 8px 0 16px; border: 1px solid rgba(41,38,36,.09); border-radius: 19px; color: #b0a79c; background: rgba(255,253,249,.76); font-size: 11px; }
.chat-composer button { display: grid; place-items: center; width: 35px; height: 35px; padding: 0 0 2px; border: 0; border-radius: 50%; color: white; background: var(--accent); font-size: 19px; line-height: 1; opacity: .42; }

/* Chat opens as its own room after a connection. */
.room-tabs { display: flex !important; }
.event-chat-panel { display: none; }
.matches-view.is-chat-mode + .event-chat-panel { display: block !important; }
.app-tabs, .chat-screen { display: none !important; }
.event-chat-list { margin-top: 36px; }
.event-chat-list-label { margin: 0 0 11px 3px; color: #171412; font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.phone-app.is-dark-theme .event-chat-list-label { color: var(--ink); }
.event-chat-list:has(.event-chat-empty-state) { margin-top: 0; }
.event-chat-empty-state { --empty-ink: #171412; --empty-copy: #675f56; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: max(280px, calc(100cqh - 170px)); padding: 24px 12px 64px; text-align: center; }
.empty-matches-mark { display: grid; place-items: center; flex-shrink: 0; width: 48px; height: 48px; margin-bottom: 22px; border: 1px solid rgba(255,255,255,.62); border-radius: 50%; color: #657078; background: rgba(255,255,255,.46); }
.empty-matches-mark svg { display: block; width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.event-chat-empty-state h2 { margin: 0; color: var(--empty-ink); font-size: 25px; font-weight: 600; line-height: 1.25; letter-spacing: -.035em; }
.event-chat-empty-state p { margin: 10px 0 0; color: var(--empty-copy); font-size: 13px; font-weight: 400; line-height: 1.65; }
.empty-matches-action { display: inline-flex; align-items: center; justify-content: center; gap: 16px; min-height: 46px; margin-top: 26px; padding: 0 20px; border: 1px solid rgba(41,38,36,.1); border-radius: 16px; color: #000; background: var(--white); font-size: 12px; font-weight: 600; line-height: 1.5; transition: background .25s ease, border-color .25s ease; }
.empty-matches-action svg { width: 17px; height: 17px; fill: none; stroke: #000; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.empty-matches-action:active { background: var(--cream-deep); }
@media (hover: hover) { .empty-matches-action:hover { border-color: rgba(48,107,93,.35); background: var(--white); } }
.phone-app.is-dark-theme .event-chat-empty-state { --empty-ink: #f7f2e9; --empty-copy: #bdb4a9; }
.phone-app.is-dark-theme .empty-matches-mark { border-color: rgba(255,255,255,.08); color: #b9c3c9; background: rgba(255,255,255,.06); }
.phone-app.is-dark-theme .empty-matches-action { border-color: rgba(255,255,255,.14); }
.phone-app.is-dark-theme .empty-matches-action { color: var(--empty-ink); }
.phone-app.is-dark-theme .empty-matches-action svg { stroke: var(--empty-ink); }
.event-chat-empty-state .empty-matches-action { color: #000 !important; -webkit-text-fill-color: #000; }
.event-chat-empty-state .empty-matches-action svg { stroke: #000 !important; }
@container (max-height: 510px) { .event-chat-empty-state { min-height: max(254px, calc(100cqh - 150px)); padding-top: 16px; padding-bottom: 24px; } .empty-matches-mark { margin-bottom: 18px; } .empty-matches-action { margin-top: 20px; } }
@media (prefers-reduced-motion: reduce) { .empty-matches-action { transition: none; } }
.event-chat-row { display: flex; align-items: center; width: 100%; gap: 12px; margin-bottom: 10px; padding: 14px; border: 1px solid rgba(41,38,36,.08); border-radius: 20px; color: var(--ink); text-align: left; background: var(--white); box-shadow: 0 10px 24px rgba(76,59,45,.055); transition: transform .24s cubic-bezier(.22,1,.36,1), border-color .24s ease, box-shadow .24s ease; }
.event-chat-row:hover { border-color: rgba(232,95,88,.22); box-shadow: 0 13px 28px rgba(76,59,45,.08); transform: translateY(-1px); }
.event-chat-head { display: none !important; }
.event-chat-thread-view { display: none; padding: 0 0 calc(26px + env(safe-area-inset-bottom)); }
.event-chat-thread-view:not([hidden]) { display: block; }
.event-thread-bar { display: flex; align-items: center; justify-content: space-between; height: 46px; gap: 10px; }
.event-thread-person { display: flex; align-items: center; gap: 12px; padding: 21px 0 23px; border-bottom: 1px solid rgba(41,38,36,.08); }
.event-thread-person > span:last-child { display: grid; gap: 5px; }
.event-thread-person strong { color: var(--ink); font-size: 14px; letter-spacing: -.02em; }
.event-thread-person small { color: var(--muted); font-size: 10px; }
.event-thread-messages { display: flex; flex-direction: column; gap: 13px; padding: 36px 0 20px; }
.event-thread-messages .chat-bubble { max-width: 80%; }
.event-thread-messages .bubble-accent { align-self: flex-end; }
.event-thread-composer { display: flex; align-items: center; justify-content: space-between; height: 52px; margin-top: 32px; padding: 0 8px 0 16px; border: 1px solid rgba(41,38,36,.09); border-radius: 19px; background: var(--white); }
.event-thread-composer input { min-width: 0; flex: 1; height: 100%; padding: 0 10px 0 0; border: 0; color: var(--ink); outline: 0; background: transparent; font-size: 12px; }
.event-thread-composer input::placeholder { color: #b0a79c; }
.event-thread-composer button { display: grid; place-items: center; width: 35px; height: 35px; padding: 0 0 2px; border: 0; border-radius: 50%; color: white; background: var(--accent); font-size: 19px; line-height: 1; }
.event-chat-panel > .event-chat-empty, .event-chat-panel > .event-chat-thread, .event-chat-panel > .chat-composer { display: none !important; }
.phone-app.chat-open .event-screen { opacity: 0 !important; pointer-events: none !important; }
.chat-screen { position: absolute; z-index: 3; top: 72px; right: 0; bottom: 0; left: 0; display: block !important; min-height: 0; padding: 0 20px calc(30px + env(safe-area-inset-bottom)); overflow-y: auto; background: var(--cream); opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .42s cubic-bezier(.22,1,.36,1), transform .42s cubic-bezier(.22,1,.36,1); }
.phone-app.chat-open .chat-screen { opacity: 1; pointer-events: auto; transform: translateY(0); }
.chat-screen-head, .chat-screen > .chat-empty, .chat-screen > .chat-list { display: none !important; }
.chat-page-panel { display: block; padding-top: 0; }
.chat-page-bar { display: flex; align-items: center; justify-content: space-between; height: 46px; gap: 10px; }
.chat-page-back { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.chat-page-back span:first-child { color: var(--ink); font-size: 21px; line-height: 1; }
.chat-person { display: flex; align-items: center; gap: 12px; padding: 21px 0 23px; border-bottom: 1px solid rgba(41,38,36,.08); }
.chat-person-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 48px; height: 48px; border: 1px solid rgba(232,95,88,.2); border-radius: 17px; color: var(--accent); background: #fff2ed; font-size: 21px; }
.chat-person > span:last-child { display: grid; gap: 5px; }
.chat-person strong { color: var(--ink); font-size: 14px; letter-spacing: -.02em; }
.chat-person small { color: var(--muted); font-size: 10px; }
.chat-thread { display: flex; flex-direction: column; gap: 13px; padding: 36px 0 20px; }
.chat-thread .chat-bubble { max-width: 80%; }
.chat-thread .bubble-accent { align-self: flex-end; }
.chat-page-panel .chat-composer { margin-top: 32px; background: var(--white); }
.chat-page-panel .chat-composer input { min-width: 0; flex: 1; height: 100%; padding: 0 10px 0 0; border: 0; color: var(--ink); outline: 0; background: transparent; font-size: 12px; }
.chat-page-panel .chat-composer input::placeholder { color: #b0a79c; }
.chat-page-panel .chat-composer button { opacity: 1; cursor: pointer; }
.chat-page-panel .chat-composer button:disabled { cursor: default; opacity: .42; }

/* The top-level Chats tab is manual; it never interrupts the swipe flow. */
.app-tabs:not([hidden]) { display: flex !important; }
.phone-app:not(.event-open) .chat-screen:not([hidden]) { position: relative; top: auto; right: auto; bottom: auto; left: auto; display: block !important; min-height: calc(100svh - 72px); padding: 34px 20px calc(120px + env(safe-area-inset-bottom)); overflow: visible; opacity: 1; pointer-events: auto; transform: none; background: var(--cream); transition: none; }
.phone-app:not(.event-open) .chat-screen:not([hidden]) .chat-screen-head { display: flex !important; }
.phone-app:not(.event-open) .chat-screen:not([hidden]) > .chat-empty:not([hidden]) { display: flex !important; }
.phone-app:not(.event-open) .chat-screen:not([hidden]) > .chat-list:not([hidden]) { display: block !important; }
.chat-page-panel { display: none !important; }
.app-tabs, .chat-screen { display: none !important; }

/* Keep the actions relaxed below the card and anchor the guidance at the bottom. */
.matches-view { display: flex; flex-direction: column; min-height: calc(100% - 46px); padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
.matches-intro, .swipe-deck, .swipe-controls, .swipe-hint { flex-shrink: 0; }
.matches-intro { flex-direction: column; align-items: flex-start; gap: 15px; }
.matches-intro h2 { margin-bottom: 0; font-size: 32px; letter-spacing: -.06em; line-height: .99; }
.swipe-deck { margin-top: 38px; }
.swipe-controls { margin-top: 32px; }
.swipe-hint { margin-top: auto; padding-top: 18px; }

/* Match conversations open as a calm, full-room transition. */
.event-screen.chat-thread-open > .event-screen-header { display: none !important; }
.event-screen-header { position: relative; }
.event-screen-header > .screen-label { position: absolute; left: 50%; transform: translateX(-50%); white-space: nowrap; }
.event-arrow { display: grid; place-items: center; width: 16px; height: 16px; font-size: 23px; font-weight: 300; line-height: 1; }
.chat-bubble { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.pass-action { border: 1px solid rgba(41,38,36,.14); color: #746c62; background: #fcfaf6; box-shadow: 0 5px 14px rgba(76,59,45,.055); font-size: 25px; font-weight: 300; }
.pass-action:hover { border-color: rgba(41,38,36,.2); color: #5f574f; background: #f7f3ea; box-shadow: 0 8px 18px rgba(76,59,45,.075); }
.event-chat-thread-view { opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .42s cubic-bezier(.22,1,.36,1), transform .42s cubic-bezier(.22,1,.36,1); }
.event-chat-thread-view:not([hidden]) { display: block; }
.event-chat-thread-view.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.event-chat-thread-view .event-thread-bar { height: 54px; }
.event-chat-thread-view .event-thread-person { padding-top: 18px; }

/* Keep room changes inside one clean crossfade with no accidental scrollbars. */
.event-screen { overflow-x: hidden; scrollbar-width: none; -ms-overflow-style: none; }
.event-screen::-webkit-scrollbar { width: 0; height: 0; display: none; }
.event-screen.room-switching { overflow-x: hidden; }
.matches-view > .room-tabs,
.matches-view > .matches-intro,
.matches-view > .swipe-deck,
.matches-view > .swipe-controls,
.matches-view > .swipe-hint,
.event-chat-panel { transition: opacity .48s cubic-bezier(.22,1,.36,1), transform .48s cubic-bezier(.22,1,.36,1); }
.event-screen.room-switching .matches-view > .room-tabs,
.event-screen.room-switching .matches-view > .matches-intro,
.event-screen.room-switching .matches-view > .swipe-deck,
.event-screen.room-switching .matches-view > .swipe-controls,
.event-screen.room-switching .matches-view > .swipe-hint,
.event-screen.room-switching .event-chat-panel { opacity: 0; transform: none; }
.swipe-deck { overflow: hidden; border-radius: 26px; }

/* The current card eases back as the next card grows into the deck. */
.swipe-card.swipe-left { transform: translateX(-124%) rotate(-8deg) scale(.9) !important; }
.swipe-card.swipe-right { transform: translateX(124%) rotate(8deg) scale(.9) !important; }
.swipe-card.front.is-promoting { transform: translateY(9px) scale(.95); }

/* Keep the active conversation composer anchored to the bottom of the room. */
.event-screen.chat-thread-open { overflow-y: hidden; }
.event-chat-thread-view:not([hidden]) { display: flex; flex-direction: column; min-height: 100%; }
.event-chat-thread-view .event-thread-messages { flex: 1 1 auto; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.event-chat-thread-view .event-thread-messages::-webkit-scrollbar { width: 0; height: 0; display: none; }
.event-chat-thread-view .event-thread-composer { position: sticky; bottom: 0; z-index: 2; flex: 0 0 auto; margin-top: auto; background: rgba(247,243,234,.94); box-shadow: 0 -10px 24px rgba(76,59,45,.045); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.event-chat-thread-view .event-thread-composer { background: var(--white); transition: border-color .24s ease, box-shadow .24s ease, transform .24s cubic-bezier(.22,1,.36,1); }
.event-chat-thread-view .event-thread-composer:focus-within { border-color: rgba(41,38,36,.14); box-shadow: 0 -10px 24px rgba(76,59,45,.045); }

/* Only the two content surfaces dissolve; the shared header and dock stay still.
   The animation controller owns opacity, including interruption and cleanup. */
.phone-app:not(.event-open) :is(#homeScreen, #chatScreen, #discoverScreen, #coursesScreen).primary-tab-motion {
  z-index: 3;
  transition: none !important;
  transform: none !important;
  will-change: opacity;
}
.phone-app:not(.event-open) :is(#homeScreen, #chatScreen, #discoverScreen, #coursesScreen).primary-tab-outgoing {
  z-index: 2;
  pointer-events: none !important;
}

/* Use the event network mark as the living waiting state. */
.waiting-visual.org-mark { display: grid; place-items: center; width: 72px !important; height: 72px !important; overflow: visible; border: 1px solid rgba(232,95,88,.18); border-radius: 23px; color: var(--accent); background: #fff2ed; box-shadow: 0 12px 24px rgba(203,76,70,.08); animation: waitingMarkFloat 4.8s cubic-bezier(.45,0,.25,1) infinite; }
.waiting-visual.org-mark::before { inset: -8px !important; border: 1px solid rgba(232,95,88,.18) !important; border-top-color: rgba(232,95,88,.64) !important; border-right-color: transparent !important; animation: waitingMarkOrbit 8s linear infinite; }
.waiting-visual.org-mark::after { display: none !important; content: none !important; animation: none !important; }
.waiting-visual.org-mark svg { position: relative; z-index: 1; width: 38px; height: 38px; animation: waitingMarkDrift 4.8s cubic-bezier(.45,0,.25,1) infinite; }
.waiting-visual.org-mark path { animation: waitingMarkLine 4.8s ease-in-out infinite; }
.waiting-visual.org-mark circle { transform-box: fill-box; transform-origin: center; animation: waitingMarkNode 3.6s cubic-bezier(.45,0,.25,1) infinite; }
.waiting-visual.org-mark circle:nth-of-type(2) { animation-delay: .45s; }
.waiting-visual.org-mark circle:nth-of-type(3) { animation-delay: .9s; }
@keyframes waitingMarkFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes waitingMarkDrift { 0%, 100% { transform: rotate(-1deg); } 50% { transform: rotate(1deg); } }
@keyframes waitingMarkOrbit { to { transform: rotate(360deg); } }
@keyframes waitingMarkLine { 0%, 100% { opacity: .72; } 50% { opacity: 1; } }
@keyframes waitingMarkNode { 0%, 100% { transform: scale(.92); opacity: .76; } 50% { transform: scale(1.06); opacity: 1; } }

/* The waiting state is the mark itself, with no surrounding pulse treatment. */
.waiting-visual.org-mark { width: 72px !important; height: 72px !important; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: none; }
.waiting-visual.org-mark::before,
.waiting-visual.org-mark::after { display: none !important; content: none !important; animation: none !important; }
.waiting-visual.org-mark svg { width: 52px; height: 52px; animation: none; }
.waiting-visual.org-mark path { animation: none !important; }
.waiting-visual.org-mark circle { animation: none !important; }
.event-chat-thread-view .event-thread-composer button { transition: transform .22s cubic-bezier(.22,1,.36,1), background .22s ease; }
.event-chat-thread-view .event-thread-composer button:active { transform: scale(.88); }
.event-thread-messages .chat-bubble.is-sending { opacity: 0; transform: translateY(10px) scale(.98); transform-origin: bottom right; }
.event-thread-messages .chat-bubble.is-sending.is-visible { animation: sentMessageIn .48s cubic-bezier(.22,1,.36,1) both; }
@keyframes sentMessageIn { 0% { opacity: 0; transform: translateY(10px) scale(.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }

/* Discover is always available alongside the joined event rooms and matches. */
.app-tabs { max-width: none; }
.discover-screen { position: relative; min-height: calc(100svh - 72px); padding: 34px 20px calc(120px + env(safe-area-inset-bottom)); background: var(--cream); opacity: 1; transform: none; }
.discover-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; }
.discover-screen h1 { margin: 8px 0 0; color: var(--ink); font-size: 32px; letter-spacing: -.06em; line-height: .98; }
.discover-screen h1 em { color: var(--accent); font-family: Georgia, serif; font-weight: 400; }
.discover-status { flex: 0 0 auto; padding: 7px 10px; border: 1px solid rgba(232,95,88,.16); border-radius: 99px; color: var(--accent-dark); background: #fff2ed; font-size: 9px; font-weight: 700; }
.featured-events { padding-top: 42px; }
.discover-section-label { margin: 0 0 12px 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.featured-event-card { display: flex; align-items: flex-start; width: 100%; gap: 12px; margin: 0 0 11px; padding: 16px; border: 1px solid rgba(41,38,36,.08); border-radius: 20px; color: var(--ink); text-align: left; background: var(--white); box-shadow: 0 10px 25px rgba(76,59,45,.045); transition: border-color .24s ease, box-shadow .24s ease, transform .3s cubic-bezier(.22,1,.36,1); }
.featured-event-card:hover { border-color: rgba(232,95,88,.22); box-shadow: 0 14px 30px rgba(76,59,45,.08); transform: translateY(-2px); }
.featured-event-card:active { transform: scale(.985); }
.featured-event-mark { display: grid; place-items: center; flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px; color: var(--accent); background: #fff2ed; }
.featured-event-mark svg { width: 25px; height: 25px; }
.featured-event-body { display: grid; flex: 1; gap: 5px; min-width: 0; }
.featured-event-body strong { overflow: hidden; color: #171412; font-size: 14px; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.featured-event-body small { color: #625d56; font-size: 10px; }
.featured-event-body > span { color: var(--muted); font-size: 11px; line-height: 1.42; }
.featured-event-arrow { flex: 0 0 auto; margin-top: 11px; color: #a49a8e; font-size: 23px; font-weight: 300; line-height: 1; transition: color .2s ease, transform .2s ease; }
.featured-event-card:hover .featured-event-arrow { color: var(--accent); transform: translateX(2px); }
.discover-note { margin: 24px auto 0; color: #aaa196; text-align: center; font-size: 10px; line-height: 1.45; }

.courses-screen { position: absolute; inset: calc(var(--home-top) + 11cqw) 0 calc(18cqw + max(7cqw, env(safe-area-inset-bottom))); display: grid; place-items: center; min-height: 0; padding: 6cqw; overflow-y: auto; background: var(--home-surface); }
.courses-screen[hidden] { display: none; }
.courses-state { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 6cqw 0; text-align: center; }
.courses-mark { display: grid; place-items: center; width: 14cqw; height: 14cqw; margin-bottom: 6cqw; border-radius: 50%; color: var(--home-teal); background: #edf2ed; }
.courses-mark svg { width: 6.5cqw; height: 6.5cqw; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.courses-status { color: var(--home-teal); font-size: 2.65cqw; font-weight: 600; letter-spacing: .13em; line-height: 1.5; text-transform: uppercase; }
.courses-state h1 { margin: 2.5cqw 0 3cqw; color: var(--home-ink); font-size: 7.6cqw; font-weight: 600; letter-spacing: -.045em; line-height: 1.2; }
.courses-state > p { max-width: 70cqw; margin: 0; color: #666e65; font-size: 3.6cqw; font-weight: 400; line-height: 1.65; }
.phone-app.is-dark-theme .courses-mark { background: #2c3830; }
.phone-app.is-dark-theme .courses-state > p { color: var(--home-secondary); }
.phone-app:has(#coursesScreen:not([hidden])) { background: var(--home-surface); }

@media (prefers-reduced-motion: reduce) {
  .discover-screen, .featured-event-card, .featured-event-arrow { transition-duration: .01ms !important; }
}

/* Profile opens as a quiet, useful sheet from the header. */
.profile-backdrop { position: fixed; z-index: 11; inset: 0; display: flex; align-items: flex-end; background: rgba(41,38,36,.2); opacity: 0; pointer-events: none; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: opacity .28s ease; }
.profile-backdrop.is-open { opacity: 1; pointer-events: auto; }
.profile-backdrop[hidden] { display: none !important; opacity: 0; pointer-events: none; }
.profile-sheet { position: relative; width: 100%; padding: 13px 22px calc(25px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: var(--white); box-shadow: 0 -14px 45px rgba(49,39,29,.12); transform: translateY(22px); opacity: 0; transition: transform .38s cubic-bezier(.2,.85,.25,1), opacity .26s ease; }
.profile-backdrop.is-open .profile-sheet { transform: translateY(0); opacity: 1; }
.profile-heading { display: flex; align-items: center; gap: 13px; margin: 0 0 19px; }
.profile-avatar { display: grid; place-items: center; flex: 0 0 auto; width: 52px; height: 52px; border: 1px solid rgba(232,95,88,.2); border-radius: 18px; color: var(--accent-dark); background: #fff2ed; font-size: 12px; font-weight: 700; letter-spacing: .02em; }
.profile-kicker { margin: 0 0 5px; color: var(--accent-dark); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.profile-sheet h1 { margin: 0; color: var(--ink); font-size: 27px; letter-spacing: -.055em; line-height: 1; }
.profile-privacy { display: flex; align-items: center; gap: 8px; margin-bottom: 19px; padding: 11px 12px; border: 1px solid rgba(232,95,88,.12); border-radius: 13px; color: #8d8177; background: #fff8f3; font-size: 10px; line-height: 1.35; }
.privacy-mark { display: grid; place-items: center; flex: 0 0 auto; width: 17px; height: 17px; border-radius: 50%; color: var(--accent); background: rgba(232,95,88,.12); font-size: 9px; }
.profile-fields { display: grid; gap: 0; border-top: 1px solid rgba(41,38,36,.08); }
.profile-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 51px; border-bottom: 1px solid rgba(41,38,36,.08); }
.profile-field span { color: #a19a90; font-size: 10px; }
.profile-field strong { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 600; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.profile-edit { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 48px; margin-top: 18px; padding: 0 15px; border: 1px solid rgba(232,95,88,.18); border-radius: 14px; color: var(--accent-dark); background: #fff2ed; font-size: 12px; font-weight: 700; transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.profile-edit span { font-size: 17px; font-weight: 400; }
.profile-edit:hover { background: #ffebe4; transform: translateY(-1px); }
.profile-edit:active { transform: scale(.985); }
.profile-note { max-width: 300px; margin: 13px auto 0; color: #b0a89d; text-align: center; font-size: 9px; line-height: 1.45; }
.code-glyph svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }

@media (min-width: 700px) {
  .profile-backdrop { position: absolute; border-radius: 38px; }
}

/* Keep the waiting mark visibly in motion through every morph cycle. */
.waiting-visual.org-mark svg { animation: waitingMarkContinuous 4.2s linear infinite !important; animation-delay: -1.6s; transform-box: fill-box; transform-origin: center; will-change: transform; }
@keyframes waitingMarkContinuous {
  0% { transform: rotate(-1.2deg) translate3d(0, 0, 0) scale(.98); }
  21% { transform: rotate(.7deg) translate3d(.45px, -.35px, 0) scale(1.01); }
  43% { transform: rotate(1.35deg) translate3d(-.3px, .45px, 0) scale(1.03); }
  66% { transform: rotate(-.35deg) translate3d(-.55px, -.2px, 0) scale(1); }
  82% { transform: rotate(.8deg) translate3d(.25px, .35px, 0) scale(1.02); }
  100% { transform: rotate(-1.2deg) translate3d(0, 0, 0) scale(.98); }
}

/* Give each match card a clearer professional networking hierarchy. */
.swipe-deck { height: 372px; }
.swipe-card { padding: 18px 19px; }
.match-card-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 39px; margin-bottom: 18px; }
.match-anonymous { display: flex; align-items: center; gap: 9px; min-width: 0; }
.match-anonymous .anonymous-avatar { width: 38px; height: 38px; margin: 0; border-radius: 13px; color: var(--accent); background: #fff2ed; }
.match-anonymous .anonymous-avatar svg { width: 22px; height: 22px; }
.match-anonymous .anonymous-avatar path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.35; opacity: .92; }
.match-anonymous .anonymous-avatar circle { fill: currentColor; }
.anonymous-copy { display: grid; gap: 3px; min-width: 0; }
.anonymous-copy strong { overflow: hidden; color: #625d56; font-size: 9px; font-weight: 600; letter-spacing: -.005em; text-overflow: ellipsis; white-space: nowrap; }
.anonymous-copy small { color: #aaa196; font-size: 8px; }
.match-fit { flex: 0 0 auto; padding: 6px 8px; border: 1px solid rgba(232,95,88,.16); border-radius: 99px; color: var(--accent-dark); background: #fff5f0; font-size: 8px; font-weight: 700; white-space: nowrap; }
.swipe-card .match-role { margin: 0 0 7px; color: var(--muted); font-size: 10px; }
.swipe-card h3 { max-width: 295px; margin: 0 0 15px; font-size: 22px; line-height: 1.08; }
.match-signals { display: grid; gap: 10px; }
.match-signal { display: grid; gap: 4px; padding-top: 9px; border-top: 1px solid rgba(41,38,36,.08); }
.match-signal-label { color: #a1978c; font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.match-signal p { margin: 0; color: #70685f; font-size: 10px; line-height: 1.35; }
.match-footer { display: grid; gap: 7px; margin-top: auto; }
.match-footer .match-tags { gap: 5px; margin-top: 0; }
.match-footer .match-tags span { padding: 5px 7px; font-size: 8px; }

/* Final match card treatment: spare, legible, and centered on connection value. */
.swipe-deck { height: 360px; margin-top: 32px; }
.swipe-card { padding: 21px 20px 18px; border-radius: 25px; box-shadow: 0 18px 36px rgba(73,55,38,.09); }
.match-card-topline { align-items: center; min-height: 24px; margin-bottom: 24px; }
.match-privacy { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow: hidden; color: #938a80; font-size: 9px; letter-spacing: -.005em; text-overflow: ellipsis; white-space: nowrap; }
.match-privacy-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--accent); }
.match-fit { padding: 6px 8px; border-color: rgba(41,38,36,.1); color: #776e64; background: #f7f3ea; font-size: 8px; }
.match-profile { padding-bottom: 19px; border-bottom: 1px solid rgba(41,38,36,.09); }
.match-role-row { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.swipe-card .match-role { margin: 0; color: #6e665d; font-size: 11px; font-weight: 600; }
.match-location { color: #a49a8e; font-size: 10px; }
.match-location::before { margin-right: 8px; color: #c5bcb1; content: '·'; }
.swipe-card h3 { max-width: 292px; margin: 0; color: var(--ink); font-size: 24px; letter-spacing: -.055em; line-height: 1.06; }
.match-signals { gap: 0; padding-top: 2px; }
.match-signal { grid-template-columns: 83px minmax(0, 1fr); align-items: start; gap: 10px; padding: 13px 0 0; border-top: 0; }
.match-signal-label { padding-top: 1px; color: #a0978c; font-size: 8px; letter-spacing: .1em; }
.match-signal p { color: #655e56; font-size: 10px; line-height: 1.36; }
.match-footer { gap: 8px; padding-top: 14px; border-top: 1px solid rgba(41,38,36,.09); }
.match-footer .match-tags { gap: 6px; }
.match-footer .match-tags span { padding: 6px 8px; border: 1px solid rgba(41,38,36,.08); border-radius: 8px; color: #766e65; background: #fcfaf6; font-size: 8px; }

/* Match card hero: one confident color surface, with signal details kept quiet below. */
.swipe-deck { height: 374px; }
.swipe-card { display: flex; flex-direction: column; gap: 0; padding: 8px; overflow: hidden; border: 1px solid rgba(41,38,36,.08); border-radius: 27px; background: var(--white); box-shadow: 0 20px 42px rgba(73,55,38,.11); }
.match-card-hero { position: relative; display: flex; flex-direction: column; min-height: 202px; padding: 18px 17px 20px; overflow: hidden; border-radius: 20px; color: white; background: radial-gradient(circle at 96% 0%, rgba(255,255,255,.24), transparent 34%), linear-gradient(145deg, #ef7468 0%, #e35d59 54%, #cf4b4d 100%); box-shadow: 0 9px 20px rgba(203,76,70,.17); }
.match-card-hero::after { position: absolute; right: -22px; bottom: -36px; width: 128px; height: 128px; border: 1px solid rgba(255,255,255,.16); border-radius: 50%; box-shadow: 0 0 0 15px rgba(255,255,255,.045), 0 0 0 31px rgba(255,255,255,.035); content: ''; }
.match-card-hero .match-card-topline { position: relative; z-index: 1; align-items: center; min-height: 20px; margin-bottom: 22px; }
.match-card-hero .match-privacy { color: rgba(255,255,255,.84); font-size: 8px; }
.match-card-hero .match-privacy-dot { background: white; box-shadow: 0 0 0 3px rgba(255,255,255,.16); }
.match-card-hero .match-fit { border-color: rgba(255,255,255,.28); color: white; background: rgba(255,255,255,.15); }
.match-profile-line { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.match-avatar-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.34); border-radius: 13px; background: rgba(255,255,255,.16); }
.match-avatar-mark svg { width: 22px; height: 22px; }
.match-avatar-mark path { fill: none; stroke: white; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.25; opacity: .92; }
.match-avatar-mark circle { fill: white; }
.match-role-block { display: grid; gap: 4px; }
.match-role-block strong { color: white; font-size: 12px; font-weight: 650; letter-spacing: -.02em; }
.match-role-block small { color: rgba(255,255,255,.72); font-size: 9px; }
.match-card-hero h3 { position: relative; z-index: 1; max-width: 280px; margin: auto 0 0; color: white; font-size: 24px; letter-spacing: -.055em; line-height: 1.06; }
.match-card-body { display: flex; flex: 1; flex-direction: column; gap: 0; padding: 16px 10px 9px; }
.match-signal-highlight { display: grid; gap: 5px; padding: 0 0 13px; border-bottom: 1px solid rgba(41,38,36,.09); }
.match-signal-highlight .match-signal-label { color: var(--accent-dark); }
.match-signal-highlight p { margin: 0; color: #5e5750; font-size: 11px; font-weight: 600; line-height: 1.32; }
.match-signal-row { display: grid; grid-template-columns: 78px minmax(0, 1fr); align-items: start; gap: 10px; padding: 12px 0 0; }
.match-signal-row p { margin: 0; color: #777067; font-size: 10px; line-height: 1.35; }
.match-card-body .match-footer { gap: 7px; margin-top: auto; padding-top: 13px; border-top: 1px solid rgba(41,38,36,.09); }
.match-card-body .match-tags { gap: 5px; }
.match-card-body .match-tags span { padding: 5px 7px; border: 1px solid rgba(41,38,36,.08); border-radius: 8px; color: #7b7268; background: #fcfaf6; font-size: 8px; }

/* Quiet, consistent finish across the main app surfaces. */
button { -webkit-tap-highlight-color: transparent; }
.app-header { padding-bottom: 15px; }
.wordmark { letter-spacing: -.06em; }
.profile-button { width: 36px; height: 36px; border-color: rgba(41,38,36,.11); background-color: rgba(255,253,249,.45); transition: none; }
.event-list { padding-top: 27px; }
.event-row { gap: 12px; padding: 14px; border-radius: 18px; background: rgba(255,253,249,.82); box-shadow: 0 8px 22px rgba(76,59,45,.04); }
.event-icon { width: 42px; height: 42px; border-radius: 14px; }
.event-details { gap: 4px; }
.event-details strong { font-size: 14px; }
.event-arrow { color: #171412; }
.event-row:hover .event-arrow, .event-row.is-pressed .event-arrow { color: #171412; transform: translateX(2px); }
.chat-row, .event-chat-row { gap: 11px; border-radius: 18px; background: rgba(255,253,249,.84); box-shadow: 0 8px 22px rgba(76,59,45,.04); }
.chat-avatar { width: 42px; height: 42px; border-radius: 14px; }
.app-tabs { gap: 2px; padding: 4px; border-color: rgba(41,38,36,.075); border-radius: 19px; background: rgba(255,253,249,.96); box-shadow: 0 8px 22px rgba(76,59,45,.075); }
.app-tab { height: 42px; gap: 5px; padding: 0 8px; font-size: 10px; }
.app-tab.is-active { background: transparent; }
.add-button { box-shadow: 0 7px 16px rgba(203,76,70,.17); }
.featured-event-card { border-radius: 18px; background: rgba(255,253,249,.9); box-shadow: 0 8px 22px rgba(76,59,45,.04); }
.featured-event-mark { border-radius: 13px; }
.sheet-backdrop, .profile-backdrop { background: rgba(41,38,36,.18); }
.add-sheet, .profile-sheet { box-shadow: 0 -12px 38px rgba(49,39,29,.1); }
.sheet-handle { background: #d9d2c8; }
.join-button, .profile-edit { border-radius: 14px; }
.code-field { border-radius: 14px; }
.preview-button { min-height: 46px; }
.room-tabs { box-shadow: 0 6px 18px rgba(76,59,45,.045); }
.chat-bubble { box-shadow: 0 7px 18px rgba(76,59,45,.045); }
.event-list-head .list-label { color: var(--ink); }

/* Account menu: a quiet first step before opening Profile or Settings. */
.account-menu-backdrop { position: fixed; z-index: 12; inset: 0; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.account-menu-backdrop.is-open { opacity: 1; pointer-events: auto; }
.account-menu-backdrop[hidden] { display: none !important; }
.account-menu { position: absolute; top: calc(63px + env(safe-area-inset-top)); right: 14px; width: min(234px, calc(100% - 28px)); padding: 8px; border: 1px solid rgba(41,38,36,.08); border-radius: 19px; background: var(--white); box-shadow: 0 16px 38px rgba(49,39,29,.14); transform: translateY(-6px) scale(.98); opacity: 0; transition: transform .28s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.account-menu-backdrop.is-open .account-menu { transform: translateY(0) scale(1); opacity: 1; }
.account-menu-backdrop.is-open .account-menu { animation: accountMenuIn .32s cubic-bezier(.22,1,.36,1) both; }
@keyframes accountMenuIn { from { opacity: 0; transform: translateY(-8px) scale(.97); } to { opacity: 1; transform: translateY(0) scale(1); } }
.account-menu-heading { display: flex; align-items: center; gap: 10px; padding: 8px 8px 12px; border-bottom: 1px solid rgba(41,38,36,.08); }
.account-menu-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(232,95,88,.18); border-radius: 12px; color: var(--accent-dark); background: #fff2ed; font-size: 9px; font-weight: 700; }
.account-menu-heading p { margin: 0 0 3px; color: #a19a90; font-size: 9px; }
.account-menu-heading strong { color: var(--ink); font-size: 12px; letter-spacing: -.02em; }
.account-menu-links { display: grid; gap: 2px; padding-top: 6px; }
.account-menu-item { display: flex; align-items: center; width: 100%; gap: 10px; padding: 10px 8px; border: 0; border-radius: 13px; color: var(--ink); text-align: left; background: transparent; transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.account-menu-item:hover { background: #fff4ef; transform: translateX(1px); }
.account-menu-item:active { transform: scale(.985); }
.account-menu-icon { display: grid; place-items: center; flex: 0 0 auto; width: 31px; height: 31px; border-radius: 10px; color: var(--accent-dark); background: #fff2ed; }
.account-menu-icon svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.settings-icon svg { fill: currentColor; stroke: none; }
.account-menu-item > span:nth-child(2) { display: grid; flex: 1; gap: 3px; min-width: 0; }
.account-menu-item strong { font-size: 11px; font-weight: 700; }
.account-menu-item small { color: #a19a90; font-size: 9px; }
.account-menu-arrow { color: #afa69b; font-size: 18px; font-weight: 300; }

/* Settings keeps the same calm sheet language as Profile. */
.settings-backdrop { position: fixed; z-index: 13; inset: 0; display: flex; align-items: flex-end; background: rgba(41,38,36,.18); opacity: 0; pointer-events: none; backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); transition: opacity .28s ease; }
.settings-backdrop.is-open { opacity: 1; pointer-events: auto; }
.settings-backdrop[hidden] { display: none !important; opacity: 0; pointer-events: none; }
.settings-sheet { position: relative; width: 100%; padding: 13px 22px calc(27px + env(safe-area-inset-bottom)); border-radius: 25px 25px 0 0; background: var(--white); box-shadow: 0 -12px 38px rgba(49,39,29,.1); transform: translateY(22px); opacity: 0; transition: transform .38s cubic-bezier(.2,.85,.25,1), opacity .26s ease; }
.settings-backdrop.is-open .settings-sheet { transform: translateY(0); opacity: 1; }
.settings-kicker { margin: 0 0 8px; color: var(--accent-dark); font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.settings-sheet h1 { margin: 0 0 9px; color: var(--ink); font-size: 30px; letter-spacing: -.055em; line-height: 1; }
.settings-copy { max-width: 300px; margin: 0 0 22px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.settings-list { display: grid; border-top: 1px solid rgba(41,38,36,.08); }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; border-bottom: 1px solid rgba(41,38,36,.08); }
.settings-row > span:first-child { display: grid; gap: 4px; }
.settings-row strong { color: var(--ink); font-size: 11px; font-weight: 650; }
.settings-row small { color: #a19a90; font-size: 9px; }
.settings-value { color: var(--accent-dark); font-size: 10px; font-weight: 700; }

@media (min-width: 700px) {
  .account-menu-backdrop { position: absolute; border-radius: 38px; }
  .settings-backdrop { position: absolute; border-radius: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  .account-menu-backdrop.is-open .account-menu { animation: none; }
}

/* Event titles stay in the same ink black as the section heading. */
.event-details strong, .featured-event-body strong { color: #171412; }

/* Comfortable touch targets without enlarging the visible controls. */
.profile-button, .room-tab, .event-thread-composer button { position: relative; }
.profile-button::after, .close-button::after,
.room-tab::after, .event-thread-composer button::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100%, 44px);
  height: max(100%, 44px);
  transform: translate(-50%, -50%);
  content: '';
}
.back-button, .chat-page-back, .more-button { min-width: 44px; min-height: 44px; }
.add-sheet, .profile-sheet { max-height: 100%; overflow-y: auto; overscroll-behavior-y: contain; }
.event-screen { top: calc(72px + env(safe-area-inset-top)); }

@media (max-width: 699px) {
  .add-sheet input, .event-thread-composer input,
  .chat-page-panel .chat-composer input { font-size: 16px; }
}

@media (max-width: 360px) {
  .app-tabs { right: 82px; left: 14px; }
  .app-tab { gap: 4px; padding: 0 5px; font-size: 9px; }
  .app-tab svg { width: 15px; height: 15px; }
  .add-button { right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .profile-button, .event-row, .app-tab, .featured-event-card, .event-arrow,
  .featured-event-arrow, .add-button, .preview-button, .room-tab {
    transition-duration: .01ms !important;
  }
}

/* A clear rhythm from event context to people, card, and actions. */
.phone-app { overflow: clip; }
.event-screen { container-type: size; }
.event-screen-header { height: 44px; }
.event-screen-header > .screen-label {
  max-width: calc(100% - 144px);
  overflow: hidden;
  color: #171412;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -.015em;
  text-overflow: ellipsis;
  text-transform: none;
}
.back-button { gap: 3px; color: #82796e; }
.back-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.matches-view { min-height: calc(100% - 44px); padding: 12px 0 0; }
.room-tabs { width: min(208px, 100%); margin-bottom: 22px; gap: 2px; border-radius: 16px; box-shadow: none; }
.room-tab { height: 32px; font-size: 11px; font-weight: 600; }
.room-tab.is-active { box-shadow: none; }
.matches-intro, .swipe-deck { width: 100%; max-width: 360px; margin-inline: auto; }
.matches-intro h2 { font-size: clamp(28px, 8.2vw, 32px); line-height: 1.06; letter-spacing: -.055em; }
.swipe-deck {
  height: 352px;
  height: clamp(240px, calc(100cqh - 320px), 352px);
  margin-top: 24px;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(73,55,38,.035);
}
.swipe-card { border-radius: 24px; border-color: rgba(41,38,36,.08); box-shadow: none; }
.swipe-controls { align-items: center; align-self: center; width: max-content; gap: 20px; margin: 22px auto 0; }
.swipe-action { flex: 0 0 52px; padding: 0; }
.swipe-action svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pass-action { box-shadow: 0 4px 12px rgba(76,59,45,.035); }
.connect-action { box-shadow: 0 6px 16px rgba(203,76,70,.14); }
.connect-action svg { width: 22px; height: 22px; }
.swipe-hint { margin-bottom: 0; padding-top: 14px; color: #8f8579; font-size: 10.5px; line-height: 1.4; }

.waiting-meta span:first-child { color: #6f675e; }
.waiting-meta span:last-child { color: var(--accent-dark); font-weight: 650; }

/* Profile and Settings land on a calm full-screen placeholder page. */
.account-page-backdrop { position: fixed; z-index: 14; inset: 0; display: flex; background: var(--cream); opacity: 0; pointer-events: none; transition: opacity .32s cubic-bezier(.22,1,.36,1); }
.account-page-backdrop.is-open { opacity: 1; pointer-events: auto; }
.account-page-backdrop[hidden] { display: none !important; }
.account-page { position: relative; width: 100%; min-height: 100%; background: var(--cream); opacity: 0; transform: translateY(8px); transition: opacity .4s ease, transform .45s cubic-bezier(.22,1,.36,1); }
.account-page-backdrop.is-open .account-page { opacity: 1; transform: translateY(0); }
.account-page-header { position: relative; display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; height: 74px; padding: calc(20px + env(safe-area-inset-top)) 20px 12px; }
.account-page-header h1 { margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; letter-spacing: -.025em; text-align: center; }
.page-back-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0 0 2px; border: 0; border-radius: 50%; color: var(--ink); background: rgba(255,253,249,.72); font-size: 21px; font-weight: 300; line-height: 1; transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.page-back-button:hover { background: var(--white); transform: translateX(-1px); }
.page-header-spacer { width: 34px; height: 34px; }
.profile-header-photo { position: absolute; top: calc(76px + env(safe-area-inset-top)); right: 20px; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid rgba(45,40,35,.14); border-radius: 50%; color: #000; background-color: #f1ede6; font-size: 11px; font-weight: 750; letter-spacing: .01em; box-shadow: 0 4px 12px rgba(76,59,45,.06); transition: border-color .2s ease; }
.profile-header-photo:hover { border-color: rgba(45,40,35,.28); }
.profile-header-photo.has-photo, .profile-button.has-photo, .account-menu-avatar.has-photo, .profile-avatar.has-photo { color: transparent; background-repeat: no-repeat; background-position: center; background-size: cover; }
.profile-photo-input { display: none; }
.profile-photo-menu { position: absolute; z-index: 4; top: calc(121px + env(safe-area-inset-top)); right: 20px; display: grid; width: 148px; padding: 5px; border: 1px solid rgba(41,38,36,.09); border-radius: 14px; background: var(--white); box-shadow: 0 12px 28px rgba(76,59,45,.12); animation: profilePhotoMenuIn .2s cubic-bezier(.22,1,.36,1); }
.profile-photo-menu[hidden] { display: none !important; }
.profile-photo-menu button { min-height: 34px; padding: 0 10px; border: 0; border-radius: 9px; color: var(--ink); text-align: left; background: transparent; font-size: 10px; font-weight: 650; }
.profile-photo-menu button:hover { background: #f7f3ea; }
.profile-photo-menu button:last-child { color: #a56b61; }
@keyframes profilePhotoMenuIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.profile-page-content { display: flex; flex-direction: column; height: calc(100% - 126px); overflow-y: auto; padding: 18px 20px 16px; overscroll-behavior: contain; }
.profile-page-label { margin: 0 0 8px 2px; color: #777067; font-size: 8.5px; font-weight: 650; letter-spacing: .04em; }
.profile-assets-label { margin-top: 17px; }
.profile-name-form { display: flex; flex: 1; flex-direction: column; }
.profile-name-fields { display: grid; gap: 9px; }
.profile-basic-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.profile-name-field { display: grid; gap: 6px; }
.profile-name-field > span { color: #5f5952; font-size: 10px; font-weight: 700; }
.profile-name-field input { width: 100%; height: 46px; padding: 0 12px; border: 1px solid rgba(41,38,36,.1); border-radius: 12px; color: var(--ink); background: var(--white); box-shadow: 0 4px 15px rgba(76,59,45,.03); font-size: 13px; font-weight: 600; outline: none; transition: border-color .22s ease, box-shadow .22s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.profile-name-field input:focus { border-color: rgba(41,38,36,.35); box-shadow: 0 0 0 3px rgba(41,38,36,.06), 0 7px 19px rgba(76,59,45,.05); transform: translateY(-1px); }
.profile-name-field input::placeholder { color: #b0a89d; font-weight: 500; }
.profile-name-helper { max-width: 270px; margin: 10px 2px 0; color: #8f877d; font-size: 9px; line-height: 1.4; }
.profile-email-field { margin-top: 17px; }
.profile-email-helper { margin: 8px 2px 0; color: #8f877d; font-size: 9px; line-height: 1.4; }
.profile-phone-field { margin-top: 17px; }
.profile-password-block { margin-top: 17px; }
.profile-password-label { margin-bottom: 8px; }
.profile-password-field { display: flex; align-items: center; height: 46px; padding: 0 12px; border: 1px solid rgba(41,38,36,.1); border-radius: 12px; background: var(--white); box-shadow: 0 4px 15px rgba(76,59,45,.03); transition: border-color .22s ease, box-shadow .22s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.profile-password-field:focus-within { border-color: rgba(41,38,36,.35); box-shadow: 0 0 0 3px rgba(41,38,36,.06), 0 7px 19px rgba(76,59,45,.05); transform: translateY(-1px); }
.profile-password-field input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; color: var(--ink); background: transparent; font-size: 13px; font-weight: 600; outline: none; }
.profile-password-field input::placeholder { color: #b0a89d; font-weight: 500; }
.profile-password-toggle, .profile-password-reset { flex: 0 0 auto; margin-left: 10px; padding: 4px 0 4px 10px; border: 0; color: #8f665e; background: transparent; font-size: 9px; font-weight: 700; }
.profile-password-reset { margin-left: 8px; padding-left: 9px; border-left: 1px solid rgba(41,38,36,.1); color: #a39a90; }
.profile-assets-list { overflow: hidden; border: 1px solid rgba(41,38,36,.08); border-radius: 12px; background: var(--white); box-shadow: 0 4px 15px rgba(76,59,45,.03); }
.profile-asset-row { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; width: 100%; gap: 11px; min-height: 62px; padding: 8px 14px; border: 0; border-bottom: 1px solid rgba(41,38,36,.07); color: var(--ink); background: transparent; text-align: left; transition: background .22s ease; }
.profile-asset-row:hover { background: rgba(247,243,234,.72); }
.profile-asset-row:last-child { border-bottom: 0; }
.profile-asset-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; color: #605950; background: #f1ede5; font-size: 10px; font-weight: 800; letter-spacing: -.03em; }
.profile-asset-icon.linkedin-mark { color: #55738e; background: #e9eff3; }
.profile-asset-icon.website-mark { color: #756fa1; background: #efedf6; }
.profile-asset-icon.pitch-deck-mark { color: #9a7266; background: #f3ebe7; }
.profile-asset-icon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.45; }
.profile-asset-copy { display: grid; align-self: center; gap: 2px; min-width: 0; padding: 1px 0; }
.profile-asset-copy strong { overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.profile-asset-copy small { display: block; overflow: visible; color: #968d83; font-size: 9px; line-height: 1.35; text-overflow: clip; white-space: normal; }
.profile-asset-action { color: #a56b61; font-size: 10px; font-weight: 700; }
.profile-asset-row.has-link .profile-asset-action { color: #615e58; }
.profile-link-prompt { display: grid; grid-template-columns: 32px minmax(0,1fr) 16px; align-items: center; width: 100%; gap: 11px; margin: 0 0 19px; padding: 12px; border: 1px solid rgba(232,95,88,.22); border-radius: 13px; color: var(--ink); background: var(--white); text-align: left; box-shadow: 0 5px 15px rgba(76,59,45,.035); transition: border-color .22s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.profile-link-prompt:hover { border-color: rgba(232,95,88,.42); transform: translateY(-1px); }
.profile-link-prompt-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--accent-dark); background: #fff0eb; font-size: 17px; }
.profile-link-prompt-copy { display: grid; gap: 3px; min-width: 0; }
.profile-link-prompt-copy strong { font-size: 11px; font-weight: 700; line-height: 1.3; }
.profile-link-prompt-copy small { color: #777067; font-size: 9px; font-weight: 500; line-height: 1.4; }
.profile-link-prompt-arrow { color: var(--accent-dark); font-size: 15px; }
.profile-link-backdrop { position: absolute; z-index: 8; inset: 0; display: flex; align-items: flex-end; background: rgba(41,38,36,.24); backdrop-filter: blur(5px); opacity: 0; transition: opacity .25s ease; }
.profile-link-backdrop.is-open { opacity: 1; }
.profile-link-sheet { position: relative; width: 100%; padding: 29px 20px calc(22px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; background: var(--cream); box-shadow: 0 -15px 35px rgba(41,38,36,.09); transform: translateY(18px); opacity: 0; transition: transform .36s cubic-bezier(.22,1,.36,1), opacity .32s ease; }
.profile-link-backdrop.is-open .profile-link-sheet { transform: translateY(0); opacity: 1; }
.profile-link-close { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border: 0; border-radius: 50%; color: #6e6760; background: var(--white); font-size: 21px; font-weight: 300; line-height: 1; }
.profile-link-eyebrow { margin: 0 0 8px; color: var(--accent-dark); font-size: 9px; font-weight: 750; letter-spacing: .11em; }
.profile-link-sheet h2 { margin: 0; color: var(--ink); font-size: 23px; font-weight: 700; letter-spacing: -.045em; }
.profile-link-description { margin: 8px 0 25px; color: #6d675f; font-size: 11px; line-height: 1.5; }
.profile-link-label { display: block; margin-bottom: 8px; color: var(--ink); font-size: 10px; font-weight: 700; }
.profile-link-sheet input { width: 100%; height: 47px; padding: 0 13px; border: 1px solid rgba(41,38,36,.14); border-radius: 11px; color: var(--ink); background: var(--white); font-size: 12px; outline: none; }
.profile-link-sheet input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,95,88,.1); }
.profile-link-sheet input::placeholder { color: #aaa198; }
.profile-link-error { margin: 8px 1px 0; color: var(--accent-dark); font-size: 10px; line-height: 1.4; }
.profile-link-save { width: 100%; min-height: 47px; margin-top: 16px; border: 0; border-radius: 11px; color: white; background: #111; font-size: 12px; font-weight: 700; }
.profile-link-remove { display: block; width: 100%; min-height: 39px; margin-top: 7px; border: 0; color: var(--accent-dark); background: transparent; font-size: 10px; font-weight: 700; }
.profile-save-button { display: grid; place-items: center; width: 100%; min-height: 49px; margin-top: auto; padding: 0; border: 0; border-radius: 12px; color: white; background: #000; font-size: 11px; font-weight: 700; box-shadow: 0 6px 17px rgba(41,38,36,.11); transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.profile-save-button:hover { background: #1d1a18; transform: translateY(-1px); }
.profile-save-button:active { transform: scale(.992); }

@media (min-width: 700px) {
  .account-page-backdrop { position: absolute; border-radius: 38px; overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .account-page-backdrop, .account-page, .profile-link-backdrop, .profile-link-sheet { transition: none; }
}

.account-page-backdrop { transition-duration: .4s; }
.account-page, .account-page-backdrop.is-open .account-page { transform: none; transition: opacity .42s ease; }
.account-page-header { opacity: 0; transform: none; transition: opacity .32s ease .06s; }
.account-page-backdrop.is-open .account-page-header { opacity: 1; }
.profile-page-content, .settings-page-content { opacity: 0; transition: opacity .34s ease .1s; }
.account-page-backdrop.is-open .profile-page-content:not([hidden]), .account-page-backdrop.is-open .settings-page-content:not([hidden]) { opacity: 1; }

.account-page { height: 100%; }
.settings-page-content { display: flex; flex-direction: column; height: calc(100% - 74px); padding: 20px; }
.settings-page-label { margin: 0 0 10px 3px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.settings-page-list { overflow: hidden; border: 1px solid rgba(41,38,36,.08); border-radius: 18px; background: rgba(255,253,249,.8); }
.settings-page-row { display: grid; grid-template-columns: 31px minmax(0,1fr) auto 14px; align-items: center; width: 100%; gap: 10px; min-height: 65px; padding: 12px 13px; border: 0; border-bottom: 1px solid rgba(41,38,36,.08); color: var(--ink); text-align: left; background: transparent; transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.settings-page-row:last-child { border-bottom: 0; }
.settings-page-row:hover { background: var(--white); }
.settings-page-row:active { transform: scale(.992); }
.settings-page-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; color: var(--accent-dark); background: #fff2ed; font-size: 15px; line-height: 1; }
.settings-page-row-copy { display: grid; gap: 4px; min-width: 0; }
.settings-page-row-copy strong { color: var(--ink); font-size: 11px; font-weight: 700; }
.settings-page-row-copy small { overflow: hidden; color: #a19a90; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.settings-page-value { color: #766d63; font-size: 10px; white-space: nowrap; }
.settings-page-chevron { color: #aaa095; font-size: 18px; font-weight: 300; }
.settings-sign-out { margin-top: auto; padding: 18px 3px calc(10px + env(safe-area-inset-bottom)); border: 0; color: var(--accent-dark); text-align: left; background: transparent; font-size: 11px; font-weight: 700; }
.settings-sign-out { text-decoration: none; }
.settings-sign-out:hover { color: var(--accent); }

/* Settings follows the compact native layout: one title, one quiet group, one exit action. */
.account-page-header { display: block; height: auto; padding: calc(38px + env(safe-area-inset-top)) 20px 0; }
.account-page-header h1 { margin: 0; font-size: 26px; letter-spacing: -.055em; line-height: 1; text-align: left; }
.page-back-button { width: 28px; height: 28px; margin: 0 0 18px; padding: 0 0 2px; border-radius: 50%; background: transparent; font-size: 21px; }
.page-back-button:hover { background: rgba(255,253,249,.72); }
.page-header-spacer { display: none; }
.settings-page-content { height: calc(100% - 126px); padding: 20px 20px 20px; }
.settings-page-label { margin: 0 0 8px 2px; color: #777067; font-size: 9px; font-weight: 500; letter-spacing: .04em; text-transform: none; }
.settings-page-list { border-radius: 13px; background: var(--white); box-shadow: 0 5px 18px rgba(76,59,45,.035); }
.settings-page-row { grid-template-columns: 26px minmax(0,1fr) auto 14px; min-height: 55px; gap: 10px; padding: 0 12px; }
.settings-page-icon { width: 18px; height: 18px; border-radius: 0; color: var(--ink); background: transparent; font-size: 13px; }
.settings-page-row-copy { display: block; }
.settings-page-row-copy strong { font-size: 11.5px; font-weight: 600; }
.settings-page-row-copy small { display: none; }
.settings-page-value { color: #80776d; font-size: 10px; }
.settings-page-chevron { color: #8f877d; font-size: 17px; }
.settings-sign-out { display: grid; place-items: center; width: 100%; min-height: 55px; margin-top: auto; padding: 0; border: 1px solid rgba(41,38,36,.08); border-radius: 13px; color: var(--accent-dark); text-align: center; background: var(--white); font-size: 11px; font-weight: 600; box-shadow: 0 5px 18px rgba(76,59,45,.035); transition: background .2s ease, transform .25s cubic-bezier(.22,1,.36,1); }
.settings-sign-out:hover { color: var(--accent-dark); background: #fff8f3; }
.settings-sign-out:active { transform: scale(.992); }

.settings-page-row.theme-setting-row, .settings-page-row.notification-setting-row { grid-template-columns: 26px minmax(0,1fr) auto; }
.theme-setting-row .settings-page-chevron, .notification-setting-row .settings-page-chevron { display: none; }
.settings-page-control { display: inline-flex; align-items: center; gap: 9px; }
.theme-toggle { position: relative; display: inline-block; width: 34px; height: 20px; border-radius: 99px; background: #ded8cf; transition: background .25s ease; }
.theme-toggle > span { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 3px rgba(41,38,36,.16); transition: transform .28s cubic-bezier(.22,1,.36,1); }
.theme-toggle.is-on { background: #5f5952; }
.theme-toggle.is-on > span { transform: translateX(14px); }
.phone-app.is-dark-theme { --cream: #1e1c1a; --cream-deep: #2a2723; --ink: #f7f2e9; --muted: #b4aa9e; --white: #2a2723; background: var(--cream); }
.phone-app.is-dark-theme .account-page, .phone-app.is-dark-theme .account-page-backdrop { background: var(--cream); }
.phone-app.is-dark-theme .settings-page-list, .phone-app.is-dark-theme .settings-sign-out { border-color: rgba(255,255,255,.11); background: var(--white); box-shadow: none; }
.phone-app.is-dark-theme .settings-page-value { color: #c8bdb0; }

.settings-page-row-copy strong { font-weight: 700; }
.settings-page-value { font-weight: 600; }
.timezone-picker { max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-5px); transition: max-height .28s ease, opacity .22s ease, transform .28s cubic-bezier(.22,1,.36,1); }
.timezone-picker.is-open { max-height: 190px; opacity: 1; transform: translateY(0); }
.timezone-picker-label { margin: 14px 2px 8px; color: #777067; font-size: 9px; font-weight: 600; }
.timezone-options { overflow: hidden; border: 1px solid rgba(41,38,36,.08); border-radius: 13px; background: var(--white); box-shadow: 0 5px 18px rgba(76,59,45,.035); }
.timezone-option { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 48px; padding: 8px 12px; border: 0; border-bottom: 1px solid rgba(41,38,36,.08); color: var(--ink); text-align: left; background: transparent; transition: background .2s ease; }
.timezone-option:last-child { border-bottom: 0; }
.timezone-option:hover { background: #f7f3ea; }
.timezone-option > span:first-child { display: grid; gap: 3px; }
.timezone-option strong { font-size: 10.5px; font-weight: 700; }
.timezone-option small { color: #9b9187; font-size: 9px; }
.timezone-check { color: transparent; font-size: 14px; font-weight: 700; }
.timezone-option.is-selected .timezone-check { color: var(--accent-dark); }
.phone-app.is-dark-theme .timezone-options { border-color: rgba(255,255,255,.11); background: var(--white); box-shadow: none; }
.phone-app.is-dark-theme .timezone-option { border-color: rgba(255,255,255,.11); }
.phone-app.is-dark-theme .timezone-option:hover { background: #332f2a; }

/* Time zone opens as a quiet detail page with a restrained choice state. */
.settings-page-content, .timezone-page-content, .detail-page-content { transform: none; transition: opacity .36s ease; }
.timezone-page-content { display: flex; flex-direction: column; height: calc(100% - 126px); padding: 20px; }
.timezone-page-label { margin: 0 0 10px 2px; color: #777067; font-size: 9px; font-weight: 650; letter-spacing: .04em; }
.timezone-page-content .timezone-options { margin-top: 0; }
.timezone-page-content .timezone-option { min-height: 57px; padding: 9px 14px; background: transparent; transition: background .16s ease, transform .2s cubic-bezier(.22,1,.36,1); }
.timezone-page-content .timezone-option:hover { background: transparent; }
.timezone-page-content .timezone-option:active { background: #f4eee7; transform: scale(.995); }
.timezone-page-content .timezone-option:focus-visible { outline: 2px solid rgba(232,95,88,.34); outline-offset: -2px; }
.timezone-page-content .timezone-option strong { color: var(--ink); font-size: 11.5px; font-weight: 700; }
.timezone-page-content .timezone-option small { color: #8f877d; font-size: 9.5px; }
.timezone-page-content .timezone-check { transition: color .2s ease, transform .28s cubic-bezier(.22,1,.36,1); }
.timezone-page-content .timezone-check::before { content: "\2713"; }
.timezone-page-content .timezone-option.is-selected .timezone-check { transform: scale(1.08); }
.settings-page-value { color: #5f5952; font-weight: 650; }
.phone-app.is-dark-theme .settings-page-value { color: #d2c7bb; }
.phone-app.is-dark-theme .timezone-page-content .timezone-option:active { background: #332f2a; }
.settings-section-label { margin-top: 22px; }
.detail-setting-row { min-height: 62px; }
.detail-setting-row .settings-page-row-copy { display: grid; gap: 3px; }
.detail-setting-row .settings-page-row-copy small { display: block; max-width: 178px; color: #8f877d; font-size: 8.5px; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; }
.detail-page-content { display: flex; flex-direction: column; height: calc(100% - 126px); padding: 20px; }
.detail-page-label { margin: 0 0 10px 2px; color: #777067; font-size: 9px; font-weight: 650; letter-spacing: .04em; }
.privacy-status-row { min-height: 72px; }
.privacy-status-row .settings-page-row-copy { display: grid; gap: 3px; }
.privacy-status-row .settings-page-row-copy small { display: block; max-width: 170px; color: #8f877d; font-size: 8.5px; line-height: 1.25; }
.privacy-terms-card { border: 1px solid rgba(41,38,36,.08); border-radius: 13px; padding: 18px 16px; background: var(--white); box-shadow: 0 5px 18px rgba(76,59,45,.035); }
.privacy-terms-card h2 { margin: 0 0 12px; color: var(--ink); font-size: 17px; letter-spacing: -.035em; line-height: 1.1; }
.privacy-terms-card p { margin: 0 0 10px; color: #716960; font-size: 10.5px; line-height: 1.55; }
.privacy-terms-card p:last-child { margin-bottom: 0; }
.notification-setting-row { min-height: 62px; }
.notification-setting-row .settings-page-row-copy { display: grid; gap: 3px; }
.notification-setting-row .settings-page-row-copy small { display: block; max-width: 178px; overflow: visible; color: #8f877d; font-size: 8.5px; letter-spacing: -.01em; line-height: 1.4; white-space: nowrap; }
.settings-page-icon-svg svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.phone-app.is-dark-theme .notification-setting-row .settings-page-row-copy small { color: #aaa096; }
.phone-app.is-dark-theme .detail-setting-row .settings-page-row-copy small, .phone-app.is-dark-theme .privacy-status-row .settings-page-row-copy small { color: #aaa096; }
.phone-app.is-dark-theme .privacy-terms-card { border-color: rgba(255,255,255,.11); background: var(--white); box-shadow: none; }
.phone-app.is-dark-theme .privacy-terms-card p { color: #c8bdb0; }

/* Keep account navigation neutral; reserve coral for actions and status. */
.account-menu-avatar { border-color: rgba(41,38,36,.1); color: var(--ink); background: #f3efe6; }
.account-menu-item:hover { background: #f7f3ea; }
.account-menu-icon { color: #5f5952; background: #f3efe6; }

/* Final palette calibration: warmer white surfaces, softer coral, and quieter borders. */
:root {
  --cream: #faf8f3;
  --cream-deep: #f1ede4;
  --ink: #292624;
  --muted: #8f887f;
  --accent: #e2685c;
  --accent-dark: #c9574c;
  --white: #fffefa;
  --line: rgba(45, 40, 35, .1);
}
.account-page, .account-page-backdrop { background: var(--cream); }
.settings-page-list, .settings-sign-out, .privacy-terms-card { border-color: rgba(45,40,35,.08); background: var(--white); }
.settings-page-label, .detail-page-label { color: #857d74; }
.settings-page-icon-svg { color: #615a52; }

/* Profile initials should feel personal and quiet; keep coral for actions. */
.profile-button,
.account-menu-avatar,
.profile-avatar {
  color: #000;
  border-color: rgba(45,40,35,.12);
  background: #f3efe6;
}
.settings-page-chevron { color: #968c82; }
.settings-page-value { color: #4a443d; }
.settings-page-icon-svg { color: #292624; }
.theme-toggle.is-on { background: #292624; }
.settings-sign-out { color: var(--accent-dark); }
.settings-sign-out:hover { color: var(--accent-dark); background: #fff8f4; }

/* Toasts use the same quiet white surface as the profile controls. */
.toast { border: 1px solid rgba(41,38,36,.1); color: #000; background: #fffefa; font-weight: 650; box-shadow: 0 8px 22px rgba(41,38,36,.12); }

/* A quiet account popover. The portrait never changes on hover or press. */
.profile-button, .profile-button:hover, .profile-button:active { transform: none; animation: none; transition: none; filter: none; box-shadow: none; }
.account-menu-backdrop { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; transition: opacity 180ms cubic-bezier(.2,0,.2,1); }
.account-menu-backdrop.is-open { transition-duration: 240ms; }
.account-menu { --account-surface: #fff; --account-ink: #171917; --account-muted: #747873; --account-line: #eceeeb; --account-hover: #f5f6f4; top: calc(66px + env(safe-area-inset-top)); right: 6cqw; width: min(240px, calc(100% - 12cqw)); max-height: calc(100% - 100px); overflow-y: auto; overscroll-behavior: contain; padding: 8px; border: 1px solid var(--account-line); border-radius: 18px; color: var(--account-ink); background: var(--account-surface); box-shadow: 0 12px 36px #17211a12, 0 2px 6px #17211a06; transform: none; opacity: 1; transition: none; will-change: auto; }
.account-menu-backdrop.is-open .account-menu { transform: none; opacity: 1; animation: none; }
.account-menu-heading { gap: 12px; padding: 12px 12px 14px; border-bottom-color: var(--account-line); }
.account-menu-avatar { flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid var(--account-line); border-radius: 50%; color: var(--account-ink); background-color: var(--account-hover); background-position: center; background-size: cover; background-repeat: no-repeat; font-size: 12px; }
.account-menu-heading > div:last-child { min-width: 0; }
.account-menu-heading p { margin: 3px 0 0; color: var(--account-muted); font-size: 11px; line-height: 1.5; font-weight: 400; letter-spacing: 0; text-transform: none; }
.account-menu-heading strong { display: block; color: var(--account-ink); font-size: 15px; line-height: 1.35; font-weight: 600; letter-spacing: -.025em; overflow-wrap: anywhere; }
.account-menu-links { gap: 2px; padding-top: 6px; }
.account-menu-item { min-height: 48px; gap: 12px; padding: 12px; border-radius: 12px; color: var(--account-ink); transform: none; transition: background-color .18s ease; }
.account-menu-item:active { background: var(--account-hover); transform: none; }
@media (hover: hover) { .account-menu-item:hover { background: var(--account-hover); transform: none; } }
@media (hover: none) { .account-menu-item:hover:not(:active) { background: transparent; transform: none; } }
.account-menu-icon { width: 20px; height: 20px; border-radius: 0; color: inherit; background: transparent; }
.account-menu-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.account-menu-item strong { color: inherit; font-size: 14px; line-height: 1.5; font-weight: 500; letter-spacing: -.015em; }
.account-menu-arrow { display: grid; place-items: center; color: var(--account-muted); }
.account-menu-arrow svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.profile-button:focus-visible, .account-menu-item:focus-visible { outline: 2px solid #306b5d; outline-offset: 3px; }
.phone-app.is-dark-theme .account-menu { --account-surface: #262826; --account-ink: #f5f6f3; --account-muted: #a8ada6; --account-line: #383c37; --account-hover: #30342f; }
@media (prefers-reduced-motion: reduce) { .account-menu-backdrop, .account-menu-item { transition: none; } }

.preview-button:disabled { cursor: default; border-color: rgba(41,38,36,.1); color: #82796e; background: #fbfaf7; opacity: 1; transform: none; }
.preview-button .preview-label { margin-left: 0; color: inherit; font-size: inherit; }
.preview-button .preview-arrow { margin-left: 9px; color: var(--accent); font-size: 15px; }

/* Keep the countdown at the center of the room's available space. */
.waiting-state {
  --room-accent: var(--accent);
  display: grid;
  grid-template-rows: minmax(96px, 1fr) auto minmax(96px, 1fr);
  justify-items: center;
  min-height: calc(100cqh - 44px);
  padding: 20px 0;
}
.waiting-state .waiting-visual {
  align-self: end;
  margin: 0 0 36px;
  color: var(--room-accent);
}
.room-unlock { display: flex; flex-direction: column; align-items: center; width: 100%; margin: 0; }
.waiting-state .room-unlock-label {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.035em;
  line-height: 1.25;
  text-transform: none;
}
.room-countdown {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(320px, 100%);
  margin-top: 30px;
  gap: 16px;
}
.room-countdown > span { display: flex; flex-direction: column; align-items: center; gap: 8px; min-width: 0; }
.room-countdown strong {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 1.1em;
  overflow: hidden;
  color: var(--room-accent);
  font-size: clamp(48px, 18cqw, 64px);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.055em;
  line-height: 1.05;
}
.room-countdown .count-value { grid-area: 1 / 1; display: block; }
.room-countdown .count-value.is-entering { animation: countdownValueIn .58s cubic-bezier(.22, 1, .36, 1) both; }
.room-countdown .count-value.is-exiting { animation: countdownValueOut .52s cubic-bezier(.4, 0, .2, 1) both; }
@keyframes countdownValueIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes countdownValueOut { from { opacity: 1; } to { opacity: 0; } }
.room-countdown small { color: #817a73; font-size: 11px; font-weight: 500; letter-spacing: .02em; line-height: 1.4; }
.room-unlock-copy { max-width: 280px; margin: 0; color: #817a73; font-size: 12px; font-weight: 400; line-height: 1.6; }
.waiting-state .preview-button { align-self: start; margin: 44px 0 0; padding: 13px 20px; background: var(--white); font-size: 12px; font-weight: 600; }
.waiting-state .preview-button:hover:not(:disabled) { border-color: var(--room-accent); transform: none; }
.waiting-state .preview-arrow { color: var(--room-accent); }
.phone-app.is-dark-theme .room-countdown small,
.phone-app.is-dark-theme .room-unlock-copy { color: var(--muted); }


@container (max-height: 520px) {
  .waiting-state { grid-template-rows: minmax(84px, 1fr) auto minmax(84px, 1fr); padding-block: 12px; }
  .waiting-state .waiting-visual { margin-bottom: 20px; }
  .waiting-state .preview-button { margin-top: 28px; }
}

/* Give the waiting state a more confident, visible network mark. */
.waiting-state .waiting-visual.org-mark {
  width: 112px !important;
  height: 112px !important;
}
.waiting-state .waiting-visual.org-mark svg {
  width: 82px;
  height: 82px;
}

/* Make the event count easier to read without turning it into a headline. */
.event-list-head > span {
  color: #7f776f;
  font-weight: 600;
  letter-spacing: .01em;
}

/* Discover: generous type, softly colored event artwork, and quiet controls. */
#discoverScreen {
  position: absolute;
  inset: calc(var(--home-top) + 11cqw) 0 0;
  min-height: 0;
  padding: 25px 22px calc(112px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
}
#discoverScreen::-webkit-scrollbar { display: none; }
.discover-intro { margin-bottom: 27px; }
.discover-eyebrow { margin: 0 0 13px; color: #77716a; font-size: 10px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; }
#discoverScreen .discover-intro h1 { margin: 0; color: var(--ink); font-size: 38px; font-weight: 650; line-height: 1.08; letter-spacing: -.055em; }
#discoverScreen .discover-intro h1 em { display: inline-block; color: var(--accent); font-weight: 400; letter-spacing: -.045em; }
.discover-filters { position: relative; isolation: isolate; display: flex; gap: 7px; margin-bottom: 28px; }
.discover-filter-indicator { position: absolute; z-index: -1; top: 0; bottom: 0; left: 0; border-radius: 99px; background: var(--ink); opacity: 0; pointer-events: none; }
.discover-filter-indicator.is-ready { opacity: 1; transition: transform .44s cubic-bezier(.22,1,.36,1), width .44s cubic-bezier(.22,1,.36,1), opacity .2s ease; }
.discover-filter { min-height: 39px; padding: 0 15px; border: 1px solid rgba(41,38,36,.1); border-radius: 99px; color: #706b65; background: transparent; font-size: 11px; font-weight: 600; transition: color .32s ease, border-color .32s ease; }
.discover-filter.is-selected { border-color: transparent; color: var(--cream); background: transparent; }
.discover-collection-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 13px; }
.discover-collection-head h2 { margin: 0; color: var(--ink); font-size: 12px; font-weight: 650; letter-spacing: -.015em; }
.discover-collection-head > span { color: #817a72; font-size: 10px; font-weight: 500; }
.discover-grid { display: grid; gap: 18px; }
.discovery-card { display: block; width: 100%; padding: 6px; border: 1px solid rgba(41,38,36,.075); border-radius: 23px; color: var(--ink); background: var(--white); text-align: left; box-shadow: 0 3px 12px rgba(41,38,36,.025); transition: border-color .3s ease, box-shadow .3s ease; }
.discover-art { position: relative; display: block; height: 142px; overflow: hidden; isolation: isolate; border-radius: 17px; }
.discover-art-technology { color: #bd6458; background: #f1dcd2; }
.discover-art-design { color: #817594; background: #e6e2ec; }
.discover-art > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.discover-category { position: absolute; z-index: 1; top: 14px; left: 14px; color: inherit; font-size: 10px; font-weight: 650; letter-spacing: .01em; }
.discover-date { position: absolute; z-index: 1; top: 11px; right: 11px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 51px; height: 51px; padding: 8px; border: 1px solid rgba(255,255,255,.65); border-radius: 12px; color: #3e3732; background: rgba(255,254,250,.92); }
.discover-date small { font-size: 8px; font-weight: 700; line-height: 1; letter-spacing: .09em; }
.discover-date strong { font-size: 15px; font-weight: 650; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.discovery-card-body { display: block; padding: 16px 13px 9px; }
.discovery-card-title { display: block; color: var(--ink); font-size: 19px; font-weight: 650; line-height: 1.25; letter-spacing: -.04em; }
.discovery-card-host { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.discovery-card-host .discover-host-mark { flex-basis: 34px; width: 34px; height: 34px; border-radius: 10px; }
.discovery-card-host .discover-host-mark svg { width: 20px; height: 20px; }
.discovery-card-host .discover-host-copy { gap: 1px; }
.discovery-card-host .discover-host-copy small { font-size: 8px; }
.discovery-card-host .discover-host-copy strong { font-size: 11px; }
.discovery-card-copy { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.discovery-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; }
.discovery-card-place { display: flex; align-items: center; gap: 6px; color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.55; }
.discovery-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 12px; min-width: 0; }
.discovery-card-time { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-size: 11px; font-weight: 500; line-height: 1.55; white-space: nowrap; }
.discovery-card-time svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; color: #b86c59; }
.discovery-card-place svg, .discovery-card-arrow svg, .discover-back svg, .discover-facts svg, .discover-join button svg { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.discovery-card-place svg { width: 13px; height: 13px; color: #5e8496; }
.discovery-card-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #655e57; background: var(--cream); transition: color .3s ease, background .3s ease; }
.discover-footer { margin: 26px 0 0; color: #8c847b; font-size: 10px; line-height: 1.5; text-align: center; }
.discover-back { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; margin: -13px 0 12px -7px; padding: 0 7px; border: 0; color: #6d665e; background: transparent; font-size: 11px; font-weight: 600; }
.discover-detail > .discover-art { height: 160px; border-radius: 21px; }
#discoverScreen .discover-detail h1 { margin: 20px 0 9px; color: var(--ink); font-size: 31px; font-weight: 650; line-height: 1.08; letter-spacing: -.05em; }
.discover-detail h1:focus { outline: none; }
.discover-detail-summary { margin: 0; color: var(--ink); font-size: 12px; font-weight: 500; line-height: 1.6; }
.discover-host { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 12px; border: 1px solid rgba(41,38,36,.065); border-radius: 17px; background: var(--white); }
.discover-host-mark { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border: 1px solid rgba(164,93,80,.07); border-radius: 13px; color: #ad6256; background: #f5e6df; font-size: 10px; font-weight: 650; letter-spacing: -.03em; }
.discover-host-mark svg { display: block; width: 24px; height: 24px; }
.discover-host-design .discover-host-mark { border-color: rgba(117,100,143,.08); color: #79658f; background: #eee8f3; }
.discover-host-copy { display: grid; gap: 3px; min-width: 0; }
.discover-host-copy small { color: var(--ink); font-size: 9px; font-weight: 500; line-height: 1.4; }
.discover-host-copy strong { color: var(--ink); font-size: 13px; font-weight: 650; line-height: 1.4; letter-spacing: -.015em; overflow-wrap: anywhere; }
.discover-facts { display: grid; gap: 7px; margin: 20px 0 22px; padding: 12px 0; border-top: 1px solid rgba(41,38,36,.09); border-bottom: 1px solid rgba(41,38,36,.09); }
.discover-facts .discover-fact-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 7px 0; }
.discover-facts svg { width: 19px; height: 19px; }
.discover-facts span { display: grid; gap: 4px; }
.discover-facts .discover-fact-icon { flex: 0 0 22px; width: 22px; height: 22px; display: grid; place-items: center; gap: 0; }
.discover-fact-calendar { color: #b86350; }
.discover-fact-pin { color: #567f93; }
.discover-facts .discover-fact-copy { flex: 1; min-width: 0; text-align: left; }
.discover-location { border: 0; border-radius: 11px; color: var(--ink); background: transparent; transition: background .24s ease; }
.discover-facts .discover-location-chevron { width: 15px; height: 15px; margin-right: 3px; color: #7896a4; }
.discover-location:active { background: rgba(41,38,36,.045); }
.discover-facts strong { color: var(--ink); font-size: 12px; font-weight: 600; line-height: 1.4; }
.discover-facts small { color: var(--ink); font-size: 12px; font-weight: 400; line-height: 1.65; }
.discover-detail h2 { margin: 0 0 10px; color: var(--ink); font-size: 13px; font-weight: 650; letter-spacing: -.02em; }
.discover-description { margin: 0; color: var(--ink); font-size: 12px; font-weight: 400; line-height: 1.65; }
.discover-description p { margin: 0; overflow-wrap: anywhere; }
.discover-description p + p { margin-top: 13px; }
.discover-topics { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.discover-topics span { --topic-rgb: 193,111,94; --topic-ink: #8f5148; --topic-light: #e1b2a5; display: inline-flex; align-items: center; min-height: 30px; padding: 7px 11px; border: 0; border-radius: 9px; color: var(--topic-ink); background: rgba(var(--topic-rgb),.11); font-size: 10.5px; font-weight: 600; line-height: 1.4; }
.discover-topics .discover-topic-blue { --topic-rgb: 91,134,170; --topic-ink: #4d6980; --topic-light: #b3cde2; }
.discover-topics .discover-topic-sage { --topic-rgb: 104,145,125; --topic-ink: #506f5e; --topic-light: #bad3c3; }
.discover-topics .discover-topic-lavender { --topic-rgb: 135,115,164; --topic-ink: #705d88; --topic-light: #d0bfe6; }
.discover-join { margin-top: 24px; }
.discover-join p { margin: 0 0 10px; color: var(--ink); font-size: 11px; font-weight: 600; }
.discover-join button { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 15px; color: #fff; background: var(--accent); font-size: 12px; font-weight: 600; transition: background .25s ease; }
.discover-join small { display: block; margin-top: 10px; color: #847b72; font-size: 10px; line-height: 1.5; text-align: center; }
@media (hover: hover) {
  .discover-filter:not(.is-selected):hover { border-color: #c9c1b7; color: var(--ink); }
  .discover-location:hover { background: rgba(41,38,36,.025); }
  .discovery-card:hover { border-color: rgba(41,38,36,.16); box-shadow: 0 6px 20px rgba(41,38,36,.05); }
  .discovery-card:hover .discovery-card-arrow { color: var(--accent-dark); background: #f8eee8; }
  .discover-back:hover { color: var(--ink); }
  .discover-join button:hover { background: var(--accent-dark); }
}
.phone-app.is-dark-theme .discover-eyebrow,
.phone-app.is-dark-theme .discovery-card-host,
.phone-app.is-dark-theme .discover-host-copy small,
.phone-app.is-dark-theme .discover-collection-head > span,
.phone-app.is-dark-theme .discovery-card-copy,
.phone-app.is-dark-theme .discovery-card-place,
.phone-app.is-dark-theme .discovery-card-time,
.phone-app.is-dark-theme .discover-detail-summary,
.phone-app.is-dark-theme .discover-description,
.phone-app.is-dark-theme .discover-facts small,
.phone-app.is-dark-theme .discover-back,
.phone-app.is-dark-theme .discover-join small,
.phone-app.is-dark-theme .discover-footer { color: var(--muted); }
.phone-app.is-dark-theme .discovery-card,
.phone-app.is-dark-theme .discover-filter,
.phone-app.is-dark-theme .discover-facts { border-color: rgba(255,255,255,.14); }
.phone-app.is-dark-theme .discover-topics span { color: var(--topic-light); border-color: rgba(var(--topic-rgb),.23); background: rgba(var(--topic-rgb),.14); }
.phone-app.is-dark-theme .discover-filter:not(.is-selected) { color: var(--muted); }
.phone-app.is-dark-theme .discover-filter.is-selected { border-color: transparent; }
.phone-app.is-dark-theme .discover-fact-calendar,
.phone-app.is-dark-theme .discovery-card-time svg { color: #d59b89; }
.phone-app.is-dark-theme .discover-fact-pin,
.phone-app.is-dark-theme .discovery-card-place svg { color: #9cc4d7; }
.phone-app.is-dark-theme .discover-art-technology { color: #cf9280; background: #4c3932; }
.phone-app.is-dark-theme .discover-art-design { color: #b3a5c8; background: #3b3546; }
.phone-app.is-dark-theme .discovery-card-arrow { color: var(--muted); }
.phone-app.is-dark-theme .discover-host-mark { color: #d5a293; background: #4c3932; }
.phone-app.is-dark-theme .discover-host-design .discover-host-mark { color: #c3b5d5; background: #3b3546; }
.phone-app.is-dark-theme .discover-host { border-color: rgba(255,255,255,.09); }
@media (max-width: 350px) {
  #discoverScreen { padding-left: 17px; padding-right: 17px; }
  #discoverScreen .discover-intro h1 { font-size: 35px; }
  .discover-filter { padding: 0 12px; }
  .discovery-card-title { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .discover-filter, .discover-filter-indicator.is-ready, .discover-location, .discovery-card, .discovery-card-arrow, .discover-join button { transition: none; }
}

/* Shared navigation stacking; the dock below owns the glass surface. */
.app-tabs {
  z-index: 7;
  overflow: hidden;
  isolation: isolate;
  background: var(--white);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Dedicated event actions may use this shield; the floating navigation does not. */
.bottom-nav-shield {
  position: fixed;
  z-index: 6;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(64px + max(16px, env(safe-area-inset-bottom)));
  border-top: 1px solid #f1f2f2;
  background: #fff;
  box-shadow: none;
  pointer-events: auto;
}
.add-button { z-index: 8; }
.phone-app.event-open .bottom-nav-shield { display: none; }
@media (min-width: 700px) {
  .bottom-nav-shield { position: absolute; }
}

/* Keep the sample hosts' official brand colors in both themes. */
.phone-app .discover-host-stripe .discover-host-mark { border-color: transparent; background: #533afd; }
.discover-host-stripe .discover-host-mark svg { width: 32px; height: auto; }
.discovery-card-host.discover-host-stripe .discover-host-mark svg { width: 26px; height: auto; }
.phone-app .discover-host-slack .discover-host-mark { border-color: rgba(41,38,36,.08); background: #fff; }

/* A compact add action, centered on the same line as the navigation. */
.app-tabs { right: 80px; }
.add-button {
  width: 44px;
  height: 44px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  border: 1px solid rgba(201,87,76,.17);
  border-radius: 15px;
  color: var(--accent);
  background: var(--white);
  box-shadow: 0 2px 6px rgba(76,59,45,.035);
  transition: background .22s ease, border-color .22s ease, transform .22s ease;
}
.add-button .fab-plus { display: block; width: 21px; height: 21px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.add-button:hover { background: var(--white); transform: none; }
.add-button:active { background: #f9eeea; transform: scale(.95); }
@media (hover: hover) {
  .add-button:hover { border-color: rgba(201,87,76,.3); background: #fff6f1; }
}
.phone-app.is-dark-theme .add-button:hover,
.phone-app.is-dark-theme .add-button:active { background: #3b302c; }
@media (max-width: 360px) {
  .app-tabs { right: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .add-button { transition: none !important; }
}

/* Event details use a dedicated action dock and a persistent way back. */
.discover-action-bar {
  position: fixed;
  z-index: 8;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 14px 22px calc(20px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(41,38,36,.07);
  background: var(--cream);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .32s ease, visibility 0s .32s;
}
.discover-action-bar p { margin: 0 0 10px; color: #655e57; font-size: 10px; font-weight: 500; line-height: 1.5; text-align: center; }
.discover-join-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 16px; border: 0; border-radius: 15px; color: #fff; background: var(--accent); font-size: 13px; font-weight: 600; transition: background .22s ease; }
.discover-join-button svg, .discover-header-back svg { flex: 0 0 auto; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.discover-join-button:active { background: var(--accent-dark); }
.discover-header-back { position: absolute; top: calc(15px + env(safe-area-inset-top)); left: 15px; display: inline-flex; align-items: center; gap: 5px; min-height: 44px; padding: 0 6px; border: 0; color: var(--ink); background: transparent; font-size: 12px; font-weight: 600; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .32s ease, visibility 0s .32s; }
.app-tabs, .wordmark { transition: opacity .28s ease, visibility 0s; }
.add-button { transition: background .22s ease, border-color .22s ease, transform .22s ease, opacity .28s ease, visibility 0s; }
.phone-app.discover-detail-open .app-tabs,
.phone-app.discover-detail-open .add-button,
.phone-app.discover-detail-open .wordmark { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility 0s .18s; }
.phone-app.discover-detail-open .discover-action-bar,
.phone-app.discover-detail-open .discover-header-back { opacity: 1; visibility: visible; pointer-events: auto; transition-delay: .12s, 0s; }
.phone-app.discover-detail-open #discoverScreen { padding-bottom: calc(135px + env(safe-area-inset-bottom)); }
.phone-app.is-dark-theme .discover-action-bar { border-color: rgba(255,255,255,.1); }
.phone-app.is-dark-theme .discover-action-bar p { color: var(--muted); }
@media (min-width: 700px) {
  .discover-action-bar { position: absolute; }
}
@media (max-width: 350px) {
  .discover-action-bar { padding-right: 17px; padding-left: 17px; }
}
@media (hover: hover) {
  .discover-join-button:hover { background: var(--accent-dark); }
}
@media (prefers-reduced-motion: reduce) {
  .discover-action-bar, .discover-header-back, .app-tabs, .wordmark, .add-button, .discover-join-button { transition: none !important; }
}

/* A compact floating glass dock. Blur belongs to the surface, never the icons.
   The join action keeps the same touch target as every destination. */
.phone-app { --navigation-fade-duration: 420ms; --navigation-fade-easing: cubic-bezier(.22,1,.36,1); }
.phone-app .app-header :is(#notificationsButton, #profileButton) {
  opacity: 1;
  transition: opacity var(--navigation-fade-duration) var(--navigation-fade-easing);
}
/* Reset hidden controls immediately, then return with the dock's quiet fade.
   They stay in their existing positions and never cover a nested-page header. */
.phone-app:is(.advisory-open, .event-copilot-open) .app-header :is(#notificationsButton, #profileButton),
.phone-app.event-open:has(#eventScreen:is(.countdown-open, .ended-open):not([hidden])) .app-header :is(#notificationsButton, #profileButton),
.phone-app.event-open:has(.chat-thread-open) .app-header :is(#notificationsButton, #profileButton) {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: none;
}
.phone-app:not(.discover-detail-open) .bottom-nav-shield { display: none; }
.primary-dock {
  position: fixed;
  z-index: 7;
  right: 0;
  bottom: max(26px, calc(env(safe-area-inset-bottom) + 12px));
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(44px, 1fr);
  align-items: stretch;
  gap: 0;
  width: min(320px, calc(100% - 48px));
  height: 54px;
  margin: 0 auto;
  padding: 4px;
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 28px;
  background: rgba(249,250,249,.96);
  box-shadow: 0 8px 28px rgba(34,43,49,.09), 0 2px 5px rgba(34,43,49,.035), inset 0 1px 0 rgba(255,255,255,.95);
  transition: opacity var(--navigation-fade-duration) var(--navigation-fade-easing), visibility 0s;
}
.phone-app.courses-disabled .primary-dock { width: min(288px, calc(100% - 48px)); grid-template-columns: minmax(0, 3fr) minmax(44px, 1fr); }
.primary-dock .app-tabs { position: relative; isolation: isolate; inset: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-self: stretch; min-width: 0; height: auto; gap: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.phone-app.courses-disabled .primary-dock .app-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.primary-dock .nav-selection { position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; width: calc(100% / var(--tab-count, 3)); pointer-events: none; transform: translateX(calc(var(--selected-tab, 0) * 100%)); transition: transform 420ms cubic-bezier(.22,.72,.2,1); }
.primary-dock .nav-selection::before {
  content: ''; position: absolute; inset: 0; width: 36px; height: 36px; margin: auto; border-radius: 50%;
  background: linear-gradient(145deg, rgb(243 245 246 / 74%), rgb(225 232 236 / 78%) 48%, rgb(185 197 204 / 72%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 95%), inset 0 0 0 .5px rgb(93 110 121 / 18%), inset 0 -1px 0 rgb(35 46 54 / 12%), 0 2px 5px rgb(35 46 54 / 9%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.primary-dock .app-tab { z-index: 1; }
.primary-dock .app-tab, .primary-dock .add-button { position: relative; isolation: isolate; min-width: 44px; min-height: 44px; height: 100%; padding: 0; border: 0; border-radius: 22px; color: #70777c; background: transparent; box-shadow: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: color 200ms ease; }
.primary-dock .app-tab::before, .primary-dock .add-button::before { content: ''; position: absolute; z-index: -1; inset: 0; width: 36px; height: 36px; margin: auto; border-radius: 50%; background: transparent; transition: background-color 260ms cubic-bezier(.2,.7,.3,1); pointer-events: none; }
.primary-dock .app-tab svg, .primary-dock .add-button .fab-plus { display: block; flex: 0 0 auto; width: 20px; height: 20px; margin: 0; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; shape-rendering: geometricPrecision; transform: none; filter: none; opacity: 1; }
.primary-dock .app-tab svg path:last-child { stroke-width: inherit; }
.primary-dock .app-tab.is-active { color: #26333b; }

.primary-dock .app-tab:active, .primary-dock .add-button:active { color: #242b30; background: transparent; transform: none; }
.primary-dock .app-tab:active::before, .primary-dock .add-button:active::before { background-color: rgba(35,45,52,.11); }
.primary-dock .app-tab.is-active:active { color: #26333b; }
.primary-dock .app-tab.is-active:active::before { background-color: rgb(0 0 0 / 8%); }
.phone-app.is-dark-theme .primary-dock .nav-selection::before {
  background: linear-gradient(145deg, rgb(72 86 96 / 62%), rgb(37 46 52 / 78%) 48%, rgb(25 30 34 / 90%));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 42%), inset 0 0 0 .5px rgb(255 255 255 / 20%), inset 0 -1px 0 rgb(0 0 0 / 18%), 0 2px 5px rgb(0 0 0 / 12%);
}
.phone-app.is-dark-theme .primary-dock .app-tab.is-active { color: #f3f5f6; }
.primary-dock .app-tab:focus-visible, .primary-dock .add-button:focus-visible { outline: 1.5px solid #565e64; outline-offset: -5px; }
.primary-dock .tab-count { position: absolute; top: 3px; left: calc(50% + 4px); min-width: 13px; height: 13px; padding: 0 3px; border: 1.5px solid #f8f9f8; border-radius: 8px; color: #fff; background: #535e66; font-size: 8px; font-weight: 500; line-height: 10px; }
.primary-dock .add-button { position: relative; inset: auto; display: grid; width: 100%; margin: 0; place-items: center; color: #515b63; }
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .primary-dock { background: linear-gradient(145deg,rgba(255,255,255,.8),rgba(245,247,246,.54)); backdrop-filter: blur(22px) saturate(135%); -webkit-backdrop-filter: blur(22px) saturate(135%); }
}
@media (prefers-reduced-transparency: reduce) {
  .primary-dock { background: linear-gradient(145deg,rgba(255,255,255,.96),rgba(242,245,243,.92)); }
  .primary-dock .nav-selection::before {
    background: linear-gradient(145deg, #eef2f4, #e1e8ec 48%, #cbd4da);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .phone-app.is-dark-theme .primary-dock .nav-selection::before { background: linear-gradient(145deg, #455159, #2b343b 48%, #1c2227); }
}
.phone-app.discover-detail-open .primary-dock { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility 0s .18s; }
.phone-app.event-open .primary-dock { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity var(--navigation-fade-duration) var(--navigation-fade-easing), visibility 0s linear var(--navigation-fade-duration); }
.phone-app.is-dark-theme .discover-location:active { background: rgba(255,255,255,.04); }
@media (hover: hover) {
  .primary-dock .app-tab:not(.is-active):hover { color: #666b70; }
  .primary-dock .add-button:hover { background: transparent; transform: none; }
  .phone-app.is-dark-theme .discover-location:hover { background: rgba(255,255,255,.025); }
}
@media (min-width: 700px) {
  .app-phone-status { position: absolute; z-index: 5; inset: 4.7cqw 6.4cqw auto; display: flex; align-items: center; justify-content: space-between; height: 6cqw; color: #20201e; font-size: 3.4cqw; font-weight: 650; line-height: 1; pointer-events: none; }
  .app-phone-system-icons { display: flex; align-items: center; gap: 1.2cqw; }
  .app-phone-system-icons svg { width: 4.4cqw; height: 3.4cqw; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
  .app-phone-system-icons svg:first-child { stroke-width: 2.4; }
  .app-phone-system-icons svg:last-child { width: 6.6cqw; }
  .app-phone-system-icons svg:last-child rect:nth-child(2) { fill: currentColor; stroke: none; }
  .app-phone-island { position: absolute; z-index: 6; top: 4.2cqw; left: 50%; display: block; width: 25cqw; height: 7cqw; border-radius: 5cqw; background: #171717; transform: translateX(-50%); pointer-events: none; }
  .app-phone-island::after { position: absolute; top: 2.6cqw; right: 3cqw; width: 1.7cqw; height: 1.7cqw; border-radius: 50%; background: #28313a; box-shadow: inset 0 0 0 .5cqw #202429; content: ''; }
  .app-home-indicator { position: absolute; z-index: 8; bottom: 2.5cqw; left: 50%; display: block; width: 32cqw; height: 1.1cqw; border-radius: 4px; background: #242422; transform: translateX(-50%); pointer-events: none; }
  .primary-dock { position: absolute; }
  .app-header { padding-top: 17cqw; }
}
@media (prefers-reduced-motion: reduce) {
  .phone-app .app-header :is(#notificationsButton, #profileButton) { transition: none; }
  .primary-dock, .primary-dock .nav-selection, .primary-dock .app-tab, .primary-dock .add-button, .primary-dock svg { transition: none !important; }
  .primary-dock .app-tab::before, .primary-dock .add-button::before { transition: none; }
}

/* Chats: a quiet, readable inbox with distinct match and event context. */
.phone-app:not(.event-open) #chatScreen:not([hidden]) {
  position: absolute; inset: calc(var(--home-top) + 11cqw) 0 max(calc(18cqw + max(7cqw, env(safe-area-inset-bottom))), calc(max(26px, calc(env(safe-area-inset-bottom) + 12px)) + 70px));
  min-height: 0; padding: 3.4cqw 6cqw 0; overflow-y: auto;
  overscroll-behavior: contain; scrollbar-width: none;
  --chat-ink: #171412; --chat-secondary: #675f56; --chat-border: rgba(41,38,36,.085);
}
#chatScreen::-webkit-scrollbar { display: none; }
#chatScreen .chat-screen-head { flex: none; align-items: center; min-height: 27px; gap: 16px; margin-bottom: 12px; }
#chatScreen h1 { margin: 0; color: var(--home-ink); font-family: var(--app-sans); font-size: 22px; font-weight: 500; letter-spacing: -.035em; line-height: 1.2; }
.phone-app:not(.event-open) #chatScreen:not([hidden]):has(> #chatEmpty:not([hidden])) { display: flex !important; flex-direction: column; }
#chatScreen .chat-status { flex-shrink: 0; padding: 6px 10px; border-radius: 99px; color: var(--accent-dark); background: rgba(232,95,88,.075); font-size: 11px; font-weight: 600; line-height: 1.4; }
.chat-search { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 13px; border: 1px solid var(--chat-border); border-radius: 15px; color: var(--chat-secondary); background: rgba(255,253,249,.65); transition: border-color .25s ease, background .25s ease; }
.chat-search > svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.chat-search input { width: 100%; min-width: 0; height: 46px; padding: 0; border: 0; outline: 0; color: var(--chat-ink); background: transparent; font-size: 13px; letter-spacing: -.01em; -webkit-appearance: none; appearance: none; }
.chat-search input::-webkit-search-cancel-button { display: none; }
.chat-search input::placeholder { color: var(--chat-secondary); opacity: .85; }
.chat-search:focus-within { border-color: rgba(41,38,36,.28); background: var(--white); }
.chat-search button { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin: 0 -8px 0 0; padding: 0; border: 0; color: var(--chat-secondary); background: transparent; }
.chat-search button svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
#chatScreen .chat-list { display: grid !important; gap: 12px; padding-top: 20px; }
#chatScreen .chat-list[hidden] { display: none !important; }
#chatScreen .chat-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 12px; align-items: start; gap: 12px; margin: 0; padding: 17px 15px; border: 1px solid var(--chat-border); border-radius: 20px; background: var(--white); box-shadow: 0 3px 12px rgba(76,59,45,.025); transition: background .22s ease, border-color .22s ease, box-shadow .22s ease; }
#chatScreen .chat-avatar { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #976052; background: #f6e8e1; }
#chatScreen .chat-avatar-1 { color: #668477; background: #e9efea; }
#chatScreen .chat-avatar-2 { color: #837396; background: #eee9f2; }
#chatScreen .chat-avatar svg { width: 26px; height: 26px; overflow: visible; }
#chatScreen .chat-avatar path { fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
#chatScreen .chat-avatar circle { fill: currentColor; }
#chatScreen .chat-details { display: flex; flex-direction: column; gap: 0; min-width: 0; }
#chatScreen .chat-details strong { color: var(--chat-ink); font-size: 14px; font-weight: 650; letter-spacing: -.02em; line-height: 1.45; }
#chatScreen .chat-role { margin-top: 1px; color: var(--chat-secondary); font-size: 11.5px; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
#chatScreen .chat-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 9px; padding-bottom: 1px; color: var(--chat-ink); font-size: 12px; font-weight: 400; line-height: 1.55; overflow-wrap: anywhere; }
#chatScreen .chat-draft-label { color: var(--accent-dark); font-weight: 600; }
#chatScreen .chat-event { margin-top: 10px; }
#chatScreen .chat-row-arrow { align-self: center; width: 12px; height: 16px; fill: none; stroke: #8c8379; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
#chatScreen .chat-row:active { background: #faf6ef; border-color: rgba(41,38,36,.18); box-shadow: none; }
#chatScreen .chat-row:focus-visible { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.chat-search-status { margin: 34px 20px; color: var(--chat-secondary); font-size: 13px; line-height: 1.6; text-align: center; }
.chat-search-status:empty { display: none; }
#chatScreen .chat-empty { justify-content: center; min-height: min(460px, calc(100svh - 270px)); padding: 30px 0; }
#chatScreen .chat-empty-mark { width: 64px; height: 64px; margin-bottom: 24px; border: 0; border-radius: 22px; color: var(--accent-dark); background: rgba(232,95,88,.075); }
#chatScreen .chat-empty h2 { color: var(--chat-ink); font-size: 25px; font-weight: 600; line-height: 1.22; letter-spacing: -.035em; }
#chatScreen .chat-empty p { max-width: 260px; color: var(--chat-secondary); font-size: 12px; line-height: 1.65; }
.chat-empty-action { display: inline-flex; align-items: center; justify-content: center; gap: 13px; min-height: 44px; margin-top: 24px; padding: 0 18px; border: 1px solid var(--chat-border); border-radius: 14px; color: var(--chat-ink); background: var(--white); font-size: 12px; font-weight: 600; transition: border-color .22s ease, background .22s ease; }
.chat-empty-action span { color: var(--accent-dark); }
.event-chat-thread-view, .event-chat-thread-view.is-visible { transform: none; transition: opacity .4s ease; }
@media (hover: hover) {
  #chatScreen .chat-row:hover { border-color: rgba(41,38,36,.18); box-shadow: 0 5px 18px rgba(76,59,45,.045); }
  #chatScreen .chat-row:hover .chat-row-arrow { stroke: var(--accent-dark); }
  .chat-empty-action:hover { border-color: rgba(41,38,36,.2); }
}
@media (max-width: 699px) {
  .chat-search input { font-size: 16px; }
  .chat-search input::placeholder { font-size: 13px; }
}
@media (max-width: 350px) {
  #chatScreen .chat-row { grid-template-columns: 38px minmax(0,1fr) 10px; gap: 10px; padding: 15px 12px; }
  #chatScreen .chat-avatar { width: 38px; height: 38px; border-radius: 50%; }
}
.phone-app.is-dark-theme:not(.event-open) #chatScreen:not([hidden]) { --chat-ink: #f7f2e9; --chat-secondary: #bdb4a9; --chat-border: rgba(255,255,255,.1); }
.phone-app.is-dark-theme #chatScreen .chat-search { background: var(--white); }
.phone-app.is-dark-theme #chatScreen .chat-status, .phone-app.is-dark-theme #chatScreen .chat-empty-mark { color: #ee9c90; background: rgba(232,95,88,.12); }
.phone-app.is-dark-theme #chatScreen .chat-avatar { color: #d9a08f; background: #43322b; }
.phone-app.is-dark-theme #chatScreen .chat-avatar-1 { color: #a6c2b0; background: #2d3a32; }
.phone-app.is-dark-theme #chatScreen .chat-avatar-2 { color: #c4b2d6; background: #3a3144; }
.phone-app.is-dark-theme #chatScreen .chat-row:active { background: #322d27; }
.phone-app.is-dark-theme #chatScreen .chat-row:hover, .phone-app.is-dark-theme #chatScreen .chat-search:focus-within { border-color: rgba(255,255,255,.24); }
@media (prefers-reduced-motion: reduce) {
  #chatScreen, #chatScreen .chat-row, #chatScreen .chat-search, .chat-empty-action, .event-chat-thread-view { transition: none !important; }
}

/* A match reveals the person's identity throughout chats. */
.person-avatar { position: relative; display: grid; place-items: center; flex-shrink: 0; overflow: hidden; isolation: isolate; border-radius: 50%; }
.person-avatar .person-initials { font-size: 13px; font-weight: 650; letter-spacing: .01em; line-height: 1; }
.person-avatar img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.chat-event { display: inline-flex; align-items: center; align-self: flex-start; gap: 6px; max-width: 100%; padding: 4px 8px; border: 1px solid rgba(41,38,36,.055); border-radius: 8px; color: #655b52; background: #f6f2ec; font-size: 10.5px; font-weight: 500; line-height: 1.4; }
.chat-event > svg { flex: 0 0 13px; width: 13px; height: 13px; fill: none; stroke: #aa7565; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.chat-event > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#eventChatList .event-chat-row { display: grid; grid-template-columns: 44px minmax(0,1fr) 12px; align-items: start; gap: 12px; padding: 17px 15px; margin-bottom: 12px; border-radius: 20px; border-color: rgba(41,38,36,.085); background: var(--white); box-shadow: 0 3px 12px rgba(76,59,45,.025); }
#eventChatList .event-chat-row:hover { transform: none; }
#eventChatList .chat-avatar { width: 44px; height: 44px; border: 0; border-radius: 50%; color: #976052; background: #f6e8e1; }
#eventChatList .chat-details { display: flex; flex-direction: column; gap: 0; }
#eventChatList .chat-details strong { font-size: 14px; font-weight: 650; line-height: 1.45; color: var(--ink); }
#eventChatList .chat-role { margin-top: 1px; font-size: 11.5px; line-height: 1.5; color: #675f56; }
#eventChatList .chat-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 9px; padding-bottom: 1px; font-size: 12px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
#eventChatList .chat-event { margin-top: 10px; }
#eventChatList .chat-row-arrow { align-self: center; width: 12px; height: 16px; fill: none; stroke: #8c8379; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }

/* Bound the thread so messages scroll while the composer stays in place. */
.event-screen.chat-thread-open { display: flex; flex-direction: column; height: var(--chat-viewport-height, auto); padding: 0 20px calc(16px + env(safe-area-inset-bottom)); overflow: hidden; }
.event-chat-thread-view:not([hidden]) { flex: 1 1 0; width: 100%; height: 100%; min-height: 0; padding: 0; }
.event-chat-thread-view .event-thread-bar { display: grid; flex: 0 0 48px; grid-template-columns: 1fr auto 1fr; height: 48px; gap: 10px; align-items: center; }
.event-thread-bar .chat-page-back { justify-self: start; gap: 4px; color: var(--ink); font-size: 11px; }
.event-thread-bar .chat-page-back svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.event-thread-bar .chat-page-back span { font-size: 11px; }
.event-thread-bar .screen-label { font-size: 9px; letter-spacing: .08em; }
.event-thread-bar .chat-private { display: flex; justify-self: end; align-items: center; gap: 3px; padding: 0; border: 0; border-radius: 0; color: #617967; background: transparent; font-size: 10px; font-weight: 550; }
.event-thread-bar .chat-private svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.event-chat-thread-view .event-thread-person { flex-shrink: 0; gap: 12px; padding: 16px 0 20px; border-bottom: 1px solid rgba(41,38,36,.075); }
#eventThreadAvatar { flex: 0 0 auto; }
.event-thread-person .chat-person-avatar { width: 48px; height: 48px; border: 0; border-radius: 50%; color: #976052; background: #f6e8e1; }
.event-thread-person > span:last-child { min-width: 0; gap: 3px; }
.event-thread-person strong { color: var(--ink); font-size: 16px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.event-thread-person small { color: #675f56; font-size: 12px; line-height: 1.5; }
.event-chat-thread-view .event-thread-messages { gap: 12px; padding: 22px 0 20px; overscroll-behavior: contain; }
.conversation-context { display: flex; flex: 0 0 auto; justify-content: center; align-items: center; flex-wrap: wrap; gap: 7px; padding: 0 8px 8px; color: #756b60; font-size: 10px; line-height: 1.5; text-align: center; }
.conversation-context .chat-event { align-self: center; }
.conversation-advisory-intro { width: min(100%, 302px); margin: 3px auto 10px; padding: 15px 15px 14px; border: 1px solid rgba(44, 91, 73, .14); border-radius: 20px; background: #fbfdfb; box-shadow: 0 10px 28px rgba(41, 65, 54, .07); animation: advisoryIntroIn .52s cubic-bezier(.22,1,.36,1) both; }
.advisory-intro-heading { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid rgba(44, 91, 73, .1); }
.advisory-intro-mark { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 10px; color: #fff; background: #2f6d59; font-size: 12px; font-weight: 700; letter-spacing: -.03em; }
.advisory-intro-heading > span:last-child { display: grid; gap: 1px; min-width: 0; }
.advisory-intro-heading strong { color: #183a2e; font-size: 12px; font-weight: 700; line-height: 1.3; }
.advisory-intro-heading small { color: #6f8578; font-size: 8px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; }
.advisory-intro-people { display: flex; align-items: center; gap: 7px; padding: 13px 0 11px; }
.advisory-intro-person { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: #222825; font-size: 10px; font-weight: 650; }
.advisory-intro-person strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.advisory-intro-avatar { width: 25px; height: 25px; flex: 0 0 25px; border: 0; border-radius: 50%; font-size: 8px; }
.advisory-intro-avatar .person-initials { font-size: 8px; }
.advisory-intro-avatar img { border-radius: inherit; }
.advisory-intro-connector { flex: 0 0 auto; color: #5b806d; font-size: 15px; line-height: 1; }
.conversation-advisory-intro h3 { margin: 0 0 6px; color: #171d19; font-size: 15px; font-weight: 700; letter-spacing: -.025em; line-height: 1.25; }
.conversation-advisory-intro p { margin: 0; color: #4f5e55; font-size: 11px; line-height: 1.6; }
.advisory-intro-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.advisory-intro-tags span { padding: 5px 8px; border-radius: 999px; color: #2c6551; background: #edf5ef; font-size: 9px; font-weight: 650; line-height: 1; }
@keyframes advisoryIntroIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.conversation-welcome { margin: auto 0; padding: 22px 24px; text-align: center; }
.conversation-welcome p { margin: 0 0 8px; font-size: 17px; font-weight: 600; line-height: 1.4; letter-spacing: -.025em; color: var(--ink); }
.conversation-welcome small { display: block; max-width: 245px; margin: 0 auto; font-size: 12px; line-height: 1.65; color: #756b60; }
.conversation-day { align-self: center; margin: 5px 0 6px; color: #7d7368; font-size: 10px; line-height: 1.5; }
.conversation-message { display: flex; flex: 0 0 auto; flex-direction: column; gap: 4px; max-width: 84%; min-width: 0; }
.conversation-message.is-outgoing { align-self: flex-end; align-items: flex-end; }
.conversation-message.is-incoming { align-self: flex-start; align-items: flex-start; }
.event-thread-messages .chat-bubble { max-width: 100%; min-width: 0; margin: 0; padding: 12px 15px; border: 1px solid transparent; border-radius: 18px; color: #322a26; font-size: 14px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal; box-shadow: none; }
.event-thread-messages .bubble-accent { border-bottom-right-radius: 6px; color: #fff; background: #006eff; }
.event-thread-messages .bubble-soft { border-bottom-left-radius: 6px; border-color: rgba(41,38,36,.065); background: var(--white); }
.conversation-message time { padding: 0 4px; color: #81766b; font-size: 9px; line-height: 1.4; }
.event-chat-thread-view .event-thread-composer { position: relative; flex: 0 0 auto; align-items: flex-end; gap: 8px; width: 100%; min-height: 56px; height: auto; margin: 0; padding: 6px 7px 6px 15px; border: 1px solid rgba(41,38,36,.14); border-radius: 22px; background: #fff; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transition: border-color .24s ease; }
.event-chat-thread-view .event-thread-composer:focus-within { border-color: rgba(41,38,36,.3); box-shadow: none; }
.event-thread-composer textarea { display: block; flex: 1; min-width: 0; min-height: 40px; max-height: 112px; height: 40px; margin: 0; padding: 8px 0; resize: none; border: 0; outline: 0; color: #292624; background: transparent; font: inherit; font-size: 16px; line-height: 24px; scrollbar-width: thin; }
.event-thread-composer textarea::placeholder { color: #8b8278; }
.event-chat-thread-view .event-thread-composer button { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; color: white; background: var(--accent-dark); transition: background .22s ease, color .22s ease, transform .22s ease; }
.event-thread-composer button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.event-chat-thread-view .event-thread-composer button:disabled { color: #a99d91; background: #f2ede7; cursor: default; }
.event-chat-thread-view .event-thread-composer button:active:not(:disabled) { transform: scale(.95); }
.conversation-message.is-new-message { animation: conversationMessageIn .38s cubic-bezier(.22,1,.36,1) both; }
@keyframes conversationMessageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.phone-app.is-dark-theme .chat-event { color: #d3c4b5; border-color: rgba(255,255,255,.08); background: #332e28; }
.phone-app.is-dark-theme .chat-event svg { stroke: #d6a18c; }
.phone-app.is-dark-theme .event-thread-person { border-color: rgba(255,255,255,.08); }
.phone-app.is-dark-theme .event-thread-person small, .phone-app.is-dark-theme #eventChatList .chat-role,
.phone-app.is-dark-theme .conversation-context, .phone-app.is-dark-theme .conversation-welcome small,
.phone-app.is-dark-theme .conversation-day, .phone-app.is-dark-theme .conversation-message time { color: #bdb2a7; }
.phone-app.is-dark-theme .event-thread-bar .chat-private { color: #a6bba9; }
.phone-app.is-dark-theme .event-thread-bar .screen-label { color: #bdb2a7; }
.phone-app.is-dark-theme .event-thread-messages .bubble-accent { color: #fff; background: #006eff; }
.phone-app.is-dark-theme .event-thread-messages .bubble-soft { color: #f5eee4; border-color: rgba(255,255,255,.08); background: #302b26; }
.phone-app.is-dark-theme .conversation-advisory-intro { border-color: rgba(150, 205, 176, .18); background: #26352e; box-shadow: none; }
.phone-app.is-dark-theme .advisory-intro-heading { border-color: rgba(150, 205, 176, .15); }
.phone-app.is-dark-theme .advisory-intro-heading strong, .phone-app.is-dark-theme .conversation-advisory-intro h3, .phone-app.is-dark-theme .advisory-intro-person { color: #f4faf5; }
.phone-app.is-dark-theme .advisory-intro-heading small, .phone-app.is-dark-theme .conversation-advisory-intro p { color: #b7cbbd; }
.phone-app.is-dark-theme .advisory-intro-tags span { color: #d6efde; background: #315441; }
.phone-app.is-dark-theme .event-thread-composer { background: var(--white); border-color: rgba(255,255,255,.14); }
.phone-app.is-dark-theme .event-thread-composer:focus-within { border-color: rgba(255,255,255,.3); }
.phone-app.is-dark-theme .event-thread-composer textarea { color: #f7f2e9; }
.phone-app.is-dark-theme .event-thread-composer button:disabled { color: #a89b8d; background: #3c352e; }

/* Tinder-style conversation bubbles: compact, flat, and shaped at the speaking edge. */
.event-thread-messages { gap: 9px; }
.event-thread-messages .conversation-message { max-width: 80%; }
.event-thread-messages .chat-bubble,
.chat-thread .chat-bubble,
.event-chat-thread .chat-bubble {
  max-width: 100%;
  padding: 10px 14px 11px;
  border: 0;
  border-radius: 18px;
  color: #17191c;
  background: #f1f3f5;
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: -.006em;
  box-shadow: none;
}
.event-thread-messages .bubble-accent,
.chat-thread .bubble-accent,
.event-chat-thread .bubble-accent {
  border-radius: 18px 18px 4px 18px;
  color: #fff;
  background: #006eff;
}
.event-thread-messages .bubble-soft,
.chat-thread .bubble-soft,
.event-chat-thread .bubble-soft {
  border-radius: 18px 18px 18px 4px;
  color: #17191c;
  background: #f1f3f5;
}
.phone-app.is-dark-theme .event-thread-messages .bubble-soft,
.phone-app.is-dark-theme .chat-thread .bubble-soft,
.phone-app.is-dark-theme .event-chat-thread .bubble-soft {
  color: #f7f8fa;
  background: #30343a;
}

/* Chat navigation is a pure opacity fade: no lift, slide, or bounce. */
.chat-screen,
.phone-app.chat-open .chat-screen,
.event-chat-thread-view,
.event-chat-thread-view.is-visible {
  transform: none !important;
  transition: opacity .48s ease !important;
}
.phone-app:not(.event-open) .chat-screen:not([hidden]) {
  transform: none !important;
  transition: opacity .48s ease !important;
}

/* Keep a real rendered frame on both sides of the chat route transition. */
.event-chat-thread-view.is-chat-fade-in {
  animation: chatRouteFadeIn .52s ease both;
}
.event-chat-thread-view.is-chat-fade-out {
  animation: chatRouteFadeOut .52s ease both;
  pointer-events: none;
}
.event-screen.is-chat-returning {
  animation: chatRouteFadeOut .52s ease both;
  pointer-events: none;
}
.event-chat-panel.is-chat-fade-in {
  animation: chatRouteFadeIn .52s ease both;
}
@keyframes chatRouteFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes chatRouteFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .event-chat-thread-view.is-chat-fade-in,
  .event-chat-thread-view.is-chat-fade-out,
  .event-screen.is-chat-returning,
  .event-chat-panel.is-chat-fade-in { animation: none; }
}
@media (max-width: 350px) {
  .event-screen.chat-thread-open { padding-right: 16px; padding-left: 16px; }
  .event-thread-bar .screen-label { font-size: 8px; }
  .conversation-message { max-width: 88%; }
}
@media (prefers-reduced-motion: reduce) {
  .conversation-message.is-new-message { animation: none; }
  .conversation-advisory-intro { animation: none; }
  .event-thread-composer, .event-thread-composer button { transition: none !important; }
}

/* Shared route motion: a held crossfade keeps back navigation and the room reveal from snapping. */
.phone-app.event-route-leaving .home-screen {
  opacity: 1 !important;
  pointer-events: auto !important;
  transform: none !important;
}
.phone-app.event-route-leaving .event-screen {
  opacity: 0 !important;
  pointer-events: none !important;
  transform: none !important;
}
.phone-app.event-route-leaving .home-screen,
.phone-app.event-route-leaving .event-screen {
  transition: opacity .52s cubic-bezier(.22,1,.36,1) !important;
}
.waiting-state {
  transition: opacity .5s cubic-bezier(.22,1,.36,1) !important;
}
.waiting-state.is-leaving {
  opacity: 0;
  pointer-events: none;
}
.matches-view {
  opacity: 0;
  pointer-events: none;
  transition: opacity .62s cubic-bezier(.22,1,.36,1) !important;
}
.matches-view.is-entering {
  opacity: 1;
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .phone-app.event-route-leaving .home-screen,
  .phone-app.event-route-leaving .event-screen,
  .waiting-state,
  .matches-view { transition: none !important; }
}

/* Matched profiles keep the conversation and LinkedIn as separate actions. */
#chatScreen .chat-row, #eventChatList .event-chat-row { position: relative; grid-template-columns: 44px minmax(0,1fr); padding: 15px; }
.chat-row-heading { display: flex; align-items: center; gap: 8px; min-height: 32px; margin-top: -3px; }
.chat-open { display: block; flex: 1; min-width: 0; margin: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.chat-open::after { content: ''; position: absolute; z-index: 1; inset: 0; border-radius: 20px; }
.chat-open:focus-visible { outline: none; }
.chat-open:focus-visible::after { outline: 2px solid var(--accent-dark); outline-offset: 3px; }
.chat-row-footer { display: flex; align-items: center; gap: 8px; min-width: 0; margin-top: 12px; }
#chatScreen .chat-row-footer .chat-event, #eventChatList .chat-row-footer .chat-event { align-self: center; margin-top: 0; }
#chatScreen .chat-row-arrow, #eventChatList .chat-row-arrow { align-self: start; margin-top: 5px; }
.chat-linkedin { position: relative; z-index: 2; display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; margin: -6px -6px -6px 0; padding: 0; border: 0; border-radius: 12px; color: #0a66c2; background: transparent; text-decoration: none; }
.chat-linkedin-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid rgba(10,102,194,.14); border-radius: 10px; background: #f6f9fc; transition: background .22s ease, border-color .22s ease; }
.chat-linkedin svg { display: block; width: 18px; height: 18px; }
.chat-linkedin:active .chat-linkedin-mark { border-color: rgba(10,102,194,.25); background: #eaf2fa; }
.chat-linkedin:focus-visible { outline: 2px solid #0a66c2; outline-offset: -3px; }
.chat-company-context { color: inherit; }
.chat-company { color: #a84f45; font-weight: 600; }
.chat-event { flex: 0 1 auto; min-width: 0; gap: 7px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.chat-event .chat-event-logo { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; overflow: visible; }
.chat-event .discover-host-mark { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 8px; }
.phone-app .chat-event .discover-host-mark svg { width: 17px; height: 17px; stroke: none; }
.phone-app .chat-event .discover-host-stripe .discover-host-mark svg { width: 22px; height: auto; }
.chat-event .chat-event-name { color: #171412; font-weight: 500; line-height: 1.5; }
.chat-event .chat-event-initial { border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--white); font-size: 11px; font-weight: 600; }
.chat-event .chat-event-advisory { border: 0; border-radius: 8px; color: #fff; background: #306b5d; font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif; font-size: 18px; font-weight: 400; line-height: 1; }
.phone-app.is-dark-theme .chat-event { border: 0; background: transparent; }
.phone-app.is-dark-theme .chat-event .chat-event-name { color: #f7f2e9; }
.phone-app.is-dark-theme .chat-linkedin { color: #88b7e0; }
.phone-app.is-dark-theme .chat-linkedin-mark { border-color: rgba(136,183,224,.18); background: #29343d; }
.phone-app.is-dark-theme .chat-linkedin:active .chat-linkedin-mark { border-color: rgba(136,183,224,.3); background: #303f4c; }
.phone-app.is-dark-theme .chat-company { color: #e5a397; }
@media (hover: hover) {
  .chat-linkedin:hover .chat-linkedin-mark { border-color: rgba(10,102,194,.25); background: #eaf2fa; }
  .phone-app.is-dark-theme .chat-linkedin:hover .chat-linkedin-mark { border-color: rgba(136,183,224,.3); background: #303f4c; }
}
@media (max-width: 350px) {
  #chatScreen .chat-row, #eventChatList .event-chat-row { grid-template-columns: 38px minmax(0,1fr); gap: 10px; padding: 13px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-launch, .chat-linkedin-mark, .settings-page-content, .timezone-page-content, .detail-page-content { transition: none; }
}
/* Workspace-fed listings keep the existing Discover layout. */
.discover-art-photo{position:relative;overflow:hidden;background:#f5f3f0}
.discover-art-photo>img{width:100%;height:100%;object-fit:cover;display:block}
.discover-art-photo .discover-date{background:rgba(255,255,255,.94);border-radius:12px;padding:8px 10px;color:#171717}
.discover-art-networking{background:#faefeb;color:#db6c63}
.discover-host-uploaded .discover-host-mark{background:#fff;padding:0;overflow:hidden}
/* Shared logo fit for event cards, listings, details, chat and countdown.
   Keep the existing frame dimensions; inset only the uploaded artwork. */
.discover-host-mark>img{display:block;width:84%;height:84%;object-fit:contain;border-radius:0}
.discover-host-initials .discover-host-mark{background:#f5efeb;color:#171717;font-weight:600}
.discover-empty{grid-column:1/-1;padding:60px 24px;text-align:center;color:#191919}
.discover-empty strong{font-size:20px;font-weight:600;letter-spacing:-.45px}
.discover-empty p{font-size:14px;line-height:1.6;color:#68635f;margin:10px auto 0;max-width:270px}
.discover-empty button{margin-top:20px;padding:10px 18px;border-radius:20px;background:#fff;border:1px solid #e8e3df;color:inherit;font:inherit;cursor:pointer}
.event-code-error{color:#b34842;font-size:13px;line-height:1.5;margin:10px 0 0}
/* Saved events use the organisation's identity and the saved event artwork. */
.joined-event-status { padding: 28px 27px; font-size: 13px; color: var(--muted, #6e6864); }
.joined-event-status p { margin: 0 0 12px; }
.joined-event-status button { font: inherit; font-weight: 600; border: 1px solid #e8e3df; border-radius: 12px; padding: 10px 16px; background: #fff; color: #171717; cursor: pointer; }
.discover-filters { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.discover-filters::-webkit-scrollbar { display: none; }
.discover-filters button { flex-shrink: 0; white-space: nowrap; }
.discover-art-networking, .discover-art-business, .discover-art-careers, .discover-art-science { background: #f3e8e4; color: #b56d62; }

/* The demo's Events screen, populated by the joined-events workspace API. */
.phone-app {
  --home-top: calc(5cqw + env(safe-area-inset-top));
  --home-surface: #fbfaf7;
  --home-card: #fff;
  --home-ink: #20201e;
  --home-secondary: #76756e;
  --home-line: #e5e5e6;
  --home-teal: #306b5d;
}
.phone-app:has(#homeScreen:not([hidden])):not(.event-open) { background: var(--home-surface); }
/* Every main tab shares the current wordmark and safe-area alignment. */
.phone-app:not(.event-open) .app-header {
  height: calc(var(--home-top) + 11cqw);
  padding: var(--home-top) 6cqw 0;
}
.phone-app:not(.event-open) .wordmark {
  color: var(--home-ink);
  font-family: var(--app-sans);
  font-size: 5.7cqw;
  font-weight: 500;
  letter-spacing: .12em;
  line-height: 1.15;
  text-transform: uppercase;
}
.phone-app:not(.event-open) .wordmark .wordmark-text { color: inherit; }
.phone-app:not(.event-open) .app-header .profile-button {
  width: 9cqw;
  height: 9cqw;
  border-color: #e7e5df;
  background-color: #f0eeea;
  color: var(--home-ink);
  font-size: 3.2cqw;
  font-weight: 600;
  letter-spacing: -.02em;
}
.phone-app:not(.event-open) .account-menu { top: calc(var(--home-top) + 12cqw); }
.phone-app:not(.event-open) .discover-header-back { top: var(--home-top); left: 5cqw; min-height: 11cqw; }
.phone-app:has(#homeScreen:not([hidden])):not(.event-open) .bottom-nav-shield {
  height: calc(64px + max(16px, env(safe-area-inset-bottom)));
  border: 0;
  background: #fff;
  box-shadow: none;
}
#homeScreen {
  position: absolute;
  inset: calc(var(--home-top) + 11cqw) 0 calc(18cqw + max(7cqw, env(safe-area-inset-bottom)));
  min-height: 0;
  padding: 5.5cqw 6cqw 4cqw;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior-y: contain;
  scrollbar-width: none;
  color: var(--home-ink);
  background: var(--home-surface);
}
#homeScreen::-webkit-scrollbar { display: none; }
.home-heading { margin: 0; }
.home-eyebrow {
  margin: 0;
  color: var(--home-secondary);
  font-size: 2.55cqw;
  font-weight: 550;
  line-height: 1.5;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.home-heading h1 {
  margin: 0;
  color: var(--home-ink);
  font-size: 7.2cqw;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -.05em;
}
.home-intro { margin: 2cqw 0 0; color: var(--home-secondary); font-size: 3.55cqw; line-height: 1.5; }
#homeScreen .event-list { padding: 5.5cqw 0 0; }
.home-accessible-count { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* A quiet empty state. Joining by code remains in the shared toolbar. */
#homeScroll:has(.home-empty:not([hidden])) { display: flex; flex-direction: column; }
.home-empty { flex: 1 0 auto; display: grid; align-content: center; justify-items: center; gap: 18px; padding: 24px 8px 40px; text-align: center; }
.home-empty h2 { margin: 0; color: var(--home-ink); font-size: 20px; font-weight: 400; letter-spacing: -.025em; line-height: 1.4; }
.home-empty-explore { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; max-width: 100%; padding: 10px 17px 10px 20px; border: 1px solid var(--home-line); border-radius: 999px; color: var(--home-ink); background: transparent; font: inherit; font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: -.01em; touch-action: manipulation; -webkit-tap-highlight-color: transparent; transition: background-color 180ms ease, border-color 180ms ease; }
.home-empty-explore:active { border-color: color-mix(in srgb, var(--home-ink) 22%, transparent); background: color-mix(in srgb, var(--home-ink) 5%, transparent); }
.home-empty-explore svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.home-empty-explore:focus-visible { outline: 2px solid var(--home-teal); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .home-empty-explore { transition: none; } }
#homeScreen .joined-event-status { padding: 10cqw 0; color: var(--home-secondary); font-size: 3.5cqw; line-height: 1.5; }
@media (min-width: 700px) {
  .phone-app { --home-top: 17cqw; }
}
.phone-app.is-dark-theme { --home-surface: #1e1c1a; --home-card: #2a2723; --home-ink: #f7f2e9; --home-secondary: #b4b4aa; --home-line: #403d37; --home-teal: #a4c8b5; }
.is-dark-theme .home-events-note { color: var(--home-secondary); }
@media (prefers-reduced-motion: reduce) {
  .joined-event-card { transition: none; }
}

/* Event covers use a quiet editorial surface instead of a flat colour block. */
#discoverBrowse .discover-art,
.discover-detail > .discover-art {
  background:
    radial-gradient(circle at 82% 20%, #315d4b34 0 1px, transparent 1.8px) 0 0 / 16px 16px,
    radial-gradient(80% 140% at 100% -20%, #c8dace 0%, transparent 56%),
    linear-gradient(135deg, #faf8f2 0%, #e8f0e9 58%, #dce8df 100%);
  color: #315d4b;
}
#discoverBrowse .discover-art::before,
.discover-detail > .discover-art::before {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(120deg, transparent 0 55%, #315d4b18 55.2% 55.5%, transparent 55.8%), radial-gradient(circle at 74% 25%, #315d4b16 0 1px, transparent 1.8px);
  background-size: auto, 16px 16px;
  pointer-events: none;
}
#discoverBrowse .discover-art > svg,
.discover-detail > .discover-art > svg { opacity: .7; }
#discoverBrowse .discover-date,
.discover-detail > .discover-art .discover-date { color: #20382c; background: #f8f6f0ed; border-color: #ffffffa8; }

/* Discover uses the current app palette while retaining its browsing layout. */
.phone-app:has(#discoverScreen:not([hidden])) {
  --cream: var(--home-surface);
  --white: var(--home-card);
  --ink: var(--home-ink);
  --muted: #69736b;
  --accent: var(--home-teal);
  --accent-dark: #245447;
  background: var(--home-surface);
}
#discoverBrowse { --discover-copy: #677168; --discover-soft: #edf2ed; --discover-edge: #dfe5df; }
#discoverBrowse .discover-eyebrow,
#discoverBrowse .discover-collection-head > span,
#discoverBrowse .discover-footer,
#discoverBrowse .discover-host-copy small { color: var(--discover-copy); }
#discoverBrowse .discover-filter { color: var(--discover-copy); border-color: var(--discover-edge); }
#discoverBrowse .discover-filter-indicator { background: #306b5d; }
#discoverBrowse .discover-filter.is-selected { color: #fffefa; border-color: transparent; }
#discoverBrowse .discovery-card { border-color: var(--home-line); background: var(--home-card); }
#discoverBrowse .discover-art-technology { color: #527260; background: #e0eae2; }
#discoverBrowse .discover-art-design { color: #6a7867; background: #e9ede5; }
#discoverBrowse :is(.discover-art-networking, .discover-art-business, .discover-art-careers, .discover-art-science) { color: #5b7769; background: #e5ece6; }
#discoverBrowse .discover-date { color: #263c31; border-color: #ffffffb3; background: #fffefaed; }
#discoverBrowse .discovery-card-time svg,
#discoverBrowse .discovery-card-place svg { color: var(--home-teal); }
#discoverBrowse .discovery-card-arrow { color: var(--home-teal); background: var(--discover-soft); }
#discoverBrowse .discover-host-initials .discover-host-mark { color: var(--home-teal); background: var(--discover-soft); border-color: var(--discover-edge); }
@media (hover: hover) {
  #discoverBrowse .discover-filter:not(.is-selected):hover { color: var(--home-teal); border-color: #9db8a7; }
  #discoverBrowse .discovery-card:hover { border-color: #b7c9bc; box-shadow: 0 6px 20px #243c2d0a; }
  #discoverBrowse .discovery-card:hover .discovery-card-arrow { color: #245447; background: #dde9df; }
}
.phone-app.is-dark-theme:has(#discoverScreen:not([hidden])) { --muted: var(--home-secondary); --accent-dark: #bed8c9; }
.phone-app.is-dark-theme #discoverBrowse { --discover-copy: #bbc3bb; --discover-soft: #2c3830; --discover-edge: #425347; }
.phone-app.is-dark-theme #discoverBrowse .discover-art-technology { color: #a6c5b0; background: #293d31; }
.phone-app.is-dark-theme #discoverBrowse .discover-art-design { color: #bdc8ac; background: #343e31; }
.phone-app.is-dark-theme #discoverBrowse :is(.discover-art-networking, .discover-art-business, .discover-art-careers, .discover-art-science) { color: #aac4b4; background: #2d3c33; }
.phone-app.is-dark-theme #discoverBrowse .discover-filter-indicator { background: #a4c8b5; }
.phone-app.is-dark-theme #discoverBrowse .discover-filter.is-selected { color: #1e2c24; }

/* Profile photo menu follows the current bright glass account language. */
.account-menu {
  --account-surface: linear-gradient(145deg, #ffffffe8, #ffffffb8 58%, #f7fafbd9);
  --account-ink: #20282f;
  --account-muted: #66727b;
  --account-line: #ffffffc9;
  --account-hover: #ffffff8f;
  width: min(260px, calc(100% - 28px));
  padding: 9px;
  border: 1px solid var(--account-line);
  border-radius: 22px;
  color: var(--account-ink);
  background: var(--account-surface);
  box-shadow: 0 24px 64px #15242d26, inset 0 1px 0 #ffffffe0;
  backdrop-filter: blur(20px) saturate(1.06);
  -webkit-backdrop-filter: blur(20px) saturate(1.06);
  transform: translateY(-8px) scale(.97);
  opacity: 0;
  transition: transform 220ms cubic-bezier(.22,1,.36,1), opacity 180ms ease;
}
.account-menu-backdrop.is-open .account-menu { transform: translateY(0) scale(1); opacity: 1; animation: none; }
.account-menu-heading { gap: 12px; padding: 11px 11px 14px; border-bottom-color: #ffffffa8; }
.account-menu-avatar { flex-basis: 42px; width: 42px; height: 42px; border: 1px solid #ffffffd4; border-radius: 50%; color: var(--account-ink); background: #ffffff82; box-shadow: inset 0 1px 0 #ffffffa8; font-size: 12px; font-weight: 400; }
.account-menu-heading strong { color: var(--account-ink); font-size: 15px; font-weight: 400; letter-spacing: -.025em; }
.account-menu-heading p { margin-top: 3px; color: var(--account-muted); font-size: 11px; font-weight: 400; }
.account-menu-links { gap: 2px; padding-top: 7px; }
.account-menu-item { min-height: 48px; gap: 12px; padding: 12px 11px; border-radius: 13px; color: var(--account-ink); transition: background-color 180ms ease, transform 180ms ease; }
.account-menu-item:active { background: var(--account-hover); transform: scale(.985); }
@media (hover: hover) { .account-menu-item:hover { background: var(--account-hover); transform: translateX(1px); } }
.account-menu-icon { width: 22px; height: 22px; border-radius: 0; color: #335f88; background: transparent; }
.account-menu-icon svg { width: 21px; height: 21px; stroke-width: 1.5; }
.account-menu-item strong { color: var(--account-ink); font-size: 14px; font-weight: 400; }
.account-menu-arrow { color: var(--account-muted); }
.phone-app.is-dark-theme .account-menu { --account-surface: linear-gradient(145deg, #3a4248e8, #30383ed9 60%, #283036e8); --account-ink: #eef2f5; --account-muted: #b2bec6; --account-line: #ffffff2e; --account-hover: #ffffff12; box-shadow: 0 24px 64px #00000052, inset 0 1px 0 #ffffff20; }
.phone-app.is-dark-theme .account-menu-heading { border-bottom-color: #ffffff20; }
.phone-app.is-dark-theme .account-menu-avatar { border-color: #ffffff30; background: #ffffff12; box-shadow: inset 0 1px 0 #ffffff18; }
.phone-app.is-dark-theme .account-menu-icon { color: #a9cbea; }
@media (prefers-reduced-transparency: reduce) {
  .account-menu { background: #f7fafb; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .phone-app.is-dark-theme .account-menu { background: #30383e; }
}
@media (prefers-reduced-motion: reduce) {
  .account-menu { transition: none; }
}
