/* Jolly Rally.
   System fonts only, no external hosts. A serif for anything a pirate would paint on a sign, a
   sans for everything you have to read quickly.

   The look: deep water navy, bone-white ink, and ONE accent - brass gold - for money, primary
   buttons and anything you have earned. Flat cards with hairline borders, the way the pickleball
   game this grew out of was dressed; the colours are the sea's. */

:root {
  --bg: #0c1822;
  --bg-wash: #163247;
  --panel: #132534;
  --panel2: #1a3144;
  --line: rgba(222,196,140,0.16);
  --line-strong: rgba(233,185,73,0.42);
  --ink: #f4ead8;
  --dim: #a9b6ba;
  --accent: #e9b949;
  --accent-dim: #9a7a2a;
  --good: #6fd8a0;
  --bad: #ff7a64;
  --radius: 12px;
  --serif: Georgia, "Times New Roman", "Iowan Old Style", serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(120% 90% at 50% 0%, var(--bg-wash) 0%, var(--bg) 60%);
  color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; overflow: hidden;
}
html.still *, html.still *::before, html.still *::after { transition: none !important; animation: none !important; }

#attract { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#stage { position: fixed; inset: 0; z-index: 1; }
#stage canvas { display: block; width: 100%; height: 100%; }
#app { position: fixed; inset: 0; z-index: 2; overflow-y: auto; overscroll-behavior: contain; }
#app.over { background: rgba(5,12,18,0.66); }

.screen { max-width: 1080px; margin: 0 auto; padding: clamp(18px, 4vh, 40px) clamp(14px, 3vw, 28px) 70px; }
.screen.narrow { max-width: 640px; }
.eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.eyebrow.gap, .gap { margin-top: 18px; }
.sheet-h { font-family: var(--serif); font-size: clamp(24px, 5vw, 34px); margin: 4px 0 8px; letter-spacing: -.01em; }
.sheet-h.big { font-size: clamp(32px, 7vw, 48px); }
.sub, .hint { color: var(--dim); line-height: 1.5; }
.hint { font-size: 13px; margin: 8px 0; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 18px; }
.row.between { justify-content: space-between; margin-top: 0; }
blockquote {
  margin: 12px 0 16px; padding: 10px 14px; border-left: 3px solid var(--a, var(--accent));
  background: rgba(255,255,255,0.03); font-family: var(--serif); font-style: italic; font-size: 16px; line-height: 1.5;
}

/* ---------------------------------------------------------------- buttons */

