@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=IBM+Plex+Serif:wght@500;600&family=IBM+Plex+Mono:wght@500&display=swap');
:root { --ink: #0F1B2D; --muted: #3D4757; --soft: #5A6372; --line: #E3E1DA; --paper: #F6F5F1; --card: #FFFFFF; --accent: #8A1C2B; --accent-soft: #FBF3F2; --ok: #1F6F5C; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 'IBM Plex Sans', system-ui, sans-serif; }
a { color: var(--ink); } a:hover { color: var(--accent); }
h1, h2, h3 { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; letter-spacing: -0.01em; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); }
.topbar .in { max-width: 1200px; margin: 0 auto; padding: 14px 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.brand { font-family: 'IBM Plex Serif', Georgia, serif; font-weight: 600; font-size: 20px; text-decoration: none; }
.brand b { color: var(--accent); font-weight: 600; }
main.narrow { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
.mono { font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: .08em; color: var(--soft); }
.muted { color: var(--muted); } .small { font-size: 14px; }
label { display: block; font-weight: 500; margin: 18px 0 6px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #C9C6BC; border-radius: 8px; padding: 11px 12px; min-height: 44px; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 3px solid #E8B4AE; outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid #C9C6BC; background: #fff; color: var(--ink); font: 500 15px 'IBM Plex Sans', sans-serif; cursor: pointer; text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; margin: 0; font-weight: 400; }
.plan input { width: auto; min-height: 0; margin-top: 5px; }
.plan.on { border: 2px solid var(--accent); padding: 13px 15px; }
.error { color: #8A1C2B; background: var(--accent-soft); border: 1px solid #EBCFCC; border-radius: 8px; padding: 10px 12px; margin-top: 16px; }
.okmsg { color: var(--ok); }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: #F0EEE8; color: var(--muted); }
.pill.accent { background: var(--accent); color: #fff; }
table.simple { width: 100%; border-collapse: collapse; font-size: 15px; }
table.simple th, table.simple td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.simple th { font-weight: 600; color: var(--soft); font-size: 13px; }

/* ---------- game page ---------- */
.game { max-width: 1240px; margin: 0 auto; padding: 24px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.game aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.game section.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.casehead { background: var(--ink); color: #fff; border-radius: 12px; padding: 18px 22px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; }
.casehead h1 { margin: 0; font-size: 24px; } .casehead .mono { color: #B8C1CF; }
.days { display: flex; gap: 6px; margin-top: 10px; } .days span { flex: 1; height: 6px; border-radius: 3px; background: #2E3B50; min-width: 28px; } .days span.past { background: #fff; } .days span.today { background: #F0A8A0; }
.file h2 { font-size: 20px; margin: 4px 0 8px; }
.secret { background: var(--accent-soft); border: 1px solid #EBCFCC; border-radius: 10px; padding: 14px; margin-top: 12px; }
.secret .label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; padding: 12px 14px; font: 500 15px 'IBM Plex Sans', sans-serif; color: var(--soft); cursor: pointer; min-height: 44px; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.feed { display: flex; flex-direction: column; gap: 12px; max-height: 62vh; overflow-y: auto; padding: 4px 2px; }
.post { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.post .who { font-size: 14px; font-weight: 600; } .post .who .role { font-weight: 400; color: var(--soft); } .post .when { font-size: 12px; color: var(--soft); }
.post.evidence { border-color: #EBCFCC; background: var(--accent-soft); }
.post.narrator { border-left: 4px solid var(--ink); }
.post.system, .post.reveal { background: #F0EEE8; }
.post.statement { border-color: #C9C6BC; }
.post .body { margin-top: 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.post .report { background: none; border: 0; color: var(--soft); font-size: 12px; cursor: pointer; padding: 4px; }
.compose { display: flex; flex-direction: column; gap: 8px; }
.cast li { display: flex; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cast { list-style: none; margin: 0; padding: 0; }
.vote label.opt { display: flex; gap: 10px; align-items: center; font-weight: 400; margin: 6px 0; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.vote label.opt input { width: auto; min-height: 0; }
@media (max-width: 640px) { .game { padding: 12px; } .feed { max-height: 70vh; } .game aside { display: contents; } .game .file { order: 0; width: 100%; } .game section.main { order: 1; } .game .castcard { order: 2; width: 100%; } }
