/* ---------- fonts ---------- */
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-mono-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-mono-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/static/fonts/geist-mono-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ---------- tokens ---------- */
:root {
  --bg: #000;
  --bg-1: #0a0a0a;
  --bg-2: #111;
  --bg-3: #171717;
  --bg-4: #1f1f1f;
  --fg: #ededed;
  --fg-strong: #fff;
  --fg-2: #c9c9c9;
  --gray: #a1a1a1;
  --gray-2: #7a7a7a;
  --gray-3: #545454;
  --line: rgba(255,255,255,.08);
  --line-2: rgba(255,255,255,.13);
  --line-3: rgba(255,255,255,.22);
  --muted: var(--gray);
  --faint: var(--gray-3);
  --r-xs: 6px; --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2,.8,.2,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-io: cubic-bezier(.65,0,.35,1);
  --spring: cubic-bezier(.34,1.4,.64,1);
  --shadow-lg: 0 0 0 1px var(--line), 0 24px 64px -12px rgba(0,0,0,.8);
  --gut: 16px;
  --max: 1160px;
  --hdr: 60px;
  color-scheme: dark;
}
@media (min-width: 700px) { :root { --gut: 24px; --hdr: 64px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--hdr) + 20px); }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg); font: 400 15px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
main { flex: 1; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p, dl, dd, ol { margin: 0; }
ol { padding: 0; list-style: none; }
::selection { background: rgba(255,255,255,.9); color: #000; }

/* scrollbars: thin, dark, rounded thumb that brightens on hover */
@supports not selector(::-webkit-scrollbar) {
  * { scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
}
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2e2e2e; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; min-height: 40px; }
::-webkit-scrollbar-thumb:hover { background: #4a4a4a; background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: #636363; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
html::-webkit-scrollbar-track { background: var(--bg); }
:focus-visible { outline: 2px solid rgba(255,255,255,.8); outline-offset: 2px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-left: max(var(--gut), env(safe-area-inset-left)); padding-right: max(var(--gut), env(safe-area-inset-right)); }
.mono { font-family: var(--mono); }
.ico { width: 16px; height: 16px; flex: none; }

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .18s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .32s var(--ease-out) both; }
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }

/* entrance: fade up + unblur */
.fx { opacity: 0; transform: translateY(14px); filter: blur(6px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out), filter .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 60ms); }
.fx.in { opacity: 1; transform: none; filter: none; }
.fx:not(.in) { animation: fx-fallback .6s var(--ease-out) 2s forwards; }
.js .fx:not(.in) { animation: none; }
@keyframes fx-fallback { to { opacity: 1; transform: none; filter: none; } }

/* ---------- announce ---------- */
.announce { position: relative; z-index: 60; border-bottom: 1px solid var(--line); background: var(--bg-1); color: var(--fg-2); font-size: 13px; text-align: center; padding: 9px var(--gut); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; height: var(--hdr); border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s var(--ease); }
.hdr.scrolled { background: rgba(0,0,0,.7); border-bottom-color: var(--line); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); }
.hdr-in { height: 100%; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; letter-spacing: -.01em; color: var(--fg-strong); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background: #fff; color: #000; display: grid; place-items: center; font: 700 13px/1 var(--sans); letter-spacing: -.04em; transition: transform .5s var(--spring); }
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.nav { display: flex; gap: 4px; }
.nav-link { padding: 6px 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--gray); transition: color .2s, background .2s; }
.nav-link:hover { color: var(--fg); background: var(--bg-3); }
.hdr-r { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (max-width: 560px) { .nav, .hdr .socials { display: none; } }

.socials { display: flex; gap: 4px; }
.socials a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--r-sm); color: var(--gray); transition: color .2s, background .2s; }
.socials a:hover { color: var(--fg); background: var(--bg-3); }
.socials svg { width: 17px; height: 17px; fill: currentColor; }