button { font: inherit; color: var(--ink); cursor: pointer; }
.wbtn {
  font-size: 14px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 16px; transition: border-color .12s ease, background .12s ease;
}
.wbtn:hover { border-color: var(--line-strong); }
.wbtn.go { background: var(--accent); border-color: var(--accent); color: #2a1a04; }
.wbtn.go:hover { background: #f4ca62; }
.wbtn.big { padding: 13px 26px; font-size: 16px; }
.wbtn.small { padding: 5px 10px; font-size: 12px; }
/* Cannot do its job right now - but still answers when pressed, with the reason. */
.wbtn.off { opacity: .5; }
.wbtn.go.off { background: var(--panel2); border-color: var(--line); color: var(--dim); }

.gold { color: var(--accent); font-weight: 800; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 5px; }
.coin { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2b0, #e9b949 45%, #9a6a1a); box-shadow: 0 0 0 1px #6a4a10; }

.sheetnote {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  background: #1f1406; color: #ffe2a0; border: 1px solid var(--accent-dim); border-radius: 10px;
  padding: 10px 16px; font-size: 14px; font-weight: 600; transition: opacity .15s ease, transform .15s ease; z-index: 20;
  max-width: calc(100vw - 40px); text-align: center;
}
.sheetnote.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------------------------------------------------------------- title */

.screen.menu { min-height: 100%; display: grid; place-items: center; }
.screen.menu::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(75% 55% at 50% 45%, rgba(6,18,28,.05), rgba(5,14,22,.55) 75%),
    linear-gradient(180deg, rgba(5,14,22,.5), rgba(5,14,22,.08) 40%, rgba(5,14,22,.66));
}
.menuwrap { width: min(560px, 100%); display: grid; gap: 16px; }
.logo { text-align: center; }
.emblem { width: 118px; height: 94px; display: block; margin: 0 auto 2px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); }
.logo h1 {
  margin: 0; font-family: var(--serif); font-size: clamp(44px, 10vw, 80px); font-weight: 700; letter-spacing: -.02em;
  line-height: .95; text-shadow: 0 6px 30px rgba(0,0,0,.65);
}
.logo h1 em { font-style: italic; color: var(--accent); }
.tagline { margin: 10px 0 0; color: #d8cdb8; font-family: var(--serif); font-style: italic; font-size: 16px; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.menubtns { display: grid; gap: 9px; }
.menubtn {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "title chev" "sub chev"; gap: 3px 12px;
  align-items: center; text-align: left; padding: 14px 18px; border-radius: var(--radius);
  background: rgba(12,26,38,.9); border: 1px solid var(--line); color: var(--ink);
}
.menubtn::after { content: "›"; grid-area: chev; color: var(--accent); font-size: 24px; font-weight: 700; line-height: 1; }
.menubtn:hover { border-color: var(--line-strong); background: rgba(20,40,56,.94); }
.menubtn.primary { border-color: var(--accent-dim); box-shadow: inset 3px 0 0 var(--accent); }
.mb-t { grid-area: title; font-size: 17px; font-weight: 800; font-family: var(--serif); }
.mb-s { grid-area: sub; font-size: 12.5px; color: var(--dim); line-height: 1.4; }

/* ---------------------------------------------------------------- forms */

.field { display: grid; gap: 6px; margin: 12px 0; }
.field span { font-size: 12px; color: var(--dim); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.field input {
  font: inherit; font-size: 18px; font-family: var(--serif); color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 10px; padding: 11px 13px;
}
.field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.flags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.flag {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); font-size: 13px; font-weight: 700;
}
.flag i { width: 26px; height: 18px; border-radius: 3px; background: var(--c); box-shadow: inset 0 0 0 2px var(--a); flex: none; }
.flag.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }

.variants { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0; }
.vcard { display: grid; gap: 4px; text-align: left; padding: 12px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.vcard b { font-family: var(--serif); font-size: 16px; }
.vcard span { font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.vcard.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.sizerow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sizebtn { padding: 8px 16px; border-radius: 999px; font-weight: 800; background: var(--panel2); border: 1px solid var(--line); }
.sizebtn.on { background: var(--ink); color: #10181e; border-color: var(--ink); }

/* ---------------------------------------------------------------- panels, cards, stats */

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.panel h4 { margin: 0 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.panel ul { margin: 0; padding-left: 18px; line-height: 1.6; font-size: 14px; }
.panel p { margin: 0; line-height: 1.55; font-size: 14px; }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.how .panel { margin-top: 12px; }
.vlist { list-style: none; padding: 0 !important; }
.vlist li { margin: 6px 0; }
.vlist b { font-family: var(--serif); color: var(--accent); margin-right: 4px; }

.cards3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sailor { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.shead { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.shead b { font-family: var(--serif); font-size: 17px; }
.shead i { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.shead .lv { margin-left: auto; font-size: 12px; color: var(--dim); }
.sblurb { margin: 0; font-size: 12.5px; color: var(--dim); line-height: 1.4; }
.stats { list-style: none; padding: 0; margin: 0; display: grid; gap: 3px; }
.stats li { display: grid; grid-template-columns: 50px 1fr 26px; align-items: center; gap: 8px; font-size: 12px; }
.stats li span { color: var(--dim); }
.stats li b { text-align: right; font-variant-numeric: tabular-nums; }
.bar { display: block; height: 6px; border-radius: 999px; background: #0c1822; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.xp { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; font-size: 11px; color: var(--dim); }
.pips { display: inline-flex; gap: 4px; margin-left: 8px; vertical-align: middle; }
.pip { width: 9px; height: 9px; border-radius: 50%; border: 1px solid var(--accent-dim); display: inline-block; }
.pip.on { background: var(--accent); border-color: var(--accent); }

/* ---------------------------------------------------------------- harbour */

.porthead { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.porthead h2 { font-family: var(--serif); font-size: clamp(28px, 6vw, 44px); margin: 2px 0 4px; }
.porthead .sub { max-width: 56ch; margin: 0; }
.purse { display: flex; gap: 14px; align-items: center; font-size: 14px; color: var(--dim); flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab { padding: 10px 14px; background: none; border: none; border-bottom: 2px solid transparent; color: var(--dim); font-weight: 800; font-size: 14px; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.crewline { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 6px; }
.crewline li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; }
.crewline li b { font-family: var(--serif); }
.crewline li i { font-style: normal; color: var(--dim); font-size: 12px; }
.crewline li .wbtn { margin-left: auto; }
.upgrades { display: grid; gap: 8px; }
.upg { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.upg b { font-family: var(--serif); font-size: 17px; }
.upg p { margin: 4px 0 0; font-size: 13px; color: var(--dim); }
.maxed { font-size: 12px; color: var(--accent); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.market p { margin-bottom: 10px; }
.champ .wbtn { margin-top: 8px; }
.portfoot { margin-top: 22px; display: flex; justify-content: flex-end; }

/* ---------------------------------------------------------------- meetings and after */

.meet .vbox, .vbox { display: grid; gap: 3px; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--c, var(--accent)); }
.vbox b { font-family: var(--serif); font-size: 18px; }
.vbox span { font-size: 13.5px; color: var(--dim); line-height: 1.45; }
.vbox em { font-style: normal; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0; }
.versus > div { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.versus p { margin: 3px 0 0; font-size: 14px; }
.stakes p { margin: 6px 0; font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.won, .lost { font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.won { background: rgba(111,216,160,.14); color: var(--good); }
.lost { background: rgba(255,122,100,.14); color: var(--bad); }
.after.won .sheet-h { color: var(--accent); }
.after.lost .sheet-h { color: var(--bad); }
.score { font-family: var(--sans); font-weight: 800; font-size: .6em; color: var(--ink); margin-left: 8px; font-variant-numeric: tabular-nums; }
.rewards { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; font-size: 15px; }
.rewards li { padding: 8px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rewards li.up { border-color: var(--accent-dim); color: var(--accent); font-weight: 700; }
.offer { margin-top: 16px; display: grid; gap: 10px; padding: 14px; border: 1px dashed var(--accent-dim); border-radius: var(--radius); }
.victory { text-align: center; }
.victory .emblem { width: 150px; height: 120px; }

.quarters .lordlist { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.lordlist li { display: grid; gap: 1px; font-size: 14px; }
.lordlist li i { font-style: normal; color: var(--dim); font-size: 12px; }
.lordlist li span { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.lordlist li.got b { color: var(--accent); }
.shiplist { list-style: none; padding: 0 !important; display: grid; gap: 6px; }
.shiplist li { display: flex; justify-content: space-between; align-items: center; }
.log ul { list-style: none; padding: 0 !important; color: var(--dim); font-size: 13px; }

/* ---------------------------------------------------------------- HUD, shared */

.hud { position: absolute; inset: 0; pointer-events: none; padding: 12px; display: grid; align-content: start; justify-items: center; gap: 4px; }
.hudhelp { position: absolute; bottom: 12px; left: 0; right: 0; text-align: center; font-size: 12px; color: #c8d4d8; text-shadow: 0 1px 6px rgba(0,0,0,.7); }
.hudhelp b { color: #fff; }
.pausebtn {
  position: absolute; top: 12px; right: 12px; pointer-events: auto; font-size: 11px; letter-spacing: .18em; line-height: 1;
  background: rgba(8,16,24,.78); color: var(--dim); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px;
}
.pause { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(4,10,16,.66); opacity: 0; pointer-events: none; transition: opacity .14s ease; z-index: 5; }
.pause.show { opacity: 1; pointer-events: auto; }
.pausecard { width: min(320px, calc(100vw - 44px)); display: flex; flex-direction: column; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; text-align: center; }
.pausecard h3 { margin: 0 0 6px; font-family: var(--serif); font-size: 17px; }
.pausecard .wbtn { width: 100%; }
.pausecard .wbtn.quit { background: none; border-color: #5a3326; color: var(--bad); }
.pausenote, .pausehint { margin: 2px 0 0; font-size: 11px; color: var(--dim); }
.pausehint b { color: var(--ink); }

.wprompt { position: absolute; left: 0; right: 0; bottom: 48px; text-align: center; font-size: 15px; font-weight: 700; color: var(--ink); opacity: 0; transform: translateY(6px); transition: opacity .16s ease, transform .16s ease; text-shadow: 0 2px 10px rgba(0,0,0,.8); }
.wprompt.show { opacity: 1; transform: none; }
.wprompt b { display: inline-block; background: var(--accent); color: #2a1a04; border-radius: 6px; padding: 1px 8px; margin-right: 6px; font-size: 12px; text-shadow: none; }

/* ---------------------------------------------------------------- at sea */

.seabar {
  pointer-events: auto; justify-self: start; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(8,16,24,.8); border: 1px solid var(--line); border-radius: 999px; padding: 6px 8px 6px 16px;
  font-size: 13px; color: var(--dim); max-width: calc(100vw - 200px);
}
.seabar b { color: var(--ink); font-variant-numeric: tabular-nums; }
.seabar .gold b { color: var(--accent); }
.seabar .sep { width: 1px; height: 12px; background: var(--line); }
.shipname { font-family: var(--serif); font-weight: 700; color: var(--ink); font-size: 14px; }
.infamy { color: var(--accent); font-weight: 700; }
.sbtn { pointer-events: auto; font-size: 12px; font-weight: 700; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; color: var(--ink); }
.sbtn:hover { border-color: var(--line-strong); }
.lords { justify-self: start; display: flex; gap: 5px; align-items: center; margin-top: 4px; padding: 4px 10px; background: rgba(8,16,24,.66); border-radius: 999px; font-size: 11px; color: var(--dim); }
.lordpip { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #6a5a3a; display: inline-block; }
.lordpip.got { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(233,185,73,.6); }
.lords span { margin-left: 4px; font-weight: 700; letter-spacing: .04em; }
.minimap { position: absolute; top: 52px; right: 12px; border-radius: 12px; border: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.windbox { position: absolute; top: 212px; right: 12px; display: flex; align-items: center; gap: 8px; background: rgba(8,16,24,.78); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 4px; font-size: 12px; color: var(--ink); }
.windrose { position: relative; width: 30px; height: 30px; border-radius: 50%; background: #0c1822; border: 1px solid var(--line); }
.windrose i, .windrose em { position: absolute; left: 50%; top: 50%; width: 2px; height: 24px; margin: -12px 0 0 -1px; transform-origin: 50% 50%; }
.windrose i { background: linear-gradient(180deg, transparent 0 20%, #9ad0ff 20% 100%); }
.windrose i::after { content: ""; position: absolute; left: -4px; bottom: -2px; border: 5px solid transparent; border-top: 7px solid #9ad0ff; border-bottom: 0; }
.windrose em { background: none; }
.windrose em::after { content: ""; position: absolute; left: -3px; bottom: 2px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.toast { position: absolute; top: 96px; left: 50%; transform: translate(-50%, -6px); opacity: 0; transition: opacity .2s ease, transform .2s ease; background: rgba(40,14,8,.9); border: 1px solid #a04a30; color: #ffd8c8; border-radius: 10px; padding: 9px 14px; font-size: 14px; font-weight: 600; max-width: min(520px, calc(100vw - 40px)); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.chartwrap { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; background: rgba(4,10,16,.72); opacity: 0; pointer-events: none; transition: opacity .15s ease; z-index: 4; }
.chartwrap.show { opacity: 1; pointer-events: auto; }
.chartwrap canvas { border-radius: 8px; box-shadow: 0 16px 50px rgba(0,0,0,.6); }
.shotchart { display: block; margin: 4vh auto; border-radius: 8px; }

/* ---------------------------------------------------------------- on deck */

.scoreboard { display: flex; align-items: center; gap: 14px; background: rgba(8,16,24,.8); padding: 8px 10px; border-radius: 14px; border: 1px solid var(--line); transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease; }
.scoreboard .team { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.scoreboard .team.away { justify-content: flex-end; }
.scoreboard .chip { width: 16px; height: 16px; border-radius: 4px; background: var(--c); box-shadow: inset 0 0 0 2px var(--a); flex: none; }
.scoreboard .tn { font-family: var(--serif); font-size: 13px; font-weight: 700; white-space: nowrap; max-width: 30vw; overflow: hidden; text-overflow: ellipsis; }
.pips { display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.pips b { font-size: 30px; font-weight: 800; line-height: 1; }
.pips i { font-style: normal; opacity: .4; font-size: 18px; }
.hudmeta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; font-size: 12px; color: var(--dim); background: rgba(8,16,24,.66); padding: 4px 13px; border-radius: 999px; }
.hudmeta .sep { width: 3px; height: 3px; border-radius: 50%; background: #6a7a84; }
.hudmeta .vname { color: var(--accent); font-weight: 800; font-family: var(--serif); }
.rulehint { max-width: min(520px, calc(100vw - 40px)); text-align: center; font-size: 13px; color: #e8dcc4; background: rgba(8,16,24,.6); padding: 6px 12px; border-radius: 10px; transition: opacity .6s ease; }
.rulehint.gone { opacity: 0; }
.fuse { position: relative; width: min(260px, 60vw); height: 10px; border-radius: 999px; background: rgba(8,16,24,.8); border: 1px solid var(--line); overflow: hidden; margin-top: 4px; }
.fuse i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff4a2a, #ffb347); }
.fuse span { position: absolute; right: 6px; top: -1px; font-size: 9px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.fuse:not(.lit) i { opacity: .3; }
.fuse.low { box-shadow: 0 0 16px rgba(255,74,42,.7); animation: fusePulse .4s ease-in-out infinite; }
@keyframes fusePulse { 50% { transform: scale(1.04); } }
.banner { margin-top: 58vh; font-family: var(--serif); font-size: clamp(22px, 4vw, 38px); font-weight: 700; opacity: 0; transform: scale(.86); transition: opacity .16s ease, transform .16s ease; text-shadow: 0 4px 22px rgba(0,0,0,.7); }
.banner.show { opacity: 1; transform: none; }
.banner.us { color: var(--accent); }
.banner.them { color: #ff9a84; }
.hudmsg { font-size: clamp(15px, 2.6vw, 22px); font-weight: 700; text-shadow: 0 3px 14px rgba(0,0,0,.7); }
.shottag { margin-top: 4px; display: flex; gap: 8px; justify-content: center; align-items: baseline; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: 0; transition: opacity .12s ease; text-shadow: 0 2px 12px rgba(0,0,0,.7); }
.shottag.show { opacity: .95; }
.shottag i { font-style: normal; font-size: 11px; letter-spacing: .14em; color: var(--q, #e8eef2); }
.tension { margin-top: 6px; font-size: clamp(12px, 2vw, 16px); font-weight: 900; letter-spacing: .16em; text-transform: uppercase; padding: 5px 16px; border-radius: 999px; background: rgba(8,16,24,.76); opacity: 0; transition: opacity .18s ease; }
.tension.show { opacity: 1; }
.tension.matchPointUs { color: var(--good); box-shadow: 0 0 0 1px rgba(111,216,160,.5); }
.tension.matchPointThem { color: var(--bad); box-shadow: 0 0 0 1px rgba(255,122,100,.5); }
.tension.deuce { color: var(--accent); box-shadow: 0 0 0 1px rgba(233,185,73,.5); }
.scoreboard.tense { transform: scale(calc(1 + var(--pulse, 0) * .06)); }
.scoreboard.matchPointUs { border-color: rgba(111,216,160,.6); }
.scoreboard.matchPointThem { border-color: rgba(255,122,100,.6); }
.scoreboard.deuce { border-color: rgba(233,185,73,.6); }
.refuse { position: absolute; left: 0; right: 0; top: 30vh; text-align: center; font-size: 13px; font-weight: 800; letter-spacing: .1em; color: #ffc98a; opacity: 0; transition: opacity .12s ease; }
.refuse.show { opacity: .95; }

/* ---------------------------------------------------------------- the captain builder */

.creator { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 380px; background: var(--bg); }
.cstage { position: relative; min-width: 0; }
.cstage canvas { display: block; width: 100%; height: 100%; }
.cname { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-family: var(--serif); font-size: 16px; }
.cname span { color: var(--dim); }
.cpanel { display: flex; flex-direction: column; gap: 10px; padding: 22px 20px; overflow-y: auto; border-left: 1px solid var(--line); background: var(--panel); }
.cpanel h2 { margin: 0; font-family: var(--serif); font-size: 24px; }
.cpanel .sub { margin: 0 0 4px; font-size: 13px; }
.cbtn { font-size: 14px; font-weight: 800; border-radius: 10px; padding: 12px 16px; border: 1px solid var(--line); background: var(--panel2); }
.cbtn.roll { border-color: var(--accent-dim); }
.cbtn.go { background: var(--accent); border-color: var(--accent); color: #2a1a04; margin-top: 6px; }
.crows { display: flex; flex-direction: column; gap: 2px; }
.crow { display: grid; grid-template-columns: 1fr 30px minmax(104px, auto) 30px; align-items: center; gap: 4px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.clabel { font-size: 12px; color: var(--dim); }
.cvalue { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12.5px; font-weight: 700; text-transform: capitalize; }
.cswatch { width: 13px; height: 13px; border-radius: 3px; border: 1px solid var(--line-strong); }
.cnudge { font-size: 16px; line-height: 1; background: none; color: var(--dim); border: 1px solid var(--line); border-radius: 7px; padding: 3px 0; }
.cnudge:hover { color: var(--accent); border-color: var(--accent-dim); }

#verdict { margin: 30px; padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; white-space: pre-wrap; font-size: 13px; }

/* ---------------------------------------------------------------- phones */

@media (max-width: 760px) {
  .creator { grid-template-columns: 1fr; grid-template-rows: minmax(240px, 42vh) 1fr; }
  .cpanel { border-left: none; border-top: 1px solid var(--line); padding: 16px 14px; }
  .cards3 { grid-template-columns: minmax(0, 1fr); }
  .cols2, .variants, .versus { grid-template-columns: minmax(0, 1fr); }
  .flags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seabar { max-width: calc(100vw - 150px); font-size: 12px; gap: 7px; padding-left: 12px; }
  .minimap { top: 52px; }
  .windbox { top: 172px; }
  .scoreboard { gap: 8px; padding: 6px 8px; }
  .scoreboard .team { min-width: 0; }
  .scoreboard .tn { font-size: 11px; max-width: 24vw; }
  .pips b { font-size: 24px; }
  .hudmeta { font-size: 11px; gap: 6px; }
  .rulehint { font-size: 12px; }
}
