@font-face{font-family:Oswald;src:url('/assets/display.ttf') format('truetype');font-weight:700;font-display:swap}
:root{color-scheme:dark;--ink:#f5f0df;--muted:#b1c4c4;--bg:#132c36;--deep:#10252d;--line:#385059;--gold:#f1bd67;--police:#81c8d5;--gang:#e68e6c;--head:Oswald,'Arial Narrow',sans-serif;--body:'Segoe UI',Arial,sans-serif}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.5 var(--body);min-height:100svh}
button,input,select{font:inherit}
button,a{touch-action:manipulation}
button{border:0;cursor:pointer;color:inherit;background:transparent;line-height:1.25}
button:disabled{cursor:not-allowed;opacity:.46}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
button:hover:not(:disabled){filter:brightness(1.13)}
::selection{background:var(--gold);color:var(--deep)}
header{height:76px;padding:0 clamp(18px,4.4vw,82px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:var(--deep)}
.brand{text-decoration:none;display:flex;align-items:center;gap:12px;color:var(--ink);font:700 23px/1 var(--head);letter-spacing:.085em}
.quiet,.minor{border:1px solid #53686e;border-radius:7px;padding:9px 14px;font-size:.92rem}.quiet:hover,.minor:hover{background:#29434a}
main{max-width:1920px;margin:auto}
.home{display:grid;grid-template-columns:minmax(305px,.86fr) minmax(0,1.45fr);align-items:center;min-height:calc(100svh - 76px);padding:clamp(20px,3.8vw,64px) clamp(20px,4.4vw,82px);column-gap:3vw;background:radial-gradient(ellipse at 72% 46%,#284c51 0,transparent 55%)}
h1,h2,h3,p{margin:0}h1,h2,h3{font-family:var(--head);font-weight:700;line-height:1.08}
h1{font-size:clamp(3.3rem,5.6vw,6rem);letter-spacing:-.025em;text-transform:uppercase}.home h1 span{display:block;color:var(--gold)}
.lead{font-size:clamp(1rem,1.25vw,1.2rem);line-height:1.55;max-width:38ch;color:#d4e1dd;margin:23px 0}
.meta,.byline{color:var(--muted);display:flex;align-items:center;gap:11px;font-size:.94rem}.meta{margin-bottom:27px}.meta svg{width:21px}
.actions{display:flex;flex-wrap:wrap;gap:10px}.primary,.secondary{min-height:45px;border-radius:7px;padding:11px 18px;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px}
.primary{background:var(--gold);color:#29271f}.secondary{border:1px solid #74888a;color:#f1f3e9;background:#213c44}
.textbtn{border:0;text-decoration:underline;text-underline-offset:4px;color:#c7d6cf;padding:9px 0}
.home .textbtn{margin-top:10px}.home #side:empty{display:none}
#table{min-width:0;position:relative}.viewport{position:relative;overflow:hidden;isolation:isolate;touch-action:none;user-select:none;cursor:grab}.viewport:active{cursor:grabbing}
.home .viewport{height:clamp(350px,63vh,760px)}.float{position:absolute;inset:0;perspective:1800px;pointer-events:none}
#plane{position:absolute;transform-style:preserve-3d;width:var(--size);height:var(--size);left:50%;top:50%;transform:translate(calc(-50% + var(--dx)),calc(-50% + var(--dy))) rotateX(var(--tilt)) rotateZ(var(--angle));pointer-events:auto;background:#485747;border-radius:2px;box-shadow:0 2px #8b815d,0 4px #5e5844,0 7px #827357,0 11px #3d3b34,5px 24px 22px #0718208c}
#board{width:100%;height:100%;display:block;pointer-events:none;border:2px solid #bba572;border-radius:2px}
#figures,#targets,#fx{position:absolute;inset:0;transform-style:preserve-3d;pointer-events:none}
.target{pointer-events:auto;position:absolute;transform:translate(-50%,-50%);width:4.1%;height:4.1%;background:#f9cc4e95;border:1px solid #fff2bc;border-radius:12%}
.target:after{content:'';display:block;position:absolute;top:39%;left:39%;width:22%;height:22%;background:#274851;border:1px solid #fff9c7;border-radius:50%}
.target:hover,.target:focus-visible{background:#ffe378;z-index:3}
.token{width:5.4%;height:5.4%;position:absolute;transform:translate(-50%,-50%) translateZ(2px);transform-style:preserve-3d;--tint:var(--police);pointer-events:none}
.token.gang{--tint:var(--gang)}.token:before{content:'';position:absolute;inset:24% 7% 0;background:var(--tint);border:2px solid var(--deep);border-radius:50%;box-shadow:0 2px 2px #132b2c99}
.stand{position:absolute;width:117%;height:140%;bottom:19%;left:-8%;transform-origin:50% 93%;transform:rotateZ(calc(-1 * var(--angle))) rotateX(calc(-1 * var(--tilt)));display:block;filter:drop-shadow(1px 2px 1px #24342e);line-height:0}
.stand svg{width:100%;height:100%}.stand b{position:absolute;bottom:0;right:0;background:var(--tint);color:#14262b;border:1px solid #14262b;border-radius:50%;width:15px;height:15px;display:grid;place-items:center;font:700 10px var(--body)}
.home .token{width:13%;height:13%}.token.active:before{outline:2px solid #ffe48a;outline-offset:2px}.token.helper{width:4.5%;height:4.5%}
.drop{width:3.4%;height:2.8%;background:#d9af62;border:2px solid #543627;position:absolute;transform:translate(-50%,-50%) rotate(-14deg)}
.burst{position:absolute;width:5%;height:5%;border-radius:50%;border:4px solid #ffedb2;background:#ed874e;animation:burst .8s ease-out forwards}.burst.bomb{background:#d84a31}
@keyframes burst{0%{transform:translate(-50%,-50%) scale(.1);opacity:1}100%{transform:translate(-50%,-50%) scale(3.3);opacity:0}}.hit{animation:hit .48s ease-in-out 2}@keyframes hit{50%{filter:brightness(1.8) drop-shadow(0 0 4px #b54324)}}
.mapbar{display:flex;align-items:center;justify-content:space-between;padding:14px 0;border-top:1px solid var(--line);gap:12px}.mapname{font:700 18px var(--head);letter-spacing:.015em}.tools{display:flex;gap:4px}.tools button{display:grid;place-items:center;width:39px;height:36px;border-radius:5px;color:#dee6d8}.tools button:hover{background:#37515a}.tools svg{width:20px;height:20px}
.lobby{padding:clamp(25px,4vw,62px) clamp(18px,5vw,80px);display:grid;grid-template-columns:1fr minmax(280px,.65fr);gap:clamp(24px,5vw,100px)}.lobby #table{display:none}
h2{font-size:clamp(2rem,3vw,3.1rem)}h3{font-size:1.35rem}.sub{margin:10px 0 20px;color:var(--muted)}
.roster{margin:18px 0 24px;border-top:1px solid var(--line)}.person{display:flex;align-items:center;gap:12px;padding:9px 0;border-bottom:1px solid var(--line);min-width:0}.person .pic{width:48px;height:48px;flex:none}.pic svg,.art svg{width:100%;height:100%;display:block}.person .pname{font-weight:650;overflow-wrap:anywhere}.person small,.dim{color:var(--muted)}.person .role{margin-left:auto;color:var(--muted);font-size:.86rem}.invitebox{border-top:3px solid var(--gold);padding:22px 0}.code{font:700 clamp(2.7rem,5vw,4.5rem)/1.4 var(--head);letter-spacing:.085em;color:var(--gold);user-select:all}
.play{padding:12px clamp(12px,2.2vw,44px) 24px;display:grid;gap:8px 28px;grid-template-columns:minmax(0,1fr) minmax(270px,340px);align-items:start}.play #copy{grid-column:1/-1}.play .viewport{height:clamp(410px,calc(100svh - 218px),1080px)}
.gamehead{display:flex;gap:10px;justify-content:space-between;align-items:center;padding:6px 0 12px}.gamehead h2{font-size:1.55rem}.gamehead .dim{font-size:.9rem}
#side{min-width:0}.play #side{background:#19343e;padding:22px;border-radius:10px;border-top:3px solid var(--gold)}
.turn{display:flex;align-items:center;gap:12px}.turn h3{font-size:1.6rem;overflow-wrap:anywhere}.die{width:49px;height:49px;flex:none;display:grid;place-items:center;background:var(--ink);color:var(--deep);border-radius:10px;font:700 1.65rem/1 var(--head);box-shadow:0 3px 0 #b1a68c}.play .actions{margin:16px 0}.play .actions button{width:100%}
details{border-top:1px solid var(--line);padding:12px 0}summary{cursor:pointer;font-weight:650}.play details:last-child{padding-bottom:0}.play .roster{margin:10px 0 0;border:0}.play .person .pic{width:37px;height:37px}.log{padding-left:20px;color:#d4dfd7;font-size:.91rem}.log li+li{margin-top:6px}
.gridmoves{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:5px;max-height:190px;overflow:auto;margin-top:10px}.gridmoves button{background:#2b4850;padding:8px;border-radius:5px}
dialog{color:var(--ink);background:#1a3540;border:1px solid #526568;border-radius:13px;padding:0;width:min(560px,calc(100% - 26px));max-height:min(86svh,850px);box-shadow:0 18px 80px #08181fd9}
dialog::backdrop{background:#06181ccb}#dialogbody{padding:clamp(20px,4vw,32px)}.dialoghead{display:flex;align-items:start;justify-content:space-between;gap:20px;margin-bottom:20px}.dialoghead h2{font-size:2rem}.x{font-size:24px;color:#d9e1da;width:34px;height:34px;flex:none;border-radius:5px}.x:hover{background:#31515a}
label.field,fieldset{display:block;margin:17px 0 8px;font-weight:650}input,select{background:#102831;color:var(--ink);border:1px solid #698184;border-radius:6px;padding:10px 12px;min-width:0;width:100%}input::placeholder{color:#a8b9b7}fieldset{border:0;padding:0}legend{padding:0;margin-bottom:8px}.heroes{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}.herochoice{padding:7px 2px 8px;border:1px solid #526971;border-radius:7px;background:#1c3b46;font-size:.86rem}.herochoice svg{width:100%;height:60px}.herochoice[aria-pressed=true]{border:2px solid var(--gold);background:#344a49;padding:6px 1px 7px}.teamdesc{color:var(--muted);font-size:.92rem;margin-top:8px}.errors{color:#ffc19f;margin:8px 0}.actions.submit{margin-top:22px}.rule{padding:13px 0;border-top:1px solid var(--line)}.rule h3{font-size:1.16rem;margin-bottom:5px}.rule p{color:#d2ded9}.assumptions{margin:24px 0 15px}.hand{display:flex;gap:10px;flex-wrap:wrap}.card{background:#e9dfbf;color:#202e30;text-align:center;border-radius:9px;padding:7px;width:110px;font-weight:700;line-height:1.2}.card .art{display:block;height:85px;margin-bottom:4px}
#notice{position:fixed;left:50%;bottom:16px;transform:translateX(-50%);background:var(--ink);color:#10252d;border-radius:8px;max-width:min(92vw,580px);padding:10px 16px;z-index:5;box-shadow:0 4px 18px #081a1f66}#notice:empty{display:none}
@media(max-width:850px){.home{grid-template-columns:minmax(240px,.9fr) minmax(0,1.2fr);gap:12px;padding:24px}.home h1{font-size:clamp(2.9rem,6vw,4rem)}.play{grid-template-columns:minmax(0,1fr) 260px;gap:8px 12px}.play #side{padding:14px}}
@media(max-width:670px){header{height:56px}.brand{font-size:18px;gap:8px}.brand img{width:27px;height:30px}.quiet{padding:7px 9px}.home{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;min-height:auto;padding:22px 16px;gap:14px}.home h1{font-size:clamp(2.6rem,9vw,3.6rem)}.home h1 span{display:inline}.lead{margin:10px 0;max-width:44ch;font-size:1rem}.meta{margin-bottom:14px}.home .viewport{height:clamp(255px,72vw,410px)}.home .textbtn{margin:3px 0 0}.mapbar{padding:4px 0}.home #side{display:none}.lobby{grid-template-columns:1fr;gap:12px}.play{display:flex;flex-direction:column;padding:10px}.play #copy,.play #side,.play #table{width:100%}.play .viewport{height:clamp(280px,77vw,485px)}.gamehead{padding:0}.play #side{margin-top:4px}.play .actions button{width:auto}.heroes{gap:4px}.herochoice svg{height:50px}.role{max-width:100px;text-align:right}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001s!important;scroll-behavior:auto!important}}
.stand b{right:-16%;bottom:-8%;width:clamp(11px,1vw,15px);height:clamp(11px,1vw,15px);font-size:clamp(8px,.7vw,10px)}
.spark{position:absolute;width:2%;aspect-ratio:1;background:#fff1b0;border:2px solid #c47735;border-radius:50%;transform:translate(-50%,-50%);box-shadow:1px 2px 5px #68451c}

