/* Our own emoji (Noto Color Emoji, OFL-1.1; built by tools/build_emoji_font.py), so puzzles look
   the same on every computer: Windows 10 has no glyphs for newer emoji. */
@font-face { font-family: "Viewercade Emoji"; src: url("/static/fonts/emoji.woff2") format("woff2"); font-display: block; }
/* Streamer dashboard: sidebar, games grid, one control card per game.
   Same tokens as the site; game art takes the games' night or day palette. */
.dash { font-size: 15px; line-height: 1.5; --line-soft: color-mix(in srgb, var(--border) 70%, transparent); --field: var(--bg-alt);
  --tone-slovozviaz: #4bae6a; --tone-five-letters: #2f6fd6; --tone-word-start: #e0a526; --tone-flags: #1fb39a; --tone-emoji: #e0525a; --tone-choice: #2f6fd6; }
:root[data-theme="dark"] .dash, :root[data-theme="dark"] .auth-page { --field: #12151c; }
.dash h1 { font-size: 34px; letter-spacing: -.025em; }
.dash h2 { letter-spacing: -.015em; }

/* shell: a slim top bar with tabs; the page below is centred */
.dash-top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.dash-top-in { display: flex; align-items: center; gap: 28px; max-width: 1240px; height: 64px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
.dash-top .logo { font-size: 19px; flex: none; }
.dash-tabs { display: flex; align-items: stretch; gap: 4px; height: 100%; }
.dash-tabs a { position: relative; display: flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; transition: color .15s; }
.dash-tabs a:hover { color: var(--text); }
.dash-tabs a.on { color: var(--text); }
.dash-tabs a.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--primary); }
.dash-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.dash-tools .theme-toggle { width: 36px; height: 36px; margin: 0; border-radius: 10px; }
.dash-tools .theme-toggle svg { width: 18px; height: 18px; }
.dash-account { display: flex; align-items: center; gap: 2px; padding: 3px 3px 3px 4px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.dash-me { display: flex; align-items: center; gap: 8px; min-width: 0; text-decoration: none; color: var(--muted); }
.dash-me:hover { color: var(--text); }
.dash-avatar { width: 30px; height: 30px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--primary); color: #fff; font-weight: 800; font-size: 14px; }
.dash-avatar.big { width: 52px; height: 52px; border-radius: 14px; font-size: 22px; }
.dash-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.icon-btn { width: 34px; height: 34px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.icon-btn:hover { background: var(--surface); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.dash-main { min-width: 0; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 40px) 64px; }
.dash-head { margin-bottom: 22px; }
.dash-sub { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.back:hover { color: var(--text); }
.back svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.game-title { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.game-title > div:nth-child(2) { flex: 1; min-width: 240px; }
.head-actions { display: flex; gap: 8px; }
.head-actions .i-play { width: 14px; height: 14px; }

/* platform tabs */
.platforms { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.platforms button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: 600 14px/1.2 var(--font); cursor: pointer; }
.platforms button.on { background: var(--text); border-color: var(--text); color: var(--bg); }
.platforms button:disabled { cursor: default; color: var(--muted); }
.platforms small { font-size: 12px; font-weight: 500; color: var(--faint); }
.platforms svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }

/* games grid */
.dgames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.dgame { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); text-decoration: none; transition: transform .2s, box-shadow .2s, border-color .2s; }
.dgame.main { grid-column: span 2; }
.dgame:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.dgame-art { position: relative; height: 200px; display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--tone) 34%, transparent), transparent 60%), radial-gradient(60% 60% at 85% 0%, color-mix(in srgb, var(--tone) 16%, transparent), transparent 70%), var(--g-bg); }
.dgame-art > :first-child { transition: transform .45s cubic-bezier(.3, 1.4, .5, 1); }
.dgame:hover .dgame-art > :first-child { transform: scale(1.06); }
.dgame-tags { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font: 700 12px/1.3 var(--font); background: rgba(255, 255, 255, .1); color: #fff; backdrop-filter: blur(6px); }
.tag.star { background: var(--accent); color: var(--on-accent); }
.tag.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4bd07a; box-shadow: 0 0 0 3px rgba(75, 208, 122, .25); }
.dcard .tag.live, .plan .tag.live { background: var(--primary-soft); color: var(--primary); }
.dgame-body { display: flex; align-items: center; gap: 14px; padding: 16px 18px 18px; }
.dgame-ico { width: 46px; height: 46px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--g-bg); border: 1px solid var(--g-line); }
.dgame-ico svg { width: 42px; height: 42px; }
.dgame-ico.big { width: 60px; height: 60px; border-radius: 16px; }
.dgame-ico.big svg { width: 54px; height: 54px; }
.dgame-text { flex: 1; min-width: 0; }
.dgame-text h2 { font-size: 19px; }
.dgame-text p { margin: 3px 0 0; color: var(--muted); font-size: 14px; line-height: 1.4; }
.dgame .go { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-alt); color: var(--text); transition: background .2s, color .2s; }
.dgame:hover .go { background: var(--primary); color: #fff; }
.dgame .go svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.link-card { margin-top: 18px; }

/* card art (the games' own palette: night, or day in the light look) */
.da-rank { display: grid; gap: 6px; width: min(300px, 80%); }
.da-rank .r { position: relative; display: flex; justify-content: space-between; align-items: center; height: 28px; padding: 0 12px; border-radius: 8px; overflow: hidden; background: var(--g-surface); color: #fff; font: 700 13px/1 var(--font); text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.da-rank .r::before { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--w); background: #4bae6a; }
.da-rank .r.y::before { background: #e0a526; } .da-rank .r.x::before { background: #e0525a; }
.da-rank .r > * { position: relative; }
.da-rank .r b { order: 2; font-variant-numeric: tabular-nums; }
.da-rank .r:first-child { box-shadow: 0 0 0 2px #8fe0aa; }
.da-grid { display: grid; gap: 6px; }
.da-grid div { display: flex; gap: 6px; }
.da-grid i, .da-start i, .da-flags i, .da-emoji i { width: 34px; height: 38px; border-radius: 8px; display: grid; place-items: center; font: 800 17px/1 var(--font); font-style: normal; text-transform: uppercase; background: var(--g-surface-2); color: var(--g-text); }
.da-grid .g { background: var(--g-blue); color: #fff; } .da-grid .y { background: var(--g-yellow); color: #1d1600; } .da-grid .m { background: #1a1f2c; color: #56617f; }
.da-start, .da-flags, .da-emoji { display: grid; justify-items: center; gap: 16px; }
.da-start .cells, .da-flags .cells, .da-emoji .cells { display: flex; gap: 5px; }
.da-start .bubbles { display: flex; gap: 10px; }
.da-start .bubbles span { padding: 6px 12px; border-radius: 999px 999px 999px 4px; background: #fff; color: #12151c; font: 700 13px/1 var(--font); transform: rotate(-5deg); }
.da-start .bubbles .b2 { background: var(--g-yellow); color: #1d1600; border-radius: 999px 999px 4px 999px; transform: rotate(4deg) translateY(-6px); }
.da-start i, .da-flags i, .da-emoji i { width: 30px; height: 34px; font-size: 15px; background: var(--g-surface); box-shadow: inset 0 0 0 2px var(--g-line); color: var(--g-faint); }
.da-start i.o, .da-flags i.o, .da-emoji i.o { background: #fff; box-shadow: none; color: #0e1322; }
.da-flags .fan { position: relative; width: 210px; height: 92px; }
.da-emoji .sheet { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-radius: 22px; background-color: #e0525a;
  background-image: radial-gradient(rgba(255, 255, 255, .18) 2px, transparent 2.5px), radial-gradient(rgba(0, 0, 0, .08) 2px, transparent 2.5px);
  background-size: 20px 20px; background-position: 0 0, 10px 10px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 14px 30px -16px rgba(0, 0, 0, .6);
  font: 34px/1 "Viewercade Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.da-emoji .sheet span { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 14px; background: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .14), 0 8px 14px -8px rgba(0, 0, 0, .5); transform: rotate(-4deg); }
.da-emoji .sheet span:nth-child(2) { transform: rotate(3deg); }
.da-emoji .sheet span:nth-child(3) { transform: rotate(-1.5deg); }
.da-flags .fan img { position: absolute; top: 4px; width: 110px; height: 76px; object-fit: cover; border-radius: 10px; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .7); }
.da-flags .fan img:nth-child(1) { left: 0; transform: rotate(-12deg); }
.da-flags .fan img:nth-child(3) { right: 0; transform: rotate(12deg); }
.da-flags .fan img:nth-child(2) { left: 50px; top: 0; z-index: 1; transform: scale(1.08); }
/* The light look: the art takes the games' day theme, as the site's game cards do. */
:root[data-theme="light"] .dgame-art { --g-bg: #eef2f9; --g-surface: #ffffff; --g-surface-2: #e6ebf5; --g-line: #d6deeb; --g-text: #0e1322; --g-faint: #9aa3b8; }
:root[data-theme="light"] .da-rank .r { color: var(--g-text); text-shadow: none; box-shadow: inset 0 0 0 1px var(--g-line); }
:root[data-theme="light"] .da-rank .r::before { background: #9fdcb2; }
:root[data-theme="light"] .da-rank .r.y::before { background: #f4d58a; }
:root[data-theme="light"] .da-rank .r.x::before { background: #f4aeb1; }
:root[data-theme="light"] .da-rank .r:first-child { box-shadow: 0 0 0 2px #4bae6a; }
:root[data-theme="light"] :is(.da-start, .da-flags, .da-emoji) i.o { background: #0e1322; color: #fff; }
:root[data-theme="light"] .da-start .bubbles span:not(.b2) { box-shadow: 0 0 0 1px var(--g-line), 0 6px 14px -8px rgba(14, 19, 34, .35); }
:root[data-theme="light"] .da-flags .fan img { box-shadow: 0 0 0 1px var(--g-line), 0 12px 24px -12px rgba(14, 19, 34, .35); }
:root[data-theme="light"] .da-emoji .sheet { box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12), 0 14px 26px -16px rgba(14, 19, 34, .45); }
.da-vote { display: flex; gap: 10px; }
.da-vote > div { width: 112px; height: 140px; padding: 12px; border-radius: 16px; display: flex; flex-direction: column; color: #fff; }
.da-vote .one { background: linear-gradient(160deg, #3d7fe6, #1f4fa8); transform: rotate(-4deg); }
.da-vote .two { background: linear-gradient(160deg, #f0b63a, #c7841b); color: #1d1600; transform: rotate(4deg); }
.da-vote b { font-size: 28px; line-height: 1; }
.da-vote span { font-weight: 700; font-size: 13px; margin-top: 4px; }
.da-vote em { margin-top: auto; display: flex; flex-wrap: wrap; gap: 4px; }
.da-vote em i { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.da-vote .two em i { background: rgba(255, 255, 255, .9); }

/* control page: a banner, then setup steps + game on the left, settings on the right */
.game-banner { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; padding: 18px 20px; border-radius: 20px;
  border: 1px solid var(--border); background: linear-gradient(115deg, color-mix(in srgb, var(--tone) 18%, var(--surface)), var(--surface) 55%); }
.game-banner-text { flex: 1; min-width: 220px; }
.game-banner h1 { margin: 0; font-size: 30px; }
.game-banner p { margin: 2px 0 0; color: var(--muted); font-size: 16px; }
.head-actions .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* Both columns end on one line: the last card of the shorter one stretches. */
.dgame-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: stretch; }
.dgame-col { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
/* The shorter column shares the extra height among all its cards, so no card ends in a big gap. */
.dgame-col > * { flex: 1 1 auto; }
.dgame-col > .dcard + .dcard { margin-top: 0; }      /* the column's gap is the spacing */
.dcard.step { padding: 20px 22px; }
.step-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.step-n { display: grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 8px; background: var(--primary); color: #fff; font-size: 14px; font-weight: 800; }
.nick-at { margin: 0 8px 0 6px; color: var(--primary); font-size: 20px; font-weight: 800; }
@media (max-width: 1100px) {
  .dgame-layout { grid-template-columns: minmax(0, 1fr); }
  .game-col { order: -1; }        /* one column: the game controls come first */
}
.dcard { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; }
.dsec { padding: 20px 24px; }
.dsec + .dsec, .dcard > .dsec + .dsec, .other-game + .dsec { border-top: 1px solid var(--border); }
/* section headings: the icon sits in a tinted tile */
.dsec-title { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 15px; font-weight: 700; color: var(--text); }
.dsec-title svg { width: 28px; height: 28px; flex: none; padding: 5px; border-radius: 8px; background: var(--primary-soft); color: var(--primary);
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.other-game { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px 16px 12px 18px; border-radius: 14px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); font-size: 14px; }
.other-game > span { display: inline-flex; align-items: center; gap: 8px; }
.other-game svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; flex: none; }
.other-game + .dsec { border-top: 0; }

.drow-input { display: flex; gap: 8px; }
.drow-input > input, .drow-input > .nick-field { flex: 1; min-width: 0; }
.drow-input > .btn { flex: none; }
.drow-input .btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.drow-input .btn .i-arrow { stroke-width: 2.2; }
.btn.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.dinput { height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--field); color: var(--text); font: 500 15px/1.2 var(--font); width: 100%; transition: border-color .15s, box-shadow .15s; }
.dinput:focus, .nick-field:focus-within { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.dinput.mono { font: 500 13.5px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
.dinput.area { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; margin-top: 10px; }
.nick-field { display: flex; align-items: center; gap: 0; height: 52px; padding: 0 14px 0 8px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--field); cursor: text; }
.nick-brand { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #000; color: #fff; margin-right: 10px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); }
.nick-brand svg { width: 18px; height: 18px; }
.nick-prefix { color: var(--muted); font-weight: 500; font-size: 16px; }
.nick-field input { flex: 1; min-width: 0; border: 0; background: none; color: var(--text); font: 600 16px/1 var(--font); outline: none; padding: 0; }
#tt-form .btn { height: 52px; padding-inline: 22px; border-radius: 14px; }
.tt-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px; background: var(--bg-alt); }
.tt-ava { background: #000; }
.tt-who { flex: 1; min-width: 160px; display: grid; gap: 2px; }
.tt-who b { font-size: 16px; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.status.ok { color: var(--ok); } .status.ok i { background: #3fbf6b; box-shadow: 0 0 0 3px color-mix(in srgb, #3fbf6b 25%, transparent); animation: live-dot 1.6s ease-in-out infinite; }
.status.wait { color: #c58a1b; } .status.wait i { background: #e8a33a; }
.status.bad { color: var(--danger); } .status.bad i { background: var(--danger); }
@keyframes live-dot { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, #3fbf6b 0%, transparent); } }

.dnote { display: flex; align-items: baseline; gap: 7px; margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }
.dnote svg { width: 15px; height: 15px; flex: none; align-self: center; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.dnote.warn { color: #c58a1b; }
.dnote.center { justify-content: center; }
.phone { margin-top: 10px; font-size: 14px; }
.phone summary { cursor: pointer; color: var(--primary); font-weight: 600; width: max-content; }
.phone ol { margin: 8px 0 0; padding-left: 20px; color: var(--muted); }

.dstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 0 16px; }
.dstats > div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 4px 8px; border-left: 1px solid var(--border); }
.dstats > div:first-child { border-left: 0; }
.dstats dt { color: var(--muted); font-size: 13px; }
.dstats dd { margin: 0; max-width: 100%; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secret { max-width: 100%; padding: 0 4px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .05em; }
.secret:disabled { cursor: default; }
.secret.shown { letter-spacing: -.02em; color: var(--primary); }
.dactions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dactions .btn { font-size: 15px; padding: 11px 12px; background: var(--bg-alt); border-color: var(--border); }
.dactions .btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.dactions svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.own-word { margin-top: 10px; }
.dfeedback { margin: 10px 0 0; font-size: 14px; font-weight: 600; }
.dfeedback:empty { display: none; }
.dfeedback.ok { color: var(--ok); } .dfeedback.bad { color: var(--danger); } .dfeedback.wait { color: var(--muted); }
.dsub-row { margin-top: 12px; font-size: 13.5px; color: var(--muted); }
/* A card's title with a small action on the right (the «Гра» card's reset link). */
.dsec-head { display: flex; align-items: center; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; margin-bottom: 14px; }
.dsec-head .dsec-title { margin: 0; }
.dsec-head .dsub-row { margin: 0; }
.text-btn { border: 0; background: none; padding: 0; font: 600 13.5px/1.4 var(--font); color: var(--muted); cursor: pointer; }
.text-btn:hover { color: var(--text); text-decoration: underline; }
.text-btn.danger { color: var(--danger); }

.drows > .drow + .drow { border-top: 1px solid var(--line-soft); }
.drow { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; flex-wrap: wrap; }
.drow.wide { display: block; }
.drow-label { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 15px; font-weight: 500; }
.drow-label small { flex-basis: 100%; color: var(--muted); font-size: 13px; font-weight: 400; }
.drow-ctl { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.toggle { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { width: 42px; height: 24px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .18s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .18s; }
.toggle input:checked + i { background: var(--primary); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 30%, transparent); }

.seg { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 11px; background: var(--field); border: 1px solid var(--border); }
.seg button { padding: 6px 12px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 500 14px/1.2 var(--font); cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); font-weight: 700; box-shadow: 0 1px 2px rgba(0, 0, 0, .12), 0 0 0 1px var(--border); }
:root[data-theme="dark"] .seg button[aria-pressed="true"] { background: var(--surface-2); }
.dselect { appearance: none; -webkit-appearance: none; height: 38px; max-width: 300px; padding: 0 34px 0 12px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); font: 500 14px/1.2 var(--font); cursor: pointer;
  background: var(--field) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 8l4 4 4-4' fill='none' stroke='%239aa0ad' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center / 16px; }
.dselect option { background: var(--surface); color: var(--text); }
.price { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--field); font-size: 14px; transition: opacity .15s; cursor: text; }
.price > span { color: var(--muted); }
.price:focus-within { border-color: var(--primary); }
.price.off { opacity: .5; }
.price input { width: 5ch; padding: 0; border: 0; background: none; color: var(--text); font: 700 14px/1 var(--font); text-align: center; outline: none; }
@supports (field-sizing: content) { .price input { width: auto; min-width: 1ch; field-sizing: content; } }
.gift-ico { width: 30px; height: 30px; object-fit: contain; transition: opacity .15s, filter .15s; }
.gift-ico.off { opacity: .45; filter: grayscale(1); }

.tip { position: relative; display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid currentColor; color: var(--faint); font: 700 10.5px/1 Georgia, serif; font-style: italic; cursor: help; flex: none; }
.tip:hover, .tip:focus { color: var(--text); outline: none; }
/* The hint's box exists only while shown: a hidden one would still widen the page on phones. */
.tip::after { content: none; position: absolute; left: -10px; bottom: calc(100% + 8px); z-index: 20; width: max-content; max-width: min(300px, 70vw); padding: 10px 12px; border-radius: 10px; background: var(--text); color: var(--bg);
  font: 500 13px/1.45 var(--font); font-style: normal; text-transform: none; letter-spacing: 0; box-shadow: var(--shadow-lg); pointer-events: none; white-space: normal; }
.tip:hover::after, .tip:focus::after { content: attr(data-tip); animation: tip-in .15s ease-out; }
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }

input[type="range"] { accent-color: var(--primary); width: 130px; }

.is-other .dactions, .is-other .dstats { opacity: .55; }

/* learn / subscription / profile */
.dcard + .dcard { margin-top: 16px; }
.learn { padding: 6px 0; }
.learn-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.learn-steps li { display: flex; gap: 16px; padding: 18px 24px; counter-increment: step; }
.learn-steps li + li { border-top: 1px solid var(--border); }
.learn-steps li::before { content: counter(step); width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.learn-steps h2 { font-size: 18px; margin-top: 5px; }
.learn-steps p, .learn .dsec p, .learn ul { margin: 6px 0 0; color: var(--muted); }
.learn ul { padding-left: 20px; }
.learn a { color: var(--primary); }
.plan { padding: 26px 28px; max-width: 620px; }
.plan h2 { font-size: 28px; margin-top: 10px; }
.plan-price { margin: 4px 0 0; color: var(--muted); }
.plan-price b { font-size: 22px; color: var(--text); }
.plan-list { list-style: none; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.plan-list li { display: flex; gap: 10px; align-items: baseline; }
.plan-list li::before { content: ""; width: 16px; height: 9px; flex: none; border-left: 2.5px solid var(--ok); border-bottom: 2.5px solid var(--ok); transform: rotate(-45deg) translateY(-2px); }
.profile-who { display: flex; align-items: center; gap: 14px; }
.profile-who > div { display: grid; }
.profile-who .dnote { margin: 2px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 620px; }
.dfield { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.dfield + .dfield { margin-top: 12px; }
.form-grid .dfield + .dfield { margin-top: 0; }
form.dsec > .btn { margin-top: 14px; }
.dalert { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; font-weight: 600; }
.dalert.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.dalert.bad { background: color-mix(in srgb, var(--danger) 13%, transparent); color: var(--danger); }

/* login / register (inside the public site layout) */
.auth-page { --line-soft: var(--border); --field: var(--bg-alt); }
.auth { display: grid; place-items: center; padding: 64px 16px 96px; }
.auth-card { width: min(440px, 100%); padding: 34px 32px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 30px; }
.auth-card .dash-sub { font-size: 15px; margin-bottom: 22px; }
.auth-form { display: grid; }
.auth-form .btn { margin-top: 20px; width: 100%; }
.auth-form .dnote { margin-top: 6px; }
.dfield-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.dfield-row a { font-weight: 600; font-size: 13.5px; color: var(--primary); text-decoration: none; }
.dfield-row a:hover { text-decoration: underline; }
.auth-legal { margin: 16px 0 0; font-size: 13px; line-height: 1.5; color: var(--faint); text-align: center; }
.auth-legal a { color: var(--muted); }
.auth-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 18px; background: var(--primary-soft); color: var(--primary); }
.auth-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.auth-card .dash-sub b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.auth-card .dnote { display: block; line-height: 1.55; }
.auth-card .dnote a { color: var(--primary); }
.auth-wide { width: 100%; margin-top: 4px; }
.code-input { height: 58px; font: 700 26px/1 var(--font); letter-spacing: .45em; text-align: center; padding-left: .45em; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .45em; }
.verify-actions { display: flex; justify-content: center; gap: 22px; margin-top: 18px; }
.verify-actions form { margin: 0; }
.linklike { border: 0; background: none; padding: 0; font: 600 14px/1.4 var(--font); color: var(--primary); cursor: pointer; }
.linklike:hover { text-decoration: underline; }

/* bottom of every dashboard page: help in Telegram and the documents */
.dash-foot { margin-top: auto; width: 100%; max-width: 1240px; margin-inline: auto; padding: 0 clamp(16px, 4vw, 40px) 32px; }
.help-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.help-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.help-ico svg { width: 21px; height: 21px; }
.help-text { flex: 1; min-width: 0; display: grid; gap: 2px; }
.help-text b { font-size: 15.5px; }
.help-text span { color: var(--muted); font-size: 14px; line-height: 1.45; }
.help-text a { color: var(--primary); text-decoration: none; font-weight: 600; }
.help-text a:hover { text-decoration: underline; }
.help-card .btn { flex: none; }
.dash-foot-links { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-top: 16px; font-size: 13.5px; color: var(--faint); }
.dash-foot-links a { color: var(--faint); text-decoration: none; }
.dash-foot-links a:hover { color: var(--text); }
@media (max-width: 620px) { .help-card { flex-wrap: wrap; } .help-card .btn { width: 100%; } }
.auth-form .dinput::placeholder { color: var(--faint); font-weight: 400; }
.pass-field { position: relative; display: block; }
.pass-field .dinput { padding-right: 46px; }
.pass-eye { position: absolute; top: 50%; right: 6px; translate: 0 -50%; width: 36px; height: 36px; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--muted); cursor: pointer; }
.pass-eye:hover { color: var(--text); background: var(--bg-alt); }
.pass-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pass-eye[aria-pressed="false"] .slash { display: none; }
.auth-switch { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.auth-switch a { color: var(--primary); font-weight: 600; }

@media (max-width: 1180px) {
  .dgames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgame.main { grid-column: span 2; }
}
@media (max-width: 860px) {
  /* the tabs move to their own row under the logo */
  .dash-top-in { flex-wrap: wrap; height: auto; gap: 0 12px; padding-top: 10px; }
  .dash-tabs { order: 3; width: 100%; height: 44px; margin: 4px -12px 0; overflow-x: auto; }
  .dash-email { display: none; }
  .dash-main { padding: 24px 16px 48px; }
  .dash h1 { font-size: 28px; }
}
@media (max-width: 640px) {
  .dgames { grid-template-columns: 1fr; }
  .dgame.main { grid-column: auto; }
  .dgame-art { height: 220px; padding-top: 34px; }
  .dsec { padding: 16px; }
  .other-game { padding: 12px 16px; }
  .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 12px; }
  .dstats > div:nth-child(3) { border-left: 0; }
  .dactions { grid-template-columns: 1fr; }
  .nick-prefix { display: none; }
  #tt-form { flex-wrap: wrap; }
  #tt-form .btn { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .head-actions { width: 100%; }
  .drow-ctl { margin-left: 0; }
  .seg button { padding: 6px 9px; }
  .auth-card { padding: 26px 20px; }
}

/* «Свої питання» in «Що обереш?»: two options and «Додати», then the list of your questions */
.cq-form { display: flex; gap: 8px; margin-top: 10px; }
.cq-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px 0 10px; border-radius: 12px;
  border: 1px solid var(--border); background: var(--field); transition: border-color .15s, box-shadow .15s; cursor: text; }
.cq-field:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.cq-field input { flex: 1; min-width: 0; height: 100%; border: 0; padding: 0; background: none; color: var(--text); font: 500 15px/1.2 var(--font); outline: none; }
.cq-field b, .cq-opt b { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font: 800 13px/1 var(--font); color: #fff; }
.cq-field.one b, .cq-opt.one b { background: var(--g-blue); }
.cq-field.two b, .cq-opt.two b { background: var(--g-yellow); color: #1d1600; }
.cq-form .btn { flex: none; height: 46px; }
.cq-form .btn:disabled { opacity: .5; cursor: default; }
.cq .dnote { margin: 8px 0 0; }
.cq-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 330px; overflow-y: auto; }
.cq-list[hidden], .cq-count[hidden] { display: none; }
.cq-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 7px 6px 7px 10px; border-radius: 12px; background: var(--surface-2); }
.cq-opt { display: flex; align-items: center; gap: 8px; min-width: 0; font: 500 14px/1.3 var(--font); }
.cq-opt > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cq-del { width: 30px; height: 30px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: 400 22px/1 var(--font); cursor: pointer; }
.cq-del:hover, .cq-del:focus-visible { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
@media (max-width: 560px) {
  .cq-form { flex-wrap: wrap; }
  .cq-field { flex-basis: 100%; }
  .cq-form .btn { width: 100%; }
  .cq-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cq-opt.two { grid-row: 2; }
  .cq-del { grid-row: 1 / 3; grid-column: 2; }
}

/* A setting with several options on at once (e.g. the themes of «Емодзі-ребуси») */
.chip-toggles { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip-toggle { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--field); color: var(--muted);
  font: 600 14px/1 var(--font); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.chip-toggle:hover { border-color: var(--primary); }
.chip-toggle.on { background: color-mix(in srgb, var(--primary) 16%, var(--field)); border-color: var(--primary); color: var(--text); }
.chip-toggle.on::before { content: "✓ "; }
