/* ==========================================================================
   Kiss918 Hub — design system
   Concept: "app store listing" — light, clean, one magenta accent.
   Mobile first. Desktop (>=960px) adds top nav, 2-column layout, sticky aside.
   ========================================================================== */

:root {
  --bg: #f5f3f8;
  --surface: #ffffff;
  --surface-2: #faf8fc;
  --ink: #191321;
  --ink-2: #3b3446;
  --muted: #6c6478;
  --line: #e8e3ef;

  --brand: #d81b72;
  --brand-600: #b8145f;
  --brand-50: #fff0f6;
  --brand-100: #ffd9e8;

  --ok: #0f8a4f;
  --ok-50: #eaf7f0;
  --ok-line: #bfe6cf;
  --warn: #9a4a07;
  --warn-50: #fff6e6;
  --warn-line: #f5d9a8;

  --wa: #168a46;
  --tg: #1d83b8;
  --dark: #191321;

  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --shadow: 0 1px 2px rgba(25, 19, 33, .05), 0 6px 20px rgba(25, 19, 33, .06);
  --shadow-brand: 0 6px 18px rgba(216, 27, 114, .28);

  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  --tabbar-h: 66px;
  --header-h: 58px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--font);
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-600); }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
code { font-family: var(--mono); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }

.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i-sm { width: 16px; height: 16px; }
.i-lg { width: 24px; height: 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; color: var(--ink); text-decoration: none; font-size: 1.05rem; white-space: nowrap; }
.brand-logo { height: 44px; width: auto; max-width: none; border-radius: 10px; flex: none; }
.site-footer .brand-logo { height: 50px; padding: 3px; background: #fff; border-radius: 12px; }
.nav { display: none; margin-left: 20px; gap: 2px; }
.nav a { padding: 8px 12px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 650; font-size: .94rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--brand-50); color: var(--brand-600); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.lang { display: flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang a { padding: 4px 9px; border-radius: 999px; font-size: .78rem; font-weight: 750; color: var(--muted); text-decoration: none; line-height: 1.5; }
.lang a[aria-current="true"] { background: var(--ink); color: #fff; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0;
}

/* ---------- Layers: drawer + bottom sheets ---------- */
.layer { position: fixed; inset: 0; z-index: 70; display: none; }
.layer.open { display: block; }
.layer-backdrop { position: absolute; inset: 0; background: rgba(25, 19, 33, .5); border: 0; width: 100%; cursor: pointer; }

.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px);
  background: var(--surface); padding: 14px 18px 24px; overflow-y: auto;
  box-shadow: -10px 0 30px rgba(25, 19, 33, .18);
  animation: slide-in .22s ease-out;
}
.drawer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.drawer-group h3 { font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin: 20px 0 4px; }
.drawer-group a { display: flex; align-items: center; justify-content: space-between; padding: 12px 2px; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 650; }
.drawer-group a .i { color: var(--muted); }

.sheet-panel {
  position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 520px;
  background: var(--surface); border-radius: 24px 24px 0 0;
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -10px 30px rgba(25, 19, 33, .2);
  animation: slide-up .24s ease-out;
}
.sheet-grip { width: 44px; height: 5px; border-radius: 9px; background: var(--line); margin: 0 auto 14px; }
.sheet-panel h2 { margin-bottom: .25em; }
.sheet-panel .btn + .btn { margin-top: 10px; }
.sheet-steps { margin: 14px 0 18px; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.sheet-steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: .95rem; }
.sheet-steps li::before {
  content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-50); color: var(--brand-600); font-weight: 800; font-size: .82rem; display: grid; place-items: center;
}

