@font-face { font-family: "Archivo"; src: url("../fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Silkscreen"; src: url("../fonts/silkscreen.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
/* thinkanders v2: game UI. One accent (signal orange), radius 14px for cards/media, pill buttons.
   Pixel font (Silkscreen) only for HUD labels, tags and prompts. */
:root {
  --bg: #0e0e11; --bg2: #16161b; --bg3: #1f1f26; --fg: #f2f1ee; --mut: #a6a5ad; --line: rgb(255 255 255 / .09);
  --acc: #ff5a1f; --acc-ink: #1a0b04; --acc-soft: rgb(255 90 31 / .15);
  --r: 14px; --wrap: 1320px;
  --f-d: "Archivo", system-ui, sans-serif; --f-b: "Geist", system-ui, sans-serif; --f-m: "Geist Mono", ui-monospace, monospace; --f-p: "Silkscreen", "Geist Mono", monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
[data-theme="light"] {
  --bg: #f3f3f1; --bg2: #e8e8e5; --bg3: #fbfbfa; --fg: #141417; --mut: #5b5a62; --line: rgb(20 20 23 / .1);
  --acc: #e8480f; --acc-ink: #fff8f4; --acc-soft: rgb(232 72 15 / .12);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.55 var(--f-b); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3 { font-family: var(--f-d); margin: 0; font-weight: 800; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--acc); color: var(--acc-ink); padding: 10px 16px; border-radius: 999px; z-index: 100; }
.skip:focus { top: 12px; }
.only-light { display: none; }
[data-theme="light"] .only-light { display: block; }
[data-theme="light"] .only-dark { display: none; }
.pixel { font-family: var(--f-p); font-weight: 400; text-transform: uppercase; letter-spacing: .02em; }
kbd { font-family: var(--f-p); font-size: .72rem; min-width: 1.7em; padding: 2px 5px 1px; border-radius: 5px; background: var(--bg3); box-shadow: inset 0 -2px 0 var(--line), 0 0 0 1px var(--line); color: var(--fg); display: inline-block; text-align: center; line-height: 1.4; }

/* type */
.h2 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: .85; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; margin-bottom: 36px; }
.h3 { font-size: .95rem; color: var(--acc); margin-bottom: 14px; }
.label { font-size: .85rem; color: var(--acc); margin-bottom: 16px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; background: var(--acc); color: var(--acc-ink); font-weight: 600; padding: 14px 24px; border-radius: 999px; transition: transform .25s var(--ease); box-shadow: 0 4px 0 color-mix(in srgb, var(--acc) 55%, #000); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 color-mix(in srgb, var(--acc) 55%, #000); }
.btn-sm { padding: 8px 16px; font-size: .92rem; box-shadow: 0 3px 0 color-mix(in srgb, var(--acc) 55%, #000); }
.btn-lg { padding: 18px 34px; font-size: 1.15rem; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; font-size: 1.2rem; color: var(--mut); }
.icon-btn:hover { color: var(--fg); background: var(--bg2); }

/* nav = HUD bar */
.nav { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { font-family: var(--f-d); font-size: 1.4rem; font-weight: 500; font-stretch: 115%; letter-spacing: -.02em; }
.brand b { font-weight: 900; color: var(--acc); }
.caret { color: var(--acc); font-weight: 700; opacity: 0; }
.brand:hover .caret { animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 1; } }
.nav nav { display: flex; align-items: center; gap: 22px; }
.nav nav > a:not(.btn) { color: var(--mut); display: inline-flex; gap: 8px; align-items: center; transition: color .2s; }
.nav nav > a:not(.btn):hover { color: var(--fg); }
.timer { font-family: var(--f-m); font-size: .88rem; color: var(--mut); display: inline-flex; gap: 6px; align-items: center; min-width: 92px; font-variant-numeric: tabular-nums; }
.timer.done { color: var(--acc); }

/* title screen */
.title-screen { position: relative; min-height: calc(100dvh - 66px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; background: #0b0b0e; color: #f2f1ee; }
.ts-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; pointer-events: none; }
/* no native play button behind the title when a phone blocks autoplay */
.ts-video::-webkit-media-controls, .ts-video::-webkit-media-controls-panel, .ts-video::-webkit-media-controls-start-playback-button, .ts-video::-webkit-media-controls-overlay-play-button { display: none !important; -webkit-appearance: none; opacity: 0; }
.ts-shade { position: absolute; inset: 0; z-index: -1; background:
  linear-gradient(180deg, rgb(11 11 14 / .55) 0%, rgb(11 11 14 / .15) 35%, rgb(11 11 14 / .85) 100%),
  repeating-linear-gradient(0deg, rgb(0 0 0 / .18) 0 1px, transparent 1px 3px); }
.hud { position: absolute; top: 22px; left: 0; right: 0; display: flex; justify-content: space-between; padding: 0 clamp(16px, 4vw, 48px); font-size: clamp(.75rem, 1.4vw, .95rem); max-width: var(--wrap); margin: 0 auto; }
.hud b { color: var(--acc); font-weight: 400; margin-left: 8px; }
.ts-in { width: 100%; padding-bottom: clamp(48px, 9vh, 96px); }
.title-screen h1 { font-size: clamp(3rem, 13.5vw, 12rem); line-height: .82; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; text-shadow: 0 4px 40px rgb(0 0 0 / .4); }
.title-screen h1 em { font-style: normal; color: var(--acc); display: block; }
.title-screen .lede { margin-top: 22px; font-size: clamp(1.05rem, 1.6vw, 1.3rem); max-width: 40ch; color: rgb(242 241 238 / .82); }
.press { display: inline-flex; gap: 12px; align-items: center; margin-top: 34px; font-size: clamp(1rem, 1.8vw, 1.35rem); color: #f2f1ee; padding: 12px 0; }
.press:hover { color: var(--acc); }
.blink { color: var(--acc); }
.reel-toggle { position: absolute; right: clamp(16px, 4vw, 48px); bottom: 22px; color: #f2f1ee; background: rgb(15 15 18 / .5); backdrop-filter: blur(6px); }
@media (prefers-reduced-motion: no-preference) {
  .press { animation: blink 1.1s steps(1) infinite; }
  .blink-soft { animation: blink 1.4s steps(1) infinite; }
}
@keyframes blink { 60% { opacity: .15; } }

/* logos */
.logos { border-bottom: 1px solid var(--line); padding: 26px 0; }
.logo-row { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 24px 20px; align-items: center; justify-items: center; }
.logo-row li { height: 32px; display: flex; align-items: center; color: var(--mut); opacity: .85; transition: opacity .2s, color .2s; }
.logo-row li:hover { opacity: 1; color: var(--fg); }
.logo { height: 100%; width: auto; max-width: 116px; object-fit: contain; }
svg.logo { height: 26px; }
img.mono { opacity: .8; }
[data-theme="light"] img.mono { filter: invert(1); }
.logo-row li { max-width: 100%; min-width: 0; }
.logo-row img.logo, .logo-row svg.logo { max-width: 100%; object-fit: contain; }
@media (min-width: 900px) { .logo-row { grid-template-columns: repeat(10, minmax(0, 1fr)); } }

section.inventar, section.charakter { padding-top: clamp(72px, 10vw, 130px); }

/* items */
.inv-leg { display: grid; gap: 18px; grid-template-columns: 1fr; }
.inv-rest { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 18px; }
@media (min-width: 760px) { .inv-leg { grid-template-columns: repeat(2, 1fr); } .inv-rest { grid-template-columns: repeat(3, 1fr); } }
.item { position: relative; display: flex; flex-direction: column; background: var(--bg2); border-radius: var(--r); overflow: hidden; transition: transform .35s var(--ease), background-color .25s; }
.item:hover { transform: translateY(-4px); background: var(--bg3); }
.item-media { aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg3); }
.item-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.item:hover .item-media img { transform: scale(1.04); }
.item-body { padding: 18px 20px 20px; display: grid; gap: 8px; }
.item h3 { font-size: 1.35rem; line-height: 1; font-stretch: 112%; }
.item-meta { color: var(--mut); font-size: .9rem; }
.loot { font-size: .95rem; color: var(--mut); }
.loot b { font-family: var(--f-m); color: var(--acc); font-weight: 700; }
.tag { justify-self: start; font-size: .72rem; padding: 3px 9px 2px; border-radius: 6px; background: var(--bg3); color: var(--mut); box-shadow: inset 0 0 0 1px var(--line); }
.tag-leg { color: var(--acc); background: var(--acc-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent); }
.inv-rest .item-media { aspect-ratio: 16 / 6; }
@media (min-width: 760px) { .inv-rest .item-media { aspect-ratio: 16 / 8; } }
.inv-rest .item h3 { font-size: 1.15rem; }
.inv-rest .item-meta { font-size: .84rem; }

/* legendary: accent rim + loot shine on hover */
.item-leg { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 35%, transparent); }
.item-leg h3 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.item-leg .item-body { padding: 22px 24px 24px; }
.item-leg .loot { font-size: 1.05rem; }
.item-leg::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgb(255 255 255 / .14) 50%, transparent 65%); transform: translateX(-120%); }
@media (prefers-reduced-motion: no-preference) {
  .item-leg:hover::after { transform: translateX(120%); transition: transform .9s var(--ease); }
}
.item-leg:hover { box-shadow: inset 0 0 0 1px var(--acc), 0 18px 50px -20px color-mix(in srgb, var(--acc) 60%, transparent); }

/* typographic tiles */
.tile { width: 100%; height: 100%; min-height: 150px; display: grid; place-items: center; background:
  radial-gradient(120% 90% at 85% 10%, var(--acc-soft), transparent 60%),
  repeating-linear-gradient(0deg, transparent 0 15px, var(--line) 15px 16px),
  repeating-linear-gradient(90deg, transparent 0 15px, var(--line) 15px 16px), var(--bg3); }
.tile span { font-family: var(--f-p); font-size: clamp(2.2rem, 5vw, 3.4rem); color: var(--acc); text-transform: uppercase; }

/* character */
.char-grid { display: grid; gap: 18px; }
.sheet { margin: 0; display: grid; gap: 1px; background: var(--line); border-radius: var(--r); overflow: hidden; }
.sheet div { background: var(--bg2); padding: 18px 22px; display: grid; gap: 4px; }
.sheet dt { font-family: var(--f-p); font-size: .78rem; color: var(--mut); text-transform: uppercase; }
.sheet dd { margin: 0; font-size: 1.2rem; font-weight: 600; }
.skilltree { background: var(--bg2); border-radius: var(--r); padding: 22px; }
.skilltree ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.skilltree li { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 10px; background: var(--bg3); box-shadow: inset 0 0 0 1px var(--line); font-weight: 600; font-size: .98rem; }
.skilltree li i { color: var(--acc); }
@media (min-width: 900px) { .sheet { grid-template-columns: 1fr 1fr; } }
.char-grid { margin-top: 18px; }
.xp { background: var(--bg2); border-radius: var(--r); padding: 22px; }
.xp-bar { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; }
.xp-bar::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, color-mix(in srgb, var(--acc) 35%, transparent), var(--acc)); }
.xp-bar li { position: relative; padding-top: 26px; display: grid; gap: 2px; }
.xp-bar li::before { content: ""; position: absolute; top: 2px; left: 0; width: 14px; height: 14px; background: var(--bg2); box-shadow: inset 0 0 0 3px var(--acc); transform: rotate(45deg); }
.xp-bar li:last-child::before { background: var(--acc); }
.xp-y { font-family: var(--f-m); font-size: .85rem; color: var(--mut); }
.xp-o { font-weight: 700; font-size: clamp(.85rem, 1.6vw, 1.05rem); line-height: 1.2; padding-right: 8px; }

/* koop */
.koop { padding: clamp(96px, 13vw, 170px) 0; }
.koop-in { display: grid; gap: 22px; justify-items: start; }
.koop .pixel { color: var(--acc); font-size: 1rem; }
.koop h2 { font-size: clamp(3rem, 9vw, 8rem); line-height: .82; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.04em; }
.koop p:not(.pixel) { color: var(--mut); font-size: 1.15rem; max-width: 46ch; margin-bottom: 8px; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 26px 0 30px; color: var(--mut); font-size: .92rem; }
.foot-in { display: grid; gap: 18px; }
.tip { font-size: .85rem; color: var(--fg); min-height: 1.4em; transition: opacity .4s; }
.foot-row { display: flex; flex-wrap: wrap; gap: 14px 26px; align-items: center; justify-content: space-between; }
.foot .brand { font-size: 1.1rem; color: var(--fg); }
.ctrl-open { display: inline-flex; gap: 8px; align-items: center; color: var(--mut); }
.ctrl-open:hover { color: var(--fg); }
.foot-links { display: flex; gap: 20px; }
.foot-links a:hover { color: var(--fg); }

/* controls dialog */
.controls { border: 0; border-radius: var(--r); background: var(--bg2); color: var(--fg); padding: 28px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgb(0 0 0 / .5); }
.controls::backdrop { background: rgb(8 8 10 / .6); backdrop-filter: blur(4px); }
.controls h2 { font-size: 1.2rem; color: var(--acc); margin-bottom: 18px; }
.controls dl { margin: 0 0 22px; display: grid; gap: 10px; }
.controls dl div { display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.controls dd { margin: 0; color: var(--mut); }

/* toast */
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 80; display: flex; gap: 14px; align-items: center; padding: 12px 22px 12px 16px; border-radius: 14px; background: #141417; color: #f2f1ee; box-shadow: 0 0 0 1px rgb(255 255 255 / .1), 0 18px 50px rgb(0 0 0 / .4); transform: translate(-50%, 160%); opacity: 0; transition: transform .5s var(--ease), opacity .3s; max-width: calc(100vw - 32px); }
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast i { font-size: 1.8rem; color: var(--acc); }
.toast b { display: block; font-size: .72rem; color: var(--acc); }
.toast span { display: block; font-weight: 600; font-size: .96rem; }

/* case page */
.case-head { padding-top: clamp(30px, 5vw, 60px); padding-bottom: 30px; display: grid; gap: 16px; justify-items: start; }
.back { font-size: .85rem; color: var(--mut); margin-bottom: 10px; }
.back:hover { color: var(--acc); }
.case-head h1 { font-size: clamp(2.8rem, 8vw, 7rem); line-height: .84; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; max-width: 15ch; }
.case-meta { color: var(--mut); }
.case-cover { margin: 0 auto; max-width: var(--wrap); padding: 0 clamp(16px, 4vw, 48px); }
.case-cover img, .case-cover .tile { width: 100%; border-radius: var(--r); aspect-ratio: 16 / 8; object-fit: cover; }
.case-main { display: grid; gap: 28px; padding-top: 48px; align-items: start; }
.quest p { font-size: clamp(1.2rem, 2vw, 1.55rem); line-height: 1.4; max-width: 34ch; }
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { font-size: .86rem; padding: 6px 13px; border-radius: 999px; background: var(--acc-soft); }
.case-logos { display: flex; flex-wrap: wrap; gap: 26px; align-items: center; margin-top: 26px; }
.plogo { height: 40px; width: auto; }
.tooltip { background: var(--bg2); border-radius: var(--r); padding: 22px 24px; box-shadow: inset 0 0 0 1px var(--line); }
.tooltip-leg { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 45%, transparent); }
.tt-h { font-size: .82rem; color: var(--acc); margin-bottom: 12px; }
.tooltip ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.tooltip li { display: grid; gap: 2px; }
.tooltip b { font-family: var(--f-m); font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; color: var(--acc); letter-spacing: -.02em; }
.tooltip span { color: var(--mut); font-size: .95rem; }
@media (min-width: 960px) { .case-main { grid-template-columns: 1.5fr 1fr; gap: 64px; } }
.stages { padding-top: 72px; }
.stages ol { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.stages li { display: grid; gap: 4px 20px; padding: 16px 20px; border-radius: 12px; background: var(--bg2); }
.st-y { font-family: var(--f-m); color: var(--acc); font-size: .88rem; }
.stages b { font-size: 1.1rem; }
.st-d { color: var(--mut); }
@media (min-width: 900px) { .stages li { grid-template-columns: 130px 1fr 1.4fr; align-items: baseline; } }
.case-video { padding-top: 72px; }
.case-video video { width: 100%; border-radius: var(--r); background: #000; aspect-ratio: 16 / 9; }
.gallery { padding-top: 72px; display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r); }
@media (min-width: 960px) { .gallery { grid-template-columns: repeat(var(--n, 3), 1fr); gap: 18px; } }
.gallery[style*="--n:1"] { grid-template-columns: 1fr; }
.gallery[style*="--n:1"] img { aspect-ratio: 21 / 9; }
.next { padding: 90px clamp(16px, 4vw, 48px) 100px; }
.next-link { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px 20px; padding-top: 28px; border-top: 1px solid var(--line); }
.next-link .pixel { grid-column: 1 / -1; color: var(--mut); font-size: .85rem; }
.next-t { font-family: var(--f-d); font-weight: 900; font-stretch: 125%; text-transform: uppercase; font-size: clamp(2rem, 6vw, 5rem); line-height: .86; letter-spacing: -.03em; transition: color .25s; }
.next-link i { font-size: clamp(2rem, 5vw, 4rem); color: var(--acc); transition: transform .4s var(--ease); }
.next-link:hover .next-t { color: var(--acc); }
.next-link:hover i { transform: translateX(10px); }

/* simple + 404 */
.simple { padding-top: 64px; padding-bottom: 100px; max-width: 760px; }
.simple h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); font-stretch: 122%; text-transform: uppercase; line-height: .9; margin-bottom: 30px; }
.simple h2 { font-size: 1.2rem; margin: 30px 0 8px; }
.simple p { color: var(--mut); }
mark { background: var(--acc-soft); color: var(--fg); padding: 0 4px; border-radius: 4px; }
.gameover { min-height: calc(100dvh - 180px); display: flex; flex-direction: column; justify-content: center; gap: 16px; padding-block: 60px; }
.go-code { color: var(--acc); }
.gameover h1 { font-size: clamp(4rem, 14vw, 11rem); font-stretch: 125%; font-weight: 900; text-transform: uppercase; line-height: .85; letter-spacing: -.04em; }
.gameover p { color: var(--mut); font-size: 1.15rem; }
.go-count { color: var(--fg) !important; }
.gameover .btn { align-self: flex-start; margin-top: 12px; }

/* cheat mode (Konami): retro pixel look with scanlines */
.cheat h1, .cheat h2, .cheat h3, .cheat .brand, .cheat .next-t, .cheat .btn { font-family: var(--f-p) !important; font-weight: 400 !important; letter-spacing: 0 !important; font-stretch: 100% !important; }
.cheat .title-screen h1 { font-size: clamp(3rem, 10vw, 9rem); line-height: .95; }
.cheat img { image-rendering: pixelated; }
.cheat body::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.cheat { --acc: #39ff6a; --acc-ink: #04140a; --acc-soft: rgb(57 255 106 / .14); }

/* reveal */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

@media (max-width: 719px) {
  .hide-sm { display: none !important; }
  .nav nav { gap: 6px; }
  .xp-bar { display: flex; flex-direction: column-reverse; gap: 14px; }
  .xp-bar::before { left: 5px; right: auto; top: 0; bottom: 0; width: 4px; height: auto; background: linear-gradient(0deg, color-mix(in srgb, var(--acc) 35%, transparent), var(--acc)); }
  .xp-bar li { padding: 0 0 0 30px; }
  .xp-bar li::before { top: 4px; }
}

/* lobby (koop) */
.koop { display: grid; gap: 40px; }
.lobby { background: var(--bg2); border-radius: var(--r); padding: 22px; display: grid; gap: 10px; max-width: 560px; box-shadow: inset 0 0 0 1px var(--line); }
.lb-h { font-size: .8rem; color: var(--mut); margin-bottom: 4px; }
.lb-slot { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 10px; background: var(--bg3); box-shadow: inset 0 0 0 1px var(--line); }
.lb-slot > .pixel:first-child { color: var(--mut); }
.lb-slot b { font-size: 1.1rem; }
.lb-s { font-size: .75rem; color: var(--mut); }
.is-ready .lb-s { color: #3ddc84; }
.is-ready > .pixel:first-child { color: var(--acc); }
.lb-wait { color: var(--acc); }
.dots::after { content: "..."; }
@media (prefers-reduced-motion: no-preference) { .dots::after { animation: dots 1.4s steps(4) infinite; content: ""; } }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (min-width: 960px) {
  .koop { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); max-width: var(--wrap); margin: 0 auto; padding-inline: clamp(16px, 4vw, 48px); align-items: center; }
  .koop > .wrap { padding: 0; margin: 0; max-width: none; }
  .lobby { justify-self: end; width: 100%; }
}

.case-cover figcaption { margin-top: 10px; font-size: .85rem; color: var(--mut); }


/* player profile (character select) */
.profile { display: grid; gap: 28px; align-items: start; }
.pcard { margin: 0; background: var(--bg2); border-radius: var(--r); padding: 16px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--acc) 40%, transparent); display: grid; gap: 14px; }
.pc-top { display: flex; justify-content: space-between; font-size: .85rem; color: var(--acc); padding: 2px 4px 0; }
.pc-img { position: relative; border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg3); }
.pc-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(1.05) contrast(1.03); }
.pc-img::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .12) 0 1px, transparent 1px 3px); mix-blend-mode: multiply; }
.pc-corners, .pc-corners::before, .pc-corners::after { position: absolute; inset: 10px; pointer-events: none; }
.pc-corners { border: 3px solid var(--acc); clip-path: polygon(0 0, 22% 0, 22% 3px, 3px 3px, 3px 22%, 0 22%, 0 78%, 3px 78%, 3px calc(100% - 3px), 22% calc(100% - 3px), 22% 100%, 78% 100%, 78% calc(100% - 3px), calc(100% - 3px) calc(100% - 3px), calc(100% - 3px) 78%, 100% 78%, 100% 22%, calc(100% - 3px) 22%, calc(100% - 3px) 3px, 78% 3px, 78% 0, 100% 0, 100% 100%, 0 100%); }
@media (prefers-reduced-motion: no-preference) {
  .pc-corners { animation: lock 2.4s var(--ease) infinite; }
}
@keyframes lock { 0%, 100% { transform: scale(1); } 50% { transform: scale(.965); } }
.pcard figcaption { display: grid; gap: 4px; padding: 0 4px; }
.pcard figcaption b { font-family: var(--f-d); font-size: clamp(1.8rem, 3vw, 2.4rem); font-stretch: 125%; font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: -.02em; }
.pcard figcaption span { color: var(--mut); }
.pc-select { font-size: .8rem; color: var(--fg); padding: 0 4px 4px; }
.pinfo { display: grid; gap: 24px; }
.intro { font-size: clamp(1.25rem, 2.2vw, 1.75rem); line-height: 1.35; font-weight: 500; max-width: 30ch; }
@media (min-width: 960px) {
  .profile { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; }
  .pinfo { padding-top: 8px; }
}
.case-text { margin-top: 18px; color: var(--mut); font-size: 1.08rem !important; line-height: 1.6 !important; max-width: 60ch !important; }
.part-h { margin-top: 30px; }


