/* PlaySelect — CyberPlay Arcade. Source design: design/canvas/*.dc.html (inline styles moved into classes). */

:root {
  --bg: #0A0A12;
  --canvas: #0F0F1A;
  --card: #171829;
  --elev: #22243D;
  --violet: #7A3BFF;
  --violet-2: #9E67FF;
  --cyan: #00F5D4;
  --coral: #FF3366;
  --amber: #FFB800;
  --lime: #76EE59;
  --blue: #00A3FF;
  --text: #F6F7FB;
  --text-2: #B5BAD3;
  --text-3: #8A90AD;
  --text-soft: #D6D9EA;
  --head: 'Space Grotesk', sans-serif;
  --body: 'Plus Jakarta Sans', system-ui, sans-serif;
  --grad-violet: linear-gradient(90deg, #7A3BFF, #9E67FF);
  --gap: 16px; /* space between neighbouring boxes, everywhere */
}

/* ---------- Base ---------- */
body { margin: 0; background: var(--bg); }
a { color: var(--cyan); text-decoration: none; }
a:not([class]):hover, a.link:hover { color: #7CFFEA; }
[x-cloak] { display: none !important; }

/* "Soon" items (soon_attrs() in app/lib/view.php): same look and hover as live ones, a tag on hover/focus/tap,
   no navigation (app.js). The tag sits top-right on tiles and cards, at the right end of rows and buttons. */
[data-soon] { position: relative; }
[data-soon][aria-disabled] { cursor: not-allowed; } /* beats .btn / .icon-btn cursor: pointer */
[data-soon]::after { content: attr(data-soon); position: absolute; z-index: 3; right: 8px; top: 50%; transform: translateY(-50%) scale(.9); padding: 3px 8px; border-radius: 999px; background: rgba(10,10,18,.9); border: 1px solid rgba(255,184,0,.55); color: var(--amber); font-family: var(--head); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .15s ease, transform .15s ease; }
[data-soon]:hover::after, [data-soon]:focus-visible::after, [data-soon].is-soon-flash::after { opacity: 1; transform: translateY(-50%) scale(1); }
.tile[data-soon]::after, .fgame[data-soon]::after { top: 10px; transform: scale(.9); }
.tile.similar__item[data-soon]::after { top: 50%; transform: translateY(-50%) scale(.9); }
.tile.similar__item[data-soon]:hover::after, .tile.similar__item[data-soon].is-soon-flash::after { transform: translateY(-50%) scale(1); }
.tile[data-soon]:hover::after, .tile[data-soon]:focus-visible::after, .tile[data-soon].is-soon-flash::after,
.fgame[data-soon]:hover::after, .fgame[data-soon].is-soon-flash::after { transform: scale(1); }
.fgame[data-soon]::after { top: 50%; transform: translateY(-50%) scale(.9); }
.fgame[data-soon]:hover::after, .fgame[data-soon].is-soon-flash::after { transform: translateY(-50%) scale(1); }
.icon-btn[data-soon]::after, .btn-outline[data-soon]::after, .btn-start[data-soon]::after, .quick-card[data-soon]::after { right: 50%; top: auto; bottom: calc(100% + 6px); transform: translateX(50%) scale(.9); }
.icon-btn[data-soon]:hover::after, .icon-btn[data-soon]:focus-visible::after, .icon-btn[data-soon].is-soon-flash::after,
.btn-outline[data-soon]:hover::after, .btn-outline[data-soon].is-soon-flash::after,
.btn-start[data-soon]:hover::after, .btn-start[data-soon].is-soon-flash::after,
.quick-card[data-soon]:hover::after, .quick-card[data-soon].is-soon-flash::after { transform: translateX(50%) scale(1); }
.quick-card[data-soon]::after { bottom: auto; top: 8px; }
.icon-btn[data-soon]::after { bottom: auto; top: calc(100% + 6px); } /* header button: below it, not off the top of the screen */
.is-off { display: none !important; } /* tiles hidden by the quick filter */
.is-trim { display: none !important; } /* extras in a short last row (fitBento in app.js) */
.ic { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tile { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.tile:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(0,0,0,.45), 0 0 22px rgba(122,59,255,.35); border-color: rgba(158,103,255,.7); }
.tile:hover .cover { transform: scale(1.08); }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.tile:focus-visible, .btn:focus-visible, .navlink:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.btn { transition: transform .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(.96); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.rel { position: relative; }
.shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,10,18,.85) 0%, rgba(10,10,18,0) 55%); }
.glow { position: absolute; border-radius: 999px; pointer-events: none; }
.h-section { margin: 0; font-family: var(--head); font-size: 22px; }
.h-dot { display: flex; align-items: center; gap: 10px; }
.dot-lime { width: 10px; height: 10px; border-radius: 999px; background: var(--lime); box-shadow: 0 0 10px var(--lime); }
.link-bold { font-weight: 700; font-size: 13px; }

.page {
  min-height: 100vh;
  background: radial-gradient(900px 500px at 15% -5%, rgba(122,59,255,.18), transparent 60%), radial-gradient(700px 500px at 100% 30%, rgba(0,245,212,.07), transparent 60%), var(--canvas);
  color: var(--text); font-family: var(--body); font-size: 14px;
}
.page--game {
  background: radial-gradient(900px 500px at 25% -5%, rgba(122,59,255,.18), transparent 60%), radial-gradient(700px 500px at 100% 40%, rgba(0,245,212,.06), transparent 60%), var(--canvas);
}

/* ---------- Badges / chips ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.badge--sm { padding: 4px 10px; font-size: 10px; }
.badge--md { padding: 5px 11px; }
.badge--coral { background: var(--coral); color: #fff; }
.badge--muted { background: rgba(10,10,18,.7); color: var(--text-2); border: 1px solid rgba(255,255,255,.12); }
.badge--cyan-soft { padding: 4px 10px; background: rgba(0,245,212,.14); color: var(--cyan); }

/* ---------- Header ---------- */
/* Logo left, menu always in the exact center (equal side columns), actions right */
.hdr { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px 16px; padding: 12px 20px; background: rgba(10,10,18,.9); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.07); }
.hdr::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(122,59,255,.6) 30%, rgba(0,245,212,.45) 70%, transparent); pointer-events: none; }
.logo { justify-self: start; display: flex; align-items: center; gap: 10px; color: var(--text); }
.logo__mark { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #7A3BFF, #FF3366); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 18px rgba(122,59,255,.55); }
.logo__text { font-family: var(--head); font-weight: 700; font-size: 22px; letter-spacing: -0.02em; }
.logo__text span { color: var(--cyan); }
/* Main menu: fixed items, each with a mega panel right under the header. The panel is
   positioned against .hdr (left/right + auto margins, no transform), so it is always
   centered on the same axis as the menu, which sits in the header's exact center. */
.mnav { justify-self: center; }
.mnav__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.mnav__link { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid transparent; color: var(--text-2); font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; transition: background-color .15s ease, color .15s ease; }
.mnav__link .ic:first-child { color: var(--ac); }
.mnav__link .ic:last-child { opacity: .6; transition: transform .15s ease; }
.mnav__link:hover, .mnav__link.is-open { background: var(--card); color: var(--text); }
.mnav__link.is-open .ic:last-child { transform: rotate(180deg); }
.mnav__link.is-active { color: var(--text); border-color: color-mix(in srgb, var(--ac) 45%, transparent); background: color-mix(in srgb, var(--ac) 14%, transparent); }
.mnav__link:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

.mega { position: absolute; left: 20px; right: 20px; top: calc(100% + 6px); max-width: 1040px; margin: 0 auto; max-height: calc(100vh - 100px); overflow-y: auto; overscroll-behavior: contain; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; padding: 20px; border-radius: 24px; background: linear-gradient(180deg, #171829 0%, #1C1433 100%); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); box-shadow: 0 30px 60px rgba(0,0,0,.6); }
/* Opening: short fade + slight drop. Runs each time x-show turns display back on. */
.mega { animation: mega-in .16s ease-out; }
@keyframes mega-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .mega { animation: none; } }
.mega__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mega__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 6px; }
.mega__title { color: var(--ac); font-family: var(--head); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.mega__all { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--text-2); }
.mega__all:hover { color: var(--text); }
.mega__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; }
.mlink { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; color: var(--text); }
.mlink:hover { background: rgba(255,255,255,.05); color: var(--text); }
.mlink:hover .mlink__ic { background: color-mix(in srgb, var(--c) 26%, transparent); }
.mlink__ic { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--c) 15%, transparent); color: var(--c); transition: background-color .15s ease; }
.mlink__txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mlink__txt b { font-family: var(--head); font-size: 14px; }
.mlink__txt small { color: var(--text-3); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Image cards: same look as the poll cards (cover + shade + badge, accent border) */
.mega__media { display: grid; gap: 12px; min-width: 0; }
.mega__media--one { grid-template-rows: minmax(260px, 1fr); }
.mega__media--two { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(260px, 1fr); }
.mega__media--four { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(124px, 1fr); }
.mcard { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; border-radius: 18px; background: var(--card); border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); color: var(--text); }
.mcard:hover { color: var(--text); border-color: var(--ac); box-shadow: 0 14px 28px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--ac) 35%, transparent); }
.mcard .shade { background: linear-gradient(0deg, rgba(10,10,18,.9) 0%, rgba(10,10,18,0) 60%); }
.mcard__badge { position: absolute; left: 12px; top: 12px; background: rgba(10,10,18,.75); color: var(--ac); border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); }
.mcard__body { position: relative; display: flex; flex-direction: column; gap: 4px; }
.mcard__title { font-family: var(--head); font-weight: 700; font-size: 16px; line-height: 1.1; text-transform: uppercase; }
.mega__media--one .mcard__title { font-size: 24px; text-transform: none; }
.mega__media--two .mcard__title { font-size: 20px; }
/* four small cards: long poll questions and quiz titles, so normal case and at most three lines */
.mega__media--four .mcard { padding: 12px; border-radius: 16px; }
.mega__media--four .mcard__title { font-size: 14px; line-height: 1.2; text-transform: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mega__media--four .mcard__sub { font-size: 10px; }
.mcard .card-art .ic { right: 10%; top: 34%; width: 52px; height: 52px; }
.mcard__sub { color: var(--ac); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

@media (max-width: 900px) {
  .mega { grid-template-columns: 1fr; }
  .mega__media--one { grid-template-rows: 200px; }
  .mega__media--two { grid-auto-rows: 200px; }
  .mega__media--four { grid-auto-rows: 104px; }
}
/* Tablets and phones: logo + actions on the first row, the menu centered on the second
   (four items with Turkish labels, centered between the logo and the actions, need about 1000px) */
@media (max-width: 1000px) {
  .hdr { grid-template-columns: minmax(0, 1fr) auto; row-gap: 8px; }
  .mnav { grid-column: 1 / -1; grid-row: 2; }
}
/* Narrow: the four items as equal cells, icon above a small label, no chevron */
@media (max-width: 640px) {
  .mnav { justify-self: stretch; }
  .mnav__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
  .mnav__link { flex-direction: column; justify-content: center; gap: 3px; height: 54px; padding: 0 4px; border-radius: 14px; font-size: 10px; letter-spacing: .03em; }
  .mnav__link .ic:last-child { display: none; }
}
@media (max-width: 560px) {
  .hdr { position: relative; padding: 12px 16px; }
  .logo__text { font-size: 20px; }
  .hdr__actions { gap: 6px; }
  .mega { left: 12px; right: 12px; top: calc(100% + 4px); padding: 14px; }
  /* two link columns even here, so the four cards below are reached without a long scroll */
  .mega__links { gap: 2px; }
  .mega .mlink { gap: 8px; padding: 6px; }
  .mega .mlink__ic { width: 30px; height: 30px; flex-shrink: 0; border-radius: 10px; }
  .mega .mlink__txt b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mega .mlink__txt small { font-size: 11px; }
}

/* Page filter pills (inside the page, above the grid they filter) */
.pills { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill { flex-shrink: 0; }
.pill { height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: var(--card); color: var(--text-2); font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .02em; cursor: pointer; }
.pill.is-on { border-color: transparent; background: var(--grad-violet); color: #fff; box-shadow: 0 0 14px rgba(122,59,255,.45); }
.hdr__actions { justify-self: end; display: flex; align-items: center; gap: 10px; }
.icon-btn { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: var(--card); color: var(--text-2); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn__dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 999px; background: var(--coral); box-shadow: 0 0 0 2px var(--card); }

/* ---------- Body layout ---------- */
.body-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--gap); padding: 24px 20px 0; }
.body-row--game { flex-wrap: nowrap; padding: 20px 20px 0; }
@media (max-width: 760px) { .body-row--game { flex-wrap: wrap; } } /* phones: sidebar goes under the game */
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 32px; }
.main--game { gap: var(--gap); }

/* ---------- Sidebar ---------- */
.sidebar { flex: 0 0 200px; max-width: 100%; display: flex; flex-direction: column; gap: var(--gap); box-sizing: border-box; }
.quick-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.quick-card { position: relative; overflow: hidden; height: 68px; border-radius: 14px; padding: 10px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid rgba(255,255,255,.12); }
.quick-card--amber { background: linear-gradient(145deg, #FFB800, #FF6A3D); color: #1A0D00; }
.quick-card--violet { background: linear-gradient(145deg, #7A3BFF, #FF3366); color: #fff; }
.quick-card { justify-content: flex-end; color: #fff; }
.quick-card--amber:hover { border-color: #FFB800; }
.quick-card--violet:hover { border-color: #FF3366; }
.quick-card__label { position: relative; font-family: var(--head); font-weight: 700; font-size: 13px; letter-spacing: .04em; }
/* Random game / daily quiz: generated art in the card's accent, small icon top-right, label + one line below */
.sidebar .quick-cards { grid-template-columns: 1fr; gap: 8px; } /* full-width rows: the label and its line fit in the narrow sidebar */
.quick-card { height: 58px; gap: 2px; padding: 10px 52px 10px 12px; border-color: color-mix(in srgb, var(--ac, #9E67FF) 45%, transparent); }
.quick-card:hover { border-color: var(--ac, #9E67FF); }
.quick-card .card-art .ic { right: 12px; top: 50%; width: 30px; height: 30px; transform: translateY(-50%) rotate(-10deg); }
.quick-card .shade { background: linear-gradient(0deg, rgba(10,10,18,.75) 0%, rgba(10,10,18,0) 80%); }
.quick-card__label { line-height: 1.1; text-transform: uppercase; }
.quick-card__sub { position: relative; color: color-mix(in srgb, var(--ac, #9E67FF) 55%, #fff); font-size: 10px; font-weight: 600; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu { display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: 16px; background: rgba(23,24,41,.85); border: 1px solid rgba(255,255,255,.06); }
.navlink { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 10px; color: var(--text-2); font-weight: 600; font-size: 13px; }
.navlink .ic { width: 16px; height: 16px; }
.navlink:not(.is-active):hover { background: var(--elev); color: var(--text); }
.navlink.is-active { background: var(--grad-violet); color: #fff; font-weight: 700; box-shadow: 0 6px 18px rgba(122,59,255,.3); }
.menu__sep { height: 1px; background: rgba(255,255,255,.06); margin: 4px; }
.menu .menu__title { margin-top: 8px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.06); }
.menu__title--caps { text-transform: uppercase; } /* titles share the menu names; <html lang> keeps Turkish İ/I right */
.navlink__txt { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.navlink__n { flex-shrink: 0; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: rgba(255,255,255,.07); color: var(--text-2); font-family: var(--head); font-size: 10px; font-weight: 700; text-align: center; }
.navlink.is-active .navlink__n { background: rgba(255,255,255,.2); color: #fff; }
.navlink.is-active .ic { color: #fff !important; } /* JS can move the highlight onto a link whose icon has an inline color */
.menu__title { padding: 4px 10px; font-family: var(--head); font-size: 10px; font-weight: 700; letter-spacing: .08em; color: var(--text-3); }
/* Language card and developer box, sized to match the menu */
.sidebar .lang-card { gap: 8px; padding: 10px; border-radius: 16px; }
.sidebar .lang-card__row { gap: 6px; }
.sidebar .lang-card .pill { height: 30px; padding: 0 12px; font-size: 12px; }
.sidebar .dev-cta { padding: 14px; border-radius: 16px; }
.sidebar .dev-cta h3 { margin: 10px 0 4px; font-size: 15px; }
.sidebar .dev-cta p { margin-bottom: 12px; font-size: 12px; }
.sidebar .btn-outline { height: 36px; font-size: 13px; }
/* On phones, content first and the menu below (full width) */
@media (max-width: 760px) { .sidebar { order: 2; flex: 1 1 100%; } }

/* Developer box */
.dev-cta { position: relative; overflow: hidden; border-radius: 20px; padding: 20px; background: linear-gradient(160deg, #22243D, #171829); border: 1px solid rgba(0,245,212,.35); }
.dev-cta .glow { right: -40px; top: -40px; width: 140px; height: 140px; background: rgba(0,245,212,.18); filter: blur(30px); }
.dev-cta h3 { position: relative; margin: 12px 0 6px; font-family: var(--head); font-size: 20px; line-height: 1.2; }
.dev-cta p { position: relative; margin: 0 0 16px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.btn-outline { position: relative; display: flex; align-items: center; justify-content: center; height: 44px; border-radius: 999px; border: 1.5px solid var(--cyan); color: var(--cyan); font-family: var(--head); font-weight: 700; font-size: 14px; }
.btn-outline:hover { color: var(--cyan); background: rgba(0,245,212,.1); }

/* ---------- Hero ---------- */
.hero-row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.hero { flex: 999 1 520px; position: relative; overflow: hidden; min-height: 360px; border-radius: 24px; border: 1px solid rgba(158,103,255,.35); display: flex; align-items: flex-end; color: var(--text); }
.hero:hover { color: var(--text); }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,18,.92) 0%, rgba(10,10,18,.6) 45%, rgba(10,10,18,0) 75%); }
.hero__body { position: relative; padding: 32px; max-width: 460px; display: flex; flex-direction: column; gap: 14px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.hero__title { margin: 0; font-family: var(--head); font-weight: 700; font-size: 56px; line-height: .95; letter-spacing: -0.02em; text-shadow: 0 4px 24px rgba(0,0,0,.5); text-transform: uppercase; }
.hero__desc { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.55; }
.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
.btn-play { height: 48px; padding: 0 24px; border-radius: 999px; background: var(--grad-violet); color: #fff; display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 15px; box-shadow: 0 0 22px rgba(122,59,255,.6); }
.hero__note { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; }
@media (max-width: 520px) { .hero__title { font-size: 40px; } .hero__body { padding: 24px; } }
/* Hero slider: slides share one grid cell (the tallest sets the height) and are placed side by side with
   translateX by app.js (heroSlider), which also drags and animates them. pan-y keeps vertical page scrolling
   on touch screens while horizontal moves go to the slider. */
.hero--slider { display: grid; align-items: stretch; touch-action: pan-y; }
.hero--slider.is-dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
/* overflow: each slide clips its own cover, so the hover zoom (.tile:hover .cover) never spills into view
   from the slides parked left and right */
.hero__slide { grid-area: 1 / 1; position: relative; overflow: hidden; display: flex; align-items: flex-end; color: var(--text); will-change: transform; }
.hero__slide:hover { color: var(--text); }
.hero__slide img { -webkit-user-drag: none; }
/* Controls: previous, one dot per slide (the current one fills up until the next slide, --p 0..1), next */
.hero__ctrl { position: absolute; right: 18px; bottom: 18px; z-index: 2; display: flex; align-items: center; gap: 8px; }
.hero__arrow { width: 34px; height: 34px; padding: 0; border-radius: 999px; border: 1px solid rgba(255,255,255,.16); background: rgba(10,10,18,.6); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: background-color .2s ease, border-color .2s ease; }
.hero__arrow:hover { background: rgba(122,59,255,.55); border-color: rgba(158,103,255,.8); }
.hero__arrow .ic { transform: rotate(90deg); }
.hero__arrow--next .ic { transform: rotate(-90deg); }
.hero__dot { position: relative; overflow: hidden; width: 10px; height: 10px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.35); cursor: pointer; transition: width .3s ease, background-color .3s ease; }
.hero__dot:hover { background: rgba(255,255,255,.6); }
.hero__dot.is-on { width: 34px; background: rgba(0,245,212,.3); }
.hero__dot.is-on::after { content: ""; position: absolute; inset: 0 auto 0 0; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: var(--cyan); }
.hero__dot:focus-visible, .hero__arrow:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (max-width: 520px) { .hero__ctrl { top: 16px; right: 16px; bottom: auto; } .hero__arrow { display: none; } }
@media (prefers-reduced-motion: reduce) { .hero__dot { transition: none; } }

.promo-col { flex: 1 1 260px; display: flex; flex-direction: column; gap: var(--gap); }
.promo { flex: 1 1 auto; position: relative; overflow: hidden; border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.promo h2 { margin: 0; font-family: var(--head); font-size: 24px; line-height: 1.1; }
.promo .badge { align-self: flex-start; padding: 4px 10px; }
.promo--quest { background: linear-gradient(155deg, #FFB800 0%, #FF7A1A 100%); color: #1A0D00; border: 1px solid rgba(255,255,255,.15); }
.promo--quest .badge { background: rgba(26,13,0,.85); color: var(--amber); }
.promo--dice { background: linear-gradient(155deg, #0E3B3A 0%, #171829 100%); border: 1px solid rgba(0,245,212,.4); }
.promo--dice h2 { max-width: 70%; }
.promo__deco { position: absolute; pointer-events: none; }
.quest__row { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; }
.quest__bar { height: 10px; border-radius: 999px; background: rgba(26,13,0,.25); overflow: hidden; }
.quest__bar div { height: 100%; border-radius: 999px; background: #1A0D00; transition: width .4s ease; }
.promo__btn { margin-top: auto; align-self: flex-start; height: 40px; padding: 0 18px; border-radius: 999px; border: 0; display: inline-flex; align-items: center; font-family: var(--head); font-weight: 700; font-size: 13px; cursor: pointer; }
.promo--quest .promo__btn, .promo--quest .promo__btn:hover { background: #1A0D00; color: var(--amber); }
.promo--dice .promo__btn { background: var(--cyan); color: var(--bg); box-shadow: 0 0 16px rgba(0,245,212,.45); }
.dice__text { margin: 0; color: var(--text-2); font-size: 13px; min-height: 20px; }

/* ---------- Explore grid ---------- */
.section { display: flex; flex-direction: column; gap: 14px; }
.section__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
/* At least two equal columns on phones: a 160px minimum alone leaves one column at ~335px, and wide tiles
   then add an implicit column of leftover width */
.bento { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, calc((100% - var(--gap)) / 2)), 1fr)); grid-auto-rows: 168px; grid-auto-flow: dense; gap: var(--gap); }
.s2x2 { grid-column: span 2; grid-row: span 2; }
.s2x1 { grid-column: span 2; }
@media (max-width: 374px) { .bento { grid-template-columns: 1fr; } .s2x2, .s2x1 { grid-column: span 1; } }

.gtile { position: relative; overflow: hidden; border-radius: 20px; border: 1px solid var(--b, rgba(255,255,255,.08)); color: var(--text); display: flex; flex-direction: column; justify-content: flex-end; padding: 14px; }
.gtile:hover { color: var(--text); }
.gtile .shade { background: linear-gradient(0deg, rgba(10,10,18,.85) 0%, rgba(10,10,18,0) 55%); }
.gtile.s2x2 { padding: 18px; }
.gtile.s2x2 .shade { background: linear-gradient(0deg, rgba(10,10,18,.9) 0%, rgba(10,10,18,0) 55%); }
.gtile__badge { position: absolute; top: 12px; left: 12px; padding: 4px 10px; border-radius: 999px; font-family: var(--head); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.s2x2 .gtile__badge { top: 14px; left: 14px; padding: 5px 11px; font-size: 11px; }
.gtile__title { position: relative; margin: 0; font-family: var(--head); font-weight: 700; font-size: 20px; line-height: 1; text-transform: uppercase; }
.s2x2 .gtile__title { font-size: 34px; line-height: .95; letter-spacing: -0.01em; }
/* "Play Now" on every game tile: a big, bright, pressable-looking button in the tile's center (easy to spot
   for young players), always labelled; on hover it grows and lifts. Placeholder games get an amber "Coming soon". */
.gplay { --gp: #76EE59; --gp-edge: #3E9E2C; position: absolute; z-index: 2; left: 50%; top: 46%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px 0 18px; border-radius: 999px; border: 2px solid rgba(255,255,255,.85); background: var(--gp); color: #0A1A06; font-family: var(--head); font-size: 15px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 5px 0 var(--gp-edge), 0 10px 24px rgba(0,0,0,.45); transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease; }
.gplay path { fill: #0A1A06; }
.gtile:hover .gplay, .gtile:focus-visible .gplay, .qtile:hover .gplay, .qtile:focus-visible .gplay { transform: translate(-50%, -54%) scale(1.12); background: #9BFF7E; box-shadow: 0 7px 0 var(--gp-edge), 0 0 0 6px rgba(118,238,89,.28), 0 14px 30px rgba(0,0,0,.5); }
.gtile:active .gplay, .qtile:active .gplay { transform: translate(-50%, -46%) scale(1.04); box-shadow: 0 2px 0 var(--gp-edge), 0 6px 14px rgba(0,0,0,.45); }
.s2x2 .gplay { top: 42%; height: 60px; padding: 0 30px 0 26px; gap: 10px; font-size: 21px; border-width: 3px; box-shadow: 0 6px 0 var(--gp-edge), 0 14px 30px rgba(0,0,0,.45); }
.s2x2:hover .gplay { box-shadow: 0 8px 0 var(--gp-edge), 0 0 0 8px rgba(118,238,89,.28), 0 18px 36px rgba(0,0,0,.5); }
.next .gplay { height: 34px; padding: 0 14px 0 12px; gap: 6px; font-size: 12px; border-width: 2px; box-shadow: 0 4px 0 var(--gp-edge), 0 8px 18px rgba(0,0,0,.45); }
.gplay--soon { --gp: #FFB800; --gp-edge: #A86F00; color: #1A0D00; }
.gplay--soon .ic { color: #1A0D00; }
.gtile:hover .gplay--soon { background: #FFCB3D; box-shadow: 0 7px 0 var(--gp-edge), 0 0 0 6px rgba(255,184,0,.25), 0 14px 30px rgba(0,0,0,.5); }
.gtile[data-soon]::after { display: none; } /* the button already says "Coming soon" */
@media (prefers-reduced-motion: reduce) { .gplay { transition: none; } }
/* Narrow tiles: a smaller button so "Play Now" always fits inside */
.gtile, .qtile { container-type: inline-size; }
@container (max-width: 190px) { .gplay { height: 38px; padding: 0 14px 0 12px; gap: 6px; font-size: 12px; } }
@container (max-width: 140px) { .gplay { height: 34px; padding: 0 10px; gap: 5px; font-size: 11px; letter-spacing: 0; } }
.gtile__meta { position: relative; margin: 8px 0 0; color: var(--text-2); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* Internal page links: game-tile look (cover art + uppercase title) with an accent subtitle */
.ltile { background: var(--card); }
.ltile .gtile__title { font-size: 18px; }
.ltile__sub { display: block; margin: 6px 0 0; color: var(--ic); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ltile:hover, .ntile:hover, .cat:hover { border-color: var(--ic); box-shadow: 0 14px 28px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--ic) 40%, transparent); }

.soon { border-radius: 20px; padding: 16px; box-sizing: border-box; background: rgba(23,24,41,.5); border: 1.5px dashed rgba(149,155,184,.35); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; color: var(--text-2); }
.soon strong { font-family: var(--head); font-weight: 700; font-size: 14px; letter-spacing: .06em; }
.soon span { font-size: 12px; }

/* Poll */
.poll { position: relative; overflow: hidden; border-radius: 20px; padding: 20px; box-sizing: border-box; background: linear-gradient(160deg, #2A1550 0%, #171829 70%); border: 1px solid rgba(255,51,102,.4); display: flex; flex-direction: column; gap: 12px; }
.poll .glow { left: -50px; bottom: -50px; width: 160px; height: 160px; background: rgba(255,51,102,.18); filter: blur(34px); }
.poll--side { border-radius: 24px; }
.poll__head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.poll__meta { color: var(--text-2); font-size: 12px; font-weight: 600; }
.poll__q { position: relative; margin: 0; font-family: var(--head); font-size: 22px; line-height: 1.2; }
.poll--side .poll__q { font-size: 20px; }
.poll--side > .badge { position: relative; align-self: flex-start; }
.poll__opts { position: relative; display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; }
.popt { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.08); background: rgba(10,10,18,.6); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; text-align: left; cursor: pointer; }
.poll--side .popt { min-height: 46px; }
.popt.is-mine { border-color: var(--coral); }
.popt__bar { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(158,103,255,.22); transition: width .4s ease; }
.popt.is-mine .popt__bar { background: rgba(255,51,102,.45); }
.popt__label { position: relative; display: flex; flex-direction: column; }
.popt__sub { color: var(--text-2); font-size: 11px; font-weight: 600; }
.popt__pct { position: relative; font-family: var(--head); color: #FF8FA8; }
.popt__pct.is-voted { color: var(--text); }
/* Before voting, "Vote" is a small pill that fills on hover, so each answer reads as a button */
.popt__pct:not(.is-voted) { flex-shrink: 0; padding: 4px 10px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--ac, #FF3366) 55%, transparent); color: color-mix(in srgb, var(--ac, #FF3366) 70%, #fff); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; transition: background-color .15s ease, color .15s ease; }
.popt:hover .popt__pct:not(.is-voted), .popt:focus-visible .popt__pct:not(.is-voted) { background: var(--ac, #FF3366); border-color: var(--ac, #FF3366); color: #0A0A12; }
.popt:hover:not(:disabled) { border-color: color-mix(in srgb, var(--ac, #FF3366) 50%, transparent); }
/* "live" dot before the poll card's status line */
.poll--card .poll__foot .poll__meta { display: inline-flex; align-items: center; gap: 8px; }
.poll--card .poll__foot .poll__meta::before { content: ''; width: 7px; height: 7px; border-radius: 999px; background: var(--ac, #FF3366); box-shadow: 0 0 0 0 color-mix(in srgb, var(--ac, #FF3366) 60%, transparent); animation: live-dot 2s ease-out infinite; }
@keyframes live-dot { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .poll--card .poll__foot .poll__meta::before { animation: none; } }
.poll__more { position: relative; font-size: 13px; font-weight: 700; }

/* Polls page: cards with a cover banner (Neon Runner style art), accent = topic color (--ac) */
.page-intro { gap: 12px; }
.poll-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: var(--gap); } /* cards in a row share its height, so the space between rows stays even */
/* Long card lists: the browser skips layout/paint of cards far off screen (big win on the polls page) */
.poll-grid > .poll, .poll-grid .contents > .poll { content-visibility: auto; contain-intrinsic-size: auto 540px; }
.poll--card { padding: 0; gap: 0; border-color: color-mix(in srgb, var(--ac, #FF3366) 40%, transparent); background: linear-gradient(180deg, #171829 0%, #1C1433 100%); }
.poll--card:hover { border-color: var(--ac, #FF3366); box-shadow: 0 14px 28px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--ac, #FF3366) 35%, transparent); }
.poll__banner { position: relative; overflow: hidden; height: 132px; }
.poll__banner .shade { background: linear-gradient(0deg, #171829 0%, rgba(23,24,41,0) 70%); }
.poll__badges { position: absolute; left: 14px; top: 14px; display: flex; gap: 6px; }
.poll__topic { color: var(--ac, var(--text-2)); }
.poll__body { position: relative; flex: 1 1 auto; display: flex; flex-direction: column; gap: 10px; padding: 4px 18px 18px; }
.poll--card .poll__q { font-size: 20px; }
.poll__sum { margin: -4px 0 2px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.poll--card .popt { min-height: 44px; }
.poll--card .popt.is-mine { border-color: var(--ac, var(--coral)); }
.poll--card .popt.is-mine .popt__bar { background: color-mix(in srgb, var(--ac, #FF3366) 40%, transparent); }
.poll__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 2px; }
.poll__votes { color: var(--ac, var(--text-2)); font-family: var(--head); font-size: 12px; font-weight: 700; }
.poll-suggest { min-height: 200px; }
.pill--chip span { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* a single quiz's title can be long */
.contents { display: contents; } /* batch wrapper whose cards still sit in the parent grid */
.more-row { display: flex; justify-content: center; margin-top: var(--gap); }
.more-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.14); background: rgba(10,10,18,.6); color: var(--text); font-family: var(--head); font-size: 14px; font-weight: 700; cursor: pointer; }
.more-btn:hover { border-color: var(--cyan); color: var(--cyan); }

/* Quiz card: poll card frame; every step shares one grid cell so the card height never jumps */
.badge--quiz { background: var(--ac, var(--lime)); color: #0A0A12; }
/* Generated banner art for cards without a cover: accent glow, dot grid, one big stroke icon */
.card-art { position: absolute; inset: 0; overflow: hidden; background:
    radial-gradient(circle at 78% 40%, color-mix(in srgb, var(--ac, #9E67FF) 55%, transparent) 0, transparent 55%),
    radial-gradient(rgba(255,255,255,.10) 1px, transparent 1.5px) 0 0 / 14px 14px,
    linear-gradient(135deg, color-mix(in srgb, var(--ac, #9E67FF) 30%, #171829) 0%, #0D0628 100%); }
.card-art .ic { position: absolute; right: 12%; top: 50%; width: 76px; height: 76px; transform: translateY(-50%) rotate(-10deg); color: color-mix(in srgb, var(--ac, #9E67FF) 70%, #fff); opacity: .85; stroke-width: 1.6; }
.quiz__bar { height: 4px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.quiz__bar span { display: block; height: 100%; width: 0; background: var(--ac); border-radius: inherit; transition: width .3s ease; }
.quiz__steps { display: grid; flex: 1 1 auto; }
.quiz__step { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; visibility: hidden; }
.quiz__step.is-on, .quiz__steps:not(.is-live) > .quiz__step:first-child { visibility: visible; }
.quiz__step.is-on { animation: quiz-in .2s ease-out; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.quiz__meta { display: flex; justify-content: space-between; gap: 8px; color: var(--ac); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.quiz__meta span:last-child { color: var(--text-2); }
.quiz__q { margin: 0; font-weight: 700; font-size: 15px; line-height: 1.4; }
.quiz__opt { justify-content: flex-start; min-height: 44px; padding: 8px 12px; line-height: 1.3; }
.quiz__opt:hover { border-color: color-mix(in srgb, var(--ac) 60%, transparent); }
.quiz__key { position: relative; flex: 0 0 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--ac) 18%, transparent); color: var(--ac); font-family: var(--head); font-size: 12px; }
.quiz__opt.is-mine { border-color: var(--ac); background: color-mix(in srgb, var(--ac) 16%, rgba(10,10,18,.6)); }
.quiz__result { justify-content: center; align-items: center; text-align: center; gap: 6px; padding: 16px 14px; border-radius: 16px; background: color-mix(in srgb, var(--ac) 12%, rgba(10,10,18,.6)); border: 1px solid color-mix(in srgb, var(--ac) 45%, transparent); }
.quiz__heads { display: grid; width: 100%; }
.quiz__head { grid-area: 1 / 1; display: flex; flex-direction: column; justify-content: center; gap: 6px; visibility: hidden; }
.quiz__result.is-on .quiz__head.is-on { visibility: visible; } /* only inside the shown result step: a visible child would show through a hidden parent */
.quiz__mix { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; text-align: left; }
.quiz__mix li { display: grid; grid-template-columns: minmax(0, 1fr) 70px 14px; align-items: center; gap: 8px; color: var(--text-2); font-size: 12px; font-weight: 600; }
.quiz__mix li.is-top { color: var(--text); }
.quiz__mixname { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.quiz__mixbar { height: 6px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.quiz__mixbar i { display: block; height: 100%; border-radius: inherit; background: color-mix(in srgb, var(--ac) 45%, transparent); transition: width .4s ease; }
.quiz__mix li.is-top .quiz__mixbar i { background: var(--ac); }
.quiz__mixn { font-family: var(--head); text-align: right; }
.quiz__you { color: var(--text-2); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.quiz__rtitle { margin: 0; color: var(--ac); font-family: var(--head); font-size: 26px; font-weight: 700; line-height: 1.15; }
.quiz__rtext { margin: 0; color: var(--text); font-size: 15px; line-height: 1.5; }
.quiz__opt.is-right { border-color: var(--lime); background: rgba(118,238,89,.16); }
.quiz__opt.is-right .quiz__key { background: var(--lime); color: #0A0A12; }
.quiz__opt.is-wrong { border-color: var(--coral); background: rgba(255,51,102,.16); }
.quiz__opt.is-wrong .quiz__key { background: var(--coral); color: #fff; }
.quiz__opt:disabled { cursor: default; }
.quiz__opt:disabled:not(.is-right):not(.is-wrong) { opacity: .55; }
.quiz__fb { margin: 0; min-height: 20px; font-size: 13px; font-weight: 700; }
.quiz__fb span { display: inline-flex; align-items: center; gap: 6px; }
.quiz__explain.quiz__explain { display: block; margin-top: 4px; color: var(--text-2); font-weight: 500; line-height: 1.45; visibility: hidden; } /* space kept from the start so the card height does not jump */
.quiz__step.is-on .quiz__explain.is-on { visibility: visible; }
.quiz__fb--right { color: var(--lime); }
.quiz__fb--wrong { color: #FF8FA8; }
.quiz__score { margin: 0; color: var(--text-2); font-family: var(--head); font-size: 18px; font-weight: 700; }
.quiz__score b { color: var(--ac); font-size: 40px; line-height: 1; }
.quiz__dots { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.quiz__dots li { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; font-family: var(--head); font-size: 12px; font-weight: 700; }
.quiz__dots li.is-right { background: rgba(118,238,89,.2); color: var(--lime); }
.quiz__dots li.is-wrong { background: rgba(255,51,102,.2); color: #FF8FA8; }
.quiz__next { margin-left: auto; }
.quiz .poll__foot { min-height: 36px; }
/* Start cues: round play badge on the banner + a "Start quiz · 6 questions" pill; both make the first answers glow */
/* Same chunky look as the games' "Play Now", in the card's own color, centered on the banner */
.card-play { position: absolute; z-index: 2; left: 50%; top: 54%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 22px 0 18px; border-radius: 999px; border: 2px solid rgba(255,255,255,.85); background: var(--ac, #9E67FF); color: #0A0A12; font-family: var(--head); font-size: 16px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 5px 0 color-mix(in srgb, var(--ac, #9E67FF) 55%, #000), 0 10px 24px rgba(0,0,0,.45); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, filter .18s ease; }
.card-play path { fill: #0A0A12; }
.poll__banner .card-art .ic { right: 14px; width: 58px; height: 58px; opacity: .7; } /* art icon at the edge, clear of the centered button */
.poll--card:hover .card-play, .card-play:focus-visible { transform: translate(-50%, -56%) scale(1.1); filter: brightness(1.12); box-shadow: 0 7px 0 color-mix(in srgb, var(--ac, #9E67FF) 55%, #000), 0 0 0 6px color-mix(in srgb, var(--ac, #9E67FF) 30%, transparent), 0 14px 30px rgba(0,0,0,.5); }
.card-play:active { transform: translate(-50%, -48%) scale(1.03); box-shadow: 0 2px 0 color-mix(in srgb, var(--ac, #9E67FF) 55%, #000); }
.quiz__start { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border-radius: 999px; border: 1px solid var(--ac); background: color-mix(in srgb, var(--ac) 16%, transparent); color: var(--text); font-family: var(--head); font-size: 13px; font-weight: 700; cursor: pointer; transition: background-color .15s ease; }
.quiz__start path { fill: var(--ac); }
.quiz__start small { color: var(--text-2); font-size: 11px; font-weight: 600; }
.quiz__start small::before { content: '·'; margin-right: 6px; }
.quiz__start:hover { background: color-mix(in srgb, var(--ac) 28%, transparent); }
.quiz__step.is-nudge .quiz__opt { animation: quiz-nudge .9s ease; }
.quiz__step.is-nudge .quiz__opt:nth-child(2) { animation-delay: .08s; }
.quiz__step.is-nudge .quiz__opt:nth-child(3) { animation-delay: .16s; }
.quiz__step.is-nudge .quiz__opt:nth-child(4) { animation-delay: .24s; }
@keyframes quiz-nudge { 30% { border-color: var(--ac); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ac) 30%, transparent); transform: translateX(4px); } }
@media (prefers-reduced-motion: reduce) { .quiz__step.is-nudge .quiz__opt { animation: none; } } /* room for the Retake button from the start */
.quiz__back { display: inline-flex; align-items: center; gap: 4px; padding: 6px 0; border: 0; background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.quiz__back:hover { color: var(--text); }
.quiz__retake { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--ac); background: transparent; color: var(--ac); font-family: var(--head); font-size: 13px; font-weight: 700; cursor: pointer; }
.quiz__retake:hover { background: color-mix(in srgb, var(--ac) 16%, transparent); }

/* Quick question */
.quick { position: relative; overflow: hidden; border-radius: 20px; padding: 16px; box-sizing: border-box; background: linear-gradient(120deg, #0A2A4A 0%, #171829 80%); border: 1px solid rgba(0,163,255,.4); display: flex; flex-direction: column; justify-content: space-between; gap: 10px; }
.quick__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.quick__hint { color: var(--text-2); font-size: 12px; font-weight: 600; }
.quick__hint a { color: var(--text-2); text-decoration: underline; text-underline-offset: 2px; }
.quick h3 { margin: 0; font-family: var(--head); font-size: 18px; line-height: 1.2; }
.moods { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; } /* one row; never spills out of the fixed-height tile */
.moods::-webkit-scrollbar { display: none; }
.mood { flex-shrink: 0; height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(10,10,18,.55); color: var(--text); font-family: var(--head); font-weight: 700; font-size: 13px; cursor: pointer; }
.mood.is-on { background: var(--blue); color: #04121F; border-color: var(--blue); }

/* ---------- Home sections below the grid ---------- */
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--c); box-shadow: 0 0 10px var(--c); }
/* Games / Polls / Quizzes / Trivia: a fixed slot layout per section width (partials/home-shelves.php).
   Same row height as Explore; 2, 4, 6 or 8 columns depending on the room, each arrangement without holes. */
.shelf { container-type: inline-size; }
.shelf__grid { display: grid; gap: var(--gap); grid-auto-rows: 168px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.slot { display: grid; min-width: 0; }
.slot > * { grid-column: 1; grid-row: 1; min-width: 0; } /* the tile fills its slot (overrides s2x2 / s2x1 spans) */
.slot--h { grid-area: h; } .slot--w { grid-area: w; } .slot--a { grid-area: a; } .slot--b { grid-area: b; }
.slot--p1 { grid-area: p1; } .slot--p2 { grid-area: p2; } .slot--p3 { grid-area: p3; }
.slot--s1 { grid-area: s1; } .slot--s2 { grid-area: s2; } .slot--s3 { grid-area: s3; } .slot--s4 { grid-area: s4; }
.slot--s5 { grid-area: s5; } .slot--s6 { grid-area: s6; } .slot--s7 { grid-area: s7; } .slot--s8 { grid-area: s8; }
/* 2 columns (phones) */
.shelf__grid--hub { grid-template-areas: "h h" "h h" "s1 s2" "s3 s4" "s5 s6" "w w"; }
.shelf__grid--pair { grid-template-areas: "a a" "p1 p1" "p1 p1" "b b" "p2 p2" "p2 p2"; }
.shelf__grid--hub .slot--s7, .shelf__grid--hub .slot--s8, .shelf__grid--pair .slot--p3 { display: none; }
@container (min-width: 600px) {
  .shelf__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .shelf__grid--hub { grid-template-areas: "h h s1 s2" "h h s3 s4" "s5 s6 w w"; }
  .shelf__grid--pair { grid-template-areas: "p1 p1 p2 p2" "p1 p1 p2 p2" "a a b b"; }
}
@container (min-width: 960px) {
  .shelf__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .shelf__grid--hub { grid-template-areas: "h h s1 s2 s3 s4" "h h s5 s6 w w"; }
  .shelf__grid--pair { grid-template-areas: "p1 p1 a a p2 p2" "p1 p1 b b p2 p2"; }
}
/* Wide screens: two more small tiles, a third big one, and the topic tile grows to 2x2 */
@container (min-width: 1360px) {
  .shelf__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .shelf__grid--hub { grid-template-areas: "h h s1 s2 s3 s4 w w" "h h s5 s6 s7 s8 w w"; }
  .shelf__grid--pair { grid-template-areas: "p1 p1 a a p2 p2 p3 p3" "p1 p1 b b p2 p2 p3 p3"; }
  .shelf__grid--hub .slot--s7, .shelf__grid--hub .slot--s8, .shelf__grid--pair .slot--p3 { display: grid; }
  .slot--w .chips-tile__list { max-height: 248px; }
}

/* Continue playing (2x2): the game tile look, kicker above the title */
.ctile { background: var(--card); }
.ctile__kicker { display: block; margin-bottom: 6px; color: var(--lime); font-family: var(--head); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.ctile.s2x2 .gtile__title { font-size: 30px; }

/* The same centered "Play Now" button on quiz / trivia tiles, in the tile's own color */
.gplay--ac { --gp: var(--ac); --gp-edge: color-mix(in srgb, var(--ac) 50%, #000); color: #0A0A12; }
.qtile:hover .gplay--ac, .qtile:focus-visible .gplay--ac { background: color-mix(in srgb, var(--ac) 75%, #fff); box-shadow: 0 7px 0 var(--gp-edge), 0 0 0 6px color-mix(in srgb, var(--ac) 30%, transparent), 0 14px 30px rgba(0,0,0,.5); }
.qtile--small .gplay { top: 40%; }

/* Topic links (2x1): a heading and two rows of colored chips */
.chips-tile { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 14%, #171829) 0%, #171829 70%); }
.chips-tile__title { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 15px; font-weight: 700; }
.chips-tile__title .ic { color: var(--ac); }
.chips-tile__list { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 8px; max-height: 76px; overflow: hidden; } /* whole rows only (two in a 2x1 tile); the section's "all" link has the rest */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px; background: rgba(10,10,18,.55); border: 1px solid rgba(255,255,255,.08); color: var(--text); font-family: var(--head); font-size: 13px; font-weight: 700; white-space: nowrap; }
.chip .ic { color: var(--c); }
.chip small { color: var(--text-3); font-size: 11px; font-weight: 600; }
.chip:hover { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, rgba(10,10,18,.55)); }

/* Poll tiles: compact 2x2 and the 2x1 "this or that" (two answers side by side), in the topic color */
.poll--shelf { padding: 16px; gap: 10px; border-color: color-mix(in srgb, var(--ac, #FF3366) 40%, transparent); background: linear-gradient(160deg, color-mix(in srgb, var(--ac, #FF3366) 18%, #171829) 0%, #171829 75%); }
.poll--shelf:hover { border-color: var(--ac, #FF3366); }
.poll--shelf .glow { background: color-mix(in srgb, var(--ac, #FF3366) 22%, transparent); }
.poll--shelf .poll__meta { color: var(--ac, var(--text-2)); font-family: var(--head); font-weight: 700; }
.poll--shelf .poll__q { font-size: 18px; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.poll--shelf .poll__opts { gap: 6px; }
.poll--shelf .popt { min-height: 40px; padding: 0 12px; font-size: 13px; }
.poll--shelf:not(.poll--duel) .popt { flex: 1 1 0; max-height: 58px; } /* the answers share the tile's height, no empty bottom */
.poll--duel .poll__q { -webkit-line-clamp: 1; }
.poll--duel .poll__opts { flex-direction: row; }
.poll--duel .popt { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 4px; text-align: center; font-size: 15px; }

/* Quiz / trivia / poll link tiles: art, badge, title; big (2x2) adds the intro and a Start button */
.qtile { position: relative; overflow: hidden; border-radius: 20px; padding: 14px; border: 1px solid color-mix(in srgb, var(--ac) 35%, transparent); background: var(--card); color: var(--text); display: flex; flex-direction: column; justify-content: flex-end; }
.qtile:hover { color: var(--text); border-color: var(--ac); box-shadow: 0 14px 28px rgba(0,0,0,.45), 0 0 22px color-mix(in srgb, var(--ac) 35%, transparent); }
.qtile__art { position: absolute; inset: 0; }
.qtile__art .shade { background: linear-gradient(0deg, rgba(10,10,18,.94) 0%, rgba(10,10,18,.6) 45%, rgba(10,10,18,0) 80%); }
.qtile .card-art .ic { right: 12px; top: 12px; width: 44px; height: 44px; transform: rotate(-10deg); opacity: .6; } /* in the corner, clear of the centered button */
.qtile__badges { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; }
.qtile__body { position: relative; display: flex; flex-direction: column; gap: 6px; }
.qtile__title { margin: 0; font-family: var(--head); font-size: 16px; line-height: 1.2; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.qtile__meta { color: var(--ac); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.qtile--big { padding: 20px; }
.qtile--big .card-art .ic { top: 18px; right: 18px; width: 72px; height: 72px; }
.qtile--big .qtile__title { font-size: 26px; line-height: 1.1; -webkit-line-clamp: 2; }
.qtile__intro { color: var(--text-soft); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
/* "Which one are you?": a quiz's result types as a 2x2 list of chips */
.qtile--types { justify-content: flex-start; gap: 6px; background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ac) 32%, transparent) 0, transparent 60%), var(--card); }
.qtile__kicker { display: inline-flex; align-items: center; gap: 6px; color: var(--ac); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.qtile--types .qtile__title { font-size: 17px; -webkit-line-clamp: 1; }
.qtile__types { margin: auto 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.qtile__types li { padding: 7px 10px; border-radius: 10px; background: rgba(10,10,18,.55); border: 1px solid color-mix(in srgb, var(--ac) 30%, transparent); font-family: var(--head); font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Trivia question of the day (2x2): the options, then the verdict, the answer and its explanation */
.qotd { border-radius: 20px; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--ac) 40%, transparent); background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--ac) 22%, transparent) 0, transparent 55%), linear-gradient(180deg, #171829 0%, #121326 100%); }
.qotd__set { max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: 12px; font-weight: 700; }
.qotd__set:hover { color: var(--ac); }
.qotd__q { margin: 0; font-family: var(--head); font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.qotd__opts { display: flex; flex-direction: column; gap: 6px; }
.qotd .quiz__opt { min-height: 40px; font-size: 13px; }
.qotd__done { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.qotd__verdict { margin: 0; font-family: var(--head); font-size: 22px; font-weight: 700; }
.qotd__verdict span { display: inline-flex; align-items: center; gap: 8px; }
.qotd__verdict.is-right { color: var(--lime); }
.qotd__verdict.is-wrong { color: #FF8FA8; }
.qotd__answer { margin: 0; color: var(--text-2); font-size: 14px; }
.qotd__answer b { color: var(--text); }
.qotd__explain { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; }
.qotd__done .btn { margin-top: auto; align-self: flex-start; }

/* ---------- Categories ---------- */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--gap); }
.cat { height: 120px; border-radius: 18px; background: var(--card); }
.cat .gtile__title { font-size: 17px; }
.cat--plain { height: 76px; padding: 0 16px; border: 1px solid rgba(255,255,255,.07); color: var(--text); display: flex; align-items: center; gap: 12px; font-family: var(--head); font-weight: 700; font-size: 15px; }
.cat--plain:hover { color: var(--text); }
.cat__icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--ib); color: var(--ic); }

/* ---------- Footer ---------- */
.footer { position: relative; margin-top: 56px; padding: 40px 20px 0; background: rgba(10,10,18,.75); border-top: 1px solid rgba(255,255,255,.07); }
.footer::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(122,59,255,.6) 30%, rgba(0,245,212,.45) 70%, transparent); }
.footer__grid { display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(4, minmax(0, 1fr)); gap: 32px var(--gap); }
.footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-right: 24px; }
.footer__brand p { margin: 0; max-width: 360px; color: var(--text-2); font-size: 13px; line-height: 1.6; }
.footer__brand .lang-inline { margin-top: 0; }
.footer__cta { display: flex; flex-wrap: wrap; gap: 8px; }
.footer__btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); background: color-mix(in srgb, var(--c) 12%, transparent); color: var(--text); font-family: var(--head); font-weight: 700; font-size: 13px; }
.footer__btn .ic { color: var(--c); }
.footer__btn:hover { color: var(--text); background: color-mix(in srgb, var(--c) 22%, transparent); }
.footer__col { min-width: 0; }
.footer__title { margin: 4px 0 14px; color: var(--text-3); font-family: var(--head); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.footer__list, .footer__games { display: flex; flex-direction: column; gap: 4px; margin: 0; padding: 0; list-style: none; }
.flink { display: flex; align-items: center; gap: 10px; min-height: 30px; color: var(--text-2); font-size: 13px; font-weight: 600; }
.flink .ic { color: var(--c); }
.flink small { margin-left: -2px; padding: 1px 7px; border-radius: 999px; background: rgba(255,255,255,.06); color: var(--text-3); font-size: 11px; font-weight: 700; }
.flink:hover { color: var(--text); }
.fgame { display: flex; align-items: center; gap: 10px; padding: 4px; margin: 0 -4px; border-radius: 12px; color: var(--text); }
.fgame:hover { background: rgba(255,255,255,.05); color: var(--text); }
.fgame img { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; object-fit: cover; border: 1px solid rgba(255,255,255,.08); }
.fgame span { display: flex; flex-direction: column; min-width: 0; }
.fgame b { font-family: var(--head); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fgame small { color: var(--text-3); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer__bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 36px; padding: 18px 0 22px; border-top: 1px solid rgba(255,255,255,.06); color: var(--text-3); font-size: 12px; font-weight: 600; }
.footer__top { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.footer__top:hover { color: var(--text); }
@media (max-width: 1100px) {
  .footer__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; padding-right: 0; }
}
@media (max-width: 700px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ================= GAME PAGE ================= */
.split { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: flex-start; }
/* Player + Up Next end on the same line: the tiles grow to the player's height */
.split--top { align-items: stretch; }
.split--top .next__grid { flex: 1 1 auto; grid-auto-rows: minmax(128px, 1fr); }
.player { flex: 999 1 600px; min-width: 0; border-radius: 24px; overflow: hidden; background: var(--card); border: 1px solid rgba(158,103,255,.35); box-shadow: 0 20px 40px rgba(0,0,0,.45); }
.player__stage { position: relative; aspect-ratio: 16 / 9; background: var(--bg); overflow: hidden; }
.player__stage:fullscreen { aspect-ratio: auto; }
.player__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(2px); }
.player__overlay { position: absolute; inset: 0; background: rgba(10,10,18,.55); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 20px; }
.player__logo { width: 88px; height: 88px; border-radius: 26px; background: linear-gradient(135deg, #7A3BFF, #FF3366); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 30px rgba(255,51,102,.5); font-family: var(--head); font-weight: 700; font-size: 28px; }
.player__name { margin: 0; font-family: var(--head); font-weight: 700; font-size: 30px; letter-spacing: -0.01em; text-transform: uppercase; }
.btn-start { height: 56px; padding: 0 34px; border-radius: 999px; border: 0; background: var(--grad-violet); color: #fff; display: inline-flex; align-items: center; gap: 10px; font-family: var(--head); font-weight: 700; font-size: 17px; cursor: pointer; box-shadow: 0 0 26px rgba(122,59,255,.65); }
.player__note { color: var(--text-soft); font-size: 13px; font-weight: 600; }
.player__frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 520px) { .player__logo { width: 64px; height: 64px; border-radius: 20px; font-size: 22px; } .player__name { font-size: 22px; } .btn-start { height: 48px; padding: 0 24px; font-size: 15px; } .player__overlay { gap: 10px; } }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: rgba(10,10,18,.6); border-top: 1px solid rgba(255,255,255,.06); }
.toolbar__id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mini-logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #7A3BFF, #FF3366); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 14px; flex-shrink: 0; }
.toolbar__id p { margin: 0; }
.toolbar__title { font-family: var(--head); font-weight: 700; font-size: 16px; }
.toolbar__dev { color: var(--text-2); font-size: 12px; }
.toolbar__actions { display: flex; align-items: center; gap: 8px; }
.tbtn { height: 40px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: var(--elev); color: var(--text-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; width: 40px; padding: 0; }
/* Like / dislike: icon + everyone's count, compact */
.tbtn--vote { width: auto; min-width: 40px; padding: 0 12px; gap: 6px; color: var(--text); }
.tbtn__n { font-family: var(--head); font-size: 13px; font-variant-numeric: tabular-nums; }
.toolbar__sep { width: 1px; height: 24px; margin: 0 2px; background: rgba(255,255,255,.12); }
/* Save / Share / Fullscreen: icon + label, so each says what it does */
.tbtn--act { width: auto; padding: 0 14px 0 12px; gap: 7px; color: var(--text); font-family: var(--head); font-size: 13px; white-space: nowrap; }
.tbtn--act:hover, .tbtn--vote:hover { border-color: rgba(255,255,255,.28); }
.tbtn--fav.is-on { border-color: color-mix(in srgb, var(--coral) 55%, transparent); background: color-mix(in srgb, var(--coral) 14%, var(--elev)); }
.tbtn--like.is-on { background: var(--lime); border-color: var(--lime); color: var(--bg); }
.tbtn--dislike.is-on { background: var(--coral); border-color: var(--coral); color: #fff; }
.tbtn--fav.is-on { color: var(--coral); }
.tbtn--fav svg path { stroke: currentColor; stroke-width: 2; stroke-linejoin: round; fill: none; }
.tbtn--fav.is-on svg path { fill: var(--coral); }
.tbtn--full { border: 0; background: var(--cyan); color: var(--bg); }
/* Phones held upright: header + game + title + buttons fill exactly one screen. The game area takes
   whatever height is left (--hdr-h is the header's measured height, set in app.js; svh = the screen height
   with the browser's bars shown, so nothing is cut off). Up Next and the info follow on scroll. */
@media (max-width: 760px) and (orientation: portrait) {
  .body-row--game { padding: 12px 12px 0; }
  .player { display: flex; flex-direction: column; border-radius: 20px;
            height: calc(100vh - var(--hdr-h, 130px) - 24px); height: calc(100svh - var(--hdr-h, 130px) - 24px); min-height: 420px; }
  .player__stage { flex: 1 1 auto; min-height: 0; aspect-ratio: auto; }
  .toolbar { flex-wrap: nowrap; flex-direction: column; align-items: stretch; gap: 10px; padding: 10px 12px 12px; }
  .toolbar__id { gap: 10px; }
  .toolbar__id > div { min-width: 0; }
  .toolbar__title { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
  /* One bar of five equal cells, icon above the count or label, thin lines between them */
  .toolbar__actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; overflow: hidden; border-radius: 16px; background: var(--elev); border: 1px solid rgba(255,255,255,.1); }
  .toolbar__sep { display: none; }
  .toolbar__actions .tbtn { width: auto; min-width: 0; height: 54px; padding: 0 2px; flex-direction: column; gap: 3px; border: 0; border-radius: 0; background: transparent; font-size: 11px; }
  .toolbar__actions .tbtn:not(:first-child) { border-left: 1px solid rgba(255,255,255,.08); }
  .toolbar__actions .tbtn--like.is-on { background: var(--lime); }
  .toolbar__actions .tbtn--dislike.is-on { background: var(--coral); }
  .toolbar__actions .tbtn--fav.is-on { background: color-mix(in srgb, var(--coral) 18%, transparent); }
  .toolbar__actions .tbtn--full { background: var(--cyan); }
  .toolbar__actions .tbtn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .toolbar__actions .tbtn__n { font-size: 12px; }
}
@media (max-width: 380px) and (orientation: portrait) {
  .toolbar__actions .tbtn { font-size: 10px; letter-spacing: -0.01em; }
}
/* Share panel (app.js openShareSheet, when the device has no share sheet): centered on wide screens,
   a bottom sheet on phones; fades in over a dimmed page */
.share-sheet { color: var(--text); font-family: var(--body); font-size: 14px; } /* it sits outside .page */
.share-sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5,5,10,.6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .2s ease; }
.share-sheet[hidden] { display: none; }
.share-sheet.is-on { opacity: 1; }
.share-sheet__panel { box-sizing: border-box; width: 100%; max-width: 440px; padding: 20px; border-radius: 24px; background: linear-gradient(180deg, #171829 0%, #1C1433 100%); border: 1px solid rgba(158,103,255,.4); box-shadow: 0 30px 60px rgba(0,0,0,.6); display: flex; flex-direction: column; gap: 14px; transform: translateY(12px) scale(.97); transition: transform .2s ease; }
.share-sheet.is-on .share-sheet__panel { transform: none; }
.share-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-sheet__head h2 { margin: 0; font-family: var(--head); font-size: 20px; }
.share-sheet__close { width: 36px; height: 36px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: var(--elev); color: var(--text-2); display: grid; place-items: center; cursor: pointer; }
.share-sheet__close:hover { color: var(--text); }
.share-sheet__what { margin: -6px 0 0; color: var(--text-2); font-size: 13px; line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.share-sheet__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.share-sheet__app { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 4px; border-radius: 16px; background: rgba(10,10,18,.55); border: 1px solid rgba(255,255,255,.06); color: var(--text); font-family: var(--head); font-size: 12px; font-weight: 700; text-align: center; }
.share-sheet__app:hover, .share-sheet__app:focus-visible { color: var(--text); border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, rgba(10,10,18,.55)); }
.share-sheet__icon { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--c); }
.share-sheet__copy { display: flex; gap: 8px; }
.share-sheet__url { flex: 1 1 auto; min-width: 0; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255,255,255,.1); background: rgba(10,10,18,.6); color: var(--text-2); font: inherit; font-size: 13px; }
.share-sheet__url:focus { outline: 2px solid var(--cyan); outline-offset: 1px; }
.share-sheet__copybtn { flex-shrink: 0; height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--cyan); color: var(--bg); font-family: var(--head); font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap; }
@media (max-width: 560px) {
  .share-sheet { align-items: flex-end; padding: 0; }
  .share-sheet__panel { max-width: none; border-radius: 24px 24px 0 0; border-bottom: 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) { .share-sheet, .share-sheet__panel { transition: none; } }
/* Message in the middle of the screen (app.js toast()): fades and grows in, fades out */
.toast { position: fixed; left: 50%; top: 50%; z-index: 90; display: inline-flex; align-items: center; gap: 10px; box-sizing: border-box; width: max-content; max-width: calc(100vw - 48px); padding: 14px 22px; border-radius: 18px; background: rgba(23,24,41,.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border: 1px solid rgba(158,103,255,.45); box-shadow: 0 24px 48px rgba(0,0,0,.6), 0 0 28px rgba(122,59,255,.35); color: var(--text); font-family: var(--head); font-size: 15px; font-weight: 700; line-height: 1.3; text-align: center; overflow-wrap: anywhere; pointer-events: none;
         opacity: 0; visibility: hidden; transform: translate(-50%, -50%) scale(.92); transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s; }
.toast.is-on { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); transition: opacity .25s ease, transform .25s cubic-bezier(.2, .9, .3, 1.2); }
.toast svg { flex-shrink: 0; color: var(--coral); }
@media (prefers-reduced-motion: reduce) { .toast, .toast.is-on { transform: translate(-50%, -50%); } }

.next { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.next h2 { margin: 0; font-family: var(--head); font-size: 18px; }
.next__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 128px; gap: var(--gap); }
.next .gtile { border-radius: 18px; padding: 12px; flex-direction: row; align-items: flex-end; justify-content: flex-start; }
.next .gtile .shade { background: linear-gradient(0deg, rgba(10,10,18,.88) 0%, rgba(10,10,18,0) 60%); }
.next .gtile__title { font-size: 15px; }
.ntile { background: var(--card); }
.next .soon { border-radius: 18px; padding: 12px; gap: 6px; }
.next .soon strong { font-size: 12px; }

.article { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.card { border-radius: 24px; padding: 24px; background: rgba(23,24,41,.85); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 14px; }
.card h2 { margin: 0; font-family: var(--head); font-size: 24px; }
.card--info { gap: 18px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-3); }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--text); }
.crumbs [aria-current] { color: var(--text); }
.title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.page-h1 { margin: 0; font-family: var(--head); font-weight: 700; font-size: 40px; line-height: 1.05; letter-spacing: -0.02em; }
.title-row .badge { padding: 6px 12px; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.facts div { padding: 12px 14px; border-radius: 14px; background: var(--canvas); border: 1px solid rgba(255,255,255,.06); }
.facts dt { color: var(--text-3); font-size: 12px; font-weight: 600; }
.facts dd { margin: 4px 0 0; font-weight: 700; }
.tags { margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--elev); color: var(--text); font-family: var(--head); font-weight: 600; font-size: 13px; border: 1px solid rgba(255,255,255,.08); }
.tag:hover { color: var(--text); border-color: rgba(158,103,255,.6); }
.prose { margin: 0; color: var(--text-soft); font-size: 15px; line-height: 1.7; max-width: 72ch; }
.card--what { display: block; }
.card--what h2 { margin-bottom: 10px; }

.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.steps li { padding: 16px; border-radius: 18px; background: var(--canvas); border: 1px solid var(--b); display: flex; flex-direction: column; gap: 8px; }
.steps__n { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; background: var(--nb); color: var(--nf); }
.steps strong { font-family: var(--head); font-size: 16px; }
.steps span:last-child { color: var(--text-2); font-size: 13px; line-height: 1.55; }

.controls { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.controls > div { padding: 16px; border-radius: 18px; background: var(--canvas); border: 1px solid rgba(255,255,255,.06); display: flex; flex-direction: column; gap: 12px; }
.controls strong { display: flex; align-items: center; gap: 8px; font-family: var(--head); font-size: 15px; }
.controls dl { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.controls dl div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.controls dt { color: var(--text-2); }
.controls dd { margin: 0; display: flex; gap: 4px; font-weight: 700; }
.key { min-width: 28px; height: 28px; padding: 0 8px; box-sizing: border-box; border-radius: 8px; background: var(--elev); border: 1px solid rgba(255,255,255,.12); border-bottom-width: 3px; display: inline-flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 12px; }

.tips { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.tips li { display: flex; gap: 10px; color: var(--text-soft); line-height: 1.6; }
.tips .ic { color: var(--lime); margin-top: 3px; }
.card--tips { gap: 12px; }

.card--faq { gap: 10px; }
.card--faq h2 { margin-bottom: 4px; }
.faq { border-radius: 16px; background: var(--canvas); border: 1px solid rgba(255,255,255,.06); overflow: hidden; }
.faq[open] { border-color: rgba(0,245,212,.4); }
.faq summary { list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: 16px; }
.faq h3 { margin: 0; min-height: 52px; padding: 12px 16px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--head); font-weight: 700; font-size: 15px; }
.faq h3::after { content: '+'; color: var(--cyan); font-size: 20px; line-height: 1; }
.faq[open] h3::after { content: '\2212'; }
.faq p { margin: 0; padding: 0 16px 16px; color: var(--text-2); line-height: 1.6; }

.aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.similar { border-radius: 24px; padding: 20px; background: rgba(23,24,41,.85); border: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: 12px; }
.similar h2 { margin: 0; font-family: var(--head); font-size: 18px; }
.similar__item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: var(--canvas); border: 1px solid rgba(255,255,255,.06); color: var(--text); }
.similar__item:hover { color: var(--text); }
.similar__swatch { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; overflow: hidden; position: relative; }
.similar__item > span:last-child { display: flex; flex-direction: column; }
.similar__item strong { font-family: var(--head); }
.similar__item small { color: var(--text-2); font-size: 12px; }
.similar__art { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ac, #9E67FF); background: color-mix(in srgb, var(--ac, #9E67FF) 18%, var(--canvas)); }

/* Quiz / poll on its own page: the card at a comfortable reading width */
.item-play > .poll--card { max-width: 640px; }
.poll__q a { color: inherit; }
.poll__q a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.quiz__go { background: var(--ac, #76EE59); color: #0A0A12; border-color: transparent; }
.quiz--page .poll__foot { flex-wrap: wrap; justify-content: flex-start; gap: 8px; }
.quiz--page .poll__foot .btn { white-space: nowrap; }

/* Site pages (About, Contact, Privacy, Terms): readable text */
.doc__date { margin: 0; color: var(--text-3); font-size: 13px; font-weight: 600; }
.lead a, .doc a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; }
.doc { gap: 12px; }
.doc h2 { font-size: 20px; margin-top: 14px; }
.doc h2:first-child { margin-top: 0; }
.doc p, .doc ul { margin: 0; max-width: 72ch; color: var(--text-soft); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.doc ul { padding-left: 22px; display: flex; flex-direction: column; gap: 6px; }
.doc-nav__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 14px; background: var(--canvas); border: 1px solid rgba(255,255,255,.06); color: var(--text); font-family: var(--head); font-weight: 600; font-size: 14px; }
.doc-nav__link:hover { color: var(--text); border-color: rgba(0,245,212,.4); }
.doc-nav__link .ic { color: var(--text-3); }

/* Simple pages (category, 404) */
.lead { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; max-width: 72ch; }
.empty { padding: 32px; border-radius: 20px; border: 1.5px dashed rgba(149,155,184,.35); color: var(--text-2); text-align: center; }

/* ---------- Language switcher ---------- */
.lang { position: relative; }
.lang__btn { list-style: none; height: 44px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.08); background: var(--card); color: var(--text-2); display: flex; align-items: center; gap: 6px; font-family: var(--head); font-weight: 700; font-size: 13px; cursor: pointer; }
.lang__btn::-webkit-details-marker { display: none; }
.lang__btn:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
.lang[open] .lang__btn { border-color: rgba(0,245,212,.5); color: var(--text); }
.lang[open] .lang__btn .ic:last-child { transform: rotate(180deg); }
.lang__menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 180px; margin: 0; padding: 6px; list-style: none; border-radius: 16px; background: var(--elev); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 20px 40px rgba(0,0,0,.6); }
.lang__item { display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; border-radius: 10px; color: var(--text-2); font-weight: 600; }
.lang__item b { width: 28px; font-family: var(--head); font-size: 12px; color: var(--text-3); }
.lang__item:hover { background: var(--card); color: var(--text); }
.lang__item.is-on { color: var(--text); background: rgba(122,59,255,.25); }
.lang__item.is-on b { color: var(--cyan); }
.lang-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 14px; color: var(--text-3); font-size: 13px; font-weight: 600; }
.lang-inline__item { color: var(--text-2); }
.lang-inline__item:hover { color: var(--text); }
.lang-inline__item.is-on { color: var(--cyan); }
.lang-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(23,24,41,.85); border: 1px solid rgba(255,255,255,.06); }
.lang-card .menu__title { display: flex; align-items: center; gap: 6px; padding: 0; }
.lang-card__row { display: flex; flex-wrap: wrap; gap: 8px; }
.lang-card .pill { display: inline-flex; align-items: center; height: 36px; }
.lang-card .pill:hover { color: var(--text); }
.lang-card .pill.is-on:hover { color: #fff; }
@media (max-width: 520px) { .lang__btn { padding: 0 10px; } .lang__btn span { display: none; } }