body{background:#0e0e0e;color:#eee;font:14px system-ui}
a{color:#ffd89a}.wrap{max-width:1200px;margin:16px auto;padding:0 12px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:12px}
.small{opacity:.7;font-size:12px}
.nav{background:#111;border-bottom:1px solid #333;padding:8px 12px;display:flex;gap:8px;align-items:center;position:sticky;top:0;z-index:20}
.hud{position:fixed;left:0;right:0;bottom:8px;display:flex;justify-content:space-between;align-items:center;padding:0 12px;pointer-events:none;z-index:5}
.hud .tag{background:#2a2217;border:2px solid #cfa968;color:#e9d4a6;border-radius:12px;padding:6px 10px;font-weight:700;box-shadow:0 4px 20px rgba(0,0,0,.35)}
.hud .num{font-variant-numeric:tabular-nums}
.panel{background:#141414;border:1px solid #2a2a2a;border-radius:12px;padding:12px;margin:12px 0}
.k{position:relative;background:var(--paper,#fff1cf)!important;color:var(--text,#1a110a)!important;border:3px solid var(--frame,#cfa968)!important;border-radius:16px;overflow:hidden;box-shadow:0 8px 28px rgba(0,0,0,.22);background-clip:padding-box}
.k .poster-top{display:flex;gap:8px;justify-content:space-between;align-items:center;padding:10px 12px;background:linear-gradient(#2b2116,#20180f);color:#ffd89a;border-bottom:3px solid var(--frame,#cfa968)}
.k .poster-top .id{font-weight:900}.k .poster-top .title{font-weight:700;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:70%}
.k .body{padding:12px}.k .img{border:2px solid var(--frame,#cfa968);border-radius:10px;overflow:hidden;margin-bottom:10px}
.k .img img{display:block;width:100%;height:auto}
.badge{display:inline-block;padding:2px 6px;border:1px solid #555;border-radius:6px;margin-left:6px;background:#1b1b1b}
.prologue-overlay{position:fixed;inset:0;background:#050403;display:flex;align-items:center;justify-content:center;z-index:99}
.prologue-card{width:min(980px,94vw);border:3px solid #cfa968;border-radius:18px;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.6)}
.prologue-media{display:grid;grid-template-rows:auto 1fr}.prologue-media .hero{width:100%;height:min(48vh,420px);object-fit:cover;display:block;border-bottom:3px solid #cfa968}
.prologue-body{background:linear-gradient(#1e160e,#120d08);color:#f4e1b5;padding:18px}.prologue-body h2{margin:0 0 8px;color:#ffd89a}
.prologue-body .txt{white-space:pre-line}.prologue-body .actions{margin-top:10px;display:flex;gap:8px}
.grid15{display:grid;grid-template-columns:repeat(4,64px);gap:6px;justify-content:center}
.tile{width:64px;height:64px;display:grid;place-items:center;border:1px solid #444;border-radius:8px;background:#222}
.tile.empty{background:#111;border-style:dashed}
.memory{display:grid;grid-template-columns:repeat(4,64px);gap:6px;justify-content:center}
.cardmm{width:64px;height:64px;display:grid;place-items:center;border:1px solid #444;border-radius:8px;background:#222}
.cardmm.open,.cardmm.done{background:#333}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:none;align-items:center;justify-content:center;z-index:50}
.modal .box{background:#151515;border:1px solid #333;border-radius:12px;padding:12px;min-width:320px;color:#eee}
.k .actions{display:flex;gap:8px;align-items:center;margin-top:8px;flex-wrap:wrap}
.k .qrbtn{border:1px solid #704e26;background:#20180f;color:#ffd89a;border-radius:8px;padding:4px 8px;cursor:pointer}
