/* erlish.wtf — design system (itch.io-inspired, dark) */

:root {
  --bg: #15121b;
  --bg-2: #1c1824;
  --surface: #241f2e;
  --surface-2: #2d2839;
  --surface-3: #3e3850;
  --fill: rgba(255, 255, 255, 0.04);
  --fill-2: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --line-3: rgba(255, 255, 255, 0.24);

  --text: #f6f4fa;
  --text-2: #c0bacb;
  --text-3: #928c9f;

  --accent: #a28bff;
  --accent-hover: #bba9ff;
  --accent-ink: #150d38;
  --accent-text: #b9a8ff;
  --accent-soft: rgba(162, 139, 255, 0.12);
  --accent-line: rgba(162, 139, 255, 0.5);
  --accent-glow: rgba(162, 139, 255, 0.3);

  --sub: #f0b75a;
  --sub-soft: rgba(240, 183, 90, 0.13);
  --sub-line: rgba(240, 183, 90, 0.4);
  --hot: #ff8a5c;
  --hot-soft: rgba(255, 138, 92, 0.13);
  --danger: #ff6a70;
  --danger-soft: rgba(255, 106, 112, 0.13);
  --ok: #4cd494;
  --ok-soft: rgba(76, 212, 148, 0.13);

  --r-xs: 4px;
  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --shadow-xs: none;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.4);
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.6);

  --container: 1480px;
  --gutter: 48px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --font: 'Lato', 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Roboto, sans-serif;
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;

  color-scheme: dark;
}
/* Lato has no Cyrillic — Russian uses Fira Sans, a close humanist match. */
:root:lang(ru) { --font: 'Fira Sans', 'Segoe UI', Roboto, sans-serif; }
:root:lang(zh-CN) { --font: 'Lato', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
/* Фон сайта: одна картинка 16:9 на весь экран, без повторов, чуть размыта. */
body::before {
  content: ''; position: fixed; inset: -12px; z-index: -2; pointer-events: none;
  background: url('/img/background.png') center / cover no-repeat;
  opacity: .8; filter: blur(3px) brightness(1.12) saturate(1.15);
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 40%, rgba(21, 18, 27, .55)), linear-gradient(180deg, rgba(21, 18, 27, .35), transparent 220px);
}
html { -webkit-text-size-adjust: 100%; background: var(--bg); scroll-padding-top: 76px; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background: transparent;
  font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
* { scrollbar-color: var(--surface-3) transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 13px; height: 13px; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--accent-hover); }

/* ================= Header ================= */

.app { min-height: 100vh; display: flex; flex-direction: column; }
.header { position: sticky; top: 0; z-index: 60; background: rgba(21, 18, 27, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 30px; height: 58px; }

.brand { display: flex; align-items: center; gap: 9px; font-size: 21px; font-weight: 900; letter-spacing: -0.02em; flex: none; }
.brand-mark { width: 30px; height: 30px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--accent); color: var(--accent-ink); }
.brand-mark svg { width: 18px; height: 18px; stroke-width: 2.4; }
.brand-tld { color: var(--text-3); font-weight: 700; }

.topnav { display: flex; align-items: center; gap: 4px; }
.topnav a { display: inline-flex; align-items: center; height: 58px; padding: 0 12px; font-size: 15px; font-weight: 700; color: var(--text-2); border-bottom: 2px solid transparent; transition: color .12s; }
.topnav a:hover { color: var(--text); }
.topnav a.is-active { color: var(--text); border-bottom-color: var(--accent); }

