/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --bg: #f4f6f1;
  --bg-2: #eaefe6;
  --surface: #ffffff;
  --surface-2: #f7f9f5;
  --ink: #0b1410;
  --ink-2: #26332c;
  --muted: #627069;
  --line: #e1e7de;
  --line-2: #d3dbcf;
  --accent: #0c9f62;
  --accent-ink: #087a4a;
  --accent-soft: #e2f6eb;
  --on-accent: #ffffff;
  --lime: #c8f135;
  --mod: #ff5f1f;
  --star: #ffb21e;
  --apk: #2f6bff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgb(16 32 24 / .06);
  --shadow: 0 1px 2px rgb(16 32 24 / .05), 0 8px 24px -8px rgb(16 32 24 / .12);
  --shadow-lg: 0 24px 60px -20px rgb(16 32 24 / .28);
  --font-display: "Bricolage Grotesque", "Figtree", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --header-h: 72px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #090e0c; --bg-2: #0d1411; --surface: #111915; --surface-2: #16201b; --ink: #e9f2ec; --ink-2: #c8d4cd;
  --muted: #8b9a91; --line: #1f2b25; --line-2: #2a3830; --accent: #23d48a; --accent-ink: #4fe3a3; --accent-soft: #11291e; --on-accent: #04140c;
  --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / .02); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .7);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #090e0c; --bg-2: #0d1411; --surface: #111915; --surface-2: #16201b; --ink: #e9f2ec; --ink-2: #c8d4cd;
    --muted: #8b9a91; --line: #1f2b25; --line-2: #2a3830; --accent: #23d48a; --accent-ink: #4fe3a3; --accent-soft: #11291e; --on-accent: #04140c;
    --shadow-sm: none; --shadow: 0 0 0 1px rgb(255 255 255 / .02); --shadow-lg: 0 24px 60px -20px rgb(0 0 0 / .7);
    color-scheme: dark;
  }
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 var(--font-body); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -.025em; line-height: 1.15; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; margin: .3em 0; }
h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 .8em; }
h3 { font-size: 1.1rem; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.mono { font-family: var(--font-mono); font-size: .86em; letter-spacing: -.01em; }
code { font-family: var(--font-mono); font-size: .85em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: .1em .4em; }
.ic { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* ==========================================================================
   Buttons, pills
   ========================================================================== */
.btn {
  --b: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--b); color: var(--on-accent); font: 700 .95rem/1.2 var(--font-body);
  transition: transform .15s, box-shadow .2s, background .2s; white-space: nowrap;
}
.btn.btn-dl, .btn.btn-dl:hover { color: #fff; }
.btn:hover { text-decoration: none; color: var(--on-accent); transform: translateY(-1px); box-shadow: 0 10px 24px -8px color-mix(in srgb, var(--b) 70%, transparent); }
.btn:active { transform: translateY(0); }
.btn[hidden] { display: none; }
.btn .ic { width: 1.1em; height: 1.1em; }
.btn-sm { padding: 8px 16px; font-size: .85rem; }
.btn-dl { padding: 14px 26px; font-size: 1.02rem; background: linear-gradient(135deg, #12b871, #0a8f57); box-shadow: 0 10px 28px -10px rgb(12 159 98 / .8), inset 0 1px 0 rgb(255 255 255 / .25); }
.btn-dl small { font: 500 .78rem var(--font-mono); opacity: .8; padding-left: 8px; border-left: 1px solid rgb(255 255 255 / .35); }
.btn-ghost, .btn-ghost:hover { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { box-shadow: var(--shadow); }
.btn.wide { width: 100%; }
.pill-soft { display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-ink); font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.pill-soft:hover { text-decoration: none; filter: brightness(.97); }
.pill-soft .dot, .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pill-ok { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-ink); font-weight: 700; font-size: .85rem; }
.pill-latest { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent-soft); padding: 1px 8px; border-radius: 99px; vertical-align: 2px; }
.pill-fresh { flex: none; font-size: .62rem; font-weight: 800; letter-spacing: .06em; color: var(--accent-ink); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); padding: 1px 7px; border-radius: 99px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.header-row { display: flex; align-items: center; gap: 18px; height: var(--header-h); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { display: grid; place-items: center; border-radius: 11px; overflow: hidden; box-shadow: 0 6px 16px -6px rgb(12 159 98 / .7); }
.logo-mark img { display: block; }
.logo-text { display: flex; flex-direction: column; font: 800 1.22rem/1 var(--font-display); letter-spacing: -.03em; }
.logo-text small { font: 600 .62rem/1.4 var(--font-body); letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); margin-top: 3px; }
.main-nav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.main-nav a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .93rem; transition: background .2s, color .2s; }
.main-nav a .ic { color: var(--muted); transition: color .2s; }
.main-nav a:hover { text-decoration: none; background: var(--surface-2); }
.main-nav a[aria-current] { background: var(--ink); color: var(--bg); }
.main-nav a[aria-current] .ic { color: var(--lime); }
.search { position: relative; margin-left: auto; flex: 0 1 320px; display: flex; align-items: center; }
.search > .ic { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.search input {
  width: 100%; height: 44px; padding: 0 72px 0 40px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: .93rem;
  transition: border-color .2s, box-shadow .2s;
}
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.search kbd { position: absolute; right: 10px; font: 600 .68rem var(--font-mono); color: var(--muted); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; background: var(--surface-2); pointer-events: none; }
.suggest {
  position: absolute; top: 52px; left: 0; right: 0; z-index: 40; padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg);
}
.suggest a { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); font-weight: 600; font-size: .93rem; }
.suggest a small { display: block; color: var(--muted); font: 500 .75rem var(--font-mono); }
.suggest a:hover, .suggest a.on { background: var(--accent-soft); text-decoration: none; }
.suggest img { width: 38px; height: 38px; border-radius: 10px; }
.suggest .all { justify-content: center; color: var(--accent-ink); font-size: .85rem; border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; margin-top: 4px; }
.theme-btn {
  position: relative; width: 44px; height: 44px; flex: none; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); display: grid; place-items: center;
}
.theme-btn .ic { position: absolute; transition: transform .35s, opacity .25s; }
.theme-btn .moon { opacity: 0; transform: rotate(-60deg) scale(.6); }
:root[data-theme="dark"] .theme-btn .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
:root[data-theme="dark"] .theme-btn .moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .sun { opacity: 0; transform: rotate(60deg) scale(.6); }
  :root:not([data-theme="light"]) .theme-btn .moon { opacity: 1; transform: none; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center;
  padding: 56px 0 40px; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: -40px -50vw 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 18% 30%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
    radial-gradient(500px 300px at 80% 40%, color-mix(in srgb, var(--lime) 22%, transparent), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 60% 80% at 50% 40%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 80% at 50% 40%, #000 30%, transparent 75%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 14px 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .82rem; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-sm); }
.pulse { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); line-height: 1.02; letter-spacing: -.045em; margin: 18px 0 16px; }
.hl { position: relative; white-space: nowrap; background: linear-gradient(transparent 62%, var(--lime) 62%, var(--lime) 92%, transparent 92%); padding: 0 .08em; }
:root[data-theme="dark"] .hl { background: none; color: var(--lime); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hl { background: none; color: var(--lime); } }
.hero-sub { font-size: 1.1rem; color: var(--muted); max-width: 540px; margin: 0 0 26px; }

/* Command search */
.cmd { max-width: 620px; }
.cmd-tabs { display: inline-flex; gap: 4px; padding: 4px; margin-bottom: 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.cmd-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.cmd-tabs span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; font-size: .85rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: background .2s, color .2s; }
.cmd-tabs input:checked + span { background: var(--accent); color: var(--on-accent); }
.cmd-tabs input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmd-field {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 20px; border-radius: 20px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  transition: border-color .2s, box-shadow .2s;
}
.cmd-field:focus-within { border-color: var(--accent); box-shadow: var(--shadow-lg), 0 0 0 5px color-mix(in srgb, var(--accent) 16%, transparent); }
.cmd-field > .ic { color: var(--accent); width: 1.35em; height: 1.35em; }
.cmd-field input { flex: 1; min-width: 0; height: 46px; border: 0; background: none; color: var(--ink); font: 500 1.05rem var(--font-body); outline: none; }
.cmd-field input::-webkit-search-cancel-button { display: none; }
.cmd-field .btn { border-radius: 14px; padding: 12px 18px; }
.cmd-inline { margin: 0 0 28px; }
.cmd-inline .cmd-field { box-shadow: var(--shadow); }
.hot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; }
.hot-label { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mod); }
.hot-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .84rem; font-weight: 600; transition: border-color .2s, transform .2s; }
.hot-chip img { border-radius: 50%; width: 22px; height: 22px; }
.hot-chip:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }

/* Hero collage */
.hero-art { position: relative; justify-self: center; }
.collage { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; transform: rotate(-8deg); }
.tile {
  width: clamp(76px, 8vw, 104px); aspect-ratio: 1; border-radius: 26%; overflow: hidden;
  background: linear-gradient(140deg, hsl(var(--h) 80% 62%), hsl(calc(var(--h) + 40) 75% 45%));
  box-shadow: 0 18px 30px -14px rgb(0 0 0 / .45), inset 0 0 0 1px rgb(255 255 255 / .15);
  animation: float 6s ease-in-out infinite; animation-delay: calc(var(--i) * -.7s);
}
.tile:nth-child(3n + 2) { margin-top: 28px; margin-bottom: -28px; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
@keyframes float { 50% { transform: translateY(-10px); } }
.art-card {
  position: absolute; left: -36px; bottom: -6px; display: flex; align-items: center; gap: 12px;
  padding: 12px 18px 12px 12px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  animation: float 7s ease-in-out infinite;
}
.art-card b { display: block; font-size: .92rem; }
.art-card small { color: var(--muted); font-size: .78rem; }
.art-ring { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--lime); color: #0b1410; }

/* ==========================================================================
   Section blocks & cards
   ========================================================================== */
.block { margin: 48px 0; }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.block-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.h-ic { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); flex: none; }
.h-ic .ic { width: 18px; height: 18px; }
.count { font: 600 .78rem var(--font-mono); color: var(--accent-ink); background: var(--accent-soft); padding: 2px 9px; border-radius: 99px; letter-spacing: 0; }
.view-all { display: inline-flex; align-items: center; gap: 4px; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 700; font-size: .87rem; transition: gap .2s; }
.view-all:hover { text-decoration: none; gap: 8px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; gap: 16px; align-items: center; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink);
  box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .25s;
  animation: rise .55s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(min(var(--i, 0), 12) * 45ms);
}
.card:hover { text-decoration: none; transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); box-shadow: var(--shadow); }
.card-icon { position: relative; flex: none; }
.card-icon img, .noicon { display: block; width: 76px; height: 76px; border-radius: 20px; object-fit: cover; box-shadow: 0 6px 14px -6px rgb(0 0 0 / .35); }
.noicon { display: grid; place-items: center; color: #fff; font: 800 1.8rem var(--font-display); background: linear-gradient(140deg, hsl(var(--h, 150) 75% 55%), hsl(calc(var(--h, 150) + 40) 70% 40%)); }
.noicon.sm { width: 52px; height: 52px; border-radius: 14px; font-size: 1.3rem; }
.noicon.xl { width: 132px; height: 132px; border-radius: 30px; font-size: 3.5rem; }
.type-badge {
  position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  font: 800 .6rem/1 var(--font-body); letter-spacing: .06em; color: #fff; background: var(--apk);
  padding: 4px 7px; border-radius: 6px; border: 2px solid var(--surface);
}
.type-badge.is-mod { background: var(--mod); }
.card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.card-top { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.card-title { font: 700 1.04rem/1.25 var(--font-display); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-meta { display: flex; align-items: center; gap: 7px; font-size: .84rem; color: var(--muted); }
.card-meta i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }
.card-ver { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); min-width: 0; }
.card-latest { display: inline-flex; align-items: center; gap: 4px; color: var(--accent-ink); font-weight: 600; white-space: nowrap; }
.card-latest .ic { width: 13px; height: 13px; }
.card-mod { color: var(--mod); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-rating { display: flex; align-items: center; gap: 5px; font-size: .84rem; }
.card-rating .ic { width: 15px; height: 15px; color: var(--muted); }
.card-rating .star { color: var(--star); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }

/* Spotlight (always dark) */
.spotlight {
  --ink: #eaf3ee; --muted: #93a39a; --accent-soft: rgb(35 212 138 / .14); --accent-ink: #5fe8ad;
  position: relative; margin: 36px 0 52px; padding: 28px; border-radius: 28px; color: var(--ink); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(500px 260px at 0% 0%, rgb(35 212 138 / .28), transparent 70%),
    radial-gradient(420px 260px at 100% 100%, rgb(200 241 53 / .16), transparent 70%),
    #07110c;
  box-shadow: var(--shadow-lg);
}
.spotlight::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: linear-gradient(rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 32px 32px, linear-gradient(90deg, rgb(255 255 255 / .05) 1px, transparent 1px) 0 0 / 32px 32px;
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 90%); mask-image: linear-gradient(180deg, #000, transparent 90%);
}
.spotlight .pill-soft { background: rgb(255 255 255 / .08); color: var(--lime); }
.spotlight .pill-soft .dot { background: var(--lime); }
.spot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.spot {
  position: relative; display: flex; flex-direction: column; gap: 3px; padding: 18px; border-radius: 20px; color: var(--ink);
  background: linear-gradient(180deg, rgb(255 255 255 / .07), rgb(255 255 255 / .025)); border: 1px solid rgb(255 255 255 / .09);
  transition: transform .25s, border-color .25s, box-shadow .25s; animation: rise .6s both; animation-delay: calc(var(--i) * 80ms);
}
.spot:hover { text-decoration: none; transform: translateY(-4px); border-color: rgb(35 212 138 / .6); box-shadow: 0 0 0 1px rgb(35 212 138 / .3), 0 20px 40px -18px rgb(35 212 138 / .55); }
.spot-rank { position: absolute; top: 14px; right: 16px; font: 800 2.4rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px rgb(255 255 255 / .22); letter-spacing: -.04em; }
.spot:first-child .spot-rank { -webkit-text-stroke-color: var(--lime); }
.spot-icon { position: relative; width: 72px; margin-bottom: 18px; }
.spot-icon img, .spot-icon .noicon { width: 72px; height: 72px; border-radius: 20px; }
.spot-icon .type-badge { border-color: #0e1a14; }
.spot-title { font: 700 1.15rem/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-sub { font-size: .82rem; color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.spot-meta { color: var(--muted); font-size: .75rem; }
.spot-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / .08); font-weight: 700; font-size: .9rem; }
.spot-foot .ic { color: var(--star); width: 15px; height: 15px; margin-right: 4px; }
.spot-get { display: inline-flex; align-items: center; gap: 2px; padding: 6px 8px 6px 14px; border-radius: 999px; background: var(--accent); color: #04140c; font-size: .8rem; font-weight: 800; }
.spot-get .ic { color: inherit; margin: 0; }

/* Top list */
.toplist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 28px; counter-reset: none; }
.toplist a { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 16px; color: var(--ink); transition: background .2s; }
.toplist a:hover { background: var(--surface); text-decoration: none; }
.toplist img { width: 52px; height: 52px; border-radius: 14px; flex: none; }
.top-n { width: 32px; flex: none; font: 800 1.6rem/1 var(--font-display); color: var(--line-2); letter-spacing: -.04em; text-align: center; }
.toplist li:nth-child(-n + 3) .top-n { color: var(--accent); }
.top-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top-body b { font-family: var(--font-display); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-body small { color: var(--muted); font-size: .8rem; }
.top-dl { display: inline-flex; align-items: center; gap: 5px; font: 600 .78rem var(--font-mono); color: var(--muted); padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); }
.top-dl .ic { width: 13px; height: 13px; }

/* Categories */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.cat {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.cat:hover { text-decoration: none; transform: translateY(-2px); border-color: hsl(var(--h) 60% 50% / .6); box-shadow: 0 12px 26px -16px hsl(var(--h) 70% 40% / .7); }
.cat-ic { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 14px; color: #fff; background: linear-gradient(140deg, hsl(var(--h) 75% 58%), hsl(calc(var(--h) + 35) 70% 42%)); }
.cat b { display: block; font-family: var(--font-display); font-weight: 700; line-height: 1.2; }
.cat small { color: var(--muted); font-size: .8rem; }

/* Listing pages */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 12px 0 18px; }
.page-head h1 { margin: 0 0 6px; }
.page-head p { margin: 0; max-width: 680px; }
.page-count { display: flex; flex-direction: column; align-items: flex-end; flex: none; padding: 10px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.page-count b { font: 800 1.6rem/1 var(--font-display); color: var(--accent-ink); }
.page-count small { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.chips { display: flex; gap: 8px; margin: 0 0 24px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 15px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: .88rem; font-weight: 600; transition: all .2s; }
.chip:hover { text-decoration: none; border-color: var(--accent); color: var(--accent-ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.empty { padding: 48px 20px; text-align: center; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* Breadcrumbs & pager */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; margin: 20px 0 0; font-size: .87rem; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 4px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-ink); }
.crumbs .ic { width: 14px; height: 14px; opacity: .6; }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }
.pager { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 36px 0; }
.pager a, .pager span { display: inline-flex; align-items: center; gap: 4px; min-width: 42px; height: 42px; justify-content: center; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 600; }
.pager a:hover { text-decoration: none; border-color: var(--accent); }
.pager span[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pager .dots { border: 0; background: none; }
.flip .ic { transform: rotate(180deg); }

/* ==========================================================================
   Post page
   ========================================================================== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 2.6vw, 28px); box-shadow: var(--shadow-sm); }
.panel > h2 { display: flex; align-items: center; gap: 10px; }
.app-hero {
  position: relative; margin-top: 14px; padding: clamp(20px, 3.4vw, 36px); border-radius: 28px; overflow: hidden; isolation: isolate;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.app-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(700px 280px at 0% 0%, color-mix(in srgb, var(--c) 30%, transparent), transparent 70%),
              radial-gradient(500px 240px at 100% 0%, color-mix(in srgb, var(--c) 14%, transparent), transparent 70%);
}
.app-hero-bg { position: absolute; z-index: -1; top: -40%; left: -10%; width: 60%; aspect-ratio: 1; background-size: cover; filter: blur(70px) saturate(1.4); opacity: .35; }
.app-hero-row { display: flex; gap: 28px; align-items: flex-start; }
.app-icon-wrap { position: relative; flex: none; display: inline-block; }
.app-icon { display: block; width: 132px; height: 132px; border-radius: 30px; box-shadow: 0 20px 40px -16px color-mix(in srgb, var(--c) 80%, #000), 0 0 0 1px rgb(255 255 255 / .2) inset; }
.app-icon-wrap .type-badge { font-size: .7rem; padding: 5px 9px; bottom: -9px; border-width: 3px; }
.app-hero-body { min-width: 0; flex: 1; }
.app-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: .9rem; }
.app-kicker b { color: var(--ink-2); }
.app-hero h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); letter-spacing: -.04em; margin: 10px 0 6px; }
.h1-label { color: var(--accent-ink); }
.h1-ver { font: 600 .45em var(--font-mono); vertical-align: middle; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); letter-spacing: 0; }
.h1-mod { display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 4px 12px; border-radius: 99px; background: color-mix(in srgb, var(--mod) 12%, transparent); color: var(--mod); font-weight: 700; font-size: .9rem; }
.app-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin: 6px 0 20px; color: var(--muted); font-size: .9rem; }
.app-meta > span:not(:first-child)::before { content: ""; display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); margin-right: 16px; vertical-align: middle; }
.rating-inline { display: inline-flex; align-items: center; gap: 5px; }
.rating-inline .ic { color: var(--star); }
.rating-inline b { color: var(--ink); }
.app-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.facts { list-style: none; margin: 28px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.facts li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); backdrop-filter: blur(8px); }
.facts .ic { width: 22px; height: 22px; color: var(--accent); }
.facts span { display: flex; flex-direction: column; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.facts b { font-size: .92rem; text-transform: none; letter-spacing: 0; color: var(--ink); font-weight: 700; }
.facts b.mono { font-size: .82rem; }

.post-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 22px; margin-top: 22px; }
.post-side { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.post-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lead { font-size: 1.12rem; line-height: 1.65; color: var(--ink-2); margin: 4px 4px 0; padding-left: 16px; border-left: 3px solid var(--accent); }
.side-sticky { position: sticky; top: calc(var(--header-h) + 18px); display: flex; flex-direction: column; gap: 16px; }
.side-title { font-size: 1rem; margin-bottom: 12px; }
.info-list { margin: 0 0 18px; }
.info-list div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.info-list div:last-child { border-bottom: 0; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; overflow-wrap: anywhere; }
.info-list dd.mono { font-size: .78rem; }
.mini-dl { display: flex; align-items: center; gap: 12px; padding: 12px; color: var(--ink); transition: border-color .2s; }
.mini-dl:hover { text-decoration: none; border-color: var(--accent); }
.mini-dl img { border-radius: 12px; flex: none; }
.mini-dl > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.mini-dl b { font-family: var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-dl small { color: var(--muted); }
.mini-dl-btn { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--accent); color: var(--on-accent); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--muted); font-size: .9rem; font-weight: 600; }
.toc a:hover, .toc a.on { color: var(--accent-ink); border-left-color: var(--accent); text-decoration: none; }

.dl-box { background: linear-gradient(160deg, var(--accent-soft), var(--surface) 70%); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.dl-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.dl-head h2 { margin: 0 0 2px; }
.dl-head p { margin: 0; font-size: .88rem; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.file-row:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow); }
.file-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); }
.file-body { flex: 1; min-width: 0; }
.file-body small { display: block; color: var(--muted); margin-top: 2px; }
.shots { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.shots a { flex: none; scroll-snap-align: start; }
.shots img { height: 320px; width: auto; border-radius: 16px; display: block; border: 1px solid var(--line); transition: transform .25s; }
.shots a:hover img { transform: scale(1.02); }
.mod-panel { border-color: color-mix(in srgb, var(--mod) 30%, var(--line)); background: linear-gradient(160deg, color-mix(in srgb, var(--mod) 8%, var(--surface)), var(--surface) 60%); }
.mod-panel .h-ic { background: color-mix(in srgb, var(--mod) 14%, transparent); color: var(--mod); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.checks li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 600; font-size: .93rem; }
.checks .ic { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--accent); color: #fff; stroke-width: 3; }
.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose h2:not(:first-child), .prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--ink-2); }
.prose img { border-radius: 14px; }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose blockquote { margin: 1em 0; padding: 4px 18px; border-left: 3px solid var(--accent); color: var(--muted); }
.narrow { max-width: 820px; margin: 16px auto 0; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { position: relative; padding: 0 0 22px 56px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--lime); font: 800 1rem var(--font-display); }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 18px; top: 44px; bottom: 6px; width: 2px; background: var(--line); }
.steps li:last-child { padding-bottom: 0; }
.steps b { display: block; font-family: var(--font-display); }
.steps span { color: var(--muted); font-size: .94rem; }
.faq details { border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface-2); transition: border-color .2s; }
.faq details[open] { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--surface); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; padding: 14px 18px; font-weight: 700; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ic { transition: transform .25s; color: var(--muted); }
.faq details[open] summary .ic { transform: rotate(90deg); color: var(--accent); }
.faq details p { margin: 0; padding: 0 18px 16px; color: var(--ink-2); }
.rate { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.rate h2 { margin: 0 0 2px; }
.rate p { margin: 0; }
.rate-stars { display: flex; gap: 4px; }
.rate-stars button { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; color: var(--line-2); transition: color .15s, transform .15s, border-color .15s; }
.rate-stars button .ic { width: 22px; height: 22px; }
.rate-stars button:hover { transform: translateY(-2px); }
.rate-stars button.on { color: var(--star); border-color: color-mix(in srgb, var(--star) 50%, var(--line)); background: color-mix(in srgb, var(--star) 10%, var(--surface)); }
.mobile-dl { display: none; }

/* Download page */
.dl-page { position: relative; margin-top: 28px; isolation: isolate; }
.dl-page::before { content: ""; position: absolute; inset: -30px 0 auto; height: 360px; z-index: -1; background: radial-gradient(420px 220px at 50% 30%, color-mix(in srgb, var(--c) 32%, transparent), transparent 70%); }
.dl-card { max-width: 560px; margin: 0 auto; text-align: center; padding: 36px 24px; border-radius: 28px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.dl-card h1 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 18px 0 4px; }
.ring-wrap { position: relative; width: 132px; height: 132px; margin: 26px auto 10px; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font: 800 2.6rem var(--font-display); letter-spacing: -.04em; }
.ring-wrap.done .ring-num { color: var(--accent); }
.dl-status { font-weight: 600; margin: 0 0 14px; }

.notfound { text-align: center; padding: 60px 0 20px; max-width: 560px; margin: 0 auto; }
.nf-code { font: 800 clamp(5rem, 18vw, 9rem)/1 var(--font-display); letter-spacing: -.06em; margin: 0; background: linear-gradient(135deg, var(--accent), var(--lime)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.notfound .cmd { margin: 24px auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { margin-top: 72px; padding: 0 0 28px; border-top: 1px solid var(--line); background: var(--surface); }
.footer-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 28px; margin: -40px 0 36px; border-radius: 24px; background: #07110c; color: #eaf3ee; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.footer-cta::after { content: ""; position: absolute; right: -60px; top: -80px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgb(200 241 53 / .35), transparent 70%); pointer-events: none; }
.footer-cta-title { font: 800 1.5rem/1.2 var(--font-display); letter-spacing: -.03em; margin: 0 0 4px; }
.footer-cta .muted { color: #93a39a; margin: 0; }
.footer-cta-btns { display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.footer-cta .btn-ghost { background: rgb(255 255 255 / .08); color: #fff; border-color: rgb(255 255 255 / .15); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 28px; }
.footer-about { max-width: 320px; margin-top: 12px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 7px 0; }
.footer-grid li a { color: var(--muted); font-size: .93rem; }
.footer-grid li a:hover { color: var(--accent-ink); }
.f-title { font: 700 .78rem var(--font-body); text-transform: uppercase; letter-spacing: .1em; margin: 6px 0 12px; }
.copy { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--muted); }
.tabbar { display: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .main-nav a { padding: 7px 11px; }
  .main-nav a .ic { display: none; }
  .search kbd { display: none; }
  .spot-grid { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .post-side { order: -1; }
  .side-sticky { position: static; }
  .side-sticky { display: none; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  :root { --header-h: auto; }
  .main-nav { display: none; }
  .header-row { flex-wrap: wrap; gap: 12px; padding: 12px 20px; height: auto; }
  .search { order: 3; flex: 1 1 100%; }
  .theme-btn { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-art { display: none; }
  .toplist { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; color: var(--muted); font-size: .68rem; font-weight: 700; }
  .tabbar a .ic { width: 22px; height: 22px; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a[aria-current] { color: var(--accent-ink); background: var(--accent-soft); }
  .mobile-dl {
    display: flex; align-items: center; justify-content: center; gap: 8px; position: fixed; z-index: 39;
    left: 14px; right: 14px; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 14px; border-radius: 16px;
    background: linear-gradient(135deg, #12b871, #0a8f57); color: #fff; font-weight: 800; box-shadow: 0 14px 30px -10px rgb(12 159 98 / .8);
    transform: translateY(160%); transition: transform .3s;
  }
  .mobile-dl.show { transform: none; }
  .mobile-dl:hover { text-decoration: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .header-row { padding: 10px 16px; }
  .logo-text small { display: none; }
  .grid { grid-template-columns: 1fr; gap: 10px; }
  .card { padding: 12px; gap: 14px; }
  .card-icon img, .card .noicon { width: 68px; height: 68px; border-radius: 18px; }
  .cmd-field { padding-left: 14px; }
  .cmd-field .btn { padding: 12px 14px; }
  .cmd-field .btn .ic { display: none; }
  .spotlight { padding: 20px 16px; border-radius: 22px; margin-left: -4px; margin-right: -4px; }
  .spot-grid { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 0 16px 4px; }
  .spot { flex: 0 0 78%; scroll-snap-align: start; }
  .block { margin: 36px 0; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .page-count { flex-direction: row; align-items: baseline; gap: 6px; padding: 6px 14px; }
  .app-hero { border-radius: 22px; }
  .app-hero-row { flex-direction: column; align-items: center; text-align: center; gap: 18px; }
  .app-icon, .noicon.xl { width: 112px; height: 112px; border-radius: 26px; }
  .app-kicker, .app-meta, .app-actions { justify-content: center; }
  .app-meta { gap: 4px 14px; }
  .app-meta > span:not(:first-child)::before { display: none; }
  .app-actions .btn { flex: 1 1 100%; }
  .facts { grid-template-columns: 1fr 1fr; gap: 8px; }
  .facts li { padding: 10px; gap: 8px; }
  .shots img { height: 260px; }
  .dl-head { flex-direction: column; }
  .file-row { flex-wrap: wrap; }
  .file-row .btn { width: 100%; }
  .rate { flex-direction: column; align-items: flex-start; }
  .footer-cta { margin-top: -30px; padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
