@font-face {
  font-family: Golos; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('./fonts/golos-text-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Golos; font-style: normal; font-weight: 400 900; font-display: swap;
  src: url('./fonts/golos-text-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --paper: #fff; --white: #fff; --ink: #111; --muted: #6e6e6e; --line: #dedede;
  --blue: #773aa0; --blue-dark: #5c267f; --blue-wash: #f3edf7; --orange: #dc9356;
  --green: #37734e; --green-wash: #f0f7f1; --radius: 10px;
  --font: Golos, Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button { border: 0; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: 3px solid #773aa0; outline-offset: 4px; }
button svg { flex-shrink: 0; }
svg { display: block; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; }
[hidden] { display: none !important; }
::selection { background: #f53224; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.muted { color: var(--muted); }
.pre-line { white-space: pre-line; }
.eyebrow { font-size: 12px; line-height: 1.5; color: var(--muted); }
.dot { display: inline-block; width: 5px; height: 5px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.skip-link { position: fixed; z-index: 100; top: -80px; left: 20px; padding: 12px 18px; background: var(--ink); color: white; border-radius: 10px; }
.skip-link:focus { top: 12px; }
.boot-screen { min-height: 100svh; display: grid; place-content: center; justify-items: center; gap: 20px; color: var(--muted); }
.brand-mark { display: inline-grid; place-items: center; position: relative; width: 40px; height: 40px; background: var(--blue-wash); color: var(--blue); border-radius: 12px; font-size: 21px; font-weight: 750; letter-spacing: -2px; }
.brand-mark > span { display: none; }
.noscript { padding: 24px; text-align: center; background: #fff5e7; }

/* Shared controls. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 30px; font-size: 15px; line-height: 1.4; font-weight: 650; text-decoration: none; transition: background .15s, transform .15s; }
.btn-primary { background: #111; color: white; border-color: #111; }
.btn-primary:hover:not(:disabled) { background: #303030; border-color: #303030; }
.btn:disabled { background: #e8e8e8; border-color: #e8e8e8; color: #787878; }
.btn:active:not(:disabled) { transform: scale(.985); }
.btn-white { background: white; color: var(--blue); }
.btn-soft { background: var(--blue-wash); color: var(--blue); }
.btn-soft:hover:not(:disabled) { background: #e7edff; }
.btn-neutral { background: #f3f4f6; color: var(--ink); }
.btn-line { border: 1px solid var(--line); background: white; }
.btn-line:hover:not(:disabled), .btn-neutral:hover:not(:disabled) { background: #eeeef3; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: transparent; }
.icon-btn:hover { background: #f3f4f7; }
.text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 10px 0; background: transparent; color: var(--muted); font-size: 14px; line-height: 1.5; font-weight: 500; text-decoration: none; }
.text-link:hover { color: var(--blue); }
.field-label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; }
.input { display: block; min-width: 0; width: 100%; min-height: 52px; padding: 13px 17px; border: 1px solid #111; border-radius: 28px; background: white; color: var(--ink); font-size: 16px; }
.input::placeholder { color: var(--muted); }
.input:focus { border-color: #773aa0; }
.form-error, .image-error { margin-top: 12px; font-size: 13px; line-height: 1.5; color: #aa3c44; overflow-wrap: anywhere; }
.form-note { color: var(--muted); font-size: 13px; line-height: 1.6; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 7px; font-size: 11px; line-height: 1.4; font-weight: 600; }
.pill-blue { color: var(--blue); background: var(--blue-wash); }
.pill-green { color: var(--green); background: var(--green-wash); }
.pill-orange { color: #9b672f; background: #fff6e8; }
.pill-muted { color: var(--muted); background: #f3f4f6; }
.avatar { display: inline-grid; place-items: center; flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%; color: #5c5964; font-size: 11px; line-height: 1; font-weight: 650; background: #edecf2; }
.avatar-color-0 { background: #f0e9e2; }
.avatar-color-1 { background: #e9ede2; }
.avatar-color-2 { background: #e5ebf5; }
.avatar-color-3 { background: #f2eee0; }
.avatar-color-4 { background: #eee6f0; }
.avatar-color-5 { background: #e4eeea; }

/* Navigation stays above the card, leaving the puzzle as the main event. */
.quest-shell { min-height: 100svh; }
.quest-shell.intro-shell { padding-top: 0; }
.intro-shell .quest-main { padding: 0; }
.current-view.view-invitation { max-width: none; }
.quest-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: min(100%, 684px); min-height: 80px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 26px 15px; }
.quest-nav { display: flex; align-items: center; gap: 5px; min-width: 0; }
.nav-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; padding: 10px 12px; border-radius: 24px; color: var(--muted); background: transparent; font-size: 13px; font-weight: 550; white-space: nowrap; }
.nav-button svg { width: 17px; height: 17px; }
.nav-button:hover { color: var(--ink); background: #f5f5f5; }
.nav-button[aria-current="page"] { color: var(--ink); background: #f0f0ee; }
.nav-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; color: #fff; background: #773aa0; font-size: 10px; line-height: 1; font-weight: 650; }
.account-menu { position: relative; flex-shrink: 0; }
.account-menu > summary { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px; cursor: pointer; list-style: none; border-radius: 24px; }
.account-menu > summary::-webkit-details-marker { display: none; }
.profile-name { display: none; max-width: 120px; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 500; white-space: nowrap; }
.profile-role { display: none; }
.account-panel { position: absolute; z-index: 15; top: calc(100% + 8px); right: 0; display: grid; gap: 3px; width: 230px; max-width: calc(100vw - 48px); padding: 8px; border: 1px solid #111; border-radius: 12px; background: white; box-shadow: 3px 4px 0 #f0e5f5; }
.account-panel button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 46px; padding: 11px 12px; border-radius: 7px; background: transparent; color: var(--ink); font-size: 14px; text-align: left; }
.account-panel button:hover, .account-panel button[aria-current="page"] { background: #f5f0f8; }
.account-panel #logout-button { margin-top: 4px; color: var(--muted); }
.connection { display: none; }
.connection.offline { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px 24px; color: #946023; font-size: 12px; text-align: center; }
.demo-label { display: block; width: fit-content; max-width: calc(100% - 48px); margin: 0 auto 20px; color: var(--muted); font-size: 11px; text-align: center; }
.demo-label svg { display: none; }
.quest-main { width: 100%; min-width: 0; padding: 0 26px max(30px, env(safe-area-inset-bottom)); }
.current-view { width: 100%; max-width: 620px; min-width: 0; margin: 0 auto; }
.current-view.view-admin { max-width: 1120px; padding-top: 26px; }

/* The login and question use the same paper card and one primary action. */
.login-main { width: min(calc(100% - 52px), 620px); min-height: 100svh; margin: 0 auto; padding: max(30px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 30px; }
.login-composer, .task-card { --accent: #f53224; position: relative; isolation: isolate; border: 1px solid #111; border-radius: 10px; background: #fff; }
.login-composer::before, .task-card::before { content: ''; position: absolute; z-index: -2; inset: -1px; border: 1px solid #111; border-radius: inherit; background: var(--accent); transform: rotate(-2.5deg); }
.login-composer::after, .task-card::after { content: ''; position: absolute; z-index: -1; inset: -1px; border: 1px solid #111; border-radius: inherit; background: #fff; }
.login-composer { display: flex; flex: 1; flex-direction: column; justify-content: center; min-height: 470px; padding: 28px 22px; }
.login-heading { margin: auto -4px; padding: 48px 0 52px; text-align: center; }
.login-heading h1 { font-size: clamp(29px, 8.8vw, 38px); line-height: 1.08; font-weight: 800; letter-spacing: -.045em; }
.login-heading h1 span { display: block; }
.login-heading h1 span:last-child { color: #e72c20; }
.login-field { margin-top: auto; }
.login-field:has(.form-error[hidden]) { display: none; }
.login-composer .login-input { min-height: 54px; padding: 13px 16px; font-size: 16px; }
.login-actions { display: flex; flex-direction: column; }
.login-actions .btn { width: 100%; min-height: 54px; font-size: 16px; font-weight: 700; }
/* Ordinary invitation actions keep their color through touch, hover and focus.
   HOLD and SLINGSHOT retain their separate feedback and disabled appearance. */
.login-main { --invitation-action: #df2a1e; --invitation-disabled: #e7e2df; --invitation-disabled-border: #8f8781; --invitation-disabled-ink: #59514b; }
.login-main:where(:not([data-interaction='hold'], [data-interaction='launch'])) .login-actions :is(.btn-primary, .invitation-color) { background: var(--invitation-action); border-color: var(--invitation-action); color: #fff; }
.login-main:where(:not([data-interaction='hold'], [data-interaction='launch'])) .login-actions :is(.btn-primary, .invitation-color):disabled,
.login-main .surprise-found-get:disabled { background: var(--invitation-disabled); border-color: var(--invitation-disabled-border); color: var(--invitation-disabled-ink); opacity: 1; }

.focus-stage { --accent: #773aa0; padding-top: 20px; }
.focus-stage[data-kind="shared"] { --accent: #55bddd; }
.focus-stage[data-kind="age"] { --accent: #ffdc45; }
.focus-stage[data-kind="final"] { --accent: #efb2c1; }
.focus-stage[data-kind="waiting"] { --accent: #ffdc45; }
.focus-stage[data-status="solved"] { --accent: #ffdc45; }
.task-card { --accent: inherit; display: flex; flex-direction: column; min-height: 440px; padding: 28px 22px; }
.focus-stage[data-kind="shared"] .task-card::before, .focus-stage[data-kind="age"] .task-card::before { transform: rotate(2.5deg); }
.focus-eyebrow { margin-bottom: 26px; color: var(--muted); font-size: 12px; line-height: 1.5; text-align: center; }
.focus-heading, .focus-heading h1 { font-size: 27px; font-weight: 800; letter-spacing: -.035em; line-height: 1.13; overflow-wrap: anywhere; }
.focus-heading { margin-bottom: 24px; text-align: center; }
.focus-heading:focus { outline: none; }
.task-body { font-size: 16px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.task-image-wrap { margin-top: 24px; }
.task-image-wrap img { display: block; max-width: 100%; max-height: 600px; height: auto; object-fit: contain; border-radius: 7px; }
.task-clue { display: flex; align-items: flex-start; gap: 11px; padding: 2px 0 2px 14px; margin-top: 24px; border-left: 2px solid var(--accent, #773aa0); color: #5c5c5c; font-size: 15px; line-height: 1.6; white-space: pre-line; }
.task-clue > svg { color: var(--accent, #773aa0); flex-shrink: 0; margin-top: 4px; }
.answer-form { margin-top: auto; padding-top: 27px; }
.answer-composer { padding: 0; }
.composer-input { display: block; width: 100%; min-width: 0; min-height: 54px; padding: 13px 16px; border: 1px solid #111; border-radius: 30px; background: #fff; color: var(--ink); font-size: 16px; line-height: 1.5; }
.composer-input::placeholder { color: var(--muted); }
.composer-input[aria-invalid="true"], .login-input[aria-invalid="true"] { border-color: #ad2017; }
.answer-options { display: grid; gap: 10px; min-width: 0; margin: 0; padding: 0; border: 0; }
.answer-options legend { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.answer-option { position: relative; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 15px 16px; border: 1px solid #b6b6b6; border-radius: 10px; background: #fff; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: border-color .13s, background .13s; }
.answer-radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.answer-option::after { content: ''; width: 18px; height: 18px; margin-left: auto; flex-shrink: 0; border: 1px solid #9c9c9c; border-radius: 50%; background: #fff; }
.answer-option-label { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; font-size: 17px; line-height: 1.35; font-weight: 650; overflow-wrap: anywhere; }
.answer-option-number { color: #773aa0; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.answer-option:has(:checked) { border-color: #111; background: color-mix(in srgb, var(--accent, #773aa0) 13%, #fff); }
.answer-option:has(:checked)::after { border-color: #111; background: #111; box-shadow: inset 0 0 0 4px #fff; }
.answer-option:has(:focus-visible) { outline: 3px solid #773aa0; outline-offset: 3px; }
.answer-option:has(:disabled) { cursor: default; opacity: .65; }
.answer-note { color: var(--muted); font-size: 12px; line-height: 1.55; }
.answer-feedback { margin: 14px 3px 0; font-size: 14px; line-height: 1.55; }
.answer-feedback.error { color: #ad2017; }
.answer-feedback.success { color: var(--green); }
.task-controls { margin-top: 30px; }
.task-controls:empty { display: none; }
.task-controls > .btn, .task-controls .send-answer { width: 100%; min-height: 54px; font-size: 16px; font-weight: 700; }
.send-answer { display: inline-flex; align-items: center; justify-content: center; gap: 8px; flex-shrink: 0; }
.focus-actions { display: flex; align-items: flex-start; justify-content: center; gap: 0 24px; flex-wrap: wrap; margin: 10px 0 0; }
.focus-actions .text-link { font-size: 13px; text-align: center; }
.task-choices { position: relative; font-size: 13px; color: var(--muted); }
.task-choices > summary { display: flex; align-items: center; gap: 7px; width: fit-content; min-height: 44px; padding: 10px 0; cursor: pointer; list-style: none; }
.task-choices > summary::-webkit-details-marker { display: none; }
.task-choices > summary::after { content: '⌄'; position: relative; top: -2px; font-size: 14px; }
.task-choices[open] > summary, .task-choices > summary:hover { color: var(--ink); }
.choice-list { display: grid; gap: 3px; min-width: 220px; max-width: min(400px, calc(100vw - 56px)); padding: 7px; margin-top: 2px; border: 1px solid #111; border-radius: 10px; background: white; }
.choice-button { display: block; width: 100%; min-height: 44px; padding: 11px 12px; border-radius: 7px; background: transparent; color: var(--ink); text-align: left; font-size: 14px; line-height: 1.5; }
.choice-button:hover { background: #f5f0f8; }
.next-step { margin-top: 24px; }
.waiting-note { margin-top: 22px; color: var(--muted); font-size: 14px; line-height: 1.65; }
.waiting-copy { color: var(--muted); font-size: 16px; line-height: 1.65; white-space: pre-line; }
.waiting-stage .task-card { justify-content: center; }
.waiting-stage .waiting-copy { text-align: center; }
.solution-box { margin-top: 3px; padding: 20px; border: 1px solid #d7e4d9; border-radius: 10px; background: #f1f7f2; color: #36543d; }
.solution-box h2, .solution-box h3 { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; line-height: 1.4; letter-spacing: -.015em; }
.solution-box p { margin-top: 10px; font-size: 14px; line-height: 1.7; white-space: pre-line; }
.solution-box p.solution-reward { margin-top: 14px; color: #294631; font-weight: 550; }
.symbol-box { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 27px; padding: 8px 0 0; text-align: center; }
.symbol-value { flex-shrink: 0; color: #111; font-size: 100px; line-height: 1; font-weight: 850; letter-spacing: -.05em; }
.symbol-label { color: #111; font-size: 14px; line-height: 1.5; font-weight: 650; }
.symbol-note { max-width: 440px; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.6; }
/* Optional views stay a step away from the answer field. */
.view-history, .view-team, .view-chat { padding-top: 55px; }
.section-heading { margin-bottom: 32px; }
.section-heading h1 { font-size: 30px; font-weight: 800; }
.section-heading p { margin-top: 13px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.history-list { display: grid; }
.history-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 23px 0; border-bottom: 1px solid #eeeff3; }
.history-row:first-child { padding-top: 10px; }
.history-row h2 { font-size: 17px; font-weight: 550; letter-spacing: -.01em; }
.history-row p { margin-top: 7px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.history-row > .text-link { flex-shrink: 0; }
.member-list { display: grid; }
.member-row { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid #f0f1f4; }
.member-row > :nth-child(2) { flex: 1; min-width: 0; }
.member-row h2, .member-row h3, .member-row strong { font-size: 15px; line-height: 1.5; font-weight: 500; letter-spacing: 0; overflow-wrap: anywhere; }
.member-row .member-state, .member-row .member-status { color: var(--muted); font-size: 12px; }
.member-row .ready, .member-row .member-state.ready { color: var(--green); }
.member-state { display: flex; align-items: center; gap: 5px; }
.team-events { margin-top: 28px; color: var(--muted); }
.team-events > summary { width: fit-content; padding: 5px 0; font-size: 14px; cursor: pointer; }
.activity-list { display: grid; gap: 19px; margin-top: 35px; }
.activity-list h2 { margin-bottom: 5px; font-size: 20px; font-weight: 550; }
.activity-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 12px; color: #797d89; font-size: 14px; line-height: 1.6; }
.activity-item > svg { flex-shrink: 0; margin-top: 3px; color: #b0b7c8; }
.activity-item time { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

/* The team conversation has its own clearly labelled composer. */
.chat-shell { display: flex; flex-direction: column; min-width: 0; }
.chat-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.chat-top h2 { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 550; letter-spacing: -.01em; }
.chat-top h2 svg { color: var(--muted); }
.chat-top-note { color: var(--muted); font-size: 12px; }
.chat-messages { display: flex; flex-direction: column; gap: 24px; height: clamp(280px, 48svh, 520px); padding: 27px 4px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #d9dce5 transparent; }
.chat-empty { margin: auto; padding: 35px 15px; color: var(--muted); text-align: center; }
.chat-empty svg { margin: 0 auto 15px; color: #b0b9d2; }
.chat-empty h3 { color: #656b7b; font-size: 19px; font-weight: 500; }
.chat-empty p { margin-top: 12px; font-size: 14px; line-height: 1.75; }
.message-row { display: flex; align-items: flex-start; align-self: flex-start; gap: 10px; max-width: 88%; }
.message-row.mine { flex-direction: row-reverse; align-self: flex-end; }
.message-row .avatar { width: 28px; height: 28px; margin-top: 3px; font-size: 10px; }
.message-content { min-width: 0; }
.message-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; padding: 0 3px; color: var(--muted); font-size: 11px; }
.message-meta strong { color: #686e7c; font-weight: 550; }
.message-meta time { color: var(--muted); font-size: 10px; }
.message-row.mine .message-meta { justify-content: flex-end; }
.message-text { padding: 12px 16px; border-radius: 4px 14px 14px; background: #f2f2f0; color: #292929; font-size: 15px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-row.mine .message-text { border-radius: 14px 4px 14px 14px; color: #342341; background: #f2eaf7; }
.chat-form { display: flex; align-items: flex-end; gap: 12px; margin-top: 13px; padding: 12px 13px 12px 20px; border: 1px solid #111; border-radius: 29px; }
.chat-form:focus-within { outline: 2px solid #773aa0; outline-offset: 3px; }
.chat-form-wrap { flex: 1; min-width: 0; }
.chat-input { min-height: 43px; max-height: 160px; padding: 10px 0; resize: vertical; border: 0; border-radius: 0; background: transparent; font-size: 16px; line-height: 1.5; }
.chat-input:focus-visible { outline: none; }
.chat-submit { flex-shrink: 0; width: 42px; min-height: 42px; height: 42px; padding: 0; border-radius: 50%; }
.chat-bottom-note { margin-top: 11px; color: var(--muted); font-size: 11px; text-align: center; }
.chat-new { width: fit-content; margin: 10px auto 0; padding: 7px 12px; color: var(--blue); background: var(--blue-wash); border-radius: 20px; font-size: 12px; }

/* A completed task can still be read from history. */
.task-dialog { width: min(680px, calc(100vw - 40px)); max-height: calc(100svh - 48px); padding: 0; border: 1px solid #111; border-radius: 12px; color: var(--ink); background: white; box-shadow: 0 20px 80px #1d254429; }
.task-dialog::backdrop { background: #30384e48; backdrop-filter: blur(3px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 23px 0; }
.dialog-close { margin-left: auto; color: var(--muted); }
.dialog-body { padding: 18px 32px 30px; }
.dialog-body h2 { font-size: 27px; font-weight: 600; }
.dialog-body .task-body { font-size: 16px; line-height: 1.8; }
.dialog-body .task-clue { font-size: 14px; }
.dialog-footer { margin-top: 26px; }
.answer-row { display: flex; gap: 10px; }
.answer-row .input { flex: 1; }
.answer-row .btn { flex-shrink: 0; }
.answer-row + .answer-note { margin-top: 12px; }

/* The announcement is the reward, without adding another dashboard. */
.finale { padding-top: 0; }
.finale > .eyebrow { margin-bottom: 18px; color: var(--blue); }
.finale h1 { font-size: clamp(32px, 4.5vw, 43px); line-height: 1.1; font-weight: 800; letter-spacing: -.04em; }
.finale > p:not(.focus-eyebrow) { margin-top: 25px; color: #333; font-size: 18px; line-height: 1.75; white-space: pre-line; }
.finale > .focus-eyebrow { color: var(--blue); }
.finale-details { display: grid; gap: 23px; margin-top: 32px; padding-top: 30px; border-top: 1px solid var(--line); }
.finale-detail span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.finale-detail strong { font-size: 18px; line-height: 1.65; font-weight: 500; white-space: pre-line; }
.finale .focus-actions { margin-top: 32px; }
.finale-confetti { display: none; }

.toast-region { position: fixed; z-index: 80; right: 24px; bottom: 24px; display: grid; gap: 10px; max-width: min(420px, calc(100vw - 48px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 15px 19px; border: 1px solid #e3e7ed; border-radius: 14px; background: white; color: #626978; box-shadow: 0 10px 32px #22315b1a; font-size: 13px; line-height: 1.6; animation: toast-in .18s ease-out; }
.toast svg { flex-shrink: 0; margin-top: 2px; color: var(--blue); }
.toast.error { color: #aa3c44; }
.loading-block { padding: 65px 20px; color: var(--muted); font-size: 14px; text-align: center; }
.error-panel { padding: 25px; margin-top: 40px; border: 1px solid #efd9d9; border-radius: 16px; color: #956568; background: #fffafa; }
.error-panel h2 { margin-bottom: 12px; font-size: 22px; font-weight: 600; }
.error-panel p { margin-bottom: 20px; font-size: 15px; line-height: 1.7; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (hover: hover) {
  .answer-option:not(:has(:disabled)):hover { border-color: #111; }
  :where([data-interaction='hold'], [data-interaction='launch']) .login-actions .btn-primary:hover:not(:disabled) { background: #e72c20; border-color: #e72c20; }
}
@media (min-width: 700px) {
  .quest-header { min-height: 96px; padding: 24px 32px; }
  .profile-name { display: block; }
  .quest-main { padding-inline: 32px; padding-bottom: 50px; }
  .login-main { min-height: min(880px, 100svh); padding-top: 60px; padding-bottom: 40px; gap: 32px; }
  .login-composer { min-height: 540px; padding: 42px 48px; }
  .login-heading { padding-block: 60px; }
  .login-heading h1 { font-size: 52px; }
  .login-composer .login-input { min-height: 58px; padding-inline: 20px; font-size: 17px; }
  .login-actions .btn, .task-controls > .btn, .task-controls .send-answer { min-height: 58px; }
  .focus-stage { padding-top: 34px; }
  .task-card { min-height: 490px; padding: 38px 42px; }
  .focus-heading, .focus-heading h1 { font-size: 36px; }
  .task-body { font-size: 17px; line-height: 1.65; }
  .focus-eyebrow { margin-bottom: 28px; font-size: 13px; }
  .answer-form { padding-top: 32px; }
  .answer-option { min-height: 60px; padding-inline: 20px; }
  .task-controls { margin-top: 34px; }
  .symbol-value { font-size: 120px; }
  .view-history, .view-team, .view-chat { padding-top: 40px; }
  .section-heading h1 { font-size: 34px; }
}
@media (max-width: 699px) {
  .quest-nav .nav-button > svg { display: none; }
  .current-view.view-admin { padding-top: 20px; }
  .view-history, .view-team, .view-chat { padding-top: 26px; }
  .section-heading { margin-bottom: 25px; }
  .section-heading h1 { font-size: 28px; font-weight: 800; }
  .section-heading p { font-size: 14px; }
  .history-row { gap: 14px; padding: 20px 0; }
  .history-row h2 { font-size: 16px; }
  .history-row p { font-size: 12px; }
  .history-row > .text-link { font-size: 12px; }
  .member-row { gap: 11px; }
  .member-row .member-state, .member-row .member-status { font-size: 11px; }
  .activity-item { grid-template-columns: minmax(0, 1fr); gap: 2px; font-size: 13px; }
  .chat-messages { height: clamp(280px, 46svh, 450px); padding: 22px 0; gap: 22px; }
  .message-row { max-width: 96%; gap: 7px; }
  .message-row .avatar { width: 25px; height: 25px; font-size: 9px; }
  .message-text { padding: 11px 13px; font-size: 15px; }
  .message-meta { gap: 7px; font-size: 10px; }
  .message-meta time { font-size: 9px; }
  .chat-form { gap: 9px; padding: 10px 10px 10px 16px; }
  .chat-bottom-note { display: none; }
  .task-dialog { width: calc(100vw - 28px); max-height: calc(100svh - 30px); border-radius: 12px; }
  .dialog-header { padding: 14px 16px 0; }
  .dialog-body { padding: 16px 22px 25px; }
  .dialog-body h2 { font-size: 25px; font-weight: 750; }
  .answer-row { flex-direction: column; }
  .finale h1 { font-size: 31px; }
  .finale > p:not(.focus-eyebrow), .finale-detail strong { font-size: 16px; }
  .toast-region { right: 20px; bottom: max(20px, env(safe-area-inset-bottom)); left: 20px; max-width: none; }
  .toast { font-size: 12px; }
}
@media (max-width: 359px) {
  .quest-header { padding-inline: 20px; gap: 9px; }
  .nav-button { gap: 5px; padding-inline: 10px; font-size: 12px; }
  .quest-main { padding-inline: 22px; }
  .login-main { width: calc(100% - 44px); }
  .login-composer, .task-card { padding-inline: 16px; }
  .login-heading h1 { font-size: 28px; }
  .focus-heading, .focus-heading h1 { font-size: 25px; }
  .answer-option { padding-inline: 12px; gap: 9px; }
  .answer-option-label { font-size: 16px; }
  .focus-actions { gap: 0 16px; }
}
@media (max-height: 720px) and (max-width: 699px) {
  .login-main { padding-top: 24px; padding-bottom: 18px; gap: 22px; }
  .login-composer { min-height: 410px; padding-top: 23px; padding-bottom: 23px; }
  .login-heading { padding-block: 32px; }
  .focus-stage { padding-top: 12px; }
  .task-card { min-height: 410px; padding-top: 24px; padding-bottom: 24px; }
  .focus-eyebrow { margin-bottom: 22px; }
  .task-controls { margin-top: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* After the personal rounds, the conversation owns the participant viewport. */
body.guest-chat-page { overflow: hidden; overscroll-behavior: none; }
.guest-chat-page .quest-shell {
  position: fixed; top: var(--chat-viewport-top, 0px); left: 0; width: 100%;
  height: 100dvh; height: var(--chat-viewport-height, 100dvh); min-height: 0;
  display: flex; flex-direction: column; background: #fff;
}
.guest-chat-page .quest-main { flex: 1; min-height: 0; display: flex; padding: 0; }
.guest-chat-page .current-view.view-chat { flex: 1; min-height: 0; max-width: 760px; padding: 0; }
.guest-chat-page .chat-shell {
  position: relative; height: 100%; min-height: 0;
  padding: 0 max(16px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
}
.guest-chat-page .chat-messages {
  flex: 1; min-height: 0; height: auto; gap: 22px;
  padding: max(24px, env(safe-area-inset-top)) 2px 20px;
  overflow-x: hidden; overflow-y: auto; scroll-padding-block: 24px;
  scrollbar-color: #111 transparent;
}
.guest-chat-page .message-row { max-width: 92%; }
.guest-chat-page .message-row .avatar { background: #111; color: #fff; }
.guest-chat-page .message-meta, .guest-chat-page .message-meta strong { color: #111; }
.guest-chat-page .message-text { border: 1px solid #111; background: #fff; color: #111; }
.guest-chat-page .message-row.mine .message-text { background: #f53224; color: #111; }
.guest-chat-page .message-row.bot .message-text { border-left: 4px solid #f53224; }
.message-row.shared-task .message-text { border: 1px solid #111; border-left: 4px solid #f53224; background: #ffe66c; color: #111; box-shadow: 3px 3px 0 #111; }
.message-task-label { display: block; margin-bottom: 12px; font-size: 12px; line-height: 1.3; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.guest-chat-page .chat-form { flex-shrink: 0; margin-top: 0; background: #fff; }
.guest-chat-page .chat-form:focus-within { outline-color: #f53224; }
.guest-chat-page .chat-input { min-height: 43px; max-height: min(160px, 28dvh); resize: none; color: #111; }
.guest-chat-page .chat-submit { background: #f53224; border-color: #f53224; color: #111; }
.guest-chat-page .chat-submit:hover:not(:disabled) { background: #e72c20; border-color: #e72c20; }
.guest-chat-page .chat-submit:disabled { background: #eee; border-color: #eee; color: #777; }
.guest-chat-page .chat-new {
  position: absolute; z-index: 2; top: max(10px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  margin: 0; min-height: 44px; padding: 10px 18px; border: 1px solid #111; background: #fff; color: #111;
  white-space: nowrap; box-shadow: 0 2px 0 #f53224;
}
.guest-chat-page .chat-empty, .guest-chat-page .chat-empty h3 { color: #111; }
.guest-chat-page .form-error { color: #111; border-left: 3px solid #f53224; padding-left: 9px; }
.guest-chat-page button:focus-visible, .guest-chat-page .chat-messages:focus-visible { outline-color: #f53224; }
.guest-chat-page .toast-region { bottom: auto; top: calc(var(--chat-viewport-top, 0px) + max(16px, env(safe-area-inset-top))); }
.organizer-page .quest-header { width: min(100%, 1184px); min-height: 0; padding: max(20px, env(safe-area-inset-top)) 32px 18px; }
.organizer-page .quest-nav { gap: 8px; }
.organizer-page .nav-button { border-radius: 8px; padding: 12px 18px; color: #111; }
.organizer-page .nav-button[aria-current="page"] { background: #f53224; }
.organizer-page .nav-count { background: #111; color: #fff; }
.organizer-page .current-view.view-admin { padding-top: 10px; }
.organizer-page .quest-main:focus { outline: none; }
.organizer-logout { min-height: 44px; padding: 10px 12px; background: transparent; color: #666; border-radius: 8px; font: inherit; font-size: 13px; }
.organizer-logout:hover { color: #111; background: #f5f5f5; }
.chat-items { display: flex; flex: 0 0 auto; flex-direction: column; gap: 22px; min-width: 0; }
.standalone-entry-help { margin: 10px 0 0; color: #666; font-size: 13px; line-height: 1.5; }
.chat-older { flex: 0 0 auto; align-self: center; min-height: 44px; border: 0; border-radius: 6px; padding: 10px 14px; background: #f5f5f5; color: #555; font: inherit; font-size: 12px; }
.chat-older:disabled { opacity: .6; }
.chat-older[hidden], .chat-photo-preview[hidden], .chat-progress[hidden] { display: none; }
.chat-notifications { flex: 0 0 auto; padding: 8px 0; }
.guest-chat-page .chat-messages { padding-top: 12px; }
.chat-compose-actions { display: flex; flex-shrink: 0; align-items: flex-end; gap: 5px; }
.chat-attach { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid #ddd; border-radius: 8px; cursor: pointer; font-size: 28px; line-height: 1; background: #fff; color: #111; overflow: hidden; }
.chat-attach:focus-within { outline: 2px solid #f53224; outline-offset: 2px; }
.chat-attach input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.chat-progress { font-size: 12px; color: #666; padding: 3px 7px; margin: 0; }
.chat-photo-preview { position: relative; width: fit-content; max-width: 100%; padding: 8px 0; }
.chat-photo-preview img { display: block; width: auto; height: 110px; max-width: 100%; object-fit: contain; border-radius: 6px; }
.chat-remove-photo { position: absolute; top: 3px; right: -8px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #111; border-radius: 50%; background: white; color: #111; }
.message-text > p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.message-photo { position: relative; display: block; max-width: 100%; overflow: hidden; background: transparent; border: 0; border-radius: 6px; padding: 0; margin: 0; cursor: zoom-in; }
.message-photo img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.message-photo + p { margin-top: 10px; }
.chat-photo-dialog { box-sizing: border-box; position: fixed; inset: 0; width: 100%; height: 100dvh; max-width: 100%; max-height: 100%; margin: 0; padding: max(64px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; background: #111; color: white; }
.chat-photo-dialog[open] { display: flex; align-items: center; justify-content: center; }
.chat-photo-dialog > img { width: 100%; height: 100%; object-fit: contain; }
.chat-photo-dialog::backdrop { background: #111; }
.chat-photo-close { position: absolute; right: max(16px, env(safe-area-inset-right)); top: max(12px, env(safe-area-inset-top)); width: 44px; height: 44px; display: grid; place-items: center; background: white; color: #111; border-radius: 50%; }
.chat-photo-error { position: absolute; left: 24px; right: 24px; text-align: center; }
.guest-chat-page .chat-new { top: 55px; }
@media (max-width: 699px) {
  .organizer-page .quest-header { padding-inline: 22px; }
  .organizer-page .nav-button { padding-inline: 14px; }
}
@media (min-width: 700px) {
  .guest-chat-page .chat-shell { padding-inline: 28px; padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  .guest-chat-page .chat-messages { padding-top: max(36px, env(safe-area-inset-top)); }
}
