/* Pirate Space X: the captain's ledger theme.
   Brass, parchment, dark wood and iron. Cold steel-blue is reserved for the navy. */

@font-face {
  font-family: "Bevan";
  src: url("fonts/bevan.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Alegreya";
  src: url("fonts/alegreya.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("fonts/courier-prime.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("fonts/courier-prime-bold.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --brass: #c9953f;
  --brass-light: #e6c479;
  --brass-dark: #7a5522;
  --amber: #ffb347;
  --gold: #ffd24a;
  --oxblood: #7a1f1f;
  --oxblood-hot: #c23a2c;
  --bone: #e9dcc0;
  --parchment: #e9dcc0;
  --parchment-dark: #c9b48a;
  --ink: #2a1708;
  --ink-soft: #5a3a1c;
  --void: #0b0f1a;
  --void-deep: #060910;
  --steel: #4f7fa8;
  --ice: #8fe9ff;
  --display: "Bevan", Georgia, serif;
  --body: "Alegreya", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
}

html, body {
  font-family: var(--body);
  color: var(--bone);
  background: var(--void-deep);
}

#app {
  background:
    radial-gradient(ellipse at 50% 44%, rgba(46, 34, 62, 0.35), transparent 60%),
    radial-gradient(ellipse at 18% 12%, rgba(12, 92, 100, 0.16), transparent 48%),
    #060910;
}
#void {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(30, 40, 58, 0.38), transparent 62%),
    url("assets/play_bg2.webp") center / cover no-repeat;
  filter: brightness(0.38) saturate(0.75) blur(9px);
  opacity: 0.72;
  inset: -8%;
}
#star-chart {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.82;
}
#stage {
  border: 1px solid rgba(201, 149, 63, 0.42);
  box-shadow:
    0 0 0 3px #20150c,
    0 0 0 4px rgba(201, 149, 63, 0.28),
    0 18px 70px rgba(0, 0, 0, 0.85),
    0 0 120px rgba(0, 0, 0, 0.65);
  border-radius: clamp(0px, 1.5cqw, 14px);
  background: #0b0f1a;
}
.side-glow { display: none; }

/* ---------- type ---------- */

h1, h2, h3, .logo, .btn span, .tab, .chart-card b, .loading-title,
.head-title h2, .staging-inner h2, .results-panel h2, .modal-card h2,
.hud-banner b, .level-plate strong, .scroll-level, .scroll-kicker,
.co-title, .crew-tagline, .card h3, .wax-stamp, .banner {
  font-family: var(--display);
  font-weight: 400;
}
.timer-face span, .coinbox, .menu-status b, .card-cost, .result-stat span,
.combine-meter b, .hull-score, .score-main span, .boss-name, .room-name {
  font-family: var(--mono);
}
.eyebrow, .sector, .setup-label, .mini-btn, .btn small, .tagline,
.stat-row span, .weapon-label, .buff, .result-row, .crew-note,
.staging-sub, .staging-hint, .result-sub, .card p, .modal-card p,
.loadout-line, .build, .legend-strip {
  font-family: var(--body);
}
.eyebrow {
  color: var(--brass-light);
  text-shadow: 0 1px 0 #1a0f08;
  letter-spacing: 0.2em;
}
.logo {
  background: linear-gradient(180deg, #fff3c9 0%, #e9c16a 35%, #c9953f 60%, #8c5a1c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 0 #231306) drop-shadow(0 3px 3px rgba(0, 0, 0, 0.65));
  -webkit-text-stroke: 0;
}
.logo .logo-x b {
  color: #fff4ce;
  -webkit-text-fill-color: #fff4ce;
  text-shadow: 0 0 16px rgba(255, 210, 120, 0.45);
}
.tagline {
  color: var(--brass-light);
  font-style: italic;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #160d06, 0 2px 8px rgba(0, 0, 0, 0.8);
}

/* ---------- screens ---------- */

.screen { padding: max(12px, env(safe-area-inset-top)) 4cqw max(12px, env(safe-area-inset-bottom)); }
.menu-screen {
  background: linear-gradient(180deg, rgba(4, 7, 13, 0.04) 0%, rgba(4, 7, 13, 0.12) 35%, rgba(6, 8, 14, 0.82) 68%, #0b0f1a 100%);
}
.menu-inner {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  gap: 1.25cqh;
  padding: 1.2cqh 1cqw 0.4cqh;
}
.menu-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5em;
  flex: 0 0 auto;
}
.menu-status {
  display: flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.34em 0.6em;
  border: 1px solid rgba(201, 149, 63, 0.55);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(26, 18, 10, 0.86), rgba(8, 6, 4, 0.8));
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.18), 0 3px 10px rgba(0, 0, 0, 0.5);
  font-size: clamp(7px, 1.9cqw, 11px);
  color: var(--bone);
  white-space: nowrap;
}
.menu-status b { color: var(--brass-light); font-weight: 700; }
.status-coin { display: inline-flex; align-items: center; gap: 0.3em; }
.status-coin img { width: 1.2em; height: auto; }
.status-item { color: var(--parchment-dark); letter-spacing: 0.06em; }
.menu-topbar .mini-btn { color: var(--bone); border-color: rgba(201, 149, 63, 0.45); background: rgba(16, 11, 7, 0.7); }

