:root {
  --bg: #fbf8f3;
  --bg-alt: #f3ede4;
  --card: #ffffff;
  --text: #1f1a14;
  --muted: #6b6257;
  --line: #e6ddd0;
  --brand: #f08a24;
  --brand-ink: #ffffff;
  --brand-soft: #fde8d2;
  --accent: #2f6fe4;
  --radius: 20px;
  --shadow: 0 1px 2px rgb(31 26 20 / 6%), 0 8px 24px rgb(31 26 20 / 8%);
  --max: 1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14110e; --bg-alt: #1c1814; --card: #221d18; --text: #f4eee6; --muted: #b0a596;
    --line: #352d25; --brand: #ff9c3d; --brand-ink: #1a1007; --brand-soft: #3a2614; --accent: #7aa7ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14110e; --bg-alt: #1c1814; --card: #221d18; --text: #f4eee6; --muted: #b0a596;
  --line: #352d25; --brand: #ff9c3d; --brand-ink: #1a1007; --brand-soft: #3a2614; --accent: #7aa7ff;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 35%);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 17px/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 32px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; color: var(--text); text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #e85d75); color: #fff; font-size: 1.05rem;
}
.nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px 12px; border-radius: 999px; white-space: nowrap; font-size: .95rem; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--bg-alt); }
@media (max-width: 640px) {
  .site-header .wrap { padding-top: 8px; padding-bottom: 8px; gap: 4px; }
  .nav { margin-left: -10px; width: calc(100% + 10px); }
  .nav a { padding: 6px 10px; font-size: .9rem; }
}

/* sections */
section { padding: 56px 0; }
@media (min-width: 768px) { section { padding: 88px 0; } }
.alt { background: var(--bg-alt); }
.eyebrow { display: inline-block; font-weight: 800; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: 12px; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 640px; }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.hero { padding-top: 64px; }
@media (min-width: 768px) { .hero { padding-top: 112px; padding-bottom: 112px; } }

.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px;
  font-weight: 800; text-decoration: none; background: var(--brand); color: var(--brand-ink); border: 0;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 2px var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.play-badge img { height: 58px; width: auto; margin: -9px; }

/* cards */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.card .ico { font-size: 1.8rem; line-height: 1; margin-bottom: 12px; }

.app-card { display: grid; gap: 0; padding: 0; overflow: hidden; text-decoration: none; color: inherit; transition: transform .2s; }
.app-card:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .app-card { transition: none; } .app-card:hover { transform: none; } }
.app-card .banner { aspect-ratio: 1024 / 500; object-fit: cover; width: 100%; }
.app-card .body { padding: 20px 24px 24px; display: flex; gap: 16px; align-items: flex-start; }
.app-card .body img { width: 64px; height: 64px; border-radius: 16px; flex: none; }
.app-card .body h3 { margin-bottom: 4px; }
.app-card .body p { color: var(--muted); margin: 0; font-size: .95rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tag { font-size: .78rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--text); }

/* app detail */
.app-hero { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .app-hero { grid-template-columns: 1.1fr 1fr; gap: 56px; } }
.app-id { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.app-id img { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
.app-id small { display: block; color: var(--muted); font-weight: 700; }
.app-hero .feature { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; margin-top: 28px; }
.facts div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.facts dt { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.facts dd { margin: 0; font-weight: 800; }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 220px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 16px 16px; margin: 0 -16px;
  overscroll-behavior-x: contain;
}
.shots a { scroll-snap-align: start; }
.shots img { border-radius: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 9 / 16; object-fit: cover; width: 100%; }
@media (min-width: 1100px) { .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } }

.list { padding-left: 1.2em; }
.list li { margin-bottom: .4em; }

/* legal docs */
.doc { display: grid; gap: 32px; }
@media (min-width: 960px) { .doc { grid-template-columns: 240px 1fr; gap: 56px; } }
.toc { font-size: .92rem; }
@media (min-width: 960px) { .toc { position: sticky; top: 88px; align-self: start; } }
.toc ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.toc a { display: block; color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 700; }
.toc a:hover, .toc a[aria-current="page"] { background: var(--bg-alt); color: var(--text); }
@media (max-width: 959px) { .toc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; } }
.prose { max-width: 760px; min-width: 0; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.meta { color: var(--muted); font-size: .95rem; }
.note { background: var(--brand-soft); border-radius: 14px; padding: 16px 18px; margin: 0 0 1.2em; }
.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; min-width: 560px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-alt); font-weight: 800; }
tr:last-child td { border-bottom: 0; }

details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 800; padding: 12px 0; }
details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--muted); text-decoration: none; font-weight: 700; }
.site-footer a:hover { color: var(--text); }
