@font-face{font-family:'Morass Garamond';src:url('/assets/garamond.ttf') format('truetype');font-display:swap;font-weight:400 800}

:root{
  --bg:#0b0f16;
  --bg-2:#10151f;
  --panel:#151c28;
  --panel-2:#1b2433;
  --line:#253045;
  --line-2:#33405a;
  --text:#ede6d6;
  --muted:#9ba4b4;
  --gold:#e3b660;
  --gold-2:#f5d38e;
  --gold-ink:#1d1406;
  --ember:#d9774a;
  --radius:14px;
  --serif:'Morass Garamond',Georgia,'Times New Roman',serif;
  --sans:system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  --top:64px;
  --side:236px;
  color-scheme:dark;
}
*{box-sizing:border-box}
html{background:var(--bg)}
body{margin:0;min-height:100vh;background:
  radial-gradient(1200px 500px at 70% -120px,#2a2140 0%,transparent 60%),
  radial-gradient(900px 420px at -10% 10%,#13304044 0%,transparent 60%),
  var(--bg);
  color:var(--text);font:15px/1.55 var(--sans);-webkit-font-smoothing:antialiased}
a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}
button{font:inherit;color:inherit}
.skip{position:absolute;left:-999px;top:8px;background:var(--gold);color:var(--gold-ink);padding:8px 12px;border-radius:8px;z-index:100}
.skip:focus{left:8px}
:focus-visible{outline:2px solid var(--gold-2);outline-offset:2px}
.ic{width:20px;height:20px;flex:none}
h1,h2,h3{font-family:var(--serif);font-weight:700;letter-spacing:.01em;margin:0;line-height:1.15}

/* Top bar */
.topbar{position:sticky;top:0;z-index:40;height:var(--top);display:flex;align-items:center;gap:14px;padding-inline:16px;
  background:rgba(11,15,22,.86);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);border-bottom:1px solid var(--line)}
