@import url("https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap");
/* Console — STRUCTURAL theme: fixed left sidebar, dashboard bento home. Graphite + lime. */
:root {
    --bg: #0e1012; --bg-2: #0a0b0d; --surface: #15181b; --surface-2: #1b1f23; --surface-3: rgba(255,255,255,.025);
    --field: #121417; --overlay: rgba(10,11,13,.97);
    --text: #f1f3f0; --text-2: #d3d7d0; --muted: #8b918a; --muted-2: #626860;
    --line: #23272b; --line-2: #2f3439;
    --primary: #c6f432; --primary-2: #d6ff5c; --on-primary: #0e1012;
    --accent: #c6f432; --accent-2: #e2ff8a; --on-accent: #0e1012; --info: #5ad1ff;
    --font: "Space Grotesk", system-ui, sans-serif; --font-mono: "JetBrains Mono", ui-monospace, monospace;
    --fw-display: 600; --display-tracking: -.03em;
    --r: calc(10px * var(--rs)); --r-sm: calc(6px * var(--rs)); --r-lg: calc(14px * var(--rs));
    --header-bg: #0e1012; --topbar-bg: #0e1012;
    --grad-text: linear-gradient(90deg, var(--primary), var(--primary));
    --card-bg: var(--surface); --shadow: 0 30px 60px -30px #000;
    --side: 264px; --max: 1240px;
}
body.is-site { padding-left: var(--side); background: var(--bg); }

