/* Private owner analytics shares the site's typography and red/gold identity. */
.analytics-shell { min-height:100vh; background:#f5f5f7; color:#27202b; font-size:16px; }
.analytics-header { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:18px max(24px,calc((100vw - 1240px)/2)); border-bottom:1px solid #e1dfe4; background:white; }
.analytics-nav { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.analytics-private { font-size:14px; font-weight:800; color:#6b5965; }
.analytics-main { max-width:1288px; margin:0 auto; padding:32px 24px 48px; }
.analytics-title { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; }
.analytics-eyebrow { color:#8b353b; font-size:12px; font-weight:800; letter-spacing:.09em; }
.analytics-title h1 { font-size:clamp(25px,3.5vw,38px); line-height:1.2; margin-top:8px; letter-spacing:-.035em; }
.analytics-filters { display:flex; gap:12px; align-items:end; flex-wrap:wrap; background:white; padding:18px; border:1px solid #e1dfe4; border-radius:14px; }
.analytics-filters label { display:flex; flex-direction:column; gap:5px; font-size:14px; font-weight:800; min-width:0; }
.analytics-filters input,.analytics-filters select { border:1px solid #cbc5cf; border-radius:8px; padding:9px 10px; min-height:40px; background:#fff; color:#27202b; font-size:16px; max-width:100%; }
.analytics-presets { display:flex; gap:6px; align-items:center; min-height:40px; }
.analytics-game-filter { flex:1; min-width:180px!important; }
.analytics-shell .btn { font-size:14px; min-height:40px; }
.analytics-shell :focus-visible { outline:3px solid #ba8308; outline-offset:3px; }
.analytics-note { font-size:14px; color:#655d6b; line-height:1.55; }
.analytics-period { display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:26px 0 14px; font-size:14px; color:#655d6b; }
.analytics-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin-bottom:22px; }
.analytics-stat { background:white; padding:20px; border:1px solid #e1dfe4; border-radius:14px; border-top:3px solid #ddd7e0; }
.analytics-stat.accent { background:#8c2029; border-color:#8c2029; color:white; }
.analytics-stat h2 { font-size:14px; font-weight:800; line-height:1.4; }
.analytics-stat strong { display:block; margin:8px 0 10px; font-size:38px; line-height:1.15; font-variant-numeric:tabular-nums; letter-spacing:-.035em; }
.analytics-stat p { font-size:14px; line-height:1.5; margin:0; color:#655d6b; }
.analytics-stat.accent p { color:#ffe1dc; }
.analytics-panel { border:1px solid #e1dfe4; border-radius:14px; background:white; padding:22px; margin:0 0 20px; }
.analytics-section-head { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:20px; }
.analytics-section-head h2 { font-size:19px; letter-spacing:-.02em; }
.analytics-legend { display:flex; gap:18px; flex-wrap:wrap; font-size:14px; }
.analytics-legend span::before { content:''; display:inline-block; width:16px; height:4px; margin:0 6px 3px 0; background:currentColor; }
.analytics-legend .rooms { color:#97242f; }.analytics-legend .starts { color:#2258a0; }.analytics-legend .finishes { color:#28704b; }
.analytics-chart svg { width:100%; display:block; overflow:visible; }
.analytics-chart text { font:14px var(--body); fill:#655d6b; }
.analytics-gridline { stroke:#e9e5ec; stroke-width:1; }
.analytics-line { stroke:#97242f; fill:#97242f; }.analytics-line.starts { stroke:#2258a0; fill:#2258a0; }.analytics-line.finishes { stroke:#28704b; fill:#28704b; }
.analytics-line polyline { fill:none; stroke-width:2.5; stroke-linejoin:round; stroke-linecap:round; }
.analytics-line.starts polyline { stroke-dasharray:7 3; }.analytics-line.finishes polyline { stroke-dasharray:2 4; }
.analytics-table-scroll { overflow-x:auto; }
.analytics-shell table { width:100%; border-collapse:collapse; font-size:14px; font-variant-numeric:tabular-nums; }
.analytics-shell th,.analytics-shell td { padding:15px 12px; border-bottom:1px solid #ece8ee; text-align:right; white-space:nowrap; }
.analytics-shell th:first-child { text-align:left; padding-left:0; }
.analytics-shell thead th { color:#655d6b; font-size:14px; font-weight:700; }
.analytics-shell tr:last-child td,.analytics-shell tr:last-child th { border-bottom:0; }
.analytics-game-name { display:flex; gap:10px; align-items:center; }
.analytics-game-name>span { width:5px; height:22px; border-radius:3px; }
.analytics-details summary { cursor:pointer; font-weight:800; font-size:16px; }
.analytics-definitions { max-width:900px; line-height:1.65; color:#655d6b; }
.analytics-definitions strong { color:#27202b; }.analytics-definitions a { color:#8c2029; }
.analytics-empty { padding:20px 24px; border-left:4px solid #b58913; background:#fff7df; border-radius:6px; margin-bottom:18px; }
.analytics-empty p { margin:5px 0 0; font-size:14px; line-height:1.5; }
.analytics-loading { padding:80px 20px; text-align:center; color:#655d6b; }
.analytics-error { margin:20px 0; padding:20px; background:#fff1ef; border:1px solid #d09187; border-radius:12px; color:#7c1c23; }
.analytics-error p { margin:0 0 12px; }
.analytics-footer { text-align:center; color:#655d6b; padding:20px; font-size:14px; }
.analytics-login { max-width:500px; padding:clamp(40px,8vh,100px) 24px 60px; margin:0 auto; }
.analytics-login h1 { font-size:40px; line-height:1.12; letter-spacing:-.04em; margin:12px 0 20px; }
.analytics-login>p { line-height:1.65; color:#655d6b; }
.analytics-login-form { display:flex; flex-direction:column; gap:12px; margin-top:30px; padding:24px; background:white; border:1px solid #e1dfe4; border-radius:14px; }
.analytics-login-form label { font-weight:800; font-size:14px; }
.analytics-login-form input { padding:12px; border-radius:8px; border:1px solid #bfb6c2; font-size:16px; width:100%; }
.analytics-login-form .btn { margin-top:4px; }
.analytics-notice { max-width:650px; margin:12px auto 0; font-size:14px; line-height:1.5; padding:0 16px; }
.analytics-notice summary { cursor:pointer; }
@media(max-width:950px) { .analytics-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:560px) {
  .analytics-header { padding:16px; flex-wrap:wrap; }.analytics-header .wordmark { font-size:21px; }
  .analytics-main { padding:24px 14px; }.analytics-title { align-items:start; }.analytics-title h1 { font-size:27px; }
  .analytics-title .btn { margin-top:22px; }.analytics-private { font-size:12px; }
  .analytics-filters { padding:14px; }.analytics-presets { width:100%; }.analytics-filters label:not(.analytics-game-filter) { flex:1; width:calc(50% - 12px); }
  .analytics-stats { gap:10px; }.analytics-stat { padding:15px; }.analytics-stat strong { font-size:32px; }
  .analytics-panel { padding:16px; }.analytics-chart { overflow-x:auto; }.analytics-chart svg { min-width:540px; }
  .analytics-legend { gap:10px; }.analytics-login h1 { font-size:35px; }
}
.ides-edition-summary { font-size:16px; line-height:1.55; padding:14px; background:#f7edd6; border-left:4px solid #a47715; border-radius:8px; margin-bottom:18px; }
.ides-edition-summary p { margin:6px 0; }
.ides-round-clock { display:flex; gap:12px; flex-wrap:wrap; padding:10px 14px; font-size:14px; background:#301c23; color:#f6e6b8; border-bottom:1px solid #6d4e3b; }
.ides-round-clock b { color:#fff4cc; }
.ides-card-symbol { font-family:Georgia,'Segoe UI Symbol',serif; font-size:32px; min-height:50px; display:flex; align-items:center; justify-content:center; color:#5d202b; width:100%; line-height:1.05; }
.ides-card-symbol.large { font-size:55px; min-height:110px; margin:12px 0; }
.ides-card-effect { display:block; font-size:12px; line-height:1.25; color:#564530; margin-top:5px; text-align:center; }
.ides-card-guide { font-size:14px; color:#7c222b; }
.western-table .card { width:108px; height:158px; padding-top:23px; }
.western-table .card.small { width:88px; height:132px; padding-top:18px; }
.western-table .card.small .ides-card-symbol { font-size:26px; min-height:37px; }
.western-table .card .cname,.western-table .card.small .cname { font-size:12px; }
.western-table .card .ctype { display:none; }
.western-table .card.small .corner { font-size:12px; }
.ides-general-symbol { padding:10px 0 4px; color:#734315; font-size:22px; font-family:Georgia,'Segoe UI Symbol',serif; }
.western-guide { max-width:980px; font-size:16px; }
.western-guide h1 { font-size:clamp(28px,5vw,42px); margin:15px 0 24px; }
.western-rules-content { font-size:16px; line-height:1.65; }
.western-rules-content h3 { font-size:21px; margin:28px 0 10px; }
.western-rules-content li { margin:8px 0; }
.western-rules-content summary { cursor:pointer; font-weight:800; padding:12px 0; }
.western-rules-content table { border-collapse:collapse; width:100%; font-size:14px; }
.western-rules-content td,.western-rules-content th { padding:10px; border-bottom:1px solid var(--line); text-align:left; }
.ides-rules-lead { font-weight:800; color:#873323; }
.ides-reference-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(195px,1fr)); gap:12px; margin:22px 0; }
.ides-reference-card { border:1px solid #ded0b5; border-radius:12px; background:#fffdf8; padding:16px; }
.ides-reference-icon { font:28px Georgia,'Segoe UI Symbol',serif; color:#8b2731; display:block; min-height:40px; }
.ides-reference-card h4 { margin:6px 0; font-size:16px; }.ides-reference-card small { color:#75624e; font-size:14px; }
.ides-reference-card p { margin:8px 0 0; font-size:14px; line-height:1.55; }
.ides-roster-reference { margin:24px 0; }
@media(max-width:600px) { .ides-round-clock { gap:6px 12px; font-size:14px; }.western-table .card { width:96px; height:145px; }.western-table .card.small { width:82px; height:124px; } }
:root {
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --ink: #2b2118;
  --muted: #7a6a5a;
  --line: #e7dcc8;
  --red: #9b2226;
  --red-d: #74161a;
  --gold: #c9a227;
  --chick: #f6c945;
  --green: #2e8b57;
  --blue: #2e6fb7;
  --purple: #7d3c98;
  --felt1: #6a1f22;
  --felt2: #3b1012;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(43, 33, 24, 0.08), 0 6px 20px rgba(43, 33, 24, 0.08);
  --display: 'Cinzel', 'Trajan Pro', Georgia, serif;
  --body: 'Nunito', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--body); font-size: 15px; }
button { font-family: inherit; }
input, select { font-family: inherit; font-size: 15px; }
h1, h2, h3 { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; }
.loading { padding: 40vh 16px 0; text-align: center; color: var(--muted); }

/* ---------- buttons & bits ---------- */
.btn {
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 8px 14px; border-radius: 10px;
  font-weight: 700; cursor: pointer; transition: transform .05s, background .15s, box-shadow .15s; white-space: nowrap;
}
.btn:hover:not(:disabled) { background: #fff; box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--red-d); }
.btn.danger { background: #fff; border-color: #d9b8b8; color: var(--red); }
.btn.skill { background: #fdf3d6; border-color: #e8cf85; }
.btn.ghost { background: transparent; }
.btn.big { padding: 12px 22px; font-size: 16px; }
.btn.tiny { padding: 4px 10px; font-size: 12.5px; }
.btn.floating { position: fixed; bottom: 20px; right: 20px; z-index: 40; }
.link { background: none; border: 0; color: var(--red); font-weight: 700; cursor: pointer; font-size: 15px; }
.x { background: none; border: 0; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }
.x.small { font-size: 20px; }
.badge { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: 2px 7px; border-radius: 99px; background: #efe6d6; color: var(--muted); margin-left: 6px; vertical-align: middle; }
.badge.gold { background: #fbeec0; color: #8a6a00; }
.badge.warn { background: #fde2c8; color: #9a4a00; }
.pill { font-size: 12.5px; font-weight: 700; color: var(--muted); background: #f3ead9; padding: 3px 10px; border-radius: 99px; }
.err { color: var(--red); font-weight: 700; margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }

/* ---------- home ---------- */
.home { min-height: 100vh; display: flex; flex-direction: column; padding-inline: 16px; }
.home-head { display: flex; align-items: center; justify-content: space-between; max-width: 1040px; width: 100%; margin: 0 auto; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.wordmark { font-weight: 800; font-size: 24px; letter-spacing: -.02em; }
.wordmark span { color: var(--red); }
.brand.small .wordmark { font-size: 18px; }
.home-main { max-width: 1040px; width: 100%; margin: 0 auto; flex: 1; padding-block: 10px 40px; }
.home-main.narrow { max-width: 520px; padding-top: 12vh; }
.hero { padding: 26px 0 26px; }
.hero h1 { font-size: clamp(28px, 5vw, 46px); line-height: 1.08; letter-spacing: -.02em; max-width: 14em; }
.hero p { font-size: 18px; color: var(--muted); margin: 12px 0 0; }
.game-card { display: grid; grid-template-columns: 300px 1fr; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); }
.game-card.solo { grid-template-columns: 1fr; }
.game-art { background: radial-gradient(circle at 50% 40%, #8c2a2e, #3b1012 75%); display: grid; place-items: center; min-height: 240px; position: relative; }
.game-art::after { content: ''; position: absolute; inset: 14px; border: 1px solid rgba(201,162,39,.45); border-radius: 10px; }
.laurel { font-family: var(--display); color: #f1d98a; font-size: 56px; letter-spacing: .12em; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.game-body { padding: 26px; }
.game-body h2 { font-family: var(--display); font-size: 28px; letter-spacing: .04em; }
.game-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.game-body p { line-height: 1.55; }
.field { display: flex; flex-direction: column; gap: 6px; margin: 14px 0; max-width: 360px; }
.field span { font-weight: 700; font-size: 13px; color: var(--muted); }
.field input, .join input { padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.field input:focus, .join input:focus { outline: 2px solid var(--chick); border-color: var(--gold); }
.home-actions { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.join { display: flex; gap: 8px; }
.join input { width: 140px; text-transform: uppercase; letter-spacing: .15em; font-weight: 700; }
.join input::placeholder { letter-spacing: .02em; text-transform: none; font-weight: 600; }
.fine { font-size: 13px; color: var(--muted); margin-top: 14px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.steps div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 10px; align-items: center; font-weight: 700; }
.steps b { background: var(--chick); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 99px; flex: none; }
.home-foot { text-align: center; color: var(--muted); font-size: 13px; padding-block: 20px; }

/* ---------- room / lobby ---------- */
.room { min-height: 100vh; display: flex; flex-direction: column; }
.room.in-game { height: 100vh; overflow: hidden; background: #241a14; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 8px 16px; background: var(--paper); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.in-game .topbar { background: #1c1410; border-color: #3a2a20; color: #f2e6d0; }
.in-game .topbar .wordmark { color: #f2e6d0; }
.in-game .topbar .btn.ghost { color: #f2e6d0; border-color: #4a382b; }
.room-code b { letter-spacing: .12em; }
.gameinfo { color: var(--muted); font-size: 13.5px; text-transform: capitalize; }
.in-game .gameinfo { color: #c8b89f; }
.lobby { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; max-width: 1040px; width: 100%; margin: 0 auto; padding: 20px 16px 40px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.panel h2 { font-size: 17px; margin-bottom: 12px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.panel-head h2 { margin: 0; }
.invite { grid-column: 1 / -1; }
.invite-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.invite-link { font-size: 17px; background: #f6efe1; padding: 10px 14px; border-radius: 10px; border: 1px dashed #d8c7a6; overflow-wrap: anywhere; }
.big-code { letter-spacing: .15em; font-size: 17px; color: var(--ink); }
.plist { list-style: none; margin: 0 0 16px; padding: 0; counter-reset: s; }
.plist li { display: flex; align-items: center; gap: 4px; padding: 9px 10px; border-bottom: 1px solid #f0e7d6; counter-increment: s; }
.plist li::before { content: counter(s); width: 24px; color: var(--muted); font-weight: 700; font-size: 13px; }
.plist li.empty { color: #b9a98f; font-style: italic; }
.plist li.away { opacity: .6; }
.pname .link.small { font-size: 12.5px; margin-left: 8px; }
.rename input { padding: 5px 8px; border: 1px solid var(--gold); border-radius: 8px; width: 100%; max-width: 220px; }
.pname { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.opt { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; line-height: 1.35; }
.opt input[type=checkbox] { margin-top: 3px; flex: none; }
.opt.sel { align-items: center; flex-wrap: wrap; }
.opt select { padding: 7px; border-radius: 8px; border: 1px solid var(--line); max-width: 100%; }
.chat { display: flex; flex-direction: column; }
.chat-log { flex: 1; min-height: 140px; max-height: 260px; overflow-y: auto; font-size: 14px; display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.chat-log .sys { color: var(--muted); font-style: italic; font-size: 13px; }
.chat-in { display: flex; gap: 8px; }
.chat-in input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.chat.compact { background: transparent; border: 0; box-shadow: none; padding: 8px; flex: 1; min-height: 0; color: #eadcc4; }
.chat.compact .chat-log { max-height: none; }
.chat.compact .chat-log .sys { color: #a8977e; }
.chat.compact input { background: #2d221b; border-color: #4a382b; color: #f2e6d0; }

/* ---------- modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 12, 8, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { background: var(--paper); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); color: var(--ink); }
.modal.wide { width: min(980px, 100%); }
.modal.slim { width: min(440px, 100%); }
.modal.rules { width: min(860px, 100%); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 8px; gap: 10px; }
.modal-head h2 { font-size: 19px; }
.modal-body { padding: 8px 18px 18px; overflow-y: auto; }
.modal-body h3 { font-size: 14px; margin: 12px 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 12px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.tabs button.on { color: var(--red); border-color: var(--red); }
.tabs.small { padding: 0 8px; border-color: #3a2a20; }
.tabs.small button { color: #a8977e; font-size: 13px; }
.tabs.small button.on { color: #f1d98a; border-color: #f1d98a; }
.prose { line-height: 1.55; }
.prose h3 { font-size: 15px; margin: 16px 0 6px; color: var(--ink); text-transform: none; letter-spacing: 0; }
.prose ul { padding-left: 20px; margin: 6px 0; }
.ctable { width: 100%; border-collapse: collapse; font-size: 14px; }
.ctable td { padding: 7px 8px; border-bottom: 1px solid #f0e7d6; vertical-align: top; }
.ctable td:first-child { white-space: nowrap; }
.ctable tr.win td { background: #fbf2d2; }
.big-line { font-family: var(--display); font-size: 20px; margin: 4px 0 14px; }
.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.glist h3 { margin-top: 16px; }

/* general card */
.gcard { border: 1px solid var(--line); border-top: 5px solid var(--fc); border-radius: 12px; padding: 12px; background: #fff; color: var(--ink); font-size: 13.5px; }
.gcard.clickable { cursor: pointer; transition: transform .1s, box-shadow .15s; }
.gcard.clickable:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--fc); }
.ghead b { display: block; font-family: var(--display); font-size: 16px; color: var(--fc); }
.gmeta { font-size: 12px; color: var(--muted); font-weight: 700; }
.gcard ul { margin: 8px 0 0; padding-left: 16px; }
.gcard li { margin-bottom: 6px; line-height: 1.4; }
.gcard em { color: var(--muted); font-style: normal; font-size: 12px; }
.gcard.compact { padding: 10px; }

/* ---------- playing cards ---------- */
.card {
  position: relative; width: 94px; height: 136px; border-radius: 10px; border: 1px solid #cdbb98; background: linear-gradient(#fffdf6, #f3e8d2);
  box-shadow: 0 1px 3px rgba(0,0,0,.2); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 18px 4px 8px;
  color: var(--ink); flex: none; text-align: center; transition: transform .12s, box-shadow .12s, opacity .12s; font-family: var(--body); overflow: hidden;
}
.card::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #c9b58e; }
.card.t-trick::after { background: var(--blue); }
.card.t-delayed::after { background: var(--purple); }
.card.t-equip::after { background: var(--green); }
.card.t-basic::after { background: var(--red); }
.card .corner { position: absolute; top: 3px; left: 6px; font-weight: 800; font-size: 12px; line-height: 1.1; }
.card .corner.red { color: #c0262d; }
.card .cart { width: 100%; height: auto; aspect-ratio: 100 / 64; border-radius: 6px; border: 1px solid rgba(58,42,30,.25); display: block; flex: none; }
.card .cname { font-weight: 800; font-size: 12px; line-height: 1.12; margin-top: 5px; padding: 0 2px; }
.card .ctype { font-size: 10px; color: var(--muted); margin-top: 2px; }
.card.clickable { cursor: pointer; }
.card:disabled { cursor: default; }
.card.usable { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(246, 201, 69, .85), 0 3px 10px rgba(0,0,0,.25); }
.card.usable:hover { transform: translateY(-5px); }
.card.sel { transform: translateY(-14px); box-shadow: 0 0 0 3px var(--red), 0 10px 18px rgba(0,0,0,.35); }
.card.dim { opacity: .5; }
.card.small { width: 70px; height: 102px; padding: 15px 3px 6px; }
.card.small .cname { font-size: 10.5px; margin-top: 3px; }
.card.small .corner { font-size: 10.5px; }
.card.back { background: repeating-linear-gradient(45deg, #7c2327, #7c2327 6px, #6a1c20 6px, #6a1c20 12px); border-color: #4a1114; justify-content: center; }
.card.back::after { display: none; }
.back-mark { font-family: var(--display); color: #f1d98a; font-size: 13px; letter-spacing: .1em; }
.cardrow { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }

/* large card (hover preview, rules) */
.card-big { background: linear-gradient(#fffdf6, #f1e5cd); border: 1px solid #c9b58e; border-radius: 14px; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.45); color: var(--ink); border-bottom: 7px solid #c9b58e; }
.card-big.t-trick { border-bottom-color: var(--blue); }
.card-big.t-delayed { border-bottom-color: var(--purple); }
.card-big.t-equip { border-bottom-color: var(--green); }
.card-big.t-basic { border-bottom-color: var(--red); }
.cb-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.cb-head b { font-family: var(--display); font-size: 17px; }
.cb-head .red { color: #c0262d; font-weight: 800; }
.cb-head .black { font-weight: 800; }
.cb-art { width: 100%; height: auto; border-radius: 8px; border: 1px solid rgba(58,42,30,.25); display: block; }
.cb-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--muted); margin: 8px 0 4px; }
.cb-text { margin: 0 0 8px; font-size: 14px; line-height: 1.4; font-weight: 600; }
.cb-flavor { margin: 0; font-size: 12.5px; line-height: 1.35; font-style: italic; color: #6b5a48; border-top: 1px solid #e3d5bb; padding-top: 7px; }
.hover-preview { position: fixed; z-index: 60; pointer-events: none; animation: previewIn .12s ease-out; }
@keyframes previewIn { from { opacity: 0; transform: translateY(6px); } }
.art-cell { width: 84px; }
.rule-art { width: 76px; height: auto; border-radius: 6px; border: 1px solid rgba(58,42,30,.2); display: block; }
.flavor { font-style: italic; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.pdesc { display: block; font-weight: 600; font-size: 13px; color: #5a4a3a; margin-top: 3px; }

/* ---------- game table ---------- */
.table-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.table-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.felt { position: relative; flex: 1; min-height: 340px; background: radial-gradient(ellipse at 50% 45%, var(--felt1), var(--felt2) 70%); margin: 10px 10px 0; border-radius: 26px; box-shadow: inset 0 0 0 2px #7d5a2e, inset 0 0 60px rgba(0,0,0,.45); overflow: hidden; }
.seats { position: absolute; inset: 0; }
.seat {
  position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); width: 172px; background: #fbf3e2; border-radius: 12px;
  padding: 8px 9px 9px; min-width: 0; box-shadow: 0 4px 14px rgba(0,0,0,.35); cursor: pointer; border: 2px solid transparent; transition: box-shadow .15s, border-color .15s, transform .15s; color: var(--ink);
}
.seat.turn { border-color: var(--chick); box-shadow: 0 0 0 3px rgba(246, 201, 69, .5), 0 4px 14px rgba(0,0,0,.35); }
.seat.candidate { border-color: #ffd966; box-shadow: 0 0 0 4px rgba(255, 217, 102, .75), 0 4px 16px rgba(0,0,0,.4); }
.seat.candidate:hover { transform: translate(-50%, -52%); }
.seat.selected { border-color: var(--red); box-shadow: 0 0 0 4px rgba(155, 34, 38, .85), 0 4px 16px rgba(0,0,0,.4); }
.seat.dead { filter: grayscale(.85); opacity: .7; }
.seat-head { display: flex; align-items: center; gap: 4px; border-left: 4px solid #ccc; padding-left: 6px; min-width: 0; }
.seat .role-badge { position: absolute; top: -9px; right: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.seat-name { font-weight: 800; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-tag { font-size: 10px; font-weight: 800; color: var(--muted); background: #eee3cf; border-radius: 6px; padding: 0 5px; margin-left: 4px; text-transform: uppercase; }
.seat-gen { font-family: var(--display); font-weight: 700; font-size: 13px; margin: 3px 0 4px 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-stats { display: flex; justify-content: space-between; align-items: center; margin-left: 10px; }
.handcount { font-weight: 800; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.handcount::before { content: ''; width: 11px; height: 15px; border-radius: 2px; background: #7c2327; display: inline-block; box-shadow: 2px -2px 0 #b98a5a; }
.seat-equip { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.chip { font-size: 10.5px; font-weight: 700; background: #e8f1e9; color: #245c3c; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }
.chip.judge { background: #f0e4f5; color: #5e2a74; }
.dead-mark { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--display); font-size: 18px; color: #fff; background: rgba(40, 30, 25, .45); border-radius: 10px; letter-spacing: .1em; pointer-events: none; }
.timer { height: 4px; background: #e9dcc3; border-radius: 4px; margin-top: 6px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--gold); transition: width .25s linear; }
.seat.waiting::after { content: '…'; position: absolute; bottom: -10px; right: -6px; background: var(--chick); color: var(--ink); font-weight: 900; border-radius: 99px; width: 24px; height: 24px; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0,0,0,.3); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { transform: scale(1.15); } }
.target-no { position: absolute; top: -10px; left: -8px; background: var(--red); color: #fff; font-weight: 900; border-radius: 99px; width: 22px; height: 22px; display: grid; place-items: center; font-size: 12px; }
.role-badge { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 99px; background: #eee; white-space: nowrap; }
.role-badge.small { font-size: 9.5px; padding: 1px 6px; }
.r-emperor { background: #f6d77a; color: #5a4300; }
.r-praetorian { background: #cfe0f5; color: #1f4c80; }
.r-conspirator { background: #f3c9c9; color: #7a1a1d; }
.r-usurper { background: #dccdf0; color: #4a2a74; }
.hp { display: inline-flex; gap: 3px; }
.hp i { width: 10px; height: 10px; border-radius: 99px; background: #e2d4bc; box-shadow: inset 0 -1px 0 rgba(0,0,0,.15); }
.hp.ok i.on { background: #3aa655; }
.hp.low i.on { background: #e0a800; }
.hp.crit i.on { background: #d33a3a; }

.center { position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: min(56%, 460px); pointer-events: none; }
.center > * { pointer-events: auto; }
.piles { display: flex; gap: 12px; }
.pile { width: 56px; height: 76px; border-radius: 8px; background: repeating-linear-gradient(45deg, #7c2327, #7c2327 5px, #6a1c20 5px, #6a1c20 10px); border: 1px solid #c9a227; color: #f1d98a; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.pile span { font-size: 18px; font-weight: 800; }
.pile.discard { background: rgba(255,255,255,.08); border-style: dashed; }
.played { background: rgba(0,0,0,.25); border-radius: 12px; padding: 8px 10px; text-align: center; max-width: 100%; }
.played-label { color: #f1d98a; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; }
.played-cards { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.waiting-note { color: #eadcc4; font-size: 13px; background: rgba(0,0,0,.25); padding: 6px 12px; border-radius: 99px; text-align: center; }

.me-area { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.me-info { background: #fbf3e2; border-radius: 12px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; border: 2px solid transparent; }
.me-info.turn { border-color: var(--chick); }
.me-info.candidate { border-color: #ffd966; box-shadow: 0 0 0 3px rgba(255, 217, 102, .7); cursor: pointer; }
.me-info.selected { border-color: var(--red); }
.me-info.dead { opacity: .7; }
.me-top { display: flex; align-items: center; gap: 10px; }
.me-gen { font-family: var(--display); font-weight: 700; font-size: 16px; }
.skills summary { cursor: pointer; font-weight: 700; font-size: 13px; color: var(--red); }
.skills[open] { flex-basis: 100%; order: 3; }
.skills .gcard { margin-top: 6px; }
.me-equip { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.prompt { background: #fbf3e2; border-radius: 12px; padding: 10px 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--ink); }
.prompt.idle { background: rgba(255,255,255,.08); color: #d9c9ae; }
.prompt.mine { background: #fff7d6; border: 2px solid var(--chick); box-shadow: 0 0 0 4px rgba(246, 201, 69, .25); }
.ptext { font-weight: 700; flex: 1 1 260px; }
.pbtns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.countdown { font-weight: 900; font-variant-numeric: tabular-nums; background: var(--ink); color: #fff; border-radius: 99px; padding: 2px 9px; font-size: 13px; }
.countdown.urgent { background: var(--red); animation: pulse 1s infinite; }
.hand { display: flex; gap: 6px; flex-wrap: wrap; padding: 16px 4px 4px; min-height: 156px; align-items: flex-end; }
.hand .muted { color: #a8977e; }
.side { background: #1c1410; border-left: 1px solid #3a2a20; display: flex; flex-direction: column; min-height: 0; }
.log { flex: 1; overflow-y: auto; padding: 10px 12px; font-size: 13px; line-height: 1.45; color: #e6d7bd; display: flex; flex-direction: column; gap: 3px; }
.log .turn-line { color: #f1d98a; font-weight: 700; margin-top: 6px; }
.log .death { color: #ff9a9a; font-weight: 700; }
.arrange { display: flex; gap: 12px; flex-wrap: wrap; margin: 10px 0 16px; }
.arr-item { display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 8px; border-radius: 10px; background: #f6efe1; }
.arr-item.bottomed { opacity: .6; }
.arr-ctl { display: flex; gap: 4px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .table-wrap { grid-template-columns: minmax(0, 1fr) 240px; }
  .seat { width: 140px; }
}
@media (max-width: 820px) {
  .game-card { grid-template-columns: 1fr; }
  .game-art { min-height: 120px; }
  .laurel { font-size: 40px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .lobby { grid-template-columns: 1fr; }
  .room.in-game { height: auto; min-height: 100vh; overflow: visible; }
  .table-wrap { grid-template-columns: 1fr; }
  .felt { position: static; min-height: 0; padding: 10px; margin: 8px 8px 0; border-radius: 18px; }
  .seats { position: static; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
  .seat { position: relative; left: auto; top: auto; transform: none; width: auto; min-width: 0; }
  .seat.candidate:hover { transform: none; }
  .center { position: static; transform: none; width: 100%; margin-top: 10px; }
  .side { height: 260px; border-left: 0; border-top: 1px solid #3a2a20; }
  .hand { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; }
  .prompt.mine { position: sticky; bottom: 8px; z-index: 20; box-shadow: 0 0 0 4px rgba(246, 201, 69, .25), 0 8px 24px rgba(0,0,0,.45); }
  .card { width: 84px; height: 124px; }
}
@media (max-width: 420px) {
  .seats { grid-template-columns: 1fr 1fr; }
  .gameinfo { display: none; }
}

/* ---------- animations ---------- */
.fx-layer { position: fixed; inset: 0; pointer-events: none; z-index: 45; overflow: hidden; }
.fx-fly { position: fixed; left: 0; top: 0; animation-name: fxFly; animation-timing-function: cubic-bezier(.2,.8,.2,1); animation-fill-mode: forwards; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fx-fly .card { width: 112px; height: 162px; padding-top: 20px; box-shadow: 0 0 0 3px rgba(246,201,69,.9), 0 0 36px 8px rgba(246,201,69,.55), 0 18px 30px rgba(0,0,0,.45); }
.fx-fly .card .cname { font-size: 13.5px; }
@keyframes fxFly {
  0% { transform: translate(calc(var(--fx) - 50%), calc(var(--fy) - 50%)) scale(.45) rotate(-8deg); opacity: 0; }
  12% { opacity: 1; }
  40% { transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(1.18) rotate(0deg); }
  78% { transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(1.12); opacity: 1; }
  100% { transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(.9); opacity: 0; }
}
.fx-fly.stay { animation-name: fxEquip; }
@keyframes fxEquip {
  0% { transform: translate(calc(var(--fx) - 50%), calc(var(--fy) - 50%)) scale(.5); opacity: 0; }
  20% { opacity: 1; transform: translate(calc(var(--fx) - 50%), calc(var(--fy) - 90%)) scale(1.1); }
  70% { transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(.7); opacity: 1; }
  100% { transform: translate(calc(var(--tx) - 50%), calc(var(--ty) - 50%)) scale(.3); opacity: 0; }
}
.fx-label { background: rgba(28,20,16,.88); color: #f6e3a8; font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 99px; white-space: nowrap; box-shadow: 0 4px 12px rgba(0,0,0,.35); }
.fx-beam { position: fixed; height: 5px; margin-top: -2.5px; transform-origin: 0 50%; border-radius: 99px; animation: fxBeam ease-out forwards; }
.fx-beam.tone-red { background: linear-gradient(90deg, rgba(255,210,120,.1), #ff6a3d 60%, #fff3c4); box-shadow: 0 0 14px 3px rgba(255,90,50,.7); }
.fx-beam.tone-green { background: linear-gradient(90deg, rgba(200,255,200,.1), #6fdc7c 60%, #eaffea); box-shadow: 0 0 14px 3px rgba(80,220,120,.6); }
.fx-beam.tone-blue { background: linear-gradient(90deg, rgba(200,220,255,.1), #6fa8ff 60%, #eef4ff); box-shadow: 0 0 14px 3px rgba(90,150,255,.6); }
.fx-beam.tone-gold { background: linear-gradient(90deg, rgba(255,240,180,.1), #f6c945 60%, #fffbe6); box-shadow: 0 0 14px 3px rgba(246,201,69,.6); }
.fx-beam.tone-purple { background: linear-gradient(90deg, rgba(230,200,255,.1), #b57be0 60%, #f7ecff); box-shadow: 0 0 14px 3px rgba(170,100,230,.6); }
@keyframes fxBeam { 0% { clip-path: inset(0 100% 0 0); opacity: 1; } 55% { clip-path: inset(0 0 0 0); opacity: 1; } 100% { clip-path: inset(0 0 0 70%); opacity: 0; } }
.fx-impact { position: fixed; width: 0; height: 0; }
.fx-art { position: absolute; left: -44px; top: -30px; width: 88px; animation: fxPop cubic-bezier(.2,1.4,.4,1) forwards; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.fx-art svg { width: 88px; height: auto; border-radius: 10px; border: 2px solid rgba(255,255,255,.85); display: block; }
@keyframes fxPop { 0% { transform: scale(.2) rotate(-25deg); opacity: 0; } 25% { transform: scale(1.25) rotate(4deg); opacity: 1; } 45% { transform: scale(1) rotate(0); } 80% { opacity: 1; } 100% { transform: scale(.85) translateY(-12px); opacity: 0; } }
.fx-ring { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 99px; border: 4px solid; animation: fxRing ease-out forwards; }
.tone-red .fx-ring { border-color: #ff6a3d; }
.tone-green .fx-ring { border-color: #6fdc7c; }
.tone-blue .fx-ring { border-color: #6fa8ff; }
.tone-gold .fx-ring { border-color: #f6c945; }
.tone-purple .fx-ring { border-color: #b57be0; }
@keyframes fxRing { 0% { transform: scale(.3); opacity: 1; } 70% { opacity: .6; } 100% { transform: scale(2.4); opacity: 0; } }
.fx-num { position: fixed; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700; font-size: 44px; animation: fxNum ease-out forwards; text-shadow: 0 3px 0 rgba(0,0,0,.35), 0 0 16px rgba(0,0,0,.4); }
.fx-num.red { color: #ff5a4a; }
.fx-num.green { color: #7cf08a; }
@keyframes fxNum { 0% { transform: translate(-50%, -20%) scale(.4); opacity: 0; } 20% { transform: translate(-50%, -60%) scale(1.3); opacity: 1; } 70% { opacity: 1; } 100% { transform: translate(-50%, -170%) scale(1); opacity: 0; } }
.fx-skill { position: fixed; transform: translate(-50%, -50%); background: linear-gradient(#fff4c8, #f1c94a); color: #3a2400; font-weight: 900; font-family: var(--display); font-size: 16px; padding: 6px 14px; border-radius: 10px; border: 2px solid #8a6a00; white-space: nowrap; box-shadow: 0 6px 18px rgba(0,0,0,.45); animation: fxSkill ease-out forwards; }
@keyframes fxSkill { 0% { transform: translate(-50%, 10%) scale(.6); opacity: 0; } 15% { transform: translate(-50%, -80%) scale(1.1); opacity: 1; } 75% { transform: translate(-50%, -95%) scale(1); opacity: 1; } 100% { transform: translate(-50%, -140%); opacity: 0; } }
.fx-banner { position: fixed; left: 50%; top: 38%; transform: translate(-50%, -50%); background: linear-gradient(90deg, transparent, rgba(20,10,8,.92) 15%, rgba(20,10,8,.92) 85%, transparent); color: #f6e3a8; padding: 16px 90px; text-align: center; animation: fxBanner ease-out forwards; white-space: nowrap; }
.fx-banner b { display: block; font-family: var(--display); font-size: 30px; letter-spacing: .06em; }
.fx-banner span { display: block; font-size: 15px; color: #e6d2b0; margin-top: 4px; }
@keyframes fxBanner { 0% { opacity: 0; transform: translate(-50%, -50%) scaleX(.3); } 12% { opacity: 1; transform: translate(-50%, -50%) scaleX(1); } 85% { opacity: 1; } 100% { opacity: 0; } }
.fx-stamp { position: fixed; left: 50%; top: 45%; font-family: var(--display); font-weight: 700; font-size: 84px; color: #c8262d; border: 8px solid #c8262d; padding: 0 26px; border-radius: 14px; background: rgba(255,248,235,.85); letter-spacing: .12em; animation: fxStamp ease-out forwards; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
@keyframes fxStamp { 0% { transform: translate(-50%, -50%) scale(3) rotate(-14deg); opacity: 0; } 22% { transform: translate(-50%, -50%) scale(.95) rotate(-10deg); opacity: 1; } 32% { transform: translate(-50%, -50%) scale(1.05) rotate(-10deg); } 80% { opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1) rotate(-10deg); opacity: 0; } }
.fx-flash { position: fixed; inset: 0; background: radial-gradient(circle, rgba(255,255,255,.95), rgba(220,220,255,.6)); animation: fxFlash ease-out forwards; }
@keyframes fxFlash { 0% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: .2; } 24% { opacity: .9; } 100% { opacity: 0; } }
.fx-judge { position: fixed; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 8px; animation: fxFade ease-out forwards; }
.fx-judge-card { animation: fxFlip ease-out forwards; perspective: 600px; }
.fx-judge .card { width: 104px; height: 150px; box-shadow: 0 0 0 3px rgba(181,123,224,.9), 0 0 30px 6px rgba(181,123,224,.5); }
@keyframes fxFlip { 0% { transform: rotateY(90deg) scale(.7); } 30% { transform: rotateY(0) scale(1.1); } 45% { transform: scale(1); } 100% { transform: scale(1); } }
@keyframes fxFade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.fx-hit { animation: seatHit .65s ease-out; }
.seat.fx-hit, .me-info.fx-hit { box-shadow: 0 0 0 4px rgba(255,70,50,.9), 0 0 30px 6px rgba(255,60,40,.6) !important; }
@keyframes seatHit { 0%, 100% { translate: 0 0; } 15% { translate: -7px 2px; } 30% { translate: 6px -2px; } 45% { translate: -5px 1px; } 60% { translate: 4px 0; } 75% { translate: -2px 0; } }
.seat.fx-heal, .me-info.fx-heal { box-shadow: 0 0 0 4px rgba(110,220,125,.9), 0 0 30px 8px rgba(110,220,125,.55) !important; transition: box-shadow .2s; }
.seat.fx-targeted, .me-info.fx-targeted { box-shadow: 0 0 0 4px rgba(255,160,60,.95), 0 0 24px 6px rgba(255,120,40,.5) !important; }
.fx-death { animation: seatDeath 1.6s ease-out; }
@keyframes seatDeath { 0% { filter: none; } 30% { filter: brightness(2) saturate(0); } 100% { filter: grayscale(.85); } }
.felt.fx-shake { animation: feltShake .6s ease-in-out; }
@keyframes feltShake { 0%, 100% { translate: 0 0; } 20% { translate: -6px 3px; } 40% { translate: 5px -3px; } 60% { translate: -4px 2px; } 80% { translate: 3px -1px; } }
@media (max-width: 820px) {
  .fx-fly .card { width: 92px; height: 134px; }
  .fx-banner { padding: 12px 40px; }
  .fx-banner b { font-size: 22px; }
  .fx-stamp { font-size: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .fx-hit, .felt.fx-shake, .fx-death { animation: none; }
}

.spied { font-size: 13px; margin-left: 2px; }
.reveal-row { margin: 10px 0 12px; }

/* ---------- how-to-play guide ---------- */
.guide { background: var(--cream); min-height: 100vh; }
.guide-head { padding-inline: 16px; }
.guide-hero { background: radial-gradient(ellipse at 30% 20%, #8c2a2e, #3b1012 70%); color: #f6e7c8; padding-inline: 16px; }
.guide-hero-inner { max-width: 1120px; margin: 0 auto; padding-block: 44px 40px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; font-size: 13px; color: #f1d98a; margin: 0 0 6px; }
.guide-hero h1 { font-family: var(--display); font-size: clamp(44px, 9vw, 84px); letter-spacing: .12em; color: #f1d98a; line-height: 1; }
.lede { font-size: clamp(16px, 2.2vw, 19px); line-height: 1.55; max-width: 40em; margin: 16px 0 22px; color: #f3e6cc; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-facts span { background: rgba(255,255,255,.1); border: 1px solid rgba(241,217,138,.35); border-radius: 99px; padding: 6px 14px; font-size: 14px; }
.hero-facts b { color: #f1d98a; }
.guide-body { max-width: 1120px; margin: 0 auto; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; padding: 28px 16px 40px; }
.toc { position: sticky; top: 16px; align-self: start; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 12px; color: var(--muted); text-decoration: none; font-weight: 700; font-size: 14px; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--red); border-left-color: var(--red); }
.toc-cta { margin-top: 18px; width: 100%; }
.toc-mobile { display: none; }
.guide-main { min-width: 0; }
.gsec { padding-bottom: 34px; margin-bottom: 34px; border-bottom: 1px solid var(--line); scroll-margin-top: 16px; }
.gsec h2 { font-family: var(--display); font-size: 28px; margin-bottom: 12px; letter-spacing: .02em; }
.gsec h3 { font-size: 17px; margin: 22px 0 8px; }
.gsec p, .gsec li { line-height: 1.6; }
.gsec > p { max-width: 46em; }
.quick { padding-left: 22px; }
.quick li { margin-bottom: 8px; }
.roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 14px; }
.rolecard { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); }
.rolecard p { margin: 8px 0 0; }
.rc-head { display: flex; justify-content: space-between; align-items: center; }
.r-emperor-bg { border-top: 5px solid #e0b54a; }
.r-praetorian-bg { border-top: 5px solid #5a8fd0; }
.r-conspirator-bg { border-top: 5px solid #c8474b; }
.r-usurper-bg { border-top: 5px solid #8a5fc0; }
.table-scroll { overflow-x: auto; }
.gtable { border-collapse: collapse; min-width: 420px; background: var(--paper); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.gtable th, .gtable td { padding: 9px 16px; text-align: center; border-bottom: 1px solid #f0e7d6; }
.gtable th { background: #f3ead9; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.steps-v { display: grid; gap: 10px; }
.steps-v > div { display: flex; gap: 14px; align-items: flex-start; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.steps-v b { background: var(--chick); width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 99px; }
.steps-v p { margin: 3px 0 0; }
.phases { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin: 14px 0 18px; }
.phase { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; position: relative; font-size: 13.5px; line-height: 1.4; }
.phase b { font-family: var(--display); font-size: 16px; }
.phase .pn { font-weight: 900; color: var(--muted); font-size: 12px; }
.phase.hi { background: #fff4cf; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246, 201, 69, .3); }
.callouts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-top: 12px; }
.callout { background: var(--paper); border: 1px solid var(--line); border-left: 4px solid var(--red); border-radius: 12px; padding: 12px 16px; }
.callout h4 { margin: 0 0 6px; font-size: 15px; }
.callout p { margin: 0; font-size: 14.5px; }
.callout.wide { margin-top: 20px; }
.callout ul { margin: 0; padding-left: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 7px 14px; font-weight: 700; cursor: pointer; color: var(--ink); border-bottom: 3px solid var(--fc, var(--line)); }
.chips button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cgroup { margin-top: 18px; }
.cgroup > p { margin: 0 0 12px; }
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.gcardtile { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border-bottom: 5px solid #c9b58e; }
.gcardtile.t-basic { border-bottom-color: var(--red); }
.gcardtile.t-trick { border-bottom-color: var(--blue); }
.gcardtile.t-delayed { border-bottom-color: var(--purple); }
.gcardtile.t-equip { border-bottom-color: var(--green); }
.gct-art { width: 100%; height: auto; display: block; border-bottom: 1px solid var(--line); }
.gct-body { padding: 10px 14px 12px; }
.gct-head { display: flex; justify-content: space-between; align-items: baseline; }
.gct-head b { font-family: var(--display); font-size: 17px; }
.count { font-weight: 800; color: var(--muted); font-size: 13px; }
.gct-type { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 2px 0 6px; }
.gct-body p { margin: 0 0 6px; font-size: 14px; line-height: 1.45; }
.gct-body .gct-flavor { font-style: italic; color: #6b5a48; font-size: 13px; margin: 0; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.diagram { margin: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { font-size: 13.5px; color: var(--muted); margin-top: 6px; line-height: 1.45; }
.flow { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.flow-step { flex: 1 1 180px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.flow-step b { font-family: var(--display); font-size: 18px; }
.flow-step span { font-size: 14px; line-height: 1.45; }
.flow-step.dark { background: #2b2118; color: #f3e6cc; border-color: #2b2118; }
.flow-arrow { align-self: center; font-size: 22px; color: var(--muted); }
.controls { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 6px 18px 12px; box-shadow: var(--shadow); }
.controls dl { margin: 0; }
.controls dt { font-weight: 800; margin-top: 10px; }
.controls dd { margin: 2px 0 0; font-size: 14.5px; line-height: 1.45; }
.gsec details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.gsec summary { font-weight: 800; cursor: pointer; }
.gsec details p { margin: 8px 0 0; }
.guide-cta { text-align: center; padding: 10px 0 20px; }
.guide-cta h2 { font-family: var(--display); font-size: 30px; margin-bottom: 14px; }
.guide-link { margin-left: auto; margin-right: 8px; font-size: 13.5px; text-decoration: none; }
.home-foot a, .fine a { color: var(--red); font-weight: 700; }
@media (max-width: 900px) {
  .guide-body { grid-template-columns: 1fr; gap: 0; padding-top: 12px; }
  .toc { display: none; }
  .toc-mobile { display: flex; gap: 6px; overflow-x: auto; position: sticky; top: 0; z-index: 10; background: var(--cream); padding: 10px 16px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
  .toc-mobile button { flex: none; border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 6px 12px; font-weight: 700; font-size: 13px; color: var(--ink); }
  .toc-mobile button.on { background: var(--red); color: #fff; border-color: var(--red); }
  .gsec { scroll-margin-top: 64px; }
  .phases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .flow-arrow { transform: rotate(90deg); flex-basis: 100%; text-align: center; }
}

/* ---------- equipment shown to everyone ---------- */
.card-chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 5px 1px 2px; max-width: 100%; cursor: help; }
.chip-art { width: 20px; height: 13px; border-radius: 3px; border: 1px solid rgba(58,42,30,.3); flex: none; }
.chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip-suit { font-weight: 800; opacity: .75; }
.chip-suit.red { color: #c0262d; }
.equip-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0 10px; }
.equip-row p { margin: 3px 0 0; line-height: 1.4; }
.equip-row .card { cursor: default; }

/* ---------- multi-game library ---------- */
.library { background: #fbf6ec; font-size: 16px; }
.library .home-head, .library .home-main { max-width: 1240px; }
.library-head-note { color: var(--muted); font-size: 14px; }
.library-intro { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 24px 0; }
.library-intro h1 { font-size: clamp(30px, 4.5vw, 48px); letter-spacing: -.04em; line-height: 1.1; }
.library-intro p:not(.library-kicker) { color: var(--muted); margin: 10px 0 0; }
.library-kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--red); margin: 0 0 8px; }
.no-signup { padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; white-space: nowrap; }
.join-bar { background: var(--paper); border-block: 1px solid var(--line); display: flex; align-items: end; justify-content: space-between; gap: 24px; padding: 16px 20px; margin-bottom: 26px; }
.join-bar .field { margin: 0; width: 290px; }
.join-bar .field span, .join-bar form > label { font-size: 14px; font-weight: 800; color: var(--muted); display: block; margin-bottom: 4px; }
.join-bar input { font-size: 16px; }
.library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.library-card { border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--paper); box-shadow: 0 3px 0 #e7dcc8; display: flex; flex-direction: column; }
.cover-link { position: relative; display: block; overflow: hidden; text-decoration: none; aspect-ratio: 2.65; background: var(--game-color); }
.game-cover { width: 100%; height: 100%; object-fit: cover; object-position: center 46%; display: block; transition: transform .3s; }
.cover-link:hover .game-cover { transform: scale(1.025); }
.cover-category { position: absolute; bottom: 12px; left: 16px; background: #fffdf8; color: var(--ink); padding: 4px 10px; border-radius: 5px; font-size: 13px; font-weight: 800; box-shadow: 0 1px 8px #0002; }
.ides-cover { background: linear-gradient(125deg, #481014, #9b2226); color: #f1d98a; height: 100%; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; border: 12px double #aa8038; }
.ides-title { font-family: var(--display); font-size: clamp(34px, 6vw, 68px); line-height: 1; letter-spacing: .22em; margin-left: .22em; }
.ides-cover-rule { font-size: 12px; letter-spacing: .18em; }
.library-card-body { padding: 20px 22px; display: flex; flex: 1; flex-direction: column; }
.library-card-heading { display: flex; align-items: center; gap: 10px; }
.library-card h2 { font-size: 25px; font-weight: 800; letter-spacing: -.04em; }
.new-game { border: 1px solid var(--game-color); color: var(--game-color); font-size: 12px; padding: 2px 5px; border-radius: 4px; font-weight: 800; }
.game-hook { color: var(--game-color); font-weight: 800; margin: 6px 0; }
.game-description { color: var(--muted); line-height: 1.5; margin: 4px 0 14px; font-size: 16px; flex: 1; }
.game-facts { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 700; }
.library-card-actions { display: flex; align-items: center; gap: 20px; margin-top: 18px; }
.library-card-actions .primary { background: var(--game-color); border-color: var(--game-color); padding: 10px 18px; font-size: 16px; }
.library-card-actions a { color: var(--game-color); font-size: 14px; font-weight: 800; }
.library-card-actions .primary:hover { filter: brightness(.92); background: var(--game-color); }
.library-grid.single { grid-template-columns: 1fr; }
.library-grid.single .library-card { display: grid; grid-template-columns: 1fr 1fr; }
.library-grid.single .cover-link { height: 100%; min-height: 260px; aspect-ratio: auto; }
.library-help { text-align: center; color: var(--muted); font-size: 14px; margin: 26px 0 0; }
.build-label { font-size: 12px; }
.detail-rules { margin-top: 30px; padding: 28px; }
.room-game-name { font-weight: 800; color: var(--red); }
.in-game .room-game-name { color: #f1d98a; }
.lobby-game-summary { font-size: 16px; color: var(--muted); }
.lobby-game-summary span { margin-left: 12px; font-size: 14px; }
.lobby .small, .lobby .tiny { font-size: 14px; }
.family-rules-dialog { color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; width: min(760px, calc(100% - 28px)); max-height: 88vh; padding: 24px; font-size: 16px; }
.family-rules-dialog::backdrop { background: #17110ec4; }
.family-rules-dialog .modal-head { padding: 0 0 18px; gap: 20px; align-items: start; }
.family-rules-dialog h2 { font-size: 24px; }
.family-instructions { line-height: 1.65; }
.family-instructions > ol { padding-left: 26px; }
.family-instructions > ol > li { margin: 22px 0; padding-left: 6px; }
.family-instructions h3 { font-size: 18px; }
.family-instructions p { margin: 6px 0; }
.rules-goal { font-size: 18px; font-weight: 700; }
.rules-tips { background: #f5ecda; padding: 18px; border-radius: 12px; }
.rules-tips ul { margin-bottom: 0; padding-left: 22px; }
.family-instructions > .muted { font-size: 14px; margin-top: 22px; }
.family-guide { max-width: 780px !important; padding-top: 30px; }
.family-guide h1 { font-size: clamp(30px, 5vw, 44px); }

/* ---------- family game tables ---------- */
.family-room { font-size: 16px; background: #f6f2e8; }
.family-room .topbar { position: sticky; top: 0; z-index: 15; }
.family-room .btn.tiny { font-size: 14px; padding: 7px 12px; }
.family-table { width: 100%; max-width: 1440px; margin: 0 auto; padding: 22px; }
.family-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.family-heading img { border-radius: 10px; object-fit: cover; flex: none; }
.family-heading h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.04em; }
.family-heading .library-kicker { color: var(--game-color); margin-bottom: 3px; }
.round-count { margin-left: auto; font-size: 16px; white-space: nowrap; }
.round-count b { font-size: 26px; color: var(--game-color); }
.family-prompt { display: flex; align-items: center; gap: 16px; background: var(--game-color); color: white; border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.family-prompt > div { flex: 1; }
.family-prompt strong { display: block; font-size: 17px; }
.family-prompt div > span { display: block; font-size: 14px; opacity: .92; margin-top: 4px; }
.family-prompt .primary { background: white; border-color: white; color: var(--game-color); }
.family-clock { font-weight: 800; font-variant-numeric: tabular-nums; padding: 8px; background: #ffffff25; border-radius: 8px; }
.family-clock.urgent { background: #ffd74f; color: #332b12; }
.family-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 22px; align-items: start; }
.family-play-area, .family-sidebar { min-width: 0; }
.family-sidebar { display: grid; gap: 16px; }
.family-sidebar .panel { box-shadow: none; }
.family-sidebar .chat { min-height: 230px; height: 270px; }
.family-sidebar .chat input { min-width: 0; font-size: 16px; }
.family-sidebar .chat-log { font-size: 14px; }
.family-sidebar .family-history { font-size: 14px; }
.family-history summary, .other-workbenches summary { cursor: pointer; font-weight: 800; }
.family-history ol { list-style: none; padding: 0; margin-bottom: 0; display: flex; flex-direction: column-reverse; }
.family-history li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.5; }
.family-player { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.family-player:last-child { border: 0; }
.family-player > div { flex: 1; min-width: 0; }
.family-player b { font-size: 14px; display: block; overflow-wrap: anywhere; }
.family-player div > span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.family-player.is-you b { color: var(--game-color); }
.player-marker { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: white; font-weight: 800; font-size: 14px; }
.player-score { font-size: 22px; line-height: 1; text-align: right; }
.player-score small { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.family-outcome { background: #e5f3e0; border: 2px solid #74a96c; border-radius: 16px; padding: 22px; margin-bottom: 22px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.family-outcome.try-again { background: #fff0d4; border-color: #c8a75d; }
.family-outcome h2 { font-size: 26px; }
.family-outcome p { margin: 6px 0 0; }
.board-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 14px; }
.board-section-heading h2 { font-size: 21px; }
.board-section-heading > span { font-size: 14px; color: var(--muted); text-align: right; }
.board-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.board-actions p { color: var(--muted); margin: 0; font-size: 14px; line-height: 1.5; }
.family-table .primary { background: var(--game-color); border-color: var(--game-color); }
.family-table .primary:hover:not(:disabled) { background: var(--game-color); filter: brightness(.95); }
.family-table .family-prompt .primary { background: white; color: var(--game-color); }
.family-table .btn { font-size: 14px; min-height: 42px; white-space: normal; }
.family-table .btn.chosen { outline: 2px solid var(--game-color); background: #fff2c7; }
.orchard-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tree-choice { display: flex; flex-direction: column; align-items: center; padding: 20px 12px 16px; border: 2px solid var(--line); border-top: 6px solid var(--fruit-color); border-radius: 16px; background: var(--paper); color: var(--ink); cursor: pointer; font-size: 16px; min-height: 235px; }
.tree-choice:disabled { cursor: default; opacity: 1; }
.tree-choice.selected { outline: 3px solid #d9ac20; border-color: #d9ac20; background: #fff8da; }
.tree-choice:hover:not(:disabled) { box-shadow: var(--shadow); transform: translateY(-2px); }
.tree-fruit { font-size: 58px; line-height: 1.4; }
.tree-choice h3 { font-size: 18px; text-align: center; }
.tree-capacity { font-size: 14px; color: var(--muted); margin: 8px 0; }
.tree-choice-label { margin-top: auto; padding-top: 14px; font-size: 14px; font-weight: 800; color: var(--fruit-color); }
.tree-result { display: flex; flex-direction: column; font-size: 14px; gap: 8px; margin-top: 10px; line-height: 1.4; }
.tree-result strong { color: #346838; }
.crowded .tree-result strong { color: #a02b2d; }
.tree-result small { font-size: 13px; color: var(--muted); }
.basket-panel { margin-top: 12px; }
.basket-row { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.basket-row:last-child { border: 0; }
.basket-row > b { overflow-wrap: anywhere; }
.basket-row > div { display: flex; gap: 14px; flex-wrap: wrap; }
.basket-row > div > span { white-space: nowrap; font-weight: 800; }
.basket-row > span { color: var(--muted); }
.team-progress { display: flex; align-items: center; gap: 24px; margin: 0 0 16px; }
.team-progress strong { color: #087e91; font-size: 32px; }
.team-progress strong span { font-size: 18px; }
.team-progress p { font-size: 14px; color: var(--muted); margin: 2px 0; }
.team-progress > span { font-size: 14px; color: var(--muted); }
.team-progress progress { flex: 1; min-width: 40px; height: 12px; accent-color: #087e91; }
.ripple-board { background: #e4f2f1; border: 1px solid #b5d8d6; border-radius: 18px; padding: 16px; }
.water-inlets, .valve-grid, .garden-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.water-inlets { color: #087e91; text-align: center; font-weight: 800; font-size: 19px; margin-bottom: 10px; }
.valve { position: relative; color: #293d42; background: #fcfffc; border: 1px solid #b5d8d6; border-top: 4px solid var(--owner-color); border-radius: 10px; padding: 8px; min-width: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; }
.valve:disabled { opacity: 1; cursor: default; }
.valve.owned { border-inline: 2px solid var(--owner-color); border-bottom: 2px solid var(--owner-color); }
.valve.selected { outline: 3px solid #d9ac20; background: #fff8d8; }
.valve-label { font-size: 13px; display: flex; justify-content: space-between; gap: 8px; width: 100%; font-weight: 800; }
.valve-label > span { text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color: var(--owner-color); }
.valve-arrow { font-size: 36px; line-height: 1.15; }
.valve-water { font-size: 14px; }
.echo-label { font-size: 12px; color: #74560e; background: #fff0bc; padding: 2px 5px; border-radius: 4px; margin-top: 4px; }
.garden-grid { margin-top: 14px; }
.garden-grid > div { display: flex; flex-direction: column; text-align: center; gap: 4px; border-radius: 10px; background: #fff4da; padding: 12px 4px; font-size: 14px; border: 1px solid #e2c787; }
.garden-grid > .water-met { background: #ecf7dd; border-color: #a9c787; }
.garden-grid b { font-size: 24px; }
.garden-grid small { font-size: 12px; }
.garden-grid .next-demand { border-top: 1px solid #0002; margin-top: 4px; padding-top: 6px; font-weight: 800; }
.flow-caption { margin: 12px 0 0; color: #365f63; font-size: 14px; line-height: 1.45; }
.ripple-controls { margin-top: 18px; }
.ripple-controls p { font-size: 14px; line-height: 1.5; }
.route-choice > div { display: flex; gap: 12px; }
.team-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-top: 8px; gap: 0 16px; }
.team-plans p { margin: 6px 0; }
.parts-market { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.part-tile { display: flex; flex-direction: column; align-items: center; justify-content: start; gap: 5px; padding: 12px 6px; color: var(--ink); background: var(--paper); border: 1px solid #d9c9ac; border-bottom: 4px solid #d9c9ac; border-radius: 10px; font-size: 14px; cursor: pointer; }
.part-tile:disabled { cursor: default; opacity: 1; }
.part-tile:hover:not(:disabled) { border-color: #b75319; background: #fff2da; }
.part-symbol { font-size: 30px; height: 38px; }
.part-tile small { font-size: 12px; color: var(--muted); }
.part-action { font-size: 12px; font-weight: 800; margin-top: auto; padding-top: 6px; color: #9b4513; }
.supply-next { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; color: var(--muted); margin: 14px 0 20px; }
.workbench { margin: 0 0 22px; background: #fff9e9; }
.empty-workbench { grid-column: 1/-1; margin: 12px 0; color: var(--muted); }
.invention-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.invention { display: flex; flex-direction: column; background: var(--paper); border: 1px solid #d9c9ac; border-radius: 12px; padding: 16px; min-width: 0; }
.invention > div { display: flex; align-items: start; gap: 8px; justify-content: space-between; }
.invention h3 { font-size: 17px; }
.invention-points { color: #9b4513; font-weight: 800; font-size: 14px; white-space: nowrap; }
.invention ul { list-style: none; padding: 0; margin: 12px 0; font-size: 14px; flex: 1; }
.invention li { display: flex; align-items: center; gap: 6px; }
.invention li > span { width: 22px; font-size: 22px; text-align: center; }
.invention.buildable { border: 2px solid #819751; background: #fbffe9; }
.invention .btn { padding: 7px; }
.last-build { background: #f5e7cb; padding: 12px 16px; border-radius: 10px; font-size: 14px; }
.other-workbenches { margin-top: 20px; }
.other-workbenches > div { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.other-workbenches h3 { font-size: 16px; }
.other-workbenches p { font-size: 14px; margin: 6px 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
:where(button, a, input, select, summary):focus-visible { outline: 3px solid #a168d0; outline-offset: 3px; }
@media (min-width: 1600px) { .library .home-main, .library .home-head { max-width: 1440px; } }
@media (max-width: 1050px) { .family-layout { grid-template-columns: minmax(0,1fr) 245px; gap: 16px; } .orchard-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .tree-choice { min-height: 210px; } .parts-market { grid-template-columns: repeat(3,minmax(0,1fr)); } .invention-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 800px) { .family-layout { grid-template-columns: 1fr; } .family-sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); } .family-sidebar .family-history { grid-column: 1/-1; } .library-grid { gap: 16px; } .library-card-body { padding: 18px; } .library-card h2 { font-size: 22px; } .library-card-actions { gap: 12px; flex-wrap: wrap; } .library-grid.single .library-card { grid-template-columns: 1fr; } .library-grid.single .cover-link { aspect-ratio: 2.65; min-height: 0; } .no-signup { display: none; } .family-table { padding: 16px; } }
@media (max-width: 580px) { .library-head-note { display: none; } .library-intro { padding: 18px 0; } .library-grid { grid-template-columns: 1fr; } .join-bar { padding: 16px; display: grid; gap: 16px; } .join-bar .field { width: 100%; max-width: none; } .join-bar .join input { flex: 1; min-width: 0; width: 100%; } .library-card-actions { justify-content: space-between; } .cover-link { aspect-ratio: 2.3; } .family-heading { gap: 10px; } .family-heading img { width: 52px; height: 52px; } .family-heading .library-kicker { font-size: 12px; letter-spacing: .03em; } .family-heading h1 { font-size: 23px; } .round-count { font-size: 14px; white-space: normal; text-align: right; } .family-prompt { padding: 14px; flex-wrap: wrap; gap: 12px; } .family-prompt strong { font-size: 16px; } .family-prompt .btn { width: 100%; } .family-sidebar { grid-template-columns: 1fr; } .family-sidebar .family-history { grid-column: auto; } .board-section-heading { align-items: start; } .board-section-heading h2 { font-size: 20px; } .board-section-heading > span { max-width: 45%; } .board-actions { align-items: stretch; flex-direction: column; } .basket-row { grid-template-columns: minmax(0,1fr) auto; } .basket-row > div { gap: 10px; } .basket-row > span { grid-column: 1/-1; } .team-progress { gap: 12px; flex-wrap: wrap; } .team-progress > span { width: 100%; } .team-progress progress { width: 80px; } .ripple-board { padding: 10px; } .valve-grid, .water-inlets, .garden-grid { gap: 6px; } .valve { padding: 7px 4px; } .valve-label { font-size: 12px; gap: 3px; } .garden-grid > div { font-size: 12px; } .team-plans { grid-template-columns: 1fr; } .family-outcome { align-items: stretch; flex-direction: column; } .family-table .family-outcome .btn { width: 100%; } .invention { padding: 12px; } .invention > div { flex-direction: column; } .family-room .topbar { gap: 8px; padding: 8px 12px; } .family-room .room-game-name { display: none; } .family-room .brand.small .wordmark { font-size: 16px; } .family-room .btn.tiny { padding: 7px 8px; } }
@media (prefers-reduced-motion: reduce) { .game-cover { transition: none; } .cover-link:hover .game-cover, .tree-choice:hover:not(:disabled) { transform: none; } }

/* Chicky and Daggers extend the shared game-night table. */
.library-card.chicky .game-cover { object-position: center 45%; }
.library-card.daggers .game-cover { object-position: center 60%; }
.party-table .family-prompt { border-left-color: var(--game-color); }
.party-table .player-marker { background: var(--game-color); }
.party-eyebrow { display: block; font-size: 13px; font-weight: 800; letter-spacing: .07em; margin-bottom: 10px; }
.chicky-summary, .throne-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-radius: 18px; padding: 26px; }
.chicky-summary { background: #ffce4b; color: #3c2911; border: 2px solid #d99a18; }
.chicky-summary h2, .throne-summary h2 { font-size: clamp(24px, 3vw, 34px); margin: 0 0 8px; line-height: 1.1; }
.chicky-summary p, .throne-summary p { margin: 0; }
.flip-counter { text-align: center; font-size: 18px; flex-shrink: 0; }
.flip-counter b { font-size: 38px; }
.flip-counter span { display: block; font-size: 14px; }
.chicky-nest { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px; border: 2px solid #254f8f; border-radius: 18px; background: #eaf1ff; margin: 18px 0; }
.chicky-nest > div:first-child { display: grid; gap: 5px; color: #163e70; }
.chicky-nest strong { font-size: 40px; line-height: 1.1; }
.chicky-nest small { font-size: 14px; }
.chicky-decisions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.chicky-decisions > span { grid-column: 1 / -1; text-align: center; font-size: 14px; color: #304866; }
.chicky .btn.primary { background: #20549b; border-color: #153c71; color: white; }
.roost-button { background: #fff8e8; border-color: #ad7313; color: #714005; }
.flock-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0; }
.flock-card { display: flex; flex-direction: column; gap: 9px; padding: 16px; border: 2px solid #ddcb9e; border-radius: 15px; background: #fffdf5; min-width: 0; }
.flock-card header { display: flex; flex-direction: column; gap: 3px; }
.flock-card header b { overflow-wrap: anywhere; }
.flock-card header span { font-size: 12px; color: #715924; letter-spacing: .06em; }
.flock-card.is-you { box-shadow: 0 0 0 3px #d3e3ff; border-color: #20549b; }
.flock-card.busted { background: #fff0eb; border-color: #d49681; }
.flock-card.roosted { background: #f0f6df; border-color: #97aa66; }
.flip-face { align-self: center; display: grid; place-items: center; font-size: 48px; font-weight: 900; color: #173f72; width: 82px; height: 95px; background: white; border: 2px solid #dedbd0; border-radius: 10px; margin: 4px 0; }
.flock-card > span, .seen-cards { font-size: 14px; color: #625341; }
.seen-cards { margin: auto 0 0; line-height: 1.6; }
.party-reveal h2 { font-size: 20px; margin: 0 0 12px; }
.party-reveal ul { margin: 0 0 16px; padding-left: 22px; }
.party-reveal li { margin: 8px 0; }
.throne-summary { background: #6f1930; border: 2px solid #401327; color: #fff7e5; }
.throne-summary .party-eyebrow { color: #e9c788; overflow-wrap: anywhere; }
.throne-laurels { display: flex; gap: 5px; color: #f3cf78; font-size: 48px; flex-shrink: 0; }
.throne-laurels .lost { color: #a76b7a; text-decoration: line-through; }
.senate-facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.senate-facts span { border: 1px solid #d9c7b0; border-radius: 8px; padding: 7px 11px; font-size: 14px; background: #fffaf0; }
.private-loyalty { display: flex; justify-content: space-between; gap: 16px; align-items: center; border-left: 4px solid #77617d; }
.private-loyalty p { margin: 8px 0 0; line-height: 1.7; }
.private-loyalty .btn { flex-shrink: 0; }
.loyalty-tag { display: inline-block; border-radius: 5px; padding: 3px 7px; font-size: 13px; background: #e7eff9; color: #24476e; }
.loyalty-tag.conspirator { background: #fbe2e5; color: #8b1730; }
.loyalty-tag.emperor { background: #f8e5ad; color: #624007; }
.favor-panel, .daggers-hand, .dagger-evidence { margin-top: 18px; }
.favor-panel p { line-height: 1.6; }
.favor-options { display: flex; flex-wrap: wrap; gap: 10px; }
.favor-options button { white-space: normal; overflow-wrap: anywhere; }
.dagger-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.dagger-card { border: 2px solid #c8b898; border-radius: 14px; background: #fffaf1; padding: 18px 14px; display: flex; flex-direction: column; align-items: center; gap: 12px; font-size: 16px; color: #442c27; min-width: 0; text-align: center; cursor: pointer; }
.dagger-card:disabled { cursor: default; }
.dagger-card.spent { opacity: .5; background: #e9e5dc; }
.dagger-card.selected { border-color: #972341; box-shadow: 0 0 0 3px #edced6; background: #fff0e7; }
.dagger-symbol { font-size: 42px; line-height: 1.2; }
.dagger-card b { font-size: 22px; }
.dagger-card > span:not(.dagger-symbol) { font-size: 14px; line-height: 1.45; }
.dagger-card small { margin-top: auto; font-size: 14px; font-weight: 800; }
.dagger-evidence h2 { font-size: 20px; margin: 0 0 15px; }
.dagger-evidence article { border-top: 1px solid var(--line); padding: 16px 0 3px; }
.dagger-evidence article > div { display: flex; justify-content: space-between; gap: 12px; }
.dagger-evidence article > div strong { color: #862a3c; }
.dagger-evidence p { margin: 9px 0; line-height: 1.6; }
.dagger-evidence small { font-size: 14px; }
@media (max-width: 760px) {
  .chicky-nest { align-items: stretch; flex-direction: column; gap: 16px; }
  .chicky-nest > div:first-child { grid-template-columns: 1fr auto; align-items: center; }
  .chicky-nest small { grid-column: 1 / -1; }
  .private-loyalty { align-items: flex-start; flex-direction: column; }
  .throne-summary { flex-direction: column; align-items: flex-start; gap: 12px; }
}
@media (max-width: 520px) {
  .chicky-summary { padding: 20px; flex-direction: column; align-items: flex-start; gap: 12px; }
  .flip-counter { display: flex; align-items: center; gap: 8px; }
  .flip-counter b { font-size: 26px; }
  .flock-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flock-card { padding: 12px; }
  .dagger-card-grid { grid-template-columns: 1fr; }
  .dagger-card { display: grid; grid-template-columns: 42px 1fr; text-align: left; align-items: center; gap: 7px 12px; padding: 15px; }
  .dagger-symbol { grid-row: 1 / 4; font-size: 32px; }
  .dagger-card > span:not(.dagger-symbol), .dagger-card small { grid-column: 2; }
  .chicky-decisions { grid-template-columns: 1fr; }
}

/* Fiery Eyes: jade, stone, and lantern light. */
.fiery-eyes .family-play-area { display: flex; flex-direction: column; gap: 18px; }
.fiery-eyes .panel { margin: 0; }
.fiery-eyes p { line-height: 1.65; }
.fiery-eyes .player-marker { background: #22776b; flex-shrink: 0; }
.fiery-eyes .family-player b, .fiery-eyes .family-player span { overflow-wrap: anywhere; }
.fiery-journey { background: linear-gradient(125deg, #123f3c, #1e665a); border: 1px solid #23594e; border-radius: 18px; color: #fff6da; padding: 26px; }
.fiery-journey .library-kicker { color: #efcc84; }
.fiery-journey h2 { margin: 7px 0; font-size: clamp(23px, 3vw, 34px); }
.fiery-journey p { margin: 7px 0 0; }
.fiery-journey-top, .fiery-section-title, .fiery-commit-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.fiery-eye-count { text-align: center; flex-shrink: 0; border: 1px solid #a4b79b; border-radius: 50%; width: 100px; height: 100px; display: flex; flex-direction: column; justify-content: center; }
.fiery-eye-count strong { font-size: 36px; color: #ffd886; line-height: 1.1; }
.fiery-eye-count span { font-size: 12px; }
.fiery-track { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 7px; margin: 22px 0 17px; }
.fiery-track > div { min-width: 0; border: 1px solid #80a395; border-radius: 8px; padding: 10px 2px; text-align: center; display: flex; flex-direction: column; gap: 3px; }
.fiery-track b { font-size: 21px; }
.fiery-track small { font-size: 11px; }
.fiery-track .passed { background: #dce8c2; color: #123f3c; }
.fiery-track .failed { background: #914333; color: #fff4e1; border-color: #e7a08a; }
.fiery-track .current { outline: 2px solid #ffdd8d; outline-offset: 2px; }
.fiery-team-score { display: flex; justify-content: space-between; gap: 10px; font-size: 16px; }
.fiery-team-score b { margin-left: 6px; }
.fiery-trial-note { font-size: 12px; color: #cdded1; }
.fiery-section-title h2 { margin: 0; font-size: 20px; }
.fiery-section-title .btn { flex-shrink: 0; }
.fiery-secrets { border-left: 4px solid #277b6c; }
.fiery-secret-content > strong { display: inline-block; padding: 7px 11px; border-radius: 8px; margin-top: 16px; }
.fiery-pilgrim { background: #e0eee3; color: #145347; }
.fiery-demon { background: #f8ded6; color: #842a1e; }
.fiery-secret-content ul { padding-left: 22px; }
.fiery-targets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.fiery-target, .fiery-form, .fiery-card { font: inherit; color: #193f38; border: 2px solid #bbcfc4; background: #fbfcf5; padding: 15px; border-radius: 12px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.fiery-target span, .fiery-form > span:not(.fiery-glyph), .fiery-card span { font-size: 13px; line-height: 1.5; }
.fiery-target.selected, .fiery-form.selected, .fiery-card.selected { background: #e8f3df; border-color: #15766b; box-shadow: 0 0 0 2px #c0dece; }
.fiery-target:focus-visible, .fiery-form:focus-visible, .fiery-card:focus-visible { outline: 3px solid #a95313; outline-offset: 3px; }
.fiery-form:disabled, .fiery-card:disabled { cursor: default; opacity: .48; }
.fiery-council-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.fiery-council-actions .btn { white-space: normal; overflow-wrap: anywhere; }
.fiery-cost, .fiery-investigation, .fiery-own-result { font-size: 14px; background: #f4eddd; border-radius: 9px; padding: 12px 15px; margin-bottom: 0; }
.fiery-investigation { background: #e5efe6; }
.fiery-focus { border: 1px solid #b8cab8; background: #edf4e4; border-radius: 20px; white-space: nowrap; padding: 8px 13px; font-weight: 800; }
.fiery-choice fieldset { border: 0; padding: 0; margin: 22px 0; min-width: 0; }
.fiery-choice legend { padding: 0; margin-bottom: 10px; font-weight: 800; }
.fiery-form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.fiery-form { align-items: center; text-align: center; padding: 20px 13px; }
.fiery-form b { font-size: 18px; }
.fiery-glyph { display: grid; place-items: center; border-radius: 50%; width: 65px; height: 65px; font-family: Georgia, serif; font-size: 34px; background: #e1e6d5; color: #455449; margin-bottom: 5px; }
.fiery-form.fox .fiery-glyph { background: #f7dbc4; color: #9c3e1e; }
.fiery-form.crane .fiery-glyph { background: #dbecee; color: #216978; }
.fiery-card-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.fiery-card { flex: 1 1 130px; }
.fiery-card strong { font-size: 22px; }
.fiery-card.curse { color: #873521; }
.fiery-commit-bar { padding-top: 16px; border-top: 1px solid #d5ddcd; }
.fiery-commit-bar > div { display: flex; flex-direction: column; gap: 6px; }
.fiery-commit-bar strong { font-size: 22px; color: #185c50; }
.fiery-commit-bar span { font-size: 13px; line-height: 1.5; }
.fiery-commit-bar .btn { flex-shrink: 0; }
.fiery-reveal.passed { border-top: 5px solid #2d8266; }
.fiery-reveal.failed { border-top: 5px solid #a94c33; }
.fiery-reveal h2 { font-size: 30px; margin: 8px 0; }
.fiery-revealed-forms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.fiery-revealed-forms > div { display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; background: #f2f1e7; padding: 13px 7px; border-radius: 10px; overflow-wrap: anywhere; }
.fiery-revealed-forms span { font-size: 26px; color: #245e52; }
.fiery-revealed-forms small { font-size: 12px; }
.fiery-evidence summary { font-weight: 800; cursor: pointer; }
.fiery-evidence article { padding: 12px 0; border-bottom: 1px solid #d5ddcd; }
.fiery-evidence article:last-child { border-bottom: 0; padding-bottom: 0; }
.fiery-evidence h3 { font-size: 16px; }
.fiery-evidence p { font-size: 13px; overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .fiery-targets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fiery-commit-bar, .fiery-section-title { flex-wrap: wrap; }
}
@media (max-width: 520px) {
  .fiery-journey { padding: 20px 15px; }
  .fiery-eye-count { width: 70px; height: 70px; }
  .fiery-eye-count strong { font-size: 26px; }
  .fiery-eye-count span { max-width: 50px; font-size: 10px; align-self: center; }
  .fiery-track { gap: 4px; }
  .fiery-track > div { padding: 9px 0; }
  .fiery-track small { font-size: 9px; }
  .fiery-team-score { font-size: 13px; }
  .fiery-team-score b { margin-left: 2px; }
  .fiery-form-grid { grid-template-columns: 1fr; gap: 9px; }
  .fiery-form { display: grid; grid-template-columns: 50px 1fr; text-align: left; padding: 13px; gap: 4px 12px; }
  .fiery-glyph { grid-row: 1 / 3; width: 50px; height: 50px; font-size: 27px; margin: 0; }
  .fiery-form > span:not(.fiery-glyph) { grid-column: 2; }
  .fiery-revealed-forms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fiery-commit-bar .btn { width: 100%; }
}

/* Consul: ivory cards, plum felt, and public evidence. */
.library-card.consul .game-cover { object-position: center 70%; }
.consul .family-play-area { display: flex; flex-direction: column; gap: 18px; }
.consul .panel { margin: 0; }
.consul p { line-height: 1.65; }
.consul .player-marker { background: #624278; flex-shrink: 0; }
.consul .family-player { gap: 9px; }
.consul .family-player > div { min-width: 0; }
.consul .family-player b, .consul .family-player span { overflow-wrap: anywhere; }
.consul .player-score { font-size: 24px; }
.consul .player-score small { font-size: 9px; }
.consul .taking-turn { border-left: 3px solid #a77b30; background: #fbf0d8; padding-left: 7px; }
.consul-contract-banner { display: flex; justify-content: space-between; align-items: center; gap: 22px; background: linear-gradient(125deg, #302036, #674879); color: #fff9e6; padding: 25px 28px; border-radius: 18px; border: 1px solid #80628c; }
.consul-contract-banner .library-kicker { color: #e7cc96; }
.consul-contract-banner h2 { margin: 7px 0; font-size: clamp(22px, 3vw, 34px); overflow-wrap: anywhere; }
.consul-contract-banner p { margin: 8px 0 0; font-size: 16px; }
.consul-called { display: flex; flex-direction: column; gap: 8px; align-items: center; flex-shrink: 0; }
.consul-called > span { font-size: 10px; letter-spacing: .09em; color: #e7cc96; }
.consul-office { border: 1px solid #dec89e; border-left: 4px solid #b88b3c; background: #faf1df; padding: 14px 18px; border-radius: 11px; display: flex; flex-direction: column; gap: 5px; }
.consul-office strong { color: #725014; }
.consul-office span { font-size: 14px; line-height: 1.6; }
.consul-private { border-left: 4px solid #74528a; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.consul-private h2 { font-size: 19px; }
.consul-private p { margin-bottom: 0; font-size: 14px; }
.consul-private .btn { flex-shrink: 0; }
.consul-auction h2, .consul-contract-form h2 { font-size: 23px; margin: 7px 0 12px; }
.consul-bid-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.consul-bid-grid > div { border: 1px solid #d6c9dd; border-radius: 12px; background: #faf6fc; padding: 14px; display: flex; flex-direction: column; gap: 7px; overflow-wrap: anywhere; }
.consul-bid-grid strong { font-size: 29px; color: #573569; }
.consul-bid-grid span { font-size: 12px; }
.consul-bid-grid .current { border: 2px solid #74528a; padding: 13px; }
.consul-bid-grid .passed { background: #eeeae2; color: #746b5d; }
.consul-bid-grid .passed strong { font-size: 21px; color: #746b5d; }
.consul-bid-actions { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; }
.consul-bid-actions label { display: flex; flex-direction: column; gap: 7px; font-size: 13px; font-weight: 800; }
.consul select { font: inherit; padding: 10px 12px; border: 1px solid #c9b8d2; border-radius: 8px; color: #35203e; background: #fffdf8; min-height: 44px; }
.consul-table-note { border-radius: 8px; background: #f1e9f5; padding: 12px; }
.consul-contract-form fieldset { border: 0; padding: 0; margin: 22px 0; min-width: 0; }
.consul-contract-form legend { font-weight: 800; padding: 0; margin: 0 0 13px; }
.consul-suit-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.consul-suit-options button { display: flex; flex-direction: column; align-items: center; gap: 9px; border: 2px solid #dcd3c3; border-radius: 12px; background: #fffaf0; padding: 15px 8px; font: inherit; cursor: pointer; }
.consul-symbol { width: 53px; height: 53px; flex-shrink: 0; }
.consul-suit-options .selected, .consul-ranks .selected { border-color: #624278; box-shadow: 0 0 0 2px #ded0e7; background: #f0e9f5; }
.consul-call-label { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.consul-ranks { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.consul-ranks button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 4px; min-height: 66px; border: 2px solid #ddd2bf; border-radius: 9px; background: #fffaf0; font: inherit; font-size: 23px; font-weight: 800; color: #392441; cursor: pointer; }
.consul-ranks small { font-size: 10px; font-weight: 600; }
.consul-ranks button:disabled { opacity: .4; cursor: default; }
.consul-contract-confirm, .consul-play-confirm { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid #dfd3c0; padding-top: 14px; }
.consul-contract-confirm .btn, .consul-play-confirm .btn { flex-shrink: 0; }
.consul-contract-confirm p, .consul-play-confirm p { margin: 0; font-size: 14px; }
.consul-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.consul-section-title h2 { font-size: 22px; margin: 0; }
.consul-section-title small { font-size: 13px; opacity: .8; font-weight: 500; }
.consul-section-title > span { font-size: 13px; text-align: right; }
.consul-card-face { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 143px; border: 2px solid #c9baa1; border-radius: 11px; padding: 9px; background: linear-gradient(155deg, #fffef9, #f4ebd9); color: var(--suit-color); box-shadow: 0 3px 4px #21162a17; }
.consul-card-face.compact { width: 91px; min-height: 128px; padding: 7px; }
.consul-card-rank { align-self: flex-start; font-size: 25px; font-weight: 900; line-height: 1; }
.consul-card-face .consul-symbol { width: 43px; height: 43px; }
.consul-card-suit { font-size: 11px; font-weight: 800; white-space: nowrap; }
.consul-card-face.veto { background: linear-gradient(130deg, #eee2f6, #d7c8e3); border-color: #a085ae; }
.consul-trick-table { color: #fff7e5; padding: 24px; border: 2px solid #9d8559; border-radius: 20px; background: radial-gradient(ellipse at 50% 40%, #61436d, #38283e); }
.consul-trick-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px 10px; }
.consul-trick-seat { display: flex; flex-direction: column; align-items: center; gap: 9px; text-align: center; min-width: 0; padding: 11px 5px; border: 1px solid transparent; border-radius: 12px; }
.consul-trick-seat > b { font-size: 13px; overflow-wrap: anywhere; max-width: 100%; }
.consul-trick-seat > small { font-size: 11px; min-height: 15px; color: #e8d7b5; }
.consul-trick-seat.current { background: #ffffff10; border-color: #d8bb78; }
.consul-empty-card { width: 91px; min-height: 128px; border: 1px dashed #bca4c6; border-radius: 11px; display: grid; place-items: center; color: #dacddd; font-size: 12px; }
.consul-trick-result { display: flex; flex-direction: column; gap: 6px; margin-top: 20px; padding: 15px; border-top: 1px solid #a18aab; }
.consul-trick-result strong { font-size: 18px; overflow-wrap: anywhere; }
.consul-trick-result span { font-size: 13px; line-height: 1.6; color: #e6d8e7; }
.consul-trick-table.voided .consul-trick-result strong { color: #ffdfa0; }
.consul-hand-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(81px, 1fr)); gap: 10px; margin-bottom: 18px; }
.consul-hand-card { padding: 0; background: none; border: 0; text-align: center; font: inherit; cursor: pointer; min-width: 0; }
.consul-hand-card:disabled { cursor: default; }
.consul-hand-card.unplayable { opacity: .4; }
.consul-hand-card.selected .consul-card-face { outline: 3px solid #74528a; outline-offset: 2px; transform: translateY(-5px); box-shadow: 0 8px 12px #21162a26; }
.consul-hand-card:not(:disabled):hover .consul-card-face { border-color: #74528a; }
.consul-hand-card:focus-visible, .consul-suit-options button:focus-visible, .consul-ranks button:focus-visible { outline: 3px solid #ac7220; outline-offset: 3px; border-radius: 10px; }
.consul-hand-result h2 { font-size: 25px; margin: 9px 0; }
.consul-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.consul-result-grid > div { display: flex; flex-direction: column; gap: 5px; border: 1px solid #ddd2c1; border-radius: 10px; padding: 12px; overflow-wrap: anywhere; }
.consul-result-grid span, .consul-result-grid small { font-size: 12px; }
.consul-result-grid strong { font-size: 30px; color: #27644b; }
.consul-result-grid .negative { color: #973d44; }
.consul-evidence summary { font-weight: 800; cursor: pointer; }
.consul-evidence article { padding: 12px 0; border-bottom: 1px solid #ded3c2; }
.consul-evidence article:last-child { border: 0; padding-bottom: 0; }
.consul-evidence h3 { font-size: 16px; margin: 9px 0; }
.consul-evidence p { font-size: 13px; overflow-wrap: anywhere; margin: 6px 0; }
@media (max-width: 650px) {
  .consul-private, .consul-section-title { flex-wrap: wrap; }
  .consul-section-title > span { text-align: left; }
  .consul-bid-grid, .consul-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consul-trick-table { padding: 17px 10px; }
}
@media (max-width: 440px) {
  .consul-contract-banner { padding: 19px; gap: 12px; }
  .consul-contract-banner p { font-size: 13px; }
  .consul-called .consul-card-face { width: 77px; min-height: 113px; }
  .consul-suit-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consul-ranks { gap: 5px; }
  .consul-ranks button { font-size: 20px; }
  .consul-trick-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .consul-hand-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .consul-contract-confirm, .consul-play-confirm { align-items: stretch; flex-direction: column; }
  .consul-play-confirm .btn, .consul-contract-confirm .btn { width: 100%; }
}

/* The Senate: a midnight chamber, copper light, and a place for every Shade. */
.library-card.senate .game-cover { object-position: center 38%; }
.senate .family-play-area { display: flex; flex-direction: column; gap: 18px; }
.senate .panel { margin: 0; }
.senate p { line-height: 1.65; }
.senate-chamber { color: #fdf6e8; background: linear-gradient(120deg, #153143, #245568); padding: 27px; border: 1px solid #62808a; border-radius: 18px; }
.senate-chamber.night { background: linear-gradient(120deg, #101e30, #244456); }
.senate-chamber .library-kicker { color: #e7ba75; }
.senate-chamber h2 { font-size: clamp(26px, 4vw, 40px); margin: 10px 0; }
.senate-chamber p { font-size: 15px; max-width: 560px; }
.senate-day-track { list-style: none; padding: 0; margin: 22px 0 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 7px; }
.senate-day-track li { border: 1px solid #64828e; padding: 10px 3px; border-radius: 8px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.senate-day-track span { font-size: 9px; letter-spacing: .06em; }
.senate-day-track b { font-size: 21px; }
.senate-day-track .current { background: #e9c58e; border-color: #f3d2a0; color: #233845; box-shadow: 0 0 0 2px #9c763d; }
.senate-day-track .past { color: #a1bbc6; background: #ffffff09; }
.senate-section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.senate-section-head h2 { margin: 4px 0; font-size: 22px; }
.senate-section-head > span { font-size: 12px; }
.senate-section-head .btn { flex-shrink: 0; }
.senate-private { border-left: 4px solid #477d92; }
.senate-private > p { font-size: 14px; margin-bottom: 0; }
.senate-role { padding: 18px 20px; margin: 20px 0 14px; border: 1px solid #b5cbd0; border-radius: 12px; color: #183f4d; background: #edf4f0; }
.senate-role.conspirator { color: #762e2b; background: #fae8e0; border-color: #dfada0; }
.senate-role > span { font-size: 10px; letter-spacing: .07em; font-weight: 800; }
.senate-role h3 { font-size: 28px; margin: 7px 0; }
.senate-role p { margin: 8px 0; font-size: 14px; }
.senate-role > strong { display: block; font-size: 13px; margin-top: 12px; }
.senate-shade-note { background: #e6eff7; border-radius: 9px; padding: 12px 15px; font-size: 14px; color: #284b68; }
.senate-night-action { padding-top: 14px; border-top: 1px solid #c4d2d0; }
.senate-night-action h3, .senate-day-action h3 { font-size: 23px; margin: 6px 0 12px; }
.senate-night-action p, .senate-day-action p { font-size: 15px; }
.senate-target-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.senate-select { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 180px; font-size: 13px; font-weight: 800; }
.senate-select select { width: 100%; min-height: 46px; padding: 11px 12px; font: inherit; border: 1px solid #abc1c7; border-radius: 9px; color: #1d3d4b; background: #fffdf8; }
.senate-claim-mode { max-width: 360px; }
.senate-action-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.senate-action-buttons .btn { white-space: normal; }
.senate-locked { color: #27566a; background: #e8f1f1; border-radius: 10px; padding: 14px 17px; border-left: 3px solid #5a8d97; font-size: 14px; }
.senate-clue-book { border-top: 1px solid #c4d2d0; padding-top: 17px; margin-top: 20px; }
.senate-clue-book summary { cursor: pointer; font-weight: 800; }
.senate-clue-book ol { list-style: none; padding: 0; margin: 15px 0 0; display: flex; flex-direction: column; gap: 10px; }
.senate-clue-book li { border: 1px solid #ccd9d5; background: #f5f7ed; padding: 11px 14px; border-radius: 8px; }
.senate-clue-book li > span { font-size: 10px; font-weight: 800; letter-spacing: .04em; color: #476a72; }
.senate-clue-book li p { margin: 6px 0 0; font-size: 14px; overflow-wrap: anywhere; }
.senate-unverified { padding: 5px 8px; border-radius: 5px; background: #f8e9ce; color: #765013; font-weight: 800; }
.senate-statements ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.senate-statements li { display: flex; flex-direction: column; gap: 5px; border: 1px solid #dccdb3; border-radius: 9px; padding: 12px; background: #fffaf0; overflow-wrap: anywhere; }
.senate-statements li > b { color: #33586a; font-size: 13px; }
.senate-statements li > span { font-size: 14px; line-height: 1.55; }
.senate-statements .accusation { color: #913f34; }
.senate-review h2 { margin: 10px 0; font-size: 29px; overflow-wrap: anywhere; }
.senate-review.dawn { border-top: 4px solid #d2a563; }
.senate-review.verdict { border-top: 4px solid #537a8e; }
.senate-recorded-votes summary { cursor: pointer; font-weight: 800; }
.senate-recorded-votes ol { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.senate-recorded-votes li { display: flex; flex-direction: column; gap: 3px; padding: 9px 12px; border-radius: 8px; background: #f1ede3; font-size: 12px; overflow-wrap: anywhere; }
.senate-recorded-votes span { color: #52626a; }
.senate-seat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.senate-seat-grid article { border: 1px solid #c5d1cd; background: #fffaf0; border-radius: 12px; padding: 13px; min-width: 0; }
.senate-seat-grid article.is-you { outline: 2px solid #44758a; outline-offset: 1px; }
.senate-seat-grid article.shade { background: #e9eff7; border-color: #abc0d8; }
.senate-seat-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.senate-seat-number { background: #315c6e; color: #fff7e7; width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; flex-shrink: 0; }
.shade .senate-seat-number { background: #d8e5f4; color: #315374; border: 1px solid #829dbb; }
.senate-seat-status { font-size: 11px; font-weight: 800; color: #396470; }
.shade .senate-seat-status { color: #46618f; }
.senate-seat-grid h3 { font-size: 15px; margin: 12px 0 7px; overflow-wrap: anywhere; }
.senate-seat-grid p { font-size: 12px; color: #4b655d; margin: 0; }
.senate-seat-grid small { font-size: 10px; display: block; margin-top: 6px; color: #596578; }
.senate-seat-grid .senate-final-conspirator { color: #8c382e; font-weight: 800; }
.senate-role-counts { display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0; border-top: 1px solid #d0d4c9; border-bottom: 1px solid #d0d4c9; }
.senate-role-counts span { font-size: 11px; padding: 5px 8px; border-radius: 5px; color: #234e61; background: #e7eeee; }
.senate-reference p { font-size: 14px; }
.senate-reference .muted { font-size: 12px; }
.senate-history summary { font-weight: 800; cursor: pointer; }
.senate-history article { border-top: 1px solid #d7ccba; padding: 13px 0; }
.senate-history h3 { font-size: 16px; }
.senate-history p, .senate-history li { font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .senate-seat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  .senate-section-head { flex-wrap: wrap; }
  .senate-seat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .senate-statements ul { grid-template-columns: 1fr; }
  .senate-chamber { padding: 21px 17px; }
  .senate-day-track { gap: 4px; }
  .senate-day-track li { padding: 9px 0; }
  .senate-day-track span { font-size: 7px; }
  .senate-day-track b { font-size: 17px; }
  .senate-review h2 { font-size: 24px; }
  .senate-select { flex-basis: 100%; }
  .senate-seat-grid article { padding: 11px; }
}
