/* 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; }
/* Website + studio panel. Clean, light by default; dark via toggle or system. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body.site { display: flex; flex-direction: column; margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -.02em; font-weight: 800; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding-inline: 24px; }

/* header */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 18px; min-height: 66px; padding-block: 8px; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--font); letter-spacing: -.02em; }
.logo svg { width: 32px; height: 32px; flex: none; }
.nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; align-items: center; }
.nav-links { display: flex; gap: 2px; align-items: center; }
.nav-links .nav-studio { display: none; }
.nav-links .nav-login { color: var(--text); font-weight: 600; }
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; padding: 0 11px; flex-direction: column; justify-content: center; gap: 5px; }
.menu-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); transition: transform .25s; }
.menu-open .menu-toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
@media (max-width: 760px) {
  .top .wrap { flex-wrap: nowrap; }
  .nav { gap: 6px; }
  .menu-toggle { display: inline-flex; }
  .nav-links { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 16px;
    background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
  .menu-open .nav-links { display: flex; animation: drop .2s ease-out; }
  .nav-links a { padding: 12px 10px; font-size: 17px; }
  .nav-links .nav-studio { display: block; color: var(--primary); font-weight: 600; }
  .nav { flex-wrap: nowrap; }
  .head-cta { display: none !important; }
  .theme-toggle { margin: 0; }
}
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.nav a { text-decoration: none; font-weight: 500; color: var(--muted); padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a.on { color: var(--text); background: var(--bg-alt); }
.lang-menu { position: relative; margin-left: 4px; }
.lang-menu summary { list-style: none; cursor: pointer; padding: 8px 10px; border-radius: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary::after { content: "▾"; margin-left: 5px; font-size: 11px; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--text); background: var(--bg-alt); }
.lang-list { position: absolute; right: 0; top: calc(100% + 6px); min-width: 170px; padding: 6px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 40; }
.lang-list a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text) !important; }
.lang-list a.on { background: var(--primary-soft); color: var(--primary) !important; font-weight: 600; }
.theme-toggle { width: 40px; height: 40px; margin: 0 6px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.theme-toggle:hover { border-color: var(--border-strong); }
.theme-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* buttons */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 11px 20px; font: 600 16px/1.2 var(--font); color: var(--text); background: var(--surface);
  transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn.primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn.danger:hover { background: color-mix(in srgb, var(--danger) 10%, transparent); border-color: var(--danger); }
.btn.big { font-size: 17px; padding: 14px 26px; border-radius: 14px; }
.btn.small { font-size: 14px; padding: 8px 14px; border-radius: 10px; }
form.inline { display: inline; margin: 0; }

/* surfaces & text */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; }
.badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font: 600 14px/1.2 var(--font); }
.muted { color: var(--muted); }
.mark { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: .13em; text-underline-offset: .12em; text-decoration-skip-ink: none; }
.section { padding-block: 72px; }
.section.alt { background: var(--bg-alt); border-block: 1px solid var(--border); }
.section h2 { font-size: clamp(32px, 4.4vw, 48px); }
.section .intro { color: var(--muted); max-width: 40em; margin: 14px 0 0; font-size: 18px; }
.center { text-align: center; }
.center .intro { margin-inline: auto; }

/* hero: centred text + a row of live game screens */
.hero { padding-block: 64px 24px; text-align: center; }
.hero h1 { font-size: clamp(42px, 6.2vw, 76px); margin: 22px auto 0; max-width: 14em; }
.hero .lead { font-size: 20px; color: var(--muted); max-width: 36em; margin: 22px auto 30px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero .fine { margin-top: 14px; font-size: 14px; color: var(--faint); }
.stage-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; align-items: end; max-width: 980px; margin: 52px auto 0; }
.stage-row .screen:nth-child(2) { transform: translateY(-28px); }
.screen { position: relative; width: 100%; aspect-ratio: 9 / 16; border-radius: 26px; overflow: hidden; background: var(--g-bg); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); }
/* Each game frame rounds its own corners too: Chrome does not always clip an
   iframe to its parent's rounded corners, and the game page behind is black. */
.screen iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; }
/* A demo screen stays empty (its own background) until the game inside has
   drawn itself, then fades in: no half-loaded frames (site.js). */
