:root {
  color-scheme: dark;
  --bg: #160d2b;
  --surface: #261743;
  --surface-strong: #342052;
  --card: #fffaf1;
  --ink: #20172d;
  --text: #fffafc;
  --muted: #c8bdd8;
  --accent: #f64d78;
  --accent-deep: #cc2857;
  --yellow: #ffd45c;
  --turquoise: #46dfcf;
  --danger: #ff8a7a;
  --border: rgba(255, 255, 255, 0.14);
  --shadow: 0 22px 60px rgba(7, 2, 20, 0.35);
  font-family: Inter, ui-rounded, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 8%, rgba(246, 77, 120, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 100%, rgba(70, 223, 207, 0.12), transparent 30rem),
    var(--bg);
  overflow-x: hidden;
}

button, input, select { font: inherit; }
button { touch-action: manipulation; }

.ambient { position: fixed; border-radius: 999px; filter: blur(1px); opacity: .7; pointer-events: none; }
.ambient-one { width: 14rem; height: 14rem; border: 1px solid rgba(255, 212, 92, .2); top: -7rem; right: 5vw; }
.ambient-two { width: 9rem; height: 9rem; border: 1px solid rgba(70, 223, 207, .18); bottom: -4rem; left: 6vw; }

.shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 48px; position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 48px; margin-bottom: 34px; }
.brand { color: var(--text); text-decoration: none; font-weight: 800; letter-spacing: -.02em; display: flex; gap: 11px; align-items: center; }
.brand img { display: block; width: 210px; height: auto; }
body:not(.landing-mode) .brand { background: #f7f2e8; border-radius: 8px; padding: 4px 8px; }

.connection { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: .8125rem; }
.connection span { width: 8px; height: 8px; border-radius: 50%; background: var(--turquoise); box-shadow: 0 0 0 4px rgba(70, 223, 207, .12); }
.connection.is-offline span { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 138, 122, .12); }