/* language dropdown */
.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--r-sm); border: 1px solid var(--line-2); font-size: 13px; color: var(--fg-2); cursor: pointer; user-select: none; transition: background .2s, border-color .2s; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: var(--bg-3); border-color: var(--line-3); }
.lang summary .chev { width: 12px; height: 12px; transition: transform .3s var(--ease); }
.lang[open] summary .chev { transform: rotate(180deg); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; padding: 4px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lg); transform-origin: top right; animation: menu-in .2s var(--ease-out); }
.lang-menu a { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: var(--r-xs); font-size: 14px; color: var(--fg-2); transition: background .15s, color .15s; }
.lang-menu a:hover { background: var(--bg-4); color: var(--fg); }
.lang-menu a.on { color: var(--fg-strong); }
.lang-menu svg { width: 14px; height: 14px; }
@keyframes menu-in { from { opacity: 0; transform: scale(.96) translateY(-4px); } }

/* ---------- buttons ---------- */
.btn {
  --h: 40px; position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r-sm); font: 500 14px/1 var(--sans); white-space: nowrap;
  user-select: none; -webkit-tap-highlight-color: transparent; border: 1px solid transparent;
  transition: background .2s var(--ease), border-color .2s var(--ease), color .2s, transform .15s var(--ease), box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #d9d9d9; }
.btn-secondary, .btn-ghost { background: var(--bg-1); color: var(--fg); border-color: var(--line-2); }
.btn-secondary:hover, .btn-ghost:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn .arr { transition: transform .3s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn-progress { display: none; }
.btn.loading { pointer-events: none; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 2px solid currentColor; border-color: rgba(0,0,0,.25); border-top-color: #000; animation: spin .7s linear infinite; }
.btn-secondary.loading::after, .btn-ghost.loading::after { border-color: rgba(255,255,255,.2); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn:disabled { opacity: .45; pointer-events: none; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--bg-3); border: 1px solid var(--line); font-size: 12.5px; color: var(--fg-2); white-space: nowrap; }
.pill svg { width: 13px; height: 13px; }
.pill-strong { background: #fff; color: #000; border-color: #fff; font-weight: 600; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(56px, 12vh, 128px) 0 clamp(48px, 9vh, 96px); text-align: center; }
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; inset: -1px;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 20%, transparent 75%);
}
.hero-bg::after { content: ""; position: absolute; left: 50%; top: -30%; width: 900px; height: 600px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,255,255,.10), transparent); animation: breathe 8s var(--ease-io) infinite alternate; }
@keyframes breathe { to { opacity: .55; transform: translateX(-50%) scale(1.08); } }
.hero-in { position: relative; display: grid; justify-items: center; gap: 20px; }
.hero-title {
  font-size: clamp(42px, 8.4vw, 84px); line-height: 1.02; font-weight: 600; letter-spacing: -.055em; max-width: 14ch;
  background: linear-gradient(180deg, #fff 35%, rgba(255,255,255,.55)); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: .06em;
}
.hero-sub { max-width: 520px; font-size: clamp(16px, 2vw, 18px); color: var(--gray); line-height: 1.55; }
.hero-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.hero-stats { margin-top: 28px; display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-lg); background: rgba(10,10,10,.6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); overflow: hidden; }
.stat { padding: 14px 26px; display: grid; gap: 2px; text-align: left; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat-n { font: 600 24px/1.1 var(--sans); letter-spacing: -.03em; color: var(--fg-strong); font-variant-numeric: tabular-nums; }
.stat-l { font-size: 13px; color: var(--gray); }

/* ---------- sections ---------- */
.sec { padding-top: clamp(40px, 7vh, 72px); padding-bottom: 8px; }
.sec:last-of-type { padding-bottom: clamp(56px, 10vh, 112px); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.sec-head h2 { font-size: clamp(24px, 3.2vw, 32px); font-weight: 600; letter-spacing: -.04em; line-height: 1.15; color: var(--fg-strong); }
.sec-head p { margin-top: 6px; color: var(--gray); font-size: 15px; }

.search { position: relative; display: flex; align-items: center; width: min(300px, 100%); }
.search svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--gray-2); pointer-events: none; }
.search input { width: 100%; height: 38px; padding: 0 40px 0 36px; border-radius: var(--r-sm); background: var(--bg-1); border: 1px solid var(--line-2); color: var(--fg); font: 400 14px var(--sans); outline: none; transition: border-color .2s, box-shadow .2s, background .2s; -webkit-appearance: none; appearance: none; }
.search input::placeholder { color: var(--gray-2); }
.search input:focus { border-color: var(--line-3); background: var(--bg-2); box-shadow: 0 0 0 4px rgba(255,255,255,.06); }
.search kbd { position: absolute; right: 8px; font: 500 11px/1 var(--mono); color: var(--gray-2); border: 1px solid var(--line-2); border-radius: 5px; padding: 3px 6px; background: var(--bg-2); }
@media (max-width: 640px) { .search { width: 100%; } .search kbd { display: none; } }