.js iframe[data-demo] { transition: opacity .45s ease; }
.js iframe[data-demo]:not(.ready) { opacity: 0 !important; }
.screen-cap { margin-top: 14px; font-weight: 600; color: var(--muted); font-size: 15px; text-align: center; }
.screen-cap a { text-decoration: none; }
.screen-cap a:hover { color: var(--text); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 40px; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); }
.steps > div { padding: 28px; }
.steps > div + div { border-left: 1px solid var(--border); }
.steps .n { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--primary); color: var(--on-primary); }
.steps h3 { margin: 18px 0 8px; font-size: 21px; }
.steps p { margin: 0; color: var(--muted); }

/* games: horizontal cards */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 40px; }
.game-card { display: grid; grid-template-columns: 200px minmax(0, 1fr); text-decoration: none; overflow: hidden; border-radius: 20px; background: var(--surface); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.game-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.game-card .art { display: grid; place-items: center; background: var(--g-bg); padding: 18px; }
.game-card .body { padding: 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.game-card h3 { font-size: 24px; }
.game-card p { margin: 0; color: var(--muted); font-size: 16px; }
.game-card .go { margin-top: auto; padding-top: 8px; font-weight: 600; font-size: 15px; color: var(--primary); }
.game-card .ext { color: var(--muted); }
/* «Нові ігри в розробці»: a quiet card and line, not a link */
.game-card.soon { background: transparent; border: 1.5px dashed var(--border-strong); box-shadow: none; transform: none; }
.game-card.soon .art { background: transparent; }
.game-card.soon .go { color: var(--muted); }
.mini-soon { display: flex; gap: 8px; }
.mini-soon span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 2px dashed var(--border-strong); color: var(--muted); font: 700 24px/1 var(--font); }
.mini-soon span:nth-child(2) { width: 48px; height: 48px; margin-top: -4px; border-color: var(--primary); color: var(--primary); }
.soon-line { display: flex; align-items: center; gap: 12px; margin: 20px 0 0; padding: 14px 18px; border: 1.5px dashed var(--border-strong); border-radius: 16px; color: var(--muted); font-size: 15px; line-height: 1.4; }
.soon-line b { color: var(--text); font-weight: 600; }
.soon-line svg { flex: none; width: 22px; height: 22px; fill: var(--primary); }
.mini { display: flex; gap: 5px; }
.mini .t { width: 30px; height: 30px; border-radius: 7px; display: grid; place-items: center; font: 800 15px/1 var(--font); text-transform: uppercase; background: var(--g-surface-2); color: var(--g-text); }
.mini .hit { background: var(--g-blue); color: #fff; }
.mini .near { background: var(--g-yellow); color: #1d1600; }
.mini .miss { background: #192038; color: #56617f; }
.mini .open { background: #fff; color: #0e1322; }
.mini .q { background: var(--g-surface); box-shadow: inset 0 0 0 2px var(--g-line); color: var(--g-faint); }
.mini-flag { width: 120px; height: 90px; border-radius: 10px; overflow: hidden; }
.mini-flag img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-vote { display: flex; gap: 8px; }
.mini-vote span { width: 76px; padding: 10px; border-radius: 12px; font: 600 12px/1.15 var(--font); }
.mini-vote span b { display: block; font-size: 22px; line-height: 1; margin-bottom: 6px; }
.mini-vote .one { background: var(--g-blue); color: #fff; } .mini-vote .two { background: var(--g-yellow); color: #1d1600; }
/* «Емодзі-ребуси»: a small copy of the game's card, a dotted sheet in the films
   colour with white stickers (fits the 164 px art box). */
.mini-emoji { display: flex; align-items: center; justify-content: center; gap: 6px; width: 150px; height: 104px; border-radius: 20px;
  background-color: rgb(224, 82, 90);
  background-image: radial-gradient(rgba(255, 255, 255, .18) 1.6px, transparent 2px), radial-gradient(rgba(0, 0, 0, .08) 1.6px, transparent 2px);
  background-size: 16px 16px; background-position: 0 0, 8px 8px; box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .12);
  font: 26px/1 "Viewercade Emoji", "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif; }
.mini-emoji span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .14), 0 8px 14px -8px rgba(0, 0, 0, .5); transform: rotate(-4deg);
  transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.mini-emoji span:nth-child(2) { transform: rotate(3deg); }
.mini-emoji span:nth-child(3) { transform: rotate(-1.5deg); }
.game-card:hover .mini-emoji span { transform: translateY(-4px) rotate(-8deg); }
.game-card:hover .mini-emoji span:nth-child(2) { transform: translateY(-6px) rotate(6deg); transition-delay: .05s; }
.game-card:hover .mini-emoji span:nth-child(3) { transform: translateY(-4px) rotate(-4deg); transition-delay: .1s; }
/* «Словозв'яз»: guesses as on its stream overlay, a coloured bar per word that
   is longer and greener the closer the word is to the hidden one. */
.mini-rank { display: grid; gap: 6px; width: 150px; }
.mini-rank span { position: relative; isolation: isolate; overflow: hidden; display: flex; align-items: center; justify-content: space-between;
  height: 30px; padding: 0 10px; border-radius: 8px; background: var(--g-surface); color: #fff; font: 700 13px/1 var(--font);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.mini-rank span::before { content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1; width: var(--w); background: var(--c); }
.mini-rank .near { --w: 88%; --c: #4bae6a; }
.mini-rank .mid { --w: 56%; --c: #e0a526; }
.mini-rank .far { --w: 36%; --c: #e0525a; }
.game-card:hover .mini-rank span::before { animation: rank-fill .7s cubic-bezier(.2, .8, .3, 1) both; }
.game-card:hover .mini-rank span:nth-child(2)::before { animation-delay: .08s; }
.game-card:hover .mini-rank span:nth-child(3)::before { animation-delay: .16s; }
@keyframes rank-fill { from { width: 0; } }
/* The light look: game cards show the games' day theme (as the demos do). */
:root[data-theme="light"] .game-card .art {
  --g-bg: #eef2f9; --g-surface: #ffffff; --g-surface-2: #e6ebf5; --g-line: #d6deeb; --g-text: #0e1322; --g-faint: #9aa3b8;
  background: var(--g-bg); }
:root[data-theme="light"] .mini .miss { background: #dfe5f0; color: #8d96aa; }
:root[data-theme="light"] .mini .open { background: #0e1322; color: #fff; }
:root[data-theme="light"] .mini-rank span { color: var(--g-text); text-shadow: none; box-shadow: inset 0 0 0 1px var(--g-line); }

/* featured main game */
.featured { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: center;
  margin-top: 40px; padding: 40px 44px; border-radius: 28px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.featured::before { content: ""; position: absolute; width: 460px; height: 460px; right: -80px; top: -120px; border-radius: 50%; filter: blur(80px); opacity: .35;
  background: radial-gradient(circle, var(--primary), transparent 70%); pointer-events: none; }
.featured > * { position: relative; }
.featured h3 { font-size: clamp(36px, 4.6vw, 56px); letter-spacing: -.03em; margin: 16px 0 12px; }
.featured .pitch { color: var(--muted); font-size: 18px; margin: 0 0 20px; max-width: 34em; }
.featured-points { list-style: none; padding: 0; margin: 0 0 26px; display: grid; gap: 10px; }
.featured-points li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); }
.featured-points b { color: var(--text); white-space: nowrap; }
.featured .cta { display: flex; gap: 12px; flex-wrap: wrap; }
.featured-screen .screen { width: min(300px, 100%); margin-left: auto; transform: rotate(2deg); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.featured:hover .featured-screen .screen { transform: none; }
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; padding: 28px 22px; }
  .featured-screen .screen { margin: 0 auto; transform: none; }
}

/* features */
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 40px; margin-top: 44px; }
.feature .icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.feature .icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { margin: 16px 0 6px; font-size: 19px; letter-spacing: -.01em; }
.feature p { margin: 0; color: var(--muted); }

/* faq */
.faq { display: grid; gap: 0; max-width: 820px; margin: 36px auto 0; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 18px 4px; }
.faq summary { cursor: pointer; font: 600 18px/1.4 var(--font); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 24px; line-height: 1; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 10px 0 2px; color: var(--muted); }

/* final call */
.cta-band { padding-block: 24px 80px; }
.cta-band .inner { border-radius: 28px; padding: 56px 32px; text-align: center; background: var(--primary); color: #fff; position: relative; overflow: hidden; }
.cta-band .inner::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--accent); }
.cta-band h2 { font-size: clamp(30px, 4.4vw, 48px); }
.cta-band p { margin: 12px 0 26px; opacity: .85; font-size: 18px; }

/* The page is a column: on short pages the footer sits at the bottom of the
   window instead of leaving an empty band under it. */
body.site > * { min-width: 0; }
.foot-site { margin-top: auto; border-top: 1px solid var(--border); padding-block: 40px 22px; font-size: 14.5px; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)) minmax(0, 1.3fr); gap: 28px 32px; }
.foot-logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; font: 800 19px/1 var(--font); letter-spacing: -.02em; }
.foot-logo svg { width: 28px; height: 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 30ch; color: var(--faint); font-size: 14px; line-height: 1.55; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.foot-col h2 { margin: 2px 0 4px; font: 700 13px/1.2 var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--text); }
.foot-col a { color: var(--muted); text-decoration: none; line-height: 1.35; }
.foot-col a:hover { color: var(--text); }
.foot-contact { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.foot-contact svg, .help-ico svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--faint); }
.foot-credits { opacity: .85; }
@media (max-width: 960px) {
  .foot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) { .foot-contacts { grid-column: 1 / -1; } }

/* documents: terms of use and privacy policy */
.legal-wrap { max-width: 760px; }
.legal-kicker { margin: 0; font-weight: 600; font-size: 14px; color: var(--primary); }
.legal h1 { font-size: clamp(34px, 4.6vw, 48px); margin-top: 8px; }
.legal-date { margin: 8px 0 0; color: var(--faint); font-size: 15px; }
.legal-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.legal-switch a { padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; }
.legal-switch a:hover { color: var(--text); border-color: var(--border-strong); }
.legal-switch a.on { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.legal-body { margin-top: 32px; font-size: 16.5px; line-height: 1.7; color: var(--muted); }
.legal-body h2 { margin: 36px 0 10px; font-size: 21px; color: var(--text); }
.legal-body p { margin: 0 0 14px; }
.legal-body ul { margin: 0 0 14px; padding-left: 22px; }
.legal-body li { margin-bottom: 6px; }
.legal-body b { color: var(--text); font-weight: 600; }
.legal-body a { color: var(--primary); }

/* game page */
.game-hero { padding-block: 48px 72px; }
.game-hero .wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 56px; align-items: start; }
.crumbs { font-size: 14px; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--text); }
.game-hero h1 { font-size: clamp(40px, 5.6vw, 64px); margin: 14px 0 16px; }
.game-hero .lead { font-size: 20px; color: var(--muted); margin: 0 0 26px; }
.block-title { font-size: 30px; margin: 52px 0 18px; }
.how { display: grid; gap: 0; border-top: 1px solid var(--border); }
.how > div { display: grid; grid-template-columns: 40px 1fr; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--border); }
.how .n { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--primary-soft); color: var(--primary); }
.how h3 { font-size: 18px; margin-bottom: 4px; letter-spacing: -.01em; }
.how p { margin: 0; color: var(--muted); }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table th { font: 600 13px/1 var(--font); color: var(--faint); }
.table td:nth-child(3) { color: var(--muted); }
.coin-s { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font: 800 15px/1 var(--font); }
.sticky-demo { position: sticky; top: 90px; }
.demo-note { text-align: center; color: var(--faint); font-size: 14px; margin-top: 14px; }