.search { position: relative; width: 300px; flex: none; margin-left: auto; }
.search-field {
  display: flex; align-items: center; height: 36px; padding-left: 4px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line-2); transition: border-color .15s;
}
.search-field:focus-within { border-color: var(--accent); }
.search-field input { flex: 1; min-width: 0; height: 100%; padding: 0 10px; background: none; border: 0; outline: 0; font-size: 14px; color: var(--text); }
.search-field input::placeholder { color: var(--text-3); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field .icon { margin-right: 13px; color: var(--text-3); }
.kbd { display: none; }
.search-pop { position: absolute; z-index: 90; top: calc(100% + 6px); left: 0; right: 0; padding: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.search-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: var(--r-sm); }
.search-item:hover, .search-item.is-focus { background: var(--surface-3); }
.search-thumb { width: 50px; height: 40px; border-radius: var(--r-xs); overflow: hidden; flex: none; }
.search-item b { display: block; font-size: 14px; font-weight: 700; }
.search-item span { font-size: 12.5px; color: var(--text-3); }
.search-empty { padding: 12px 8px; font-size: 13.5px; color: var(--text-3); }

.header-actions { display: flex; align-items: center; gap: 4px; }
.header-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; font-size: 14px; font-weight: 700; color: var(--text-2); transition: color .12s; }
.header-link:hover { color: var(--text); }
.header-sep { width: 1px; height: 16px; background: var(--line-2); margin: 0 2px; }