/* sidebar */
.cn-side { position: fixed; inset: 0 auto 0 0; width: var(--side); z-index: 60; display: flex; flex-direction: column; background: var(--bg-2); border-right: 1px solid var(--line); }
.cn-side__top { display: flex; align-items: center; justify-content: space-between; padding: 20px 20px 14px; }
.cn-side__top .burger { display: none; }
.cn-side__body { flex: 1; overflow-y: auto; padding: 0 12px 16px; display: flex; flex-direction: column; scrollbar-width: thin; }
.cn-label { font: 600 10.5px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin: 18px 8px 8px; }
.cn-games, .cn-links { display: grid; gap: 2px; }
.cn-game, .cn-link { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); color: var(--text-2); font-size: 13.5px; text-decoration: none; transition: background .2s, color .2s; }
.cn-game:hover, .cn-link:hover { background: var(--surface); color: var(--text); }
.cn-game.is-active, .cn-link.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 2px 0 0 var(--primary); }
.cn-game__ico { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; font: 700 11px var(--font-mono); background: color-mix(in srgb, var(--gc) 22%, transparent); color: var(--gc); flex: none; }
.cn-game kbd { margin-left: auto; font: 10px var(--font-mono); color: var(--muted-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 1px 5px; }
.cn-link { padding-left: 12px; }
.cn-side__foot { margin-top: auto; padding: 16px 4px 0; display: grid; gap: 8px; border-top: 1px solid var(--line); }
.cn-side__foot .btn-member, .cn-side__foot .btn-admin { width: 100%; justify-content: center; }
.cn-side__foot .user-menu__list { bottom: calc(100% + 8px); top: auto; left: 0; right: 0; }

/* main + home */
#main { min-height: 100vh; }
.cn-wrap { max-width: var(--max); margin: 0 auto; padding: 36px 32px 20px; }
.cn-head h1 { font-size: clamp(30px, 4vw, 46px); letter-spacing: -.035em; line-height: 1.05; margin: 0 0 24px; }
.cn-head .cn-label { margin-left: 0; }
.cn-bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.cn-tile { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; overflow: hidden; }
.cn-tile .cn-label { margin: 0 0 12px; }
.cn-tile--hero { grid-column: span 4; grid-row: span 2; min-height: 360px; display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate; }
.cn-tile--hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, var(--surface) 30%, transparent), var(--hero) center/cover; opacity: .9; }
.cn-tile--hero h2 { font-size: clamp(30px, 3.6vw, 50px); line-height: 1.02; letter-spacing: -.04em; margin: 14px 0 10px; }
.cn-tile--hero p { max-width: 42ch; color: var(--text-2); }
.cn-pill { align-self: flex-start; display: inline-flex; gap: 8px; align-items: center; font: 12px var(--font-mono); padding: 6px 10px; border-radius: 99px; background: var(--bg-2); border: 1px solid var(--line-2); }
.cn-tile--stat { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; min-height: 110px; }
.cn-tile--stat b { font: 600 clamp(30px, 3vw, 42px)/1 var(--font); letter-spacing: -.04em; color: var(--primary); }
.cn-tile--stat b small { font-size: .45em; color: var(--muted); }
.cn-meter { height: 4px; background: var(--line); border-radius: 4px; margin-top: 10px; overflow: hidden; }
.cn-meter i { display: block; height: 100%; width: calc(var(--v) * 100%); background: var(--primary); }
.cn-tile--stat:nth-of-type(4) { display: none; }
.cn-tile--games { grid-column: span 6; }
.cn-tile__head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.cn-tile__head .cn-label { margin: 0; }
.cn-gamegrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cn-gtile { position: relative; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 12px; color: #fff; text-decoration: none; background: var(--gc); border: 1px solid var(--line); isolation: isolate; }
.cn-gtile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .6s var(--ease); }
.cn-gtile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(0,0,0,.85)); }
.cn-gtile:hover img { transform: scale(1.06); }
.cn-gtile:hover { border-color: var(--primary); }
.cn-gtile__name { font-weight: 600; font-size: 15px; }
.cn-gtile__meta { font: 11px var(--font-mono); color: #cfd3cc; display: flex; gap: 6px; align-items: center; }
.cn-gtile__meta .ico { width: 12px; height: 12px; }
.cn-tile--steps { grid-column: span 3; grid-row: span 3; }
.cn-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cn-steps li { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px dashed var(--line-2); }
.cn-steps li:last-child { border: 0; }
.cn-steps kbd { font: 600 11px var(--font-mono); color: var(--primary); }
.cn-tile--feat { grid-column: span 3; }
.cn-tile--feat h3 { margin: 12px 0 4px; font-size: 16px; }
.cn-tile--feat p { margin: 0; font-size: 13px; }
.cn-wrap > .section, .cn-wrap > .container, .cn-wrap .container--narrow { max-width: none; padding-inline: 0; }

/* footer */
.cn-foot { border-top: 1px solid var(--line); margin-top: 40px; padding: 18px 32px 26px; font-size: 12.5px; color: var(--muted); }
.cn-foot__row { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; justify-content: space-between; }
.cn-foot nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.cn-foot a { color: var(--text-2); text-decoration: none; }
.cn-foot a:hover { color: var(--primary); }
.cn-status { display: inline-flex; gap: 8px; align-items: center; font-family: var(--font-mono); }
.cn-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); }
.cn-foot__legal { margin: 14px 0 0; font-size: 11px; color: var(--muted-2); max-width: 90ch; }
.cn-foot .lang__menu { bottom: calc(100% + 6px); top: auto; }

/* inner pages: tighten the shared hero so it sits well next to the sidebar */
.page-game .hero, .page-game .container { max-width: var(--max); }

@media (max-width: 980px) {
    body.is-site { padding-left: 0; padding-top: 62px; }
    .cn-side { inset: 0 0 auto 0; width: auto; height: 62px; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); }
    .cn-side__top { width: 100%; padding: 12px 16px; }
    .cn-side__top .burger { display: grid; }
    .cn-side__body { position: fixed; top: 62px; left: 0; bottom: 0; width: min(320px, 88vw); background: var(--bg-2); border-right: 1px solid var(--line); transform: translateX(-102%); transition: transform .35s var(--ease); }
    .cn-side__body.is-open { transform: none; }
    .cn-wrap { padding: 24px 16px 10px; }
    .cn-bento { grid-template-columns: repeat(2, 1fr); }
    .cn-tile--hero, .cn-tile--games, .cn-tile--steps, .cn-tile--feat { grid-column: span 2; grid-row: auto; }
    .cn-tile--stat { grid-column: span 1; }
    .cn-tile--stat:nth-of-type(4) { display: flex; grid-column: span 2; min-height: 0; flex-direction: row; align-items: center; }
    .cn-gamegrid { grid-template-columns: repeat(2, 1fr); }
    .cn-foot { padding: 18px 16px 90px; }
}