.logo{display:flex;align-items:center;gap:10px;flex:none;width:calc(var(--side) - 30px)}
.crest svg{width:32px;height:35px;display:block;filter:drop-shadow(0 2px 6px #e3b66040)}
.logo-word{font-family:var(--serif);font-size:1.35rem;letter-spacing:.03em;white-space:nowrap}
.logo-word b{color:var(--gold);font-weight:700}
.search{position:relative;flex:1;max-width:560px;display:flex;align-items:center;margin-inline:auto}
.search .ic{position:absolute;left:14px;color:var(--muted);pointer-events:none}
.search input{width:100%;height:42px;padding:0 16px 0 44px;border-radius:999px;border:1px solid var(--line-2);background:var(--panel);color:var(--text);font:inherit}
.search input::placeholder{color:var(--muted)}
.search input:focus{outline:none;border-color:var(--gold);box-shadow:0 0 0 3px #e3b66026}
.suggest{position:absolute;top:50px;left:0;right:0;background:var(--panel);border:1px solid var(--line-2);border-radius:12px;padding:6px;box-shadow:0 18px 40px #0009}
.suggest a{display:flex;gap:12px;align-items:center;padding:8px;border-radius:8px}
.suggest a:hover,.suggest a:focus{background:var(--panel-2)}
.suggest img{width:36px;height:36px;border-radius:8px}
.suggest strong{display:block;font-weight:600}
.suggest small,.suggest p{color:var(--muted);margin:0;padding:6px 8px}
.suggest a small{padding:0}
.icon-btn{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:10px;border:1px solid var(--line-2);background:var(--panel);cursor:pointer}
.icon-btn:hover{border-color:var(--gold);color:var(--gold-2)}
.menu-btn{display:none}

/* Buttons, tags */
.btn{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px;border-radius:10px;font-weight:600;cursor:pointer;border:1px solid transparent;white-space:nowrap;transition:transform .12s ease,filter .12s ease,background .12s ease}
.btn .ic{width:18px;height:18px}
.btn-gold{background:linear-gradient(180deg,var(--gold-2),var(--gold));color:var(--gold-ink);box-shadow:0 6px 18px #e3b66033,inset 0 1px 0 #fff6}
.btn-gold:hover{filter:brightness(1.07);transform:translateY(-1px)}
.btn-ghost{background:var(--panel);border-color:var(--line-2)}
.btn-ghost:hover{border-color:var(--gold);color:var(--gold-2)}
.btn-lg{height:50px;padding:0 26px;font-size:1.05rem;border-radius:12px}
.btn-sm{height:34px;padding:0 12px;font-size:.9rem}
.tag{display:inline-block;padding:4px 10px;border-radius:999px;background:#ffffff0d;border:1px solid var(--line-2);color:var(--muted);font-size:.82rem}
.eyebrow{display:flex;align-items:center;gap:6px;margin:0 0 8px;color:var(--gold);font-size:.78rem;font-weight:600;letter-spacing:.14em;text-transform:uppercase}
.eyebrow .ic{width:16px;height:16px}

/* Layout */
.layout{display:flex;align-items:flex-start}
.sidebar{position:sticky;top:var(--top);flex:none;width:var(--side);height:calc(100vh - var(--top));overflow-y:auto;padding:16px 12px 20px;border-right:1px solid var(--line);display:flex;flex-direction:column}
.nav-item{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:10px;color:#cdd3de;font-weight:500}
.nav-item:hover{background:var(--panel);color:var(--text)}
.nav-item.is-active{background:linear-gradient(90deg,#e3b6602b,#e3b66008);color:var(--gold-2);box-shadow:inset 3px 0 0 var(--gold)}
.nav-item em{margin-left:auto;font-style:normal;font-size:.78rem;color:var(--muted);background:#ffffff0a;border-radius:999px;padding:1px 8px}
.nav-heading{margin:18px 12px 6px;color:var(--muted);font-size:.72rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.sidebar-foot{margin-top:auto;padding:16px 12px 0;display:flex;gap:16px;color:var(--muted);font-size:.88rem;border-top:1px solid var(--line)}
.sidebar-foot a:hover{color:var(--gold-2)}
.content{flex:1;min-width:0;padding:22px 28px 56px;max-width:1500px}
.scrim{position:fixed;inset:0;z-index:44;background:#0008}

/* Category chips */
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:6px;margin-bottom:18px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{display:inline-flex;align-items:center;gap:7px;flex:none;padding:7px 14px;border-radius:999px;background:var(--panel);border:1px solid var(--line-2);font-weight:500;font-size:.92rem}
.chip .ic{width:17px;height:17px;color:var(--gold)}
.chip:hover{border-color:var(--gold)}
.chip.is-active{background:#e3b66022;border-color:var(--gold);color:var(--gold-2)}

/* Hero */
.hero{position:relative;overflow:hidden;min-height:340px;border-radius:20px;display:flex;align-items:flex-end;margin-bottom:34px;
  background:linear-gradient(90deg,#0b0f16f2 0%,#0b0f16b3 38%,#0b0f1600 70%),linear-gradient(0deg,#0b0f16d9 0%,#0b0f1600 45%),var(--hero) center/cover no-repeat;
  border:1px solid var(--line-2);box-shadow:0 30px 60px -30px #000c}
.hero::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px #f5d38e1f;pointer-events:none}
.hero-copy{position:relative;padding:36px 40px;max-width:520px}
.hero h1{font-size:clamp(2.2rem,4.6vw,3.6rem);text-shadow:0 2px 20px #000a}
.hero p{margin:10px 0 16px;color:#d8d2c4;font-size:1.08rem}
.hero-tags{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:22px}

/* Shelves and cards */
.shelf{margin-bottom:34px}
.shelf-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.shelf-head h2{display:flex;align-items:center;gap:10px;font-size:1.55rem}
.shelf-head h2 .ic{width:22px;height:22px;color:var(--gold)}
.more{display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-weight:600;font-size:.9rem}
.more .ic{width:16px;height:16px}
.more:hover{color:var(--gold-2)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:18px}
.card{display:flex;flex-direction:column;gap:10px;min-width:0}
.thumb{position:relative;display:block;aspect-ratio:16/9;border-radius:var(--radius);overflow:hidden;background:var(--panel-2);border:1px solid var(--line);transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.thumb img{width:100%;height:100%;object-fit:cover;transition:transform .35s ease}
.thumb-play{position:absolute;inset:0;display:grid;place-items:center;background:radial-gradient(circle,#0b0f1680 0%,#0b0f1633 70%);opacity:0;transition:opacity .18s ease}
.thumb-play .ic{width:46px;height:46px;padding:12px;border-radius:50%;background:var(--gold);color:var(--gold-ink);box-shadow:0 8px 24px #0008}
.card:hover .thumb,.card:focus-visible .thumb{transform:translateY(-4px);border-color:var(--gold);box-shadow:0 16px 34px -12px #000,0 0 0 1px #e3b66055,0 0 26px -6px #e3b66066}
.card:hover .thumb img{transform:scale(1.05)}
.card:hover .thumb-play,.card:focus-visible .thumb-play{opacity:1}
.badge{position:absolute;top:10px;left:10px;padding:3px 9px;border-radius:6px;background:var(--ember);color:#fff;font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;box-shadow:0 4px 10px #0006}
.card-body strong{display:block;font-weight:600;font-size:1rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.card-body small{color:var(--muted);font-size:.85rem}
.card:hover .card-body strong{color:var(--gold-2)}

/* List page heads */
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;flex-wrap:wrap;margin:6px 0 22px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.page-head h1{font-size:clamp(2rem,4vw,2.8rem)}
.page-head p{margin:6px 0 0;color:var(--muted)}
.sort{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:.9rem}
.sort select{height:36px;padding:0 10px;border-radius:9px;background:var(--panel);border:1px solid var(--line-2);color:var(--text);font:inherit}
.empty{color:var(--muted)}

/* Game page */
.crumbs{display:flex;gap:8px;flex-wrap:wrap;color:var(--muted);font-size:.88rem;margin-bottom:14px}
.crumbs a:hover{color:var(--gold-2)}
.player-wrap{border-radius:18px;overflow:hidden;border:1px solid var(--line-2);background:#05070b;box-shadow:0 30px 60px -30px #000}
.player{position:relative;width:100%;aspect-ratio:16/9;max-height:calc(100vh - var(--top) - 150px);margin-inline:auto;background:var(--cover) center/cover no-repeat}
.player-portrait{aspect-ratio:9/16;max-width:min(100%,calc((100vh - var(--top) - 150px) * 9 / 16))}
.player::before{content:"";position:absolute;inset:0;background:radial-gradient(circle at 50% 45%,#0b0f1666 0%,#0b0f16e6 75%);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px)}
.player-start{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:20px;gap:8px}
.player-icon{width:112px;height:112px;border-radius:26px;box-shadow:0 12px 34px #000b,0 0 0 2px #f5d38e44}
.player-start h1{margin-top:10px;font-size:clamp(1.8rem,3.6vw,2.8rem);text-shadow:0 2px 16px #000}
.player-start p{margin:0 0 14px;color:#dcd5c6;max-width:34rem}
.player iframe{position:absolute;inset:0;width:100%;height:100%;border:0;background:#000}
.player.is-playing::before,.player.is-playing .player-start{display:none}
.player:fullscreen{max-height:none;max-width:none;aspect-ratio:auto;width:100vw;height:100vh}
.player-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;background:var(--panel);border-top:1px solid var(--line)}
.player-title{display:flex;align-items:center;gap:12px;min-width:0}
.player-title img{width:40px;height:40px;border-radius:10px}
.player-title strong{display:block;font-family:var(--serif);font-size:1.2rem}
.player-title small{color:var(--muted)}
.player-actions{display:flex;gap:8px}
.detail{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:28px;margin:30px 0 40px}
.about-game h2{font-size:1.5rem;margin:24px 0 10px}
.about-game h2:first-child{margin-top:0}
.about-game p{margin:0 0 12px;color:#d5d0c5;max-width:68ch}
.steps{margin:0;padding-left:22px;color:#d5d0c5}
.steps li{margin:6px 0;padding-left:4px}
.steps li::marker{color:var(--gold);font-weight:700}
.controls{border-collapse:collapse;width:100%;max-width:560px}
.controls th,.controls td{text-align:left;padding:9px 12px;border-bottom:1px solid var(--line)}
.controls th{width:44%;font-weight:600;color:var(--gold-2)}
.controls td{color:#d5d0c5}
.note{display:flex;gap:10px;align-items:flex-start;margin-top:20px !important;padding:12px 14px;border-radius:12px;background:#e3b66012;border:1px solid #e3b66033}
.note .ic{color:var(--gold);margin-top:2px}
.facts{align-self:start;position:sticky;top:calc(var(--top) + 18px);padding:20px;border-radius:16px;background:var(--panel);border:1px solid var(--line)}
.facts h2{font-size:1.3rem;margin-bottom:12px}
.facts h3{font-family:var(--sans);font-size:.8rem;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);margin:18px 0 10px}
.facts dl{margin:0}
.facts dl div{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
.facts dt{color:var(--muted)}
.facts dd{margin:0;text-align:right;font-weight:500}
.tags{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px}
.also{display:flex;flex-wrap:wrap;gap:8px}

.prose{max-width:680px;color:#d5d0c5}
.prose a{color:var(--gold-2);text-decoration:underline;text-underline-offset:3px}

/* Footer */
.footer{border-top:1px solid var(--line);background:var(--bg-2);padding:34px 24px 20px}
.footer-inner{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:2fr 1fr 1fr;gap:28px}
.footer p{color:var(--muted);margin:10px 0 0;max-width:34rem}
.footer nav{display:flex;flex-direction:column;gap:8px;color:#c7cdd8}
.footer nav a:hover{color:var(--gold-2)}
.footer .copyright{max-width:1200px;margin:26px auto 0;font-size:.85rem}

/* Narrow screens */
@media (max-width:1024px){
  .menu-btn{display:inline-grid}
  .logo{width:auto}
  .sidebar{position:fixed;left:0;top:var(--top);z-index:45;height:calc(100vh - var(--top));background:var(--bg-2);transform:translateX(-102%);transition:transform .2s ease;box-shadow:20px 0 40px #0008}
  .menu-open .sidebar{transform:none}
  .content{padding:18px 18px 48px}
  .detail{grid-template-columns:1fr}
  .facts{position:static}
}
@media (max-width:720px){
  .topbar{gap:10px;padding-inline:12px}
  .logo-word{display:none}
  .random span{display:none}
  .random{width:40px;padding:0;justify-content:center}
  .hero{min-height:300px;background:linear-gradient(0deg,#0b0f16f5 0%,#0b0f16aa 55%,#0b0f1622 100%),var(--hero) center/cover no-repeat}
  .hero-copy{padding:24px 20px}
  .grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:14px}
  .footer-inner{grid-template-columns:1fr 1fr}
  .footer-inner>div{grid-column:1/-1}
  .player{aspect-ratio:auto;height:min(62vh,420px);max-height:none}
  .player-icon{width:84px;height:84px;border-radius:20px}
  .player-start h1{font-size:1.9rem}
}