.start-card { width: min(680px, 100%); margin: 8vh auto 0; padding: clamp(24px, 5vw, 48px); border: 1px solid var(--border); border-radius: 30px; background: linear-gradient(145deg, rgba(52, 32, 82, .95), rgba(38, 23, 67, .92)); box-shadow: var(--shadow); }
.eyebrow { color: var(--yellow); font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 10px 0 12px; font-size: clamp(2rem, 6vw, 4rem); line-height: .98; letter-spacing: -.055em; }
.lead { max-width: 34rem; margin: 0 0 30px; color: var(--muted); font-size: 1.0625rem; line-height: 1.55; }
.form-stack { display: grid; gap: 18px; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.purchase-summary { display: flex; align-items: baseline; justify-content: space-between; padding: 15px 17px; border-radius: 14px; background: rgba(255, 255, 255, .06); }
.purchase-summary span, .legal-note { color: var(--muted); }
.purchase-summary strong { color: var(--yellow); font-size: 1.35rem; }
.legal-note { text-align: center; }
label { display: grid; gap: 8px; color: var(--muted); font-size: .875rem; font-weight: 700; }
input, select { width: 100%; min-height: 52px; border: 1px solid var(--border); border-radius: 14px; padding: 0 15px; color: var(--text); background: rgba(18, 10, 35, .6); outline: none; }
input:focus, select:focus { border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(70, 223, 207, .14); }

.button { min-height: 50px; border: 0; border-radius: 15px; padding: 12px 18px; font-weight: 800; cursor: pointer; transition: transform .15s ease, filter .15s ease, background .15s ease; }
.button:not(:disabled):active { transform: translateY(1px) scale(.99); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { color: #24102c; background: var(--yellow); box-shadow: 0 8px 24px rgba(255, 212, 92, .18); }
.button-primary:hover:not(:disabled) { filter: brightness(1.05); }
.button-secondary { color: var(--text); background: var(--surface-strong); border: 1px solid var(--border); }
.button-quiet { width: 100%; color: var(--muted); background: transparent; border: 1px dashed var(--border); margin-top: 12px; }
.button-danger { color: var(--danger); background: rgba(255, 138, 122, .08); border: 1px solid rgba(255, 138, 122, .3); }
.error { margin: 16px 0 0; padding: 12px 14px; color: #ffe3de; background: rgba(255, 138, 122, .12); border-radius: 12px; }

.room-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 22px; }
.room-heading h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin-bottom: 0; }
.room-code { min-width: 156px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid var(--border); }
.room-code span, .muted { display: block; color: var(--muted); font-size: .75rem; }
.room-code strong { display: block; margin-top: 3px; font-size: 1.5rem; letter-spacing: .12em; color: var(--turquoise); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.play-surface, .panel, .answer-panel { background: rgba(38, 23, 67, .82); border: 1px solid var(--border); box-shadow: var(--shadow); }
.play-surface { border-radius: 24px; padding: clamp(12px, 2.4vw, 24px); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.card-header strong { display: block; margin-top: 3px; font-size: 1rem; letter-spacing: .08em; }
.turn-label { padding: 7px 11px; border-radius: 999px; color: var(--yellow); background: rgba(255, 212, 92, .1); font-size: .8125rem; font-weight: 800; }
.bingo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(4px, 1vw, 8px); }
.cell { position: relative; display: grid; align-content: center; gap: 5px; min-width: 0; min-height: clamp(84px, 12vw, 118px); padding: 8px 6px; border: 3px solid transparent; border-radius: 14px; color: var(--ink); background: var(--card); line-height: 1.12; overflow-wrap: anywhere; cursor: pointer; box-shadow: 0 5px 0 rgba(9, 3, 18, .18); }
.cell strong { font-size: clamp(.7rem, 1.4vw, .9rem); }
.cell small { color: #706778; font-size: clamp(.58rem, 1.1vw, .72rem); line-height: 1.12; }
.cell.marked { border-color: var(--accent); background: #ffe1e8; transform: translateY(-2px); }
.cell.marked::after { content: "×"; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%) rotate(-8deg); color: rgba(190, 24, 72, .2); font-size: 4rem; font-weight: 900; }
.cell.pending { border-color: var(--yellow); background: #fff3bd; transform: translateY(-2px); }
.cell.pending::after { content: "Выбрано"; color: #765700; }
.cell.confirmed { border-color: #149889; background: #c8fff5; }
.cell.confirmed::after { content: "Засчитано ✓"; color: #08675d; }
.cell.rejected { border-color: var(--accent); background: #ffe1e8; }
.cell.rejected::after { content: "Не угадано ×"; color: #9c1740; }
.cell:focus-visible { outline: 3px solid var(--turquoise); outline-offset: 3px; }

.side-panel { display: grid; gap: 14px; }
.panel { border-radius: 20px; padding: 18px; }
.rules-panel { margin-bottom: 16px; padding: 18px 22px; }
.rules-panel ol { margin: 12px 0 8px; padding-left: 1.25rem; color: var(--text); line-height: 1.5; }
.rules-panel p { margin: 0; color: var(--muted); }
.panel h2 { margin: 0; font-size: 1rem; }
.panel-title { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.panel-title span { color: var(--muted); font-size: .75rem; }
.qr { display: block; width: min(150px, 100%); aspect-ratio: 1; margin: 0 auto 12px; padding: 7px; border-radius: 13px; background: white; }
.panel .button { width: 100%; }
.add-tickets { display: grid; grid-template-columns: 76px 1fr; gap: 8px; margin-top: 10px; }
.add-tickets input { min-height: 46px; }
.participants { list-style: none; display: grid; gap: 8px; margin: 0 0 14px; padding: 0; }
.participant { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; min-height: 38px; padding: 7px 9px; border-radius: 11px; background: rgba(255, 255, 255, .055); }
.participant strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.participant small { color: var(--muted); font-size: .6875rem; }
.participant .ticket-issued { color: var(--turquoise); }
.controls { display: grid; gap: 10px; }
.answer-panel { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; margin-bottom: 16px; padding: 16px 20px; border-radius: 18px; border-color: rgba(255, 212, 92, .35); background: linear-gradient(90deg, rgba(246, 77, 120, .2), rgba(255, 212, 92, .12)); }
.answer-panel span { color: var(--yellow); font-weight: 900; text-transform: uppercase; letter-spacing: .1em; font-size: .75rem; }
.answer-panel strong { font-size: 1.2rem; }
.answer-panel small { color: var(--muted); }
.winner { position: relative; margin-bottom: 18px; padding: 20px; border-radius: 22px; text-align: center; color: #281630; background: var(--yellow); overflow: hidden; }
.winner p { margin: 0; font-weight: 900; text-transform: uppercase; letter-spacing: .16em; }
.winner h2 { margin: 4px 0 0; font-size: clamp(1.8rem, 5vw, 3rem); }
.winner-burst { position: absolute; inset: -20px auto auto 6%; font-size: 6rem; opacity: .15; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 10; width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 13px; color: var(--ink); background: var(--turquoise); font-weight: 800; box-shadow: var(--shadow); }

.participant-mode .topbar { justify-content: flex-end; margin-bottom: 12px; }
.participant-mode .brand,
.participant-mode .room-heading,
.participant-mode .side-panel { display: none; }
.participant-mode .game-layout { grid-template-columns: minmax(0, 720px); justify-content: center; }
.participant-mode .winner { width: min(720px, 100%); margin-left: auto; margin-right: auto; }
.participant-mode .rules-panel { width: min(720px, 100%); margin-left: auto; margin-right: auto; }
.participant-mode .play-surface { background: rgba(38, 23, 67, .94); }

@media (max-width: 820px) {
  .shell { width: min(100% - 20px, 680px); padding-top: 10px; }
  .topbar { margin-bottom: 22px; }
  .game-layout { grid-template-columns: 1fr; }
  #game-view[data-status="lobby"] .side-panel { grid-row: 1; }
  #game-view[data-status="lobby"] .participants-panel { order: -1; }
  .room-heading { align-items: center; }
}

@media (max-width: 520px) {
  .shell { width: min(100% - 16px, 680px); }
  .brand img { width: 155px; }
  .connection { font-size: .75rem; }
  .start-card { margin-top: 3vh; padding: 22px 18px; border-radius: 22px; }
  .choice-grid { grid-template-columns: 1fr; }
  .room-heading { align-items: flex-start; }
  .room-heading h1 { font-size: 1.75rem; }
  .room-code { min-width: 122px; padding: 9px 11px; }
  .room-code strong { font-size: 1.08rem; }
  .game-layout { gap: 12px; }
  .play-surface { padding: 8px; border-radius: 18px; }
  .cell { min-height: clamp(78px, 23vw, 96px); padding: 5px 3px; border-width: 2px; border-radius: 10px; }
  .cell strong { font-size: clamp(.59rem, 2.8vw, .72rem); }
  .cell small { font-size: clamp(.49rem, 2.25vw, .61rem); }
  .cell.marked::after { font-size: 3rem; }
  .rules-panel { padding: 15px; }
  .answer-panel { grid-template-columns: 1fr; gap: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Публичная главная: игровая комната сохраняет собственные стили. */
body.landing-mode { --text: #21182b; --muted: #5d5159; --border: rgba(33, 24, 43, .2); --yellow: #912f49; --turquoise: #245a4a; color-scheme: light; background: #f7f2e8; color: #21182b; }
.landing-mode .ambient { display: none; }
.landing-mode .shell { width: min(1180px, calc(100% - 48px)); padding-top: 20px; }
.landing-mode .topbar { margin-bottom: 28px; border-bottom: 1px solid #cfc1b6; padding-bottom: 18px; }
.landing-mode .brand { color: #21182b; }
.site-nav { display: none; }
.landing-mode:not(.invite-mode) .site-nav { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.site-nav a { color: #493c43; font-size: .85rem; font-weight: 700; text-decoration: none; }
.site-nav a:last-child { color: #912f49; }
.site-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.header-actions { display: none; align-items: center; gap: 6px; }
.landing-mode:not(.invite-mode) .header-actions { display: flex; }
.header-control { min-height: 44px; border: 1px solid #b8a9a0; border-radius: 8px; background: transparent; color: #21182b; font-weight: 700; cursor: pointer; }
.theme-toggle { width: 44px; font-size: 1.35rem; }
.account-open { padding: 0 13px; }
.header-control:hover { background: #eee3d9; }
.account-dialog { width: min(420px, calc(100% - 32px)); max-width: none; padding: 28px; color: #21182b; background: #fffaf4; border: 1px solid #d7c9bd; border-radius: 12px; }
.account-dialog::backdrop { background: rgba(24, 16, 28, .64); }
.account-dialog h2 { margin: 0; font: 400 1.8rem/1.1 Georgia, serif; }
.account-dialog p { color: #5d5159; line-height: 1.5; }
.account-dialog .button { margin-top: 8px; }
.account-dialog { max-height: min(90vh, 850px); overflow-y: auto; overscroll-behavior: contain; }
.account-dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.account-close { flex: 0 0 44px; min-height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.account-dialog .account-notice { margin: 10px 0 16px; padding: 10px 12px; border-radius: 8px; background: #f3eae0; color: #493c43; font-size: .85rem; }
.account-social { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.account-social button { min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 6px; border: 1px solid #cbbcb1; border-radius: 8px; color: #493c43; background: #fffaf4; font: inherit; font-size: .85rem; font-weight: 700; }
.account-social button:disabled { opacity: 1; cursor: not-allowed; }
.account-social small { font-size: .68rem; font-weight: 400; }
.account-social-icon { width: 26px; height: 26px; display: inline-grid; place-items: center; flex: 0 0 26px; border-radius: 7px; color: #fff; font-weight: 800; }
.account-divider { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: #786a71; font-size: .8rem; }
.account-divider::before, .account-divider::after { content: ""; height: 1px; flex: 1; background: #dfd1c6; }
.account-fields { display: grid; gap: 12px; }
.account-fields label { display: block; margin-bottom: 5px; color: #493c43; font-size: .86rem; font-weight: 700; }
.account-fields input { width: 100%; min-width: 0; min-height: 48px; padding: 0 12px; border: 1px solid #ac9c95; border-radius: 8px; background: #fff; color: #21182b; font: inherit; }
.account-password-wrap { display: flex; align-items: stretch; }
.account-password-wrap input { border-radius: 8px 0 0 8px; }
.account-password-wrap button { min-width: 88px; min-height: 48px; border: 1px solid #ac9c95; border-left: 0; border-radius: 0 8px 8px 0; background: #f3eae0; color: #493c43; cursor: pointer; font: inherit; font-size: .8rem; }
.account-link { min-height: 44px; padding: 0; border: 0; background: transparent; color: #912f49; cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.account-forgot { justify-self: start; }
.account-submit { width: 100%; }
.account-dialog .account-status { margin: 0; color: #912f49; font-size: .85rem; }
#account-profile { overflow-wrap: anywhere; }
.account-status:empty { display: none; }
.account-dialog .account-switch, .account-dialog .account-guest { margin: 12px 0 0; font-size: .85rem; }
.account-dialog :is(button, input):focus-visible { outline: 3px solid #245a4a; outline-offset: 2px; }
.site-dark.landing-mode .account-dialog .account-notice { color: #f8eee9; background: #493640; }
.site-dark.landing-mode .account-dialog .account-social button:not([data-auth-provider="Яндекс"]) { color: #f8eee9; background: #332b35; border-color: #ac999c; }
.site-dark.landing-mode .account-dialog .account-divider { color: #e2d4d0; }
.site-dark.landing-mode .account-dialog .account-fields label { color: #e2d4d0; }
.site-dark.landing-mode .account-dialog .account-password-wrap button { color: #f8eee9; background: #493640; }
.site-dark.landing-mode .account-dialog .account-link, .site-dark.landing-mode .account-dialog .account-status { color: #ffc2c6; }
@media (max-width: 390px) { .account-dialog { padding: 20px; } .account-social { grid-template-columns: 1fr; } }
.landing-mode .connection { display: none; }
.landing-mode .start-card { width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.landing-hero { min-height: 510px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); align-items: center; gap: clamp(32px, 7vw, 100px); padding: 32px 0 80px; }
.landing-mode .eyebrow, .section-kicker { color: #912f49; font-size: .75rem; font-weight: 800; letter-spacing: .14em; }
.landing-mode h1, .landing-content h2, .entry-heading h2 { font-family: Georgia, 'Times New Roman', serif; font-weight: 400; letter-spacing: -.05em; }
.landing-mode h1 { font-size: clamp(3.2rem, 7.2vw, 6.4rem); line-height: .97; margin: 20px 0 24px; }
.landing-mode h1 em, .landing-content h2 em, .entry-heading h2 em { color: #912f49; font-weight: 400; }
.landing-mode .lead { color: #5d5159; max-width: 32rem; font-size: 1.08rem; margin-bottom: 26px; }
.hero-note { margin: -10px 0 22px; color: #5d5159; font-size: .875rem; line-height: 1.5; }
.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.landing-mode .button-primary { display: inline-flex; align-items: center; justify-content: center; gap: 20px; text-decoration: none; color: #fff; background: #912f49; box-shadow: none; border-radius: 8px; }
.text-link { color: #21182b; font-weight: 700; text-underline-offset: 5px; }
.poster-ticket { position: relative; background: #eec7ad; color: #21182b; padding: clamp(22px, 4vw, 42px); transform: rotate(3deg); box-shadow: 12px 14px 0 #245a4a; }
.ticket-sticker { position: absolute; right: 0; top: 23%; width: 116px; padding: 11px 12px; color: #fffaf4; background: #245a4a; transform: rotate(8deg); box-shadow: 3px 4px 0 rgba(33,24,43,.16); }
.ticket-sticker span { display: block; font-size: .52rem; font-weight: 800; letter-spacing: .08em; }
.ticket-sticker strong { display: block; margin-top: 5px; font: italic 1.05rem/1.05 Georgia, serif; }
.ticket-top, .ticket-bottom { display: flex; justify-content: space-between; gap: 15px; font-size: .65rem; font-weight: 800; letter-spacing: .1em; line-height: 1.4; }
.ticket-top span:last-child { text-align: right; }
.ticket-heading { margin: 35px 0 24px; font: 400 clamp(2.8rem, 5vw, 4.8rem)/.93 Georgia, serif; letter-spacing: -.06em; }
.ticket-heading em { color: #912f49; }
.ticket-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid #765c58; border-top: 1px solid #765c58; }
.ticket-grid span { position: relative; min-width: 0; display: grid; place-items: center; aspect-ratio: 1; border-right: 1px solid #765c58; border-bottom: 1px solid #765c58; color: #912f49; font-size: clamp(1rem, 2.4vw, 1.7rem); }
.ticket-grid span:nth-child(3n) { color: #245a4a; }
.ticket-grid .ticket-mark::after { content: "×"; position: absolute; inset: 7%; display: grid; place-items: center; color: #fffaf4; background: #245a4a; font: bold clamp(1.8rem, 4vw, 3rem)/1 Georgia, serif; transform: rotate(-8deg); }
.ticket-grid .ticket-mark:nth-child(9)::after { background: #912f49; transform: rotate(6deg); }
.landing-mode a:focus-visible, .landing-mode button:focus-visible { outline: 3px solid #245a4a; outline-offset: 4px; }
@media (hover: hover) {
  .landing-mode .button-primary:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(.93); }
  .landing-mode .text-link:hover { color: #912f49; }
}
@media (prefers-reduced-motion: no-preference) {
  .poster-ticket.has-observer .ticket-mark::after { opacity: 0; }
  .poster-ticket.is-visible .ticket-mark::after { animation: ticket-mark-in .6s ease-out both; }
  .poster-ticket.is-visible .ticket-mark:nth-child(2)::after { animation-delay: .7s; }
  .poster-ticket.is-visible .ticket-mark:nth-child(9)::after { animation-delay: 1.9s; }
  .poster-ticket.is-visible .ticket-mark:nth-child(14)::after { animation-delay: 3.1s; }
  @keyframes ticket-mark-in { from { opacity: 0; scale: 1.45; } to { opacity: 1; scale: 1; } }
}
.ticket-bottom { margin-top: 20px; }
.landing-content h2, .entry-heading h2 { margin: 12px 0 18px; font-size: clamp(2.3rem, 4.5vw, 4.2rem); line-height: 1; }
.landing-content p, .entry-heading p { color: #5d5159; line-height: 1.6; }
.how-section, .themes-section { padding: 65px 0 78px; border-top: 1px solid #cfc1b6; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading > p { max-width: 300px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 45px; }
.steps article { border-top: 1px solid #21182b; padding-top: 18px; }
.steps article > span { color: #912f49; font-size: .7rem; font-weight: 800; letter-spacing: .1em; }
.steps h3 { margin: 24px 0 8px; font-size: 1.2rem; }
.steps p { margin: 0; }
.rounds-section { display: grid; grid-template-columns: 1.1fr 1fr; column-gap: 60px; padding: clamp(26px, 5vw, 60px); background: #245a4a; color: #fffaf4; }
.rounds-section .section-kicker, .rounds-section h2 em { color: #eec7ad; }
.rounds-section ol { grid-column: 2; grid-row: 1 / span 2; list-style: none; margin: 0; padding: 0; }
.rounds-section li { display: flex; gap: 28px; padding: 17px 0; border-bottom: 1px solid rgba(255,255,255,.35); font-size: 1.1rem; font-weight: 700; }
.rounds-section li span { color: #eec7ad; font-size: .8rem; }
.rounds-section p { color: #e8e5dd; margin-bottom: 0; }
.themes-section { margin-top: 75px; }
.theme-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.theme-list a { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; background: #eec7ad; color: #21182b; padding: 28px; font: 1.5rem Georgia, serif; text-decoration: none; transition: background .15s ease; }
.theme-list a:nth-child(2) { background: #e7ddd0; }
.theme-list a:hover { background: #e5b59e; }
.theme-list small { display: block; margin-top: 20px; color: #5d5159; font: 700 .75rem system-ui, sans-serif; }
.catalog-section { padding: 65px 0 78px; border-top: 1px solid #cfc1b6; }
.game-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 20px; margin-top: 32px; }
.game-card { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(24px, 4vw, 42px); background: #eec7ad; color: #21182b; }
.game-card h3 { margin: 22px 0 6px; font: 400 clamp(2rem, 4vw, 3rem)/1 Georgia, serif; letter-spacing: -.04em; }
.landing-content .game-card p { max-width: 36rem; color: #493c43; }
.game-card .button { margin-top: 16px; }
.faq-section { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; padding: 65px 0 80px; border-top: 1px solid #cfc1b6; }
.faq-list details { border-bottom: 1px solid #cfc1b6; }
.faq-list summary { padding: 20px 30px 20px 0; position: relative; list-style: none; font-weight: 700; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 2px; color: #912f49; font-size: 1.35rem; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { margin: 0 0 20px; }
.faq-list summary:focus-visible { outline: 3px solid #245a4a; outline-offset: 3px; }
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 25px 0; border-top: 1px solid #cfc1b6; color: #5d5159; font-size: .85rem; }
.site-footer a { color: #21182b; text-underline-offset: 4px; }
.entry-panel { max-width: 800px; margin: 0 auto 45px; padding: clamp(24px, 5vw, 56px); background: #fffaf4; border: 1px solid #d7c9bd; }
.entry-heading { margin-bottom: 30px; }
.entry-heading p { margin: 10px 0; }
.entry-heading .prototype-note { padding: 14px 16px; background: #f2e3d7; color: #49383b; font-size: .9rem; }
.landing-mode label { color: #493c43; }
.landing-mode input, .landing-mode select { color: #21182b; background: #fff; border: 1px solid #ac9c95; border-radius: 7px; }
.landing-mode input:focus, .landing-mode select:focus { border-color: #245a4a; box-shadow: 0 0 0 3px rgba(36,90,74,.18); }
.landing-mode .purchase-summary { background: #f3eae0; border-radius: 7px; }
.landing-mode .purchase-summary span, .landing-mode .legal-note { color: #5d5159; }
.landing-mode .purchase-summary strong { color: #912f49; }
.landing-mode .error { color: #7f1c2f; background: #f8e0dc; }
.invite-mode .landing-only { display: none; }
.invite-mode .landing-hero { display: block; min-height: 0; max-width: 800px; margin: 0 auto; padding: 35px 0 0; }
.invite-mode .landing-hero h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.invite-mode .entry-panel { padding-top: 30px; }
@media (max-width: 1050px) {
  .landing-mode:not(.invite-mode) .topbar { flex-wrap: wrap; gap: 14px; }
  .landing-mode:not(.invite-mode) .site-nav { order: 3; width: 100%; gap: 10px 20px; }
}
@media (max-width: 850px) {
  .landing-mode .shell { width: calc(100% - 32px); }
  .landing-mode:not(.invite-mode) .topbar { flex-wrap: wrap; gap: 14px; }
  .landing-mode:not(.invite-mode) .site-nav { order: 3; width: 100%; gap: 10px 20px; }
  .site-nav a { font-size: .8rem; }
  .landing-hero { grid-template-columns: 1fr; gap: 38px; padding: 22px 0 65px; }
  .landing-mode h1 { font-size: clamp(3rem, 12vw, 5rem); }
  .poster-ticket { width: min(82%, 370px); margin: 0 auto 10px; }
  .ticket-sticker { position: relative; top: auto; right: auto; width: max-content; margin: -8px 0 16px auto; transform: rotate(3deg); }
  .ticket-heading { font-size: 3.4rem; }
  .section-heading { display: block; }
  .steps { grid-template-columns: 1fr; gap: 26px; margin-top: 32px; }
  .steps h3 { margin-top: 14px; }
  .rounds-section { grid-template-columns: 1fr; }
  .rounds-section ol { grid-column: auto; grid-row: auto; }
  .theme-list { grid-template-columns: 1fr; }
  .faq-section { grid-template-columns: 1fr; gap: 15px; padding: 45px 0 55px; }
  .how-section, .themes-section { padding: 45px 0 55px; }
  .themes-section { margin-top: 55px; }
}

/* Тема витрины независима от оформления игровой комнаты. */
body.landing-mode.site-dark { color-scheme: dark; --text: #f8eee9; --muted: #d9c9c5; --border: #78666b; background: #211b24; color: #f8eee9; }
.site-dark.landing-mode .topbar, .site-dark.landing-mode .how-section, .site-dark.landing-mode .themes-section, .site-dark.landing-mode .faq-section, .site-dark.landing-mode .site-footer, .site-dark.landing-mode .faq-list details { border-color: #75616a; }
.site-dark.landing-mode .catalog-section { border-color: #75616a; }
.site-dark.landing-mode .brand { background: #f7f2e8; padding: 4px 8px; border-radius: 8px; }
.site-dark.landing-mode .site-nav a, .site-dark.landing-mode .text-link, .site-dark.landing-mode .site-footer a { color: #f8eee9; }
.site-dark.landing-mode .site-nav a:last-child, .site-dark.landing-mode .eyebrow, .site-dark.landing-mode .section-kicker, .site-dark.landing-mode .steps article > span, .site-dark.landing-mode .faq-list summary::after { color: #f4b7bd; }
.site-dark.landing-mode h1 em, .site-dark.landing-mode .landing-content h2 em, .site-dark.landing-mode .entry-heading h2 em { color: #f4b7bd; }
.site-dark.landing-mode .lead, .site-dark.landing-mode .hero-note, .site-dark.landing-mode .landing-content p, .site-dark.landing-mode .entry-heading p, .site-dark.landing-mode .site-footer { color: #e2d4d0; }
.site-dark.landing-mode .landing-content .game-card p { color: #493c43; }
.site-dark.landing-mode .steps article { border-color: #d6c1bd; }
.site-dark.landing-mode .rounds-section { background: #245a4a; }
.site-dark.landing-mode .entry-panel, .site-dark.landing-mode .account-dialog { background: #332b35; color: #f8eee9; border-color: #75616a; }
.site-dark.landing-mode .entry-heading .prototype-note { background: #493640; color: #f8eee9; }
.site-dark.landing-mode label, .site-dark.landing-mode .legal-note, .site-dark.landing-mode .purchase-summary span, .site-dark.landing-mode .account-dialog p { color: #e2d4d0; }
.site-dark.landing-mode input, .site-dark.landing-mode select { background: #211b24; color: #fffaf4; border-color: #ac999c; }
.site-dark.landing-mode .purchase-summary { background: #493640; }
.site-dark.landing-mode .purchase-summary strong { color: #ffc2c6; }
.site-dark.landing-mode .error { color: #ffe4dd; background: #783744; }
.site-dark.landing-mode .header-control { color: #f8eee9; border-color: #bca5a8; }
.site-dark.landing-mode .header-control:hover { background: #493640; }
.site-dark.landing-mode a:focus-visible, .site-dark.landing-mode button:focus-visible, .site-dark.landing-mode .faq-list summary:focus-visible { outline-color: #ffc2c6; }

/* Каталог и учебный пример: отдельные страницы с общим оформлением. */
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 5px; }
.home-photo { padding: 10px; background: #fffaf4; transform: rotate(2deg); box-shadow: 10px 12px 0 #245a4a; }
.home-photo img { display: block; width: 100%; height: auto; }
.subpage-content { min-height: 50vh; }
.subpage-content .catalog-section { border-top: 0; }
.game-card h2 { margin: 0 0 6px; font: 400 clamp(2rem, 4vw, 3rem)/1 Georgia, serif; letter-spacing: -.04em; }
.walkthrough { padding: 28px 0 65px; }
.guide-intro { max-width: 800px; margin-bottom: 42px; }
.guide-intro h1 { margin-bottom: 20px; }
.guide-intro p { max-width: 650px; font-size: 1.05rem; }
.guide-steps { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.guide-steps button { min-height: 48px; padding: 10px 18px; border: 1px solid #9d8582; border-radius: 7px; color: #21182b; background: transparent; font-weight: 700; cursor: pointer; }
.guide-steps button span { margin-right: 8px; color: #912f49; }
.guide-steps button[aria-pressed="true"] { color: #fffaf4; background: #912f49; border-color: #912f49; }
.guide-steps button[aria-pressed="true"] span { color: #fffaf4; }
.guide-panel { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: 40px; align-items: center; min-height: 440px; margin-bottom: 16px; padding: clamp(25px, 5vw, 60px); background: #f0dfd0; color: #21182b; }
.guide-panel-two { background: #eec7ad; }
.guide-panel-three { background: #e6ddd0; }
.guide-panel h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
.landing-content .guide-panel p, .site-dark.landing-mode .landing-content .guide-panel p { color: #493c43; }
.guide-panel .guide-note { font-size: .875rem; }
.guide-art { display: flex; justify-content: center; }
.example-game, .example-invite, .example-ticket { width: min(100%, 430px); padding: clamp(24px, 4vw, 38px); background: #fffaf4; color: #21182b; box-shadow: 10px 10px 0 #245a4a; }
.example-game > span, .example-invite > span, .example-ticket > span, .example-guest > span { display: block; color: #912f49; font-size: .7rem; font-weight: 800; letter-spacing: .12em; }
.example-game > strong, .example-invite > strong { display: block; margin: 25px 0 14px; font: 400 clamp(2.4rem, 5vw, 4rem)/.95 Georgia, serif; letter-spacing: -.04em; }
.example-game em, .example-invite em { color: #912f49; }
.example-ticket > strong { display: block; margin: 20px 0; font: 400 1.6rem Georgia, serif; }
.example-guest { margin-top: 20px; padding: 18px; background: #f0dfd0; }
.example-guest strong { display: block; margin-top: 12px; font-size: 1.1rem; }
.example-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.example-cell { min-height: 64px; padding: 8px 4px; border: 1px solid #a58c82; background: #fffaf4; color: #21182b; font-weight: 700; overflow-wrap: anywhere; cursor: pointer; }
.example-cell[aria-pressed="true"] { color: #fff; background: #245a4a; border-color: #245a4a; }
.example-cell[aria-pressed="true"]::after { content: " ✓"; }
.example-actions { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.example-actions strong { font-size: inherit; }
.example-actions button { min-height: 44px; border: 0; padding: 8px; color: #76273c; background: transparent; font-weight: 700; text-decoration: underline; cursor: pointer; }
.guide-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; margin-top: 36px; }
.guide-cta p { width: 100%; margin: 0; font-size: 1.2rem; }
.guide-cta small { width: 100%; color: #5d5159; }
.site-dark.landing-mode .guide-steps button { color: #f8eee9; border-color: #bca5a8; }
.site-dark.landing-mode .guide-steps button span { color: #f4b7bd; }
.site-dark.landing-mode .guide-steps button[aria-pressed="true"] { color: #fffaf4; background: #912f49; }
.site-dark.landing-mode .guide-steps button[aria-pressed="true"] span { color: #fffaf4; }
.site-dark.landing-mode .guide-panel .section-kicker { color: #912f49; }
.site-dark.landing-mode .guide-panel h2 em { color: #912f49; }
.site-dark.landing-mode .guide-panel button:focus-visible { outline-color: #245a4a; }
.site-dark.landing-mode .guide-cta small { color: #e2d4d0; }
@media (prefers-reduced-motion: no-preference) {
  .guide-panel:not([hidden]) { animation: guide-in .25s ease-out; }
  @keyframes guide-in { from { opacity: .5; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
@media (max-width: 720px) {
  .home-photo { width: min(92%, 470px); margin: 0 auto 12px; }
  .walkthrough { padding-top: 12px; }
  .guide-panel { grid-template-columns: 1fr; gap: 18px; }
  .guide-steps { gap: 6px; }
  .guide-steps button { flex: 1 1 auto; padding: 9px; }
  .guide-steps button span { margin-right: 4px; }
}
@media (max-width: 520px) {
  .landing-mode:not(.invite-mode) .topbar { gap: 8px; }
  .site-dark.landing-mode .brand img { width: 145px; }
}

/* Комната и билет используют ту же палитру, что и витрина. */
body:not(.landing-mode) { --text: #21182b; --muted: #5d5159; --border: #d2c4ba; --yellow: #912f49; --turquoise: #245a4a; color-scheme: light; color: #21182b; background: #f7f2e8; }
body:not(.landing-mode) .ambient { display: none; }
body:not(.landing-mode) .topbar { border-bottom: 1px solid #d2c4ba; padding-bottom: 14px; margin-bottom: 25px; }
body:not(.landing-mode) .brand { padding: 0; background: transparent; }
body:not(.landing-mode) .connection { color: #5d5159; }
body:not(.landing-mode) .connection:not(.is-offline) { display: none; }
body.participant-mode .topbar:not(.connection-lost) { display: none; }
body:not(.landing-mode) .connection span { background: #245a4a; box-shadow: none; }
body:not(.landing-mode) .connection.is-offline span { background: #a32d3c; }
body:not(.landing-mode) .room-heading h1 { font-family: Georgia, serif; font-weight: 400; letter-spacing: -.04em; }
body:not(.landing-mode) .eyebrow { color: #912f49; }
body:not(.landing-mode) .room-code { background: #eee1d5; border-color: #d2c4ba; border-radius: 10px; }
body:not(.landing-mode) .room-code strong { color: #245a4a; }
body:not(.landing-mode) .play-surface, body:not(.landing-mode) .panel { background: #fffaf4; border: 1px solid #d2c4ba; box-shadow: none; }
body:not(.landing-mode) .play-surface { border-radius: 12px; }
body:not(.landing-mode) .panel { border-radius: 12px; }
body:not(.landing-mode) .rules-panel { padding: 0; }
body:not(.landing-mode) .rules-panel summary { min-height: 48px; padding: 14px 18px; color: #245a4a; font-weight: 800; cursor: pointer; }
body:not(.landing-mode) .rules-panel ol { margin: 0 18px 8px; color: #21182b; }
body:not(.landing-mode) .rules-panel p { padding: 0 18px 18px; color: #5d5159; }
body:not(.landing-mode) .turn-label { color: #245a4a; background: #e4efe8; }
body:not(.landing-mode) .bingo-grid { grid-template-columns: repeat(var(--card-size, 5), minmax(0, 1fr)); gap: clamp(4px, .7vw, 8px); }
body:not(.landing-mode) .cell { min-height: clamp(100px, 12vw, 126px); padding: 10px 6px; border: 1px solid #bba99b; border-radius: 5px; background: #f7eee5; color: #21182b; box-shadow: none; line-height: 1.2; overflow-wrap: break-word; word-break: normal; }
body:not(.landing-mode) .cell strong, body:not(.landing-mode) .cell small { min-width: 0; overflow-wrap: anywhere; }
body:not(.landing-mode) .cell strong { font-size: clamp(.74rem, 1.25vw, .93rem); }
body:not(.landing-mode) .cell small { color: #594c52; font-size: clamp(.68rem, 1vw, .8rem); line-height: 1.2; }
body:not(.landing-mode) .cell.marked { padding-right: 19px; border: 2px solid #245a4a; background: #dfece2; color: #183a30; transform: none; }
body:not(.landing-mode) .cell.marked::after { content: "✓"; position: absolute; inset: 5px 5px auto auto; transform: none; color: #245a4a; font: 800 .85rem/1 sans-serif; }
body:not(.landing-mode) .bingo-grid[data-card-size="4"] .cell { padding: 20px 5px 8px; }
body:not(.landing-mode) .bingo-grid[data-card-size="4"] .cell.marked { border-width: 1px; box-shadow: inset 0 0 0 1px #245a4a; }
body:not(.landing-mode) .bingo-grid[data-card-size="4"] .cell strong { font-size: .8125rem; }
body:not(.landing-mode) .bingo-grid[data-card-size="4"] .cell small { font-size: .75rem; }
body:not(.landing-mode) .cell:focus-visible, body:not(.landing-mode) .button:focus-visible, body:not(.landing-mode) summary:focus-visible { outline: 3px solid #245a4a; outline-offset: 2px; }
body:not(.landing-mode) .button { border-radius: 8px; }
body:not(.landing-mode) .button-primary { color: #fff; background: #912f49; box-shadow: none; }
body:not(.landing-mode) .button-secondary { color: #245a4a; background: #eef3ec; border-color: #a7baaa; }
body:not(.landing-mode) .button-danger { color: #8c283e; background: #fae5df; border-color: #d6ada7; }
body:not(.landing-mode) .add-tickets { grid-template-columns: 62px minmax(0, 1fr); }
body:not(.landing-mode) .add-tickets input { min-width: 0; color: #21182b; background: #fff; border-color: #bba99b; border-radius: 8px; padding: 0 8px; }
body:not(.landing-mode) .participant { background: #f3ebe2; }
body:not(.landing-mode) .winner { color: #fffaf4; background: #245a4a; border-radius: 12px; }
body:not(.landing-mode) .toast { color: #fff; background: #245a4a; }
.room-actions { display: flex; justify-content: flex-end; margin: 0 0 14px; }
.participant-mode .room-actions { width: min(720px, 100%); margin-left: auto; margin-right: auto; }
.room-actions .button { min-height: 44px; }
.saved-rooms { margin: 0 0 24px; padding: 16px; border: 1px solid #b9a99e; border-radius: 8px; }
.saved-rooms h3, .saved-rooms p { margin: 0 0 8px; }
.saved-rooms p { color: #5d5159; font-size: .9rem; }
.saved-rooms ul { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; }
.saved-rooms a { display: inline-flex; align-items: center; min-height: 44px; color: #76273c; font-weight: 700; text-underline-offset: 4px; }
.site-dark.landing-mode .saved-rooms { border-color: #bca5a8; }
.site-dark.landing-mode .saved-rooms p { color: #e2d4d0; }
.site-dark.landing-mode .saved-rooms a { color: #ffc2c6; }
body.site-dark:not(.landing-mode) { --text: #f8eee9; --muted: #e2d4d0; --border: #75616a; color-scheme: dark; color: #f8eee9; background: #211b24; }
body.site-dark:not(.landing-mode) .brand { background: #f7f2e8; padding: 4px 8px; }
body.site-dark:not(.landing-mode) .topbar { border-color: #75616a; }
body.site-dark:not(.landing-mode) .connection, body.site-dark:not(.landing-mode) .muted { color: #e2d4d0; }
body.site-dark:not(.landing-mode) .eyebrow { color: #f4b7bd; }
body.site-dark:not(.landing-mode) .room-code, body.site-dark:not(.landing-mode) .play-surface, body.site-dark:not(.landing-mode) .panel { background: #332b35; border-color: #75616a; }
body.site-dark:not(.landing-mode) .room-code strong, body.site-dark:not(.landing-mode) .rules-panel summary { color: #b7dfc7; }
body.site-dark:not(.landing-mode) .rules-panel ol { color: #f8eee9; }
body.site-dark:not(.landing-mode) .rules-panel p, body.site-dark:not(.landing-mode) .panel-title span, body.site-dark:not(.landing-mode) .participant small { color: #e2d4d0; }
body.site-dark:not(.landing-mode) .participant { background: #493d48; }
body.site-dark:not(.landing-mode) .turn-label { background: #245a4a; color: #fff; }
body.site-dark:not(.landing-mode) .button:focus-visible, body.site-dark:not(.landing-mode) summary:focus-visible { outline-color: #ffc2c6; }
@media (max-width: 520px) {
  body:not(.landing-mode) .room-heading h1 { font-size: 1.7rem; }
  body:not(.landing-mode) .play-surface { padding: 8px; }
  body:not(.landing-mode) .cell { min-height: 96px; padding: 7px 3px; }
  body:not(.landing-mode) .cell strong { font-size: .7rem; }
  body:not(.landing-mode) .cell small { font-size: .64rem; }
  body:not(.landing-mode) .cell.marked { padding-right: 15px; }
  body:not(.landing-mode) .cell.marked::after { top: 3px; right: 3px; font-size: .75rem; }
}

/* Подбор активности и сезонная подборка */
.chooser-section { max-width: 760px; padding: 55px 0 80px; }
.chooser-section h1 { font-family: Georgia, 'Times New Roman', serif; font-size: clamp(2.8rem, 7vw, 5rem); font-weight: 400; line-height: 1; letter-spacing: -.05em; }
.chooser-section h1 em { color: #912f49; font-weight: 400; }
.activity-form { display: grid; gap: 20px; margin-top: 28px; }
.activity-form .button { justify-self: start; }
.activity-result { margin-top: 32px; padding: clamp(20px, 4vw, 32px); border: 1px solid #cfc1b6; background: #f3eae0; }
.activity-result h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.activity-result a { margin: 6px 16px 0 0; }
.site-dark.landing-mode .chooser-section h1 em { color: #f4b7bd; }
.site-dark.landing-mode .activity-result { background: #332b35; border-color: #75616a; }

/* Окно входа и компактная навигация. */
.account-dialog .account-social { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.account-social button { justify-content: flex-start; min-height: 44px; padding: 7px 9px; cursor: pointer; }
.account-social button span { min-width: 0; overflow-wrap: anywhere; text-align: left; line-height: 1.15; }
.account-dialog-header h2 { min-width: 0; overflow-wrap: anywhere; }
.account-provider-icon { display: block; width: 29px; height: 28px; flex: 0 0 29px; object-fit: contain; }
.account-dialog .account-social button[data-auth-provider="Яндекс"] {
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
}
.account-social button[data-auth-provider="Яндекс"] img {
  display: block;
  width: 100%;
  max-width: 157px;
  height: auto;
  border-radius: 6% / 21%;
  background: white;
}
.account-fields { gap: 9px; }
.account-password-wrap { position: relative; }
.account-password-wrap input { padding-right: 48px; border-radius: 8px; }
.account-password-wrap button { position: absolute; right: 0; top: 0; min-width: 44px; width: 44px; height: 100%; border: 0; border-radius: 0 8px 8px 0; background: transparent; }
.account-password-wrap button svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; vertical-align: middle; }
.account-password-wrap .eye-slash { display: none; }
.account-password-wrap button[aria-pressed="true"] .eye-slash { display: block; }
.site-dark.landing-mode .account-dialog .account-password-wrap button { background: transparent; }
.account-optional, .account-birthday-help { color: #74676d; font-size: .75rem; font-weight: 400; }
.account-birthday-help { display: block; padding-top: 4px; line-height: 1.3; }
.site-dark.landing-mode .account-optional, .site-dark.landing-mode .account-birthday-help { color: #d9c9c5; }
.menu-toggle { display: none; width: 44px; height: 44px; flex: 0 0 44px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; padding: 0; border: 1px solid #b8a9a0; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; }
.menu-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: currentColor; }
@media (max-width: 390px) {
  .account-dialog { padding: 16px; }
  .account-dialog-header { gap: 4px; }
  .account-dialog-header h2 { font-size: 1.45rem; }
  .account-close { margin: 0; }
  .account-social button { gap: 4px; padding: 6px; font-size: .76rem; }
}
@media (max-width: 760px) {
  .landing-mode.has-mobile-nav:not(.invite-mode) .topbar { gap: 8px; }
  .landing-mode.has-mobile-nav:not(.invite-mode) .brand { flex: 1 1 auto; }
  .landing-mode.has-mobile-nav:not(.invite-mode) .brand img { width: 120px; }
  .landing-mode.has-mobile-nav:not(.invite-mode) .header-actions { order: 1; }
  .landing-mode.has-mobile-nav:not(.invite-mode) .menu-toggle { display: flex; order: 2; }
  .landing-mode.has-mobile-nav:not(.invite-mode) .site-nav { display: none; order: 3; width: 100%; }
}

/* Выезжающее мобильное меню поверх страницы. */
body.mobile-menu-open { overflow: hidden; }
.mobile-menu { position: fixed; inset: 0 0 0 auto; width: min(85vw, 340px); max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: max(16px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) 22px; border: 0; background: #fffaf4; color: #21182b; overflow-y: auto; }
.mobile-menu[open] { display: flex; flex-direction: column; }
.mobile-menu::backdrop { background: rgba(24, 16, 28, .64); }
.mobile-menu-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 22px; border-bottom: 1px solid #d7c9bd; }
.mobile-menu-brand { display: inline-flex; align-items: center; min-width: 0; min-height: 44px; }
.mobile-menu-brand img { display: block; width: min(145px, 100%); height: auto; }
.mobile-menu-close { width: 44px; height: 44px; flex: 0 0 44px; border: 1px solid #cbbcb1; border-radius: 8px; background: transparent; color: inherit; cursor: pointer; font-size: 1.8rem; line-height: 1; }
.mobile-menu-links { display: flex; flex-direction: column; }
.mobile-menu-links a { display: flex; align-items: center; min-height: 54px; padding: 10px 0; border-bottom: 1px solid #e4d8ce; color: inherit; font-size: 1rem; font-weight: 700; line-height: 1.3; text-decoration: none; }
.mobile-menu-links a[aria-current="page"] { color: #912f49; }
.mobile-menu :is(a, button):focus-visible { outline: 3px solid #245a4a; outline-offset: 2px; }
.site-dark .mobile-menu { background: #332b35; color: #f8eee9; }
.site-dark .mobile-menu-header, .site-dark .mobile-menu-links a { border-color: #75616a; }
.site-dark .mobile-menu-brand { padding: 4px; border-radius: 6px; background: #f7f2e8; }
.site-dark .mobile-menu-close { border-color: #bca5a8; }
.site-dark .mobile-menu-links a[aria-current="page"] { color: #ffc2c6; }
.mobile-menu-links a { gap: 10px; }
.mobile-menu-links a::after { content: ""; flex: 0 0 16px; width: 16px; height: 16px; margin-left: auto; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h15M14 6l6 6-6 6'/%3E%3C/svg%3E") center / contain no-repeat; }
.mobile-menu-links a[href="/new-year"], .mobile-menu-links a[href="/new-year"][aria-current="page"] { color: #245a91; }
.mobile-menu-links a[href="/new-year"][aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.site-nav a[href="/new-year"]::before, .mobile-menu-links a[href="/new-year"]::before { content: ""; flex: 0 0 18px; width: 18px; height: 18px; background-color: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.34 7l17.32 10M3.34 17 20.66 7M9 4l3 3 3-3M9 20l3-3 3 3M3.6 10l4.1-1.1-1.1-4.1M20.4 14l-4.1 1.1 1.1 4.1M3.6 14l4.1 1.1-1.1 4.1M20.4 10l-4.1-1.1 1.1-4.1'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M12 2v20M3.34 7l17.32 10M3.34 17 20.66 7M9 4l3 3 3-3M9 20l3-3 3 3M3.6 10l4.1-1.1-1.1-4.1M20.4 14l-4.1 1.1 1.1 4.1M3.6 14l4.1 1.1-1.1 4.1M20.4 10l-4.1-1.1 1.1-4.1'/%3E%3C/svg%3E") center / contain no-repeat; }
.site-dark .mobile-menu-links a[href="/new-year"], .site-dark .mobile-menu-links a[href="/new-year"][aria-current="page"] { color: #8ecbff; }
.site-nav a[href="/new-year"] { display: inline-flex; align-items: center; gap: 7px; color: #245a91; }
.site-dark.landing-mode .site-nav a[href="/new-year"] { color: #8ecbff; }
.account-dialog .account-intro { margin: 10px 0 16px; font-size: .85rem; line-height: 1.4; }
@media (prefers-reduced-motion: no-preference) {
  .mobile-menu[open] { animation: mobile-menu-enter .2s ease-out; }
  @keyframes mobile-menu-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
}

/* Лёгкий снег только на странице новогодней подборки. */
body[data-page="new-year"] .season-snow { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; color: #245a91; }
body[data-page="new-year"] .shell { z-index: 1; }
.season-snow span { position: absolute; top: 0; left: var(--snow-x); color: inherit; font-size: var(--snow-size); line-height: 1; opacity: .3; animation: season-snow-fall var(--snow-duration) linear var(--snow-delay) infinite; }
body.site-dark[data-page="new-year"] .season-snow { color: #8ecbff; }
@keyframes season-snow-fall { from { transform: translate3d(0, -6vh, 0) rotate(0deg); } to { transform: translate3d(12px, 106vh, 0) rotate(120deg); } }
@media (max-width: 760px) {
  .season-snow span { opacity: .52; }
  .season-snow span:nth-child(n + 13) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .season-snow span { animation: none; transform: none; }
  .season-snow span:nth-child(12n + 1) { top: 5%; }
  .season-snow span:nth-child(12n + 2) { top: 13%; }
  .season-snow span:nth-child(12n + 3) { top: 21%; }
  .season-snow span:nth-child(12n + 4) { top: 29%; }
  .season-snow span:nth-child(12n + 5) { top: 37%; }
  .season-snow span:nth-child(12n + 6) { top: 45%; }
  .season-snow span:nth-child(12n + 7) { top: 53%; }
  .season-snow span:nth-child(12n + 8) { top: 61%; }
  .season-snow span:nth-child(12n + 9) { top: 69%; }
  .season-snow span:nth-child(12n + 10) { top: 77%; }
  .season-snow span:nth-child(12n + 11) { top: 85%; }
  .season-snow span:nth-child(12n + 12) { top: 93%; }
}