.brand {
  margin-top: auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4cqh;
  padding-top: 5cqh;
}
.menu-skull {
  position: relative;
  width: min(22%, 96px);
  z-index: 2;
  margin-bottom: -4.5%;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.7));
}
.nameplate {
  position: relative;
  width: min(96%, 430px);
  aspect-ratio: 1024 / 400;
  background: url("assets/brass_plate.webp") center / 100% 100% no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3% 9%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.65));
  z-index: 1;
}
.nameplate .logo { margin: 0; line-height: 0.8; }
.nameplate .logo span { font-size: clamp(27px, 11.2cqw, 54px); }
.nameplate .logo .logo-x { font-size: clamp(25px, 10.4cqw, 50px); }
.brand .tagline { margin: 0; font-size: clamp(8px, 2.3cqw, 13px); }
.waiting-note {
  align-self: center;
  color: var(--ink);
  background: url("assets/parchment.webp") center / cover;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  box-shadow: inset 0 0 18px rgba(90, 50, 20, 0.2), 0 3px 8px rgba(0, 0, 0, 0.4);
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  padding: 0.5em 0.9em;
}
.menu-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1cqh;
  padding-top: 0.6cqh;
}
.menu-foot { display: flex; justify-content: center; align-items: center; gap: 0.7em; padding-top: 0.2cqh; }
.legend-strip { color: var(--parchment-dark); }
.legend-strip b { color: var(--brass-light); }
.build { color: rgba(233, 220, 192, 0.32); }

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