/* ---------- cards ---------- */
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .grid { grid-template-columns: repeat(3, 1fr); } }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: var(--r-lg); background: var(--bg-1);
  border: 1px solid var(--line); overflow: hidden; isolation: isolate;
  transition: border-color .3s var(--ease), transform .4s var(--ease-out), box-shadow .4s var(--ease-out), opacity .8s var(--ease-out), filter .8s var(--ease-out);
}
.card.fx.in { transition-delay: 0s; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: 0 18px 50px -20px rgba(0,0,0,.9); }
/* border that lights up under the cursor */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 3; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.55), transparent 45%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  transition: opacity .3s var(--ease);
}
.card::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.05), transparent 50%); transition: opacity .3s var(--ease); }
.card:hover::before, .card:hover::after { opacity: 1; }
.card[hidden] { display: none; }
.card-media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-2); border-bottom: 1px solid var(--line); }
.card-media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(.9); transform: scale(1.001); transition: transform .9s var(--ease-out), filter .6s var(--ease); }
.card:hover .card-media img { transform: scale(1.05); filter: grayscale(0) brightness(1); }
.badge { position: absolute; z-index: 2; left: 12px; top: 12px; height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: var(--r-pill); background: rgba(255,255,255,.92); color: #000; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.card-body { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.card h3 { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--fg-strong); line-height: 1.3; }
.ver { flex: none; font: 400 12px var(--mono); color: var(--gray-2); }
.card-tag { color: var(--gray); font-size: 14px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; color: var(--fg); }
.card-go svg { width: 15px; height: 15px; transition: transform .35s var(--ease); }
.card:hover .card-go svg { transform: translateX(4px); }
.card-go.soon { color: var(--gray-2); }

.ph { width: 100%; height: 100%; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #1c1c1c, #0b0b0b 70%); }
.ph span { font: 600 clamp(40px, 7vw, 64px)/1 var(--sans); letter-spacing: -.06em; color: rgba(255,255,255,.14); }

.empty { padding: 48px 16px; text-align: center; color: var(--gray); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }

/* ---------- features ---------- */
.features { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-1), rgba(10,10,10,.4)); transition: border-color .3s var(--ease); }
.feature:hover { border-color: var(--line-2); }
.feature-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line-2); color: var(--fg); margin-bottom: 18px; }
.feature-ic svg { width: 18px; height: 18px; }
.feature h3 { font-size: 16px; font-weight: 600; letter-spacing: -.015em; color: var(--fg-strong); }
.feature p { margin-top: 6px; font-size: 14px; color: var(--gray); }

/* ---------- game page ---------- */
.game { padding-top: 20px; padding-bottom: clamp(56px, 10vh, 112px); }
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--gray-2); margin-bottom: 18px; min-width: 0; }
.crumbs a { color: var(--gray); transition: color .2s; }
.crumbs a:hover { color: var(--fg); }
.crumbs span:last-child { color: var(--fg-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "cover" "panel" "desc"; }
@media (min-width: 920px) {
  .game-grid { grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); grid-template-areas: "cover panel" "desc panel"; gap: 24px 28px; align-items: start; }
  .g-panel { position: sticky; top: calc(var(--hdr) + 20px); }
}
.g-cover { grid-area: cover; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--line); background: var(--bg-2); aspect-ratio: 16 / 9; }
.g-cover img { width: 100%; height: 100%; object-fit: cover; animation: settle 1.2s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.06); } }
.g-panel { grid-area: panel; }
.g-desc { grid-area: desc; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--bg-1); }
.g-desc h2 { font-size: 15px; font-weight: 600; color: var(--fg-strong); margin-bottom: 10px; }
.g-desc p { color: var(--gray); font-size: 15px; overflow-wrap: anywhere; }
.g-desc p + p { margin-top: 10px; }