/* arcade */
section.arcade-sec { padding-top: clamp(72px, 10vw, 130px); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1.5px rgb(127 127 127 / .45); }
.arcade { max-width: min(980px, calc((100dvh - 230px) * 4 / 3)); margin: 0 auto; }
.arcade-sec .h2, .arcade-sec .sub { text-align: center; margin-left: auto; margin-right: auto; }
.arc-screen { position: relative; aspect-ratio: 4 / 3; border-radius: 18px; overflow: hidden; background: #0b0b0e; box-shadow: 0 0 0 10px var(--bg2), 0 0 0 11px var(--line), 0 30px 80px -30px color-mix(in srgb, var(--acc) 45%, transparent); margin: 11px; }
.arc-screen canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; image-rendering: crisp-edges; outline: none; cursor: crosshair; }
.arc-screen::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .22) 0 1px, transparent 1px 3px), radial-gradient(120% 90% at 50% 50%, transparent 60%, rgb(0 0 0 / .45)); }
.arc-over { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 14px; text-align: center; padding: 20px; background: rgb(11 11 14 / .82); backdrop-filter: blur(3px); color: #f2f1ee; }
.arc-over[hidden] { display: none; }
.arc-t { font-size: clamp(1.6rem, 5vw, 3rem); color: var(--acc); }
.arc-score { font-size: 1rem; }
.arc-score b { color: var(--acc); font-weight: 400; }
.arc-msg { font-size: clamp(1rem, 2vw, 1.3rem); max-width: 30ch; }
.arc-btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.arc-over .btn-ghost { color: #f2f1ee; }
.arc-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 11px 0; color: var(--mut); font-size: .8rem; }
.arc-touch { display: none; grid-template-columns: 1fr 1.4fr 1fr; gap: 10px; margin: 16px 11px 0; }
.arc-touch button { height: 64px; border-radius: 14px; background: var(--bg2); box-shadow: inset 0 0 0 1px var(--line), 0 4px 0 var(--bg3); font-size: 1.6rem; display: grid; place-items: center; touch-action: none; user-select: none; -webkit-user-select: none; }
.arc-touch button:active { transform: translateY(3px); box-shadow: inset 0 0 0 1px var(--line); }
.arc-touch [data-k="fire"] { background: var(--acc); color: var(--acc-ink); font-size: 1rem; }
@media (pointer: coarse) { .arc-touch { display: grid; } .hide-touch { display: none; } .arc-bar { justify-content: flex-end; } }

@media (min-width: 760px) { .inv-leg > .item:first-child:nth-last-child(odd) { grid-column: 1 / -1; } .inv-leg > .item:first-child:nth-last-child(odd) .item-media { aspect-ratio: 21 / 8; } }


/* password window */
.gate { display: none; }
.locked .gate { display: grid; position: fixed; inset: 0; z-index: 200; place-items: center; padding: 16px; overflow: auto; background: #0b0b0e; transition: opacity .45s var(--ease); }
.locked body { overflow: hidden; }
.locked .nav, .locked main, .locked .foot, .locked .skip, .locked .toast { visibility: hidden; }
.unlocking .gate { opacity: 0; }
.unlocking .gate-card { transform: translateY(-10px) scale(.98); }
.gate-bg { position: fixed; inset: -30px; background-size: cover; background-position: center; filter: blur(10px) saturate(1.1); }
.gate::after { content: ""; position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgb(0 0 0 / .2) 0 1px, transparent 1px 3px); }
.gate-card { position: relative; z-index: 1; width: min(460px, 100%); padding: 22px 30px 20px; border-radius: 18px; background: #16161b; color: #f2f1ee; box-shadow: 0 40px 100px -30px rgb(0 0 0 / .8), 0 0 0 1px rgb(255 255 255 / .1), 0 0 0 7px #16161b, 0 0 0 8px rgb(255 255 255 / .08); transition: transform .45s var(--ease); }
.gate-hud { display: flex; justify-content: space-between; font-size: .82rem; color: #a6a5ad; margin-bottom: 22px; }
.gate-hud span:first-child { color: var(--acc); }
.gate-card h1 { font-size: clamp(2.7rem, 11vw, 3.7rem); line-height: .86; font-stretch: 125%; font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; margin-bottom: 16px; }
.gate-card h1 em { font-style: normal; display: block; color: var(--acc); }
.gate-p { color: #a6a5ad; font-size: 1rem; line-height: 1.45; margin-bottom: 20px; }
.gate-card label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 6px; }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; height: 50px; padding: 0 18px; border: 0; border-radius: 999px; background: #1f1f26; color: #f2f1ee; font: 700 1.05rem var(--f-m); letter-spacing: .12em; box-shadow: inset 0 0 0 1.5px rgb(255 255 255 / .12); }
.gate-row input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--acc); }
.gate-row .btn { height: 50px; padding: 0 20px; color: #1a0b04; }
.gate-err { color: #ff8a6b; font-size: .8rem; margin-top: 10px; }
.gate-legal { display: flex; gap: 16px; margin-top: 18px; font-size: .84rem; }
.gate-legal a { color: #a6a5ad; }
.gate-legal a:hover { color: #f2f1ee; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }
@media (prefers-reduced-motion: reduce) { .shake { animation: none; } }
@media (max-width: 459px) { .gate-card { padding: 20px 20px 18px; } .gate-row { flex-direction: column; } .gate-row input { flex: none; width: 100%; } .gate-row .btn { justify-content: center; } }

/* claim + language link */
.title-screen .claim { margin-top: 18px; font-weight: 600; font-size: clamp(1rem, 1.5vw, 1.2rem); color: #f2f1ee; }
.title-screen .lede { margin-top: 8px; }
.lang-link { font-family: var(--f-p); font-size: .82rem; color: var(--mut); padding: 6px 8px; border-radius: 8px; }
.nav nav > a.lang-link { display: inline-block; }
.lang-link:hover { color: var(--fg); background: var(--bg2); }
.gate-hud a { color: #a6a5ad; }
.gate-hud a:hover { color: #f2f1ee; }

/* bonus level links */
.nav .brand, .nav-bonus { white-space: nowrap; }
@media (max-width: 1000px) { .nav .timer { display: none; } }
.nav-bonus i { color: var(--acc); }
.foot-bonus { display: inline-flex; align-items: center; gap: 8px; color: var(--mut); }
.foot-bonus:hover { color: var(--fg); }
.foot-bonus i { color: var(--acc); }
a.pc-img { display: block; }
.pc-bonus { position: absolute; left: 12px; bottom: 12px; z-index: 2; padding: 5px 9px; border-radius: 6px; background: var(--acc); color: var(--acc-ink); font-size: .72rem; opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .25s var(--ease); }
a.pc-img:hover .pc-bonus, a.pc-img:focus-visible .pc-bonus { opacity: 1; transform: none; }
@media (hover: none) { .pc-bonus { opacity: 1; transform: none; } }