/* demo wall */
/* The first row of phones and their names fit the first screen: the phones
   shrink on short screens (down to 170px), three to a row at most. */
.demo-page { padding-top: 40px; }
.demo-page h1 { font-size: clamp(34px, 4vw, 48px); }
.demo-page .intro { max-width: none; margin-top: 8px; }
.demo-wall { --tile: clamp(170px, calc((100svh - 360px) * 9 / 16), 300px); max-width: calc(3 * var(--tile) + 80px);
  display: flex; flex-wrap: wrap; justify-content: center; gap: 48px 40px; margin: 32px auto 0; }
.demo-tile { width: min(var(--tile), 100%); container-type: inline-size; }
@container (max-width: 250px) {
  .demo-info { margin-top: 14px; }
  .demo-info .sc-ico { display: none; }
  .demo-info h3 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .demo-info p { font-size: 13px; }
}
@media (max-width: 720px) { .demo-wall { --tile: 300px; } }
.demo-tile .screen { transition: translate .3s, box-shadow .3s; }
.demo-tile:hover .screen, .demo-tile:focus-within .screen { translate: 0 -4px; box-shadow: var(--shadow-lg), 0 30px 60px -30px rgba(47, 111, 214, .45); }
.demo-hint { position: absolute; left: 50%; bottom: 22px; translate: -50% 8px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  padding: 10px 16px; border-radius: 999px; background: var(--primary); color: #fff; font: 600 14px/1 var(--font); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55);
  opacity: 0; transition: opacity .2s, translate .2s; pointer-events: none; }