.g-card { padding: 22px; border-radius: var(--r-xl); border: 1px solid var(--line-2); background: linear-gradient(180deg, #0d0d0d, #080808); box-shadow: 0 30px 80px -40px rgba(255,255,255,.08); display: grid; gap: 18px; }
.g-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.g-title { font-size: clamp(30px, 4.4vw, 40px); line-height: 1.08; font-weight: 600; letter-spacing: -.045em; color: var(--fg-strong); overflow-wrap: anywhere; }
.g-tag { margin-top: -8px; color: var(--gray); font-size: 15.5px; line-height: 1.5; }
.g-actions { display: grid; gap: 8px; }
.off { padding: 14px; border-radius: var(--r); border: 1px dashed var(--line-3); color: var(--gray); text-align: center; font-size: 14px; }

.stepper { display: grid; gap: 0; padding-top: 4px; border-top: 1px solid var(--line); }
.stepper li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 14px; color: var(--fg-2); }
.stepper li::before { content: ""; position: absolute; left: 11px; top: 34px; bottom: -10px; width: 1px; background: var(--line-2); }
.stepper li:last-child::before { display: none; }
.stepper .dot { position: relative; z-index: 1; width: 23px; height: 23px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line-2); font: 500 11.5px/1 var(--sans); color: var(--fg); }
.note { font-size: 13px; color: var(--gray-2); line-height: 1.5; display: flex; gap: 8px; align-items: flex-start; }
.note svg { width: 14px; height: 14px; margin-top: 2px; flex: none; }

/* existing-key widget */
.have-key { display: flex; align-items: center; gap: 14px; padding: 12px 12px 12px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); animation: pop .5s var(--ease-out); }
.have-key[hidden] { display: none; }
.hk-text { min-width: 0; flex: 1; display: grid; gap: 2px; }
.hk-label { font-size: 12.5px; color: var(--gray); }
.hk-key { font: 500 14px/1.35 var(--mono); color: var(--fg-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hk-left { font: 400 12.5px var(--mono); color: var(--gray-2); }
.icon-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg-1); color: var(--fg-2); transition: background .2s, color .2s, border-color .2s, transform .15s; }
.icon-btn:hover { background: var(--bg-4); color: var(--fg); border-color: var(--line-3); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn .ok { display: none; }
.icon-btn.copied .cp { display: none; }
.icon-btn.copied .ok { display: block; animation: pop .35s var(--spring); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }

/* progress ring */
.ring-wrap { position: relative; flex: none; display: grid; place-items: center; }
.ring-ic { position: absolute; width: 16px; height: 16px; color: var(--fg-2); }
.k-timer .ring-ic { width: 18px; height: 18px; }
.ring { width: 40px; height: 40px; flex: none; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 3; }
.ring .ring-bg { stroke: var(--line-2); }
.ring .ring-fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }

/* ---------- modal ---------- */
.modal { width: min(420px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-xl); background: var(--bg-1); color: var(--fg); box-shadow: var(--shadow-lg); }
.modal::backdrop { background: rgba(0,0,0,.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal[open] { animation: modal-in .4s var(--ease-out); }
.modal[open]::backdrop { animation: fade .3s var(--ease); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes fade { from { opacity: 0; } }
.modal-in { padding: 24px; display: grid; gap: 12px; }
.m-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--bg-3); border: 1px solid var(--line-2); margin-bottom: 6px; }
.m-ic svg { width: 22px; height: 22px; }
.modal h2 { font-size: 19px; font-weight: 600; letter-spacing: -.025em; color: var(--fg-strong); }
.modal p { color: var(--gray); font-size: 14.5px; }
.ab-still { color: var(--fg) !important; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.modal-actions { display: grid; gap: 8px; margin-top: 8px; }

/* ---------- key page ---------- */
.keyp { padding-top: clamp(28px, 8vh, 80px); padding-bottom: clamp(56px, 10vh, 112px); display: flex; justify-content: center; position: relative; }
.keyp::before { content: ""; position: absolute; left: 50%; top: 0; width: min(760px, 100%); height: 420px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255,255,255,.07), transparent); pointer-events: none; }
.kcard { position: relative; width: 100%; max-width: 520px; padding: clamp(22px, 5vw, 32px); border-radius: var(--r-xl); border: 1px solid var(--line-2); background: linear-gradient(180deg, #0e0e0e, #070707); box-shadow: var(--shadow-lg); display: grid; gap: 18px; justify-items: center; text-align: center; }
.k-ok { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #000; position: relative; animation: ok-in .6s var(--spring) both; }
.k-ok::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(255,255,255,.5); animation: ripple 1.4s var(--ease-out) .3s both; }
.k-ok svg { width: 24px; height: 24px; }
.k-ok path { stroke-dasharray: 20; stroke-dashoffset: 20; animation: draw .45s var(--ease-out) .35s forwards; }
@keyframes ok-in { from { transform: scale(.4); opacity: 0; } }
@keyframes ripple { from { transform: scale(.8); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.k-head { display: grid; gap: 4px; }
.k-head h1 { font-size: 26px; font-weight: 600; letter-spacing: -.04em; color: var(--fg-strong); }
.k-head a { color: var(--gray); font-size: 15px; transition: color .2s; }
.k-head a:hover { color: var(--fg); }
.k-field { width: 100%; padding: 18px 14px; border-radius: var(--r); background: var(--bg); border: 1px solid var(--line-2); cursor: copy; position: relative; overflow: hidden; transition: border-color .2s, background .2s; }
.k-field:hover { border-color: var(--line-3); background: #050505; }
.k-field code { display: block; font: 500 clamp(15px, 4.3vw, 20px)/1.3 var(--mono); letter-spacing: .02em; color: var(--fg-strong); overflow-wrap: anywhere; user-select: all; }
.k-field::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.12), transparent); transform: translateX(-100%); pointer-events: none; }
.k-field.flash::after { animation: sweep .9s var(--ease-io); }
@keyframes sweep { to { transform: translateX(100%); } }
.btn .ok { display: none; }
.btn.copied .cp { display: none; }
.btn.copied .ok { display: block; animation: pop .35s var(--spring); }
.k-timer { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); text-align: left; }
.k-timer .ring { width: 44px; height: 44px; }
.k-timer div { display: grid; gap: 1px; }
.k-tl { font-size: 13px; color: var(--gray); }
.k-tv { font: 500 20px/1.2 var(--mono); color: var(--fg-strong); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.k-timer.expired .k-tv { color: var(--gray-2); text-decoration: line-through; }
.k-forever { display: inline-flex; }
.k-actions { width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.kcard .note { text-align: left; }

/* ---------- error ---------- */
.err { padding-top: clamp(48px, 12vh, 128px); padding-bottom: 96px; display: grid; justify-items: center; text-align: center; gap: 14px; }
.err-code { height: 28px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg-2); display: inline-flex; align-items: center; font: 500 12.5px var(--mono); color: var(--gray); }
.err h1 { font-size: clamp(28px, 4.6vw, 44px); font-weight: 600; letter-spacing: -.045em; line-height: 1.1; color: var(--fg-strong); max-width: 18ch; }
.err p { color: var(--gray); font-size: 16px; max-width: 460px; }
.err-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }

/* ---------- footer ---------- */
.ftr { border-top: 1px solid var(--line); }
.ftr-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); font-size: 13px; color: var(--gray-2); }
.ftr-l { display: flex; align-items: center; gap: 10px; }
.ftr .brand-mark { width: 20px; height: 20px; border-radius: 6px; font-size: 10px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 200; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px 11px 12px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg);
  color: var(--fg); font: 500 14px/1.3 var(--sans); max-width: calc(100% - 32px); pointer-events: none;
  transform: translate(-50%, calc(100% + 40px)); opacity: 0; visibility: hidden;
  transition: transform .45s var(--spring), opacity .25s var(--ease), visibility 0s .45s;
}
.toast::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 12.5 4 4 8-9' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.toast.err::before { background: var(--bg-4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 7v6M12 17h.01' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; transition: transform .45s var(--spring), opacity .25s var(--ease), visibility 0s; }

/* ---------- motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .fx { opacity: 1; transform: none; filter: none; }
}
