:root{
  --paper:#efebdf; --sheet:#fbf9f2; --ink:#221f1a; --muted:#6c6657; --rule:#d2cab4;
  --bar:#dfe9d6; --barline:#c9d8bf; --red:#a2261b; --redsoft:#f4ddd7; --gold:#86651a;
  --ok:#2e6a39; --oksoft:#dbead9; --mast:#26221c; --mastink:#efe6cf; --focus:#1f5fa8;
  color-scheme:light;
}
*{box-sizing:border-box}
body{background:var(--paper);color:var(--ink);font-family:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif;font-size:16px;line-height:1.4;margin:0}
button,select,input,textarea{font:inherit;color:inherit}
button{cursor:pointer}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.wrap{max-width:1120px;margin:0 auto;padding-inline:16px}

/* masthead */
.mast{background:var(--mast);color:var(--mastink);position:sticky;top:env(safe-area-inset-top,0px);z-index:5}
.mast-in{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding-block:10px}
.logo{font-family:"Pirata One",Georgia,serif;font-size:34px;line-height:1;letter-spacing:.5px}
.brand{display:flex;flex-direction:column;gap:2px}
.sub{font-size:14px;color:#bdb39a;letter-spacing:.04em}
.turnbox{display:flex;align-items:center;gap:10px}
.turnlbl{font-size:12px;text-transform:uppercase;letter-spacing:.12em;color:#bdb39a}
.turnno{font-family:"Courier Prime",monospace;font-size:26px;font-weight:700}
.run{background:var(--red);color:#fff4ec;border:0;border-radius:3px;padding:9px 16px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:15px}
.run:hover{filter:brightness(1.1)}
.tabs{display:flex;gap:2px;overflow-x:auto;border-top:1px solid #3d372d}
.tab{background:none;border:0;color:#bdb39a;padding:9px 14px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;font-size:14px;border-bottom:3px solid transparent;white-space:nowrap}
.tab[aria-current="true"]{color:var(--mastink);border-bottom-color:var(--red)}
main{padding-block:20px 60px}

/* generic */
h1,h2,h3{text-wrap:balance;margin:0}
h2{font-size:22px;font-weight:700;letter-spacing:.01em}
h3{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.12em;color:var(--muted);margin-bottom:8px}
.stack{display:flex;flex-direction:column;gap:18px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.muted{color:var(--muted)}
.small{font-size:14px}
.num{font-variant-numeric:tabular-nums;font-family:"Courier Prime",monospace}
.panel{background:var(--sheet);border:1px solid var(--rule);border-radius:3px;padding:16px}
.btn{background:var(--sheet);border:1px solid var(--ink);border-radius:3px;padding:6px 12px;font-weight:600}
.btn:hover{background:var(--ink);color:var(--sheet)}
.btn.primary{background:var(--ink);color:var(--sheet)}
.btn.danger{border-color:var(--red);color:var(--red)}
.btn.danger:hover{background:var(--red);color:#fff}
.btn:disabled{opacity:.4;cursor:default;background:var(--sheet);color:var(--ink)}
.linkbtn{background:none;border:0;padding:0;font-weight:700;text-decoration:underline;text-decoration-color:var(--rule);text-underline-offset:3px;text-align:left}
.linkbtn:hover{text-decoration-color:var(--red)}
select,input[type=text],textarea{background:#fff;border:1px solid var(--rule);border-radius:3px;padding:5px 7px;max-width:100%}
textarea{width:100%;font-family:"Courier Prime",monospace;font-size:13px}
.pill{display:inline-block;font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:1px 7px;border-radius:2px;border:1px solid currentColor;white-space:nowrap}
.pill.red{color:var(--red)} .pill.ok{color:var(--ok)} .pill.gold{color:var(--gold)} .pill.mut{color:var(--muted)}
.alert{background:var(--redsoft);border-left:4px solid var(--red);padding:10px 12px;border-radius:2px}
.okbox{background:var(--oksoft);border-left:4px solid var(--ok);padding:10px 12px;border-radius:2px}
.scroll{overflow-x:auto}
table{border-collapse:collapse;width:100%}
th{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);text-align:left;font-weight:700;padding:6px 8px;border-bottom:2px solid var(--ink);white-space:nowrap}
td{padding:7px 8px;border-bottom:1px solid var(--rule);vertical-align:top}
tr.me td{background:#f6efd9}
td.r,th.r{text-align:right}
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:1px;background:var(--rule);border:1px solid var(--rule)}
.stat{background:var(--sheet);padding:10px 12px}
.stat b{display:block;font-family:"Courier Prime",monospace;font-size:22px}
.stat span{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted)}

/* warrior sheet */
.chips{display:flex;gap:6px;flex-wrap:wrap}
.chip{border:1px solid var(--rule);background:var(--sheet);border-radius:2px;padding:5px 10px;font-weight:600}
.chip[aria-current="true"]{background:var(--ink);color:var(--sheet);border-color:var(--ink)}
/* The warrior page: the warrior (preview and looks), what they are (style, attributes, ratings) and
   what they'll do (orders, equipment) side by side; strategy and history below. */
.wrap.wide{max-width:1400px}
.wgrid{display:grid;grid-template-columns:minmax(280px,340px) minmax(0,1fr) minmax(0,1fr);grid-template-areas:'look strat strat' 'look info act';grid-template-rows:auto 1fr;gap:16px;align-items:start}
.wg-look{grid-area:look}.wg-strat{grid-area:strat;min-width:0}.wg-info{grid-area:info}.wg-act{grid-area:act}
.wg-strat>.panel{border-top:3px solid var(--red)}
.wgrid .wprev{max-height:420px}
@media (max-width:1100px){.wgrid{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-areas:'strat strat' 'look info' 'look act';grid-template-rows:auto auto 1fr}.wg-look .wprev{max-width:340px;margin:0 auto}}
@media (max-width:760px){.wgrid{grid-template-columns:minmax(0,1fr);grid-template-areas:'look' 'strat' 'info' 'act';grid-template-rows:none}}
.sheet-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.15fr);gap:18px}
@media (max-width:820px){.sheet-grid{grid-template-columns:minmax(0,1fr)}}
.whead{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:flex-end;border-bottom:2px solid var(--ink);padding-bottom:10px}
.wname{font-family:"Pirata One",Georgia,serif;font-size:40px;line-height:1;letter-spacing:.5px}
.attr td{padding:5px 8px}
.pm{display:inline-flex;gap:4px}
.pm button{width:26px;height:26px;border:1px solid var(--ink);background:var(--sheet);border-radius:2px;font-weight:700;line-height:1;padding:0}
.pm button:disabled{opacity:.3;cursor:default}
.bar{display:inline-block;height:8px;width:100px;background:#e8e2d0;border-radius:1px;vertical-align:middle;position:relative;overflow:hidden}
.bar i{position:absolute;inset:0 auto 0 0;background:var(--ink)}
.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 14px}
.kv dt{color:var(--muted);font-size:14px}
.kv dd{margin:0;font-weight:600}
.strat{width:100%;table-layout:fixed}
.strat select{width:100%;min-width:0}
.strat td,.strat th{padding:5px 6px}
.strat thead th{white-space:normal;line-height:1.25;vertical-align:bottom}
.strat thead th:first-child,.strat tbody th{width:12%}
.strat tbody th{border:0;text-transform:none;letter-spacing:0;font-size:14px;color:var(--ink);text-align:left;font-weight:600}
/* Phones: each phase becomes a labelled card rather than a wide table. */
@media (max-width:760px){
  .strat,.strat tbody,.strat tr,.strat td,.strat th{display:block;width:auto}
  .strat thead{display:none}
  .strat tr{border:1px solid var(--rule);border-radius:4px;padding:8px 10px;margin-bottom:10px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 12px}
  .strat tbody th{grid-column:1/-1;padding:0 0 2px;font-size:15px}
  .strat td{padding:0}
  .strat td::before{content:attr(data-label);display:block;font-size:12px;color:var(--muted);margin-bottom:2px}
}
.warn{color:var(--red);font-size:14px;font-weight:600}
.seg{display:inline-flex;border:1px solid var(--ink);border-radius:3px;overflow:hidden}
.seg button{border:0;background:var(--sheet);padding:6px 14px;font-weight:700}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--sheet)}
label.f{display:flex;flex-direction:column;gap:3px;font-size:13px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.06em}
label.f select,label.f input{text-transform:none;letter-spacing:0;color:var(--ink);font-size:15px;font-weight:400}
.formgrid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}

/* printouts: tractor-feed greenbar paper */
.printout{position:relative;background:var(--sheet);padding:18px 44px;border:1px solid var(--rule);
  font-family:"Courier Prime","Courier New",monospace;font-size:15px;line-height:1.5em;
  background-image:repeating-linear-gradient(to bottom,var(--bar) 0,var(--bar) 4.5em,var(--sheet) 4.5em,var(--sheet) 9em);
  background-position:0 18px}
.printout::before,.printout::after{content:"";position:absolute;top:0;bottom:0;width:30px;background-color:var(--sheet);
  background-image:radial-gradient(circle at 15px 12px,var(--paper) 0 5px,#c8c0a8 5.5px,transparent 6.5px);background-size:30px 24px}
.printout::before{left:0;border-right:1px dashed var(--rule)}
.printout::after{right:0;border-left:1px dashed var(--rule)}
.printout p{margin:0}
.printout .min{font-weight:700;margin-top:.0em}
.printout .intro{font-weight:700}
.printout .vs{padding-left:4ch}
.printout .kill{color:var(--red);font-weight:700}
.printout .big{font-weight:700}
.printout .note{font-style:italic}
.printout .end{font-weight:700;border-top:1px dashed #9c947c;margin-top:.5em;padding-top:.0em}
.printout .hdr{display:flex;justify-content:space-between;gap:8px;flex-wrap:wrap;font-weight:700;border-bottom:1px solid #9c947c;margin-bottom:1.5em;text-transform:uppercase}
.printout .mgr{margin-top:1.5em}
@media (max-width:560px){.printout{padding:14px 38px;font-size:13.5px}.printout::before,.printout::after{width:24px;background-size:24px 24px;background-image:radial-gradient(circle at 12px 12px,var(--paper) 0 4px,#c8c0a8 4.5px,transparent 5.5px)}}
details.bout{border-bottom:1px solid var(--rule)}
details.bout summary{padding:8px 4px;cursor:pointer}
details.bout[open] summary{font-weight:700}
.news h2{font-family:"Pirata One",Georgia,serif;font-size:34px;font-weight:400}
.headlines li{margin-bottom:6px}
.setup{max-width:620px;margin:40px auto}
.setup .logo{font-size:56px}
@media (prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.run.is-ready{background:var(--ok)}
.btn.ghost{background:transparent;color:var(--mastink);border-color:#6b6252}
.btn.ghost:hover{background:var(--mastink);color:var(--mast)}
.sublink{color:#d8ceb4;font-weight:600;font-size:14px}
.chip .pill{margin-left:6px}
.strat td select{min-width:0}
.toast{position:fixed;left:16px;right:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));max-width:640px;margin:0 auto;z-index:20;display:flex;gap:12px;justify-content:space-between;align-items:center;box-shadow:0 4px 16px rgba(0,0,0,.18)}
.printout .reveal{font-weight:700;color:#3d5a2a}
.gamename{font-family:"Pirata One",Georgia,serif;font-size:30px;line-height:1.05}
.turnbox{align-items:center;gap:14px;flex-wrap:wrap}
.turninfo{display:flex;flex-direction:column;align-items:center;line-height:1}
.turninfo .turnno{font-size:34px}
.turnside{display:flex;flex-direction:column;gap:6px}
.turnnote{font-size:13px;color:#d8ceb4}
.lobbyturn{font-weight:700;font-size:18px;white-space:nowrap}
.glance{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px;margin:0}
.glance dt{font-size:12px;text-transform:uppercase;letter-spacing:.1em;color:var(--muted);font-weight:700}
.glance dd{margin:2px 0 0;font-weight:600}
.hchips{display:flex;gap:6px;flex-wrap:wrap}
.hchip{font-size:12px;border:1px solid #6b6252;border-radius:2px;padding:1px 6px;color:#d8ceb4}
.hchip.goldchip{border-color:#c9a44a;color:#e8c97a}
.hchip.warnchip{border-color:#e27a6e;color:#f0a79e}
.printout .crier-h{font-weight:700;margin-top:1.5em;text-decoration:underline}
.printout .crier-h:first-of-type{margin-top:0}
.picker{min-width:150px}
.msg{border-bottom:1px solid var(--rule);padding-bottom:10px}
.msg:last-child{border-bottom:0;padding-bottom:0}
.deathline{font-size:14px;color:var(--ink);text-transform:none;letter-spacing:0;font-weight:400}
.logbox{background:#1f1c17;color:#e6dcc3;font-family:"Courier Prime","Courier New",monospace;font-size:13px;line-height:1.45;padding:10px 12px;border-radius:3px;max-height:65vh;overflow:auto;white-space:pre-wrap;word-break:break-word}
.logline .lt{color:#9c917a}
.logline.warn{color:#f0c674}
.logline.error{color:#ff9b8f}
.logline.earlier{color:#b3a98f}
.buildtag{font-family:"Barlow Semi Condensed",Arial,sans-serif;font-size:12px;font-weight:600;letter-spacing:.06em;color:#bdb39a;border:1px solid #5a5244;border-radius:2px;padding:1px 6px;vertical-align:middle;white-space:nowrap}
.setup .buildtag{color:var(--muted);border-color:var(--rule)}
.buildnew{font-family:"Barlow Semi Condensed",Arial,sans-serif;font-size:12px;font-weight:700;background:#c9a44a;color:#221f1a;border:0;border-radius:2px;padding:2px 8px;vertical-align:middle}
.invites{margin:6px 0 0;padding-left:1.4em;display:flex;flex-direction:column;gap:4px}
.invites .btn.small{padding:2px 10px;font-size:13px;margin-left:6px}
.printout .pvp{border:1px solid var(--gold);background:rgba(134,101,26,.1);border-radius:6px;padding:6px 10px;margin-bottom:1em;font-family:inherit}
.invite{border:2px solid var(--gold);background:linear-gradient(180deg,rgba(134,101,26,.16),rgba(134,101,26,.06));border-radius:6px;padding:14px 16px;display:flex;flex-direction:column;gap:10px}
.invite-head{display:flex;gap:12px;align-items:flex-start}
.invite .trophy{font-size:30px;line-height:1}
.invite h3{margin:0 0 4px;color:var(--gold)}
.invite p{margin:0}
.invite-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.invite-list li{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;background:rgba(255,255,255,.55);border:1px solid var(--rule);border-radius:4px;padding:8px 10px}
.invite .btn.small{padding:4px 12px;font-size:14px}
.pill.invited{background:var(--gold);color:#fff}
.pager{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pager select{flex:1 1 220px;min-width:0;max-width:100%}
.pagecount{font-size:14px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}

/* ---------- 3D fight viewer ---------- */
.watchbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px}
.watch{display:inline-flex;align-items:center;gap:8px;background:var(--red);color:#fff4ec;border:0;border-radius:3px;padding:9px 16px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;font-size:15px}
.watch:hover{filter:brightness(1.1)}
.watch .tri{width:0;height:0;border-left:11px solid currentColor;border-top:7px solid transparent;border-bottom:7px solid transparent}
body.g3d-open{overflow:hidden}
.g3d{position:fixed;inset:0;z-index:100;background:#000;color:#f3ead4;font-family:"Barlow Semi Condensed","Arial Narrow",Arial,sans-serif;user-select:none;-webkit-user-select:none}
.g3d-stage{position:absolute;inset:0}
.g3d-stage canvas{display:block;width:100%;height:100%;touch-action:none}
.g3d-vignette{position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 48%,transparent 55%,rgba(0,0,0,.42) 100%)}
.g3d-top{position:absolute;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:max(12px,env(safe-area-inset-top)) 16px 30px;background:linear-gradient(rgba(0,0,0,.6),transparent);pointer-events:none}
.g3d-side{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1}
.g3d-right{align-items:flex-end;text-align:right}
.g3d-plate{display:flex;flex-direction:column;line-height:1.15;padding:4px 10px;border-left:4px solid #b8342a;background:rgba(10,8,6,.45);border-radius:2px;max-width:100%}
.g3d-right .g3d-plate{border-left:0;border-right:4px solid #c9a24a}
.g3d-plate b{font-family:"Pirata One",Georgia,serif;font-weight:400;font-size:24px;letter-spacing:.03em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.g3d-st{font-size:13px;color:#cbbf9f;letter-spacing:.06em;text-transform:uppercase}
.g3d-cond{font-size:14px;font-weight:700;letter-spacing:.04em;color:#e6dcc0}
.g3d-cond[data-v="Bleeding"],.g3d-cond[data-v="Bloodied"]{color:#f0b08a}
.g3d-cond[data-v="Badly wounded"],.g3d-cond[data-v="Near collapse"],.g3d-cond[data-v="Down"],.g3d-cond[data-v="Yields"]{color:#ff7a62}
.g3d-cond[data-v="Slain"]{color:#ff3b2a}
.g3d-cond[data-v="Victor"]{color:#ffd56a}
.g3d-title{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px;flex:0 1 auto;padding-top:2px}
.g3d-label{font-size:13px;letter-spacing:.14em;text-transform:uppercase;color:#d8cba8}
.g3d-min{font-family:"Courier Prime",monospace;font-weight:700;font-size:18px;color:#fff}
.g3d-banner{position:absolute;left:0;right:0;top:34%;text-align:center;font-family:"Pirata One",Georgia,serif;font-size:clamp(40px,8vw,84px);color:#f6e7bf;text-shadow:0 3px 18px rgba(0,0,0,.8);opacity:0;pointer-events:none;letter-spacing:.04em}
.g3d-banner.on{animation:g3dban 1.8s ease-out}
@keyframes g3dban{0%{opacity:0;transform:scale(1.15)}15%{opacity:1;transform:scale(1)}75%{opacity:1}100%{opacity:0}}
.g3d-subs{position:absolute;left:50%;transform:translateX(-50%);bottom:92px;width:min(900px,calc(100% - 32px));display:flex;flex-direction:column;align-items:center;gap:4px;pointer-events:none}
.g3d-subs p{margin:0;padding:4px 12px;background:rgba(8,6,4,.62);border-radius:3px;font-family:"Courier Prime",monospace;font-size:clamp(14px,1.6vw,18px);line-height:1.35;text-align:center;transition:opacity .6s;text-shadow:0 1px 2px #000}
.g3d-subs .kill{color:#ff6b55;font-weight:700}
.g3d-subs .big,.g3d-subs .end,.g3d-subs .intro{font-weight:700;color:#fff2cc}
.g3d-subs .note,.g3d-subs .reveal{font-style:italic;color:#e3d7b8}
.g3d-subs .min{display:none}
.g3d-log{position:absolute;right:12px;top:96px;bottom:96px;width:min(420px,calc(100% - 24px));background:rgba(251,249,242,.96);color:var(--ink);border-radius:3px;display:flex;flex-direction:column;box-shadow:0 8px 30px rgba(0,0,0,.5)}
.g3d-log[hidden]{display:none}
.g3d-log-h{display:flex;justify-content:space-between;align-items:center;padding:8px 12px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;font-size:13px;border-bottom:1px solid var(--rule)}
.g3d-x{background:none;border:0;font-size:16px;padding:2px 6px}
.g3d-log-b{overflow:auto;padding:10px 14px;font-family:"Courier Prime",monospace;font-size:14px;line-height:1.45}
.g3d-log-b p{margin:0;color:#9b9484;cursor:pointer;border-radius:2px;padding:0 4px}
.g3d-log-b p.seen{color:var(--ink)}
.g3d-log-b p.now{background:#efe2b8}
.g3d-log-b p:hover{background:#e8e2d0}
.g3d-log-b .min{font-weight:700;margin-top:.6em}
.g3d-log-b .kill{color:var(--red);font-weight:700}
.g3d-log-b .big,.g3d-log-b .intro,.g3d-log-b .end{font-weight:700}
.g3d-log-b .note{font-style:italic}
.g3d-bar{position:absolute;left:0;right:0;bottom:0;padding:24px 16px max(10px,env(safe-area-inset-bottom));background:linear-gradient(transparent,rgba(0,0,0,.75))}
.g3d-scrub{position:relative;height:18px;cursor:pointer;touch-action:none}
.g3d-scrub::before{content:"";position:absolute;left:0;right:0;top:7px;height:4px;background:rgba(255,255,255,.25);border-radius:2px}
.g3d-fill{position:absolute;left:0;top:7px;height:4px;background:#c8392b;border-radius:2px}
.g3d-fill::after{content:"";position:absolute;right:-7px;top:-5px;width:14px;height:14px;border-radius:50%;background:#f3ead4;box-shadow:0 0 6px rgba(0,0,0,.6)}
.g3d-marks i{position:absolute;top:4px;width:2px;height:10px;background:rgba(255,236,190,.7)}
.g3d-ctl{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px}
.g3d-ctl button,.g3d-ctl select{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.25);color:#f3ead4;border-radius:3px;padding:6px 10px;font-weight:600;min-height:36px}
.g3d-ctl select{padding:4px 6px;background:#2a241d}
.g3d-snd{display:inline-flex;align-items:center;gap:6px}
.g3d-vol{width:90px;accent-color:#c9a44a;min-height:36px}
.g3d-ctl button:hover{background:rgba(255,255,255,.22)}
.g3d-ctl .g3d-play{min-width:48px;background:#a2261b;border-color:#a2261b}
.g3d-tog[aria-pressed="true"]{background:#f3ead4;color:#221f1a}
.g3d-time{font-family:"Courier Prime",monospace;font-size:14px;margin-left:6px}
.g3d-gap{flex:1}
.g3d-speed{font-size:14px;display:flex;align-items:center;gap:4px}
.g3d-close{margin-left:4px}
@media (max-width:700px){
  .g3d-plate b{font-size:18px}
  .g3d-st{display:none}
  .g3d-title .g3d-label{display:none}
  .g3d-subs{bottom:118px}
  .g3d-gap{flex-basis:100%;height:0}
  .g3d-time{margin-left:auto}
}
.envtag{display:inline-block;vertical-align:middle;margin-left:8px;padding:1px 7px;border-radius:3px;background:#c0392b;color:#fff;font:700 13px/1.4 "Barlow Semi Condensed",sans-serif;letter-spacing:.1em}
/* The fight, inline on the results page. */
.wprev{position:relative;width:100%;aspect-ratio:4/5;max-height:520px;background:#1c1915;border-radius:3px;overflow:hidden;display:flex;align-items:center;justify-content:center;color:#cdbf9e}
.looks{display:grid;grid-template-columns:52px minmax(0,1fr);gap:8px 10px;align-items:center}
.looks .lk{font-weight:600}
.swatches{display:flex;flex-wrap:wrap;gap:6px}
.swatch{width:36px;height:36px;border-radius:50%;border:2px solid var(--sheet);box-shadow:0 0 0 1px var(--rule);padding:0;background:#fff}
.swatch.txt{width:auto;height:36px;border-radius:3px;padding:0 10px;border:1px solid var(--rule);box-shadow:none;font-size:14px}
.swatch[aria-pressed="true"]{box-shadow:0 0 0 3px var(--red)}
.swatch.txt[aria-pressed="true"]{box-shadow:none;border:2px solid var(--red);background:var(--redsoft)}
.wcards{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px;margin-bottom:12px}
.wcard{display:flex;flex-direction:column;align-items:flex-start;gap:2px;padding:0 0 10px;background:var(--sheet);border:1px solid var(--rule);border-radius:4px;overflow:hidden;text-align:left}
.wcard img{width:100%;height:auto;aspect-ratio:240/280;background:#1c1915;display:block;margin-bottom:6px}
.wcard .wcn{font-family:'Pirata One',Georgia,serif;font-size:20px;padding:0 10px}
.wcard .small{padding:0 10px}
.wcard:hover{border-color:var(--red)}
.tut{border-left:4px solid var(--red);margin-bottom:16px}
.tutsteps{margin:0;padding-left:22px;display:flex;flex-direction:column;gap:6px}
.tutsteps li.done{color:var(--muted,#6c6657)}
.tutsteps li.done b{font-weight:500}
.tutsteps .tick{color:#2e6a39;font-weight:700;margin-right:6px}
.tutsteps li.cur b{color:var(--red)}
.tut-hl{outline:3px solid var(--red);outline-offset:3px;border-radius:4px;animation:tutglow 1s ease-in-out 3}
@keyframes tutglow{50%{outline-color:transparent}}
@media (prefers-reduced-motion:reduce){.tut-hl{animation:none}}
.fightbox{position:relative;width:100%;aspect-ratio:16/9;max-height:calc(100vh - 190px);max-height:calc(100svh - 190px);min-height:300px;background:#000;border-radius:3px;overflow:hidden;margin-bottom:14px}
.g3d.g3d-embed{position:absolute;inset:0;z-index:1}
.g3d.g3d-embed:fullscreen{position:fixed}
/* Full screen by default: the fight fills the window, over the page. */
.g3d.g3d-embed.g3d-max{position:fixed;inset:0;z-index:200}
body.g3d-maxed{overflow:hidden}
.g3d-embed .g3d-plate b{font-size:20px}
.fightnote{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 12px}
@media (max-width:700px){.fightbox{aspect-ratio:auto;height:72vh}.g3d-embed .g3d-plate b{font-size:16px}}
/* Gear and orders on the name plates; the intro card; the trainer; the end of the fight. */
.g3d-gear{font-size:13px;color:#f3e2b4;letter-spacing:.02em;max-width:42vw}
.g3d-ord{font-size:12.5px;color:#bfe0b0;font-weight:600;max-width:42vw}
.g3d-own{border-left-color:#5fae58}.g3d-right .g3d-own{border-right-color:#5fae58}
.g3d-replay{position:absolute;top:46px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;color:#f3ead4;font-weight:700;letter-spacing:.18em;text-transform:uppercase;font-size:13px;opacity:0;transition:opacity .4s;pointer-events:none;text-shadow:0 1px 3px rgba(0,0,0,.8)}
.g3d-replay.on{opacity:1}
.g3d-replay span{width:10px;height:10px;border-radius:50%;background:#c23a2a;box-shadow:0 0 8px #c23a2a}
.g3d-card{position:absolute;left:50%;top:44%;transform:translate(-50%,-50%) scale(.96);display:flex;align-items:center;gap:22px;opacity:0;transition:opacity .6s,transform .6s;pointer-events:none;width:min(860px,calc(100% - 32px));justify-content:center}
.g3d-card.on{opacity:1;transform:translate(-50%,-50%) scale(1)}
.g3d-card-s{display:flex;flex-direction:column;gap:10px;flex:1;min-width:0}
.g3d-card-s:last-child{text-align:right}
.g3d-card-f{background:rgba(10,8,6,.72);border-top:3px solid #c9a24a;padding:10px 14px;border-radius:3px;display:flex;flex-direction:column;gap:2px}
.g3d-card-f b{font-family:"Pirata One",Georgia,serif;font-weight:400;font-size:clamp(22px,3vw,34px);letter-spacing:.03em}
.g3d-card-f span{font-size:13px;text-transform:uppercase;letter-spacing:.08em;color:#d8cba8}
.g3d-card-f em{font-style:normal;font-size:15px;color:#f3e2b4}
.g3d-card-vs{font-family:"Pirata One",Georgia,serif;font-size:28px;color:#f6e7bf;text-shadow:0 2px 10px #000}
.g3d-trainer{position:absolute;left:50%;transform:translateX(-50%);bottom:92px;width:min(760px,calc(100% - 32px));background:rgba(251,249,242,.95);color:#221f1a;border-left:5px solid #86651a;border-radius:3px;padding:12px 16px;box-shadow:0 8px 30px rgba(0,0,0,.45)}
.g3d-trainer[hidden]{display:none}
.g3d-trainer-who{display:block;font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:#86651a;margin-bottom:4px}
.g3d-trainer p{margin:0;font-family:"Courier Prime",monospace;font-size:clamp(15px,1.6vw,18px);line-height:1.4}
.g3d-endbox{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;flex-direction:column;align-items:center;gap:10px}
.g3d-endbox[hidden]{display:none}
.g3d-next{background:#a2261b;color:#fff4ec;border:0;border-radius:3px;padding:12px 20px;font-weight:700;font-size:17px;letter-spacing:.03em;box-shadow:0 6px 24px rgba(0,0,0,.5)}
.g3d-next:hover{background:#b8342a}
.g3d-again{background:rgba(10,8,6,.7);color:#f3ead4;border:1px solid rgba(255,255,255,.35);border-radius:3px;padding:8px 14px;font-weight:600}
@media (max-width:700px){.g3d-gear,.g3d-ord{font-size:11px}.g3d-card{display:none}.g3d-trainer{bottom:118px}}
tr.sel td{background:var(--redsoft)}
/* Attributes, grouped with bars (body, mind, hands & feet), and skills by attack and defence. */
.agroups{display:flex;flex-direction:column;gap:14px;margin-top:8px}
.agroup{display:flex;flex-direction:column;gap:8px}
.ghead{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.gname{font-family:'Pirata One',Georgia,serif;font-size:22px;line-height:1.1}
.arow{display:flex;flex-direction:column;gap:4px}
.atop{display:flex;align-items:center;gap:8px}
.atop .an{font-size:17px;margin-right:auto}
.atop .muted{margin-right:4px}
.atrack{height:8px;background:#e6dfcc;border-radius:4px;overflow:hidden}
.afill{height:100%;background:var(--red);border-radius:4px}
.afeeds{color:#4b463c}
.av{font-size:20px;font-weight:600;min-width:26px;text-align:right}
.sgroups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 20px}
.srow{display:flex;justify-content:space-between;gap:8px;border-top:1px solid #e6dfcc;padding:5px 0}
.stitle{color:var(--gold);font-weight:600}
@media (max-width:520px){.sgroups{grid-template-columns:1fr}}

/* Fight plan: ready-made plans, then sliders for each stretch of the bout. */
.plans{display:flex;flex-wrap:wrap;gap:8px}
.planbtn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:10px 12px;min-height:44px;border:2px solid var(--rule);border-radius:4px;background:#fff;font:inherit;flex:1 1 170px}
.planbtn[aria-pressed="true"]{border-color:var(--red);background:var(--redsoft)}
.phead,.prow{display:grid;grid-template-columns:120px repeat(3,minmax(0,1fr)) 170px;gap:0 16px;align-items:center}
.phead{font-size:13px;color:var(--muted);font-weight:600}
.prow{border-top:1px solid #e6dfcc;padding:8px 6px;margin:0 -6px;border-radius:3px}
.prow.hurt{background:var(--redsoft)}
.pname{display:flex;flex-direction:column}
.pslider{display:flex;flex-direction:column;gap:1px;min-width:0}
.ptop{display:flex;justify-content:space-between;align-items:baseline}
.pnum{font-weight:700;color:var(--red)}
.pslider input[type=range]{width:100%;height:28px;margin:0;accent-color:var(--red)}
.pends{display:flex;justify-content:space-between;font-size:12px;color:var(--muted)}
.ptac summary{cursor:pointer;font-size:14px;min-height:28px;display:flex;align-items:center}
.ptac[open]{grid-column:1/-1}
.ptac .formgrid{margin-top:6px}
@media (max-width:760px){.phead{display:none}.prow{grid-template-columns:1fr;gap:6px}}

/* The recruit designer: a row of steps, one step's panels at a time, the figure beside them. */
.designer{display:flex;flex-direction:column;gap:14px}
.wsteps{display:flex;flex-wrap:wrap;gap:6px}
.wstep{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;border:1px solid var(--rule);border-radius:4px;background:var(--sheet);font:inherit;font-weight:600;color:var(--muted)}
.wstep[aria-current="step"]{border-color:var(--ink);background:var(--ink);color:#fff}
.wsn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:11px;border:1px solid currentColor;font-size:13px}
.dhead h2{margin:0;font-family:'Pirata One',Georgia,serif;font-weight:400;font-size:34px}
.dgrid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:18px;align-items:start}
.dgrid.one{grid-template-columns:minmax(0,1fr)}
.dgrid .wprev{aspect-ratio:4/5}
.wnav{justify-content:space-between}
.review dd{display:flex;flex-wrap:wrap;gap:6px;align-items:baseline}
@media (max-width:860px){.dgrid{grid-template-columns:1fr}.dgrid .wprev{aspect-ratio:auto;height:260px}.wstep{padding:0 10px}.wstep:not([aria-current="step"]) .wlbl{display:none}}

/* An empty place on the roster: a + that recruits a new warrior. */
.wcard.wadd{border-style:dashed;background:transparent}
.wplus{display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:240/280;margin-bottom:6px;font-size:72px;font-weight:300;line-height:1;color:var(--muted)}
.wcard.wadd:hover .wplus{color:var(--red)}

/* Style picker beside the attributes: each style's key attributes with this recruit's values. */
.spick{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:8px}
.sbtn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:8px 12px;min-height:44px;border:2px solid var(--rule);border-radius:4px;background:#fff;font:inherit}
.sbtn[aria-pressed="true"]{border-color:var(--red);background:var(--redsoft)}
.sbtn:hover{border-color:var(--red)}

/* Equipment: free, but its weight counts. */
.eqnote{font-size:14px;padding:10px 12px;border:1px solid var(--rule);border-left:4px solid #c58a1b;border-radius:3px;background:var(--sheet);display:flex;flex-direction:column;gap:8px}

/* Five a side: the corner plates drop the stable and gear lines (the intro card names the stables). */
.g3d-big .g3d-plate .g3d-st,.g3d-big .g3d-plate .g3d-gear{display:none}
.g3d-big .g3d-plate{padding-top:3px;padding-bottom:3px}
.g3d-big .g3d-card-f em span{font-size:12px;text-transform:uppercase;letter-spacing:.06em;color:#d8cba8}

/* Widescreen bars for the fight's big moments. */
.g3d-stage::before,.g3d-stage::after{content:'';position:absolute;left:0;right:0;height:0;background:#000;z-index:0;pointer-events:none;transition:height .45s ease}
.g3d-stage::before{top:0}.g3d-stage::after{bottom:0}
.g3d-cine .g3d-stage::before,.g3d-cine .g3d-stage::after{height:9%}
@media (prefers-reduced-motion:reduce){.g3d-stage::before,.g3d-stage::after{transition:none}}

/* Appearance: the figure large on the left, the choices beside it (stacked on narrow screens). On the
   designer's first step the whole step is one centred column. */
.lookgrid{display:grid;grid-template-columns:1fr;gap:14px}
.dgrid.one{max-width:960px;margin:0 auto;width:100%}
.dgrid.one .lookgrid{grid-template-columns:minmax(280px,420px) minmax(0,1fr);align-items:start;gap:16px 24px}
.dgrid.one .lookgrid .wprev{aspect-ratio:4/5;max-height:560px}
@media (max-width:760px){.dgrid.one .lookgrid{grid-template-columns:1fr}.dgrid.one .lookgrid .wprev{aspect-ratio:auto;height:340px}}
.dgrid.one .lookgrid .wprev{max-height:min(560px,70vh)}
.lkopts #wname{max-width:100%!important}

/* Covering the scene until the fighters' bodies and moves have loaded. */
.g3d-loading{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center;background:#14110e;color:#e9dcc0;font:600 18px/1.3 'Barlow Semi Condensed',sans-serif;letter-spacing:.04em;transition:opacity .5s}
.g3d-loading span{padding:10px 18px;border:1px solid #5a4a36}
.g3d-loading.off{opacity:0;pointer-events:none}

/* The attributes step: which style this recruit fights in, above the sliders. */
.stylenote{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 10px;padding:12px 16px;border-left:4px solid var(--red)}
.stylenote b{font-weight:700}

/* The recruit's attributes on one line (the fighting style step). */
.statline{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px;padding:10px 16px;font-size:15px}
.statline b{font-weight:700;font-variant-numeric:tabular-nums}

/* Attributes beside the fighting styles (a single column of styles); steps with nothing beside run full width. */
.dgrid.pair{grid-template-columns:minmax(0,1fr) minmax(300px,380px)}
.dgrid.pair .spick{grid-template-columns:1fr}
.dgrid.full{grid-template-columns:minmax(0,1fr)}
@media (max-width:860px){.dgrid.pair{grid-template-columns:1fr}.dgrid.pair .spick{grid-template-columns:repeat(auto-fill,minmax(200px,1fr))}}

/* The step's title on the left, back and next at the top right. */
.dhead{display:flex;justify-content:space-between;align-items:flex-start;gap:12px 20px;flex-wrap:wrap}
.dhead .wnav{justify-content:flex-end;flex-wrap:nowrap;margin-left:auto}