@keyframes slide-in { from { transform: translateX(30px); opacity: 0; } }
@keyframes slide-up { from { transform: translateY(40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .drawer-panel, .sheet-panel { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 8px 16px; border-radius: 14px;
  font: 800 1rem/1.15 var(--font); text-decoration: none; border: 0; cursor: pointer; text-align: left;
  transition: transform .08s ease, filter .15s ease;
}
.btn:active { transform: scale(.98); }
.btn:hover { filter: brightness(1.06); }
.btn small { display: block; font-weight: 600; opacity: .85; font-size: .74rem; margin-top: 2px; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn-dark { background: var(--dark); color: #fff; }
.btn-ghost { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.btn-wa { background: var(--wa); color: #fff; }
.btn-tg { background: var(--tg); color: #fff; }
.btn-sm { min-height: 40px; font-size: .9rem; border-radius: 12px; padding: 6px 14px; gap: 7px; }
.btn-block { display: flex; width: 100%; }
.btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.btn.header-cta { display: none; }

/* ---------- Cards & sections ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.section { margin: 30px 0; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.section-head p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.section-head > a { font-size: .9rem; font-weight: 750; text-decoration: none; white-space: nowrap; }
.eyebrow { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-600); margin: 0 0 10px; }
.more { display: inline-flex; align-items: center; gap: 4px; font-weight: 750; font-size: .9rem; text-decoration: none; margin-top: 12px; }

/* ---------- Hero / app card ---------- */
.hero { padding: 16px 0 4px; }
.hero-grid { display: flex; flex-direction: column; gap: 14px; }
.hero-grid > .appcard { order: 1; }
.hero-grid > .shots-wrap { order: 2; }
.hero-grid > .filecheck { order: 3; }

.appcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); }
.app-head { display: flex; gap: 14px; align-items: center; }
.app-icon { width: 78px; height: 78px; border-radius: 20%; flex: none; box-shadow: 0 6px 16px rgba(216, 27, 114, .25); }
.app-title { font-size: 1.45rem; margin: 0; }
.app-sub { color: var(--muted); font-size: .92rem; margin: 3px 0 0; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin: 16px -4px; border-block: 1px solid var(--line); }
.stat { text-align: center; padding: 10px 4px; position: relative; min-width: 0; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 25%; height: 50%; border-left: 1px solid var(--line); }
.stat b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat > span { font-size: .72rem; color: var(--muted); }

.verified { display: flex; align-items: center; gap: 7px; color: var(--ok); font-size: .86rem; font-weight: 700; margin: 0 0 12px; }
.help-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; margin-top: 14px; }
.help-row > span { grid-column: 1 / -1; font-size: .86rem; color: var(--muted); }
.fine { font-size: .78rem; color: var(--muted); margin: 12px 0 0; }

/* Screenshots */
.shots { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.shots::-webkit-scrollbar { display: none; }
.shots img { flex: none; height: 320px; width: auto; border-radius: 20px; scroll-snap-align: start; border: 1px solid var(--line); background: #2a1033; }

/* File check */
.filecheck { border-color: var(--ok-line); background: linear-gradient(180deg, var(--ok-50), var(--surface) 55%); }
.filecheck-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.filecheck-head h2 { margin: 0; font-size: 1.1rem; }
.filecheck-head p { margin: 0; font-size: .82rem; color: var(--muted); }
.fc-ico { width: 40px; height: 40px; border-radius: 12px; background: var(--ok); color: #fff; display: grid; place-items: center; flex: none; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.badge-ok { background: var(--ok); color: #fff; margin-left: auto; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; margin: 0; font-size: .9rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.hash { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px dashed #9fd5b5; border-radius: 12px; padding: 8px 8px 8px 12px; margin-top: 14px; }
.hash-label { font-size: .7rem; font-weight: 800; color: var(--ok); letter-spacing: .05em; }
.hash code { font-size: .8rem; font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hash code.wrap { white-space: normal; overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface-2); border-radius: 9px; padding: 6px 10px; font: 750 .78rem var(--font); color: var(--ink); cursor: pointer; }
.copy.copied { background: var(--ok); border-color: var(--ok); color: #fff; }

/* ---------- Brand grid ---------- */
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.brand-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 6px 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  text-decoration: none; color: var(--ink); font-weight: 750; font-size: .9rem; text-align: center;
}
.brand-tile:hover { border-color: var(--brand-100); box-shadow: var(--shadow); }
/* Phone brand logos: square marks fill the height, wordmarks fill the width */
.phone-logo { display: grid; place-items: center; flex: none; }
.phone-logo img { max-width: min(100%, 88px); max-height: 34px; width: auto; height: auto; }
.link-list .phone-logo img { max-width: 72px; max-height: 30px; }
.phone-logo .i { width: 28px; height: 28px; color: var(--ink-2); }
.brand-tile .phone-logo { width: 100%; height: 34px; }
.brand-tile small { color: var(--muted); font-weight: 500; font-size: .72rem; line-height: 1.3; }

/* ---------- Link list (fix / related) ---------- */
.link-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; text-decoration: none; color: var(--ink); border-top: 1px solid var(--line); }
.link-list li:first-child a { border-top: 0; }
.link-list a:hover { background: var(--surface-2); }
.link-list .ico { width: 36px; height: 36px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; flex: none; }
.link-list .t { flex: 1; font-weight: 750; font-size: .95rem; line-height: 1.35; }
.link-list .t small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.link-list .chev { color: var(--muted); }

/* ---------- Timeline (what's new) ---------- */
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -26px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline li:not(:first-child)::before { border-color: var(--line); }
.timeline time { font-size: .78rem; color: var(--muted); font-weight: 750; }
.timeline b { display: block; }
.timeline p { margin: 2px 0 0; font-size: .9rem; color: var(--ink-2); }

/* ---------- Games ---------- */
.games { display: grid; grid-auto-flow: column; grid-auto-columns: 46%; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; margin: 0 -16px; padding: 2px 16px 8px; scrollbar-width: none; }
.games::-webkit-scrollbar { display: none; }
.game { scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; text-decoration: none; color: var(--ink); }
.game img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.game div { padding: 9px 11px 11px; }
.game b { display: block; font-size: .92rem; }
.game small { color: var(--muted); font-size: .76rem; }
.games.games-grid { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; }

/* Game page hero */
.game-hero { display: grid; gap: 16px; padding-top: 10px; }
.game-hero img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--line); }
.game-hero h1 { margin-bottom: .3em; }

/* Checklist (before you start) */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; }
.checklist .ico { width: 34px; height: 34px; border-radius: 11px; background: var(--ok-50); color: var(--ok); display: grid; place-items: center; flex: none; }
.checklist li > div > b { display: block; }
.checklist p { margin: 2px 0 0; font-size: .92rem; color: var(--ink-2); }
.link-list .ico.phone-logo { width: 72px; height: 30px; background: none; border-radius: 0; }

/* ---------- Support block ---------- */
.support { background: linear-gradient(135deg, #2a1033, #6a1748); color: #fff; border-radius: var(--r-lg); padding: 22px 18px; position: relative; overflow: hidden; }
.support::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 77, 154, .45), transparent 70%); }
.support h2 { color: #fff; }
.support p { color: rgba(255, 255, 255, .82); font-size: .95rem; }
.support .btn-row { position: relative; z-index: 1; }
.support-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: .8rem; color: rgba(255, 255, 255, .75); position: relative; z-index: 1; }
.support-meta span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 8px; }
.faq summary { cursor: pointer; list-style: none; padding: 14px 46px 14px 16px; font-weight: 750; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-size: 1.35rem; font-weight: 500; color: var(--brand); }
.faq details[open] summary::after { content: "\2013"; }
.faq details > div { padding: 0 16px 14px; color: var(--ink-2); }
.faq details > div p:last-child { margin-bottom: 0; }

/* ---------- Trust strip ---------- */
.trust { display: grid; gap: 10px; }
.trust a { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; color: var(--ink); }
.trust .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; flex: none; color: var(--ink-2); }
.trust b { display: block; }
.trust small { color: var(--muted); font-size: .84rem; line-height: 1.4; display: block; }

/* ---------- Inner pages ---------- */
.crumbs { font-size: .8rem; color: var(--muted); padding-top: 14px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "\203A"; margin-right: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--brand-600); }
.page-head { padding: 10px 0 4px; }
.page-head h1 { margin-bottom: .35em; }
.lede { font-size: 1.02rem; color: var(--ink-2); }
.meta-strip { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.chip-ok { background: var(--ok-50); border-color: var(--ok-line); color: var(--ok); }

.answer { border-left: 4px solid var(--brand); background: var(--brand-50); border-radius: 0 var(--r) var(--r) 0; padding: 14px 16px; margin: 16px 0; }
.answer strong:first-child { display: block; font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--brand-600); margin-bottom: 4px; }
.answer p { margin: 0; }