/* dropdowns */
.dd { position: relative; }
.dd-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; font-size: 14px; font-weight: 700; color: var(--text-2); transition: color .12s; }
.dd-btn:hover, .dd.is-open .dd-btn { color: var(--text); }
.dd-btn .chev { width: 14px; height: 14px; }
.dd-menu { position: absolute; z-index: 95; top: calc(100% + 6px); right: 0; min-width: 190px; padding: 4px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.dd-menu.is-left { right: auto; left: 0; }
.dd-head { padding: 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line-2); }
.dd-head b { display: block; font-size: 14px; }
.dd-head span { font-size: 12.5px; color: var(--text-3); }
.dd-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--text-2); text-align: left; white-space: nowrap; }
.dd-item:hover { background: var(--surface-3); color: var(--text); }
.dd-item.is-on { color: var(--text); font-weight: 700; }
.dd-item .check { margin-left: auto; color: var(--accent); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; font-size: 14px; font-weight: 700; color: var(--text); }
.user-chip .avatar { width: 28px; height: 28px; font-size: 12px; }
.user-chip-name { max-width: 140px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.announcement { padding: 9px 0; font-size: 14px; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-align: center; }

.content { flex: 1; width: 100%; padding-bottom: 64px; }

/* ================= Intro & promo (home) ================= */

.intro { padding-top: 16px; padding-bottom: 16px; font-size: 16px; color: var(--text); text-shadow: 0 1px 8px rgba(0, 0, 0, .7); }
.intro b { color: var(--text); font-weight: 900; }
.promo { background: linear-gradient(90deg, rgba(162, 139, 255, .13), rgba(162, 139, 255, .03) 55%, transparent), rgba(28, 24, 36, .8); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.promo-inner { display: flex; align-items: center; gap: 18px; height: 74px; overflow: hidden; }
.promo-text { font-size: 16px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.promo-text b { color: #fff; font-weight: 900; }
.promo .btn-outline { height: 38px; font-size: 15px; }

/* ================= Buttons ================= */

.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: var(--h); padding: 0 16px;
  border-radius: var(--r-sm); font-size: 15px; font-weight: 700; white-space: nowrap; user-select: none;
  transition: background .12s, color .12s, border-color .12s, box-shadow .12s;
}
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-sm { --h: 32px; padding: 0 12px; font-size: 14px; }
.btn-lg { --h: 48px; padding: 0 22px; font-size: 18px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--text); color: var(--bg); }
.btn-dark:hover { background: #fff; }
.btn-ghost { background: var(--surface-3); color: var(--text); }
.btn-ghost:hover { background: #4a4360; }
.btn-outline { border: 1.5px solid rgba(255, 255, 255, .75); color: #fff; }
.btn-outline:hover { background: #fff; border-color: #fff; color: var(--bg); }
.btn-accent-outline { --h: 34px; padding: 0 12px; border: 1px solid var(--accent-line); color: var(--accent-text); font-size: 16px; font-weight: 400; }
.btn-accent-outline:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn-soft { background: var(--accent-soft); color: var(--accent-text); }
.btn-soft:hover { background: rgba(162, 139, 255, .2); }
.btn-quiet { color: var(--text-2); }
.btn-quiet:hover { background: var(--fill); color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sub { background: var(--sub); color: #2b1a02; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15); }
.btn-sub:hover { background: #f6c87a; }

.icon-btn { width: 34px; height: 34px; border-radius: var(--r); display: grid; place-items: center; flex: none; color: var(--text-2); transition: background .12s, color .12s; }
.icon-btn:hover { background: var(--fill-2); color: var(--text); }
.icon-btn[disabled] { opacity: .3; pointer-events: none; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-3); color: var(--text); transition: background .12s; }
.round-btn:hover { background: var(--fill-2); }
.round-btn[disabled] { opacity: .3; pointer-events: none; }

/* ================= Badges, tags, price boxes ================= */

.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border-radius: var(--r-sm); font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--text); }
.badge .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.badge-free { background: var(--surface-3); }
.badge-sub { background: var(--sub-soft); color: var(--sub); }
.badge-hot .icon { color: var(--hot); }
.badge-new .icon { color: var(--accent); }
.badge-soon { color: var(--text-2); }
.badge-admin { background: var(--accent-soft); color: var(--accent-text); }
.badge-banned { background: var(--danger-soft); color: var(--danger); }

.tags { color: var(--accent-text); font-size: 14px; }
.tags a:hover { text-decoration: underline; }

/* itch-style price label */
.price { flex: none; display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: var(--r-xs); font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; border: 1px solid var(--line-3); color: var(--text-2); }
.price .icon { width: 12px; height: 12px; stroke-width: 2.4; }
.price.is-sub { background: var(--sub-soft); border-color: var(--sub-line); color: var(--sub); }
.price.is-soon { border-style: dashed; }
.price-tag { display: inline-flex; align-items: center; height: 24px; padding: 0 7px; border-radius: var(--r-xs); font-size: 13px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; background: #fff; color: var(--bg); }
.price-tag.is-sub { background: var(--sub); color: #2b1a02; }
.price-tag.is-soon { background: var(--surface-3); color: var(--text); }

/* ================= Cover ================= */

.cover { position: relative; width: 100%; height: 100%; overflow: hidden; background: var(--surface-2); container-type: inline-size; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .25s; }
.cover img.is-loading { opacity: 0; }
/* placeholder for mods without art: neutral, typographic */
.cover-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4cqi; padding: 8cqi;
  background:
    radial-gradient(110% 60% at 50% 0%, rgba(162, 139, 255, .18), transparent 65%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, .022) 0 1px, transparent 1px 9px),
    linear-gradient(180deg, #3a3050, #1c1824);
  text-align: center;
}
.cover-fallback span { font-weight: 900; letter-spacing: -0.02em; line-height: 1; text-transform: uppercase; color: #f2f2f2; font-size: clamp(12px, 11cqi, 64px); text-wrap: balance; }
.cover-fallback::after { content: 'erlish.wtf'; font-size: clamp(9px, 3.6cqi, 15px); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.cover-wide .cover-fallback span { font-size: clamp(14px, 7cqi, 64px); }
.cover-wide .cover-fallback::after { font-size: clamp(10px, 2.2cqi, 15px); }
.cover-mini .cover-fallback { padding: 0; }
.cover-mini .cover-fallback span { display: none; }
.cover-mini .cover-fallback::after { content: attr(data-initial); font-size: 16px; font-weight: 900; letter-spacing: 0; color: #f2f2f2; }

/* ================= Featured band ================= */

.band { position: relative; overflow: hidden; isolation: isolate; background: rgba(16, 14, 21, .45); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-bg { position: absolute; inset: -60px; z-index: -1; opacity: .4; filter: blur(70px) saturate(1.3); pointer-events: none; }
.band-bg .cover { background: none; }
.band-bg .cover-fallback { display: none; }
.band::after { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 120% at 20% 40%, transparent, rgba(16, 14, 21, .8)); pointer-events: none; }
.band-inner { display: grid; grid-template-columns: minmax(0, 640px) minmax(0, 1fr); gap: 48px; padding-top: 48px; padding-bottom: 48px; align-items: start; }
.band-media { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r-lg); background: #000; box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, .55); }
.band-title { margin: 0; font-size: 38px; font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.band-title a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.band-tagline { margin: 6px 0 0; font-size: 19px; color: #fff; }
.band-shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.band-shot { aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: #000; box-shadow: 0 0 0 1px var(--line); }
.band-shot img { width: 100%; height: 100%; object-fit: cover; }
.band-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; }
.band-meta-left { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; font-weight: 700; }
.band-meta .tags { color: #fff; font-weight: 700; }
.band-actions { display: flex; align-items: center; gap: 16px; margin-top: 22px; }
.band-actions .btn-outline { --h: 48px; padding: 0 22px; font-size: 18px; border-radius: var(--r); }
.band-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.platforms { display: inline-flex; align-items: center; gap: 6px; }
.platforms .icon { width: 16px; height: 16px; }

/* ================= Sections & itch cards ================= */

.section { margin-top: 44px; }
.section-head { display: flex; align-items: center; gap: 18px; margin-bottom: 16px; }
.section-title { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em; }

.grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 18px; }

/* game card: portrait poster on top, info panel below */
.card {
  position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border-radius: var(--r-lg);
  background: rgba(36, 31, 46, .82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 0 0 1px var(--line-2), 0 1px 2px rgba(0, 0, 0, .3);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s;
}
.card:hover { transform: translateY(-4px); background: rgba(45, 40, 57, .92); box-shadow: 0 0 0 1px var(--line-3), 0 20px 44px rgba(0, 0, 0, .5); }
.card-media { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--surface-2); }
.card-media::after { content: ''; position: absolute; inset: auto 0 0; height: 40%; background: linear-gradient(180deg, transparent, rgba(21, 18, 27, .35)); pointer-events: none; }
.card-media .cover img { transition: transform .7s var(--ease); }
.card:hover .card-media .cover img { transform: scale(1.045); }
.card-flag { position: absolute; z-index: 1; top: 10px; left: 10px; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; font-size: 11px; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; background: rgba(16, 14, 21, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.card-flag .icon { width: 11px; height: 11px; color: var(--accent); stroke-width: 2.4; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 3px; padding: 13px 14px 14px; }
.card-title { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .tags { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-desc { font-size: 13.5px; line-height: 1.45; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 11px; }
.card-meta { min-width: 0; font-size: 12.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.is-soon .card-media .cover img { filter: grayscale(.4) brightness(.85); }

.empty { display: flex; align-items: center; gap: 14px; padding: 18px 20px; border: 1px dashed var(--line-2); border-radius: var(--r-lg); color: var(--text-2); font-size: 15px; }
.empty-icon { width: 38px; height: 38px; border-radius: var(--r); display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--text-2); }
.empty strong { display: block; color: var(--text); font-weight: 700; }
.empty p { margin: 2px 0 0; color: var(--text-3); font-size: 14px; }

/* ================= Browse (itch "Browse games") ================= */

.browse { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 36px; padding-top: 28px; align-items: start; }
.filters { position: sticky; top: 82px; }
.fgroup { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.fgroup:last-child { border-bottom: 0; }
.fgroup-title { margin: 0 0 8px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.fopt { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 30px; padding: 0 8px; margin-left: -8px; border-radius: var(--r-sm); font-size: 15px; color: var(--text-2); text-align: left; }
.fopt:hover { color: var(--text); background: var(--fill); }
.fopt.is-on { color: var(--text); font-weight: 700; }
.fopt .icon { width: 15px; height: 15px; color: var(--accent); stroke-width: 2.4; }
.fopt small { color: var(--text-3); font-size: 13px; font-weight: 400; margin-left: 6px; }
.filters-reset { font-size: 14px; color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; }

.browse-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -0.01em; }
.page-count { font-size: 17px; color: var(--text-3); }
.sort-tabs { display: flex; gap: 22px; margin: 14px 0 22px; border-bottom: 1px solid var(--line); }
.sort-tabs button { height: 40px; font-size: 15px; font-weight: 700; color: var(--text-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.sort-tabs button:hover { color: var(--text); }
.sort-tabs button.is-on { color: var(--text); border-bottom-color: var(--accent); }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; margin: -8px 0 20px; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--surface-2); font-size: 14px; }
.fchip:hover { background: var(--surface-3); }
.fchip .icon { width: 13px; height: 13px; color: var(--text-2); }
.browse .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ================= Game page (itch layout) ================= */

.gp-bg { display: none; position: absolute; inset: 0 0 auto 0; height: 620px; z-index: -1; overflow: hidden; pointer-events: none; }
.gp-bg .cover { opacity: .3; filter: blur(40px) saturate(1.2); transform: scale(1.15); background: none; }
.gp-bg .cover-fallback { display: none; }
.gp-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(21, 18, 27, .3), var(--bg)); }
.gp-wrap { position: relative; isolation: isolate; }
.gp { position: relative; max-width: 1060px; margin: 32px auto 0; overflow: hidden; border-radius: var(--r-xl); background: rgba(36, 31, 46, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 0 0 1px var(--line-2), 0 30px 80px rgba(0, 0, 0, .55); }
.gp-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 46px; padding: 0 22px; background: var(--bg-2); border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--text-3); }
.gp-bar a { color: var(--text-2); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.gp-bar a:hover { color: var(--text); }
.gp-header { position: relative; aspect-ratio: 1060 / 300; overflow: hidden; background: #100e15; }
.gp-header.is-cover .cover { filter: blur(24px) saturate(1.3); transform: scale(1.2); opacity: .7; }
.gp-header .cover-fallback span { font-size: clamp(20px, 6cqi, 60px); }
.gp-header-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--surface)); }
.gp-cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; }
.gp-cols.is-single { grid-template-columns: 1fr; }
.gp-left { min-width: 0; padding: 30px 36px 40px; }
.gp-right { padding: 30px 28px 30px 0; display: grid; gap: 12px; align-content: start; }
.gp-header + .gp-cols .gp-right { margin-top: -110px; position: relative; }
.gp-title { margin: 0; font-size: 34px; font-weight: 900; line-height: 1.1; letter-spacing: -0.01em; }
.gp-tagline { margin: 6px 0 0; font-size: 18px; color: var(--text); opacity: .9; }
.gp-kind { margin: 18px 0 12px; font-size: 15px; color: var(--text-2); }
.gp-buy { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; }
.gp-buy-note { font-size: 15px; color: var(--text-3); }
.gp-lock { margin-top: 4px; padding: 16px 18px; border-radius: var(--r); border: 1px solid var(--sub-line); background: var(--sub-soft); }
.gp-lock strong { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--sub); }
.gp-lock p { margin: 4px 0 12px; font-size: 14.5px; color: var(--text-2); }
.gp-lock .gp-buy { gap: 8px; }

.prose { margin-top: 26px; font-size: 16px; line-height: 1.7; color: #d6d2dc; }
.prose p { margin: 0 0 14px; }
.prose p:last-child { margin-bottom: 0; }

.gp-h2 { margin: 34px 0 12px; font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.gp-h2 .count { font-size: 15px; font-weight: 400; color: var(--text-3); }
.gp-h2 .count:empty { display: none; }

details.more { margin-top: 26px; border-top: 1px solid var(--line-2); }
details.more summary { display: inline-flex; align-items: center; gap: 6px; padding: 12px 0; font-size: 15px; font-weight: 700; color: var(--accent-text); cursor: pointer; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more summary .icon { width: 15px; height: 15px; transition: transform .2s; }
details.more[open] summary .icon { transform: rotate(180deg); }
.info-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.info-table td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.info-table td:first-child { width: 160px; color: var(--text-3); }
.info-table a { color: var(--accent-text); }
.info-table a:hover { text-decoration: underline; }

.license { margin-top: 26px; padding: 16px 18px; border-radius: var(--r); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent), 0 0 0 1px var(--line); }
.license.is-free { background: linear-gradient(90deg, rgba(76, 212, 148, .10), rgba(76, 212, 148, .03)), var(--surface-2); box-shadow: inset 3px 0 0 var(--ok), 0 0 0 1px rgba(76, 212, 148, .28); }
.license.is-free h3 { color: var(--ok); }
.license.is-sub { background: linear-gradient(90deg, rgba(255, 106, 112, .10), rgba(255, 106, 112, .03)), var(--surface-2); box-shadow: inset 3px 0 0 var(--danger), 0 0 0 1px rgba(255, 106, 112, .28); }
.license.is-sub h3 { color: var(--danger); }
.license h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 15px; font-weight: 700; }
.license p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); }
.license p + p { margin-top: 6px; }

.gp-shot { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--r); background: #000; cursor: zoom-in; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.gp-shot:hover { box-shadow: 0 0 0 1px var(--line-3); }
.gp-shot img { width: 100%; height: 100%; object-fit: cover; transition: filter .15s; }
.gp-shot:hover img { filter: brightness(1.1); }
.gp-poster { aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r-lg); box-shadow: 0 0 0 1px var(--line-2), 0 18px 44px rgba(0, 0, 0, .5); }

/* comments */
.composer { margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r); }
.composer:focus-within { border-color: var(--accent); }
.composer textarea { display: block; width: 100%; min-height: 90px; resize: vertical; padding: 12px 14px 4px; background: none; border: 0; outline: 0; font-size: 15px; line-height: 1.5; }
.composer textarea::placeholder { color: var(--text-3); }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 8px 8px 14px; }
.composer-count { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.gate { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); }
.gate > .icon { color: var(--sub); }
.gate-text { flex: 1; min-width: 0; }
.gate-text strong { display: block; font-size: 15px; }
.gate-text span { font-size: 14px; color: var(--text-3); }
.comment { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.comment .avatar { width: 40px; height: 40px; border-radius: var(--r); }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 22px; }
.comment-name { font-weight: 700; font-size: 15px; color: var(--accent-text); }
.comment-time { font-size: 13px; color: var(--text-3); }
.comment-body { margin-top: 3px; font-size: 15px; line-height: 1.55; color: #d6d2dc; white-space: pre-wrap; overflow-wrap: anywhere; }
.comment-del { margin-left: auto; width: 28px; height: 28px; opacity: 0; }
.comment:hover .comment-del, .comment-del:focus-visible { opacity: 1; }
.comments-empty { padding: 18px 0 6px; color: var(--text-3); font-size: 14.5px; }
.comments-empty strong { color: var(--text-2); font-weight: 700; margin-right: 6px; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 5vh 6vw; background: rgba(0, 0, 0, .92); }
.lightbox img { max-width: 100%; max-height: 88vh; border-radius: var(--r); }
.lightbox .icon-btn { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: var(--surface-3); color: #fff; }
.lb-close { top: 18px; right: 18px; }
.lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 18px; top: 50%; transform: translateY(-50%); }
.lb-count { position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); font-size: 14px; color: var(--text-2); }

/* ================= Shared (also used by admin) ================= */

.panel { padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.panel + .panel { margin-top: 14px; }
.panel-title { margin: 0 0 14px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.panel-title .count { font-size: 13px; color: var(--text-3); }
.nav { display: grid; gap: 2px; }
.nav-label { padding: 0 10px 6px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.nav-link { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r); color: var(--text-2); font-size: 15px; transition: background .12s, color .12s; }
.nav-link .icon { width: 17px; height: 17px; }
.nav-link:hover { background: var(--fill); color: var(--text); }
.nav-link.is-active { background: var(--surface-2); color: var(--text); font-weight: 700; }
.nav-link .count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.account { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r); background: var(--surface); }
.account-meta { min-width: 0; flex: 1; }
.account-name { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-tier { font-size: 12.5px; color: var(--text-3); }
.avatar { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-3); color: var(--text); font-weight: 900; font-size: 13px; text-transform: uppercase; }
.avatar.is-supporter { background: var(--sub); color: #2b1a02; }
.avatar.is-admin { background: var(--accent); color: var(--accent-ink); }

/* ================= Footer ================= */

.site-footer { padding: 28px 0 34px; border-top: 1px solid var(--line); background: rgba(21, 18, 27, .85); font-size: 14px; color: var(--text-3); }
.footer-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 22px; }
.footer-row a { color: var(--text-2); font-weight: 700; }
.footer-row a:hover { color: var(--text); text-decoration: underline; }
.footer-row .brand { font-size: 17px; margin-right: 10px; }
.footer-row .brand-mark { width: 24px; height: 24px; }
.footer-row .brand-mark svg { width: 15px; height: 15px; }
.footer-legal { margin-top: 18px; display: grid; gap: 4px; font-size: 13px; line-height: 1.6; }
.footer-legal b { color: var(--text-2); }

/* ================= Dialog & forms ================= */

dialog.modal { width: min(420px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(0, 0, 0, .75); }
.modal-body { padding: 30px; }
.modal-close { position: absolute; top: 12px; right: 12px; }
.modal-icon { width: 42px; height: 42px; border-radius: var(--r); display: grid; place-items: center; margin-bottom: 16px; background: var(--accent); color: var(--accent-ink); }
.modal-icon svg { stroke-width: 2.4; }
.modal-title { margin: 0 0 4px; font-size: 26px; font-weight: 900; }
.modal-sub { margin: 0 0 20px; color: var(--text-2); font-size: 15px; }
.modal-switch { margin-top: 16px; font-size: 14.5px; color: var(--text-3); }
.modal-switch button { color: var(--accent-text); font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

@keyframes pop { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 5px; }
.field > span { font-size: 14px; font-weight: 700; color: var(--text-2); }
.field small { font-size: 12.5px; color: var(--text-3); }
.input, .textarea, .select { width: 100%; height: 42px; padding: 0 12px; border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--bg); color: var(--text); outline: 0; font-size: 15px; transition: border-color .15s; }
.select option { background: var(--surface-2); }
.textarea { height: auto; min-height: 100px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.form-error { padding: 10px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: var(--danger); font-size: 14px; }

.toasts { position: fixed; z-index: 120; bottom: 24px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: var(--r); font-size: 15px; font-weight: 700; background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); animation: pop .2s var(--ease); }
.toast.is-ok .icon { color: #6d4fe0; }
.toast.is-error .icon { color: #d6333b; }

.skel { background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border-radius: var(--r); }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* 404 */
.nf { min-height: 100vh; display: grid; place-content: center; justify-items: center; text-align: center; padding: 24px; }
.nf-code { font-size: clamp(80px, 14vw, 140px); font-weight: 900; line-height: 1; color: var(--accent); }
.nf h1 { margin: 12px 0 6px; font-size: 26px; font-weight: 900; }
.nf p { margin: 0 0 22px; color: var(--text-2); max-width: 40ch; }

/* ================= Narrow screens (basic) ================= */

@media (max-width: 1440px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .browse .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1280px) {
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .browse .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  :root { --gutter: 32px; }
}
@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band-inner, .browse, .gp-cols { grid-template-columns: 1fr; }
  .gp-right { padding: 0 32px 28px; grid-template-columns: repeat(2, 1fr); }
  .filters { position: static; }
  .search { width: 220px; }
  .header-link span, .user-chip-name { display: none; }
}
@media (max-width: 700px) {
  :root { --gutter: 16px; }
  .topnav, .promo { display: none; }
  .search { flex: 1; width: auto; }
  .header-inner { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 12px; height: auto; padding-block: 10px; }
  .header-actions { grid-column: 1 / -1; justify-content: flex-end; flex-wrap: wrap; min-width: 0; }
  .header .search { width: 100%; min-width: 0; }
  .gp-trial .btn, .gp-buy .btn { max-width: 100%; height: auto; min-height: var(--h); white-space: normal; text-align: center; padding-block: 10px; }
  .license p, .gp-trial p { overflow-wrap: anywhere; }
  .grid, .browse .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 10px; }
  .band-title, .gp-title { font-size: 28px; }
  .gp-left { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* 16:9 stage for a portrait cover */
.viewer-poster { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; background: #100e15; }
.viewer-blur { position: absolute; inset: -40px; opacity: .5; filter: blur(32px); }
.viewer-blur .cover-fallback { display: none; }
.viewer-art { position: relative; height: 86%; aspect-ratio: 3 / 4; overflow: hidden; border-radius: var(--r); box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }

/* ================= Support page ================= */

.header-link.is-active { color: var(--text); }
.sp { max-width: 860px; padding-top: 44px; padding-bottom: 70px; }
.sp-hero { text-align: center; }
.sp-hero h1 { margin: 0; font-size: 44px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; text-shadow: 0 2px 20px rgba(0, 0, 0, .5); }
.sp-hero p { margin: 12px auto 0; max-width: 560px; font-size: 18px; color: var(--text); opacity: .9; text-shadow: 0 1px 10px rgba(0, 0, 0, .6); }
.sp-box, .sp-tier, .sp-why, .sp-suggest { background: rgba(36, 31, 46, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 0 0 1px var(--line-2), 0 24px 60px rgba(0, 0, 0, .4); border-radius: var(--r-xl); }
.sp-box { max-width: 560px; margin: 32px auto 0; padding: 28px 30px 26px; }
.sp-label { margin: 0 0 14px; font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); }
.sp-field { display: flex; align-items: center; gap: 10px; height: 68px; padding: 0 20px; border-radius: var(--r-lg); background: var(--bg); box-shadow: 0 0 0 1px var(--line-2); transition: box-shadow .15s; }
.sp-field:focus-within { box-shadow: 0 0 0 2px var(--accent); }
.sp-cur { font-size: 30px; font-weight: 900; color: var(--accent-text); }
.sp-input { flex: 1; min-width: 0; height: 100%; padding: 0; background: none; border: 0; outline: 0; font-size: 34px; font-weight: 900; letter-spacing: -0.01em; color: var(--text); -moz-appearance: textfield; appearance: textfield; }
.sp-input::-webkit-outer-spin-button, .sp-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sp-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.sp-preset { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: var(--r-lg); background: var(--surface-2); box-shadow: 0 0 0 1px var(--line); transition: background .15s, box-shadow .15s, transform .15s; }
.sp-preset b { font-size: 22px; font-weight: 900; }
.sp-preset small { font-size: 12px; color: var(--text-3); }
.sp-preset:hover { background: var(--surface-3); transform: translateY(-1px); }
.sp-preset.is-on { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.sp-preset.is-on small { color: var(--accent-text); }
.sp-result { margin: 16px 0 16px; min-height: 22px; text-align: center; font-size: 15px; color: var(--text-2); }
.sp-result.is-l1 { color: var(--sub); }
.sp-result.is-l2 { color: var(--accent-text); font-weight: 700; }
.sp-cta { margin-top: 0; }
.sp-note { margin: 12px 0 0; text-align: center; font-size: 13.5px; color: var(--text-3); }
.sp-note:empty { display: none; }
.sp-tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 36px; }
.sp-tier { padding: 22px 24px; transition: box-shadow .2s, transform .2s; }
.sp-tier.is-on { box-shadow: 0 0 0 2px var(--accent), 0 24px 60px rgba(0, 0, 0, .4); transform: translateY(-2px); }
.sp-tier-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sp-tier-head h3 { margin: 0; font-size: 22px; font-weight: 900; }
.sp-tier-head span { font-size: 15px; font-weight: 900; color: var(--accent-text); }
.sp-tier p { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: var(--text-2); }
.sp-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 15px; font-weight: 700; }
.sp-perks li { display: inline-flex; align-items: center; gap: 8px; }
.sp-perks .icon { color: var(--ok); stroke-width: 2.6; }
.sp-why { margin-top: 36px; padding: 26px 28px; }
.sp-why ul { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin: 0; padding: 0; list-style: none; }
.sp-why li { display: flex; flex-direction: column; gap: 6px; }
.sp-why b { font-size: 16px; }
.sp-why li span { font-size: 14px; line-height: 1.55; color: var(--text-2); }
.sp-suggest { display: flex; align-items: center; gap: 16px; margin-top: 16px; padding: 20px 26px; }
.sp-suggest > .icon { width: 28px; height: 28px; color: var(--accent-text); }
.sp-suggest b { display: block; font-size: 16px; }
.sp-suggest span { font-size: 14.5px; color: var(--text-2); }

/* trial + level on the game page */
.gp-locked { display: grid; gap: 12px; }
.gp-lock .lvl { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; background: rgba(240, 183, 90, .2); color: var(--sub); }
.gp-lock strong { display: flex; align-items: center; gap: 8px; }
.gp-trial { padding: 16px 18px; border-radius: var(--r); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-line); }
.gp-trial strong { display: flex; align-items: center; gap: 8px; color: var(--accent-text); }
.gp-trial p { margin: 6px 0 14px; font-size: 14.5px; line-height: 1.6; color: var(--text-2); }
@media (max-width: 720px) {
  .sp-tiers, .sp-why ul { grid-template-columns: 1fr; }
  .sp-hero h1 { font-size: 32px; }
}
