/* RaceCap: soft gold on graphite, layout, components and motion */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-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;
}

:root {
  --bg: #0f1012;
  --bg-2: #121316;
  --surface: #16171b;
  --surface-2: #1c1d22;
  --surface-3: #25262c;
  --text: #e9e7e0;
  --text-2: #b7b5ad;
  --muted: #84837c;
  --border: rgba(255, 255, 255, 0.06);
  --border-2: rgba(255, 255, 255, 0.11);
  --accent: #e2b54a;
  --accent-2: #ecc36a;
  --accent-soft: rgba(226, 181, 74, 0.11);
  --accent-line: rgba(226, 181, 74, 0.36);
  --on-accent: #1a1508;
  --good: #e2b54a;
  --warn: #e8913a;
  --bad: #e5675e;
  --sale: #e2b54a;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --font: 'Manrope', 'Segoe UI', system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', Consolas, monospace;
  color-scheme: dark;
}

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 15px/1.6 var(--font); background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; isolation: isolate; }
/* the whole page sits on soft glows that stay put while it scrolls, with a fine grain so the dark is never flat */
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body::before {
  background:
    radial-gradient(1100px 620px at 6% -10%, rgba(226, 181, 74, 0.1), transparent 62%),
    radial-gradient(900px 560px at 98% 6%, rgba(122, 138, 222, 0.075), transparent 60%),
    radial-gradient(1000px 680px at 72% 108%, rgba(226, 181, 74, 0.065), transparent 62%),
    radial-gradient(760px 620px at -6% 78%, rgba(86, 168, 158, 0.05), transparent 60%),
    linear-gradient(180deg, #111215 0%, #0d0e10 100%);
}
body::after { opacity: 0.045; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
::selection { background: var(--accent); color: var(--on-accent); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #2c2d33 padding-box; border-radius: 10px; border: 2px solid transparent; }
::-webkit-scrollbar-thumb:hover { background: #3a3b42; }
a { color: var(--accent); text-decoration: none; transition: color 0.18s; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; }
h1 { font-size: 32px; line-height: 1.15; margin: 24px 0 12px; letter-spacing: -0.025em; font-weight: 800; }
h2 { font-size: 20px; line-height: 1.25; margin: 34px 0 14px; letter-spacing: -0.015em; font-weight: 800; }
h3 { font-size: 16px; margin: 16px 0 8px; font-weight: 700; }
p { margin: 8px 0; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
pre { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; overflow-x: auto; font-size: 13px; }
pre code { background: none; padding: 0; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 820px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 17px; color: var(--text-2); max-width: 760px; }
.good { color: var(--good); }
.warn { color: var(--warn); }
.bad { color: var(--bad); }
.break { word-break: break-all; }
.nowrap { white-space: nowrap; }
/* backwards, not both: a held opacity animation would keep a stacking context and trap fixed panels under the header */
.main { flex: 1; padding-bottom: 64px; animation: fade 0.35s var(--ease) backwards; }
.empty { color: var(--muted); padding: 28px 0; }

/* ---------- header ---------- */
.header { position: sticky; top: 0; z-index: 20; background: rgba(15, 16, 18, 0.82); backdrop-filter: saturate(1.2) blur(14px); border-bottom: 1px solid var(--border); }
.header__inner { display: flex; align-items: center; gap: 18px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text); font-size: 18px; letter-spacing: -0.02em; white-space: nowrap; }
.brand img { transition: transform 0.35s var(--ease); }
.brand:hover { color: var(--text); }
.brand:hover img { transform: rotate(-12deg) scale(1.06); }
.nav { display: flex; gap: 2px; }
.nav a { position: relative; color: var(--text-2); padding: 8px 12px; border-radius: 10px; font-weight: 600; font-size: 14.5px; transition: color 0.18s, background 0.18s; }
.nav a::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 3px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.25s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover::after, .nav a.on::after { transform: scaleX(1); }
.nav a.on { color: var(--text); }
.nav--admin { flex-wrap: wrap; }
.search { position: relative; flex: 1; display: flex; align-items: center; gap: 9px; background: var(--surface); border: 1px solid var(--border-2); border-radius: 12px; padding: 0 14px; min-width: 160px; color: var(--muted); transition: border-color 0.2s, box-shadow 0.2s, background 0.2s; }
.search:hover { border-color: rgba(255, 255, 255, 0.16); }
.search:focus-within { border-color: rgba(226, 181, 74, 0.42); background: #1b1c21; color: var(--accent); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32); }
.search input { flex: 1; border: 0; background: none; color: var(--text); font: inherit; height: 40px; outline: none; min-width: 0; padding: 0; }
.search input:focus { box-shadow: none; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { filter: grayscale(1) brightness(0.8); }
.suggest { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; z-index: 30; animation: pop 0.18s var(--ease); }
.suggest a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; color: var(--text); transition: background 0.15s; }
.suggest a:hover, .suggest a.on { background: var(--surface-2); }
.suggest img { width: 64px; height: 36px; object-fit: cover; border-radius: 7px; background: var(--surface-3); }
.suggest .muted { margin-left: auto; font-size: 12px; }
.suggest__name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.suggest__name small { display: block; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 11.5px; font-weight: 600; }
.suggest__best { display: inline-flex; align-items: center; gap: 7px; margin-left: auto; flex: none; font-size: 13.5px; }
.suggest .suggest__best img.flag { width: 20px; height: 15px; border-radius: 3px; }
.suggest__best b { color: var(--accent); font-variant-numeric: tabular-nums; }
.header__tools { display: flex; align-items: center; gap: 8px; }
.iconbtn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); border-radius: 12px; height: 40px; padding: 0 12px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.12s; }
.iconbtn:hover { border-color: var(--accent-line); color: var(--text); background: var(--surface); }
.iconbtn:active { transform: scale(0.96); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] > summary { border-color: var(--accent-line); color: var(--text); }
.menu__list { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 210px; padding: 6px; z-index: 30; display: flex; flex-direction: column; transform-origin: top right; animation: pop 0.18s var(--ease); }
.menu__list a, .menu__list button { text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--text); background: none; border: 0; font: inherit; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.menu__list a:hover, .menu__list button:hover { background: var(--surface-2); color: var(--accent); }
.menu__list form { margin: 0; display: flex; }
.menu__list form button { flex: 1; }
.home .header .search { display: none; }
.home .header__tools { margin-left: auto; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; align-items: center; padding: 26px 20px; font-size: 14px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer nav a { color: var(--text-2); }
.footer nav a:hover { color: var(--accent); }

/* ---------- buttons, forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; user-select: none; transition: background 0.18s, border-color 0.18s, color 0.18s, transform 0.12s var(--ease), box-shadow 0.18s; }
.btn:hover { border-color: var(--accent-line); color: var(--text); background: var(--surface-3); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; border-color: var(--border-2); background: var(--surface-2); }
.btn svg { transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(1px); }
.btn[data-refresh]:hover svg { transform: rotate(-60deg); }
.btn.is-busy svg { animation: spin 0.9s linear infinite; }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); box-shadow: 0 6px 18px rgba(226, 181, 74, 0.16); }
.btn--accent:hover { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); box-shadow: 0 8px 24px rgba(226, 181, 74, 0.22); }
.btn--accent:disabled { background: var(--accent); border-color: var(--accent); box-shadow: none; }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn--danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn--small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn--wide { width: 100%; }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: var(--text-2); font-weight: 600; }
.form--inline, .form .form--inline { display: flex; flex-direction: row; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.form .inline-label, .inline-label { flex-direction: row !important; align-items: center; gap: 10px !important; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 11px; padding: 0 12px; height: 40px; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; }
select:not([multiple]) { appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e2b54a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; background-size: 11px; }
select:not([multiple]):hover { border-color: var(--accent-line); }
select[multiple] { height: auto; padding: 6px; }
option { background: var(--surface); color: var(--text); }
textarea { height: auto; padding: 9px 12px; }
input:hover, textarea:hover { border-color: rgba(255, 255, 255, 0.16); }
input:focus, select:focus, textarea:focus { outline: none; border-color: rgba(226, 181, 74, 0.45); background-color: #1f2026; box-shadow: 0 0 0 3px rgba(226, 181, 74, 0.08); }
:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }
/* fields inside a framed box: the frame shows the focus */
.search input:focus, .rtools__find input:focus, .cs__search input:focus { background: none; box-shadow: none; }
/* boxes and dots of our own: a gold box with a dark tick, a ring with a dot */
input[type='checkbox'], input[type='radio'] { appearance: none; -webkit-appearance: none; flex: none; width: 18px; height: 18px; margin: 0; padding: 0; border: 1.5px solid #4b4c53; border-radius: 6px; background: #16171b center / 11px no-repeat; vertical-align: -4px; cursor: pointer; transition: background-color 0.18s, border-color 0.18s, box-shadow 0.18s, background-position 0.22s var(--ease); }
input[type='radio'] { border-radius: 50%; }
input[type='checkbox']:hover, input[type='radio']:hover { border-color: var(--accent-line); }
input[type='checkbox']:checked { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%231a1508' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); animation: tick 0.22s var(--ease); }
input[type='radio']:checked { border-color: var(--accent); background-color: var(--accent); box-shadow: inset 0 0 0 4px #16171b; }
input[type='checkbox']:focus, input[type='radio']:focus { box-shadow: none; }
input[type='checkbox']:focus-visible, input[type='radio']:focus-visible { box-shadow: 0 0 0 3px rgba(226, 181, 74, 0.28); }
input[type='radio']:checked:focus-visible { box-shadow: inset 0 0 0 4px #16171b, 0 0 0 3px rgba(226, 181, 74, 0.28); }
@keyframes tick { 0% { transform: scale(0.82); } 60% { transform: scale(1.08); } 100% { transform: none; } }
/* on/off settings as switches: the knob is a gradient that slides with the background position */
input[type='checkbox'].switch { width: 40px; height: 22px; border: 0; border-radius: 999px; background: #2c2d33 radial-gradient(circle at 11px 50%, #cfcdc6 0 7.5px, transparent 8px) 0 0 / 100% 100% no-repeat; animation: none; }
input[type='checkbox'].switch:checked { background-color: var(--accent); background-image: radial-gradient(circle at 11px 50%, #1a1508 0 7.5px, transparent 8px); background-position: 18px 0; }
.form__actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
/* disclosures: a gold chevron that turns when open, instead of the system triangle */
details:not(.menu) > summary { display: flex; align-items: center; gap: 8px; width: fit-content; list-style: none; cursor: pointer; font-weight: 700; color: var(--text-2); transition: color 0.15s; }
details:not(.menu) > summary::-webkit-details-marker { display: none; }
details:not(.menu) > summary::before { content: ''; flex: none; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); transition: transform 0.22s var(--ease); }
details:not(.menu)[open] > summary::before { transform: rotate(45deg) translate(-2px, -1px); }
details:not(.menu) > summary:hover { color: var(--text); }
input[type='number'] { -moz-appearance: textfield; }
input[type='number']::-webkit-inner-spin-button, input[type='number']::-webkit-outer-spin-button { opacity: 0.4; }
.check { display: inline-flex; flex-direction: row !important; align-items: center; gap: 9px !important; color: var(--text-2); font-weight: 600; cursor: pointer; transition: color 0.15s; }
.check:hover { color: var(--text); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding: 8px 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin-bottom: 12px; }
.grid-form label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 600; }
.grid-form .wide { grid-column: 1 / -1; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.stack-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.stack-h form { margin: 0; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }

/* ---------- selects: our own button and list over a hidden native select ---------- */
.cs { position: relative; display: inline-block; min-width: 0; vertical-align: middle; }
.form .cs, .grid-form .cs, .filters .cs, .block__tool .cs { display: block; width: 100%; }
.cs__native { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; opacity: 0; pointer-events: none; }
.cs__btn { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 0; height: 40px; padding: 0 34px 0 12px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23e2b54a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center / 11px; color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-align: left; cursor: pointer; transition: border-color 0.18s, background-color 0.18s, box-shadow 0.18s; }
.cs__btn:hover { border-color: var(--accent-line); }
.cs__btn:focus-visible { outline: none; border-color: rgba(226, 181, 74, 0.45); box-shadow: 0 0 0 3px rgba(226, 181, 74, 0.1); }
.cs.is-open .cs__btn { border-color: rgba(226, 181, 74, 0.5); background-color: #1f2026; }
.cs__btn span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs__btn img, .cs__opt img { flex: none; width: 20px; height: 15px; border-radius: 3px; object-fit: cover; background: var(--surface-3); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); }
.cs__panel { position: fixed; inset: auto; z-index: 90; display: flex; flex-direction: column; box-sizing: border-box; margin: 0; padding: 6px; border: 1px solid var(--border-2); border-radius: 14px; background: #1a1b20; color: var(--text); box-shadow: 0 24px 54px rgba(0, 0, 0, 0.58); overflow: hidden; transform-origin: top center; animation: cs-in 0.16s var(--ease); }
.cs__panel.is-up { transform-origin: bottom center; animation-name: cs-up; }
.cs__panel.is-closing { animation: cs-out 0.12s ease-in forwards; }
@keyframes cs-in { from { opacity: 0; transform: translateY(-6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes cs-up { from { opacity: 0; transform: translateY(6px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes cs-out { to { opacity: 0; transform: scale(0.98); } }
.cs__search { flex: none; display: flex; align-items: center; gap: 8px; height: 38px; margin-bottom: 6px; padding: 0 10px; border: 1px solid var(--border-2); border-radius: 10px; background: var(--surface); color: var(--muted); transition: border-color 0.18s, color 0.18s; }
.cs__search:focus-within { border-color: rgba(226, 181, 74, 0.42); color: var(--accent); }
.cs__search input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; background: none; }
.cs__list { overflow-y: auto; overscroll-behavior: contain; }
.cs__group { padding: 8px 10px 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.cs__opt { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 10px; border-radius: 9px; color: var(--text-2); font-size: 14px; font-weight: 600; line-height: 1.3; cursor: pointer; user-select: none; }
.cs__opt span { flex: 1; min-width: 0; }
.cs__opt.is-active { background: var(--surface-3); color: var(--text); }
.cs__opt.is-on { color: #f7e8c3; }
.cs__opt.is-on::after { content: ''; flex: none; width: 13px; height: 11px; background: var(--accent); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.cs__opt[aria-disabled='true'] { opacity: 0.4; cursor: default; }
.cs__empty { padding: 12px 10px; color: var(--muted); font-size: 13px; }
/* several at once: a box in front of each option */
.cs__panel--multi .cs__opt::before { content: ''; flex: none; width: 16px; height: 16px; border: 1.5px solid #4b4c53; border-radius: 5px; background: center / 10px no-repeat; transition: background-color 0.15s, border-color 0.15s; }
.cs__panel--multi .cs__opt.is-on::before { background-color: var(--accent); border-color: var(--accent); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%231a1508' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.cs__panel--multi .cs__opt.is-on::after { content: none; }
/* the catalog toolbar: the frame belongs to the label around the select */
.pick .cs { flex: 1; min-width: 0; }
.pick .cs__btn, .pick .cs.is-open .cs__btn { height: 40px; border: 0; padding-left: 2px; background-color: transparent; box-shadow: none; font-weight: 700; }

/* ---------- dialog, toast ---------- */
.dialog { border: 1px solid var(--border-2); border-radius: 20px; background: var(--surface); color: var(--text); padding: 24px; width: min(460px, calc(100vw - 32px)); box-shadow: var(--shadow); }
.dialog[open] { animation: pop 0.22s var(--ease); }
.dialog::backdrop { background: rgba(5, 5, 7, 0.66); backdrop-filter: blur(3px); animation: fade 0.22s ease; }
.dialog h2 { margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 99; padding: 11px 18px; border-radius: 12px; font-weight: 700; background: var(--surface-3); color: var(--text); border: 1px solid var(--border-2); box-shadow: var(--shadow); animation: pop 0.25s var(--ease); }
.toast--bad { border-color: rgba(229, 103, 94, 0.5); color: var(--bad); }

/* ---------- badges, chips, flags ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.badge--sale { background: var(--accent-soft); color: var(--accent); }
.badge--muted { background: var(--surface-3); color: var(--muted); }
/* the lowest price since tracking began: an outlined gold mark, apart from the filled discount badge */
.badge--low { background: transparent; border: 1px solid var(--accent-line); color: var(--accent); padding: 1px 7px; }
.badge--bad { background: rgba(229, 103, 94, 0.13); color: var(--bad); }
.badge--plan { background: transparent; color: var(--text-2); border: 1px solid var(--border-2); font-size: 10.5px; letter-spacing: 0.04em; }
.store { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 7px; color: var(--text); background: var(--surface-3); border: 1px solid var(--border); white-space: nowrap; letter-spacing: 0.01em; }
.flag { width: 20px; height: 15px; object-fit: cover; border-radius: 3px; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08); background: var(--surface-3); flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border-2); color: var(--text-2); font-size: 14px; font-weight: 600; transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.12s; }
.chip:hover { border-color: var(--accent-line); color: var(--text); }
.chip:active { transform: scale(0.96); }
.chip--on, .chip--on:hover { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.chip .store { background: none; border: 0; padding: 0; font-size: inherit; font-weight: inherit; color: inherit; letter-spacing: 0; }
.tag { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: var(--text-2); border: 1px solid var(--border); }
.tag--plain { background: transparent; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot--good { background: var(--good); box-shadow: 0 0 0 3px var(--accent-soft); }
.dot--warn { background: var(--warn); }
.dot--bad { background: var(--bad); }
.dot--off { background: var(--surface-3); }
.notice { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 11px 15px; border-radius: var(--radius-sm); }
.notice--bad { border-left-color: var(--bad); }
.secret { display: block; padding: 10px 12px; margin-top: 6px; word-break: break-all; cursor: copy; color: var(--accent); }

/* ---------- segmented control: a gold-tinted thumb slides under the chosen item ---------- */
.seg { position: relative; isolation: isolate; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; background: rgba(20, 21, 25, 0.8); border: 1px solid var(--border); border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025); }
.seg__thumb { position: absolute; z-index: -1; top: 0; left: 0; width: 0; height: 0; border-radius: 10px; background: var(--accent); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 6px 16px -8px rgba(226, 181, 74, 0.6); pointer-events: none; opacity: 0; }
.seg--ready .seg__thumb { transition: transform 0.34s var(--ease), width 0.34s var(--ease), height 0.34s var(--ease), opacity 0.2s; }
.seg__item { position: relative; font: inherit; padding: 7px 14px; border: 0; border-radius: 10px; background: none; color: var(--text-2); font-weight: 700; font-size: 14px; cursor: pointer; user-select: none; white-space: nowrap; transition: background 0.2s, color 0.2s, transform 0.12s; }
.seg__item:hover { color: var(--text); background: rgba(255, 255, 255, 0.045); }
.seg__item:active { transform: scale(0.96); }
.seg__item--on, .seg__item--on:hover { color: var(--on-accent); background: var(--accent); }
.seg--thumb .seg__item--on, .seg--thumb .seg__item--on:hover { background: none; }
.seg--sm .seg__item { padding: 6px 11px; font-size: 13px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 14px; }
.tab { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--text-2); font-weight: 700; font-size: 14px; transition: border-color 0.18s, color 0.18s, background 0.18s; }
.tab:hover { color: var(--text); border-color: var(--accent-line); }
.tab--on, .tab--on:hover { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

/* ---------- home ---------- */
/* no overflow clip: the search suggestions open below the hero, over the catalog (the speed lines stay inside by inset 0) */
.hero { position: relative; border-bottom: 1px solid var(--border); }
/* faint speed lines, a nod to the racetrack, fading out from the top right */
.hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(118deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 26px); -webkit-mask-image: radial-gradient(760px 320px at 82% 10%, #000 20%, transparent 72%); mask-image: radial-gradient(760px 320px at 82% 10%, #000 20%, transparent 72%); }
.hero__inner { position: relative; z-index: 5; padding-top: 56px; padding-bottom: 44px; }
.hero__inner > * { animation: rise 0.6s var(--ease) both; }
.hero__inner > :nth-child(2) { animation-delay: 0.05s; }
.hero__inner > :nth-child(3) { animation-delay: 0.1s; }
.hero__inner > :nth-child(4) { animation-delay: 0.15s; }
.hero__kicker { margin: 0 0 14px; color: var(--accent); font-size: 12.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.9; }
.hero h1 { font-size: 54px; line-height: 1.03; letter-spacing: -0.04em; margin: 0 0 16px; max-width: 900px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { font-size: 18px; margin: 0 0 26px; }
.search--hero { max-width: 720px; height: 58px; border-radius: 16px; padding: 0 8px 0 18px; background: rgba(22, 23, 27, 0.92); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3); }
.search--hero:focus-within { background: #1b1c21; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 70px -24px rgba(226, 181, 74, 0.35); }
.search--hero input { height: 56px; font-size: 16px; }
.search--hero .btn { height: 42px; border-radius: 12px; padding: 0 20px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; transition: opacity 0.2s; }
.market .grid { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 14px; }
.grid.is-loading { opacity: 0.45; pointer-events: none; }

/* ---------- catalog: filters on the left, view and sort on top ---------- */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.market { padding-top: 26px; scroll-margin-top: 70px; }
.market__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.market__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pick { display: inline-flex; align-items: center; gap: 6px; height: 42px; padding-left: 12px; border: 1px solid var(--border-2); border-radius: 12px; background: var(--surface); color: var(--muted); transition: border-color 0.18s, color 0.18s; }
.pick:hover, .pick:focus-within { border-color: var(--accent-line); color: var(--accent); }
.pick select { height: 40px; max-width: 250px; padding: 0 30px 0 2px; border: 0; background-color: transparent; box-shadow: none; font-weight: 700; cursor: pointer; }
.market__open { display: none; }
.market__count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 800; }
.market__body { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 22px; align-items: start; }
.filters { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 4px 16px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; animation: rise 0.5s var(--ease) both; }
/* a thin scrollbar without arrows that shows when the pointer is over the panel */
.filters::-webkit-scrollbar { width: 6px; }
.filters::-webkit-scrollbar-thumb { background: transparent; border: 0; }
.filters:hover::-webkit-scrollbar-thumb { background: #34353c; }
@supports not selector(::-webkit-scrollbar) { .filters, .cs__list, .grid--row { scrollbar-width: thin; scrollbar-color: #34353c transparent; } }
.filters__head { display: none; }
.filters__group { display: flex; flex-direction: column; gap: 8px; min-width: 0; margin: 0; padding: 14px 0; border: 0; border-bottom: 1px solid var(--border); }
.filters__group:last-of-type { border-bottom: 0; }
.filters__group legend { display: block; float: left; width: 100%; padding: 0; margin-bottom: 10px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; }
.filters .cs { width: 100%; }
/* filter chips: several can be on at once, each on one shows a tick */
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.fchip { position: relative; cursor: pointer; }
.fchip input, .seg__item input { position: absolute; opacity: 0; pointer-events: none; }
.fchip span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 999px; background: rgba(255, 255, 255, 0.02); color: var(--text-2); font-size: 13.5px; font-weight: 600; user-select: none; transition: border-color 0.18s, color 0.18s, background 0.18s, transform 0.12s, padding 0.2s var(--ease); }
.fchip span::before { content: ''; width: 0; height: 12px; margin-right: 0; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1.5 5.3l3 3 6-6.6' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; transition: width 0.2s var(--ease), margin 0.2s var(--ease); }
.fchip:hover span { border-color: var(--accent-line); color: var(--text); }
.fchip:active span { transform: scale(0.95); }
.fchip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--on-accent); padding-left: 10px; }
.fchip:hover input:checked + span { background: var(--accent-2); border-color: var(--accent-2); color: var(--on-accent); }
.fchip input:checked + span::before { width: 12px; margin-right: 6px; }
.fchip input:focus-visible + span, .seg__item:has(input:focus-visible) { outline: 2px solid var(--accent-line); outline-offset: 2px; }
.fchips--fold:not(.is-open) > .fchip:nth-child(n + 13):not(:has(input:checked)) { display: none; }
.fchips__more { height: 32px; padding: 0 10px; border: 0; background: none; color: var(--accent); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.fchips__more:hover { color: var(--accent-2); }
.range { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 6px; color: var(--muted); }
.range input { width: 100%; min-width: 0; }
.filters__actions { display: flex; gap: 8px; padding-top: 12px; }
.filters__actions .btn { flex: 1; }
.js .filters__apply, .filters__show { display: none; }
.seg--views { margin-bottom: 12px; }
.market__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.market__chips:empty { display: none; }
/* applied filters are removable tags, not choices: neutral, with a gold cross */
.chip--x, .chip--x:hover { padding-right: 11px; background: var(--surface-3); border-color: var(--border-2); color: var(--text); animation: pop 0.2s var(--ease) both; }
.chip--x:hover { border-color: var(--accent-line); }
.chip__x { margin-left: 1px; color: var(--accent); font-size: 17px; line-height: 1; opacity: 0.75; transition: opacity 0.15s; }
.chip--x:hover .chip__x { opacity: 1; }
.chip--reset { border-style: dashed; background: transparent; }
.market__hint { margin: -4px 0 12px; }
.market .empty { padding-top: 6px; }
/* a collection on the hub is one row that scrolls sideways, never a broken second row */
.grid--row, .market .grid--row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 8px; }
.grid--row > .card { scroll-snap-align: start; }
@media (max-width: 720px) { .grid--row { grid-auto-columns: 62%; } }
.more, .pager { display: flex; justify-content: center; gap: 8px; margin: 28px 0; }

/* ---------- cards ---------- */
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; color: var(--text); transition: transform 0.28s var(--ease), border-color 0.28s; animation: rise 0.5s var(--ease) both; }
.card::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); opacity: 0; transition: opacity 0.28s; pointer-events: none; }
.grid > .card:nth-child(2) { animation-delay: 0.03s; }
.grid > .card:nth-child(3) { animation-delay: 0.06s; }
.grid > .card:nth-child(4) { animation-delay: 0.09s; }
.grid > .card:nth-child(5) { animation-delay: 0.12s; }
.grid > .card:nth-child(6) { animation-delay: 0.15s; }
.grid > .card:nth-child(7) { animation-delay: 0.18s; }
.grid > .card:nth-child(8) { animation-delay: 0.21s; }
.grid > .card:nth-child(9) { animation-delay: 0.24s; }
.grid > .card:nth-child(10) { animation-delay: 0.27s; }
.card:hover { transform: translateY(-4px); border-color: var(--accent-line); color: var(--text); }
.card:hover::after { opacity: 1; }
.card:active { transform: translateY(-2px) scale(0.99); }
.card__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card__media::before { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.045), transparent); transform: translateX(-100%); animation: sweep 1.5s ease-in-out infinite; }
.card__media.is-loaded::before { animation: none; opacity: 0; }
.card__media img { position: relative; width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s var(--ease), opacity 0.4s ease; }
.js .card__media img { opacity: 0; }
.js .card__media img.loaded { opacity: 1; }
.card:hover .card__media img { transform: scale(1.05); }
.card__ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 42px; font-weight: 800; color: var(--accent); background: var(--surface-2); }
.card__sale { position: absolute; left: 10px; bottom: 10px; z-index: 1; background: rgba(15, 16, 18, 0.86); color: var(--accent); border: 1px solid var(--accent-line); font-weight: 800; font-size: 13px; padding: 2px 9px; border-radius: 9px; backdrop-filter: blur(6px); }
.card__tag { position: absolute; right: 10px; top: 10px; z-index: 1; background: rgba(15, 16, 18, 0.86); color: var(--text); border: 1px solid var(--border-2); font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 8px; }
.card__tag--low { color: var(--accent); border-color: var(--accent-line); backdrop-filter: blur(6px); }
.card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.card__price .price__main { font-size: 18px; }
.card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.card__where { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.card__extra { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- prices ---------- */
.price { display: inline-flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.price__main { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.price__native { color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.price__base { color: var(--muted); font-size: 13px; }
.price--free { font-weight: 800; color: var(--accent); }
.price--none { color: var(--muted); }

/* ---------- rows ---------- */
.rows { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.row { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--border); color: var(--text); }
.row:first-child { border-top: 0; }
a.row { transition: background 0.18s; }
a.row:hover { background: var(--surface-2); color: var(--text); }
a.row:hover .row__title { color: var(--accent); }
.row__media { width: 100px; flex: none; }
.row__media img { width: 100px; height: 56px; object-fit: cover; border-radius: 9px; display: block; background: var(--surface-3); }
.row__main { flex: 1; display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.row__title { font-weight: 700; color: var(--text); transition: color 0.18s; }
.row__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.row__price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; text-align: right; }
/* search results: the cheapest country over its price */
.row__best { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; max-width: 46%; }
.row__where { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.row__where span { overflow: hidden; text-overflow: ellipsis; }
.row__actions { display: flex; gap: 6px; }
.row__actions form { margin: 0; }
.rows--compact .row { padding: 9px 16px; }
/* the edition or add-on a search led to: below the sticky header, marked in gold for a moment and then softly */
.rows--compact .row[id] { scroll-margin-top: 96px; }
.row--hit { position: relative; background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.row--hit::after { content: ''; position: absolute; inset: 0; background: var(--accent-line); opacity: 0; pointer-events: none; animation: hit 1.6s var(--ease); }
@keyframes hit { from { opacity: 0.6; } }
.list { padding-left: 18px; }
.list li { margin: 5px 0; }
.list li::marker { color: var(--accent); }

/* ---------- game page ---------- */
.ghero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.ghero__bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(42px) saturate(1.1); opacity: 0.26; transform: scale(1.1); animation: fade 0.8s ease both; }
.ghero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 16, 18, 0.2), var(--bg) 96%); }
.ghero__inner { position: relative; z-index: 1; display: flex; gap: 30px; align-items: center; padding-top: 34px; padding-bottom: 34px; }
.ghero__cover { flex: none; width: 400px; max-width: 42%; aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border-2); box-shadow: 0 24px 50px rgba(0, 0, 0, 0.5); animation: pop 0.5s var(--ease) both; }
.ghero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ghero__info { flex: 1; min-width: 0; animation: rise 0.55s var(--ease) 0.06s both; }
.ghero__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ghero h1 { margin: 0 0 6px; font-size: 38px; line-height: 1.1; }
.ghero__meta { color: var(--text-2); font-size: 14px; font-weight: 600; }
.ghero__short { color: var(--text-2); max-width: 720px; margin: 12px 0 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ghero__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 18px; }
.refresh-status { min-height: 1em; color: var(--text-2); }
.game { padding-top: 24px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.kpi { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); animation: rise 0.5s var(--ease) both; min-width: 0; }
.kpi:nth-child(2) { animation-delay: 0.05s; }
.kpi:nth-child(3) { animation-delay: 0.1s; }
.kpi:nth-child(4) { animation-delay: 0.15s; }
.kpi--accent { background: linear-gradient(160deg, rgba(226, 181, 74, 0.12), transparent 70%), var(--surface); border-color: var(--accent-line); }
.kpi__k { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.kpi__v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.25; }
.kpi__v .price__main { font-size: 24px; }
.kpi--accent .kpi__v, .kpi--accent .kpi__v .price__main { color: var(--accent); }
.kpi__sub { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.game__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.game__side { display: flex; flex-direction: column; gap: 0; }
.block { margin-top: 26px; }
.block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 12px; }
.block__head h2 { margin: 0; }
.block__tool { margin: 0; }
.block__tool select { height: 34px; font-size: 13px; }

/* bars: regions of a store and the stores of a game */
.rbars, .sbars { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.rbar { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; grid-template-areas: 'rank name price' 'rank track sub'; gap: 6px 12px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--border); color: var(--text); transition: background 0.18s; }
.rbar:first-child { border-top: 0; }
.rbar:hover { background: var(--surface-2); color: var(--text); }
.rbar__rank { grid-area: rank; align-self: start; color: var(--muted); font-size: 12px; font-weight: 800; padding-top: 3px; font-variant-numeric: tabular-nums; }
.rbar__name { grid-area: name; display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.rbar__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbar__price { grid-area: price; display: inline-flex; align-items: baseline; gap: 8px; justify-self: end; }
.rbar__track, .sbar__track { position: relative; height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.rbar__track { grid-area: track; }
.rbar__fill, .sbar__fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: 6px; background: linear-gradient(90deg, rgba(226, 181, 74, 0.35), rgba(226, 181, 74, 0.6)); transform-origin: left; animation: grow 0.9s var(--ease) both; }
.rbar__sub { grid-area: sub; justify-self: end; display: inline-flex; align-items: baseline; gap: 8px; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.rbar--best .rbar__fill { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.rbar--best .rbar__price .price__main { color: var(--accent); }
.rbar--mine { background: linear-gradient(90deg, var(--accent-soft), transparent 55%); box-shadow: inset 3px 0 0 var(--accent); }
.rbar--mine:hover { background: linear-gradient(90deg, rgba(226, 181, 74, 0.16), var(--surface-2) 55%); }
/* a storefront that sells nothing: dimmed, its price for reference only */
.rbar--nosale { opacity: 0.55; }
.rbar--nosale .rbar__fill { background: var(--border-2); }
.rbars > :nth-child(2) .rbar__fill { animation-delay: 0.04s; }
.rbars > :nth-child(3) .rbar__fill { animation-delay: 0.08s; }
.rbars > :nth-child(4) .rbar__fill { animation-delay: 0.12s; }
.rbars > :nth-child(5) .rbar__fill { animation-delay: 0.16s; }
.rbars > :nth-child(6) .rbar__fill { animation-delay: 0.2s; }
.rbars > :nth-child(7) .rbar__fill { animation-delay: 0.24s; }
.rbars > :nth-child(8) .rbar__fill { animation-delay: 0.28s; }
.rbars > :nth-child(n + 9) .rbar__fill { animation-delay: 0.32s; }
.js .rbars:not(.rbars--all) .rbar--more { display: none; }
.rbars__more { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 12px; border: 0; border-top: 1px solid var(--border); background: var(--bg-2); color: var(--accent); font: inherit; font-weight: 700; font-size: 14px; cursor: pointer; transition: background 0.18s, color 0.18s; }
.rbars__more:hover { background: var(--surface-2); color: var(--accent-2); }
.rbars__more svg { transform: rotate(90deg); transition: transform 0.3s var(--ease); }
.rbars--all .rbars__more svg { transform: rotate(-90deg); }
html:not(.js) .rbars__more { display: none; }
.js [data-bars] .rbar__fill, .js [data-bars] .sbar__fill { animation-play-state: paused; }
.js [data-bars].in .rbar__fill, .js [data-bars].in .sbar__fill { animation-play-state: running; }
.rbars__locked { padding: 12px 16px; border-top: 1px solid var(--border); color: var(--muted); font-size: 13px; background: var(--bg-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--border); color: var(--text); transition: background 0.18s; }
.sbar:first-child { border-top: 0; }
.sbar:hover { background: var(--surface-2); color: var(--text); }
.sbar__name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sbar__price { display: inline-flex; align-items: center; gap: 7px; justify-self: end; }
.sbar--on { background: linear-gradient(90deg, var(--accent-soft), transparent 70%); box-shadow: inset 3px 0 0 var(--accent); }
.sbar--on .sbar__name { color: var(--accent); }
.sbar--locked { opacity: 0.7; }
.sbars > :nth-child(2) .sbar__fill { animation-delay: 0.05s; }
.sbars > :nth-child(3) .sbar__fill { animation-delay: 0.1s; }
.sbars > :nth-child(n + 4) .sbar__fill { animation-delay: 0.15s; }

/* price history */
.chart { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px 8px; }
.chart__plot { min-height: 220px; }
.chart__legend { display: flex; justify-content: flex-end; gap: 14px; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.lg { display: inline-flex; align-items: center; gap: 6px; }
.lg::before { content: ''; width: 16px; border-top: 2px solid var(--accent); }
.lg--base::before { border-top-style: dashed; border-top-color: var(--muted); }
.rtools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.rtools__find { display: flex; flex: 1; align-items: center; gap: 8px; min-width: 160px; height: 38px; padding: 0 12px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--surface); color: var(--muted); transition: border-color 0.18s, color 0.18s; }
.rtools__find:focus-within { border-color: var(--accent-line); color: var(--accent); }
.rtools__find input { flex: 1; min-width: 0; height: 36px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.js .rbars.rbars--find .rbar--more:not([hidden]) { display: grid; }
.rbars--find .rbars__more { display: none; }
.chart svg { width: 100%; height: 220px; display: block; overflow: visible; }
.chart .grid-line { stroke: rgba(255, 255, 255, 0.05); }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.1s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .area { opacity: 0; animation: fade 0.8s ease 0.3s forwards; }
.chart .base { fill: none; stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 4 5; opacity: 0.7; }
.chart .low { fill: var(--bg); stroke: var(--accent); stroke-width: 2; }
.chart .now { fill: var(--accent); }
.chart text { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .tip-box { fill: var(--surface-3); stroke: var(--border-2); }
.chart .tip { fill: var(--text); font-size: 12px; font-weight: 700; }
.chart .hover-line { stroke: var(--accent-line); stroke-dasharray: 3 4; }
.hstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.hstats > div { display: flex; flex-direction: column; gap: 1px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; min-width: 0; }
.hstats span { color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.hstats b { font-size: 16px; font-variant-numeric: tabular-nums; }
.hstats small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inline { display: inline-flex; gap: 8px; margin-top: 10px; }

.game__info { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.game__info > div:only-child { grid-column: 1 / -1; }
.about { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; max-height: 460px; overflow: auto; color: var(--text-2); }
.about h2, .about h3 { color: var(--text); }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 22px; margin: 8px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.media { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; }
.media__item { flex: 0 0 auto; width: 320px; max-width: 80vw; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); scroll-snap-align: start; }
.media__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s var(--ease); }
a.media__item:hover img { transform: scale(1.05); }
video.media__item { object-fit: cover; }
.reqs { margin: 14px 0; }
.reqs summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.reqs h3 { font-size: 15px; margin: 12px 0 6px; }
.reqs ul { padding-left: 18px; margin: 0; color: var(--text-2); font-size: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }

/* tables (admin, docs, account) */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 14px; }
.table th { text-align: left; font-weight: 700; color: var(--muted); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; padding: 11px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.table td { padding: 9px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
.table tr:first-child td { border-top: 0; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover td { background: var(--surface-2); }
.table .num { text-align: right; }
.table--params td:first-child { white-space: nowrap; }
.link { color: var(--muted); }
.link:hover { color: var(--accent); }

/* ---------- pricing ---------- */
.pricing__head { max-width: 760px; }
.mine-plan { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px 18px; align-items: center; margin: 22px 0 18px; padding: 18px 22px; border-radius: 18px; border: 1px solid var(--accent-line); background: linear-gradient(120deg, rgba(226, 181, 74, 0.13), rgba(226, 181, 74, 0.02) 55%), var(--surface); animation: rise 0.5s var(--ease) both; }
.mine-plan__icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 14px; background: var(--accent); color: var(--on-accent); }
.mine-plan__icon svg { width: 22px; height: 22px; }
.mine-plan__text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mine-plan__k { color: var(--accent); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.mine-plan__text b { font-size: 20px; letter-spacing: -0.01em; }
.mine-plan__d { color: var(--text-2); font-size: 13.5px; }
.mine-plan__list { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; padding: 0; list-style: none; font-size: 13.5px; color: var(--text); }
.mine-plan__list li { display: inline-flex; align-items: center; gap: 6px; }
.mine-plan__list svg { color: var(--accent); }
.plans { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 20px 16px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; transition: transform 0.28s var(--ease), border-color 0.28s; animation: rise 0.5s var(--ease) both; min-width: 0; }
.plan:nth-child(2) { animation-delay: 0.04s; }
.plan:nth-child(3) { animation-delay: 0.08s; }
.plan:nth-child(4) { animation-delay: 0.12s; }
.plan:nth-child(5) { animation-delay: 0.16s; }
.plan:nth-child(6) { animation-delay: 0.2s; }
.plan:hover { transform: translateY(-4px); border-color: var(--border-2); }
.plan--featured { border-color: rgba(226, 181, 74, 0.22); }
.plan--current { border-color: var(--accent); background: linear-gradient(180deg, rgba(226, 181, 74, 0.1), transparent 45%), var(--surface); }
.plan--current:hover { border-color: var(--accent); }
.plan__ribbon { position: absolute; top: -10px; left: 14px; padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em; }
.plan__ribbon--soft { background: var(--surface-3); color: var(--accent); border: 1px solid var(--accent-line); }
.plan__kind { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.plan h3 { margin: 0; font-size: 18px; font-weight: 800; letter-spacing: -0.01em; }
.plan__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 6px; margin: 6px 0 4px; }
.plan__price b { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.plan__price span { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.plan__list { list-style: none; margin: 8px 0 14px; padding: 12px 0 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--text-2); }
.plan__list li { display: flex; gap: 7px; align-items: flex-start; line-height: 1.35; }
.plan__list svg { flex: none; color: var(--accent); margin-top: 1px; }
.plan__btn { margin-top: auto; }
.plan__btn--on { background: transparent; border-color: var(--accent-line); color: var(--accent); cursor: default; }
.plan__btn--on:hover { background: transparent; border-color: var(--accent-line); color: var(--accent); }
.compare-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.compare { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 900px; }
.compare th, .compare td { padding: 10px 14px; border-top: 1px solid var(--border); text-align: center; }
.compare thead th { border-top: 0; background: var(--surface-2); font-weight: 800; font-size: 14px; color: var(--text); vertical-align: bottom; }
.compare thead th span { display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-top: 2px; }
.compare tbody th { text-align: left; color: var(--text-2); font-weight: 600; white-space: nowrap; }
.compare td { font-weight: 700; }
.compare td.is-no { color: var(--muted); font-weight: 500; }
.compare .is-current { background: var(--accent-soft); }
.compare thead th.is-current { color: var(--accent); box-shadow: inset 0 3px 0 var(--accent); }
.compare tbody tr { transition: background 0.15s; }
.compare tbody tr:hover th, .compare tbody tr:hover td:not(.is-current) { background: var(--surface-2); }

/* ---------- status ---------- */
.status-head { font-size: 18px; font-weight: 800; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--border); }
.status-head.good { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.status-head.warn { background: rgba(232, 145, 58, 0.12); color: var(--warn); }
.status-head.bad { background: rgba(229, 103, 94, 0.12); color: var(--bad); }
.uptime { margin: 16px 0; }
.uptime__head { display: flex; justify-content: space-between; font-weight: 700; margin-bottom: 8px; }
.uptime__bars { display: flex; gap: 2px; height: 34px; }
.bar { flex: 1; border-radius: 3px; background: rgba(226, 181, 74, 0.55); min-width: 3px; transition: background 0.15s; }
.bar:hover { background: var(--accent); }
.bar.warn { background: var(--warn); }
.bar.bad { background: var(--bad); }
.incidents { padding-left: 18px; }

/* ---------- panels: account, admin ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 18px 20px; margin: 14px 0; animation: rise 0.45s var(--ease) both; }
.panel h2 { margin-top: 0; }
.auth { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 24px; margin-top: 32px; display: flex; flex-direction: column; gap: 14px; animation: pop 0.4s var(--ease) both; }
.auth .tabs, .auth h1 { margin-top: 0; }
.prose p { color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; animation: rise 0.45s var(--ease) both; }
.stat__v { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat__k { color: var(--muted); font-size: 13px; }
.details summary { cursor: pointer; color: var(--accent); margin: 8px 0; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; }
.docs__toc { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 96px); overflow: auto; display: flex; flex-direction: column; gap: 2px; font-size: 13px; padding: 18px 0; }
.docs__toc > * { flex-shrink: 0; }
.docs__toc b { margin-top: 12px; color: var(--accent); text-transform: uppercase; font-size: 11px; letter-spacing: 0.08em; }
.docs__toc a { color: var(--text-2); padding: 3px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docs__toc a:hover { color: var(--accent); }
.endpoint { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin: 14px 0; scroll-margin-top: 84px; }
.endpoint h3 { margin-top: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.method { display: inline-block; font-family: var(--mono); font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 5px; color: var(--on-accent); background: var(--accent); }
.method--post { background: var(--text); }
.method--patch { background: var(--warn); }
.method--delete { background: var(--bad); color: #fff; }

/* ---------- brand ---------- */
.brand em { font-style: normal; color: var(--accent); }

/* ---------- Oguri in the corner ---------- */
/* she rises straight up and never further than the strip hidden under the screen edge, so the cut of the picture stays out of sight */
@keyframes mascot-in { 0% { transform: translateY(105%); } 70% { transform: translateY(-5px); } 100% { transform: none; } }
@keyframes mascot-out { to { transform: translateY(110%) rotate(6deg); } }
@keyframes mascot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bubble-in { from { opacity: 0; transform: translateY(8px) scale(0.9); } to { opacity: 1; transform: none; } }
@keyframes bubble-out { to { opacity: 0; transform: translateY(4px) scale(0.95); } }
@keyframes mdlg-in { from { opacity: 0; transform: translate(16vw, 20vh) scale(0.5); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
/* flush with the corner: the picture is cut at its right and bottom edges, and the screen edges hide the cut */
.mascot { position: fixed; right: 0; bottom: -12px; z-index: 40; width: 180px; pointer-events: none; }
.mascot[hidden] { display: none; }
.mascot.is-in { animation: mascot-in 0.95s var(--ease) both; }
.mascot.is-out { animation: mascot-out 0.45s ease-in forwards; }
.mascot__body { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; pointer-events: auto; animation: mascot-bob 3.8s ease-in-out 1.2s infinite; filter: drop-shadow(0 12px 26px rgba(0, 0, 0, 0.5)); }
/* the hair is cut at the right edge of the picture and the page scrollbar sits between her and the screen edge: the cut melts away */
.mascot__body img { display: block; width: 100%; height: auto; transform-origin: bottom right; transition: transform 0.3s var(--ease); -webkit-mask-image: linear-gradient(to left, transparent, #000 10%); mask-image: linear-gradient(to left, transparent, #000 10%); }
/* while her dialogue is open she keeps the hover size: the backdrop takes the hover away, and she would shrink a second time */
.mascot__body:hover img, .mascot.is-talking .mascot__body img { transform: scale(1.035); }
.mascot__bubble { position: absolute; right: 150px; top: 78px; width: max-content; max-width: 210px; padding: 10px 14px; border-radius: 16px 16px 4px 16px; background: var(--surface-2); border: 1px solid var(--accent-line); color: var(--text); font-weight: 700; font-size: 13.5px; line-height: 1.35; box-shadow: var(--shadow); opacity: 0; transform-origin: bottom right; pointer-events: none; }
.mascot__bubble.is-on { animation: bubble-in 0.35s var(--ease) both; }
.mascot__bubble.is-off { animation: bubble-out 0.25s ease forwards; }
.mascot__hide { position: absolute; top: 34px; right: 14px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border-2); background: rgba(15, 16, 18, 0.88); color: var(--text-2); font-size: 16px; line-height: 1; cursor: pointer; pointer-events: auto; opacity: 0; transition: opacity 0.2s, color 0.2s, transform 0.12s; }
.mascot:hover .mascot__hide, .mascot__hide:focus-visible { opacity: 1; }
@media (hover: none) { .mascot__hide { opacity: 1; } }
.mascot__hide:hover { color: var(--text); transform: scale(1.08); }
.mascot-peek { position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 56px; height: 56px; padding: 0; border-radius: 50%; overflow: hidden; border: 2px solid var(--accent-line); background: var(--surface-2); cursor: pointer; box-shadow: var(--shadow); animation: pop 0.3s var(--ease) both; transition: transform 0.2s var(--ease), border-color 0.2s; }
.mascot-peek:hover { transform: translateY(-3px) scale(1.06); border-color: var(--accent); }
.mascot-peek[hidden] { display: none; }
.mascot-peek img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mdlg { width: min(520px, calc(100vw - 32px)); padding: 20px 22px 22px; }
.mdlg[open] { animation: mdlg-in 0.45s var(--ease) both; }
.mdlg__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.mdlg__face { width: 58px; height: 58px; border-radius: 16px; border: 2px solid var(--accent-line); background: var(--surface-2); object-fit: cover; flex: none; }
.mdlg__who { display: flex; flex-direction: column; line-height: 1.25; }
.mdlg__who b { font-size: 17px; }
.mdlg__who span { color: var(--muted); font-size: 12.5px; }
.mdlg__close { margin-left: auto; width: 36px; height: 36px; border-radius: 11px; border: 1px solid var(--border-2); background: transparent; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; transition: color 0.18s, border-color 0.18s, transform 0.12s; }
.mdlg__close:hover { color: var(--text); border-color: var(--accent-line); }
.mdlg__close:active { transform: scale(0.94); }
.mdlg__text { min-height: 5em; margin: 0 0 16px; padding: 14px 16px; border-radius: 4px 16px 16px 16px; background: var(--surface-2); border: 1px solid var(--border); font-size: 15.5px; line-height: 1.6; cursor: default; }
.mdlg__text.is-typing { cursor: pointer; }
.mdlg__text.is-typing::after { content: '▍'; color: var(--accent); margin-left: 1px; animation: blink 1s steps(1) infinite; }
.mdlg__choices { display: flex; flex-direction: column; gap: 8px; }
.mdlg__choice { justify-content: flex-start; height: auto; min-height: 42px; padding: 10px 14px; white-space: normal; text-align: left; animation: rise 0.35s var(--ease) both; }
.mdlg__choice::before { content: '›'; color: var(--accent); font-weight: 800; font-size: 18px; line-height: 1; margin-right: 4px; }
/* closing: dialogs fade back, Oguri's one returns to the corner */
@keyframes dialog-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes mdlg-out { to { opacity: 0; transform: translate(16vw, 20vh) scale(0.5); } }
.dialog.is-closing { animation: dialog-out 0.16s ease-in forwards; }
.dialog.is-closing::backdrop { animation: fade-out 0.16s ease-in forwards; }
.mdlg.is-closing { animation: mdlg-out 0.3s ease-in forwards; }
.mdlg.is-closing::backdrop { animation-duration: 0.3s; }

/* ---------- responsive ---------- */
.nav-menu { display: none; }
@media (max-width: 1180px) {
  .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 12px; }
  .plan { padding-top: 22px; }
}
@media (max-width: 980px) {
  .game__grid, .game__info { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* filters slide in from the left over the page */
  .market__body { grid-template-columns: minmax(0, 1fr); }
  .market__open { display: inline-flex; }
  .filters { position: fixed; top: 0; bottom: 0; left: 0; z-index: 60; width: min(360px, 88vw); max-height: none; padding-top: 0; border-radius: 0 18px 18px 0; box-shadow: var(--shadow); transform: translateX(-104%); transition: transform 0.32s var(--ease); animation: none; }
  .market__form.is-open .filters { transform: none; }
  .market__form.is-open::before { content: ''; position: fixed; inset: 0; z-index: 59; background: rgba(5, 5, 7, 0.62); animation: fade 0.2s ease; }
  .filters__head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; margin: 0 -16px; padding: 14px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .filters__close { width: 36px; height: 36px; border: 1px solid var(--border-2); border-radius: 11px; background: transparent; color: var(--text-2); font-size: 20px; line-height: 1; cursor: pointer; }
  .filters__actions { position: sticky; bottom: 0; margin: 0 -16px -14px; padding: 12px 16px 14px; background: var(--surface); border-top: 1px solid var(--border); }
  .filters__show { display: inline-flex; }
  .no-scroll { overflow: hidden; }
}
@media (max-width: 920px) {
  .nav { display: none; }
  .nav-menu { display: block; }
  .cols { grid-template-columns: 1fr; }
  .docs { grid-template-columns: 1fr; }
  .docs__toc { position: static; max-height: none; }
  .hero h1 { font-size: 44px; }
  .home .header .search { display: flex; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .hide-sm { display: none !important; }
  .header__inner { gap: 8px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .search { order: 3; flex-basis: 100%; }
  .home .header .search { display: none; }
  .header__tools { margin-left: auto; }
  .brand span { display: none; }
  h1 { font-size: 26px; }
  .hero__inner { padding-top: 30px; padding-bottom: 28px; }
  .hero h1 { font-size: 36px; }
  .hero .lead { font-size: 16px; }
  .search--hero { height: 52px; padding-left: 14px; }
  .search--hero input { height: 50px; font-size: 15px; }
  .search--hero .btn { display: none; }
  .seg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; scrollbar-width: none; }
  .seg__item { white-space: nowrap; }
  .market__top { flex-direction: column; align-items: stretch; }
  .market__tools { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .market__tools .pick { min-width: 0; }
  .pick select { max-width: none; width: 100%; min-width: 0; }
  .market__open { grid-column: 1 / -1; }
  .grid, .market .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .card__body { padding: 10px 11px 12px; }
  .card__price .price__main { font-size: 16px; }
  .card__extra { display: none; }
  .ghero__inner { flex-direction: column; align-items: stretch; gap: 18px; padding-top: 18px; padding-bottom: 22px; }
  .ghero__cover { width: 100%; max-width: 100%; }
  .ghero h1 { font-size: 28px; }
  .kpi { padding: 12px 14px; }
  .kpi__v, .kpi__v .price__main { font-size: 19px; }
  .sbar { grid-template-columns: 92px minmax(0, 1fr) auto; padding: 11px 12px; }
  .rbar { padding: 10px 12px; gap: 5px 10px; }
  .hstats b { font-size: 14px; }
  .plans { grid-template-columns: 1fr 1fr; }
  .mine-plan { grid-template-columns: auto minmax(0, 1fr); }
  .row { flex-wrap: wrap; }
  .row__media { display: none; }
  .table td, .table th { padding: 8px; }
}
@media (max-width: 460px) {
  .plans { grid-template-columns: 1fr; }
  .mascot { width: 120px; }
  .mascot__bubble { right: 98px; top: 44px; max-width: 160px; font-size: 12.5px; padding: 8px 11px; }
  .mascot__hide { opacity: 1; top: 18px; right: 8px; }
}