.demo-hint svg { width: 14px; height: 14px; fill: currentColor; }
.demo-tile:hover .demo-hint, .screen-link:focus-visible .demo-hint { opacity: 1; translate: -50% 0; }
.demo-info { display: flex; align-items: center; gap: 12px; margin-top: 20px; }
.demo-info > div { min-width: 0; }
.demo-info .sc-ico { flex: none; width: 40px; height: 40px; transform: none; }
.demo-info h3 { font-size: 20px; line-height: 1.2; }
.demo-info h3 a { color: inherit; text-decoration: none; }
.demo-info h3 a:hover { color: var(--primary); }
.demo-info p { margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.35; }

/* studio start */
.center-card { max-width: 620px; margin: 72px auto; text-align: center; padding: 44px 32px; }
.center-card h1 { font-size: clamp(34px, 5vw, 48px); margin: 16px 0 12px; }

@media (max-width: 960px) {
  .stage-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .games { grid-template-columns: 1fr; }
  .game-hero .wrap { grid-template-columns: 1fr; }
  .sticky-demo { position: static; max-width: 320px; margin: 0 auto; }
}
@media (max-width: 720px) {
  .steps { grid-template-columns: 1fr; }
  .steps > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .features { grid-template-columns: 1fr; }
  .stage-row { grid-template-columns: 1fr; max-width: 300px; }
  .stage-row .screen:nth-child(n+2) { display: none; }
  .stage-row .screen:nth-child(2) { transform: none; }
  .game-card { grid-template-columns: 1fr; }
  .game-card .art { min-height: 130px; }
}