.btn,
.btn-primary,
.btn-teal,
.btn-ember,
.btn-ghost {
  position: relative;
  width: min(86%, 340px);
  min-height: clamp(48px, 7.6cqh, 74px);
  padding: 0.7em 2.1em;
  border: 2px solid var(--brass);
  border-radius: 4px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px rgba(90, 50, 20, 0.28),
    inset 0 0 24px rgba(110, 62, 24, 0.16),
    0 6px 0 #2c1a0d,
    0 10px 18px rgba(0, 0, 0, 0.45);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(15px, 4.5cqw, 25px);
  letter-spacing: 0.03em;
  text-align: center;
  align-items: center;
  text-shadow: 0 1px 0 rgba(255, 245, 220, 0.5);
  transition: transform 0.12s ease, filter 0.15s ease;
  overflow: hidden;
}
.btn::before,
.btn::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0.34em;
  height: 0.34em;
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, #f4d98e, #8a5a20 65%, #3a220c);
  box-shadow: inset 0 0 0 1px rgba(50, 28, 10, 0.6), 0 1px 2px rgba(0, 0, 0, 0.7);
}
.btn::before { left: 0.75em; }
.btn::after { right: 0.75em; }
.btn small {
  display: block;
  margin-top: 0.12em;
  font-family: var(--body);
  font-size: 0.5em;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  opacity: 1;
}
.btn:active { transform: translateY(4px); box-shadow: inset 0 0 0 2px rgba(90, 50, 20, 0.28), 0 2px 0 #2c1a0d, 0 5px 10px rgba(0, 0, 0, 0.4); }
.btn:disabled { filter: grayscale(0.7) brightness(0.72); }
.btn-ghost {
  background: linear-gradient(180deg, #2c1d12, #140d08);
  color: var(--bone);
  border-color: var(--brass-dark);
  text-shadow: 0 1px 2px #000;
}
.btn-ghost small { color: var(--parchment-dark); }
.btn-ember {
  background: linear-gradient(180deg, #6b201b, #2b0f0c);
  color: var(--bone);
  border-color: #a34a33;
  text-shadow: 0 1px 2px #000;
}
.btn-ember small { color: #e7b9a6; }
.btn-teal { background: url("assets/parchment.webp") center / cover; color: var(--ink); }
.btn-teal small { color: var(--ink-soft); }
.btn-wide { width: min(86%, 340px); }

.icon-btn {
  border: 2px solid var(--brass);
  background: radial-gradient(circle at 38% 30%, #4a2d15, #160d07 70%);
  color: var(--bone);
  box-shadow: inset 0 0 0 1px #2a1708, 0 4px 10px rgba(0, 0, 0, 0.55);
}
.icon-btn:active { transform: scale(0.95); }

.mini-btn {
  border: 1px solid rgba(201, 149, 63, 0.5);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(42, 27, 15, 0.95), rgba(12, 8, 5, 0.95));
  color: var(--parchment-dark);
  font-family: var(--body);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.14);
}
.mini-btn:active { color: var(--brass-light); }

/* ---------- loading ---------- */

#scr-loading { background: radial-gradient(circle at 50% 42%, rgba(40, 28, 20, 0.75), #06080f 72%); }
.loading-skull { width: min(34%, 150px); filter: drop-shadow(0 0 22px rgba(201, 149, 63, 0.35)); animation: floaty 2.8s ease-in-out infinite; }
.loading-title { color: var(--brass-light); text-shadow: 0 3px 0 #231306, 0 0 26px rgba(201, 149, 63, 0.25); letter-spacing: 0.05em; }
.loading-bar { background: #1a120c; border: 1px solid var(--brass-dark); }
.loading-bar i { background: linear-gradient(90deg, #8a5a20, var(--brass), var(--brass-light)); }
.loading-text { color: var(--parchment-dark); font-family: var(--body); }

/* ---------- ledger ---------- */

#scr-hangar {
  background:
    linear-gradient(180deg, rgba(8, 6, 4, 0.52), rgba(8, 6, 4, 0.9) 38%, #0b0806 100%),
    url("assets/wood_iron.webp") center / cover no-repeat;
}
#scr-hangar .scr-head { padding-bottom: 0.2em; }
.head-title h2 {
  font-size: clamp(20px, 6.1cqw, 34px);
  line-height: 0.92;
  color: var(--brass-light);
  text-shadow: 0 2px 0 #2a1708, 0 0 20px rgba(201, 149, 63, 0.2);
  letter-spacing: 0.02em;
}
.head-sub, .head-coins { color: var(--parchment-dark); font-family: var(--body); }
.head-coins { color: var(--brass-light); font-family: var(--mono); }
.captain-badge {
  border: 1px solid var(--brass);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a1b10, #100b07);
  box-shadow: inset 0 0 0 1px #3d2815;
}
.captain-badge span { color: var(--brass-light); font-family: var(--display); }
.captain-badge small { color: var(--parchment-dark); font-family: var(--body); }
.xpbar { background: #140d08; border: 1px solid var(--brass-dark); height: clamp(10px, 1.9cqh, 15px); }
.xpbar i { background: linear-gradient(90deg, #8a5a20, var(--brass), var(--brass-light)); }
.xpbar em { color: var(--bone); text-shadow: 0 1px 2px #000; font-family: var(--mono); }

.tabs { gap: clamp(3px, 0.9cqw, 6px); }
.tab {
  border: 1px solid var(--brass-dark);
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #c9b48a, #9a7a4c);
  color: var(--ink);
  box-shadow: inset 0 0 14px rgba(90, 50, 20, 0.2), 0 2px 0 rgba(0, 0, 0, 0.3);
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.04em;
  font-size: clamp(8px, 2.35cqw, 13px);
}
.tab.active {
  background: linear-gradient(180deg, #f5e6c2, #d8bd8a);
  color: #2a1708;
  border-color: var(--brass);
  box-shadow: inset 0 0 0 1px rgba(201, 149, 63, 0.45), 0 2px 0 rgba(0, 0, 0, 0.3);
}
.hangar-body { background: transparent; }
.card-grid { gap: clamp(7px, 1.9cqw, 14px); }
.card {
  border: 2px solid #8a6a3a;
  border-radius: 5px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow:
    inset 0 0 0 2px rgba(90, 50, 20, 0.2),
    inset 0 0 30px rgba(110, 62, 24, 0.18),
    0 5px 0 #1a0f08,
    0 8px 16px rgba(0, 0, 0, 0.45);
  padding: clamp(8px, 2.2cqw, 14px);
}
.card::after { display: none; }
.card.equipped { border-color: var(--brass); box-shadow: inset 0 0 0 2px rgba(201, 149, 63, 0.35), inset 0 0 30px rgba(110, 62, 24, 0.18), 0 5px 0 #1a0f08, 0 0 20px rgba(201, 149, 63, 0.16); }
.card.locked {
  background: linear-gradient(165deg, #2c2118, #120c08);
  border-color: #4a3520;
  color: #9a7a4c;
}
.card.locked .card-art img { filter: brightness(0.12) sepia(0.5) saturate(0.5); opacity: 0.75; }
.card.locked h3, .card.locked p, .card.locked .stat-row span { color: #9a7a4c; }
.card-art { height: clamp(58px, 11cqh, 112px); }
.card-art img { filter: drop-shadow(0 5px 7px rgba(50, 28, 10, 0.45)); }
.card h3 { color: var(--ink); font-size: clamp(10px, 2.9cqw, 16px); letter-spacing: 0.02em; }
.card p { color: var(--ink-soft); font-family: var(--body); font-size: clamp(7.5px, 2.15cqw, 11px); line-height: 1.32; }
.tags { gap: 0.18em; }
.stat-row { display: flex; align-items: center; gap: 0.35em; font-size: clamp(6px, 1.7cqw, 9px); font-weight: 800; letter-spacing: 0.08em; color: var(--ink-soft); text-transform: uppercase; }
.stat-row > span:first-child { width: 3.6em; }
.stat-pips { display: flex; gap: 0.18em; }
.stat-pips i {
  width: clamp(5px, 1.55cqw, 9px);
  height: clamp(5px, 1.55cqw, 9px);
  border-radius: 50%;
  display: block;
  background: radial-gradient(circle at 35% 30%, #5a3a1c, #2a1708);
  border: 1px solid rgba(90, 50, 20, 0.55);
  box-shadow: inset 0 1px 1px rgba(255, 230, 180, 0.1);
}
.stat-pips i.on { background: radial-gradient(circle at 35% 28%, #f5d889, #c9953f 60%, #6b4316); border-color: #e6c479; box-shadow: 0 0 4px rgba(255, 210, 120, 0.35); }
.card-foot { gap: 0.35em; }
.card-cost { color: #6b4316; font-family: var(--mono); font-weight: 700; }
.card-cost img { width: 1.2em; }
.card-btn {
  border-radius: 3px;
  padding: 0.55em 0.85em;
  font-family: var(--display);
  font-weight: 400;
  letter-spacing: 0.03em;
  color: var(--bone);
  background: linear-gradient(180deg, #5a3a1c, #2a1708);
  border: 1px solid var(--brass);
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.2), 0 2px 0 #120b07;
  text-shadow: 0 1px 2px #000;
}
.card-btn.own { background: linear-gradient(180deg, #2f4a3a, #152a20); border-color: #7f9c6a; color: #dfe9cf; }
.card-btn:disabled { opacity: 0.8; }
.card .lock-note { color: #8a3a26; font-family: var(--body); }
.card-seal {
  position: absolute;
  top: 4%;
  right: 4%;
  width: clamp(38px, 11cqw, 64px);
  height: clamp(36px, 10.5cqw, 60px);
  background: url("assets/wax_seal.webp") center / contain no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-9deg);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.45));
  z-index: 3;
  pointer-events: none;
}
.card-seal b {
  display: block;
  max-width: 70%;
  color: #f3dfbd;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(6px, 1.6cqw, 9px);
  line-height: 1;
  text-shadow: 0 1px 2px #4a0b09;
  letter-spacing: 0.02em;
}
.card-seal.acquired b { color: #ffe9c4; }
.card.stamping .card-seal { animation: stampIn 0.6s cubic-bezier(0.2, 1.5, 0.4, 1); }
@keyframes stampIn {
  0% { transform: scale(1.7) rotate(-18deg); opacity: 0; }
  55% { transform: scale(0.94) rotate(-7deg); opacity: 1; }
  100% { transform: scale(1) rotate(-9deg); opacity: 1; }
}
.chart-note {
  background: rgba(20, 13, 8, 0.7);
  border: 1px solid rgba(201, 149, 63, 0.35);
  color: var(--parchment-dark);
  font-family: var(--body);
}
.chart-card {
  border: 2px solid #6b4a2f;
  border-radius: 4px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow: 0 4px 0 #1a0f08, 0 7px 12px rgba(0, 0, 0, 0.4);
}
.chart-card b { color: #6b2018; }
.chart-card span { color: var(--ink-soft); }
.chart-card.sel { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(201, 149, 63, 0.5), 0 4px 0 #1a0f08; }
.chart-card.locked { filter: brightness(0.55); }
.hangar-foot { border-top: 1px solid rgba(201, 149, 63, 0.25); }
.loadout-line { color: var(--parchment-dark); }
.hangar-foot .btn { width: 100%; }

/* ---------- multiplayer ---------- */

#scr-crew {
  background:
    linear-gradient(180deg, rgba(6, 8, 14, 0.42), rgba(6, 8, 14, 0.86) 46%, #06080f 100%),
    url("assets/play_bg2.webp") center / cover no-repeat;
}
#scr-crew .head-title h2 { color: var(--brass-light); }
.mode-tabs { display: flex; gap: 0.5em; width: 100%; }
.mode-tab {
  flex: 1;
  border: 2px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #c9b48a, #9a7a4c);
  color: var(--ink);
  padding: 0.6em 0.4em;
  font-family: var(--display);
  font-size: clamp(8px, 2.4cqw, 13px);
  letter-spacing: 0.04em;
  box-shadow: inset 0 0 14px rgba(90, 50, 20, 0.2), 0 3px 0 #1a0f08;
  cursor: pointer;
  touch-action: manipulation;
}
.mode-tab.active { background: linear-gradient(180deg, #f5e6c2, #d8bd8a); border-color: var(--brass); box-shadow: inset 0 0 0 1px rgba(201, 149, 63, 0.5), 0 3px 0 #1a0f08; }
.chip {
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #2c1d12, #140d08);
  color: var(--parchment-dark);
  font-family: var(--body);
  font-weight: 700;
}
.chip.active { background: linear-gradient(180deg, #f5e6c2, #d8bd8a); color: var(--ink); border-color: var(--brass); }
.crew-note { color: var(--parchment-dark); font-family: var(--body); font-size: clamp(8px, 2.2cqw, 12px); }
.crew-actions .btn { width: 100%; max-width: none; min-height: clamp(42px, 6.2cqh, 58px); font-size: clamp(12px, 3.6cqw, 19px); }
.crew-tagline {
  margin-top: 0.4em;
  text-align: center;
  color: var(--brass-light);
  font-size: clamp(9px, 2.6cqw, 15px);
  letter-spacing: 0.12em;
  text-shadow: 0 1px 0 #1a0f08;
}
.lobby-panel {
  border: 2px solid var(--brass-dark);
  border-radius: 5px;
  background:
    linear-gradient(180deg, rgba(44, 29, 18, 0.88), rgba(12, 8, 5, 0.94)),
    url("assets/wood_iron.webp") center / cover;
  box-shadow: inset 0 0 0 1px rgba(230, 196, 121, 0.12), 0 6px 16px rgba(0, 0, 0, 0.55);
}
.room-name { color: var(--brass-light); font-family: var(--mono); }
.room-mode { color: var(--parchment-dark); font-family: var(--display); }
.crew-slots { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(6px, 1.6cqw, 10px); }
.crew-slot {
  position: relative;
  min-height: clamp(76px, 15cqh, 132px);
  border: 2px solid #5a3a1c;
  border-radius: 3px;
  background: linear-gradient(180deg, #1a120c, #0b0705);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.2em;
  padding: 0.4em 0.3em 0.3em;
  overflow: hidden;
}
.crew-slot.filled { background: linear-gradient(180deg, #2a1d12, #120b07); border-color: var(--brass-dark); }
.crew-slot.you { border-color: var(--brass); box-shadow: 0 0 0 1px rgba(201, 149, 63, 0.35) inset; }
.slot-tag {
  position: absolute;
  top: 0.3em;
  left: 0.3em;
  min-width: 1.9em;
  padding: 0.12em 0.25em;
  border-radius: 2px;
  font-family: var(--mono);
  font-size: clamp(7px, 1.9cqw, 11px);
  font-weight: 700;
  text-align: center;
  color: #1a0f08;
  background: var(--brass);
}
.slot-tag.p2 { background: #9e2b24; color: #f5e6c2; }
.slot-tag.p3 { background: #e9dcc0; color: #2a1708; }
.slot-tag.p4 { background: #6fbfb5; color: #10221f; }
.slot-ship { width: 34%; max-height: 58%; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6)); }
.slot-name { font-family: var(--body); font-size: clamp(7.5px, 2.05cqw, 11px); color: var(--bone); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-state { font-family: var(--body); font-size: clamp(6px, 1.7cqw, 9px); font-weight: 800; letter-spacing: 0.06em; }
.slot-state.ready { color: #b9d49b; }
.slot-state.waiting { color: var(--amber); }
.crew-slot .you-tag { position: absolute; top: 0.35em; right: 0.35em; font-size: clamp(6px, 1.6cqw, 9px); color: var(--brass-light); letter-spacing: 0.08em; }
.lobby-status {
  padding: 0.6em 0.8em;
  border: 2px solid var(--brass-dark);
  border-radius: 3px;
  background: url("assets/parchment.webp") center / cover;
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(9px, 2.6cqw, 14px);
  text-align: center;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 #1a0f08;
}
.lobby-status.ready { color: #5a2a12; }
.link-row { display: flex; gap: 0.4em; }
.link-row input {
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: #120c08;
  color: var(--brass-light);
  font-family: var(--mono);
}
.lobby-actions .mini-btn { padding: 0.7em 0.3em; }
.lobby-refused { background: rgba(122, 31, 31, 0.25); border: 1px solid #a34a33; color: #ffcdb8; font-family: var(--body); }

/* ---------- staging ---------- */

.staging-screen {
  background:
    radial-gradient(ellipse at 50% 45%, rgba(18, 14, 12, 0.72), rgba(4, 6, 10, 0.94)),
    url("assets/play_bg2.webp") center / cover no-repeat;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.staging-inner h2 { color: var(--brass-light); text-shadow: 0 3px 0 #231306, 0 0 30px rgba(201, 149, 63, 0.2); }
.staging-sub { color: var(--parchment-dark); font-family: var(--body); }
.vote-card {
  border: 2px solid #6b4a2f;
  border-radius: 4px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow: 0 5px 0 #1a0f08, 0 8px 14px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.vote-card b { color: var(--ink); font-family: var(--display); font-weight: 400; }
.vote-card small { color: var(--ink-soft); font-family: var(--body); }
.vote-icon { color: #6b2018; filter: drop-shadow(0 2px 0 rgba(90, 50, 20, 0.35)); }
.vote-card em { color: rgba(90, 50, 20, 0.35); font-family: var(--display); }
.vote-card.mine { border-color: var(--brass); box-shadow: 0 0 0 2px rgba(201, 149, 63, 0.45), 0 5px 0 #1a0f08, 0 0 22px rgba(201, 149, 63, 0.15); }
.vote-card.mine em { color: #6b2018; }
.stage-seat {
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #2c1d12, #120b07);
  color: var(--bone);
  font-family: var(--body);
}
.stage-seat.you { border-color: var(--brass); color: var(--brass-light); }
.stage-seat span { color: var(--parchment-dark); }
.staging-count { color: var(--brass-light); font-family: var(--display); text-shadow: 0 2px 0 #231306; }
.staging-hint { color: var(--parchment-dark); font-family: var(--body); }

/* ---------- results ---------- */

.results-screen {
  background:
    radial-gradient(ellipse at 50% 42%, rgba(20, 16, 12, 0.62), rgba(4, 6, 10, 0.94)),
    url("assets/play_bg2.webp") center / cover no-repeat;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.results-panel {
  border: 2px solid var(--brass);
  border-radius: 5px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(90, 50, 20, 0.22), inset 0 0 40px rgba(110, 62, 24, 0.18), 0 8px 0 #1a0f08, 0 16px 30px rgba(0, 0, 0, 0.6);
}
.results-panel h2 { color: #6b2018; text-shadow: 0 2px 0 rgba(255, 240, 210, 0.45); }
.results-panel .eyebrow { color: var(--ink-soft); text-shadow: none; }
.result-sub { color: var(--ink-soft); font-family: var(--body); }
.result-stat {
  background: rgba(90, 50, 20, 0.08);
  border: 1px solid rgba(90, 50, 20, 0.28);
}
.result-stat span { color: #6b4316; }
.result-stat small { color: var(--ink-soft); }
.result-row { background: rgba(90, 50, 20, 0.08); color: var(--ink); }
.result-row.you { background: rgba(201, 149, 63, 0.22); color: #5a2a12; }
.result-row .place { color: #6b2018; }
.result-row .rval { color: var(--ink-soft); }
.result-actions .btn { width: 100%; max-width: none; }

/* ---------- HUD ---------- */

.hud-banner {
  position: absolute;
  top: max(4px, 0.5cqh);
  left: 50%;
  transform: translateX(-50%);
  width: min(92cqw, 500px);
  height: clamp(30px, 4.8cqh, 46px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7em;
  border: 2px solid var(--brass);
  border-radius: 3px;
  background: linear-gradient(180deg, #3a2514 0%, #1a0f08 55%, #0c0805 100%);
  box-shadow: inset 0 0 0 1px rgba(230, 196, 121, 0.22), 0 4px 10px rgba(0, 0, 0, 0.7), 0 0 22px rgba(201, 149, 63, 0.12);
  z-index: 2;
}
.hud-banner b {
  color: var(--brass-light);
  font-size: clamp(13px, 4.1cqw, 23px);
  letter-spacing: 0.06em;
  text-shadow: 0 2px 0 #231306, 0 0 14px rgba(201, 149, 63, 0.25);
  white-space: nowrap;
}
.banner-skull { width: clamp(16px, 4.6cqw, 27px); height: auto; opacity: 0.95; filter: drop-shadow(0 1px 2px #000); }
.hud-top {
  position: absolute;
  top: calc(max(4px, 0.5cqh) + clamp(34px, 5.5cqh, 52px));
  left: 2.6cqw;
  right: 2.6cqw;
  display: flex;
  align-items: stretch;
  gap: 1.6cqw;
}
.level-plate {
  align-self: center;
  display: flex;
  align-items: baseline;
  gap: 0.28em;
  padding: 0.32em 0.58em;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a1b10, #0e0906);
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.15), 0 2px 6px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}
.level-plate span { font-family: var(--body); font-size: clamp(7px, 2cqw, 11px); font-weight: 800; letter-spacing: 0.1em; color: var(--parchment-dark); }
.level-plate strong { color: var(--brass-light); font-family: var(--display); font-size: clamp(15px, 4.5cqw, 26px); line-height: 1; }
.timer-dial {
  flex: 1;
  min-width: 0;
  position: relative;
  padding: 0.25em 0.55em 0.4em;
  border: 2px solid var(--brass);
  border-radius: 4px;
  background: linear-gradient(180deg, #24170d, #0a0705);
  box-shadow: inset 0 0 0 1px rgba(230, 196, 121, 0.16), inset 0 0 18px rgba(0, 0, 0, 0.5), 0 3px 8px rgba(0, 0, 0, 0.55);
}
.timer-face { text-align: center; }
.timer-face span {
  color: var(--bone);
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(17px, 5.4cqw, 32px);
  line-height: 1;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 0 #000, 0 0 10px rgba(255, 210, 120, 0.15);
}
.timer-meter { height: clamp(4px, 0.9cqh, 7px); background: #140d08; border: 1px solid rgba(201, 149, 63, 0.25); margin-top: 0.18em; }
.timer-meter i { background: linear-gradient(90deg, #7a5522, var(--brass), var(--brass-light)); box-shadow: none; }
.timer-meter i.low { background: linear-gradient(90deg, #5a1111, var(--oxblood-hot), #ff8a6a); }
.timer-dial.danger { border-color: #a33a2c; animation: timerPulse 0.9s ease-in-out infinite; }
.timer-dial.danger .timer-face span { color: #ffb09a; }
.timer-dial.danger .sector { color: #d98a7a; }
@keyframes timerPulse { 50% { box-shadow: inset 0 0 0 1px rgba(255, 120, 90, 0.4), 0 0 18px rgba(180, 40, 30, 0.35); } }
.sector {
  color: var(--parchment-dark);
  font-family: var(--body);
  font-size: clamp(6px, 1.7cqw, 9px);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  margin-top: 0.18em;
}
.coinbox {
  align-self: center;
  border: 1px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a1b10, #0e0906);
  color: var(--brass-light);
  font-family: var(--mono);
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.15), 0 2px 6px rgba(0, 0, 0, 0.5);
}
.coinbox img { filter: drop-shadow(0 1px 2px #000); }
.hud-score { top: calc(max(4px, 0.5cqh) + clamp(74px, 11.5cqh, 112px)); left: 3.2cqw; }
.score-main span { color: var(--bone); font-family: var(--mono); font-weight: 700; font-size: clamp(20px, 6.1cqw, 36px); text-shadow: 0 2px 0 #000; }
.score-main small { color: var(--parchment-dark); font-family: var(--body); letter-spacing: 0.18em; }
.combo { color: var(--amber); text-shadow: 0 0 10px rgba(255, 179, 71, 0.4); }
.hud-left { top: calc(max(4px, 0.5cqh) + clamp(104px, 16.2cqh, 156px)); left: 3.2cqw; max-width: 50cqw; gap: 0.2em; }
.hull-wrap { display: flex; flex-direction: column; gap: 0.2em; }
.hull-row { display: flex; align-items: center; gap: 0.32em; }
.sail-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75em;
  height: 0.9em;
  border-radius: 1px;
  background: var(--sail);
  color: #1a0f08;
  font-family: var(--mono);
  font-size: clamp(6px, 1.7cqw, 9px);
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.hull-pips { display: flex; gap: 0.18em; }
.pip { width: clamp(9px, 2.7cqw, 16px); height: clamp(6px, 1.7cqw, 10px); background: #1a120c; border: 1px solid rgba(201, 149, 63, 0.22); border-radius: 1px; transform: skewX(-14deg); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5); }
.pip.full { background: linear-gradient(180deg, var(--sail), color-mix(in srgb, var(--sail) 55%, #000)); border-color: rgba(0, 0, 0, 0.35); box-shadow: 0 0 5px color-mix(in srgb, var(--sail) 35%, transparent); }
.pip.lowfull { background: linear-gradient(180deg, #ff8a6a, #9e2b24); border-color: #4a0f0a; box-shadow: 0 0 5px rgba(180, 40, 30, 0.4); }
.hull-score { margin-left: auto; color: var(--brass-light); font-family: var(--mono); font-size: clamp(6px, 1.7cqw, 9px); }
.weapon-label { color: var(--parchment-dark); font-family: var(--body); letter-spacing: 0.12em; }
.buff { color: var(--brass-light); background: rgba(42, 27, 15, 0.85); border: 1px solid rgba(201, 149, 63, 0.35); }
.roster { top: calc(max(4px, 0.5cqh) + clamp(74px, 11.5cqh, 112px)); right: 2.6cqw; }
.roster-row {
  background: linear-gradient(180deg, rgba(42, 27, 15, 0.9), rgba(10, 7, 5, 0.85));
  border: 1px solid rgba(201, 149, 63, 0.25);
  color: var(--bone);
  font-family: var(--body);
}
.roster-row.me { border-color: var(--brass); color: var(--brass-light); }
.roster-row .dot { background: var(--sail, var(--brass)); box-shadow: none; }
.roster-row .rscore { color: var(--parchment-dark); font-family: var(--mono); }
.roster-row .rkills { color: var(--amber); font-family: var(--mono); }
.bossbar {
  border: 2px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a1b10, #0c0805);
  box-shadow: inset 0 0 0 1px rgba(230, 196, 121, 0.12), 0 3px 8px rgba(0, 0, 0, 0.55);
}
.boss-name { color: #ffc7ae; font-family: var(--display); letter-spacing: 0.08em; }
.boss-meter { background: #1a0d0a; border: 1px solid rgba(163, 58, 44, 0.45); }
.boss-meter i { background: linear-gradient(90deg, #5a1111, #c23a2c, #ffb08a); box-shadow: none; }
.combine-meter {
  position: absolute;
  left: 18cqw;
  right: 18cqw;
  bottom: clamp(88px, 13.5cqh, 128px);
  padding: 0.35em 0.6em 0.45em;
  border: 2px solid var(--brass);
  border-radius: 3px;
  background: linear-gradient(180deg, #2a1b10, #0c0805);
  box-shadow: inset 0 0 0 1px rgba(230, 196, 121, 0.14), 0 4px 12px rgba(0, 0, 0, 0.6);
}
.cm-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5em; }
.cm-head span { font-family: var(--display); font-size: clamp(7px, 2cqw, 11px); color: var(--brass-light); letter-spacing: 0.06em; }
.cm-head b { font-family: var(--mono); font-size: clamp(9px, 2.4cqw, 14px); color: var(--bone); }
.cm-bar { height: clamp(5px, 1cqh, 8px); margin-top: 0.2em; background: #140d08; border: 1px solid rgba(201, 149, 63, 0.3); border-radius: 99px; overflow: hidden; }
.cm-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #7a5522, var(--brass), var(--gold)); }
.controls { bottom: max(3.2cqh, env(safe-area-inset-bottom)); left: 3.2cqw; right: 3.2cqw; }
.round-btn {
  width: clamp(58px, 17.5cqw, 94px);
  height: clamp(58px, 17.5cqw, 94px);
  border: 2px solid var(--brass);
  background:
    radial-gradient(circle at 38% 28%, rgba(230, 196, 121, 0.22), transparent 40%),
    radial-gradient(circle at 50% 55%, #4a2d15, #160d07 72%);
  box-shadow: inset 0 0 0 2px #2a1708, inset 0 0 18px rgba(0, 0, 0, 0.55), 0 5px 14px rgba(0, 0, 0, 0.6);
  color: var(--bone);
}
.round-btn .rb-icon { color: var(--brass-light); font-size: clamp(17px, 5.6cqw, 32px); }
.round-btn .rb-label { color: var(--parchment-dark); font-family: var(--body); letter-spacing: 0.08em; }
.round-btn.pause svg { width: 40%; height: 40%; fill: var(--bone); }
.round-btn.combine { border-color: var(--brass); }
.round-btn.combine .rb-icon { color: var(--amber); }
.round-btn.burst { border-color: var(--brass); }
.round-btn.burst.ready { animation: burstReady 1.1s ease-in-out infinite; }
.round-btn.burst.ready .rb-icon { color: #fff1c8; text-shadow: 0 0 12px #ffd24a; }
@keyframes burstReady { 50% { box-shadow: inset 0 0 0 2px #2a1708, 0 0 34px rgba(255, 210, 74, 0.5); } }
.charge-ring { background: conic-gradient(var(--gold) calc(var(--charge, 0) * 1%), rgba(201, 149, 63, 0.15) 0); }
.banner { color: var(--brass-light); text-shadow: 0 3px 0 #231306, 0 0 34px rgba(201, 149, 63, 0.35); }
.banner small { color: var(--amber); font-family: var(--body); }
.respawn-note { color: #ffc3ae; font-family: var(--body); }
.hud-toast {
  border: 2px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(42, 27, 15, 0.95), rgba(10, 7, 5, 0.95));
  color: var(--brass-light);
  font-family: var(--body);
}
#damageFlash { box-shadow: inset 0 0 90px 30px rgba(122, 31, 31, 0.85); }

/* ---------- mission parchment card ---------- */

.level-card {
  position: absolute;
  inset: 0;
  z-index: 56;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 5cqw;
  background: rgba(4, 6, 10, 0.52);
  pointer-events: none;
}
.level-card.hidden { display: none; }
.scroll-roller {
  width: min(82%, 380px);
  height: clamp(12px, 2cqh, 20px);
  border: 1px solid var(--brass);
  border-radius: 99px;
  background: linear-gradient(180deg, #6b4a2f, #2a1708 55%, #0c0805);
  box-shadow: inset 0 1px 0 rgba(230, 196, 121, 0.25), 0 3px 8px rgba(0, 0, 0, 0.55);
  position: relative;
  z-index: 2;
}
.scroll-roller::before, .scroll-roller::after {
  content: "";
  position: absolute;
  top: 50%;
  width: clamp(12px, 3cqw, 20px);
  height: clamp(12px, 3cqw, 20px);
  border-radius: 50%;
  transform: translateY(-50%);
  background: radial-gradient(circle at 35% 30%, var(--brass-light), #6b4316 60%, #1a0f08);
  border: 1px solid #2a1708;
}
.scroll-roller::before { left: -6px; }
.scroll-roller::after { right: -6px; }
.scroll-paper {
  position: relative;
  width: min(78%, 360px);
  max-height: 74cqh;
  overflow: hidden;
  padding: clamp(14px, 3.6cqw, 26px) clamp(12px, 3.2cqw, 24px) clamp(18px, 4.6cqw, 34px);
  background: url("assets/parchment.webp") center / cover no-repeat;
  border-left: 2px solid #9a7a4c;
  border-right: 2px solid #9a7a4c;
  color: var(--ink);
  text-align: center;
  box-shadow: inset 0 0 40px rgba(110, 62, 24, 0.18), 0 10px 20px rgba(0, 0, 0, 0.5);
  animation: unroll 0.55s cubic-bezier(0.2, 1.3, 0.4, 1);
}
@keyframes unroll {
  0% { transform: scaleY(0.08); opacity: 0; }
  55% { transform: scaleY(1.03); opacity: 1; }
  100% { transform: scaleY(1); }
}
.scroll-kicker { font-family: var(--display); font-size: clamp(13px, 3.8cqw, 22px); letter-spacing: 0.06em; color: #4a2a12; }
.scroll-level { font-family: var(--display); font-size: clamp(34px, 10.5cqw, 64px); line-height: 1; color: #3a1a0e; margin: 0.12em 0 0.2em; }
.scroll-rows { display: flex; flex-direction: column; gap: 0.18em; margin: 0.2em 0 0.5em; }
.scroll-rows div { display: flex; justify-content: space-between; gap: 0.6em; padding: 0.2em 0; border-bottom: 1px solid rgba(90, 50, 20, 0.25); font-family: var(--body); font-size: clamp(8px, 2.3cqw, 13px); font-weight: 700; color: #4a2a12; }
.scroll-rows b { font-family: var(--mono); font-weight: 700; color: #2a1708; }
.scroll-chest { display: block; width: min(58%, 190px); margin: 0.1em auto 0; filter: drop-shadow(0 5px 7px rgba(50, 28, 10, 0.4)); }
.wax-stamp {
  position: absolute;
  right: 4%;
  bottom: 4%;
  width: clamp(58px, 16cqw, 96px);
  height: clamp(56px, 15.5cqw, 92px);
  background: url("assets/wax_seal.webp") center / contain no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffe9c4;
  font-family: var(--display);
  font-size: clamp(7px, 1.9cqw, 12px);
  letter-spacing: 0.04em;
  text-shadow: 0 1px 2px #4a0b09;
  transform: rotate(-8deg);
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.4));
}

/* ---------- combine moment ---------- */

.combine-overlay {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2cqh;
  background: radial-gradient(circle at 50% 52%, rgba(255, 210, 74, 0.24), rgba(4, 6, 10, 0.62) 68%);
  pointer-events: none;
  animation: coIn 0.25s ease-out;
}
.combine-overlay.hidden { display: none; }
@keyframes coIn { from { opacity: 0; } to { opacity: 1; } }
.co-ring {
  position: absolute;
  width: min(74cqw, 430px);
  height: min(74cqw, 430px);
  border-radius: 50%;
  border: 3px solid rgba(255, 210, 74, 0.8);
  box-shadow: 0 0 30px rgba(255, 210, 74, 0.35), inset 0 0 40px rgba(255, 210, 74, 0.16);
  animation: coRing 1.4s ease-out infinite;
}
@keyframes coRing { 0% { transform: scale(0.72); opacity: 0.9; } 100% { transform: scale(1.12); opacity: 0; } }
.co-title { position: relative; color: var(--gold); font-family: var(--display); font-size: clamp(20px, 6.2cqw, 38px); text-align: center; text-shadow: 0 2px 0 #231306, 0 0 24px rgba(255, 210, 74, 0.5); }
.co-sails { position: relative; display: flex; gap: 0.8em; align-items: flex-end; }
.co-sails img { width: clamp(30px, 10cqw, 64px); height: auto; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); }

/* ---------- modal + toast ---------- */

.modal {
  background: rgba(4, 6, 10, 0.8);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.modal-card {
  border: 2px solid var(--brass);
  border-radius: 5px;
  background: url("assets/parchment.webp") center / cover no-repeat;
  color: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(90, 50, 20, 0.2), inset 0 0 40px rgba(110, 62, 24, 0.18), 0 12px 30px rgba(0, 0, 0, 0.7);
}
.modal-card h2 { color: #6b2018; text-shadow: 0 2px 0 rgba(255, 240, 210, 0.4); }
.modal-card p, .modal-card .help-list li { color: var(--ink-soft); font-family: var(--body); }
.modal-card .help-list li b { color: #6b2018; font-family: var(--display); font-weight: 400; }
.modal-card .warn { color: #8a3a26; }
.modal-card .btn { width: 100%; max-width: none; }
.toast {
  border: 2px solid var(--brass-dark);
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(42, 27, 15, 0.96), rgba(10, 7, 5, 0.96));
  color: var(--brass-light);
  font-family: var(--body);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ---------- small adjustments ---------- */

.screen.active > * { transform: translate(calc(var(--look-x, 0) * 3px), calc(var(--look-y, 0) * 3px)); }
#game { touch-action: none; }
.hidden { display: none !important; }

@media (max-height: 520px) {
  .menu-topbar { display: none; }
  .brand { padding-top: 1cqh; }
  .nameplate { width: min(94%, 380px); }
  .menu-actions { gap: 0.7cqh; }
  .btn { min-height: 40px; padding: 0.48em 1.8em; }
  .btn small { display: none; }
  .hud-banner { height: 28px; }
  .hud-top { top: 34px; }
  .hud-score { top: 68px; }
  .hud-left { top: 96px; }
  .roster { top: 68px; }
  .level-card { padding: 1cqw; }
  .scroll-paper { max-height: 90cqh; }
  .scroll-chest { width: 30%; }
}
.sail-tab.p2 { color: #f5e6c2; }
.sail-tab.p3, .sail-tab.p4 { color: #1a0f08; }
.pip.full { background: var(--sail); }
.round-btn.combine { margin-right: 0; }
.round-btn.burst { margin-left: 0; }
.menu-skull { width: min(17%, 72px); margin-bottom: -3%; }
.brand .tagline {
  background: rgba(8, 6, 4, 0.55);
  border: 1px solid rgba(201, 149, 63, 0.22);
  border-radius: 2px;
  padding: 0.22em 0.75em;
}
.logo .logo-x b { color: #f5d889; -webkit-text-fill-color: #f5d889; }
.crew-slot { min-height: clamp(104px, 19cqh, 176px); }
.slot-ship { width: 52%; max-height: 64%; }
.crew-preview {
  margin-top: auto;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: clamp(10px, 3.4cqw, 22px);
  padding-top: 1.2cqh;
  opacity: 0.92;
}
.crew-preview img {
  height: clamp(30px, 6.4cqh, 58px);
  width: auto;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, 0.65));
}
.crew-tagline { margin-top: 0.5cqh; }
.crew-setup { flex: 1; display: flex; flex-direction: column; }
.card-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3em; }
.ship-flag {
  display: inline-block;
  padding: 0.1em 0.42em 0.1em 0.3em;
  font-family: var(--body);
  font-size: clamp(5.5px, 1.55cqw, 9px);
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #1a0f08;
  background: var(--flag);
  border: 1px solid rgba(42, 23, 8, 0.55);
  border-radius: 1px;
  clip-path: polygon(0 0, 100% 0, 86% 50%, 100% 100%, 0 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.28);
}
.ship-sig {
  font-family: var(--body);
  font-size: clamp(6px, 1.72cqw, 9px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #6b2018;
}
.rare-tag {
  display: inline-block;
  padding: 0.12em 0.42em;
  border: 1px solid #8a3a26;
  border-radius: 1px;
  background: #5a1c12;
  color: #ffd7b0;
  font-family: var(--body);
  font-size: clamp(5.5px, 1.5cqw, 8px);
  font-weight: 800;
  letter-spacing: 0.06em;
}
