:root {
  --bg: #06141c; --panel: #0d2230; --panel2: #12303f; --line: #1f4a5e;
  --text: #eef6fa; --muted: #8aa7b4; --accent: #ffd23f; --accent2: #3ee08f; --sea: #3ec6c0;
  --danger: #ff5a5f; --blue: #58a6ff; --port: #ff5a50; --stbd: #3ee08f;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px); --sar: env(safe-area-inset-right, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: var(--bg); color: var(--text); overflow: hidden;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  -webkit-user-select: none; user-select: none; touch-action: none; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
canvas#game { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }
.h { font-weight: 900; font-style: italic; text-transform: uppercase; letter-spacing: .02em; }

/* ------------------------------------------------------------ HUD */
#hud { position: fixed; inset: 0; pointer-events: none; }
#hud button { pointer-events: auto; }
.box { background: rgba(5, 14, 20, .84); border: 1px solid #ffffff22; border-radius: 12px; box-shadow: 0 6px 20px #0008; }
.score { position: absolute; top: calc(10px + var(--sat)); left: calc(10px + var(--sal)); padding: 5px 11px 6px; min-width: 100px; }
.score b { display: block; font-size: 22px; font-weight: 900; font-style: italic; color: var(--accent); line-height: 1; font-variant-numeric: tabular-nums; }
.score .gold { margin-top: 3px; font-size: 12px; font-weight: 900; color: #ffe58a; font-variant-numeric: tabular-nums; white-space: nowrap; }
.score .gold i { font-style: italic; color: var(--accent2); margin-left: 4px; }
.clock { position: absolute; top: calc(10px + var(--sat)); left: 50%; transform: translateX(-50%); padding: 4px 12px 6px; text-align: center; white-space: nowrap; max-width: calc(100vw - 260px); }
.clock > b { display: block; font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock > b.low { color: var(--danger); }
.clock > span { display: block; font-size: 9.5px; font-weight: 900; letter-spacing: .1em; color: var(--sea); text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; }
.clock .goal { font-size: 11px; font-weight: 800; color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.clock .goal em { font-style: normal; color: var(--accent2); }
.pause { position: absolute; top: calc(12px + var(--sat)); right: calc(12px + var(--sar)); width: 38px; height: 38px; border-radius: 10px; border: 1px solid #ffffff2a;
  background: rgba(5, 14, 20, .8); font-weight: 900; display: grid; place-items: center; font-size: 13px; }
.nav { position: absolute; top: calc(58px + var(--sat)); right: calc(10px + var(--sar)); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.nav #wind { width: 64px; height: 64px; }
.nav #mini { width: 110px; height: 110px; border-radius: 10px; border: 1px solid #ffffff22; background: rgba(5, 14, 20, .6); }
.ship { position: absolute; top: calc(66px + var(--sat)); left: calc(10px + var(--sal)); padding: 6px 9px 6px; width: 150px; }
.ship .row { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.ship .row span { width: 38px; font-size: 9px; font-weight: 900; letter-spacing: .1em; color: var(--muted); }
.bar { flex: 1; height: 7px; border-radius: 4px; background: #ffffff16; overflow: hidden; }
.bar div { height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, #ff5a5f, #ff9a6a); transition: width .15s; }
.bar div.s { background: linear-gradient(90deg, #cfc6a8, #f4ead0); }
.bar div.c { background: linear-gradient(90deg, #8a8579, #c9c4b8); }
.ship .pos { font-size: 10px; font-weight: 900; letter-spacing: .06em; color: var(--muted); margin-top: 2px; white-space: nowrap; }
.ship .pos b { color: var(--text); font-size: 13px; font-style: italic; }
.ship .pos span.bad { color: var(--danger); animation: blink .6s steps(2) infinite; }
.ship .pos span.good { color: var(--accent2); }
@keyframes blink { 50% { opacity: .4; } }
.bossbar { position: absolute; top: calc(66px + var(--sat)); left: 50%; transform: translateX(-50%); width: min(46vw, 320px); text-align: center; }
.bossbar span { font-size: 10px; font-weight: 900; letter-spacing: .14em; color: #ff8aa5; text-shadow: 0 2px 6px #000; text-transform: uppercase; }
.bossbar .bar { height: 9px; margin-top: 3px; border: 1px solid #ffffff22; }
.bossbar .bar div { background: linear-gradient(90deg, #c8323a, #ff5a8a); }
.feed { position: absolute; top: calc(160px + var(--sat)); left: calc(10px + var(--sal)); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.feed div { background: rgba(5, 14, 20, .86); border: 1px solid #ffffff1c; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; animation: fin .2s ease-out; }
.feed div.up { color: var(--accent2); } .feed div.dn { color: #ff8a8d; } .feed div.y { color: var(--accent); } .feed div.b { color: #8fc2ff; }
@keyframes fin { from { opacity: 0; transform: translateY(-4px); } }
.tip { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(240px + var(--sab)); background: rgba(5, 14, 20, .93);
  border: 1px solid #ffffff22; border-left: 4px solid var(--accent); padding: 8px 12px; border-radius: 10px; font-size: 13px;
  width: max-content; max-width: min(92vw, 440px); line-height: 1.35; pointer-events: none; animation: fin .25s ease-out; }
.tip b { color: var(--accent); } .tip.r { border-left-color: var(--danger); } .tip.g { border-left-color: var(--accent2); }
.banner { position: absolute; top: 30%; left: 50%; transform: translate(-50%, -50%); text-align: center; pointer-events: none; }
.banner .big { font-size: 36px; color: var(--accent); text-shadow: 0 4px 20px #000a; white-space: nowrap; }
.banner .small { font-size: 13px; font-weight: 800; color: var(--text); text-shadow: 0 2px 8px #000; margin: 6px auto 0; max-width: min(86vw, 420px); }
.banner .big { max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
.banner.bad .big { color: #fff; background: var(--danger); padding: 4px 18px; border-radius: 12px; box-shadow: 0 10px 30px #ff5a5f55; }
.banner.good .big { color: #002313; background: var(--accent2); padding: 4px 18px; border-radius: 12px; box-shadow: 0 10px 30px #3ee08f55; }
.banner.pop { animation: pop .35s ease-out; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.6); opacity: 0; } }

/* stick, sail lever and round buttons */
.stick { position: fixed; width: 128px; height: 128px; border-radius: 50%; border: 2px solid #ffffff30; background: #ffffff0c; pointer-events: none; }
.stick i { position: absolute; left: 35px; top: 35px; width: 58px; height: 58px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffffffcc, #ffffff55); box-shadow: 0 4px 12px #0006; }
.sails { position: absolute; left: calc(12px + var(--sal)); bottom: calc(190px + var(--sab)); display: flex; flex-direction: column; align-items: center; gap: 4px; background: rgba(5, 14, 20, .8); border: 1px solid #ffffff22; border-radius: 14px; padding: 5px; }
.sails .sb { width: 52px; height: 36px; border-radius: 10px; background: var(--panel2); border: 1px solid #ffffff22; font-size: 15px; }
.sails .sb:active { background: #ffd23f; color: #241900; }
.sails .sl { display: flex; flex-direction: column; align-items: center; }
.sails canvas { width: 32px; height: 32px; }
.sails b { font-size: 8.5px; font-weight: 900; letter-spacing: .08em; color: var(--accent); white-space: nowrap; }
.btns { position: absolute; right: calc(14px + var(--sar)); bottom: calc(24px + var(--sab)); width: 210px; height: 220px; pointer-events: none; }
.tb { position: absolute; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 900; text-align: center; overflow: visible;
  border: 2px solid #ffffff55; box-shadow: 0 6px 16px #0008; line-height: 1.05; letter-spacing: .03em; transition: transform .08s, filter .15s; font-style: italic; text-transform: uppercase; }
.tb small { display: block; font-size: 8.5px; opacity: .85; margin-top: 3px; letter-spacing: .04em; }
.tb em { font-style: normal; font-size: 18px; line-height: 1; }
.tb:active, .tb.down { transform: scale(.93); }
.tb .k { display: none; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); background: #06141c; color: var(--text); border: 1px solid #ffffff44; border-radius: 5px; font-size: 10px; padding: 1px 5px; font-style: normal; }
body.desk .tb .k { display: block; }
/* reload: a dark sweep that empties as the guns are run out again */
.tb .rl { position: absolute; inset: -2px; border-radius: 50%; pointer-events: none; background: conic-gradient(rgba(0, 0, 0, .55) calc(var(--rl, 0) * 360deg), transparent 0); }
.tb.big { right: 0; bottom: 0; width: 100px; height: 100px; font-size: 18px; }
.tb.mid { right: 104px; bottom: 8px; width: 72px; height: 72px; font-size: 13px; }
.tb.top { right: 18px; bottom: 108px; width: 72px; height: 72px; font-size: 13px; }
.tb.sm { right: 112px; bottom: 96px; width: 54px; height: 54px; font-size: 11px; }
.tb.sm2 { right: 98px; bottom: 160px; width: 52px; height: 52px; font-size: 11px; }
.tb.sm3 { right: 30px; bottom: 186px; width: 52px; height: 52px; font-size: 10px; }
.tb.sm3 small { font-size: 8px; margin-top: 1px; }
.y { background: radial-gradient(circle at 35% 30%, #ffe98a, #f0b400); color: #241900; }
.gr { background: radial-gradient(circle at 35% 30%, #8ff7c1, #1fb46d); color: #002313; }
.or { background: radial-gradient(circle at 35% 30%, #ffd08a, #f08a00); color: #2a1600; }
.rd { background: radial-gradient(circle at 35% 30%, #ff9a9d, #c8323a); color: #fff; }
.gy { background: radial-gradient(circle at 35% 30%, #59646b, #2c3438); color: #fff; }
.cc { background: radial-gradient(circle at 35% 30%, #f0f2f4, #8c9298); color: #1b1f22; }
.tb.on { box-shadow: 0 0 0 5px #ffffff38, 0 0 0 11px #ffffff14, 0 6px 16px #0008; }
.tb.off { filter: saturate(.3) brightness(.7); }
.boardbtn { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(190px + var(--sab)); padding: 12px 26px 9px; border-radius: 16px;
  background: linear-gradient(180deg, #ffe066, #f0b400); color: #241900; font-size: 20px; box-shadow: 0 8px 26px #f0b40066; text-align: center; line-height: 1; animation: pulse 1s ease-in-out infinite; }
.boardbtn small { display: block; font-size: 9.5px; letter-spacing: .1em; margin-top: 3px; opacity: .75; }
body:not(.desk) .boardbtn small { display: none; }
@keyframes pulse { 50% { box-shadow: 0 8px 36px #ffd23faa; } }
.boardui { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -46%); width: min(92vw, 330px); text-align: center; background: rgba(5, 14, 20, .9);
  border: 1px solid #ffd23f55; border-radius: 18px; padding: 10px 14px 14px; box-shadow: 0 16px 40px #000a; pointer-events: auto; }
.boardui .bt { font-size: 24px; color: var(--accent); }
.boardui .crews { display: flex; justify-content: space-between; margin-top: 6px; }
.boardui .crews div { text-align: left; } .boardui .crews div + div { text-align: right; }
.boardui .crews span { display: block; font-size: 9.5px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.boardui .crews b { font-size: 22px; font-style: italic; }
.boardui .cbar { height: 10px; border-radius: 5px; background: #ff5a5f; overflow: hidden; margin: 4px 0 6px; }
.boardui .cbar div { height: 100%; width: 50%; background: var(--accent2); transition: width .1s; }
.boardui canvas { width: 150px; height: 150px; }
.charge { display: block; width: 100%; padding: 12px; border-radius: 14px; background: linear-gradient(180deg, #ff9a9d, #c8323a); color: #fff; font-size: 22px; box-shadow: 0 8px 20px #c8323a55; }
.charge small { display: block; font-size: 9.5px; letter-spacing: .08em; opacity: .85; font-style: normal; text-transform: none; font-weight: 700; }
.charge:active { transform: scale(.97); }
.keys { position: absolute; left: 50%; bottom: calc(10px + var(--sab)); transform: translateX(-50%); display: flex; gap: 6px; white-space: nowrap; }
.keys div { background: rgba(5, 14, 20, .86); border: 1px solid #ffffff22; border-radius: 8px; padding: 4px 9px; font-size: 11px; font-weight: 700; color: var(--muted); }
.keys b { color: var(--text); background: #ffffff14; border-radius: 4px; padding: 0 5px; margin-right: 4px; }
body.desk .btns { transform: scale(.85); transform-origin: right bottom; bottom: calc(46px + var(--sab)); }
body.desk .sails { bottom: 56px; }
body.desk .tip { bottom: 150px; }
body.desk .boardbtn { bottom: 150px; }
@media (orientation: landscape) and (max-height: 520px) {
  .btns { transform: scale(.74); transform-origin: right bottom; }
  .sails { bottom: calc(12px + var(--sab)); left: calc(12px + var(--sal)); flex-direction: row; }
  .sails .sb { width: 40px; height: 40px; }
  .ship { top: calc(10px + var(--sat)); left: calc(124px + var(--sal)); }
  .feed { top: calc(76px + var(--sat)); }
  .nav { top: calc(10px + var(--sat)); right: calc(58px + var(--sar)); flex-direction: row-reverse; align-items: flex-start; }
  .nav #mini { width: 86px; height: 86px; }
  .nav #wind { width: 56px; height: 56px; }
  .clock { max-width: calc(100vw - 520px); min-width: 150px; left: calc(50% - 30px); }
  .bossbar { top: calc(60px + var(--sat)); }
  .tip { bottom: calc(12px + var(--sab)); max-width: 38vw; font-size: 12px; }
  .boardbtn { bottom: calc(14px + var(--sab)); }
  .boardui { transform: translate(-50%, -50%) scale(.82); }
}
@media (max-width: 600px) and (orientation: portrait) {
  .clock { top: calc(56px + var(--sat)); max-width: calc(100vw - 150px); left: 10px; transform: none; text-align: left; }
  .ship { top: calc(118px + var(--sat)); }
  .feed { top: calc(206px + var(--sat)); }
  .bossbar { top: calc(14px + var(--sat)); width: calc(100vw - 210px); left: calc(124px + var(--sal)); transform: none; }
}

/* ------------------------------------------------------------ menu */
.screen { position: fixed; inset: 0; overflow-y: auto; }
#menu { background: radial-gradient(120% 60% at 50% 0%, #135a78 0%, var(--bg) 62%); touch-action: pan-y; }
.wrap { padding: calc(16px + var(--sat)) 16px calc(24px + var(--sab)); max-width: 540px; margin: 0 auto; }
.logo { text-align: center; margin: 0 0 12px; }
.logo .t1, .logo .t2 { font-size: 42px; line-height: .9; }
.logo .t1 { color: var(--sea); } .logo .t2 { color: var(--accent); }
.logo .rope { display: block; width: 210px; height: 8px; margin: 9px auto 0; border-radius: 4px; background: repeating-linear-gradient(60deg, #c9a46a 0 6px, #8a6a3a 6px 12px); }
.logo .sub { color: var(--muted); font-size: 11px; letter-spacing: .3em; margin-top: 8px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; display: block; width: 100%; }
.lbl { font-size: 11px; font-weight: 900; color: var(--muted); letter-spacing: .14em; margin-bottom: 8px; text-transform: uppercase; display: flex; justify-content: space-between; }
.lbl b { color: var(--accent); letter-spacing: .06em; }
.harbour { display: flex; align-items: center; gap: 10px; text-align: left; }
.harbour canvas { width: 80px; height: 36px; flex: 0 0 80px; }
.harbour > span { flex: 1; min-width: 0; }
.harbour .h { font-size: 15px; display: block; }
.harbour small { display: block; font-size: 11px; color: var(--muted); }
.harbour b { font-size: 20px; font-style: italic; color: var(--accent); white-space: nowrap; }
.seas { display: flex; gap: 5px; margin-bottom: 8px; }
.seas button { flex: 1; text-align: center; font-size: 10px; font-weight: 900; letter-spacing: .04em; padding: 6px 0; border-radius: 8px; background: var(--panel2); color: var(--muted); }
.seas button.sel { background: #3ec6c022; color: var(--sea); box-shadow: inset 0 0 0 1px #3ec6c066; }
.seas button.lock { opacity: .45; }
.seas button small { display: block; font-size: 9px; color: var(--accent); letter-spacing: .02em; margin-top: 1px; }
.jobs { display: grid; gap: 6px; }
.job { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 2px solid transparent; border-radius: 11px; padding: 6px 10px 6px 6px; text-align: left; width: 100%; }
.job .ic { width: 42px; height: 38px; flex: 0 0 42px; display: grid; place-items: center; font-size: 22px; background: #0004; border-radius: 8px; }
.job .nm { font-weight: 900; font-size: 13.5px; }
.job .ds { font-size: 10.5px; color: var(--muted); font-weight: 700; margin-top: 1px; }
.job .st { margin-left: auto; font-size: 15px; letter-spacing: .06em; color: #ffffff28; white-space: nowrap; }
.job .st em { font-style: normal; color: var(--accent); }
.job.sel { border-color: var(--accent); background: #2a2a10; }
.job.lock { opacity: .45; }
.seg { display: flex; gap: 6px; }
.seg button { flex: 1; background: var(--panel2); border: 1px solid var(--line); padding: 10px 2px; border-radius: 10px; font-size: 12px; }
.seg button.sel { background: var(--accent); color: #1a1400; border-color: var(--accent); }
.hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.hint b { color: var(--accent); }
.hint.big { font-size: 13.5px; color: var(--text); margin: 10px 0; }
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; font-size: 12px; }
.set { background: var(--panel2); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 6px; text-align: left; }
.set b { color: var(--accent); white-space: nowrap; }
.set.wide { grid-column: span 2; }
.go { display: block; width: 100%; padding: 14px; border-radius: 14px; background: linear-gradient(180deg, #ffe066, #f0b400); color: #241900; font-size: 20px; box-shadow: 0 8px 20px #f0b40044; text-align: center; margin-top: 4px; }
.go:disabled { filter: saturate(.2) brightness(.6); }

/* ------------------------------------------------------------ overlays */
.overlay { background: rgba(3, 10, 15, .76); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; touch-action: pan-y; }
.panel { width: 100%; max-width: 440px; padding: max(28px, calc(5vh + var(--sat))) 16px calc(24px + var(--sab)); }
.ttl { text-align: center; font-size: 34px; color: var(--accent); line-height: 1; }
.sub { text-align: center; color: var(--muted); font-size: 12px; letter-spacing: .14em; margin-top: 6px; }
.thumbbig { display: block; width: 300px; max-width: 100%; height: 120px; margin: 10px auto 0; }
.goals { display: grid; gap: 5px; margin: 6px 0 10px; }
.goals div { background: var(--panel2); border-radius: 9px; padding: 7px 10px; font-size: 12px; display: flex; gap: 10px; align-items: center; }
.goals em { font-style: normal; color: var(--accent); font-size: 14px; letter-spacing: .05em; min-width: 46px; }
.goals div.done { color: var(--accent2); }
.acts { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; margin-top: 12px; }
.acts .go { margin: 0; font-size: 16px; padding: 13px; }
.btn { padding: 13px; border-radius: 12px; text-align: center; font-size: 16px; }
.btn.ghost { background: var(--panel2); border: 1px solid var(--line); }
.stack { display: grid; gap: 8px; margin-top: 14px; }
.link { display: block; margin: 12px auto 0; color: var(--muted); font-size: 13px; }
.bigstars { display: flex; justify-content: center; gap: 10px; margin: 18px 0 6px; }
.bigstars div { width: 70px; height: 70px; display: grid; place-items: center; font-size: 58px; line-height: 1; color: #ffffff1f; }
.bigstars div.on { color: var(--accent); text-shadow: 0 0 22px #ffd23f88; animation: pop2 .4s ease-out backwards; }
.bigstars div:nth-child(2) { transform: translateY(-10px) scale(1.15); }
.bigstars div:nth-child(2).on { animation-delay: .25s; } .bigstars div:nth-child(3).on { animation-delay: .5s; }
@keyframes pop2 { from { opacity: 0; scale: .4; } }
.why { text-align: center; font-size: 12px; color: var(--muted); margin-bottom: 14px; }
.why b { color: var(--text); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.stat { background: var(--panel2); border-radius: 10px; padding: 8px 10px; }
.stat span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.stat b { font-size: 19px; font-weight: 900; font-style: italic; font-variant-numeric: tabular-nums; }
.stat b small { font-size: 11px; color: var(--accent2); font-style: normal; margin-left: 4px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 4px; }
.total b { font-size: 30px; font-style: italic; color: var(--accent); }
.best { font-size: 10px; font-weight: 900; background: var(--accent); color: #1a1400; border-radius: 6px; padding: 2px 7px; letter-spacing: .08em; vertical-align: 6px; }
.unlock { background: #3ee08f18; border: 1px solid #3ee08f55; border-radius: 12px; padding: 9px 11px; margin: 8px 0 12px; font-size: 12px; }
.unlock span { display: block; font-size: 10px; font-weight: 900; letter-spacing: .14em; color: var(--accent2); }
.unlock b { font-size: 15px; }
.howto { list-style: none; display: grid; gap: 8px; margin: 14px 0; font-size: 13px; line-height: 1.4; }
.howto li { background: var(--panel2); border-radius: 10px; padding: 8px 10px; }
.howto b { color: var(--accent); }

/* ------------------------------------------------------------ harbour */
.fleet { display: grid; gap: 6px; }
.shipcard { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 2px solid transparent; border-radius: 12px; padding: 6px 10px 6px 6px; }
.shipcard.sel { border-color: var(--accent); background: #2a2a10; }
.shipcard canvas { width: 92px; height: 44px; flex: 0 0 92px; }
.shipcard .ut { flex: 1; min-width: 0; }
.shipcard .ut b { display: block; font-size: 14px; font-style: italic; }
.shipcard .ut span { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.3; }
.shipcard .ut i { display: block; font-style: normal; font-size: 10px; font-weight: 900; color: var(--sea); letter-spacing: .04em; margin-top: 2px; }
.upgs { display: grid; gap: 6px; margin: 0 0 14px; }
.upg { display: flex; align-items: center; gap: 10px; background: var(--panel2); border-radius: 11px; padding: 6px 10px 6px 6px; }
.upg .ic { width: 44px; height: 40px; flex: 0 0 44px; display: grid; place-items: center; font-size: 22px; background: #0004; border-radius: 9px; }
.upg .ut { flex: 1; min-width: 0; }
.upg .ut b { display: block; font-size: 13.5px; }
.upg .ut span { display: block; font-size: 11px; color: var(--muted); }
.upg .ut i { font-style: normal; color: var(--accent); letter-spacing: .15em; font-size: 11px; }
.buy { background: linear-gradient(180deg, #ffe066, #f0b400); color: #241900; border-radius: 10px; padding: 8px 10px; font-size: 13px; min-width: 76px; }
.buy.off { filter: saturate(.2) brightness(.55); }
.buy.own { background: var(--panel); color: var(--accent2); border: 1px solid #3ee08f66; }

/* Studio credit and link back to the games page, the same on every Game Golem Studios title screen */
.ggs-foot { text-align: center; font-size: 11px; margin-top: 12px; }
.ggs-foot a { color: var(--muted); text-underline-offset: 2px; }

/* ------------------------------------------------------------ play together: the room card and the lobby */
.mp .mprow { display: flex; gap: 6px; margin-bottom: 6px; }
.inp { flex: 1; min-width: 0; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: 800 14px system-ui; padding: 10px 11px; user-select: text; -webkit-user-select: text; }
.inp.code { flex: 0 0 96px; text-transform: uppercase; letter-spacing: .3em; text-align: center; font-weight: 900; }
.chip { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 12px; font-weight: 900; text-transform: uppercase; font-style: italic; }
.chip.big { flex: 1; background: linear-gradient(180deg, #15475a, #0f3442); border-color: #3ec6c066; color: var(--sea); }
.hint.bad { color: #ff9a9d; }
.hint.center { text-align: center; }
#lobby { background: radial-gradient(120% 60% at 50% 0%, #135a78 0%, var(--bg) 62%); touch-action: pan-y; }
.logo.small .t1 { font-size: 34px; color: var(--accent); }
.logo.small .t1 span { letter-spacing: .12em; color: var(--sea); }
.lbs { display: grid; gap: 5px; max-height: 300px; overflow-y: auto; }
.lb { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; background: var(--panel2); border: 2px solid transparent; border-radius: 10px; padding: 6px 10px 6px 6px; }
.lb i { width: 34px; height: 30px; flex: 0 0 34px; display: grid; place-items: center; font-style: normal; font-size: 18px; background: #0004; border-radius: 7px; }
.lb b { display: block; font-size: 13px; font-style: italic; text-transform: uppercase; }
.lb small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 700; }
.lb.sel { border-color: var(--accent); background: #2a2a10; }
.lb-one b { display: block; font-size: 15px; font-style: italic; text-transform: uppercase; }
.lb-one span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.set.navy { margin-top: 8px; width: 100%; }
.set:disabled, .seg button:disabled { opacity: .7; cursor: default; }
.crews { display: grid; gap: 2px; }
.crews .tm { border-radius: 10px; padding: 4px 8px; margin-bottom: 4px; }
.crews .tm.a { background: #ffd23f12; } .crews .tm.b { background: #ff5a5f14; }
.crews .tm .lbl { margin: 2px 0; }
.pl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; padding: 5px 2px; }
.pl span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl em { font-style: italic; font-size: 11px; color: var(--sea); font-weight: 900; text-transform: uppercase; }
.pl small { font-size: 9px; color: #1a1400; background: var(--accent); border-radius: 4px; padding: 1px 5px; font-weight: 900; font-style: normal; }
.pl.me span { color: var(--accent); }
.pl.empty { color: var(--muted); font-weight: 700; font-size: 11.5px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.dot.a { background: var(--accent); } .dot.b { background: var(--danger); }
.teamsw { display: flex; gap: 6px; margin-top: 6px; }
.teamsw .chip { flex: 1; }
.teamsw .chip.a { color: var(--accent); border-color: #ffd23f66; } .teamsw .chip.b { color: #ff9a9d; border-color: #ff5a5f66; }
#btn-lstart:disabled { filter: saturate(.2) brightness(.6); }

/* ------------------------------------------------------------ cloud save card */
#m-cloud:empty { display: none; }
#m-cloud .crow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#m-cloud .chip { text-decoration: none; color: inherit; flex: 0 0 auto; }
#m-cloud .chip.big { color: var(--sea); }
#m-cloud .note { flex: 1; min-width: 170px; font-size: 11.5px; color: var(--muted); line-height: 1.35; }
#m-cloud .note b { color: var(--text); } #m-cloud .note a { color: var(--accent2); }