/* ── motion & polish ─────────────────────────────────────────────── */
.btn svg { width: 18px; height: 18px; flex: none; }
.btn .i-arrow { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s cubic-bezier(.3,1.6,.5,1); }
.btn:hover .i-arrow { transform: translateX(4px); }
.btn .i-play { fill: currentColor; transition: transform .25s; }
.btn:hover .i-play { transform: scale(1.15); }
.btn.primary::after, .btn.accent::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); transition: left .6s ease; }
.btn.primary:hover::after, .btn.accent:hover::after { left: 120%; }
.btn.primary { box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--primary) 80%, transparent); }
.logo .dot1, .logo .dot2, .logo .dot3 { animation: typing 1.4s ease-in-out infinite; }
.logo .dot2 { animation-delay: .18s; } .logo .dot3 { animation-delay: .36s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-2.5px); } }

/* hero */
.hero { position: relative; overflow: hidden; padding-block: 56px 64px; text-align: left; }
.hero-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.hero-glow i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.hero-glow .g1 { width: 520px; height: 520px; right: 4%; top: -120px; background: color-mix(in srgb, var(--primary) 45%, transparent); animation: orb 16s ease-in-out infinite alternate; }
.hero-glow .g2 { width: 380px; height: 380px; right: 26%; bottom: -140px; background: color-mix(in srgb, var(--accent) 55%, transparent); animation: orb 21s ease-in-out infinite alternate-reverse; }
:root[data-theme="dark"] .hero-glow i { opacity: .28; }
@keyframes orb { from { transform: translate(0, 0) scale(1); } to { transform: translate(-60px, 40px) scale(1.12); } }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(42px, 5.6vw, 72px); margin: 22px 0 0; max-width: 11em; }
.hero .lead { margin: 22px 0 30px; max-width: 34em; }
.hero .cta { justify-content: flex-start; }
.live-pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: 14px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: border-color .2s; }
.live-pill:hover { border-color: var(--border-strong); }
.live-pill .arrow { color: var(--muted); transition: transform .25s; }
.live-pill:hover .arrow { transform: translateX(3px); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4d57; box-shadow: 0 0 0 0 rgba(255,77,87,.6); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(255,77,87,.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255,77,87,0); } }
.checks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: 15px; }
.checks li { display: inline-flex; align-items: center; gap: 8px; }
.checks li::before { content: ""; width: 18px; height: 18px; border-radius: 50%; flex: none;
  background: var(--primary-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5.5 10.5l3 3 6-7' fill='none' stroke='%232f6bff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/></svg>") center / 14px no-repeat; }

/* showcase: game list + one live screen */
.showcase { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 22px; align-items: center; }
.sc-tabs { display: grid; gap: 8px; }
.sc-tab { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; text-align: left; cursor: pointer; overflow: hidden;
  padding: 12px 14px 14px; border-radius: 16px; border: 1px solid transparent; background: transparent; color: var(--text); font: inherit; transition: background .25s, border-color .25s, transform .25s; }
.sc-tab:hover { background: var(--surface); border-color: var(--border); }
.sc-tab.on { background: var(--surface); border-color: var(--border); box-shadow: var(--shadow); transform: translateX(-4px); }
.sc-text b { display: block; font-weight: 700; font-size: 16px; }
.sc-text small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .35s, opacity .35s; }
.sc-tab.on .sc-text small { max-height: 56px; opacity: 1; }
.sc-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--border); opacity: 0; transition: opacity .2s; }
.sc-tab.on .sc-bar { opacity: 1; }
.sc-bar i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--primary); }
.sc-tab.on .sc-bar i { animation: fill var(--sc-time, 9s) linear forwards; }
.showcase.paused .sc-tab.on .sc-bar i { animation-play-state: paused; }
@keyframes fill { to { width: 100%; } }
.sc-ico { width: 40px; height: 40px; border-radius: 12px; grid-row: 1 / 3; background: var(--g-bg); display: grid; place-items: center; }
.sc-ico svg { width: 40px; height: 40px; display: block; }
/* Game icons (site and dashboard) in the light look: a white tile, lighter greys. */
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) { background: #fff; border-color: var(--border); box-shadow: inset 0 0 0 1px var(--border); }
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) .ic-dim { fill: #d7dbe4; }
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) .ic-disc { fill: #fff; }
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) .ic-ink { fill: #1d2230; }
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) .ic-pole { stroke: #8a93a3; }
:root[data-theme="light"] :is(.sc-ico, .dgame-ico) .ic-gap { stroke: #fff; }
.sc-stage { position: relative; width: 300px; }
.sc-screen { position: relative; width: 300px; aspect-ratio: 9 / 16; border-radius: 30px; overflow: hidden; background: var(--g-bg); box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong);
  transform: perspective(1200px) rotateY(-8deg) rotateX(2deg); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.sc-stage:hover .sc-screen { transform: perspective(1200px) rotateY(0) rotateX(0); }
.sc-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: inherit; opacity: 0; transition: opacity .5s; pointer-events: none; }
.sc-frame.on { opacity: 1; pointer-events: auto; }

/* ticker */

/* counters */
.stats { padding-block: 64px 0; }
/* Hero: streamers whose chats play «Словозв'яз» the most, one drifting line of
   avatars and nicks. It stops under the pointer; with reduced motion it is a
   plain line to scroll by hand. */
.hero-copy { min-width: 0; }   /* the long line must not widen the hero column on phones */
.streamers { margin-top: 30px; min-width: 0; }
.streamers-label { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--muted); }
.streamers-strip { overflow: hidden; padding-block: 2px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.streamers-track { display: flex; gap: 10px; width: max-content; margin: 0; padding: 0; list-style: none;
  animation: streamers var(--strip-time, 40s) linear infinite; }
.streamers-strip:hover .streamers-track, .streamers-strip:focus-within .streamers-track { animation-play-state: paused; }
@keyframes streamers { to { transform: translateX(calc(-50% - 5px)); } }   /* half the track + half a gap */
.streamers-track a { display: flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none;
  font-size: 15px; font-weight: 600; white-space: nowrap; transition: border-color .15s; }
.streamers-track a:hover { border-color: var(--border-strong); }
.streamers-track img, .streamers-track .st-ava { width: 32px; height: 32px; flex: none; border-radius: 50%; object-fit: cover; }
.streamers-track .st-ava { display: grid; place-items: center; color: #fff; font: 800 14px/1 var(--font); }
@media (prefers-reduced-motion: reduce) {
  .streamers-strip { overflow-x: auto; }
  .streamers-track { animation: none; }
  .streamers-track li[aria-hidden] { display: none; }
}
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stats-grid > div { padding: 20px 22px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.stats b { display: block; font-size: clamp(34px, 4vw, 48px); font-weight: 800; letter-spacing: -.03em; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 8px; color: var(--muted); font-size: 15px; }

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

/* game cards come alive on hover */
.game-card .art > * { transition: transform .4s cubic-bezier(.3,1.5,.5,1); }
.game-card:hover .art > * { transform: scale(1.06); }
.game-card:hover .mini .t { animation: tile-flip .5s ease both; }
.game-card:hover .mini .t:nth-child(2) { animation-delay: .06s; } .game-card:hover .mini .t:nth-child(3) { animation-delay: .12s; }
.game-card:hover .mini .t:nth-child(4) { animation-delay: .18s; } .game-card:hover .mini .t:nth-child(5) { animation-delay: .24s; }
@keyframes tile-flip { 50% { transform: rotateX(90deg); } }
.game-card .go { transition: transform .25s; display: inline-block; }
.game-card:hover .go { transform: translateX(4px); }
.mini-flags { position: relative; width: 120px; height: 90px; }
.mini-flags img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 10px; opacity: 0; animation: flags 10s infinite; }
.mini-flags img:nth-child(2) { animation-delay: 2.5s; } .mini-flags img:nth-child(3) { animation-delay: 5s; } .mini-flags img:nth-child(4) { animation-delay: 7.5s; }
@keyframes flags { 0% { opacity: 0; transform: scale(.9) rotate(-4deg); } 5%, 25% { opacity: 1; transform: none; } 30%, 100% { opacity: 0; transform: scale(1.05) rotate(3deg); } }
.mini-vote span { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.game-card:hover .mini-vote .one { transform: translateY(-6px) rotate(-3deg); }
.game-card:hover .mini-vote .two { transform: translateY(4px) rotate(3deg); }

@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: none; }
  .showcase { justify-content: center; }
}
@media (max-width: 720px) {
  .showcase { grid-template-columns: 1fr; justify-items: center; }
  .sc-tabs { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; width: 100%; padding-bottom: 4px; }
  .sc-tab { grid-template-columns: 30px auto; padding: 8px 12px 12px; }
  .sc-tab.on { transform: none; }
  .sc-ico { width: 30px; height: 30px; transform: scale(.75); transform-origin: left center; }
  .sc-text small { display: none; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}


/* ── Slovozviaz styling details ─────────────────────────────────── */
body.site { font-feature-settings: "cv02", "cv03", "cv04", "cv11"; }
h1, h2, h3 { letter-spacing: -.025em; }
.card, .game-card, .steps, .stats-grid > div, .featured, .faq details { border-radius: 16px; }
.btn.primary { box-shadow: none; }
:root[data-theme="dark"] .btn.primary { background: var(--primary-soft); border-color: #35558a; color: #e6eeff; }
:root[data-theme="dark"] .btn.primary:hover { background: var(--primary-soft-hover); border-color: #4a6ea8; }
:root[data-theme="dark"] .btn { background: var(--surface-2); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn.primary { background: var(--primary-soft); border-color: #35558a; color: #e6eeff; }
  :root:not([data-theme="light"]) .btn { background: var(--surface-2); }
}
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.live-pill, .badge { border-radius: 10px; }
.cta-band .inner { background: var(--primary); }
.cta-band .inner::after { background: var(--accent); }


/* ── calmer decoration: blue is the only accent, no yellow glow ─────── */
.hero-glow .g2 { display: none; }
.hero-glow .g1 { opacity: .35; }
:root[data-theme="light"] .hero-glow .g1 { opacity: .18; }
.cta-band .inner::after { display: none; }
:root[data-theme="light"] .featured::before { opacity: .12; }
:root[data-theme="light"] .sc-tab.on, :root[data-theme="light"] .live-pill { box-shadow: 0 1px 2px rgba(18,21,28,.06), 0 6px 18px -10px rgba(18,21,28,.25); }
/* In the light look the demos are light too: a light screen with a soft edge. */
:root[data-theme="light"] :is(.screen, .sc-screen) { background: #eef2f9; }
:root[data-theme="light"] .screen { border-color: var(--border-strong); }
.cta-band .btn.accent { background: #ffffff; border-color: #ffffff; color: var(--primary); }
.cta-band .btn.accent:hover { background: #eef3fd; border-color: #eef3fd; }
:root[data-theme="dark"] .cta-band .inner { background: var(--primary-soft); border: 1px solid #35558a; }

/* clicking a demo screen opens that game's page */
.sc-link, .screen-link { position: absolute; inset: 0; z-index: 3; border-radius: inherit; cursor: pointer; }
.sc-link:focus-visible, .screen-link:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }

/* Embedded game screens stay perfectly straight: any tilt or rotation makes
   the browser resample the iframe, which looks blurry/pixelated. */
.sc-screen, .sc-stage:hover .sc-screen { transform: none; }
/* On hover the phone lifts and glows. The lift moves the whole stage, not the
   rounded screen itself: moving the clipping screen could leave the game's
   frame a step behind for a moment, with a black corner past the rounded edge. */
.sc-stage { transition: translate .3s; }
.sc-stage:hover { translate: 0 -4px; }
.sc-screen { transition: box-shadow .3s; }
.sc-stage:hover .sc-screen { box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-strong), 0 30px 60px -30px rgba(47, 111, 214, .45); }
.featured-screen .screen, .featured:hover .featured-screen .screen { transform: none; }


/* ── home hero: a calmer heading, clear buttons, perks on one line ─────── */
.hero h1 { font-size: clamp(40px, 4.8vw, 64px); font-weight: 750; letter-spacing: -.03em; line-height: 1.04; max-width: 11em; }
.hero .lead { font-size: 19px; line-height: 1.55; max-width: 32em; }
.hero .cta .btn { height: 54px; padding: 0 24px; border-radius: 14px; font-size: 17px; }
.hero .cta .btn.primary, .game-hero .btn.primary.big { background: var(--primary); border-color: var(--primary); color: #fff; }
.hero .cta .btn.primary:hover, .game-hero .btn.primary.big:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.hero .cta .btn:not(.primary) { background: transparent; border-color: var(--border-strong); }
.hero .cta .btn:not(.primary):hover { background: var(--surface); border-color: var(--muted); }
.hero .checks { flex-wrap: nowrap; gap: 18px; font-size: 14.5px; white-space: nowrap; }
/* The top bar's main button matches the hero's (the old dark-theme navy looked disabled). */
.top .btn.primary.head-cta { background: var(--primary); border-color: var(--primary); color: #fff; }
.top .btn.primary.head-cta:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
@media (max-width: 560px) {
  .hero .cta .btn { flex: 1 1 100%; }
  .hero .checks { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* The first screen shows the hero alone, centred in the window: the next
   section comes into view once the visitor scrolls, and a small arrow at the
   bottom says there is more. Wide screens only: on narrower ones the hero is
   taller than the window anyway. 67px is the sticky header. */
.scroll-cue { display: none; position: absolute; left: 50%; bottom: 18px; z-index: 1; translate: -50% 0; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted);
  transition: color .15s, border-color .15s; animation: cue 2.4s ease-in-out infinite; }
.scroll-cue:hover { color: var(--text); border-color: var(--border-strong); }
.scroll-cue svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes cue { 50% { transform: translateY(5px); } }
@media (min-width: 1081px) and (min-height: 600px) {
  .hero { display: flex; flex-direction: column; justify-content: center; box-sizing: border-box;
    min-height: calc(100vh - 67px); min-height: calc(100svh - 67px); padding-block: 40px 76px; }
  .scroll-cue { display: grid; }
}
@media (prefers-reduced-motion: reduce) { .scroll-cue { animation: none; } }

/* Links within the page (the arrow, «Як це працює», «Питання») glide there. */
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
