:root {
  --bg: #0f1626; --panel: rgba(16, 22, 38, 0.78); --line: rgba(255, 236, 200, 0.12); --text: #fff4e0; --muted: #b9ad98;
  --ember: #ff7a3d; --gold: #f4c95d; --leaf: #7bc96f; --blood: #ff4d5e; --sky: #6ec6ff; --r: 16px;
  --serif: 'Fraunces', Georgia, serif; --sans: 'Inter', system-ui, -apple-system, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: 14px/1.4 var(--sans); -webkit-font-smoothing: antialiased; }
#scene { position: fixed; inset: 0; }
#scene canvas { display: block; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono, code, pre { font-family: var(--mono); }
code { background: rgba(255,255,255,.07); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
kbd { font: 600 10px var(--mono); background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; margin-right: 6px; }

.btn { appearance: none; border: 1px solid var(--line); background: rgba(255,255,255,.06); color: var(--text); padding: 9px 14px; border-radius: 11px; font: 600 13px var(--sans); cursor: pointer; transition: transform .12s, background .2s, border-color .2s; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: linear-gradient(135deg, var(--ember), #ff9f43); border-color: transparent; color: #1a0f05; box-shadow: 0 8px 24px rgba(255,122,61,.35); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: rgba(255,77,94,.4); color: #ffb3bb; }
.btn.ghost { background: transparent; }
.btn.big { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
.btn.small { padding: 7px 10px; font-size: 12px; }
.panel { background: var(--panel); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.panel h3 { margin: 0 0 10px; font: 700 13px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--gold); display: flex; justify-content: space-between; align-items: baseline; }
.panel h3 small { color: var(--muted); font-weight: 500; letter-spacing: 0; text-transform: none; }
.overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: rgba(6, 9, 16, .55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .35s ease; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.close { position: absolute; right: 14px; top: 12px; background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }

/* ---------- join ---------- */
#join { background: radial-gradient(1200px 600px at 50% 20%, rgba(255,122,61,.18), transparent), rgba(6,9,16,.6); overflow: auto; }
.join-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .35; filter: saturate(1.2) blur(2px); mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%); }
.join-card { position: relative; width: min(760px, 94vw); padding: 34px 34px 24px; border-radius: 26px; background: rgba(12,17,30,.82); border: 1px solid var(--line); box-shadow: 0 40px 120px rgba(0,0,0,.6); animation: rise .6s cubic-bezier(.2,.8,.2,1); margin: 20px 0; }
.logo { font: 900 clamp(44px, 9vw, 84px)/0.9 var(--serif); letter-spacing: -0.03em; background: linear-gradient(180deg, #fff4e0, var(--gold) 60%, var(--ember)); -webkit-background-clip: text; background-clip: text; color: transparent; text-shadow: 0 0 60px rgba(255,122,61,.25); }
.logo span { background: linear-gradient(180deg, var(--ember), #c8401b); -webkit-background-clip: text; background-clip: text; }
.tagline { font: 500 17px/1.45 var(--sans); color: var(--muted); margin: 10px 0 22px; max-width: 560px; }
.tagline em { color: var(--gold); font-style: normal; font-weight: 700; }
.roster { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 22px; }
.roster .r { text-align: center; animation: rise .6s backwards; }
.roster .r .ph { aspect-ratio: 1; border-radius: 16px; background: #222 center/cover; border: 2px solid var(--c); box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .3s; }
.roster .r:hover .ph { transform: translateY(-4px) rotate(-2deg); }
.roster .r b { display: block; margin-top: 6px; font-size: 13px; }
.roster .r small { color: var(--muted); font-size: 11px; }
#joinForm { display: flex; gap: 10px; }
#joinForm input { flex: 1; min-width: 0; background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 14px 16px; font: 500 15px var(--sans); outline: none; }
#joinForm input:focus { border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255,122,61,.2); }
.join-alt { display: flex; gap: 12px; align-items: center; margin-top: 12px; flex-wrap: wrap; }
.qr-mini { display: flex; gap: 14px; align-items: center; margin-top: 18px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px dashed var(--line); }
.qr-mini img { width: 84px; height: 84px; border-radius: 8px; background: #fff4e0; }
.sponsors { margin-top: 16px; font-size: 12px; color: var(--muted); text-align: center; }
.sponsors b { color: var(--text); }

/* ---------- top bar ---------- */
#topbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 10; display: flex; align-items: center; gap: 18px; padding: 10px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 40px rgba(0,0,0,.35); }
.pill { font: 700 11px var(--mono); letter-spacing: .12em; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); }
.pill.day { background: rgba(123,201,111,.18); color: #b9f5ae; }
.pill.council { background: rgba(255,122,61,.25); color: #ffd0b8; animation: pulse 1s infinite; }
.pill.end { background: rgba(244,201,93,.2); color: var(--gold); }
@keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(255,122,61,.15); } }
.feast { display: grid; gap: 5px; min-width: 260px; }
.bar-row { display: grid; grid-template-columns: 62px 1fr 52px; align-items: center; gap: 8px; font-size: 12px; }
.bar-row b { font: 600 12px var(--mono); text-align: right; }
.bar { height: 9px; background: rgba(255,255,255,.08); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #c2410c, var(--ember), var(--gold)); border-radius: 99px; transition: width .5s cubic-bezier(.2,.8,.2,1); box-shadow: 0 0 12px rgba(255,122,61,.6); }
.bar.wood i { background: linear-gradient(90deg, #6b4423, #a0703f, #d9a066); box-shadow: none; }
.sun { position: relative; width: 120px; height: 50px; }
.sun svg { width: 120px; height: 64px; position: absolute; top: -10px; }
.sun #timeTxt { position: absolute; bottom: -2px; width: 100%; text-align: center; font: 700 15px var(--mono); }
.match-meta { display: grid; font-size: 11px; color: var(--muted); text-align: right; }

/* ---------- agent cards ---------- */
#agentsPanel { position: fixed; left: 12px; top: 12px; width: 250px; padding: 12px; z-index: 10; max-height: calc(100vh - 110px); overflow: auto; }
.acard { display: grid; grid-template-columns: 44px 1fr; gap: 10px; padding: 8px; border-radius: 12px; margin-bottom: 6px; background: rgba(255,255,255,.03); border: 1px solid transparent; transition: background .3s, border-color .3s; cursor: pointer; }
.acard:hover { background: rgba(255,255,255,.07); }
.acard.speaking { border-color: var(--gold); background: rgba(244,201,93,.08); }
.acard.exiled { opacity: .55; filter: grayscale(.7); }
.acard .ph { width: 44px; height: 44px; border-radius: 12px; background: #333 center/cover; border: 2px solid var(--c); }
.acard .nm { display: flex; justify-content: space-between; font-weight: 700; font-size: 13px; }
.acard .nm small { color: var(--muted); font-weight: 500; font-size: 10px; }
.acard .intent { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .tbar { height: 5px; border-radius: 9px; background: rgba(255,255,255,.08); margin-top: 5px; overflow: hidden; }
.acard .tbar i { display: block; height: 100%; transition: width .6s, background .6s; }
.acard .role { font: 700 9px var(--mono); padding: 2px 6px; border-radius: 6px; background: rgba(255,77,94,.25); color: #ffb3bb; }
.acard .role.villager { background: rgba(123,201,111,.2); color: #c8f5bf; }

/* ---------- ledger ---------- */
#ledgerPanel { position: fixed; right: 12px; top: 12px; bottom: 12px; width: 340px; padding: 12px; z-index: 10; display: flex; flex-direction: column; }
.filters { display: flex; gap: 4px; margin-bottom: 8px; }
.filters button { flex: 1; background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 5px 0; font: 600 11px var(--sans); cursor: pointer; }
.filters button.on { background: rgba(255,122,61,.2); color: var(--text); border-color: rgba(255,122,61,.4); }
#ledger { overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 6px; padding-right: 2px; scrollbar-width: thin; }
.le { padding: 8px 9px; border-radius: 10px; background: rgba(255,255,255,.035); border-left: 3px solid var(--c, #888); font-size: 12px; animation: slidein .35s cubic-bezier(.2,.8,.2,1); }
@keyframes slidein { from { opacity: 0; transform: translateX(20px); } }
.le .h { display: flex; justify-content: space-between; gap: 6px; }
.le .h b { font-weight: 700; }
.le .h .t { font: 500 10px var(--mono); color: var(--muted); }
.le .act { font: 700 10px var(--mono); text-transform: uppercase; letter-spacing: .06em; padding: 1px 6px; border-radius: 5px; background: rgba(255,255,255,.08); margin-left: 4px; }
.le .act.steal, .le .act.ignite, .le .act.deceive, .le .act.stash { background: rgba(255,77,94,.25); color: #ffc0c6; }
.le .act.accuse, .le .act.council, .le .act.vote, .le .act.exile, .le .act.witness { background: rgba(255,122,61,.22); color: #ffd3bd; }
.le .act.lookup, .le .act.crier { background: rgba(110,198,255,.2); color: #cfeaff; }
.le .act.gift, .le .act.deposit { background: rgba(123,201,111,.2); color: #c8f5bf; }
.le .why { color: var(--muted); margin-top: 3px; }
.le .scores { display: flex; gap: 4px; margin-top: 5px; flex-wrap: wrap; }
.le .scores span { font: 500 10px var(--mono); padding: 1px 5px; border-radius: 4px; background: rgba(255,255,255,.06); }
.le .scores span:first-child { background: rgba(244,201,93,.2); color: var(--gold); }
.le.sealed { border-left-color: #6b7280; background: repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 8px, rgba(255,255,255,.055) 8px 16px); }
.le.sealed .hash { font: 500 10px var(--mono); color: #9ca3af; word-break: break-all; }
.le.revealed { animation: flip .7s ease; border-left-color: var(--blood); background: rgba(255,77,94,.08); }
@keyframes flip { 0% { transform: rotateX(90deg); } 100% { transform: none; } }
.le .verified { font: 600 10px var(--mono); color: var(--leaf); }

/* ---------- action bar ---------- */
#actionbar { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 10; display: grid; gap: 8px; justify-items: center; }
.inv { font: 600 12px var(--mono); background: var(--panel); border: 1px solid var(--line); padding: 5px 12px; border-radius: 99px; backdrop-filter: blur(10px); }
.actions { display: flex; gap: 6px; padding: 7px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: 0 14px 40px rgba(0,0,0,.4); }
.act { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); padding: 10px 13px; border-radius: 11px; font: 600 13px var(--sans); cursor: pointer; display: flex; align-items: center; transition: all .12s; }
.act:hover { background: rgba(255,122,61,.18); border-color: rgba(255,122,61,.45); }
.act:active, .act.flash { transform: scale(.94); background: rgba(255,122,61,.35); }
#micBtn.listening { background: var(--blood); animation: pulse 1s infinite; }
#chatForm input { width: min(560px, 90vw); background: rgba(10,14,24,.92); border: 1px solid var(--ember); color: var(--text); border-radius: 12px; padding: 12px 14px; font: 500 14px var(--sans); outline: none; }

#dirToggle { position: fixed; left: 12px; bottom: 14px; z-index: 11; display: flex; gap: 6px; flex-wrap: wrap; max-width: 260px; }
#director { position: fixed; left: 12px; bottom: 60px; width: 250px; padding: 12px; z-index: 12; animation: rise .3s; }
.dir-grid { display: grid; gap: 7px; }
.seg { display: flex; background: rgba(255,255,255,.05); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); padding: 6px; border-radius: 7px; font: 600 12px var(--sans); cursor: pointer; }
.seg button.on { background: rgba(255,122,61,.3); color: var(--text); }
.toggle { display: flex; gap: 8px; align-items: center; font-size: 12px; cursor: pointer; }
.toggle input { accent-color: var(--ember); }

/* ---------- world labels ---------- */
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; transform: translate(-50%, -100%); text-align: center; white-space: nowrap; will-change: transform; }
.lbl .name { font: 700 11px var(--sans); padding: 2px 7px; border-radius: 99px; background: rgba(10,14,24,.7); border: 1px solid var(--c); display: inline-block; }
.lbl .name.me { background: var(--c); color: #0b0f18; }
.lbl .bubble { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: 240px; width: max-content; white-space: normal; background: #fff4e0; color: #1a1208; font: 600 12px/1.35 var(--sans); padding: 8px 11px; border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); animation: pop .3s cubic-bezier(.2,1.6,.4,1); }
.lbl .bubble::after { content: ''; position: absolute; bottom: -6px; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: #fff4e0; border-bottom: 0; }
.lbl .bubble.memory { background: linear-gradient(135deg, #ffe08a, #ffb86b); box-shadow: 0 0 0 3px rgba(255,122,61,.6), 0 10px 40px rgba(255,122,61,.5); font-size: 13px; }
.lbl .bubble.human { background: #d7ecff; }
@keyframes pop { from { opacity: 0; transform: translateX(-50%) scale(.6); } }
.lbl .emo { font-size: 16px; display: block; margin-bottom: 2px; }

/* ---------- toasts ---------- */
#toasts { position: fixed; bottom: 128px; left: 50%; transform: translateX(-50%); z-index: 30; display: grid; gap: 6px; justify-items: center; pointer-events: none; }
.toast { background: rgba(10,14,24,.92); border: 1px solid var(--line); padding: 8px 14px; border-radius: 12px; font: 600 13px var(--sans); animation: rise .25s; }

/* ---------- cinematic ---------- */
#cinematic { position: fixed; left: 50%; top: 92px; transform: translateX(-50%); z-index: 25; width: min(720px, 92vw); border-radius: 22px; overflow: hidden; background: #000; box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08); animation: cine .7s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
@keyframes cine { from { opacity: 0; transform: translateX(-50%) scale(.9) translateY(-20px); filter: blur(8px); } }
.cine-img { height: 240px; background: linear-gradient(135deg, #3b1d0e, #0f1626) center/cover; animation: kenburns 6s ease-out forwards; }
@keyframes kenburns { to { transform: scale(1.08); } }
.cine-text { position: absolute; inset: auto 0 0 0; padding: 60px 22px 18px; background: linear-gradient(transparent, rgba(0,0,0,.88)); }
.cine-text h2 { margin: 0; font: 900 30px/1.05 var(--serif); letter-spacing: -.01em; text-shadow: 0 4px 20px rgba(0,0,0,.6); }
.cine-text p { margin: 6px 0 0; color: #e8dcc6; }

/* ---------- council ---------- */
.council-card, .end-card, .mem-card, .qr-card { position: relative; background: rgba(12,17,30,.94); border: 1px solid var(--line); border-radius: 24px; padding: 24px; box-shadow: 0 40px 120px rgba(0,0,0,.6); animation: rise .45s cubic-bezier(.2,.8,.2,1); }
.council-card { width: min(720px, 94vw); border-color: rgba(255,122,61,.4); box-shadow: 0 0 80px rgba(255,122,61,.25), 0 40px 120px rgba(0,0,0,.6); }
.council-head { display: flex; justify-content: space-between; align-items: center; }
.council-head h2 { margin: 0; font: 900 34px var(--serif); }
.countdown { font: 700 30px var(--mono); color: var(--ember); width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--ember); }
#ballot { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 16px 0 12px; }
.ballot-c { position: relative; padding: 10px; border-radius: 14px; background: rgba(255,255,255,.05); border: 2px solid transparent; cursor: pointer; text-align: center; transition: all .15s; }
.ballot-c:hover { border-color: var(--ember); transform: translateY(-2px); }
.ballot-c.picked { border-color: var(--ember); background: rgba(255,122,61,.18); }
.ballot-c .ph { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; background: #333 center/cover; border: 3px solid var(--c); }
.ballot-c .votes { position: absolute; top: 6px; right: 8px; font: 700 13px var(--mono); color: var(--ember); }
.ballot-c .pips { display: flex; justify-content: center; gap: 2px; min-height: 14px; margin-top: 4px; flex-wrap: wrap; }
.ballot-c .pips i { width: 12px; height: 12px; border-radius: 50%; background: var(--c); border: 1px solid rgba(255,255,255,.4); animation: pop .3s; }
#voteFeed { margin-top: 12px; display: grid; gap: 4px; max-height: 150px; overflow: auto; font-size: 13px; }
#voteFeed div { animation: slidein .3s; }

/* ---------- end ---------- */
#endScreen { overflow: auto; align-items: start; padding: 20px 0; }
.end-card { width: min(1180px, 96vw); padding: 0; overflow: hidden; }
.end-hero { padding: 120px 30px 24px; background: linear-gradient(transparent, rgba(12,17,30,1)), #222 center/cover; }
.end-hero h1 { margin: 0; font: 900 clamp(32px, 5vw, 56px)/1 var(--serif); text-shadow: 0 6px 30px rgba(0,0,0,.6); }
.end-hero p { margin: 8px 0 0; color: #e8dcc6; font-size: 15px; }
.end-grid { display: grid; grid-template-columns: 1fr 1fr 1.1fr; gap: 18px; padding: 8px 24px 18px; }
.end-col h4 { margin: 12px 0 8px; font: 700 12px var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--gold); display: flex; gap: 8px; align-items: center; }
.end-col { min-width: 0; }
#revealList { display: grid; gap: 6px; max-height: 330px; overflow: auto; }
.lrow { display: grid; grid-template-columns: 74px 1fr 56px; gap: 6px; align-items: center; font-size: 12px; padding: 3px 0; }
.lrow .bar { height: 7px; }
.lrow .bar i { transition: width 1.2s cubic-bezier(.2,.8,.2,1); }
.tag { font: 600 10px var(--mono); padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--muted); text-transform: none; letter-spacing: 0; }
.tag.ok { background: rgba(123,201,111,.2); color: #c8f5bf; }
.tag.run { background: rgba(255,122,61,.25); color: #ffd3bd; animation: pulse 1s infinite; }
pre#bruinLog, pre#memLog { background: #070a12; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 10.5px; line-height: 1.45; max-height: 190px; overflow: auto; color: #b8f7c4; white-space: pre-wrap; margin: 0 0 10px; }
.mtable { width: 100%; border-collapse: collapse; font-size: 12px; }
.mtable th { text-align: left; color: var(--muted); font-weight: 600; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; padding: 4px; border-bottom: 1px solid var(--line); }
.mtable td { padding: 5px 4px; border-bottom: 1px solid rgba(255,255,255,.04); }
.mtable .rep { display: inline-block; width: 60px; height: 6px; border-radius: 9px; background: rgba(255,255,255,.08); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.mtable .rep i { display: block; height: 100%; }
.end-actions { display: flex; gap: 10px; padding: 0 24px 24px; flex-wrap: wrap; }
.mem-card { width: min(860px, 94vw); max-height: 90vh; overflow: auto; }
.mem-card h2 { margin: 0 0 8px; font: 900 28px var(--serif); }
.mem-card h2 small { font: 500 13px var(--sans); color: var(--muted); }
.lineage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0 16px; color: var(--muted); font: 600 12px var(--mono); }
.lineage span { padding: 6px 10px; border-radius: 9px; background: rgba(255,122,61,.12); border: 1px solid rgba(255,122,61,.3); color: var(--text); }
.qr-card { text-align: center; width: min(420px, 92vw); }
.qr-card img { width: 300px; height: 300px; max-width: 80vw; max-height: 80vw; border-radius: 16px; background: #fff4e0; padding: 8px; }
.qr-card h2 { font: 900 32px var(--serif); margin: 0 0 14px; }
.help li { margin: 8px 0; line-height: 1.5; }

/* ---------- TV / spectator ---------- */
body.tv #actionbar { display: none !important; }
body.tv .qr-float { display: flex; }
.qr-float { display: none; position: fixed; right: 364px; bottom: 14px; z-index: 10; gap: 10px; align-items: center; padding: 10px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.qr-float img { width: 110px; height: 110px; border-radius: 8px; background: #fff4e0; }

@media (max-width: 900px) {
  #ledgerPanel { top: auto; bottom: 150px; height: 180px; width: calc(100vw - 24px); right: 12px; }
  #agentsPanel { top: 92px; width: 190px; max-height: 40vh; }
  #agentsPanel .intent, #agentsPanel h3 small { display: none; }
  #topbar { top: 6px; gap: 8px; padding: 7px 10px; width: calc(100vw - 12px); }
  .feast { min-width: 0; flex: 1; }
  .sun { display: none; }
  .match-meta { display: none; }
  .roster { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .roster small { display: none; }
  .act { padding: 9px 9px; font-size: 12px; }
  kbd { display: none; }
  #dirToggle { bottom: auto; top: 92px; left: auto; right: 12px; flex-direction: column; }
  .end-grid { grid-template-columns: 1fr; }
}