.toc ol { margin: 0; padding-left: 1.2em; }
.toc li { margin: 4px 0; }
.toc a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.toc a:hover { color: var(--brand-600); }
.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .09em; color: var(--muted); margin-bottom: 8px; }

.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; gap: 14px; }
.step { counter-increment: s; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.step h3 { display: flex; align-items: center; gap: 10px; margin-bottom: .4em; }
.step h3::before { content: counter(s); flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .88rem; }
.step p:last-child { margin-bottom: 0; }
.step figure { margin: 0; }
.step img { width: min(170px, 50%); aspect-ratio: 390 / 844; border-radius: 18px; border: 1px solid var(--line); margin: 0 auto; }
.step figcaption { text-align: center; font-size: .78rem; color: var(--muted); margin-top: 6px; }
.path { display: inline-block; font-size: .86rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; font-weight: 650; }

.callout { display: flex; gap: 12px; padding: 13px 14px; border-radius: 14px; font-size: .93rem; margin: 14px 0; }
.callout p { margin: 0; }
.callout .i { margin-top: 2px; }
.callout-warn { background: var(--warn-50); border: 1px solid var(--warn-line); color: #6b3305; }
.callout-ok { background: var(--ok-50); border: 1px solid var(--ok-line); color: #0b5e36; }
.callout-info { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }

/* Device picker (download page) */
.picker { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--shadow); }
.picker > h2 { font-size: 1rem; margin: 2px 2px 10px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { display: flex; align-items: center; justify-content: center; gap: 6px; border: 0; background: none; padding: 10px 4px; border-radius: 10px; font: 750 .9rem var(--font); color: var(--muted); cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(25, 19, 33, .08), 0 2px 8px rgba(25, 19, 33, .08); }
.panel { padding: 16px 2px 2px; }
.panel h3 { margin-bottom: .3em; }
.panel .kv { margin: 12px 0 16px; }
.brand-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.brand-chips a { text-decoration: none; }

/* Error cards (fix pages) */
.errors details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 10px; overflow: hidden; }
.errors summary { list-style: none; cursor: pointer; padding: 14px 44px 14px 14px; position: relative; display: flex; gap: 12px; align-items: center; }
.errors summary::-webkit-details-marker { display: none; }
.errors summary::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-70%) rotate(45deg); transition: transform .15s; }
.errors details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.errors .msg { font-family: var(--mono); font-size: .82rem; background: #1f1828; color: #f4eef9; border-radius: 8px; padding: 3px 8px; display: inline-block; margin-top: 3px; }
.errors summary .t { font-weight: 750; line-height: 1.35; }
.errors summary .ico { width: 36px; height: 36px; border-radius: 11px; background: var(--warn-50); color: var(--warn); display: grid; place-items: center; flex: none; }
.errors .body { padding: 0 16px 16px; border-top: 1px solid var(--line); }
.errors .body h4 { margin: 14px 0 4px; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.errors .body ol { margin: 0; }
.errors .body li { margin: 4px 0; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
table { width: 100%; border-collapse: collapse; font-size: .88rem; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.table-fit th, .table-fit td { white-space: normal; }
.table-fit td:first-child { min-width: 7.5em; }
td code { font-size: .8rem; }
.tag-new { background: var(--brand); color: #fff; font-size: .68rem; font-weight: 800; border-radius: 6px; padding: 2px 6px; margin-left: 6px; }

.prose h2 { margin-top: 1.4em; }
.prose ul li, .prose ol li { margin: 4px 0; }

/* ---------- Aside (desktop) ---------- */
.layout { display: block; }
.aside { display: none; }
.mini-app { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.mini-app img { width: 52px; height: 52px; border-radius: 20%; }
.mini-app b { display: block; }
.mini-app small { color: var(--muted); font-size: .8rem; }
.aside .card + .card { margin-top: 14px; }
.aside .btn + .btn { margin-top: 8px; }

/* ---------- Footer ---------- */
.site-footer { background: #1a1321; color: #cfc7da; margin-top: 44px; padding: 32px 0 26px; font-size: .9rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: #ff8fbd; }
.foot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 20px; }
.foot-brand { grid-column: 1 / -1; }
.foot-brand p { margin: 10px 0 0; color: #a9a0b6; font-size: .86rem; max-width: 420px; }
.foot-grid h3 { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: #9b91a8; margin-bottom: 8px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin: 7px 0; }
.legal { border-top: 1px solid #2f2638; margin-top: 24px; padding-top: 18px; font-size: .8rem; color: #9b91a8; display: flex; gap: 14px; align-items: flex-start; }
.legal p { margin: 0 0 6px; }
.age { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 2px solid #ff6b9d; color: #fff; font-weight: 800; font-size: .8rem; }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font: 700 .68rem var(--font); color: var(--muted); text-decoration: none; background: none; border: 0; cursor: pointer; padding: 0;
}
.tabbar [aria-current="page"] { color: var(--brand); }
.tabbar .tab-main .bubble {
  width: 54px; height: 54px; border-radius: 50%; background: var(--brand); color: #fff;
  display: grid; place-items: center; margin-top: -26px; box-shadow: var(--shadow-brand); border: 4px solid var(--bg);
}
.tabbar .tab-main { color: var(--brand-600); }

/* ---------- Desktop ---------- */
@media (min-width: 640px) {
  .brand-grid { grid-template-columns: repeat(6, 1fr); }
  .games { grid-auto-columns: 30%; }
  .games.games-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .games.games-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .game-hero { grid-template-columns: 280px minmax(0, 1fr); align-items: center; gap: 24px; }
  .step.has-img { grid-template-columns: minmax(0, 1fr) 160px; align-items: start; }
  .step.has-img img { width: 100%; }
  .trust { grid-template-columns: repeat(3, 1fr); }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .foot-brand { grid-column: auto; }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.4rem; }
  .tabbar { display: none; }
  .nav { display: flex; }
  .menu-btn { display: none; }
  .btn.header-cta { display: inline-flex; }

  .hero { padding-top: 28px; }
  .hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "app check" "shots shots"; gap: 20px; }
  .hero-grid > .appcard { grid-area: app; padding: 28px; }
  .hero-grid > .filecheck { grid-area: check; padding: 22px; }
  .hero-grid > .shots-wrap { grid-area: shots; }
  .app-icon { width: 104px; height: 104px; }
  .app-title { font-size: 2.1rem; }
  .appcard .btn-row { max-width: 520px; }
  .help-row { grid-template-columns: auto auto auto; justify-content: start; gap: 10px; }
  .help-row > span { grid-column: auto; margin-right: 6px; }
  .appcard .stats { max-width: 560px; }
  .shots { margin: 0; padding: 2px 0 10px; }
  .shots img { height: 424px; border-radius: 26px; }

  .cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; margin: 36px 0; }
  .cols-2 > .section { margin-top: 0; }
  .games { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 0; }

  .layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start; }
  .aside { display: block; position: sticky; top: calc(var(--header-h) + 18px); padding-top: 18px; }
  .page-head { padding-top: 18px; }
}
