/* Layout: full-screen isometric canvas with floating HUD panels; dark tunnel palette, single visual world */
:root {
  color-scheme: dark;
  --bg: #060c0e; --panel: #0b1a1f; --panel2: #0f232a; --line: rgba(46, 230, 214, 0.22); --edge: rgba(255, 255, 255, 0.08);
  --ink: #eaf0f6; --muted: #8e9aad; --teal: #2ee6d6; --teal-d: #0b6e66; --gold: #f2b33d; --gold-d: #8a5d0c;
  --red: #ff4a3a; --red-d: #8f0608; --violet: #a77bff; --green: #3dff9a; --shadow: rgba(0, 0, 0, 0.55);
  --display: 'Orbitron', 'Segoe UI', system-ui, sans-serif;
  --body: 'Rajdhani', 'Segoe UI', system-ui, sans-serif;
}
html, body { height: 100%; margin: 0; background: var(--bg); color: var(--ink); overflow: hidden; overscroll-behavior: none; }
/* (1.50: touch-action names panning alone, where it said manipulation, which lets two fingers zoom the page: a pinch
   that began on a button or a window, not on the map, magnified the whole game on a phone) */
body { font: 600 16px/1.3 var(--body); -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; touch-action: manipulation; touch-action: pan-x pan-y;
  -webkit-touch-callout: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
img { -webkit-user-drag: none; user-drag: none; }
input, textarea { -webkit-touch-callout: default; }
#app { position: relative; height: calc(100% - var(--sbar, 0px)); overflow: hidden; background: var(--bg); }      /* (--sbar, 1.49: the site's bar above the game) */
#cv { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
#cv:active { cursor: grabbing; }
[hidden] { display: none !important; }
.i { width: 16px; height: 16px; vertical-align: -3px; margin-right: 3px; flex: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: 0.04em; text-wrap: balance; }
h4 { font-size: 13px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.16em; margin: 16px 0 8px; }
h4 .hint { font: 600 13px var(--body); text-transform: none; letter-spacing: 0; color: var(--muted); margin-left: 6px; }

/* buttons */
.btn { font: 800 13px/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #06201d; cursor: pointer;
  background: linear-gradient(#6ff5e9, #22b7aa); border: 0; border-bottom: 4px solid var(--teal-d); border-radius: 12px;
  padding: 11px 15px 9px; box-shadow: 0 6px 14px var(--shadow); display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.btn:focus-visible, .card:focus-visible, .tcard:focus-visible, .dcard:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn.gold, .btn.raid { color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); border-bottom-color: var(--gold-d); }
.btn.red { color: #fff; background: linear-gradient(#ff6a5a, #c8211b); border-bottom-color: var(--red-d); }
.btn.ghost { color: var(--ink); background: rgba(12, 27, 33, 0.88); border: 1px solid var(--edge); border-bottom: 4px solid #040a0c; }
.btn.primary { color: #06201d; }
.btn:disabled { color: #8e9aad; background: #1c3038; border-bottom-color: #0e1b20; cursor: not-allowed; box-shadow: none; }
.btn.small { padding: 8px 11px 7px; font-size: 11px; }
.btn.big { padding: 15px 30px 13px; font-size: 18px; }
.btn .t { font: 700 11px var(--body); opacity: 0.8; text-transform: none; letter-spacing: 0; }
.cost { display: inline-flex; align-items: center; font: 800 14px var(--body); }
.cost.short { color: var(--red); }
.btn .cost.short { color: #7a0a05; }
.x { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; padding: 6px 8px; border-radius: 8px; }
.x:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }

/* HUD: the profile corner top left (level and XP, name, trophies and league, the battle log), the Devs in the middle,
   the resources stacked down the right, as Clash lays them out */
#hud-top { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  display: grid; grid-template-columns: minmax(0, auto) 1fr auto; align-items: start; gap: 8px; pointer-events: none; }
#hud-top button { pointer-events: auto; }
.hud-l { grid-column: 1; grid-row: 1; display: grid; gap: 7px; justify-items: start; min-width: 0; }
.hud-c { grid-column: 2; grid-row: 1; justify-self: center; display: flex; gap: 6px; align-items: center; margin-top: 6px; }
.res-group { grid-column: 3; grid-row: 1 / span 2; display: grid; gap: 6px; justify-items: stretch; }
.p-card { position: relative; display: flex; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; color: var(--ink); font: inherit; text-align: left; min-width: 0; max-width: min(300px, 46vw); }
.p-lv { position: relative; z-index: 1; flex: none; width: 48px; height: 48px; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.6)); }
.p-lv svg { display: block; width: 100%; height: 100%; }
.p-id { margin-left: -15px; padding: 6px 12px 7px 21px; min-width: 132px; display: grid; gap: 5px; background: rgba(7, 16, 19, 0.86); border: 1px solid var(--edge); border-left: 0;
  border-radius: 0 12px 12px 0; box-shadow: 0 6px 18px var(--shadow); min-width: 0; }
.p-nm { display: flex; align-items: center; gap: 5px; min-width: 0; }
.p-nm b { font: 800 14px var(--display); letter-spacing: 0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.p-nm .cbadge { flex: none; }
.p-xp { display: block; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, 0.1); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }
.p-xp i { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #1fa99d, #7ffff2); transition: width 0.6s ease; }
.p-su { font: 800 10px/1 var(--display); font-style: normal; letter-spacing: 0.04em; color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c);
  border-radius: 6px; padding: 4px 6px 3px; flex: none; }
.p-card.guest .p-nm b { color: #c8d2df; }
.p-card.guest { max-width: min(320px, 56vw); }    /* (1.34: room for the name beside a longer Sign up: Registrarse, Cadastrar) */
.p-card .gen { font: 900 10px/16px var(--display); font-style: normal; width: 16px; height: 16px; flex: none; border-radius: 50%; text-align: center; color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); }
.p-card:hover .p-id { border-color: var(--line); }
.p-card:focus-visible { outline: none; } .p-card:focus-visible .p-id { outline: 3px solid #fff; outline-offset: 1px; }
.p-card.lvup .p-lv { animation: lvPop 1s cubic-bezier(0.2, 1.4, 0.4, 1); }
.p-card.lvup .p-xp i { transition: none; }
@keyframes lvPop { 0% { transform: scale(1); } 28% { transform: scale(1.4) rotate(-10deg); filter: drop-shadow(0 0 12px #7ffff2); } 100% { transform: scale(1); } }
.p-row { display: flex; gap: 6px; align-items: center; padding-left: 3px; }
.chip.trophy { gap: 5px; padding: 2px 12px 2px 3px; color: var(--ink); cursor: pointer; }
.chip.trophy b { font: 800 14px var(--display); color: var(--gold); font-variant-numeric: tabular-nums; }
.p-lg svg { display: block; width: 30px; height: 30px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.chip.inbox { position: relative; padding: 8px 10px; color: var(--ink); cursor: pointer; }
.chip.inbox .bi { display: block; width: 18px; height: 18px; }
.chip.inbox .badge { top: -6px; right: -6px; }
#chip-devs { cursor: pointer; }
.res { display: flex; flex-direction: row-reverse; align-items: center; gap: 6px; padding: 5px 7px 5px 12px; background: rgba(7, 16, 19, 0.84); border: 1px solid var(--edge); border-radius: 14px; box-shadow: 0 6px 18px var(--shadow); }
.res .ico .i { width: 26px; height: 26px; margin: 0; }
.res .ico img.i.ri { width: 34px; height: 34px; margin: -4px; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.5)); }
img.i.ri { width: 19px; height: 19px; vertical-align: -4px; }
.rv { display: grid; min-width: 74px; }
.rv b { font: 800 16px var(--display); font-variant-numeric: tabular-nums; }
.rv i { font: 600 11px var(--body); color: var(--muted); font-style: normal; }
.res .rv { flex: 1; grid-template-columns: 1fr auto; align-items: baseline; column-gap: 5px; min-width: 104px; text-align: right; }
.res .rv .meter { grid-column: 1 / -1; }
.res.shards .rv { grid-template-columns: 1fr; }
.meter { height: 4px; background: rgba(255, 255, 255, 0.08); border-radius: 3px; overflow: hidden; margin-top: 2px; }
.meter span { display: block; height: 100%; width: 0; border-radius: 3px; }
.res.hash .meter span { background: var(--gold); } .res.gas .meter span { background: #cce536; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; background: rgba(7, 16, 19, 0.84); border: 1px solid var(--edge); border-radius: 999px; font: 700 13px var(--display); }
/* narrow screens: the Devs go under the profile corner */
@media (max-width: 600px) {
  .hud-c { grid-column: 1; grid-row: 2; justify-self: start; margin-top: 0; padding-left: 3px; }
  .p-lv { width: 42px; height: 42px; }
  .p-id { min-width: 104px; padding: 5px 10px 6px 18px; gap: 4px; }
  .p-nm b { font-size: 12px; }
  .p-xp { height: 6px; }
  .p-lg svg { width: 26px; height: 26px; }
  .chip.trophy b { font-size: 13px; }
  .res .rv { min-width: 84px; } .res .rv b { font-size: 14px; } .res .rv i { font-size: 10px; }
  .res { padding: 4px 6px 4px 9px; } .res .ico img.i.ri { width: 28px; height: 28px; margin: -3px; }
}
/* short screens (a phone on its side): everything a size smaller and closer together */
@media (max-height: 500px) {
  #hud-top { top: max(6px, env(safe-area-inset-top, 0px)); gap: 6px; }
  .hud-l { gap: 5px; }
  .p-lv { width: 38px; height: 38px; }
  .p-id { padding: 4px 10px 5px 17px; gap: 3px; }
  .p-nm b { font-size: 12px; }
  .p-lg svg { width: 24px; height: 24px; }
  .chip.inbox { padding: 6px 8px; }
  .res-group { gap: 4px; }
  .res { padding: 3px 6px 3px 9px; border-radius: 11px; } .res .rv b { font-size: 13px; } .res .rv { min-width: 84px; }
  .res .ico img.i.ri { width: 26px; height: 26px; margin: -3px; }
}
#hud-bottom { position: absolute; bottom: max(12px, env(safe-area-inset-bottom, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; pointer-events: none; }
#hud-bottom > *, .hb-right > * { pointer-events: auto; }
.hb-right { display: flex; gap: 8px; }
#b-raid { font-size: 20px; padding: 16px 28px 14px; border-radius: 16px; }
#b-army small { font: 700 12px var(--body); opacity: 0.75; margin-left: 4px; text-transform: none; }

/* building sheet + place bar */
.panelish { position: absolute; left: 50%; transform: translateX(-50%); width: min(560px, calc(100% - 24px)); background: rgba(8, 19, 23, 0.95);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 40px var(--shadow); padding: 14px; z-index: 5; }
/* on a narrow screen the 12 px each side is measured to the panel's edge, padding and border included (it ran 3 px
   past both edges of a phone held upright) */
@media (max-width: 700px) { .panelish { box-sizing: border-box; } }
#sheet { bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 74px); }
.sh-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 10px; align-items: center; }
.sh-head img { width: 64px; height: 54px; object-fit: contain; }
.sh-head h3 { font-size: 17px; }
.desc { margin: 8px 0 6px; color: #c5cfdc; font-weight: 500; }
.stats { display: flex; flex-wrap: wrap; gap: 6px; }
.stats span { background: var(--panel2); border: 1px solid var(--edge); border-radius: 8px; padding: 3px 8px; font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.acts .warn { flex-basis: 100%; margin: 0; font-size: 13px; }
.hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.prog { height: 8px; background: #182d34; border-radius: 6px; overflow: hidden; margin-top: 10px; }
.prog span { display: block; height: 100%; background: linear-gradient(90deg, #f2c230, #ffd77a); }
/* 1.46: what is being built or cleared, over the buttons: the bar and the line under it (they were among the buttons,
   where the bar had no width and never showed); a note under the buttons; the "i" of the short screens' strip */
.sh-busy { margin-top: 10px; }
.sh-busy .prog { margin-top: 0; }
.sh-busy p { margin: 6px 0 0; }
.sh-warn { margin: 8px 0 0; font-size: 13px; }
.sh-i { display: none; place-items: center; position: relative; flex: none; width: 20px; height: 20px; padding: 0; border-radius: 50%; cursor: pointer;
  font: 800 11px/1 var(--display); color: var(--teal); background: rgba(46, 230, 214, 0.08); border: 1.5px solid currentColor; }
.sh-i { z-index: 1; }
.sh-i::after { content: ''; position: absolute; inset: -13px; }          /* a finger's worth around it: 43 px across, over the numbers under it too */
.sh-i[aria-expanded="true"] { color: #06201d; background: var(--teal); border-color: var(--teal); }
#placebar { bottom: max(12px, env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
/* the buttons stay put on the right (a run of walls taps Place over and over); the words wrap beside them */
#place-info { display: flex; gap: 4px 10px; align-items: center; flex-wrap: wrap; flex: 1 1 auto; min-width: 0; }
.pb-btns { display: flex; gap: 8px; flex: none; }

/* modal */
.modal { position: absolute; inset: 0; background: rgba(3, 6, 8, 0.62); display: flex; align-items: center; justify-content: center; z-index: 20; padding: 12px; }
.mpanel { width: min(560px, 100%); max-height: calc(100% - 24px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px var(--shadow); padding: 16px max(16px, env(safe-area-inset-left, 0px)) 20px; }
.modal.wide .mpanel { width: min(900px, 100%); }
.mpanel header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; position: sticky; top: -16px; background: var(--panel); padding: 6px 0; z-index: 2; }
.mpanel h2 { font-size: 20px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tab { font: 700 13px var(--display); color: var(--muted); background: var(--panel2); border: 1px solid var(--edge); padding: 8px 12px; border-radius: 10px; cursor: pointer; }
.tab.on { color: #06201d; background: var(--teal); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card, .tcard { display: grid; justify-items: center; gap: 4px; background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; cursor: pointer; color: var(--ink); font: inherit; text-align: center; }
.card:hover:not(:disabled), .tcard:hover:not(:disabled) { border-color: var(--line); background: #132d36; }
.card img { width: 100%; max-width: 140px; height: 96px; object-fit: contain; }
.card b, .tcard b { font: 700 13px var(--display); }
.card .row, .tcard .row { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.card .t, .tcard .t { font-size: 12px; color: var(--muted); }
.card.dis, .tcard.dis { opacity: 0.55; cursor: not-allowed; }
.state { font-size: 12px; color: var(--gold); }
.tgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 10px; }
.tcard img { width: 84px; height: 98px; border-radius: 12px; box-shadow: 0 3px 8px rgba(0,0,0,0.45); }
.armyhead { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.armyhead .meter.big { grid-column: 1 / -1; height: 10px; }
.armyhead .meter.big span { background: var(--teal); }
.armyhead img.mini { width: 40px; height: 47px; border-radius: 7px; }
.armyrow, .qrow, .conrow, .cqrow { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ai { position: relative; }
.ai img { width: 54px; height: 63px; border-radius: 9px; box-shadow: 0 2px 6px rgba(0,0,0,0.45); }
.ai b { position: absolute; right: -4px; bottom: -2px; background: #06201d; color: var(--teal); font: 800 12px var(--display); padding: 2px 5px; border-radius: 8px; border: 1px solid var(--teal); }
.qi { position: relative; background: none; border: 0; padding: 0; cursor: pointer; color: var(--ink); }
.qi img { width: 52px; height: 61px; border-radius: 8px; opacity: 0.85; }
.qi span { position: absolute; left: 0; right: 0; bottom: -2px; font: 700 10px var(--display); text-align: center; text-shadow: 0 1px 2px #000; }
.qi i { position: absolute; top: -6px; right: -6px; font-style: normal; font-weight: 900; background: var(--red); color: #fff; border-radius: 50%; width: 20px; height: 20px; font-size: 15px; line-height: 19px; box-shadow: 0 1px 3px rgba(0,0,0,0.5); }
.qi b { position: absolute; left: -5px; top: -6px; background: #06201d; color: var(--teal); font: 800 11px var(--display); padding: 1px 5px; border-radius: 8px; border: 1px solid var(--teal); }
/* press and hold to train (1.20): the press is the game's, not the browser's (no callout, no text selection, no drag) */
.tcard, .qi, .ccard { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.tcard img, .qi img, .ai img, .ccard svg { -webkit-user-drag: none; pointer-events: none; }
.tcard { position: relative; transition: transform 0.08s ease-out; }
.tcard.held, .tcard.held:hover:not(:disabled), .ccard.held { transform: scale(0.95); border-color: var(--teal); background: #12303a; }
.qi img { transition: transform 0.08s ease-out; }
.qi.held img { transform: scale(0.9); }
#b-place { touch-action: manipulation; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; transition: transform 0.08s ease-out; }
#b-place.held { transform: scale(0.94); filter: brightness(1.15); }
.tcard .qn { position: absolute; top: 6px; right: 6px; font: 800 12px var(--display); color: #06201d; background: var(--teal); border-radius: 10px; padding: 2px 7px; box-shadow: 0 2px 4px rgba(0,0,0,0.4); }
.ccard { flex: 1 1 200px; display: grid; grid-template-columns: 46px 1fr; gap: 10px; align-items: start; text-align: left; background: var(--panel2); border: 1px solid var(--edge); border-left: 4px solid var(--c); border-radius: 12px; padding: 10px; color: var(--ink); cursor: pointer; font: inherit; }
.ccard .cci .cico { width: 46px; height: 46px; }
.ccard .ccb { display: grid; gap: 4px; min-width: 0; }
.ccard b { font: 800 14px var(--display); color: var(--c); }
.ccard .row { display: flex; gap: 8px; align-items: center; }
.ccard.dis { opacity: 0.5; cursor: not-allowed; }
.cq { font-size: 12px; padding: 3px 8px 3px 4px; border-radius: 8px; border: 1px solid var(--c); color: var(--c); display: inline-flex; align-items: center; gap: 4px; }
.cq .cico { width: 18px; height: 18px; filter: none; }
/* 1.29: troops and Contracts are free (Clash Anytime); a Contract in the army, with its − like a troop's */
.free { color: var(--teal); font: 800 11px var(--display); letter-spacing: 0.04em; text-transform: uppercase; }
.qi.con { width: 52px; height: 52px; border-radius: 10px; border: 2px solid var(--c); background: rgba(0, 0, 0, 0.35); display: grid; place-items: center; }
.qi.con .cci { display: grid; place-items: center; transition: transform 0.08s ease-out; }
.qi.con .cci svg, .qi.con .cci img { width: 32px; height: 32px; }
.qi.con.held .cci { transform: scale(0.9); }
.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.hcard { display: grid; grid-template-columns: 110px 1fr; gap: 10px; background: var(--panel2); border: 1px solid rgba(242, 179, 61, 0.25); border-radius: 16px; padding: 12px; }
.hcard.locked img { filter: grayscale(0.85) brightness(0.6); }
.hcard img { width: 110px; height: 110px; object-fit: contain; }
.hcard h3 { font-size: 16px; color: var(--gold); }
.hcard p { margin: 4px 0; font-size: 14px; font-weight: 500; color: #c5cfdc; }
.hcard .role { color: var(--muted); font-weight: 700; }
.hcard .line { color: var(--muted); font-style: italic; }
.raidopts { display: grid; gap: 10px; }
.ropt { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; text-align: left; background: var(--panel2); border: 1px solid var(--edge); border-radius: 16px; padding: 10px; color: var(--ink); cursor: pointer; font: inherit; }
.ropt img { width: 64px; height: 75px; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,0.5); }
.ropt.cartel img { border-color: var(--red); } .ropt.def img { border-color: var(--gold); }
.ropt b { font: 800 15px var(--display); display: block; margin-bottom: 2px; }
.ropt span { color: #c5cfdc; font-weight: 500; }
.ropt:hover { border-color: var(--line); }
.cline { position: relative; display: grid; gap: 10px; padding-left: 4px; }
.cline::before { content: ''; position: absolute; left: 25px; top: 20px; bottom: 20px; width: 6px; background: var(--red); border-radius: 3px; opacity: 0.85; }
.stop { position: relative; display: grid; grid-template-columns: 50px 1fr auto; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; }
.stop.locked { opacity: 0.55; }
.stop .dot { width: 38px; height: 38px; border-radius: 50%; background: #f4f1ea; border: 6px solid #0b1a1f; outline: 3px solid var(--red); display: grid; place-items: center; font: 900 14px var(--display); color: #0b1a1f; margin-left: 2px; }
.stop b { font: 800 15px var(--display); }
.stop p { margin: 3px 0 0; font-weight: 500; }
.stars { display: inline-flex; gap: 2px; margin-left: 8px; vertical-align: -4px; }
.star { width: 18px; height: 18px; fill: #273d45; stroke: #040a0c; stroke-width: 1.2; }
.star.on { fill: var(--gold); }
.howto { margin: 0; padding-left: 18px; color: #c5cfdc; font-weight: 500; display: grid; gap: 6px; }
.kit { display: flex; flex-wrap: wrap; gap: 8px; }

/* battle hud */
#bhud { position: absolute; inset: 0; pointer-events: none; }
#bhud > * { pointer-events: auto; }
#bt-top { position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px));
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
#bt-top > * { pointer-events: auto; }
#bt-name { background: rgba(7, 16, 19, 0.84); border: 1px solid var(--edge); border-radius: 14px; padding: 8px 12px; display: grid; gap: 2px; max-width: 46%; }
#bt-name b { font: 800 15px var(--display); }
#bt-name span { font-size: 14px; color: #c5cfdc; }
#bt-right { display: grid; justify-items: end; gap: 6px; }
#bt-time { font: 900 26px var(--display); font-variant-numeric: tabular-nums; text-shadow: 0 2px 8px #000; display: flex; align-items: baseline; gap: 6px; }
#bt-time small { font: 700 12px var(--display); color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
#bt-stars { display: flex; align-items: center; gap: 2px; background: rgba(7, 16, 19, 0.84); border-radius: 12px; padding: 5px 9px; border: 1px solid var(--edge); }
#bt-stars .star { width: 22px; height: 22px; }
#bt-stars b { font: 800 15px var(--display); margin-left: 6px; }
#bt-loot { font: 800 14px var(--body); display: flex; gap: 8px; text-shadow: 0 1px 4px #000; }
/* what is left to take (counts down as it is stolen) and what the raid is worth in trophies */
#bt-name .avl { display: grid; gap: 1px; margin-top: 3px; }
#bt-name .avl small { font: 700 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
#bt-name .ar { display: flex; align-items: center; gap: 6px; font: 900 17px var(--display); color: #fff; font-variant-numeric: tabular-nums; }
#bt-name .ar .i { width: 20px; height: 20px; }
#bt-name .ar em { font-style: normal; display: inline-block; transform-origin: left center; }
#bt-name .offer { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font: 800 12px var(--display); color: #c5cfdc; }
#bt-name .offer .i { width: 16px; height: 16px; }
#bt-name .offer b.w { color: #8dff7a; } #bt-name .offer b.l { color: #ff8a7a; }
#b-next .ncost { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; font-size: 11px; }
#b-next .ncost .i { width: 14px; height: 14px; }
/* the last 30 seconds: the clock turns red and beats */
#bt-time.low { color: #ff5a4a; animation: clockBeat 1s ease-in-out infinite; }
@keyframes clockBeat { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.1); } }
/* the results: what the raid cost */
.rused { display: grid; justify-items: center; gap: 6px; margin: 2px 0 4px; }
.rused small { font: 700 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.rurow { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 360px; }
.ru { position: relative; width: 40px; height: 47px; border-radius: 8px; overflow: hidden; background: #11252c; border: 1px solid #22404a; display: grid; place-items: center; }
.ru.hero { border-color: rgba(242, 179, 61, 0.7); }
.ru img { width: 40px; height: 47px; object-fit: cover; display: block; }
.ru .cico { width: 34px; height: 34px; }
.ru b { position: absolute; left: 2px; top: 2px; font: 800 10px var(--display); background: rgba(0, 0, 0, 0.78); border-radius: 5px; padding: 1px 3px; color: #fff; }
#bt-loot:empty { display: none; }
#bt-loot small { align-self: center; font: 700 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.bt-btns { display: flex; gap: 6px; }
#deploy { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(10px, env(safe-area-inset-bottom, 0px));
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 8px; background: rgba(5, 11, 13, 0.8); border: 1px solid var(--edge); border-radius: 16px; scrollbar-width: thin; }
.dcard { position: relative; flex: none; width: 70px; height: 98px; padding: 0; background: #11252c; border: 2px solid #22404a; border-radius: 12px; cursor: pointer; color: var(--ink); }
.dcard img { width: 66px; height: 77px; display: block; border-radius: 9px; }
.dcard span { position: absolute; left: 0; right: 0; bottom: 3px; font: 700 10px var(--display); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 3px; }
.dcard .cnt { position: absolute; top: 3px; left: 3px; background: rgba(0, 0, 0, 0.75); font: 800 11px var(--display); padding: 2px 5px; border-radius: 7px; }
.dcard.on { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(46, 230, 214, 0.35), 0 0 18px rgba(46, 230, 214, 0.45); }
.dcard.hero { border-color: rgba(242, 179, 61, 0.7); }
.dcard.hero.on { border-color: var(--gold); box-shadow: 0 0 18px rgba(242, 179, 61, 0.55); }
/* an ability ready: a golden glow pulsing round the card (its opacity animated, so the browser's compositor runs it
   without repainting the card every frame) */
.dcard.ability { border-color: var(--gold); box-shadow: 0 0 6px rgba(242, 179, 61, 0.4); }
.dcard.ability::before { content: ''; position: absolute; inset: -2px; border-radius: 12px; pointer-events: none; box-shadow: 0 0 22px rgba(242, 179, 61, 0.9); opacity: 0; animation: pulse 1s infinite alternate; }
.dcard.ability .cnt { background: var(--gold); color: #2a1700; }
.dcard.empty { opacity: 0.35; filter: grayscale(1); }
/* a hero on the field: health under the portrait, the ability's time running down over it (a wedge in the hero's
   colour that sweeps away clockwise), the badge reading TAP, ACTIVE, used or KO */
.dcard .hp { position: absolute; left: 6px; right: 6px; top: 69px; height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.72); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45); overflow: hidden; display: none; }
.dcard.field .hp { display: block; }
.dcard .hp b { display: block; height: 100%; width: 100%; border-radius: 3px; background: linear-gradient(#9dff7a, #2fbf3a); transition: width 0.2s ease-out; }
.dcard .hp.mid b { background: linear-gradient(#ffe27a, #e8b02a); }
.dcard .hp.low b { background: linear-gradient(#ffb07a, #ff4a3a); }
.dcard.active { border-color: var(--hc, var(--gold)); box-shadow: 0 0 16px var(--hca, rgba(242, 179, 61, 0.5)); }
.dcard.active::after { content: ''; position: absolute; inset: 0; border-radius: 10px; pointer-events: none;
  background: conic-gradient(rgba(4, 9, 11, 0.58) 0 var(--abd, 0%), var(--hcs, rgba(242, 179, 61, 0.22)) var(--abd, 0%) 100%); }
.dcard.active .cnt { background: var(--hc, var(--gold)); color: #09151a; }
.dcard.spent:not(.active) .cnt { background: rgba(0, 0, 0, 0.75); color: #9aa6b8; }
.dcard.contract .cicon { width: 66px; height: 77px; display: grid; place-items: center; font: 900 30px var(--display); color: var(--c); background: radial-gradient(circle at 50% 46%, rgba(255, 255, 255, 0.1), transparent 68%); }
.cico { display: block; width: 54px; height: 54px; filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.55)); }
/* troop level, bottom left of the portrait (gold when maxed), as on Clash's army bar */
.dcard .lv { position: absolute; left: 4px; top: 54px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 6px; font: 800 11px/17px var(--display); font-style: normal; text-align: center; color: #fff;
  background: linear-gradient(#3a3f6e, #1d2142); border: 1px solid rgba(255, 255, 255, 0.35); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); }
.dcard .lv.max { background: linear-gradient(#ffe48a, #e3a01c); color: #2a1700; border-color: #fff4c8; }
@keyframes pulse { from { opacity: 0; } to { opacity: 1; } }
.pad { padding: 8px 12px; margin: 0; }
#results { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(3, 6, 8, 0.6); z-index: 25; padding: 16px; }
.rbox { width: min(440px, 100%); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 22px 18px; box-shadow: 0 30px 80px var(--shadow); }
.rbox h2 { font-size: 30px; }
.rbox.win h2 { color: var(--gold); } .rbox.lose h2 { color: var(--red); }
.rstars { display: flex; justify-content: center; gap: 6px; margin: 10px 0; }
.rstars .star { width: 54px; height: 54px; }
.pct { font: 800 18px var(--display); margin: 4px 0; }
.rloot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 12px 0 16px; font: 800 18px var(--body); }
.rloot .i { width: 20px; height: 20px; }

/* guide, toasts, splash */
#guide { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 110px); display: flex; align-items: flex-end; gap: 8px; max-width: min(540px, calc(100% - 24px)); z-index: 30; }
#g-img { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--teal); background: #0b1a1f; flex: none; box-shadow: 0 0 24px rgba(46, 230, 214, 0.4); }
.bubble { background: rgba(8, 19, 23, 0.97); border: 1px solid var(--line); border-radius: 18px 18px 18px 4px; padding: 12px 14px; box-shadow: 0 18px 40px var(--shadow); display: grid; gap: 6px; justify-items: start; }
.bubble b { font: 800 12px var(--display); color: var(--teal); letter-spacing: 0.14em; text-transform: uppercase; }
.bubble p { margin: 0; font-weight: 600; font-size: 16px; }
#toasts { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 120px); display: grid; gap: 6px; justify-items: center; z-index: 40; pointer-events: none; width: min(520px, calc(100% - 32px)); }
.toast { background: rgba(8, 19, 23, 0.95); border: 1px solid var(--edge); border-radius: 12px; padding: 8px 14px; font-weight: 700; box-shadow: 0 10px 24px var(--shadow); transition: opacity 0.4s, transform 0.4s; text-align: center; }
.toast.out { opacity: 0; transform: translateY(8px); }
.float { position: absolute; transform: translate(-50%, 0); font: 900 18px var(--display); text-shadow: 0 2px 6px #000; pointer-events: none; animation: rise 1.1s ease-out forwards; z-index: 40; }
@keyframes rise { to { transform: translate(-50%, -50px); opacity: 0; } }
#splash { position: absolute; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: space-between; align-items: center; gap: 12px;
  padding: max(22px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(22px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  background: linear-gradient(180deg, rgba(4, 11, 13, 0.6) 0%, rgba(4, 11, 13, 0) 30%, rgba(4, 11, 13, 0) 66%, rgba(4, 11, 13, 0.92) 100%),
    var(--splash-bg, none) center bottom / cover no-repeat,
    radial-gradient(900px 500px at 50% 40%, rgba(46, 230, 214, 0.16), transparent 70%), #060c0e; }
.sp-top, .sp-bottom { display: grid; justify-items: center; gap: 8px; text-align: center; }
.sp-kicker { margin: 0; font: 700 12px var(--display); letter-spacing: 0.32em; text-transform: uppercase; color: #bfeee9; text-shadow: 0 2px 8px #000; }
#splash-img { width: min(760px, 86vw); max-height: 24vh; object-fit: contain; height: auto; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.55)); }
.sp-tag { font: 700 clamp(15px, 2.2vw, 20px) var(--display); margin: 0; letter-spacing: 0.06em; text-shadow: 0 2px 10px #000, 0 0 2px #000; }
.sp-bottom .btn.big { font-size: 22px; padding: 17px 54px 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(0, 0, 0, 0.35); }
.sp-note { color: #b9c3d2; margin: 0; font-size: 13px; text-shadow: 0 1px 4px #000; }
@media (max-aspect-ratio: 1/1) {
  #splash { background: radial-gradient(700px 420px at 50% 22%, rgba(46, 230, 214, 0.14), transparent 70%),
      linear-gradient(180deg, #060c0e 0%, #060c0e 40%, rgba(6, 12, 14, 0) 52%, rgba(6, 12, 14, 0) 74%, rgba(4, 11, 13, 0.92) 100%),
      var(--splash-bg, none) center bottom / auto 64% no-repeat, #060c0e; }
  .sp-top { margin-top: 15vh; }
}
/* 1.23: the key art carries the kicker, the logo and the tagline itself (SPRITES.splashTitled): wider than tall, it is
   shown whole from its top, the page's own title kept in place but unseen, and only its foot darkened under the
   buttons; held upright, the page's title stands over the art below its tagline (the painted logo would not fit) */
#splash.titled { background: linear-gradient(180deg, rgba(4, 11, 13, 0) 0%, rgba(4, 11, 13, 0) 70%, rgba(4, 11, 13, 0.88) 100%),
    var(--splash-bg, none) center top / cover no-repeat, #060c0e; }
#splash.titled .sp-top { visibility: hidden; }
/* a log-in or confirm form open on a short screen: the unseen title gives up its room, and the screen scrolls if the
   form is still taller (on a phone held sideways the Log in button was below the screen, out of reach) */
#splash { overflow-y: auto; }
#splash.titled:has(.login:not([hidden])) { justify-content: flex-end; }
#splash.titled:has(.login:not([hidden])) .sp-top { display: none; }
/* ...and solid: on a phone held sideways the form sits over the painted logo, which showed through its 8% of glass */
#splash.titled .login { background: #071013; }
@media (max-aspect-ratio: 1/1) {
  #splash.titled { background: radial-gradient(700px 420px at 50% 22%, rgba(46, 230, 214, 0.14), transparent 70%),
      linear-gradient(180deg, #060c0e 0%, #060c0e 34%, rgba(6, 12, 14, 0) 46%, rgba(6, 12, 14, 0) 72%, rgba(4, 11, 13, 0.9) 100%),
      var(--splash-tall, none) center bottom / auto 66% no-repeat, #060c0e; }
  #splash.titled .sp-top { visibility: visible; }
  #splash.titled:has(.login:not([hidden])) { justify-content: space-between; }
  #splash.titled:has(.login:not([hidden])) .sp-top { display: grid; }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .sp-kicker { display: none; }
  #splash-img { max-height: 19vh; }
  .sp-tag { font-size: 13px; }
  .sp-bottom .btn.big { font-size: 17px; padding: 12px 40px 10px; }
  .sp-note { font-size: 11px; }
}
@media (max-width: 640px) {
  .chip { font-size: 11px; padding: 5px 8px; }
  #b-raid { font-size: 17px; padding: 14px 20px 12px; }
  .hb-right .btn { padding: 11px 11px 9px; font-size: 12px; }
  .modal { align-items: flex-end; padding: 0; }
  .mpanel { border-radius: 20px 20px 0 0; max-height: 88%; }
  #bt-name { max-width: 60%; } #bt-time { font-size: 22px; }
  .bt-btns { flex-direction: column; align-items: flex-end; }
  #bt-name .avl small { font-size: 9px; letter-spacing: 0.1em; }
  #bt-name .ar { font-size: 15px; } #bt-name .offer { font-size: 11px; gap: 2px 8px; }
  .hcard { grid-template-columns: 84px 1fr; } .hcard img { width: 84px; height: 84px; }
}
@media (prefers-reduced-motion: reduce) { .dcard.ability::before { animation: none; opacity: 0.6; } .float { animation-duration: 0.01s; } }

/* online play: account, trophies, shields, battle log, leaderboard, overlays */
#chip-trophy:hover, #b-log:hover, #chip-devs:hover { border-color: var(--line); }
.chip.shield { color: #7ffff2; border-color: rgba(46, 230, 214, 0.45); }
#b-log { position: relative; }
.badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--red); color: #fff;
  font: 800 11px/20px var(--display); letter-spacing: 0; box-shadow: 0 0 0 2px #040a0c; }
#netbar { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(10px, env(safe-area-inset-top, 0px)) + 58px); z-index: 60;
  background: var(--red-d); color: #fff; border: 1px solid var(--red); border-radius: 999px; padding: 6px 14px; font: 700 13px var(--display); box-shadow: 0 8px 20px var(--shadow); pointer-events: none; }
#busy { position: absolute; inset: 0; z-index: 56; display: grid; place-content: center; justify-items: center; gap: 12px; background: rgba(3, 6, 8, 0.55); }
#busy-text { margin: 0; font: 700 16px var(--display); text-shadow: 0 2px 6px #000; text-align: center; padding: 0 16px; }
.spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid rgba(46, 230, 214, 0.2); border-top-color: var(--teal); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#attack { position: absolute; inset: 0; z-index: 48; display: grid; place-items: center; background: rgba(40, 4, 6, 0.74); padding: 16px; }
.abox { width: min(440px, 100%); display: grid; gap: 10px; text-align: center; background: var(--panel); border: 2px solid var(--red); border-radius: 22px; padding: 24px 18px; box-shadow: 0 0 60px rgba(255, 74, 58, 0.35); }
.abox h2 { color: var(--red); font-size: 22px; }
.abox p { margin: 0; color: #c5cfdc; font-weight: 500; }
.abox .atime { font: 800 16px var(--display); color: var(--ink); }
.login { width: min(380px, 100%); display: grid; gap: 10px; text-align: left; background: rgba(7, 16, 19, 0.92); border: 1px solid var(--line); border-radius: 20px; padding: 16px; box-shadow: 0 20px 50px var(--shadow); }
.ltabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ltab { font: 700 12px var(--display); letter-spacing: 0.04em; color: var(--muted); background: var(--panel2); border: 1px solid var(--edge); padding: 9px 6px; border-radius: 10px; cursor: pointer; }
.ltab.on { color: #06201d; background: var(--teal); border-color: var(--teal); }
.login label { display: grid; gap: 4px; }
.login label span { font: 700 11px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.login input { font: 600 17px var(--body); color: var(--ink); background: #081519; border: 1px solid #22404a; border-radius: 10px; padding: 10px 12px; min-width: 0; user-select: text; -webkit-user-select: text; }
.login input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.2); }
.lmsg { min-height: 1.3em; margin: 0; color: var(--gold); font-size: 14px; }
.login .btn.big { width: 100%; font-size: 18px; padding: 14px 20px 12px; }
.login .sp-note { text-align: center; }
.login .vwho { margin: 0; color: #dfe6ee; font-size: 14px; line-height: 1.45; }
.linkish { background: none; border: 0; padding: 0; color: #7ffff2; font: inherit; text-decoration: underline; cursor: pointer; }
#bt-name .tag { justify-self: start; font: 800 10px var(--display); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: #06201d; background: var(--teal); border-radius: 6px; padding: 2px 6px; }
#bt-name .tag.red { background: var(--red); color: #fff; }
.raidlinks { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.rbox .warn { color: var(--gold); }
.rbox .spinner { margin: 6px auto 14px; }
.loglist { display: grid; gap: 8px; }
.lrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; background: var(--panel2); border: 1px solid var(--edge); border-left: 4px solid var(--muted); border-radius: 12px; padding: 10px 12px; }
.lrow.good { border-left-color: var(--green); } .lrow.bad { border-left-color: var(--red); }
.lmain { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; min-width: 0; }
.lmain b { font: 800 15px var(--display); overflow-wrap: anywhere; }
.lmain .stars { margin-left: 0; }
.lmain .pct { font-size: 14px; margin: 0; }
.lsub { grid-column: 1; color: #c5cfdc; font-weight: 500; font-size: 14px; }
.lbtns { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.board { display: grid; gap: 4px; margin-bottom: 10px; }
.brow { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--edge); }
.brow.me { border-color: var(--teal); background: rgba(46, 230, 214, 0.08); }
.brow .rk { font: 900 14px var(--display); color: var(--muted); text-align: center; }
.brow:nth-child(1) .rk { color: var(--gold); } .brow:nth-child(2) .rk { color: #d8dee8; } .brow:nth-child(3) .rk { color: #e0955a; }
.brow b { font: 700 15px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brow .tr { font: 800 15px var(--display); color: var(--gold); display: inline-flex; align-items: center; }
.acct { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel2); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px; font-weight: 500; }
@media (max-width: 640px) {
  .lrow { grid-template-columns: minmax(0, 1fr); } .lbtns { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .brow { grid-template-columns: 30px minmax(0, 1fr) auto; } .brow .muted { display: none; }
}
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* phones: Log and Menu shrink to icons so the bottom bar fits */
.bi { display: none; width: 20px; height: 20px; }
.modal:not([hidden]) ~ #guide, #chat:not([hidden]) ~ #guide { display: none !important; }
@media (max-width: 480px) {
  .btn.iconish .bl { display: none; }
  .btn.iconish .bi { display: block; }
  .hb-right .btn.iconish { padding: 10px 10px 8px; }
  #hud-bottom, .hb-right { gap: 6px; }
  #b-raid { font-size: 16px; padding: 14px 16px 12px; }
  .hb-right .btn { padding: 11px 10px 9px; }
}
#idle { position: absolute; inset: 0; z-index: 47; display: grid; place-items: center; background: rgba(3, 6, 8, 0.72); padding: 16px; }
.abox.idlebox { border-color: var(--teal); box-shadow: 0 0 60px rgba(46, 230, 214, 0.25); justify-items: center; }
.abox.idlebox h2 { color: var(--teal); }

/* ---------------------------------------------------------------- motion: a little life in the interface */
.btn { transition: transform 0.09s ease-out, filter 0.15s ease-out, box-shadow 0.15s ease-out; }
@media (hover: hover) { .btn:hover:not(:disabled) { filter: brightness(1.1); } }
.btn:active:not(:disabled) { transform: translateY(2px) scale(0.96); }
.dcard { transition: transform 0.1s ease-out; }
.dcard:active { transform: scale(0.93); }
.res { transform-origin: 80% 50%; }
.res.bump { animation: resBump 0.38s cubic-bezier(0.3, 1.7, 0.5, 1); }
.res.bump .ico { animation: icoTwist 0.38s ease-out; }
@keyframes resBump { 0% { transform: scale(1); } 30% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes icoTwist { 0% { transform: rotate(0); } 30% { transform: rotate(-14deg) scale(1.15); } 70% { transform: rotate(8deg); } 100% { transform: rotate(0); } }
#sheet.in { animation: sheetIn 0.26s cubic-bezier(0.2, 1.35, 0.4, 1); }
/* 1.28: a building being dragged: its sheet steps out of the way until it is let go */
#sheet { transition: opacity 0.16s ease-out; }
#sheet.moving { opacity: 0; pointer-events: none; }
@keyframes sheetIn { from { transform: translateX(-50%) translateY(22px) scale(0.96); opacity: 0; } to { transform: translateX(-50%); opacity: 1; } }
.modal:not([hidden]) { animation: fadeIn 0.18s ease-out; }
.modal:not([hidden]) .mpanel { animation: panelIn 0.26s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes panelIn { from { transform: translateY(18px) scale(0.95); opacity: 0; } to { transform: none; opacity: 1; } }
.toast { animation: toastIn 0.3s cubic-bezier(0.2, 1.35, 0.4, 1); }
@keyframes toastIn { from { transform: translateY(-12px) scale(0.92); opacity: 0; } }
#bt-stars .sts { display: flex; align-items: center; gap: 2px; }
#bt-stars .star.pop { animation: starPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes starPop { 0% { transform: scale(0.2) rotate(-50deg); } 55% { transform: scale(1.6) rotate(12deg); filter: drop-shadow(0 0 8px #ffd23a); } 100% { transform: scale(1) rotate(0); } }
#results:not([hidden]) .rbox { animation: panelIn 0.34s cubic-bezier(0.2, 1.3, 0.4, 1); }
.rstars .star { animation: starPop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1) backwards; }
.rstars .star:nth-child(1) { animation-delay: 0.25s; } .rstars .star:nth-child(2) { animation-delay: 0.5s; } .rstars .star:nth-child(3) { animation-delay: 0.75s; }
.rstars .star:not(.on) { animation-name: starIn; }
@keyframes starIn { from { transform: scale(0.4); opacity: 0; } }
.rbox.win h2 { animation: winGlow 1.6s ease-in-out 0.6s infinite alternate; }
@keyframes winGlow { from { text-shadow: 0 0 0 rgba(242, 179, 61, 0); } to { text-shadow: 0 0 18px rgba(242, 179, 61, 0.65); } }
.seg { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.seg .btn.on { box-shadow: 0 0 0 2px rgba(46, 230, 214, 0.5); }
@media (prefers-reduced-motion: reduce) {
  .btn, .dcard { transition: none; }
  .res.bump, .res.bump .ico, #sheet.in, .modal:not([hidden]), .modal:not([hidden]) .mpanel, .toast, #bt-stars .star.pop,
  #results:not([hidden]) .rbox, .rstars .star, .rbox.win h2, #bt-time.low { animation: none; }
}
#splash:not([hidden]) #splash-img { animation: logoFloat 4.5s ease-in-out infinite; }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
#splash:not([hidden]) #b-play:not([hidden]) { animation: playPulse 1.9s ease-in-out infinite; }
@keyframes playPulse { 0%, 100% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 0 0 rgba(242, 179, 61, 0); }
  50% { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 0 3px rgba(0, 0, 0, 0.35), 0 0 26px 4px rgba(242, 179, 61, 0.45); } }
@media (prefers-reduced-motion: reduce) { #splash:not([hidden]) #splash-img, #splash:not([hidden]) #b-play:not([hidden]) { animation: none; } }

/* ---------------------------------------------------------------- raid banners: stars earned, hero abilities, victory */
.starban { position: absolute; left: 50%; top: 27%; z-index: 24; transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; pointer-events: none;
  animation: banIn 0.42s cubic-bezier(0.2, 1.55, 0.4, 1); }
.starban .rays { position: absolute; top: 52px; left: 50%; width: 260px; height: 260px; margin: -130px 0 0 -130px; border-radius: 50%;
  background: repeating-conic-gradient(rgba(255, 215, 106, 0.34) 0 9deg, rgba(255, 215, 106, 0) 9deg 22deg);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 68%); mask-image: radial-gradient(circle, #000 25%, transparent 68%);
  animation: raySpin 5s linear infinite; transition: opacity 0.25s; }
.starban svg { position: relative; width: 104px; height: 104px; fill: #ffd23a; stroke: #7a4a00; stroke-width: 1.1; filter: drop-shadow(0 0 18px rgba(255, 210, 58, 0.85));
  transition: transform 0.58s cubic-bezier(0.55, 0, 0.75, 0.2); }
.starban b { position: relative; font: 900 22px var(--display); color: #ffe7a0; letter-spacing: 0.06em; white-space: nowrap;
  text-shadow: 0 3px 0 #5a3500, 0 0 18px rgba(0, 0, 0, 0.85); transition: opacity 0.2s; }
.starban.fly .rays, .starban.fly b { opacity: 0; }
@keyframes banIn { from { opacity: 0; transform: translateX(-50%) scale(0.25) rotate(-12deg); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes raySpin { to { transform: rotate(360deg); } }
.abban { position: absolute; left: 0; top: 20%; z-index: 24; display: flex; align-items: center; gap: 12px; padding: 10px 40px 10px max(12px, env(safe-area-inset-left, 0px));
  background: linear-gradient(90deg, rgba(7, 16, 19, 0.96), rgba(7, 16, 19, 0.88) 72%, rgba(7, 16, 19, 0)); border-top: 2px solid var(--hc); border-bottom: 2px solid var(--hc);
  pointer-events: none; animation: abIn 1.9s cubic-bezier(0.2, 1, 0.3, 1) forwards; }
.abban img { width: 72px; height: 72px; border-radius: 50%; border: 3px solid var(--hc); box-shadow: 0 0 22px var(--hc); object-fit: cover; background: #182d34; }
.abban small { display: block; font: 700 12px var(--display); color: var(--hc); letter-spacing: 0.2em; text-transform: uppercase; }
.abban b { font: 900 28px var(--display); color: #fff; letter-spacing: 0.04em; text-transform: uppercase; text-shadow: 0 0 18px var(--hc), 0 3px 0 rgba(0, 0, 0, 0.6); }
@keyframes abIn { 0% { transform: translateX(-105%); } 16% { transform: translateX(0); } 82% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(60px); opacity: 0; } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#results .rbox { position: relative; z-index: 1; }
.confetti i { position: absolute; top: -24px; left: var(--x); width: 8px; height: 13px; border-radius: 2px; background: var(--c); opacity: 0.92;
  animation: confettiFall var(--t) linear var(--d) infinite; }
@keyframes confettiFall { from { transform: translateY(-24px) rotate(var(--r)) rotateY(0deg); } to { transform: translateY(105vh) rotate(calc(var(--r) + 540deg)) rotateY(900deg); } }
.rloot em { font-style: normal; }
@media (max-width: 520px) { .abban b { font-size: 21px; } .abban img { width: 56px; height: 56px; } .starban b { font-size: 17px; } .starban svg { width: 84px; height: 84px; } }
@media (prefers-reduced-motion: reduce) { .starban, .starban .rays, .abban, .confetti i { animation: none; } .confetti { display: none; } }

/* the clouds between screens: steam rolls in from the edges while a station is found and parts on it */
#clouds { position: fixed; inset: var(--sbar, 0px) 0 0; z-index: 80; overflow: hidden; pointer-events: auto; transition: opacity 0.12s; }
#clouds.out { pointer-events: none; }
#clouds .cl { position: absolute; left: var(--x); top: var(--y); width: var(--w); margin-left: calc(var(--w) / -2); margin-top: calc(var(--w) * -0.3);
  transform: translate(var(--fx), var(--fy)) scale(1.15); transition: transform 0.44s cubic-bezier(0.22, 0.85, 0.3, 1); filter: drop-shadow(0 10px 18px rgba(16, 40, 49, 0.28)); will-change: transform; }
#clouds .cl svg { display: block; width: 100%; height: auto; }
#clouds.in .cl { transform: translate(0, 0) scale(1); }
#clouds.out .cl { transform: translate(calc(var(--fx) * 1.15), calc(var(--fy) * 1.15)) scale(1.25); transition: transform 0.62s cubic-bezier(0.55, 0, 0.7, 0.4); }
#clouds .cfill { position: absolute; inset: 0; background: radial-gradient(circle at 50% 45%, #ffffff, #dde7ee 75%); opacity: 0; transition: opacity 0.16s; }
#clouds.in .cfill { opacity: 1; transition-delay: 0.3s; }
#clouds.out .cfill { opacity: 0; transition: opacity 0.1s; transition-delay: 0s; }
#clouds .ctext { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; opacity: 0; transition: opacity 0.18s; padding: 0 16px; text-align: center; }
#clouds.in .ctext { opacity: 1; transition-delay: 0.32s; }
#clouds.out .ctext { opacity: 0; transition-delay: 0s; transition-duration: 0.08s; }
#clouds .ctext b { font: 900 19px var(--display); color: #183a47; letter-spacing: 0.06em; text-transform: uppercase; }
#clouds .ctext b:empty, #clouds .ctext b:empty + i { display: none; }
#clouds .ctext i { width: 46px; height: 8px; background: radial-gradient(circle, #2b8f86 0 3.5px, transparent 4px) 0 50% / 16px 8px repeat-x; animation: cloudDots 0.9s steps(3) infinite; }
@keyframes cloudDots { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
#clouds.cover .cl, #clouds.cover .cfill, #clouds.cover .ctext { transition: none; }
@media (prefers-reduced-motion: reduce) {
  #clouds .cl, #clouds.out .cl { transition: none; transform: none; }
  #clouds.out { opacity: 0; transition: opacity 0.3s; }
  #clouds .ctext i { animation: none; }
}

/* ---------------------------------------------------------------- raid displays after Clash (1.13) */
/* your own storages in the raid's corner, filling up as you steal (FULL: the rest spills) */
#bt-loot { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; text-shadow: none; font: inherit; }
.bres { position: relative; display: flex; align-items: center; gap: 5px; padding: 4px 10px 4px 6px; background: rgba(7, 16, 19, 0.84); border: 1px solid var(--edge); border-radius: 12px; box-shadow: 0 6px 18px var(--shadow); }
.bres .ico .i { width: 22px; height: 22px; margin: 0; }
.bres .ico img.i.ri { width: 28px; height: 28px; margin: -3px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.bres .rv { min-width: 62px; }
.bres .rv b { font-size: 14px; }
.bres.hash .meter span { background: var(--gold); } .bres.gas .meter span { background: #cce536; }
.bres .meter span { transition: width 0.25s ease-out; }
.bres .gain { font: 800 11px var(--display); font-style: normal; color: #8dff7a; text-shadow: 0 1px 3px #000; }
.bres .gain:empty { display: none; }
.bres .fl { display: none; position: absolute; top: -8px; right: -5px; font: 800 9px/1 var(--display); font-style: normal; letter-spacing: 0.08em; text-transform: uppercase; color: #fff;
  background: var(--red); border-radius: 6px; padding: 3px 5px; box-shadow: 0 0 0 2px #040a0c; }
.bres.full { border-color: rgba(255, 74, 58, 0.6); }
.bres.full .meter span { background: linear-gradient(90deg, #ff8a3a, #ff4a3a); }
.bres.full .fl { display: block; }
/* messages in the middle of a raid: red for can't, gold for news */
#notice { position: absolute; left: 50%; top: 31%; z-index: 23; transform: translateX(-50%); pointer-events: none; text-align: center; width: max-content; max-width: calc(100% - 32px);
  font: 900 23px/1.2 var(--display); letter-spacing: 0.03em; color: #ff5546; --o: #2e0402;
  text-shadow: 2px 0 0 var(--o), -2px 0 0 var(--o), 0 2px 0 var(--o), 0 -2px 0 var(--o), 1.5px 1.5px 0 var(--o), -1.5px 1.5px 0 var(--o), 1.5px -1.5px 0 var(--o), -1.5px -1.5px 0 var(--o),
    0 4px 0 var(--o), 0 0 16px rgba(0, 0, 0, 0.75); }
#notice.gold { color: #ffd76a; --o: #3a2200; }
#notice.go { animation: noticeIn 1.8s ease-out forwards; }
@keyframes noticeIn { 0% { opacity: 0; transform: translateX(-50%) scale(0.7); } 10% { opacity: 1; transform: translateX(-50%) scale(1.07); }
  18% { transform: translateX(-50%) scale(1); } 75% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; transform: translateX(-50%) translateY(-10px); } }
/* confirmations (Surrender?, End battle?, Finish now?) */
.modal.narrow .mpanel { width: min(420px, 100%); }
.confirm { display: grid; gap: 12px; }
.confirm p { margin: 0; color: #c5cfdc; font-weight: 600; font-size: 16px; }
.confirm p b { color: var(--ink); }
.confirm .cf-stake { display: flex; align-items: center; gap: 4px; font: 800 15px var(--display); color: #c5cfdc; }
.confirm .cf-stake b.l { color: #ff8a7a; }
.cf-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
/* a hero whose ability is spent: grey portrait, live health bar (as on Clash's army bar) */
.dcard.spent:not(.active) img { filter: grayscale(1) brightness(0.82); }
/* troop levels on the results' Troops used row */
.ru .lv { position: absolute; left: 2px; bottom: 2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 5px; font: 800 9px/13px var(--display); font-style: normal; text-align: center; color: #fff;
  background: linear-gradient(#3a3f6e, #1d2142); border: 1px solid rgba(255, 255, 255, 0.35); }
.ru .lv.max { background: linear-gradient(#ffe48a, #e3a01c); color: #2a1700; border-color: #fff4c8; }
@media (max-width: 640px) {
  #bt-loot { flex-direction: column; align-items: flex-end; gap: 4px; }
  .bres { padding: 3px 8px 3px 5px; } .bres .rv { min-width: 52px; } .bres .rv b { font-size: 12px; }
  #notice { font-size: 17px; top: 27%; }
}
@media (prefers-reduced-motion: reduce) { #notice.go { animation: none; } .bres .meter span { transition: none; } }

/* ---------------------------------------------------------------- station displays after Clash (1.13) */
/* a full storage says so on the resource bar */
.res.full .meter span { background: linear-gradient(90deg, #ff8a3a, #ff4a3a) !important; }
.res.full .rv i { color: #ffb39a; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
/* the Devs chip opens the Devs menu; the Shop shows how many more buildings you can put down */
#chip-devs { color: var(--ink); cursor: pointer; pointer-events: auto; }
#chip-devs:hover, #chip-devs.on { border-color: var(--line); }
#chip-devs.on { background: rgba(46, 230, 214, 0.16); }
#b-shop { position: relative; }
#devmenu { position: absolute; z-index: 7; box-sizing: border-box; top: calc(max(10px, env(safe-area-inset-top, 0px)) + 42px); right: max(12px, env(safe-area-inset-right, 0px));
  width: min(380px, calc(100% - 24px)); max-height: calc(100% - 150px); overflow-y: auto; overscroll-behavior: contain; padding: 4px 10px 10px;
  background: rgba(6, 14, 17, 0.93); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px var(--shadow); animation: dmIn 0.2s cubic-bezier(0.2, 1.3, 0.4, 1); }
@keyframes dmIn { from { opacity: 0; transform: translateY(-8px) scale(0.97); } }
#devmenu header { position: sticky; top: -4px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 2px 6px; background: rgba(6, 14, 17, 0.97); }
#devmenu header b { font: 800 14px var(--display); display: inline-flex; align-items: center; gap: 4px; }
#devmenu header span { font: 700 12px var(--display); color: var(--muted); }
#devmenu h5 { margin: 8px 2px 4px; font: 800 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
#devmenu h5.sg { color: #8dff7a; }
.dm-row { width: 100%; box-sizing: border-box; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 5px 6px; margin: 2px 0;
  background: rgba(255, 255, 255, 0.035); border: 1px solid transparent; border-radius: 10px; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
button.dm-row:hover { border-color: var(--line); background: rgba(46, 230, 214, 0.07); }
.dm-i { width: 34px; height: 30px; display: grid; place-items: center; }
.dm-i img { max-width: 34px; max-height: 30px; object-fit: contain; }
.dm-i.card img { width: 26px; height: 30px; border-radius: 5px; object-fit: cover; }
.dm-i.dev .i { width: 20px; height: 20px; margin: 0; }
.dm-n { font: 700 14px var(--body); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-n em { font-style: normal; color: var(--muted); }
.dm-n small { display: block; font: 600 11px var(--body); color: var(--muted); }
.dm-row .cost { font-size: 14px; }
.dm-row.short .dm-n, .dm-row.short .cost { color: #ff8a7a; }
.dm-row.free { grid-template-columns: 34px 1fr; cursor: default; }
.dm-row.free .dm-n { color: #8dff7a; font-weight: 800; }
.dm-t { display: grid; justify-items: end; gap: 3px; font: 800 13px var(--display); font-variant-numeric: tabular-nums; }
.dm-t i { display: block; width: 64px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.dm-t i b { display: block; height: 100%; background: linear-gradient(90deg, #f2c230, #ffe27a); }
.dm-none { margin: 6px 2px; color: var(--muted); font-size: 14px; }
/* "Busy!" notes (an upgrading defense, a hero leveling up) */
.busy { margin: 6px 0 0; font-size: 13px; color: #ffcf8a; font-weight: 600; }
.busy b { color: #ff8a5a; }
/* the upgrade window: level bar, next level drawn, stat cards with the gain, Node unlocks, time + button */
.modal.upgd .mpanel { width: min(780px, 100%); }
.mpanel h2 em { font-style: normal; color: var(--gold); }
.lvbar { position: relative; height: 16px; border-radius: 8px; background: #182d34; border: 1px solid var(--edge); overflow: hidden; margin: 0 0 12px; }
.lvbar span { position: absolute; inset: 0 auto 0 0; background: linear-gradient(#7af27a, #2fae3a); }
.lvbar b { position: relative; display: block; text-align: center; font: 800 10px/16px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-shadow: 0 1px 2px #000; }
.upg { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 14px; align-items: start; }
.upr { display: grid; gap: 12px; align-content: start; min-width: 0; }
.upr .unl { background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; }
.upv { display: grid; gap: 8px; background: radial-gradient(circle at 50% 40%, rgba(46, 230, 214, 0.12), transparent 70%), var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; }
.upv > img { width: 100%; max-width: 100%; aspect-ratio: 520 / 400; object-fit: contain; }
.upv.por > img { aspect-ratio: auto; max-height: 230px; object-fit: contain; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5)); }
.upd { margin: 0; color: #c5cfdc; font-weight: 500; font-size: 14px; }
.upd b { color: var(--ink); }
.upd.newlook { margin-bottom: 6px; }
.upd.newlook b { color: #ffd76a; margin-right: 6px; }
.scg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sc { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 8px; align-items: center; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.sc.up { background: linear-gradient(rgba(122, 242, 122, 0.12), rgba(122, 242, 122, 0.04)); border-color: rgba(122, 242, 122, 0.4); }
.sc .sci .i, .sc .sci img.i { width: 28px; height: 28px; margin: 0; vertical-align: middle; }
.scv { display: grid; gap: 2px; min-width: 0; }
.scv small { font: 700 10px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.scv b { font: 800 16px var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.scv b em { font-style: normal; color: #7af27a; margin-left: 6px; font-size: 14px; }
.sc.fixed .scv b { font: 700 15px var(--body); }
.scb { position: relative; display: block; height: 5px; border-radius: 3px; background: rgba(0, 0, 0, 0.45); overflow: hidden; margin-top: 2px; }
.scb span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: #8a94a6; }
.scb span.nx { background: #7af27a; }
.unl { display: grid; gap: 6px; }
.unl small, .unl p { font: 700 10px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0; }
.unl p { text-transform: none; letter-spacing: 0; font: 600 13px var(--body); }
.unr { display: flex; flex-wrap: wrap; gap: 6px; }
.ut { position: relative; width: 52px; height: 46px; border-radius: 9px; background: #152c35; border: 1px solid #26444f; display: grid; place-items: center; }
.ut img { max-width: 48px; max-height: 42px; object-fit: contain; }
.ut.card img { width: 38px; height: 44px; border-radius: 6px; object-fit: cover; }
.ut .cico { width: 38px; height: 38px; }
.ut i { position: absolute; left: -3px; top: -6px; font: 800 9px/1 var(--display); font-style: normal; text-transform: uppercase; color: #06201d; background: #9dfcef; border-radius: 5px; padding: 2px 4px; box-shadow: 0 0 0 2px #0b1a1f; }
.ut i.new { background: #ffd23a; color: #2a1700; }
.upwarn { margin: 10px 0 0; font-weight: 600; font-size: 14px; color: #ffcf8a; }
.upbar { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.upbar .btn.ghost { margin-right: auto; }
.uptime { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; padding: 6px 12px; border-radius: 12px; background: #11252c; border: 1px solid var(--edge); color: var(--ink); }
.uptime .i { grid-row: span 2; width: 22px; height: 22px; margin: 0; }
.uptime small { font: 700 10px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.uptime b { font: 800 15px var(--display); }
.btn.short .cost, .btn.short .cost.short { color: #7a0a05; }
.btn.short { filter: saturate(0.6); }
@media (max-width: 640px) {
  .upg { grid-template-columns: 1fr; }
  .upv { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  .upv > img { grid-row: span 2; }
  .upv.por > img { max-height: 150px; }
  .scg { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .sc { grid-template-columns: 24px minmax(0, 1fr); padding: 6px 8px; gap: 6px; }
  .sc .sci .i, .sc .sci img.i { width: 22px; height: 22px; }
  .scv b { font-size: 14px; } .scv b em { font-size: 12px; margin-left: 4px; }
  .upbar .btn.big { font-size: 15px; padding: 12px 16px 10px; }
  #devmenu { max-height: calc(100% - 170px); }
}
@media (prefers-reduced-motion: reduce) { #devmenu { animation: none; } }

/* 1.14: guests and accounts, crews, chat */
.tag { display: inline-block; font: 800 9px/1.5 var(--display); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; border-radius: 5px; padding: 1px 5px; color: #06201d; background: var(--teal); vertical-align: 1px; }
.tag.gold, .tag.gen { color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); }
.tag.mod { color: #fff; background: #5b4fd1; }
.tag.role { color: #bfeee9; background: rgba(46, 230, 214, 0.16); border: 1px solid rgba(46, 230, 214, 0.35); }
.cbadge { flex: none; display: inline-block; vertical-align: middle; filter: drop-shadow(0 1px 1.5px rgba(0, 0, 0, 0.5)); }
.warn { color: var(--gold); }
.center { text-align: center; }

/* the chat tab on the station's left edge, and the drawer it opens */
#chat-tab { position: absolute; left: 0; top: 44%; transform: translateY(-50%); z-index: 6; pointer-events: auto; display: grid; justify-items: center; gap: 2px;
  padding: 10px 8px 8px max(8px, env(safe-area-inset-left, 0px)); color: var(--teal); background: rgba(7, 16, 19, 0.9); border: 1px solid var(--line); border-left: 0;
  border-radius: 0 16px 16px 0; box-shadow: 0 8px 22px var(--shadow); cursor: pointer; font: 800 9px var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
#chat-tab svg { width: 26px; height: 26px; }
#chat-tab:hover, #chat-tab.on { color: #7ffff2; background: rgba(11, 26, 31, 0.96); }
#chat-tab .badge { top: -6px; right: -8px; }
.badge.dot { min-width: 12px; width: 12px; height: 12px; padding: 0; top: -3px; right: -3px; }
#chat { position: absolute; left: 0; top: 0; bottom: 0; z-index: 18; width: min(400px, 100%); display: flex; flex-direction: column;
  padding: max(10px, env(safe-area-inset-top, 0px)) 0 max(10px, env(safe-area-inset-bottom, 0px)) max(0px, env(safe-area-inset-left, 0px));
  background: rgba(7, 16, 19, 0.96); border-right: 1px solid var(--line); box-shadow: 18px 0 50px rgba(0, 0, 0, 0.55); animation: chatIn 0.22s cubic-bezier(0.2, 1, 0.3, 1); }
@keyframes chatIn { from { transform: translateX(-24px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #chat { animation: none; } }
.ch-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 10px 8px 12px; border-bottom: 1px solid var(--edge); }
.ch-tabs { display: flex; gap: 6px; }
.ch-tab { position: relative; font: 800 13px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--panel2);
  border: 1px solid var(--edge); border-radius: 10px; padding: 9px 16px; cursor: pointer; }
.ch-tab.on { color: #06201d; background: var(--teal); border-color: var(--teal); }
.ch-tab .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px #040a0c; }
.ch-tab .badge { top: -8px; right: -8px; }
#ch-crew { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--edge); background: rgba(46, 230, 214, 0.05); }
.ch-crewbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: none; border: 0; color: var(--ink); cursor: pointer; text-align: left; padding: 0; font: inherit; }
.ch-crewbtn span { display: grid; min-width: 0; }
.ch-crewbtn b { font: 800 14px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-crewbtn small { color: var(--muted); font-weight: 600; }
.ch-crewbtn i { margin-left: auto; font: 700 12px var(--body); font-style: normal; color: #7ffff2; white-space: nowrap; }
#ch-list { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; user-select: text; -webkit-user-select: text; }
#ch-list > :first-child { margin-top: auto; }
.cm { background: var(--panel2); border: 1px solid var(--edge); border-radius: 12px; padding: 7px 10px 8px; cursor: pointer; }
.cm:hover, .cm:focus-visible { border-color: rgba(46, 230, 214, 0.35); outline: none; }
.cm.me { border-color: rgba(46, 230, 214, 0.3); background: #0f242c; }
.cm-h { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; min-width: 0; }
.cm-n { font: 800 13px var(--display); color: #ffd77a; overflow-wrap: anywhere; }
.cm.me .cm-n { color: #7ffff2; }
.cm-crew { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; min-width: 0; }
.cm-h time { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.cm-t { margin: 2px 0 0; font-weight: 500; font-size: 15px; line-height: 1.35; color: #e6ecf3; overflow-wrap: anywhere; }
.cm.sys { display: flex; gap: 8px; justify-content: center; align-items: baseline; background: none; border: 0; padding: 2px 6px; cursor: default; text-align: center;
  color: #9fd8d2; font-size: 13px; font-weight: 600; font-style: italic; }
.cm.sys time { font-size: 11px; color: var(--muted); font-style: normal; }
.cm-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ch-empty { text-align: center; margin: auto 0 8px; }
.ch-muted { margin: 4px 0 0; text-align: center; color: var(--gold); font-size: 13px; }
#ch-form { display: flex; gap: 8px; padding: 8px 10px 0; border-top: 1px solid var(--edge); }
#ch-input, .fld input, .fld textarea, .cf-search input, .cr-ask input, .lshare input, .cr-link input, .lay-paste input, .lc-form input, .lay-share textarea { flex: 1; min-width: 0; font: 600 16px var(--body); color: var(--ink); background: #081519; border: 1px solid #22404a;
  border-radius: 10px; padding: 9px 12px; user-select: text; -webkit-user-select: text; }
#ch-input:focus, .fld input:focus, .fld textarea:focus, .cf-search input:focus, .cr-ask input:focus, .lshare input:focus, .cr-link input:focus, .lay-paste input:focus, .lc-form input:focus, .lay-share textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.2); }
#ch-gate { padding: 10px 12px 0; border-top: 1px solid var(--edge); }
#ch-gate p { margin: 0 0 8px; font-weight: 500; color: #c5cfdc; }

/* crews: the finder (Crew tab with no crew), a crew's page, starting or editing one */
.cf { display: grid; gap: 10px; margin-top: 0 !important; }
.cf-hero { display: flex; gap: 12px; align-items: center; background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px 12px; }
.cf-hero b { font: 800 15px var(--display); }
.cf-hero p { margin: 2px 0 0; }
.cf-search { display: flex; gap: 8px; }
.cf-list { display: grid; gap: 6px; }
.crow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; width: 100%; text-align: left; background: var(--panel2);
  border: 1px solid var(--edge); border-radius: 12px; padding: 8px 10px; color: var(--ink); cursor: pointer; font: inherit; }
.crow:hover { border-color: var(--line); background: #132d36; }
.cr-main, .cr-side { display: grid; min-width: 0; }
.cr-main b { font: 800 14px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-main small, .cr-side small { color: var(--muted); font-weight: 600; font-size: 12px; }
.cr-side { justify-items: end; }
.cr-side b { font: 800 13px var(--display); }
.cf-new { width: 100%; }
.cr-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cr-info { flex: 1 1 260px; min-width: 0; display: grid; gap: 8px; }
.cr-descr { margin: 0; font-weight: 500; color: #dfe6ee; font-size: 16px; }
.cr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-chips span { display: inline-flex; align-items: center; gap: 3px; font-size: 13px; background: var(--panel2); border: 1px solid var(--edge); border-radius: 999px; padding: 3px 10px; }
.cr-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cr-note { color: var(--muted); font-weight: 700; }
.cr-ask { display: flex; gap: 8px; flex: 1; min-width: 0; }
.cr-reqs, .mlist { display: grid; gap: 6px; }
.cr-req { display: flex; gap: 10px; justify-content: space-between; align-items: center; flex-wrap: wrap; background: var(--panel2); border: 1px solid rgba(242, 179, 61, 0.35); border-radius: 12px; padding: 8px 12px; }
.cr-req b { font: 800 14px var(--display); }
.cr-req small { display: block; color: var(--muted); font-weight: 600; }
.cr-req p { margin: 4px 0 0; font-weight: 500; font-style: italic; color: #dfe6ee; }
.cr-reqb { display: flex; gap: 6px; }
.mrow { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 4px 10px; align-items: center; background: var(--panel2); border: 1px solid var(--edge); border-radius: 12px; padding: 7px 10px; }
.mrow.me { border-color: rgba(46, 230, 214, 0.45); }
.mrow .rk { font: 800 13px var(--display); color: var(--muted); text-align: center; }
.mrow .mn { display: grid; min-width: 0; }
.mrow .mn b { font: 800 14px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .mn small { color: var(--muted); font-weight: 600; }
.mrow .mn .on { color: var(--green); font-style: normal; }
.mrow .mnode { color: var(--muted); font-size: 13px; }
.mrow .mt { font: 800 13px var(--display); display: inline-flex; align-items: center; gap: 2px; }
.mrow .macts { grid-column: 2 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.crf { display: grid; gap: 12px; }
.crf-top { display: flex; gap: 14px; align-items: center; }
.crf-badge { flex: none; width: 84px; display: grid; place-items: center; }
.crf-fields { flex: 1; min-width: 0; display: grid; gap: 8px; }
.fld { display: grid; gap: 5px; }
.fld > span { font: 700 11px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.fld textarea { resize: none; font-size: 15px; }
.fld input:disabled { opacity: 0.6; }
.swatches, .symbols { display: grid; grid-template-columns: repeat(6, minmax(0, 46px)); gap: 6px; }
.sw { aspect-ratio: 1; max-width: 100%; border-radius: 10px; border: 2px solid rgba(0, 0, 0, 0.5); background: var(--c); cursor: pointer; }
.sw.on { box-shadow: 0 0 0 3px #fff; }
.sy { aspect-ratio: 1; max-width: 100%; border-radius: 10px; border: 1px solid var(--edge); background: var(--panel2); cursor: pointer; display: grid; place-items: center; padding: 6px; }
.sy svg { width: 100%; height: 100%; fill: #c5cfdc; }
.sy.on { background: var(--c); border-color: #fff; }
.sy.on svg { fill: #fff; }
.stepper { display: flex; align-items: center; gap: 10px; }
.stepper b { min-width: 76px; text-align: center; font: 800 16px var(--display); display: inline-flex; align-items: center; justify-content: center; gap: 3px; }

/* guests: what needs an account, signing up, the inbox screen, which station to keep */
.gate { display: flex; gap: 14px; align-items: center; }
.gate img { flex: none; width: 74px; height: 74px; border-radius: 50%; border: 3px solid var(--teal); background: #06201d; object-fit: cover; }
.gate p { margin: 0 0 6px; font-weight: 500; }
.gate-lead { font-size: 17px; color: var(--ink); font-weight: 700 !important; }
.gate-btns, .pend-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.gate-btns .btn.big { flex: 1 1 140px; }
.suf { display: grid; gap: 10px; }
.suf p { margin: 0; }
.suf .btn.big { width: 100%; }
.pend { display: grid; justify-items: center; gap: 8px; text-align: center; }
.pend p { margin: 0; font-weight: 500; }
.pend-ico { width: 72px; height: 72px; }
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin: 10px 0; }
.pick-card { display: grid; gap: 8px; align-content: start; background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.pick-card.g { border-color: rgba(242, 179, 61, 0.45); }
.pick-card h3 { font-size: 15px; }
.pick-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; font-weight: 500; }
.pick-card li { display: flex; align-items: center; gap: 4px; }
.rcta { display: grid; gap: 6px; justify-items: center; margin: 12px 0 4px; padding: 12px; border-radius: 14px; background: rgba(242, 179, 61, 0.1); border: 1px solid rgba(242, 179, 61, 0.45); }
.rcta b { font: 800 15px var(--display); color: var(--gold); text-transform: uppercase; letter-spacing: 0.08em; }
.rcta p { margin: 0; font-weight: 500; font-size: 14px; }
.ropt.gated img { filter: saturate(0.6); }
.ropt b .tag { margin-left: 8px; }
.acct.guest { border-color: rgba(242, 179, 61, 0.45); }
.acct-btns { display: flex; gap: 6px; flex-wrap: wrap; }
/* 1.35: a base from the offline copy: the window's buttons, and its code */
.pick-go { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
textarea.code { width: 100%; box-sizing: border-box; resize: none; font: 500 12px/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; word-break: break-all;
  color: var(--ink); background: #081519; border: 1px solid #22404a; border-radius: 10px; padding: 8px 10px; user-select: text; -webkit-user-select: text; }
textarea.code:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.2); }
.btn.del-t { color: #FF8A80; }
.acrew { display: inline-flex; align-items: center; gap: 4px; }
.gate-note { color: #ffd77a; }
.bname { display: grid; min-width: 0; }
.bname b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bcrew { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 600; }
.brow.crewrow { width: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.bname.crewn { display: flex; align-items: center; gap: 8px; }
.brow.crewrow:hover { border-color: var(--line); }

/* the splash: Play straight away, Log in for members */
.sp-alt { margin: 0; color: #dfe6ee; font-weight: 600; font-size: 15px; text-shadow: 0 1px 4px #000; }
.sp-alt .linkish { font-weight: 800; }
.lhead { font-size: 15px; text-align: center; }
/* 1.48: the forms' last row, for someone with no account: the question and a button that starts a guest station (it
   was one underlined line, 18 px tall, that went back to the title screen) */
.lflds { display: grid; gap: 10px; }
.lguest { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; padding-top: 10px; border-top: 1px solid rgba(150, 214, 222, 0.16);
  color: #dfe6ee; font-weight: 600; font-size: 15px; text-align: center; }
.lguest .btn { min-height: 40px; padding: 10px 18px 8px; }
/* ...and the whole form on the screen of a phone. Held sideways (1.47: at 320 and 330 px tall its heading was cut off
   at the top): the two fields side by side, the rest a little closer */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .login { box-sizing: border-box; width: min(594px, 100%); gap: 8px; padding: 12px 16px; }
  .lflds { grid-template-columns: 1fr 1fr; gap: 12px; }
  .login input { padding: 8px 12px; }
  .login .btn.big { font-size: 16px; padding: 11px 20px 9px; }
  .login .lmsg:empty { min-height: 0; }
  .lguest { padding-top: 8px; font-size: 14px; }
  /* (the form stands over the painted logo there, whose top showed above it like a fault: the art steps back) */
  #splash.titled:has(.login:not([hidden])) { background: linear-gradient(rgba(4, 11, 13, 0.8), rgba(4, 11, 13, 0.8)), var(--splash-bg, none) center top / cover no-repeat, #060c0e; }
}
/* held upright, a small one (1.47: at 568 px tall the form's last row was below the screen): the title is the logo
   alone while a form is open, from the top */
@media (max-aspect-ratio: 1/1) and (max-height: 700px) {
  #splash:has(.login:not([hidden])) .sp-kicker, #splash:has(.login:not([hidden])) .sp-tag { display: none; }
  #splash:has(.login:not([hidden])) .sp-top { margin-top: 0; }
  .login { gap: 8px; padding: 14px; }
  .login .lmsg:empty { min-height: 0; }
}

@media (max-width: 560px) {
  #chat { width: 100%; border-right: 0; background: #071013; }
  #chat-tab { top: 52%; padding: 8px 6px 6px max(6px, env(safe-area-inset-left, 0px)); }
  #chat-tab svg { width: 22px; height: 22px; }
  .mrow { grid-template-columns: 24px minmax(0, 1fr) auto; }
  .mrow .mnode { display: none; }
  .gate { align-items: flex-start; }
  .gate img { width: 56px; height: 56px; }
  .crf-badge { width: 64px; }
}

/* 1.16: the profile card (tap the corner) */
.pf { display: grid; gap: 4px; }
.pf-head { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px; align-items: center; }
.pf-head .lvb { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.55)); }
.pf-id { display: grid; gap: 6px; min-width: 0; }
.pf-id h3 { font-size: 19px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.pf-id p { margin: 0; }
.pf-crew { display: flex; align-items: center; gap: 6px; font: 700 14px var(--display); }
.pf-xp { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }
.pf-xp span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #1fa99d, #7ffff2); }
.pf-rename { display: flex; gap: 6px; }
.pf-rename input { flex: 1; min-width: 0; font: 700 15px var(--body); color: var(--ink); background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 10px; user-select: text; -webkit-user-select: text; }
.pf-lg { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: center; }
.pf-lg p { margin: 2px 0 0; }
.pf-lgn { font: 800 17px var(--display); }
.pf-tr { display: flex; align-items: center; gap: 2px; font-size: 15px; }
.pf-tr b { font: 800 16px var(--display); color: var(--gold); margin-right: 4px; }
.lgladder { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 3px; margin-top: 10px; }
.lgl { display: grid; justify-items: center; gap: 1px; min-width: 0; padding: 4px 0 3px; border-radius: 10px; opacity: 0.55; font: 700 9px var(--display); color: var(--muted); }
.lgl svg { width: 100%; max-width: 34px; height: auto; }
.pf-id h3 .linkish { font: 700 13px var(--body); }
.lgl.on { opacity: 1; background: rgba(46, 230, 214, 0.1); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink); }
.pf-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pf-stats span { display: grid; gap: 1px; background: var(--panel2); border: 1px solid var(--edge); border-radius: 10px; padding: 7px 8px; font-size: 12px; color: var(--muted); text-align: center; }
.pf-stats b { font: 800 15px var(--display); color: var(--ink); }
.pf-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pf-btns:empty { display: none; }
.lgb.sm { margin-right: 3px; flex: none; }
@media (max-width: 420px) { .pf-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pf-head { grid-template-columns: 68px minmax(0, 1fr); } .pf-head .lvb { width: 68px; height: 68px; } }

/* 1.16: phones on their side and other short screens. The building sheet takes the bottom row's place (the Raid,
   Army and Shop buttons come back when it closes), raid cards shrink so the map shows, results fit */
@media (max-height: 500px) {
  #app.sheet-open #hud-bottom { display: none; }    /* ui.js sets it: :has() is missing before Safari 15.4 / Firefox 121 */
  /* (the sheet itself on a short screen: 1.46's strip, at the end of this file) */
  #hud-bottom { bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
  #b-raid { font-size: 17px; padding: 12px 22px 10px; }
  .hb-right .btn { padding: 10px 12px 8px; }
  #guide { bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 62px); }
  #g-img { width: 56px; height: 56px; }
  .bubble { padding: 9px 12px; }
  #deploy { padding: 5px; gap: 5px; border-radius: 12px; bottom: max(6px, env(safe-area-inset-bottom, 0px)); }
  .dcard { width: 54px; height: 72px; border-radius: 10px; }
  .dcard img { width: 50px; height: 57px; border-radius: 8px; }
  .dcard span { font-size: 8px; bottom: 2px; }
  .dcard .cnt { font-size: 10px; top: 2px; left: 2px; padding: 1px 4px; border-radius: 6px; }
  .dcard .lv { top: 38px; min-width: 16px; height: 16px; font-size: 10px; line-height: 14px; padding: 0 3px; }
  .dcard .hp { top: 50px; height: 5px; left: 4px; right: 4px; }
  .dcard.contract .cicon { width: 50px; height: 57px; }
  .dcard.contract .cico { width: 40px; height: 40px; }
  #bt-top { top: max(6px, env(safe-area-inset-top, 0px)); }
  #bt-name { padding: 5px 9px; border-radius: 11px; }
  #bt-name b { font-size: 13px; }
  #bt-name .ar { font-size: 14px; } #bt-name .ar .i { width: 16px; height: 16px; }
  #bt-right { gap: 4px; }
  #bt-time { font-size: 20px; }
  #bt-stars { padding: 3px 7px; } #bt-stars .star { width: 17px; height: 17px; } #bt-stars b { font-size: 13px; }
  .bres { padding: 2px 8px 2px 5px; } .bres .rv b { font-size: 12px; } .bres .ico img.i.ri { width: 22px; height: 22px; margin: -2px; }
  .bt-btns .btn.small { padding: 7px 9px 6px; font-size: 10px; }
  #results { padding: 8px; overflow-y: auto; }
  .rbox { padding: 12px 16px 14px; border-radius: 16px; }
  .rbox h2 { font-size: 23px; }
  .rstars { margin: 4px 0; } .rstars .star { width: 36px; height: 36px; }
  .pct { font-size: 15px; margin: 2px 0; }
  .rloot { margin: 6px 0 8px; font-size: 15px; gap: 10px; }
  .rused { margin: 0 0 2px; } .ru, .ru img { width: 32px; height: 38px; }
  .modal { align-items: center; }
  .mpanel { max-height: calc(100% - 16px); padding-top: 10px; }
}
/* very short (a small phone on its side): the raid's name panel loses its loot lines, which the corner repeats */
@media (max-height: 380px) {
  #bt-name .offer { display: none; }
  .dcard { width: 50px; height: 66px; } .dcard img { width: 46px; height: 52px; } .dcard .lv { top: 34px; } .dcard .hp { top: 46px; }
}
/* fingers: the small round buttons take a tap a little outside their edges */
@media (pointer: coarse) {
  #hud-top .chip, .x { position: relative; }
  #hud-top .chip::after, .x::after, #res-cu::after { content: ''; position: absolute; inset: -7px -3px; }
  /* 1.28: and so do every button and tab, to 44 px tall or so (the size Apple and Google give a finger) without
     growing on the screen: the small ones (Next, End battle, Music) by 7 px above and below, the rest by 4 (measured
     from inside the border: a button's 4 px bottom edge is made up below) */
  .btn, .tab { position: relative; }
  .btn::after, .tab::after { content: ''; position: absolute; inset: -4px -2px -8px; }
  .btn.small::after { inset: -7px -2px -11px; }
  .tab::after { inset: -8px -3px; }
  .x::after { inset: -7px -6px; }
  /* 1.46: the What's new card's Read is 36 px tall: 5 px more above and below take its tap */
  .newscard .nc-open { position: relative; }
  .newscard .nc-open::after { content: ''; position: absolute; inset: -5px 0; }
}

/* 1.16: the loading screen, over everything until the game has started (no script needed to show it) */
#boot { position: absolute; inset: 0; z-index: 95; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 24px;
  background: radial-gradient(800px 460px at 50% 42%, rgba(46, 230, 214, 0.12), transparent 70%), #060c0e; transition: opacity 0.35s ease; }
#boot.out { opacity: 0; pointer-events: none; }
.boot-name { font: 900 clamp(30px, 7vw, 54px) var(--display); letter-spacing: 0.08em; color: #eaf0f6; text-shadow: 0 0 28px rgba(46, 230, 214, 0.35), 0 4px 0 #04211e; }
.boot-bar { position: relative; width: min(320px, 70vw); height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6); }
.boot-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 5px; background: linear-gradient(90deg, #1fa99d, #7ffff2); transition: width 0.25s ease-out; }
/* no figure yet (the single-file game, or before the loader starts): a light that runs along the bar */
.boot-bar i:not([style]) { width: 34%; animation: bootRun 1.3s ease-in-out infinite; }
@keyframes bootRun { from { transform: translateX(-100%); } to { transform: translateX(300%); } }
#boot-note { margin: 0; font: 600 14px var(--body); color: var(--muted); font-variant-numeric: tabular-nums; }
/* 1.20: what is coming in (megabytes, then pictures), and word when it is slow or has gone wrong */
#boot-sub { min-height: 1.3em; margin-top: -8px; max-width: min(340px, 86vw); text-align: center; font: 600 12px var(--body); color: #7f8ea6; font-variant-numeric: tabular-nums; }
#boot-sub.slow { color: #f2c46a; }
#boot-reload { margin-top: 2px; }
#boot.bad .boot-bar i { background: linear-gradient(90deg, #b8332c, #ff6b5e); }
#boot.bad #boot-note { color: #ff9a8f; }
@media (prefers-reduced-motion: reduce) { .boot-bar i:not([style]) { animation: none; width: 100%; opacity: 0.4; } #boot { transition: none; } }

/* the menu's controls: two short lists side by side (one under the other on phones) */
.ctls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ctl { background: var(--panel2); border: 1px solid var(--edge); border-radius: 12px; padding: 9px 12px; }
.ctl b { font: 800 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.ctl ul { margin: 6px 0 0; padding-left: 16px; display: grid; gap: 4px; color: #c5cfdc; font-weight: 500; font-size: 14px; }
@media (max-width: 560px) { .ctls { grid-template-columns: minmax(0, 1fr); } }
.sp-load { display: grid; justify-items: center; gap: 5px; }
.sp-load .boot-bar { width: min(240px, 60vw); height: 6px; }
.sp-load small { font: 600 12px var(--body); color: #b9c3d2; text-shadow: 0 1px 4px #000; }

/* ---------------------------------------------------------------- the CU token and its store (1.17) */
/* the CU counter: a teal-edged plate that opens the store, a + on its left (Clash's gem counter), a glint now and then */
#res-cu { cursor: pointer; pointer-events: auto; position: relative; border-color: rgba(46, 230, 214, 0.38);
  box-shadow: inset 0 0 14px rgba(46, 230, 214, 0.10), 0 6px 18px var(--shadow); }
#res-cu:hover { border-color: rgba(46, 230, 214, 0.7); }
#res-cu:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
#res-cu .ico { position: relative; display: inline-flex; }
#res-cu .ico img.i.ri { width: 36px; height: 36px; margin: -5px -4px -5px -3px; }
.cu-plus { order: 3; display: grid; place-items: center; width: 22px; height: 22px; margin-right: auto; border-radius: 7px; font: 900 17px/1 var(--display);
  font-style: normal; color: #062b18; background: linear-gradient(#8dff9e, #2fcf5a); border-bottom: 3px solid #12702b; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.45); }
#res-cu .rv { min-width: 70px; }
.cu-glint { position: absolute; left: 4px; top: -1px; width: 15px; height: 15px; pointer-events: none; opacity: 0;
  background: #fff; clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
  filter: drop-shadow(0 0 3px #bffff8) drop-shadow(0 0 6px #2ee6d6); animation: cuGlint 6.5s ease-in-out 2s infinite; }
@keyframes cuGlint { 0%, 86%, 100% { opacity: 0; transform: scale(0.2) rotate(0deg); } 90% { opacity: 1; transform: scale(1.15) rotate(45deg); } 95% { opacity: 0.85; transform: scale(0.8) rotate(80deg); } }
@media (max-width: 600px) { #res-cu .ico img.i.ri { width: 30px; height: 30px; margin: -4px -3px -4px -2px; } .cu-plus { width: 19px; height: 19px; font-size: 15px; } #res-cu .rv { min-width: 62px; } }
@media (max-height: 500px) { #res-cu .ico img.i.ri { width: 28px; height: 28px; margin: -4px -3px -4px -2px; } .cu-plus { width: 18px; height: 18px; font-size: 14px; border-bottom-width: 2px; } #res-cu .rv { min-width: 62px; } }

/* the Shop's CU Tokens tab */
.tab.cu { display: inline-flex; align-items: center; gap: 4px; color: #bffcf5; border-color: rgba(46, 230, 214, 0.45);
  background: linear-gradient(135deg, rgba(46, 230, 214, 0.22), rgba(167, 123, 255, 0.18)); }
.tab.cu img.i.ri { width: 20px; height: 20px; margin: -3px 0; }
.tab.cu.on { color: #04201c; background: linear-gradient(135deg, #7ffff2, #2ee6d6 60%, #b49bff); }
.cu-store { display: grid; gap: 10px; }
.cu-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; overflow: hidden;
  background: radial-gradient(120% 140% at 12% 50%, rgba(46, 230, 214, 0.32), rgba(46, 230, 214, 0) 55%), linear-gradient(120deg, #0f2a33, #112a32 70%, #221640);
  border: 1px solid rgba(46, 230, 214, 0.35); }
.cu-hero { width: 96px; height: 96px; object-fit: contain; flex: none; margin: -8px -4px; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5)); animation: cuFloat 3.6s ease-in-out infinite; }
.cu-hero.ph { display: grid; place-items: center; } .cu-hero.ph img { width: 72px; height: 72px; }
@keyframes cuFloat { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
.cu-ht { display: grid; gap: 4px; min-width: 0; }
.cu-ht h3 { font-size: 20px; background: linear-gradient(#ffffff, #8ffff2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.cu-ht p { margin: 0; color: #c5d6e2; font-size: 15px; }
.cu-have { font: 700 13px var(--body); color: var(--muted); } .cu-have b { font: 800 15px var(--display); color: var(--ink); }
.cu-have img.i.ri { width: 20px; height: 20px; }
.cu-test { position: absolute; top: 8px; right: 10px; font: 800 10px var(--display); letter-spacing: 0.12em; text-transform: uppercase;
  color: #2a1700; background: #ffcf5a; padding: 4px 8px; border-radius: 6px; }
.cu-packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.cu-pack { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 8px 10px; border-radius: 16px; cursor: pointer; color: var(--ink); font: inherit; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 34%, #165a62 0%, #0d2a33 55%, #0b1a20 100%); border: 1px solid rgba(46, 230, 214, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 8px 18px var(--shadow); transition: transform 0.12s ease-out, border-color 0.15s; }
.cu-pack:hover { border-color: rgba(127, 255, 242, 0.75); transform: translateY(-2px); }
.cu-pack:active { transform: translateY(1px) scale(0.98); }
.cu-pack:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cu-pack.tagged { border-color: rgba(255, 207, 90, 0.55); }
.cu-art { width: 100%; aspect-ratio: 1; max-width: 150px; display: grid; place-items: center; margin-top: 4px; }
.cu-art img { width: 100%; height: 100%; object-fit: contain; transform: scale(1.2); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.45)); transition: transform 0.2s ease-out; }
.cu-pack:hover .cu-art img { transform: scale(1.27) rotate(-1deg); }
.cu-ph { display: grid; place-items: center; } .cu-ph img { width: 56px; height: 56px; } .cu-ph.big img { width: 96px; height: 96px; }
.cu-amt { display: inline-flex; align-items: center; gap: 2px; font: 900 18px var(--display); color: #fff; text-shadow: 0 2px 0 #052c30, 0 0 12px rgba(46, 230, 214, 0.6); }
.cu-amt img.i.ri { width: 24px; height: 24px; margin-right: 1px; }
.cu-amt.big { font-size: 24px; } .cu-amt.big img.i.ri { width: 32px; height: 32px; }
.cu-name { font: 700 12px var(--display); color: #a9e6e0; letter-spacing: 0.03em; }
.cu-more { font: 800 12px var(--body); color: #8dff9e; min-height: 16px; }
.cu-price { margin-top: 4px; width: 100%; padding: 9px 6px 7px; border-radius: 10px; font: 800 15px/1 var(--display); color: #2a1700;
  background: linear-gradient(#ffd77a, #e59b1c); border-bottom: 4px solid var(--gold-d); box-shadow: 0 4px 10px var(--shadow); }
.cu-price.off { color: #c7d0dc; background: #1c3038; border-bottom-color: #0e1b20; font-size: 12px; }
.cu-tag { position: absolute; top: 0; left: 0; z-index: 1; font: 800 10px var(--display); letter-spacing: 0.1em; text-transform: uppercase; font-style: normal;
  color: #04201c; background: linear-gradient(#7ffff2, #2ee6d6); padding: 5px 10px 4px 9px; border-radius: 15px 0 10px 0; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.45); }
.cu-tag.gold { color: #2a1700; background: linear-gradient(#ffe39a, #f2b33d); }
.cu-note { margin: 0; padding: 8px 12px; border-radius: 10px; background: rgba(46, 230, 214, 0.08); border: 1px dashed rgba(46, 230, 214, 0.35); color: #c5d6e2; font-size: 14px; }
.cu-h4 { margin: 6px 0 0; }
.cu-tops { display: grid; gap: 8px; }
.cu-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.cu-tr { display: grid; grid-template-columns: auto auto; column-gap: 6px; align-items: center; min-width: 120px; }
.cu-tr img.i.ri, .cu-tr .i { grid-row: span 2; width: 30px; height: 30px; margin: 0; }
.cu-tr b { font: 800 14px var(--display); } .cu-tr small { color: var(--muted); font-size: 12px; }
.cu-tbs { display: grid; grid-template-columns: repeat(auto-fit, minmax(78px, 1fr)); gap: 6px; flex: 1 1 250px; min-width: 0; }
.cu-tb { display: grid; justify-items: center; gap: 1px; padding: 6px 4px; border-radius: 10px; cursor: pointer; color: var(--ink); font: inherit;
  background: #132d36; border: 1px solid rgba(46, 230, 214, 0.25); border-bottom: 3px solid #09151a; }
.cu-tb:hover:not(:disabled) { border-color: rgba(127, 255, 242, 0.6); }
.cu-tb b { font: 800 12px var(--display); } .cu-tb small { font: 700 12px var(--body); color: #c5d6e2; } .cu-tb span { font: 800 13px var(--body); color: #8ffff2; }
.cu-tb img.i.ri { width: 16px; height: 16px; vertical-align: -3px; margin-right: 1px; }
.cu-tb.short span { color: var(--red); }
.cu-tb:disabled { opacity: 0.5; cursor: not-allowed; }
.cu-fine { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
/* buying one */
.cu-buy { display: flex; align-items: center; gap: 12px; }
.cu-buy > img { width: 132px; height: 132px; object-fit: contain; flex: none; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5)); }
.cu-buy p { margin: 6px 0 0; color: #c5cfdc; font-size: 15px; }
.cu-testline { color: #ffcf5a !important; font-size: 13px !important; }
.cu-buy + .cf-btns { margin-top: 14px; } .cu-buy ~ .cu-fine { margin-top: 10px; }
/* a phone: the Test mode badge goes above the title instead of over it */
@media (max-width: 600px) { .cu-test { position: static; order: -1; justify-self: start; margin-bottom: 2px; } }
@media (max-width: 420px) { .cu-buy { flex-direction: column; text-align: center; } .cu-buy + .cf-btns { justify-content: center; } .cu-buy ~ .cu-fine { text-align: center; }
  .cu-head { padding: 8px 10px; } .cu-hero { width: 72px; height: 72px; } .cu-ht p { font-size: 13px; } }
/* a phone on its side: a slim header and short cards, so a row of packs and their prices fit without scrolling */
@media (max-height: 500px) { .cu-head { padding: 6px 12px; gap: 10px; } .cu-hero { width: 48px; height: 48px; margin: -4px -2px; } .cu-ht h3 { font-size: 15px; } .cu-ht p { display: none; }
  .cu-test { position: absolute; top: 6px; margin: 0; }
  .cu-ht { grid-template-columns: auto auto; align-items: baseline; column-gap: 12px; }
  .cu-packs { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; } .cu-pack { padding: 4px 6px 7px; } .cu-art { max-width: 78px; margin-top: 0; }
  .cu-amt { font-size: 15px; } .cu-amt img.i.ri { width: 19px; height: 19px; } .cu-name, .cu-more { font-size: 11px; } .cu-more { min-height: 14px; }
  .cu-price { padding: 7px 4px 5px; font-size: 13px; border-bottom-width: 3px; }
  .cu-buy > img { width: 96px; height: 96px; } }
/* the CU arrive */
.cu-cele { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; background: radial-gradient(circle at 50% 45%, rgba(10, 60, 66, 0.82), rgba(3, 6, 8, 0.9) 70%);
  animation: fadeIn 0.25s ease-out; }
.cu-cele.out { opacity: 0; transition: opacity 0.3s ease-in; }
.cu-rays { position: absolute; left: 50%; top: 45%; width: 160vmax; height: 160vmax; transform: translate(-50%, -50%); pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(127, 255, 242, 0.13) 0deg 7deg, rgba(127, 255, 242, 0) 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 42%); mask: radial-gradient(circle, #000 0%, transparent 42%); animation: cuSpin 18s linear infinite; }
@keyframes cuSpin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.cu-cbox { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 16px; }
.cu-cimg { width: min(300px, 62vmin); height: min(300px, 62vmin); object-fit: contain; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
  animation: cuPop 0.7s cubic-bezier(0.2, 1.5, 0.35, 1) both; }
@keyframes cuPop { 0% { transform: scale(0.2) rotate(-14deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.cu-cbox h2 { font-size: clamp(26px, 6vmin, 40px); color: #fff; text-shadow: 0 3px 0 #052c30, 0 0 22px rgba(46, 230, 214, 0.75); }
.cu-cname { margin: 0; font: 700 15px var(--display); color: #a9e6e0; letter-spacing: 0.05em; }
.cu-camt { display: inline-flex; align-items: center; gap: 4px; font: 900 clamp(30px, 8vmin, 52px) var(--display); color: #fff;
  text-shadow: 0 3px 0 #052c30, 0 0 18px rgba(46, 230, 214, 0.8); font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.cu-camt em { font-style: normal; }
.cu-camt img.i.ri { width: 1.15em; height: 1.15em; }
.cu-fly { position: fixed; z-index: 70; width: 34px; height: 34px; margin: -17px 0 0 -17px; pointer-events: none;
  transition: transform 0.62s cubic-bezier(0.5, -0.25, 0.75, 0.6), opacity 0.62s; filter: drop-shadow(0 0 8px rgba(46, 230, 214, 0.8)); }
.cu-fly img, .cu-fly .i { width: 100%; height: 100%; }
@media (max-height: 500px) { .cu-cimg { width: min(180px, 46vmin); height: min(180px, 46vmin); } }
@media (prefers-reduced-motion: reduce) { .cu-glint, .cu-hero, .cu-rays, .cu-cimg { animation: none; } .cu-glint { display: none; } }

/* paying with $CU or ETH (1.18) */
.cu-cxchip { display: inline-flex; align-items: center; gap: 3px; margin: 2px 0 0; padding: 2px 8px; border-radius: 999px; font: 800 11px var(--body); color: #e9ddff;
  background: linear-gradient(135deg, rgba(167, 123, 255, 0.28), rgba(46, 230, 214, 0.18)); border: 1px solid rgba(180, 155, 255, 0.45); }
.cu-cxchip b { font: 900 11px var(--display); color: #fff; }
.cu-cx { display: grid; gap: 8px; margin-top: 14px; padding: 12px; border-radius: 14px;
  background: linear-gradient(135deg, rgba(167, 123, 255, 0.14), rgba(46, 230, 214, 0.08)); border: 1px solid rgba(180, 155, 255, 0.35); }
.cu-cxh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cu-cxh span { font: 800 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: #cdbdff; margin-right: auto; }
.cu-cxh b { display: inline-flex; align-items: center; font: 900 15px var(--display); color: #fff; } .cu-cxh b img.i.ri { width: 20px; height: 20px; }
.cu-cxh i { font: 800 11px var(--display); font-style: normal; color: #04201c; background: linear-gradient(#7ffff2, #2ee6d6); padding: 3px 7px; border-radius: 999px; }
.cu-cxadm { font: 800 10px var(--display); font-style: normal; letter-spacing: 0.1em; text-transform: uppercase; color: #2a1700; background: #ffcf5a; padding: 3px 7px; border-radius: 6px; }
.cu-cxbs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.cu-cxb { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 9px 10px 8px; border-radius: 12px;
  cursor: pointer; color: var(--ink); font: inherit; background: #132e38; border: 1px solid rgba(180, 155, 255, 0.4); border-bottom: 4px solid #0a191e; min-width: 0; }
.cu-cxb:hover:not(:disabled) { border-color: rgba(214, 200, 255, 0.85); }
.cu-cxb:active:not(:disabled) { transform: translateY(2px); border-bottom-width: 2px; }
.cu-cxb:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cu-cxb:disabled { opacity: 0.55; cursor: not-allowed; }
.cu-cxb b { font: 800 13px var(--display); letter-spacing: 0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cu-cxb small { grid-column: 2; font: 700 13px var(--body); color: #cdbdff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-coin { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 900 10px var(--display); letter-spacing: -0.02em; }
.cx-coin.cu { color: #04201c; background: radial-gradient(circle at 35% 30%, #b8fff8, #2ee6d6 60%, #0b6e66); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 10px rgba(46, 230, 214, 0.45); }
.cx-coin.eth { color: #fff; background: radial-gradient(circle at 35% 30%, #c9b8ff, #7b5cf0 60%, #3b2a8c); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25), 0 0 10px rgba(167, 123, 255, 0.45); }
.cu-cxnote { margin: 0; color: #b9c3d3; font-size: 13px; line-height: 1.35; }
.cx-help p a { color: #7ffff2; }
/* the payment sheet */
.cx-sheet { display: grid; gap: 12px; }
.cx-head { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--edge); }
.cx-head img { width: 76px; height: 76px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5)); }
.cx-head div { display: grid; gap: 2px; min-width: 0; } .cx-head span { font: 800 15px var(--display); color: #fff; overflow-wrap: anywhere; } .cx-head small { color: #8dff9e; font: 700 13px var(--body); }
.cx-lead { margin: 0; font: 800 16px var(--display); color: #fff; }
.cx-fine { margin: 0; color: #b9c3d3; font-size: 14px; line-height: 1.4; } .cx-fine a { color: #7ffff2; }
.cx-line { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.cx-line b { font: 800 15px var(--display); letter-spacing: 0.02em; color: #fff; } .cx-line p { margin: 3px 0 0; color: #c5cfdc; font-size: 15px; line-height: 1.35; }
.cx-li { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #132d36; color: var(--teal); }
.cx-li svg { width: 18px; height: 18px; }
.cx-line.ok .cx-li { background: rgba(61, 255, 154, 0.15); color: var(--green); }
.cx-line.warn .cx-li { background: rgba(242, 179, 61, 0.16); color: var(--gold); }
.cx-line.no .cx-li { background: rgba(255, 106, 90, 0.14); color: #ff8a7a; }
.cx-spin { width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(46, 230, 214, 0.25); border-top-color: var(--teal); animation: cxSpin 0.8s linear infinite; }
@keyframes cxSpin { to { transform: rotate(360deg); } }
.cx-bar { height: 10px; border-radius: 999px; background: #132d36; overflow: hidden; border: 1px solid var(--edge); }
.cx-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2ee6d6, #b49bff); transition: width 0.6s ease-out; }
.cx-ws { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.cx-w { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--ink); font: inherit; text-decoration: none;
  background: #132d36; border: 1px solid rgba(46, 230, 214, 0.3); border-bottom: 4px solid #09151a; min-width: 0; }
.cx-w:hover { border-color: rgba(127, 255, 242, 0.75); } .cx-w:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.cx-w img { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.cx-w b { font: 800 14px/1.15 var(--display); overflow-wrap: anywhere; min-width: 0; }
a.btn { text-decoration: none; }
.cx-wi { width: 28px; height: 28px; flex: none; display: grid; place-items: center; color: #7ffff2; } .cx-wi svg { width: 24px; height: 24px; }
.cx-qr { justify-self: center; width: min(240px, 70vw); padding: 10px; border-radius: 14px; background: #fff; }
.cx-qr svg { display: block; width: 100%; height: auto; }
.cx-copy input { width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--edge); background: #09151a; color: var(--ink); font: 600 13px var(--body); user-select: text; -webkit-user-select: text; }
.cu-cbonus { font: 800 13px var(--display); letter-spacing: 0.06em; color: #04201c; background: linear-gradient(#7ffff2, #2ee6d6); padding: 5px 12px; border-radius: 999px; box-shadow: 0 0 16px rgba(46, 230, 214, 0.5); }
@media (max-width: 420px) { .cu-cxbs { grid-template-columns: 1fr; } .cx-head img { width: 60px; height: 60px; } }
@media (prefers-reduced-motion: reduce) { .cx-spin { animation-duration: 3s; } }

/* Sybil's training (1.20): the dimmed screen with a hole over what she points at, the ring and the hand, her bubble */
#tut { position: absolute; inset: 0; z-index: 30; pointer-events: none; }
#tut .td { position: absolute; background: rgba(4, 9, 11, 0.58); pointer-events: auto; touch-action: none; }
/* (1.50) with a hole to show, the darkening is #tut-dim's shadow, in the ring's shape; the four pieces only take the taps */
#tut.hole .td { background: none; }
#tut-dim { position: absolute; box-sizing: border-box; pointer-events: none; box-shadow: 0 0 0 200vmax rgba(4, 9, 11, 0.58); }
#tut-ring { position: absolute; box-sizing: border-box; border: 3px solid #ffe27a; box-shadow: 0 0 0 4px rgba(255, 226, 122, 0.25), 0 0 22px rgba(255, 210, 90, 0.7);
  pointer-events: none; animation: tutRing 1.1s ease-in-out infinite; }
@keyframes tutRing { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
#tut-hand { position: absolute; width: 64px; height: 72px; pointer-events: none; transform-origin: 23px 2px;
  transform: scale(var(--fx, 1), var(--fy, 1)); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.55)); }
#tut-hand svg { width: 64px; height: 72px; display: block; animation: tutTap 1.1s ease-in-out infinite; transform-origin: 23px 2px; }
#tut-hand.hold svg { animation: tutHold 1.6s ease-in-out infinite; }
#tut-hand.nudge svg { animation: tutNudge 0.42s ease-out 1, tutTap 1.1s ease-in-out 0.42s infinite; }
@keyframes tutTap { 0%, 100% { transform: translate(10px, 14px) scale(1); } 45% { transform: translate(0, 0) scale(0.9); } 60% { transform: translate(0, 0) scale(0.9); } }
@keyframes tutHold { 0% { transform: translate(10px, 14px); } 25%, 85% { transform: translate(0, 0) scale(0.88); } 100% { transform: translate(10px, 14px); } }
@keyframes tutNudge { 0%, 100% { transform: translate(0, 0); } 30% { transform: translate(-6px, 0) rotate(-8deg); } 65% { transform: translate(6px, 0) rotate(8deg); } }
#tut-say { position: absolute; left: max(12px, env(safe-area-inset-left, 0px)); right: max(12px, env(safe-area-inset-right, 0px)); bottom: calc(max(12px, env(safe-area-inset-bottom, 0px)) + 96px);
  display: flex; align-items: flex-end; gap: 8px; max-width: 560px; margin: 0 auto; pointer-events: none; }
#tut-say.top { bottom: auto; top: calc(max(10px, env(safe-area-inset-top, 0px)) + 96px); }
/* (1.50) against the edge itself, when both of those would cover what she points at (tutorial.js) */
#tut-say.edge { bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
#tut-say.top.edge { bottom: auto; top: max(8px, env(safe-area-inset-top, 0px)); }
#tut-say img { width: 86px; height: 101px; flex: none; border-radius: 16px; border: 2px solid var(--teal); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5); background: #0b1c22; }
#tut-say .bubble { pointer-events: auto; border-color: var(--teal); }
#tut-say .bubble p { font-size: 17px; line-height: 1.35; }
#tut-say.pop .bubble, #tut-say.pop img { animation: tutPop 0.28s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes tutPop { from { transform: scale(0.88); opacity: 0.4; } to { transform: scale(1); opacity: 1; } }
@media (max-width: 560px) {
  #tut-say { bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 84px); }
  #tut-say img { width: 64px; height: 75px; }
  #tut-say .bubble p { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) { #tut-hand svg, #tut-ring { animation: none; } }
/* toasts move to the middle while Sybil's bubble sits at the top or bottom */
#app.tut-on #toasts { bottom: auto; top: 38%; }

/* ================================================================ Crew Wars (1.24) */
/* the War button over Raid: crossed swords on a dark coin with a steel rim, what the war is up to under it */
.hb-left { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none !important; }
.hb-left > * { pointer-events: auto; }
/* (1.51) the buttons over Raid stand in a block of their own, .hb-over, which takes no room in the bar: see below */
.hb-left > .hb-over { pointer-events: none; }
.hb-over > * { pointer-events: auto; }
.warbtn { position: relative; width: 64px; padding: 0 0 4px; border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 1px; color: #e8eef5; }
.warbtn .wsw { width: 56px; height: 56px; padding: 7px; box-sizing: border-box; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #355966, #11242b 70%);
  border: 3px solid #a9b6c6; box-shadow: 0 0 0 2px #091216, 0 6px 14px var(--shadow), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
.warbtn span { font: 800 10px/1.15 var(--display); letter-spacing: 0.06em; text-transform: uppercase; background: rgba(7, 16, 19, 0.88); border: 1px solid var(--edge);
  border-radius: 7px; padding: 2px 6px; white-space: nowrap; font-variant-numeric: tabular-nums; margin-top: -9px; position: relative; }
.warbtn .badge { top: -4px; right: 0; }
.warbtn.battle .wsw { border-color: #ff6a5a; box-shadow: 0 0 0 2px #091216, 0 0 16px rgba(255, 74, 58, 0.55), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
.warbtn.battle span { color: #ffd1cc; border-color: rgba(255, 74, 58, 0.5); }
.warbtn.prep .wsw { border-color: var(--gold); }
.warbtn.search .wsw { animation: warpulse 1.6s ease-in-out infinite; }
.warbtn.loot .wsw { border-color: var(--gold); box-shadow: 0 0 0 2px #091216, 0 0 14px rgba(242, 179, 61, 0.55); }
.warbtn:active .wsw { transform: translateY(2px); }
.warbtn:focus-visible { outline: none; } .warbtn:focus-visible .wsw { outline: 3px solid #fff; outline-offset: 2px; }
@keyframes warpulse { 0%, 100% { box-shadow: 0 0 0 2px #091216, 0 6px 14px var(--shadow); } 50% { box-shadow: 0 0 0 2px #091216, 0 0 18px rgba(46, 230, 214, 0.6); } }
@media (prefers-reduced-motion: reduce) { .warbtn.search .wsw { animation: none; } }
@media (max-height: 500px) { .warbtn { width: 54px; } .warbtn .wsw { width: 46px; height: 46px; padding: 6px; } .hb-left { gap: 5px; } }

/* the raid header in a war attack */
#bt-name .tag.war { background: linear-gradient(#ff6a5a, #c8211b); color: #fff; }
#bt-name .wbest { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
#bt-name .wbest small { font: 700 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
#bt-name .wbest .star { width: 15px; height: 15px; }
.rloot.rwar { align-items: center; gap: 10px; }
.rloot.rwar span { font: 700 12px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.rloot.rwar b { font: 900 22px var(--display); color: var(--gold); }

/* the war window */
.modal.war .mpanel { width: min(960px, 100%); }
.wv { display: grid; gap: 12px; }
.wv-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; padding: 12px; border-radius: 16px;
  background: linear-gradient(90deg, rgba(46, 230, 214, 0.12), rgba(11, 26, 31, 0.6) 40%, rgba(11, 26, 31, 0.6) 60%, rgba(255, 74, 58, 0.14)); border: 1px solid var(--edge); }
.wv-side { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wv-side.them { flex-direction: row-reverse; text-align: right; }
.wv-sn { display: grid; gap: 1px; min-width: 0; }
.wv-sn b { font: 800 15px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wv-sn small { color: var(--muted); font-size: 13px; }
.wv-st { display: inline-flex; align-items: center; gap: 4px; font: 900 24px var(--display); color: var(--gold); }
.wv-side.them .wv-st { justify-content: flex-end; }
.wv-st .star { width: 22px; height: 22px; }
.wv-mid { display: grid; justify-items: center; gap: 1px; padding: 0 6px; }
.wv-mid small { font: 700 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.wv-mid b { font: 900 19px var(--display); font-variant-numeric: tabular-nums; }
.wv-bar { display: flex; height: 8px; border-radius: 5px; overflow: hidden; background: #182d34; margin-top: -6px; }
.wv-bar .us { background: linear-gradient(90deg, #22b7aa, #6ff5e9); }
.wv-bar .them { background: linear-gradient(90deg, #ff6a5a, #c8211b); margin-left: auto; }
.wv-note { margin: 0; color: #c5cfdc; font-size: 15px; }
.wv-map { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.wv-col { display: grid; gap: 6px; align-content: start; min-width: 0; }
.wv-col h4 { margin: 0 0 2px; display: flex; gap: 6px; align-items: center; }
.wv-col.them h4 { color: #ff8f84; }
.wv-map .wv-col.us { order: -1; }
.wb { display: grid; grid-template-columns: 22px 46px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 5px 8px 5px 6px; border-radius: 12px;
  background: var(--panel2); border: 1px solid var(--edge); min-height: 46px; }
.wb.me { border-color: var(--line); background: #0f252d; }
.wb.flat { opacity: 0.72; }
.wb-pos { font: 800 14px var(--display); color: var(--muted); text-align: center; }
.wb-img { width: 46px; height: 36px; object-fit: contain; }
.wb-n { display: grid; min-width: 0; }
.wb-n b { font: 700 14px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-n small { color: var(--muted); font-size: 13px; }
.wb-st { display: flex; }
.wb-st .star { width: 16px; height: 16px; }
.wb .btn.small { padding: 8px 10px 6px; }
.wv-atts { display: grid; gap: 6px; }
.wa { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 44px 64px auto; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 12px; background: var(--panel2);
  border-left: 4px solid var(--teal); font-size: 14px; }
.wa.theirs { border-left-color: var(--red); }
.wa-who { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-who small { color: var(--muted); }
.wa .star { width: 15px; height: 15px; }
.wa-pct { font-weight: 800; font-variant-numeric: tabular-nums; }
.wa-new { color: var(--gold); font-weight: 800; }
.wa-t { color: var(--muted); font-size: 13px; text-align: right; }
.wv-search { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
.wv-search p { margin: 4px 0 8px; }
.wv-loot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(242, 179, 61, 0.18), rgba(242, 179, 61, 0.05)); border: 1px solid rgba(242, 179, 61, 0.4); }
.wv-loot > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 800 16px var(--body); }
.wv-loot b { font: 800 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.wv-result { text-align: center; padding: 14px; border-radius: 16px; border: 1px solid var(--edge); background: var(--panel2); display: grid; gap: 8px; justify-items: center; }
.wv-result h3 { font-size: 26px; }
.wv-result.win { background: radial-gradient(120% 140% at 50% 0%, rgba(242, 179, 61, 0.25), var(--panel2) 60%); border-color: rgba(242, 179, 61, 0.45); }
.wv-result.win h3 { color: var(--gold); }
.wv-result.lose h3 { color: #ff8f84; }
.wv-result p { margin: 0; }
.wv-rs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.wv-rs b { font: 800 14px var(--display); }
.wv-rsc { font: 900 20px var(--display); color: var(--gold); padding: 0 6px; }
.wv-idle { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--edge); }
.wv-idle p { margin: 0; color: #c5cfdc; }
.wv-idle .wsw, .wv-sh .wsw { width: 64px; height: 64px; flex: none; }
.wv-start { display: grid; gap: 12px; padding: 14px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
.wv-sh { display: flex; gap: 12px; align-items: center; }
.wv-sh p { margin: 4px 0 0; }
.wv-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; max-height: 300px; overflow: auto; }
.wp { display: grid; grid-template-columns: 22px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; text-align: left; padding: 7px 9px;
  border-radius: 11px; background: #0c1c22; border: 1px solid var(--edge); color: var(--ink); font: inherit; cursor: pointer; }
.wp .wp-box { grid-row: 1 / 3; width: 20px; height: 20px; border-radius: 6px; border: 2px solid #456570; }
.wp.on { border-color: var(--line); background: #0f242c; }
.wp.on .wp-box { background: var(--teal); border-color: var(--teal); box-shadow: inset 0 0 0 3px #0c1c22; }
.wp b { font: 700 13px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp small { color: var(--muted); font-size: 12px; }
.wp:disabled { opacity: 0.5; cursor: not-allowed; }
.wv-start .btn.big { justify-self: start; }
.wv-log { display: grid; gap: 6px; }
.wl { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 7px 10px; border-radius: 12px; background: var(--panel2); }
.wl-r { font: 800 11px var(--display); font-style: normal; text-transform: uppercase; letter-spacing: 0.08em; text-align: center; border-radius: 6px; padding: 3px 0; background: #273d45; }
.wl.win .wl-r { background: linear-gradient(#ffd77a, #e59b1c); color: #2a1700; }
.wl.lose .wl-r { background: #6b1f1a; color: #ffd1cc; }
.wl-vs { display: flex; gap: 6px; align-items: center; min-width: 0; }
.wl-vs b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 14px var(--display); }
.wl-sc { font: 800 15px var(--display); color: var(--gold); }
.wl small { color: var(--muted); }
@media (max-width: 720px) {
  .wv-map { grid-template-columns: minmax(0, 1fr); }
  .wv-map .wv-col.us { order: 0; }
  .wv-score { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); padding: 10px 8px; gap: 6px; }
  .wv-side .cbadge { width: 34px; height: 37px; }
  .wv-sn b { font-size: 12px; } .wv-st { font-size: 19px; } .wv-st .star { width: 17px; height: 17px; } .wv-sn small { font-size: 11px; }
  .wv-mid b { font-size: 16px; }
  /* 1.35.1: a crew's name takes a second line before it's cut, and the clock's words sit closer: in Spanish the clock
     (PREPARACIÓN, PARA LA BATALLA) is wider than in English, and a bot crew's name ("The Ape Bulls") lost its end */
  .wv-sn b { white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; line-height: 1.15; }
  .wv-mid small { letter-spacing: 0.06em; }
  .wa { grid-template-columns: minmax(0, 1fr) auto auto auto; } .wa-t, .wa-new { display: none; }
  .wl { grid-template-columns: 46px minmax(0, 1fr) auto; } .wl small { display: none; }
}
@media (max-width: 420px) {
  .wv-side { flex-direction: column; align-items: flex-start; gap: 4px; } .wv-side.them { flex-direction: column; align-items: flex-end; }
  /* a base's stars go under its name, so the Attack button keeps to the row's right */
  .wb { grid-template-columns: 18px 38px minmax(0, 1fr) auto; column-gap: 7px; row-gap: 1px; }
  .wb-pos, .wb-img { grid-row: 1 / 3; }
  .wb-n { grid-column: 3; grid-row: 1; } .wb-st { grid-column: 3; grid-row: 2; } .wb .btn.small { grid-column: 4; grid-row: 1 / 3; }
  .wb-st .star { width: 14px; height: 14px; }
  .wb-img { width: 38px; height: 30px; }
}

/* ---------------------------------------------------------------- reinforcements (1.25): the Interchange */
.dcard.cc { border-color: rgba(46, 230, 214, 0.55); background: radial-gradient(circle at 50% 42%, #1b3a44, #0f232a 70%); }
.dcard.cc img { object-fit: cover; object-position: 50% 38%; }
.ru.cc { border-color: rgba(46, 230, 214, 0.6); }
.ru.cc img { object-fit: cover; object-position: 50% 40%; }
.ai .lv { position: absolute; left: 2px; bottom: 2px; min-width: 17px; height: 17px; padding: 0 3px; border-radius: 5px; font: 800 10px/15px var(--display); font-style: normal; text-align: center; color: #fff;
  background: linear-gradient(#3a3f6e, #1d2142); border: 1px solid rgba(255, 255, 255, 0.35); }
.ai .lv.max { background: linear-gradient(#ffe48a, #e3a01c); color: #2a1700; border-color: #fff4c8; }
h4 .h4btn { margin-left: 10px; vertical-align: 1px; }
.ix-head { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 12px; align-items: center; }
.ix-head img { width: 104px; height: 80px; object-fit: cover; border-radius: 12px; background: #11252c; border: 1px solid var(--edge); }
.ix-head > div, .dn-head { display: grid; gap: 4px; min-width: 0; }
.ix-head .meter.big, .dn-head .meter.big { height: 10px; }
.ix-head .meter.big span, .dn-head .meter.big span { background: var(--teal); }
.ix-row { min-height: 64px; align-items: center; }
.ix-asks { display: grid; gap: 8px; margin-top: 6px; }
.ix-asks .btn { justify-self: start; }
.ix-ask { display: flex; gap: 8px; flex-wrap: wrap; }
.ix-ask input { flex: 1 1 180px; min-width: 0; font: 600 15px var(--body); color: var(--ink); background: #0b1a1f; border: 1px solid var(--edge); border-radius: 10px; padding: 9px 11px; }
.ix-ask input:focus { outline: none; border-color: var(--teal); }
.ix-full { color: #ffd77a; font-weight: 700; margin: 0; }
/* the crew chat's request card */
.cm.rqc { border-color: rgba(46, 230, 214, 0.32); background: linear-gradient(#11222b, var(--panel2)); }
.tag.rqt { color: #06201d; background: var(--teal); }
.rq { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-top: 6px; }
.rq b { font: 800 13px var(--display); color: #bff7f1; }
.rq-bar { height: 9px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.rq-bar span { display: block; height: 100%; background: linear-gradient(90deg, #22c3b6, var(--teal)); border-radius: 5px; }
.rq-from { margin: 4px 0 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.rq-from b { color: #e6ecf3; }
.rq-acts { display: flex; justify-content: flex-end; margin-top: 6px; min-height: 28px; align-items: center; }
.rq-done { font: 800 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #ffd77a; }
/* the donate panel */
.dn-head span.muted { overflow-wrap: anywhere; }
.dgrid .tcard.dn { padding-bottom: 8px; }
.mrow .mn .mdon { font: 700 11px var(--display); color: #9fd8d2; letter-spacing: 0.02em; }
/* ---------------------------------------------------------------- 1.26: the daily Star Bonus, the Treasury, achievements */
/* five pips under RAID while a Star Bonus is open */
#b-raid { flex-direction: column; gap: 4px; }
.sbpips { display: flex; gap: 3px; }
.sbpips i { width: 9px; height: 9px; background: rgba(42, 23, 0, 0.35); clip-path: polygon(50% 0, 62% 35%, 100% 38%, 70% 61%, 80% 100%, 50% 78%, 20% 100%, 30% 61%, 0 38%, 38% 35%); }
.sbpips i.on { background: #fff6dc; box-shadow: none; }
/* the Raid window's strip and the Treasury box */
.sbstrip { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(242, 179, 61, 0.2), rgba(242, 179, 61, 0.04)); border: 1px solid rgba(242, 179, 61, 0.42); }
.sbstrip > b { font: 800 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.sbstrip.wait { background: var(--panel2); border-color: var(--edge); }
.sbstrip .small { flex: 1 1 220px; min-width: 0; }
.sbstrip .i { width: 15px; height: 15px; }
.sb-pips { display: flex; gap: 2px; }
.sb-pips .star { width: 20px; height: 20px; }
.treas { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 12px; margin: 0 0 10px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(46, 230, 214, 0.14), rgba(46, 230, 214, 0.03)); border: 1px solid rgba(46, 230, 214, 0.32); }
.treas > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 800 16px var(--body); }
.treas b { font: 800 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }
.ix .treas { margin-top: 12px; }
/* the results' Star Bonus line */
.rsb { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px; padding: 9px 12px; border-radius: 12px;
  background: linear-gradient(90deg, rgba(242, 179, 61, 0.26), rgba(242, 179, 61, 0.08)); border: 1px solid rgba(242, 179, 61, 0.5); font: 800 16px var(--body); }
.rsb b { font: 900 14px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: #ffd77a; }
.rsb small { flex-basis: 100%; text-align: center; color: var(--muted); font-weight: 600; }
/* a count of achievements to claim on the profile corner */
.p-ach { position: absolute; left: -6px; top: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font: 900 11px/18px var(--display); text-align: center;
  color: #fff; background: var(--red); box-shadow: 0 0 0 2px #0a1317; }
.hot { color: #ffd77a; }
.pf-ach { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pf-ach .star, .ach-head .star { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
/* the Achievements window */
.ach-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font: 800 16px var(--body); }
.ach-claim { font: 800 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); border-radius: 8px; padding: 4px 8px; }
.ach-list { display: grid; gap: 8px; }
.ach-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.ach-row.ready { border-color: rgba(242, 179, 61, 0.6); background: linear-gradient(90deg, rgba(242, 179, 61, 0.14), var(--panel2) 60%); }
.ach-row.done { opacity: 0.78; }
.ach-ico { width: 64px; height: 56px; display: grid; place-items: center; }
.ach-ico img { max-width: 64px; max-height: 56px; object-fit: contain; }
.ach-ico img.achc { width: 46px; height: 56px; object-fit: cover; border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.12); }
.ach-ico svg.lgb { width: 52px; height: 52px; }
.ach-big .i, .ach-big img.i.ri { width: 46px; height: 46px; margin: 0; vertical-align: middle; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
.ach-big.war svg { width: 40px; height: 40px; }
.ach-main { min-width: 0; display: grid; gap: 4px; }
.ach-main p { margin: 0; }
.ach-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ach-top b { font: 800 14px var(--display); letter-spacing: 0.03em; }
.ach-pips { display: flex; gap: 1px; }
.ach-pips .star { width: 17px; height: 17px; }
.ach-pips .pip.ready .star { fill: rgba(242, 179, 61, 0.16); stroke: #ffd77a; stroke-width: 1.8; animation: achGlow 1.1s ease-in-out infinite alternate; }
@keyframes achGlow { from { filter: none; } to { filter: drop-shadow(0 0 4px rgba(255, 215, 122, 0.9)); } }
.ach-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.ach-bar span { display: block; height: 100%; background: linear-gradient(90deg, #22c3b6, var(--teal)); }
.ach-row.ready .ach-bar span { background: linear-gradient(90deg, #e59b1c, #ffd77a); }
.ach-bar em { position: absolute; inset: 0; font: 800 11px/16px var(--display); font-style: normal; text-align: center; color: #fff; text-shadow: 0 1px 2px #000; }
.ach-side { display: grid; justify-items: end; gap: 6px; }
.ach-rew { display: flex; align-items: center; gap: 2px; font: 800 15px var(--body); white-space: nowrap; }
.ach-rew small { margin-left: 6px; color: var(--muted); font-weight: 700; }
.ach-done { font: 800 11px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--teal); }
@media (max-width: 520px) {
  .ach-row { grid-template-columns: 48px minmax(0, 1fr); }
  .ach-ico { width: 48px; height: 44px; }
  .ach-ico img { max-width: 48px; max-height: 44px; }
  .ach-ico img.achc { width: 36px; height: 44px; }
  .ach-side { grid-column: 2; display: flex; justify-content: space-between; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { .ach-pips .pip.ready .star { animation: none; } }

/* ---------------------------------------------------------------- the app and its notifications (1.27) */
.acct b.on { color: var(--teal); }
.acct + .acct { margin-top: 8px; }
.i.shr { width: 1.05em; height: 1.05em; vertical-align: -0.18em; margin-right: -0.12em; color: var(--teal); }
.apppush { display: grid; gap: 12px; max-width: 560px; }
.apppush p { margin: 0; line-height: 1.4; }
.apppush > .btn { justify-self: start; }
.apppush h4 { margin: 4px 0 0; }
.pstat { display: flex; align-items: center; gap: 10px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; }
.pstat .pdot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 10px var(--teal); flex: none; }
.pkinds { margin: 0; }
.pwhat { margin: 0; padding-left: 18px; color: #c5cfdc; font-weight: 500; display: grid; gap: 4px; }
.pwhat li.no { opacity: 0.45; }
.pwhat b { color: var(--ink); }
.perr { color: #ff8a7a; font-weight: 600; }

/* ---------------------------------------------------------------- 1.29: the News window, its calendar, the what's-new card */
.chip.news .badge.dot { top: -3px; right: -3px; }
.tab { position: relative; }
.tab .dot { position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--panel); }
.nlist { display: grid; gap: 10px; }
.nitem { background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 12px 14px 4px; user-select: text; -webkit-user-select: text; }
.nitem.update { border-left: 4px solid var(--teal); }
.nitem.event { border-left: 4px solid var(--gold); }
.mpanel .nitem header { display: flex; justify-content: flex-start; align-items: center; gap: 6px; margin: 0; position: static; background: none; padding: 0; }
.nitem header time { margin-left: auto; font-size: 12px; color: var(--muted); }
.nitem .tag.nn { color: #fff; background: var(--red); }
.nitem.news .tag.nk { color: #e8e1ff; background: rgba(167, 123, 255, 0.3); }
.nitem.event .tag.nk { color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); }
.nitem h4 { margin: 8px 0 4px; font: 800 16px/1.25 var(--display); text-wrap: balance; color: var(--ink); text-transform: none; letter-spacing: 0; }
.nbody { font-weight: 500; font-size: 15px; line-height: 1.45; color: #dce4ee; max-width: 68ch; }
.nbody p { margin: 0 0 8px; }
.nbody ul { margin: 0 0 8px; padding-left: 20px; display: grid; gap: 4px; }
.evlist { display: grid; gap: 8px; margin-bottom: 6px; }
.evrow { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--panel2); border: 1px solid var(--edge); border-radius: 12px; padding: 10px 12px; }
.evrow.now { border-color: rgba(46, 230, 214, 0.4); }
.evi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 18px; color: var(--gold); background: rgba(242, 179, 61, 0.12); }
.evrow.now .evi { color: var(--teal); background: rgba(46, 230, 214, 0.12); }
.evb { min-width: 0; }
.evb b { font: 800 14px var(--display); }
.evb small { display: block; color: var(--muted); font-size: 12px; margin-top: 1px; }
.evb p { margin: 3px 0 0; font-weight: 500; font-size: 14px; line-height: 1.35; color: #d4dce7; }
.evt { font: 800 11px var(--display); color: var(--gold); text-align: right; white-space: nowrap; }
.evrow.now .evt { color: var(--teal); }
@media (max-width: 480px) { .evrow { grid-template-columns: 30px minmax(0, 1fr); } .evt { grid-column: 2; text-align: left; } .evi { width: 30px; height: 30px; font-size: 16px; } }
/* (1.32: the card lets taps through to the station; only Read and ✕ take them) */
.newscard { pointer-events: none; display: flex; align-items: stretch; gap: 0; max-width: 100%; background: rgba(8, 19, 23, 0.97); border: 1px solid rgba(46, 230, 214, 0.45);
  border-radius: 14px; box-shadow: 0 12px 28px var(--shadow); animation: toastIn 0.35s cubic-bezier(0.2, 1.35, 0.4, 1); transition: opacity 0.35s, transform 0.35s; }
.newscard button { pointer-events: auto; }
.newscard.out { opacity: 0; transform: translateY(10px); }
.newscard.out button { pointer-events: none; }
.newscard .nc-body { flex: 1 1 auto; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 4px 9px 12px; color: var(--ink); text-align: left; }
.newscard .nc-ico { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: var(--teal); background: rgba(46, 230, 214, 0.14); }
.newscard .nc-ico .bi { display: block; width: 20px; height: 20px; }
.newscard .nc-body > span { display: grid; min-width: 0; }
.newscard .nc-tag { font: 800 9px var(--display); font-style: normal; letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.newscard b { font: 800 14px/1.25 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.newscard .nc-open { flex: none; align-self: center; min-height: 36px; margin-left: 6px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(46, 230, 214, 0.55);
  background: rgba(46, 230, 214, 0.16); color: var(--teal); font: 800 12px var(--display); letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; }
.newscard .nc-x { flex: none; width: 42px; background: none; border: 0; color: var(--muted); font-size: 15px; cursor: pointer; }
/* 1.45: "a new version is ready" (update.js): the same card, one button, nothing to dismiss */
.newscard.upd .nc-open { min-height: 40px; margin-right: 10px; }
/* 1.45: on an iPhone or iPad in a browser, how the game gets the whole screen (screen.js): the same card again */
.newscard.a2hs .nc-ico .i { display: block; width: 20px; height: 20px; }
.newscard.a2hs .nc-open { min-height: 40px; }
/* 1.45: on the smallest phones held sideways a card reached the side tabs (Chat, Layouts) and lay over the corners'
   chips: there it sits lower and between them, and these two cards' lines may wrap (they are the whole message).
   (A short screen only, here and in the two rules after it: a narrow window that is wider than tall but not short,
   560 by 501 say, keeps the places 1.41.1 gave it) */
@media (max-width: 640px) and (max-height: 500px) and (orientation: landscape) {
  #toasts { left: 116px; right: 46px; width: auto; transform: none; bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 58px); }
  .newscard.a2hs b, .newscard.upd b { white-space: normal; }
}
/* (a long window there stood 8 px off the screen at its top and bottom: the narrow screen's rule takes the window's
   margin away, the short screen's rule counted on it. 1.45 had a rule of its own for it here; from 1.46 the frame every
   short screen's window gets, at the end of this file, holds for it too) */
.a2hs-how { display: grid; gap: 12px; }
.a2hs-how p { margin: 0; }
.a2hs-how ol { margin: 0; padding-left: 22px; display: grid; gap: 9px; }
.a2hs-how li { line-height: 1.4; }
.a2hs-how .i.shr { width: 18px; height: 18px; vertical-align: -3px; color: var(--teal); }
.a2hs-how .btn { justify-self: start; }
/* 1.45: a phone held upright, where the game cannot turn the screen itself (screen.js). Over the station and its
   windows, under the title screen (which is left upright: typing is easier that way) */
#turn { position: absolute; inset: 0; z-index: 49; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 8, 0.93); }
#turn .turnbox, #swipe .turnbox { width: min(360px, 100%); display: grid; gap: 12px; justify-items: center; text-align: center; }
#turn h2, #swipe h2 { margin: 0; font: 800 22px/1.2 var(--display); color: var(--teal); text-wrap: balance; }
#turn p, #swipe p { margin: 0; color: #c5cfdc; font-weight: 500; }
#turn .turn-late { display: none; font-size: 14px; color: var(--muted); }
#turn.late .turn-late { display: block; }
/* (Android, where a tap turns the screen for the player: "tap", not "turn") */
#turn .t-tap, #turn.tap .t-turn, #turn.tap .turn-late { display: none; }
#turn.tap .t-tap { display: block; }
#turn .btn { margin-top: 6px; min-height: 44px; }
/* a phone, turning from upright to sideways and back */
#turn .turn-ico { width: 96px; height: 96px; display: grid; place-items: center; }
#turn .turn-ico i { display: block; width: 44px; height: 76px; border: 3px solid var(--teal); border-radius: 10px; box-shadow: 0 0 24px rgba(46, 230, 214, 0.35);
  background: linear-gradient(var(--teal), var(--teal)) 50% calc(100% - 5px) / 14px 3px no-repeat; animation: turn-phone 2.4s ease-in-out infinite; }
@keyframes turn-phone { 0%, 18% { transform: rotate(0deg); } 45%, 78% { transform: rotate(-90deg); } 100% { transform: rotate(0deg); } }
@media (prefers-reduced-motion: reduce) { #turn .turn-ico i { animation: none; transform: rotate(-90deg); } }
/* 1.45: an iPhone held sideways in a browser (screen.js). The page gets room to scroll under the game, which stays
   where it is (fixed to the screen), so that one swipe up has the browser take its own bars away. The cover that asks
   for the swipe lies over everything, the title screen too, and is the one place a finger moves the page */
html.swipe-mode { overflow: visible; }
html.swipe-mode body { overflow: visible; height: auto; min-height: calc(100% + 300px); }
html.swipe-mode #app { position: fixed; left: 0; top: 0; right: 0; bottom: 0; height: auto; }
#swipe { position: absolute; inset: 0; z-index: 55; display: grid; place-items: center; touch-action: pan-y;
  /* (dark enough in its middle that the title screen's logo does not show through the words; the corners keep a hint of the game) */
  background: radial-gradient(ellipse at center, rgba(3, 6, 8, 0.97) 0%, rgba(3, 6, 8, 0.97) 55%, rgba(3, 6, 8, 0.9) 100%);
  padding: 10px max(20px, env(safe-area-inset-right, 0px)) 10px max(20px, env(safe-area-inset-left, 0px)); }
#swipe .turnbox { width: min(520px, 100%); gap: 9px; }
#swipe .s-slim, #swipe.slim .s-full { display: none; }
#swipe.slim .s-slim { display: block; }
#swipe .btn { margin-top: 4px; min-height: 44px; min-width: 120px; }
/* a phone on its side, and the way the finger goes */
#swipe .swipe-ico { position: relative; width: 84px; height: 48px; border: 3px solid var(--teal); border-radius: 10px; box-shadow: 0 0 24px rgba(46, 230, 214, 0.35); overflow: hidden; }
#swipe .swipe-ico i { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -3px 0 0 -7px; border-left: 3px solid var(--teal); border-top: 3px solid var(--teal);
  transform: rotate(45deg); animation: swipe-up 1.3s ease-in-out infinite; }
@keyframes swipe-up { 0% { transform: translateY(14px) rotate(45deg); opacity: 0; } 35% { opacity: 1; } 100% { transform: translateY(-14px) rotate(45deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #swipe .swipe-ico i { animation: none; } }
@media (max-height: 250px) { #swipe .swipe-ico { display: none; } #swipe h2 { font-size: 19px; } }
/* 1.29: a replay shared in the crew chat; sharing one from the Battle log; a crew's invite link */
.cm.rp { border-color: rgba(242, 179, 61, 0.35); }
.cm-sh { font-size: 12px; color: var(--muted); font-weight: 600; }
.cm-rp { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 6px; padding: 7px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); }
.rp-vs { min-width: 0; flex: 1 1 140px; font-size: 14px; overflow-wrap: anywhere; } .rp-vs i { color: var(--muted); font-style: normal; }
.rp-res { display: inline-flex; align-items: center; gap: 5px; } .rp-res .stars svg { width: 15px; height: 15px; } .rp-res b { font: 800 13px var(--display); }
.lshare { grid-column: 1 / -1; display: flex; gap: 6px; flex-wrap: wrap; }
.lshare input { flex: 1 1 180px; min-width: 0; }
.lshared { grid-column: 1 / -1; margin: 0; color: var(--teal); font-weight: 700; }
.cr-link { margin: 8px 0 0; } .cr-link input { width: 100%; box-sizing: border-box; }

/* ================================================================ layouts (1.30): the Layout tab, the editor, the Layouts window */
/* the Layout tab on the station's right edge (the chat tab's mirror) */
#lay-tab { position: absolute; right: 0; top: 44%; transform: translateY(-50%); z-index: 6; pointer-events: auto; display: grid; justify-items: center; gap: 2px;
  padding: 10px max(8px, env(safe-area-inset-right, 0px)) 8px 8px; color: var(--gold); background: rgba(7, 16, 19, 0.9); border: 1px solid rgba(242, 179, 61, 0.3); border-right: 0;
  border-radius: 16px 0 0 16px; box-shadow: 0 8px 22px var(--shadow); cursor: pointer; font: 800 9px var(--display); letter-spacing: 0.12em; text-transform: uppercase; }
#lay-tab .bi { width: 26px; height: 26px; display: block; }
#lay-tab:hover { color: #ffd77a; background: rgba(11, 26, 31, 0.96); }
#lay-tab:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
#app.sheet-open #lay-tab { display: none; }
@media (max-height: 500px), (max-width: 560px) { #lay-tab { top: 52%; padding: 8px max(6px, env(safe-area-inset-right, 0px)) 6px 6px; } #lay-tab .bi { width: 22px; height: 22px; } }

/* the editor: a bar along the top (close, name, undo, redo, save), the tools and the tray along the bottom */
#edit { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
#edit > * { pointer-events: auto; }
#ed-top { top: max(10px, env(safe-area-inset-top, 0px)); display: flex; align-items: center; gap: 10px; padding: 8px 10px; width: min(640px, calc(100% - 24px)); }
.ed-t { flex: 1 1 auto; min-width: 0; display: grid; }
.ed-t b { font: 800 15px/1.2 var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-t small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-btns { display: flex; gap: 6px; flex: none; }
#ed-undo, #ed-redo { font: 800 16px/1 var(--body); padding: 6px 10px 5px; }
#ed-bot { bottom: max(12px, env(safe-area-inset-bottom, 0px)); padding: 10px; width: min(900px, calc(100% - 24px)); display: grid; gap: 8px; }
#app.sheet-open #ed-bot { display: none; }
.ed-tools { display: flex; gap: 6px; flex-wrap: wrap; }
#ed-erase.on { color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); border: 0; border-bottom: 4px solid var(--gold-d); }
.ed-tray { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; padding: 2px 2px 6px; scrollbar-width: thin; min-height: 74px; }
.ed-it { position: relative; flex: none; width: 74px; height: 74px; padding: 4px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; font: inherit; }
.ed-it:hover { border-color: var(--line); }
.ed-it:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
.ed-it img { width: 60px; height: 50px; object-fit: contain; pointer-events: none; }
.ed-it b { position: absolute; right: 4px; top: 3px; font: 800 12px var(--display); color: #fff; text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.ed-it i { position: absolute; left: 4px; bottom: 3px; font: 800 9px var(--display); font-style: normal; letter-spacing: 0.06em; color: #ffe6a6; text-shadow: 0 1px 2px #000; }
.ed-done { margin: auto 0; color: var(--teal); font-weight: 700; padding: 0 4px; }
@media (max-height: 500px) { #ed-bot { padding: 7px 8px; gap: 6px; } .ed-tray { min-height: 60px; } .ed-it { width: 60px; height: 60px; } .ed-it img { width: 48px; height: 40px; } }
@media (max-width: 560px) { #ed-top { gap: 6px; padding: 7px 8px; } .ed-t b { font-size: 13px; } }

/* the Layouts window: a card for each slot (its map from above, its name and state, what can be done) */
.lay-note { margin: 0 0 10px; font-weight: 500; }
.lay-wb { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin: -2px 0 12px; padding: 8px 10px; border-radius: 12px;
  background: rgba(255, 106, 90, 0.08); border: 1px solid rgba(255, 106, 90, 0.25); }
.laylist { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.laycard { display: grid; gap: 8px; align-content: start; background: var(--panel2); border: 1px solid var(--edge); border-radius: 14px; padding: 10px; min-width: 0; }
.laycard.on { border-color: rgba(46, 230, 214, 0.5); box-shadow: inset 0 0 0 1px rgba(46, 230, 214, 0.2); }
.laymini { display: block; width: 100%; height: auto; border-radius: 8px; background: #09171c; }
.laymini.big { max-width: 420px; margin: 0 auto 8px; }
.lc-b { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; min-width: 0; }
.lc-b .lc-n { font: 800 15px var(--display); overflow-wrap: anywhere; }
.lc-b small { flex-basis: 100%; color: var(--muted); font-size: 13px; line-height: 1.3; }
.lc-b small .warn { font-weight: 700; }
.tag.lc-on { color: #06201d; background: var(--teal); }
.tag.lc-war { color: #fff; background: linear-gradient(#ff6a5a, #c8211b); }
.lc-acts, .lc-more, .lc-src { display: flex; gap: 6px; flex-wrap: wrap; }
.lc-more .btn { padding: 6px 9px 5px; font-size: 10px; }
.lc-x { border-top: 1px solid var(--edge); padding-top: 8px; }
.lc-x p { margin: 0 0 6px; }
.lc-form, .lay-paste { display: flex; gap: 6px; }
.lay-share textarea { width: 100%; box-sizing: border-box; resize: none; font-size: 14px; word-break: break-all; }
.lay-share p, .lay-link p { margin: 0 0 8px; font-weight: 500; }

/* ============================================================ seasons (1.31): the medallion, the Season window, the Alpha Pass */
.ssa { width: 18px; height: 18px; flex: none; vertical-align: -4px; }
/* the medallion over the Raid button: the tier, a ring for the way to the next, silver free and gold with the pass */
.ssnbtn .ssw { position: relative; width: 56px; height: 56px; box-sizing: border-box; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(#e8eef5 var(--p, 0%), rgba(255, 255, 255, 0.12) 0); border: 0; padding: 4px;
  box-shadow: 0 0 0 2px #091216, 0 6px 14px var(--shadow); }
.ssnbtn .ssw::before { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: radial-gradient(circle at 50% 32%, #355966, #11242b 72%);
  box-shadow: inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
.ssnbtn .ssw b { position: relative; font: 900 21px/1 var(--display); color: #f1f5fa; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); font-variant-numeric: tabular-nums; }
.ssnbtn .ssw::after { content: ''; position: absolute; left: 50%; top: 4px; width: 12px; height: 7px; margin-left: -6px; border-radius: 0 0 6px 6px;
  background: linear-gradient(#e8eef5, #8d9aab); opacity: 0.85; }
.ssnbtn.pass .ssw { background: conic-gradient(#ffd77a var(--p, 0%), rgba(242, 179, 61, 0.2) 0); box-shadow: 0 0 0 2px #091216, 0 0 14px rgba(242, 179, 61, 0.35), 0 6px 14px var(--shadow); }
.ssnbtn.pass .ssw::before { background: radial-gradient(circle at 50% 32%, #5a4520, #1d1408 72%); }
.ssnbtn.pass .ssw b { color: #ffe7a6; }
.ssnbtn.pass .ssw::after { background: linear-gradient(#fff3c4, #e59b1c); }
.ssnbtn.pass span:not(.ssw) { color: #ffe7a6; border-color: rgba(242, 179, 61, 0.45); }
.ssnbtn.ready .ssw { animation: ssnGlow 1.3s ease-in-out infinite alternate; }
@keyframes ssnGlow { from { filter: none; } to { filter: drop-shadow(0 0 8px rgba(242, 179, 61, 0.75)); } }
.ssnbtn:active .ssw { transform: translateY(2px); }
.ssnbtn:focus-visible .ssw { outline: 3px solid #fff; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .ssnbtn.ready .ssw { animation: none; filter: drop-shadow(0 0 6px rgba(242, 179, 61, 0.7)); } }
@media (max-height: 500px) { .ssnbtn .ssw { width: 46px; height: 46px; } .ssnbtn .ssw b { font-size: 17px; } }

/* a quest done, a tier reached: a small card over the toasts */
.ssnpop { pointer-events: none; display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; border-radius: 14px;
  background: linear-gradient(90deg, rgba(46, 230, 214, 0.16), rgba(8, 19, 23, 0.96) 55%); border: 1px solid rgba(46, 230, 214, 0.45);
  box-shadow: 0 10px 24px var(--shadow); animation: toastIn 0.3s cubic-bezier(0.2, 1.35, 0.4, 1); transition: opacity 0.4s, transform 0.4s; max-width: 100%; }
.ssnpop.big { background: linear-gradient(90deg, rgba(242, 179, 61, 0.22), rgba(8, 19, 23, 0.96) 60%); border-color: rgba(242, 179, 61, 0.6); }
.ssnpop.out { opacity: 0; transform: translateY(8px); }
.ssnpop .sp-ico .ssa { width: 30px; height: 30px; }
.ssnpop .sp-t { display: grid; gap: 1px; min-width: 0; text-align: left; }
.ssnpop .sp-t b { font: 800 11px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--teal); }
.ssnpop.big .sp-t b { color: var(--gold); }
.ssnpop .sp-t span { font-weight: 700; overflow-wrap: anywhere; }
.ssnpop .sp-t em { font: 800 12px var(--display); font-style: normal; color: #ffd77a; }

/* the window: points and tier, the season's clock */
.ssn-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; margin-bottom: 12px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(232, 238, 245, 0.08), var(--panel2) 55%); border: 1px solid var(--edge); }
.ssn-head.pass { background: linear-gradient(120deg, rgba(242, 179, 61, 0.18), var(--panel2) 60%); border-color: rgba(242, 179, 61, 0.4); }
.ssn-medal { width: 60px; height: 60px; border-radius: 50%; display: grid; place-content: center; text-align: center; position: relative;
  background: radial-gradient(circle at 50% 32%, #355966, #11242b 70%) padding-box, conic-gradient(#e8eef5 var(--p, 0%), rgba(255, 255, 255, 0.14) 0) border-box;
  border: 5px solid transparent; box-shadow: 0 4px 12px var(--shadow); }
.ssn-head.pass .ssn-medal { background: radial-gradient(circle at 50% 32%, #5a4520, #1d1408 70%) padding-box, conic-gradient(#ffd77a var(--p, 0%), rgba(242, 179, 61, 0.2) 0) border-box; }
.ssn-medal b { font: 900 22px/1 var(--display); }
.ssn-medal small { font: 700 9px var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.ssn-ht { min-width: 0; display: grid; gap: 4px; }
.ssn-l1 { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; font: 700 15px var(--body); }
.ssn-l1 > b { font: 800 18px var(--display); }
.ssn-pchip { display: inline-flex; align-items: center; gap: 4px; font: 800 10px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: #2a1700;
  background: linear-gradient(#ffd77a, #e59b1c); border-radius: 8px; padding: 3px 7px 3px 4px; }
.ssn-pchip .ssa { width: 14px; height: 14px; }
.ssn-bar { height: 8px; border-radius: 5px; background: rgba(255, 255, 255, 0.09); overflow: hidden; }
.ssn-bar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #8fa3b8, #e8eef5); }
.ssn-head.pass .ssn-bar span { background: linear-gradient(90deg, #e59b1c, #ffd77a); }
.ssn-ends { text-align: right; display: grid; }
.ssn-ends small { font: 700 10px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.ssn-ends b { font: 800 15px var(--display); font-variant-numeric: tabular-nums; }
.tab .tbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 6px; border-radius: 9px; background: var(--red); color: #fff; font: 800 11px var(--body); }

/* quests */
.ssq-list { display: grid; gap: 8px; }
.ssq { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.ssq.done { opacity: 0.7; background: linear-gradient(90deg, rgba(61, 255, 154, 0.08), var(--panel2) 55%); }
.ssq-ico { width: 52px; height: 48px; display: grid; place-items: center; }
.ssq-ico img { max-width: 52px; max-height: 48px; object-fit: contain; }
.ssq-ico img.ssq-card { width: 38px; height: 46px; object-fit: cover; border-radius: 8px; border: 2px solid rgba(255, 255, 255, 0.12); }
.ssq-big .i, .ssq-big .star, .ssq-big svg { width: 36px; height: 36px; margin: 0; vertical-align: middle; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
.ssq-big img.i.ri { width: 50px; height: 50px; margin: -7px; vertical-align: middle; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.5)); }
.ssq-big .star { fill: #ffd23a; stroke: #6b4a00; stroke-width: 1.2; }
.ssq-big.sb { position: relative; }
.ssq-big.sb i { position: absolute; right: -4px; bottom: -2px; font: 900 13px var(--display); font-style: normal; color: #2a1700; background: var(--gold); border-radius: 7px; padding: 0 4px; }
.ssq-big.ctr .cletter, .ssq-big.ctr img { width: 36px; height: 36px; font-size: 26px; }
.ssq-main { min-width: 0; display: grid; gap: 4px; }
.ssq-main > b { font: 700 15px/1.2 var(--body); overflow-wrap: anywhere; }
.ssq-bar { position: relative; height: 16px; border-radius: 8px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.ssq-bar span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #22b7aa, #6ff5e9); }
.ssq-bar em { position: absolute; inset: 0; display: grid; place-items: center; font: 800 11px var(--display); font-style: normal; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); font-variant-numeric: tabular-nums; }
.ssq-side { display: flex; align-items: center; gap: 8px; }
.ssq-pts { font: 800 13px var(--display); color: #ffd77a; white-space: nowrap; }
.ssq-swap, .ssq-ok { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.ssq-swap { cursor: pointer; color: var(--teal); background: #11252c; border: 1px solid rgba(46, 230, 214, 0.35); }
.ssq-swap svg, .ssq-ok svg { width: 20px; height: 20px; }
.ssq-swap:disabled { color: #456570; border-color: var(--edge); cursor: default; }
.ssq-swap:not(:disabled):active { transform: translateY(1px); }
.ssq-swap:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ssq-ok { color: #06331c; background: var(--green); }
.ssq-note svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--teal); }
.ssn-vault { display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; padding: 10px 12px; margin: 12px 0 10px; border-radius: 14px; background: var(--panel2); border: 1px dashed rgba(242, 179, 61, 0.45); }
.ssn-vault > div { display: grid; gap: 2px; flex: 1 1 220px; min-width: 0; }
.ssn-vault > div b { font: 800 13px var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.ssn-vault > span { display: inline-flex; align-items: center; gap: 2px; font: 800 16px var(--body); white-space: nowrap; }
.ssn-vault > span small { color: var(--muted); font-weight: 700; margin-left: 3px; }

/* the track: a column a tier, free on top, the Alpha Pass below, scrolled sideways */
.ssr-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.ssr-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: stretch; }
.ssr-lbls { display: grid; grid-template-rows: 92px 34px 92px; gap: 6px; }
.ssr-lbls span { display: grid; place-items: center; writing-mode: vertical-rl; transform: rotate(180deg); font: 800 10px var(--display); letter-spacing: 0.14em; text-transform: uppercase;
  border-radius: 10px; padding: 4px 2px; background: #11252c; color: #c9d3df; border: 1px solid var(--edge); }
.ssr-lbls span.t { writing-mode: horizontal-tb; transform: none; background: none; border: 0; color: var(--muted); font-size: 9px; }
.ssr-lbls span.p { color: #2a1700; background: linear-gradient(90deg, #ffd77a, #e59b1c); border-color: transparent; gap: 3px; }
.ssr-lbls span.p .ssa { width: 14px; height: 14px; transform: rotate(90deg); }
.ssr-track { display: flex; gap: 6px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
.ssr-track:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 12px; }
.ssr-col { flex: 0 0 82px; display: grid; grid-template-rows: 92px 34px 92px; gap: 6px; scroll-snap-align: center; }
.ssr-cell { position: relative; display: grid; place-items: center; align-content: center; gap: 4px; border-radius: 12px; padding: 6px 4px; text-align: center;
  background: #0f232a; border: 1px solid var(--edge); color: var(--ink); font: inherit; min-width: 0; }
.ssr-cell.f { background: linear-gradient(#172f38, #0f232a); }
.ssr-cell.p { background: linear-gradient(#2a2010, #17120a); border-color: rgba(242, 179, 61, 0.25); }
.ssr-cell.none { background: rgba(255, 255, 255, 0.02); border-style: dashed; color: var(--muted); }
.ssr-cell.todo, .ssr-cell.lock { opacity: 0.62; }
.ssr-cell.got { opacity: 0.5; }
.ssr-cell.claim { cursor: pointer; border: 2px solid #ffd77a; box-shadow: 0 0 0 2px rgba(242, 179, 61, 0.25), 0 0 14px rgba(242, 179, 61, 0.45); animation: ssnGlow 1.1s ease-in-out infinite alternate; }
.ssr-cell.claim::after { content: 'Claim'; position: absolute; bottom: -8px; left: 50%; transform: translateX(-50%); font: 800 9px var(--display); letter-spacing: 0.1em; text-transform: uppercase;
  color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
.ssr-cell.claim:active { transform: translateY(1px); }
.ssr-cell.claim:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.ssr-cell em { font: 800 13px var(--display); font-style: normal; font-variant-numeric: tabular-nums; line-height: 1.1; overflow-wrap: anywhere; }
.ssr-i .i { width: 30px; height: 30px; margin: 0; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.ssr-i img.i.ri { width: 42px; height: 42px; margin: -6px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.ssr-i.two { display: flex; }
.ssr-i.two .i { width: 24px; height: 24px; }
.ssr-i.two img.i.ri { width: 34px; height: 34px; margin: -5px; }
.ssr-i.two > :last-child { margin-left: -12px; }
.ssr-st { width: 56px; height: 44px; object-fit: contain; }
.ssr-cell img.ssr-st + em { font-size: 10px; }
.ssr-mark { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; }
.ssr-mark svg { width: 13px; height: 13px; }
.ssr-mark.ok { background: var(--green); color: #06331c; }
.ssr-mark.lk { background: #2a2010; color: #ffd77a; border: 1px solid rgba(242, 179, 61, 0.5); }
.ssr-n { position: absolute; top: 4px; right: 4px; font: 800 11px var(--display); font-style: normal; color: #2a1700; background: var(--gold); border-radius: 7px; padding: 1px 5px; }
.ssr-tier { display: grid; place-items: center; align-content: center; border-radius: 10px; background: #081418; border: 1px solid var(--edge); }
.ssr-tier b { font: 900 14px/1 var(--display); }
.ssr-tier small { font: 700 9px var(--body); color: var(--muted); }
.ssr-col.got .ssr-tier { background: linear-gradient(#22b7aa, #0b6e66); border-color: transparent; }
.ssr-col.got .ssr-tier small { color: #c9fff8; }
.ssr-col.next .ssr-tier { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(46, 230, 214, 0.25); }
.ssr-col.bonus .ssr-tier b { color: var(--gold); }
.ssn-getpass { width: 100%; margin: 4px 0 10px; }

/* the Alpha Pass */
.ssp-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; padding: 14px; border-radius: 16px;
  background: linear-gradient(120deg, rgba(242, 179, 61, 0.2), #17120a 70%); border: 1px solid rgba(242, 179, 61, 0.45); }
.ssp-card h3 { font-size: 20px; color: #ffd77a; }
.ssp-card p { margin: 4px 0 0; color: #e6d3a8; }
.ssp-emb .ssa { width: 64px; height: 64px; filter: drop-shadow(0 4px 10px rgba(242, 179, 61, 0.35)); }
.ssp-perks { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.ssp-perks li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.ssp-perks p { margin: 2px 0 0; font-size: 14px; color: #c5cfdc; }
.ssp-perks b { font: 800 13px var(--display); letter-spacing: 0.04em; }
.spk-i { width: 44px; height: 40px; display: grid; place-items: center; }
.spk-i img { max-width: 44px; max-height: 40px; object-fit: contain; }
.spk-i .i, .spk-i .star { width: 30px; height: 30px; margin: 0; }
.spk-i img.i.ri { width: 42px; height: 42px; margin: -6px; }
.spk-i .star { fill: #ffd23a; stroke: #6b4a00; stroke-width: 1.2; }
.spk-now { display: inline-block; margin-left: 4px; font: 800 11px var(--display); color: #2a1700; background: var(--gold); border-radius: 6px; padding: 1px 6px; }
.ssp-buy { width: 100%; }
.ssp-on { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(61, 255, 154, 0.08); border: 1px solid rgba(61, 255, 154, 0.35); font-weight: 700; }
.ssp-on svg { width: 22px; height: 22px; color: var(--green); flex: none; }
.ssp-cf { justify-items: center; text-align: center; }
.ssp-cf .cf-btns { justify-content: center; }
.cost.pass { gap: 3px; color: #ffd77a; font-size: 12px; }
.cost.pass .ssa { width: 15px; height: 15px; }
.upboost { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 3px; font: 800 10px var(--display); font-style: normal; letter-spacing: 0.06em; color: #ffd77a; text-transform: uppercase; }
.upboost .ssa { width: 13px; height: 13px; }

/* the season's end */
.ssn-over { display: grid; gap: 10px; }
.sso-top { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; }
.sso-top .ssa { width: 56px; height: 56px; }
.sso-top p, .ssn-over > p { margin: 0; }
.sso-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sso-list li { display: flex; align-items: center; gap: 4px 10px; flex-wrap: wrap; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.sso-amt { display: inline-flex; align-items: center; gap: 2px 6px; font: 800 17px var(--display); }
.sso-amt img.i.ri { width: 26px; height: 26px; margin: -3px; }
.sso-list .ssn-st { width: 48px; height: 38px; object-fit: contain; }
.sso-st { display: grid; gap: 1px; min-width: 0; }

@media (max-width: 560px) {
  .ssn-head { grid-template-columns: auto minmax(0, 1fr); }
  .ssn-ends { grid-column: 1 / -1; text-align: left; display: flex; gap: 6px; align-items: baseline; }
  .ssq { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; padding: 8px; }
  .ssq-ico { width: 44px; height: 44px; }
  .ssq-ico img { max-width: 44px; max-height: 44px; }
  .ssq-ico img.ssq-card { width: 34px; height: 42px; }
  .ssq-side { flex-direction: column; gap: 4px; }
  .ssr-col { flex-basis: 74px; }
}

/* ============================================================ 1.32: the Crew Games */
.cgbtn .wsw { padding: 6px; border-color: var(--gold); background: radial-gradient(circle at 50% 35%, #4a3a1c, #1a1309 70%); }
.cgbtn .cgi { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.cgbtn.ready .wsw { animation: warpulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 2px #091216, 0 0 14px rgba(242, 179, 61, 0.55); }
.cgbtn.live .wsw { border-color: var(--teal); }
@media (max-height: 500px) { .cgbtn .wsw { width: 46px; height: 46px; padding: 5px; } }
.cgpop { border-color: rgba(242, 179, 61, 0.55); background: linear-gradient(90deg, rgba(242, 179, 61, 0.18), rgba(8, 19, 23, 0.96) 55%); }
.cgpop .sp-ico .cgi { width: 30px; height: 30px; }
.cgpop .sp-t b { color: var(--gold); }
.cg-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 16px; margin-bottom: 10px;
  background: linear-gradient(120deg, rgba(242, 179, 61, 0.14), var(--panel2) 60%); border: 1px solid rgba(242, 179, 61, 0.35); }
.cg-crew { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cg-crew > div { display: grid; min-width: 0; }
.cg-crew b { font: 800 17px var(--display); overflow-wrap: anywhere; }
.cg-crew .cgi { width: 36px; height: 36px; }
.cgt { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 3px; margin: 4px 0 0; }
.cgt-seg { position: relative; height: 34px; border-radius: 8px; background: rgba(255, 255, 255, 0.07); overflow: hidden; display: grid; place-items: center; }
.cgt-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #c98a1f, #ffd77a); opacity: 0.85; }
.cgt-seg.got .cgt-fill { width: 100% !important; }
.cgt-mark { position: relative; font: 900 13px/1 var(--display); color: #fff; text-shadow: 0 1px 2px #000; margin-top: -9px; }
.cgt-seg small { position: absolute; bottom: 2px; left: 0; right: 0; text-align: center; font: 700 9px var(--display); color: rgba(255, 255, 255, 0.75); font-variant-numeric: tabular-nums; }
.cgt-seg.got small { color: #2a1700; }
.cgt-seg.got .cgt-mark { color: #2a1700; text-shadow: none; }
.cgt-note { margin: 6px 0 10px; }
.cg-me { display: grid; gap: 4px; padding: 8px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); margin-bottom: 12px; }
.cg-me > span { font-variant-numeric: tabular-nums; }
.cg-mebar { position: relative; height: 10px; border-radius: 5px; background: rgba(255, 255, 255, 0.08); }
.cg-mebar span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #22b7aa, #6ff5e9); }
.cg-mebar i { position: absolute; top: -3px; bottom: -3px; width: 3px; margin-left: -1px; border-radius: 2px; background: var(--gold); }
.cg-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.cgc { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.cgc.act { border-color: rgba(46, 230, 214, 0.5); background: linear-gradient(90deg, rgba(46, 230, 214, 0.1), var(--panel2) 60%); margin-bottom: 4px; }
.cgc.act.out { border-color: rgba(255, 106, 90, 0.5); background: linear-gradient(90deg, rgba(255, 74, 58, 0.1), var(--panel2) 60%); }
.cgc-main { min-width: 0; display: grid; gap: 4px; }
.cgc-main > b { font: 700 15px/1.2 var(--body); overflow-wrap: anywhere; }
.cgc-main small { display: flex; align-items: center; gap: 4px; }
.cgk { width: 14px; height: 14px; flex: none; }
.cgc-side { display: grid; justify-items: end; gap: 6px; }
.cgc-btns { display: flex; gap: 6px; align-items: center; }
.cg-lock { display: flex; gap: 8px; align-items: center; padding: 12px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.cg-lock svg { width: 22px; height: 22px; flex: none; color: var(--gold); }
.cgm-list { display: grid; gap: 6px; }
.cgm { display: grid; grid-template-columns: 22px minmax(0, 7em) minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.cgm.me { border-color: rgba(46, 230, 214, 0.5); }
.cgm-i { font: 800 12px var(--display); color: var(--muted); text-align: center; }
.cgm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cgm-bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.cgm-bar span { display: block; height: 100%; background: linear-gradient(90deg, #c98a1f, #ffd77a); }
.cgm em { font: 800 13px var(--display); font-style: normal; font-variant-numeric: tabular-nums; }
.cgr-list { display: grid; gap: 6px; margin-bottom: 12px; }
.cgr { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px 8px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--edge); }
.cgr.locked { opacity: 0.5; }
.cgr-t { display: grid; justify-items: center; }
.cgr-t b { font: 900 16px var(--display); color: var(--gold); }
.cgr-t small { font: 700 10px var(--display); color: var(--muted); font-variant-numeric: tabular-nums; }
.cgr-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.cgr-opt { position: relative; display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 40px; padding: 4px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--edge); color: inherit; font-variant-numeric: tabular-nums; }
.cgr-opt .i { width: 20px; height: 20px; margin: 0; }
.cgr-opt b { font: 800 13px var(--display); }
.cgr-opt small { font: 700 10px var(--display); color: var(--muted); }
.cgr-opt:not(:disabled):hover { border-color: var(--gold); }
.cgr-opt:disabled { cursor: default; }
.cgr-opt.got { border-color: var(--teal); background: rgba(46, 230, 214, 0.12); }
.cgr-opt.got i { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border-radius: 50%; background: var(--teal); color: #04221f; display: grid; place-items: center; }
.cgr-opt.got i svg { width: 12px; height: 12px; }
.cgr-lock { position: absolute; right: 8px; top: 8px; width: 16px; height: 16px; color: var(--muted); }
@media (max-width: 520px) {
  .cg-board { grid-template-columns: minmax(0, 1fr); }
  .cgc { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .cgt-seg small { font-size: 8px; }
  .cgm { grid-template-columns: 18px minmax(0, 6em) minmax(0, 1fr) auto; }
  .cgr-opt { min-height: 36px; }
}

/* ============================================================ 1.32: friendly challenges and friendly wars */
.tag.fr, #bt-name .tag.fr { background: linear-gradient(#ffd77a, #e59b1c); color: #2a1700; }
.fci { width: 18px; height: 18px; flex: none; }
.ch-fcbtn { display: inline-flex; align-items: center; gap: 5px; flex: none; }
.ch-fcbtn .fci { width: 16px; height: 16px; }
@media (max-width: 420px) { .ch-fcbtn span { display: none; } .ch-crewbtn i { display: none; } }
.cm.fc { border-color: rgba(255, 106, 90, 0.4); }
.cm.fr { border-color: rgba(255, 106, 90, 0.3); }
.cm-fc { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; margin-top: 6px; padding: 7px 9px; border-radius: 10px; background: rgba(0, 0, 0, 0.28); }
.fc-base { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; color: #ffb3a8; }
.fc-base span { display: grid; min-width: 0; color: var(--ink); }
.fc-base b { overflow-wrap: anywhere; }
.fc-base small { color: var(--muted); }
.fcf { display: grid; gap: 12px; }
.fcf-list { display: grid; gap: 6px; }
.fcf-opt { display: grid; gap: 1px; text-align: left; padding: 10px 12px; border-radius: 12px; cursor: pointer; color: inherit; font: inherit; background: var(--panel2); border: 2px solid var(--edge); }
.fcf-opt small { color: var(--muted); }
.fcf-opt.on { border-color: var(--gold); background: linear-gradient(90deg, rgba(242, 179, 61, 0.14), var(--panel2) 70%); }
.fcf button[type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.wv-offers { display: grid; gap: 8px; margin-bottom: 12px; }
.wo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 14px; background: linear-gradient(90deg, rgba(242, 179, 61, 0.12), var(--panel2) 60%); border: 1px solid rgba(242, 179, 61, 0.35); }
.wo.mine { background: var(--panel2); border-color: var(--edge); }
.wo-main { display: grid; gap: 2px; min-width: 0; }
.wo-main b { overflow-wrap: anywhere; }
.wo-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.wo-go { display: flex; gap: 8px; align-items: center; }
.wo-go .btn.big { flex: 1; }
.wv-mid .tag.fr { justify-self: center; margin-bottom: 2px; }
@media (max-width: 520px) { .wo { grid-template-columns: auto minmax(0, 1fr); } .wo-btns { grid-column: 1 / -1; justify-content: stretch; } .wo-btns .btn { flex: 1; } }
/* The buttons over Raid (Season, the holiday parcel, Crew Games, War): two to a row, in a block of their own.
   Until 1.50 they stood in a column over Raid, side by side only on short screens (a phone on its side: two to a row
   over Raid; inside a browser's bars, a page under about 340 px tall, three in one row: 1.45). 1.51 adds a fourth,
   the parcel, and four in a column reached the chat tab on a phone held upright and in a short window on a PC: so
   they stand two to a row on every screen (one or two of them look as they did, side by side instead of stacked).
   The block, .hb-over, is set over Raid and takes no room in the bar: a second button beside the first must not
   make the bar's left side wider than Raid, or the bar runs out of room on a narrow phone held upright and Army,
   Shop and Menu go off the screen (1.51's first build did that at 360 px and under: test_rivals.py caught it).
   Each button is as wide as its tag, so two tags never touch ("SEASON" is wider than its medallion); and inside a
   browser's bars on a phone held sideways the four share one row */
.hb-over { position: absolute; left: 0; bottom: calc(100% + 8px); display: grid; grid-template-columns: repeat(2, auto); justify-content: start; justify-items: start; align-items: end; gap: 8px 6px; width: max-content; }
.hb-over > .warbtn { width: auto; min-width: 64px; }
@media (max-height: 500px) { .hb-over { bottom: calc(100% + 5px); gap: 5px 4px; } .hb-over > .warbtn { min-width: 54px; } }
@media (max-height: 340px) { .hb-over { grid-template-columns: repeat(4, auto); } }

/* ---------------------------------------------------------------- 1.33: the War League and the Medal Shop */
.warbtn.league .wsw { border-color: var(--gold); box-shadow: 0 0 0 2px #091216, 0 0 14px rgba(242, 179, 61, 0.45), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
.warbtn.league span { color: #ffe7b0; border-color: rgba(242, 179, 61, 0.45); }
.tag.lgt { color: #2a1700; background: linear-gradient(#ffd77a, #e59b1c); }
.lg { display: grid; gap: 12px; }
.lg-head { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: radial-gradient(120% 160% at 0% 0%, rgba(242, 179, 61, 0.18), var(--panel2) 60%); border: 1px solid rgba(242, 179, 61, 0.35); }
.lg-head .lgb { flex: none; }
.lg-nob { width: 58px; height: 58px; display: grid; place-items: center; flex: none; }
.lg-nob .wsw { width: 52px; height: 52px; }
.lg-ht { display: grid; gap: 2px; min-width: 0; }
.lg-ht small { font: 800 10px var(--display); letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.lg-ht b { font: 900 20px/1.1 var(--display); }
.lg-ht span { color: #c5cfdc; font-size: 13px; }
.lg-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 12px; margin-top: 12px; border-radius: 14px; background: var(--panel2); border: 1px solid rgba(242, 179, 61, 0.3); }
.lg-card .wsw { width: 46px; height: 46px; }
.lg-card div { display: grid; gap: 2px; min-width: 0; }
.lg-card small { color: #c5cfdc; }
.lg-btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lg-signed { display: grid; gap: 8px; padding: 12px; border-radius: 16px; background: var(--panel2); border: 1px solid var(--line); }
.lg-signed p { margin: 0; }
.lg-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px; }
.lg-pl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 8px; align-items: center; padding: 7px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.lg-pl b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px var(--display); }
.lg-pl small { grid-column: 1; color: var(--muted); }
.lg-pl .lg-st, .lg-pl .cost { grid-row: 1 / span 2; display: flex; align-items: center; gap: 3px; font: 800 13px var(--display); }
.lg-pl .lg-st .star { width: 15px; height: 15px; }
.lg-pl.me { border-color: rgba(46, 230, 214, 0.55); }
.lg-table { display: grid; gap: 4px; }
.lt { display: grid; grid-template-columns: 24px 28px minmax(0, 1fr) 54px 48px 34px; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 11px; background: var(--panel2); border: 1px solid var(--edge); }
.lt.lt-h { background: none; border: 0; padding: 0 10px; font: 800 9px var(--display); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.lt-p { font: 900 15px var(--display); text-align: center; }
.lt-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 700 13px var(--display); }
.lt-s { display: flex; align-items: center; gap: 3px; font: 800 14px var(--display); }
.lt-s .star { width: 15px; height: 15px; }
.lt-d, .lt-w { font-size: 12px; color: #c5cfdc; text-align: right; }
.lt.up { box-shadow: inset 4px 0 0 #3ddc84; }
.lt.down { box-shadow: inset 4px 0 0 #ff6a5a; }
.lt.me { border-color: rgba(46, 230, 214, 0.6); background: linear-gradient(90deg, rgba(46, 230, 214, 0.12), var(--panel2) 60%); }
.lg-zones { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0; }
.lg-zones .z { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.lg-zones .z.up { background: #3ddc84; } .lg-zones .z.down { background: #ff6a5a; }
.lg-rounds { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.lr { display: grid; gap: 3px; padding: 8px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.lr.battle { border-color: rgba(255, 106, 90, 0.6); }
.lr.prep { border-color: rgba(242, 179, 61, 0.5); }
.lr-t { font: 800 11px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lr.battle .lr-t { color: #ffb3aa; } .lr.prep .lr-t { color: var(--gold); }
.lm { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 6px; align-items: center; font-size: 12px; color: #aab6c6; }
.lm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lm-b { text-align: right; }
.lm-s { font: 800 11px var(--display); color: #e8eef5; }
.lm .won { color: #fff; font-weight: 700; }
.lm.mine { color: #e8eef5; }
.lm.mine .lm-s { color: var(--teal); }
.lg-res .lg-move { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lg-arr { font: 800 12px var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.lg-arr.up { color: #3ddc84; } .lg-arr.down { color: #ff8f84; }
.lg-bonus h3 { margin: 0; }
.lg-form .seg .btn[disabled] { opacity: 0.4; }
/* the Medal Shop */
.ms-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--panel2); border: 1px solid rgba(242, 179, 61, 0.35); }
.ms-head > .i { width: 34px; height: 34px; flex: none; }
.ms-head > div { display: grid; gap: 2px; }
.ms-head b { font: 900 20px var(--display); color: var(--gold); }
.ms-mine { display: grid; gap: 6px; }
.ms-own { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--edge); }
.msi { width: 40px; height: 40px; display: grid; place-items: center; }
.msi.big .i { width: 34px; height: 34px; }
.card.ms .msi { width: 64px; height: 64px; margin: 6px auto 2px; }
.card.ms .msi.big .i { width: 52px; height: 52px; }
.card.ms .muted.small { line-height: 1.3; }
.ms-use { display: grid; gap: 6px; }
.ms-t { display: grid; gap: 2px; text-align: left; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--edge); background: var(--panel2); color: var(--ink); cursor: pointer; font: inherit; }
.ms-t b { font: 700 14px var(--display); }
.ms-t small { color: var(--muted); }
.ms-t:hover, .ms-t:focus-visible { border-color: var(--gold); outline: none; }
@media (max-width: 480px) { .lt { grid-template-columns: 20px 24px minmax(0, 1fr) 46px 40px 28px; gap: 6px; padding: 6px 8px; } .lg-ht b { font-size: 17px; } }

/* ================================================================================================ 1.41: the station skin
   The windows, bars and buttons in the look of the title screen and of the hall the station now stands in: plates the
   dark teal of the tunnel's tiles under a rim lit from above, a hard dark outline as the logo's letters have, a solid
   lip under whatever can be pressed, and under a window's title the line itself (red, a white stop at each end).
   Colours, rims and shadows only: every size and every layout is as it was (the rims and lips are shadows, which take
   no room). The stylesheet's old navy shades were turned to the same teal-slate (n41/skin/navy.py). */
:root {
  --bg: #050b0f; --panel: #10212a; --panel2: #172d38; --line: rgba(64, 226, 214, 0.38); --edge: rgba(150, 214, 222, 0.17);
  --muted: #94a8b3; --shadow: rgba(0, 0, 0, 0.6);
  --out: #03080b;                                   /* the outline round a plate or a button */
  --lip: #071419;                                   /* the lip under a card or a tab */
  --rim: #24505c; --rim-hi: #5f9ba6;                /* a plate's rim, and its lit inner edge */
  --plate: linear-gradient(180deg, #18343f 0%, #0e1f28 100%);
  --plate-hud: linear-gradient(180deg, rgba(26, 55, 66, 0.95) 0%, rgba(9, 21, 28, 0.95) 100%);
  --tile: linear-gradient(180deg, #1d3944 0%, #142933 100%);
  --tile-hi: linear-gradient(180deg, #25495a 0%, #183240 100%);
}
/* a still vignette over the game's picture, under the HUD: the corners of the screen a little darker, the eye kept on
   the station (a layer the browser blends once it is made: it costs the game's own painting nothing) */
#vig { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 45%, rgba(2, 8, 11, 0) 56%, rgba(2, 8, 11, 0.44) 100%); }

/* ---- windows and sheets */
.modal { background: rgba(2, 9, 13, 0.68); }
#results { background: rgba(2, 9, 13, 0.66); }
.mpanel, .panelish, .rbox, #devmenu, .bubble {
  background: var(--plate); border-color: var(--rim-hi);
  box-shadow: 0 0 0 2px var(--rim), 0 0 0 4px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.09), 0 22px 54px rgba(0, 0, 0, 0.62); }
.mpanel header { background: #18343f; }
/* (1.46: the window's own header only. A News note has a header too, and its copy of this line lay along the bottom
   edge of the screen whenever the News was open, from 1.41 on) */
.mpanel > header::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 9px; pointer-events: none;
  background: radial-gradient(circle at 4.5px 50%, #f4f1ea 0, #f4f1ea 3.2px, rgba(244, 241, 234, 0) 4px),
    radial-gradient(circle at calc(100% - 4.5px) 50%, #f4f1ea 0, #f4f1ea 3.2px, rgba(244, 241, 234, 0) 4px),
    linear-gradient(var(--red), var(--red)) 4px 50% / calc(100% - 8px) 3px no-repeat; }
/* (a window's title keeps its own case: it may be a player's or a crew's name) */
.mpanel h2 { letter-spacing: 0.05em; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.5); }
#devmenu header { background: #17323c; }
.x { width: 32px; height: 32px; padding: 0; flex: none; display: inline-grid; place-items: center; border-radius: 50%; font-size: 14px; line-height: 1; color: #fff;
  background: linear-gradient(#ff7b6b, #cf2a22); border-bottom: 3px solid #7d0c0c; box-shadow: 0 0 0 2px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); }
.x:hover { color: #fff; background: linear-gradient(#ff9485, #dd372d); }
.x:active { transform: translateY(1px); border-bottom-width: 2px; }
.stats span { background: rgba(2, 10, 14, 0.42); border-color: rgba(150, 214, 222, 0.16); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.5); }
.prog { background: #08161c; box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.prog span { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45); }

/* ---- buttons: the outline and the gloss of the logo's letters */
.btn { box-shadow: 0 0 0 2px var(--out), inset 0 2px 0 rgba(255, 255, 255, 0.42), 0 7px 14px var(--shadow); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35); }
.btn.red { text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4); box-shadow: 0 0 0 2px var(--out), inset 0 2px 0 rgba(255, 255, 255, 0.3), 0 7px 14px var(--shadow); }
.btn.ghost { background: linear-gradient(#1f3d49, #12242d); border: 1px solid rgba(150, 214, 222, 0.24); border-bottom: 4px solid var(--lip); text-shadow: 0 1px 0 rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 2px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 7px 14px var(--shadow); }
.btn.ghost:active:not(:disabled) { border-bottom-width: 2px; }
.btn:disabled { color: #8ea2ad; background: #1a2d36; border-bottom-color: #0b171c; box-shadow: 0 0 0 2px var(--out); text-shadow: none; }

/* ---- cards and tabs */
.card, .tcard, .ropt, .stop, .hcard, .ccard { background: var(--tile); border-color: rgba(150, 214, 222, 0.17); box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.card:hover:not(:disabled), .tcard:hover:not(:disabled), .ropt:hover { background: var(--tile-hi); border-color: var(--line); }
.hcard { border-color: rgba(242, 179, 61, 0.3); }
.tcard.held, .tcard.held:hover:not(:disabled), .ccard.held { background: #17404a; }
.tab { color: #a9bdc7; background: var(--tile); border-color: rgba(150, 214, 222, 0.17); box-shadow: 0 3px 0 var(--lip), inset 0 1px 0 rgba(255, 255, 255, 0.07); }
.tab:hover:not(.on) { color: #e3edf2; }
.tab.on { color: #06201d; background: linear-gradient(#72f6ea, #22b7aa); border-color: rgba(255, 255, 255, 0.35); text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
  box-shadow: 0 3px 0 var(--teal-d), inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 0 16px rgba(46, 230, 214, 0.32); }

/* ---- the HUD: bars and chips as small plates */
.res, .chip, .p-id, #bt-name, #bt-stars, .toast, .warbtn span, #netbar {
  background: var(--plate-hud); border-color: rgba(150, 214, 222, 0.3);
  box-shadow: 0 0 0 2px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 14px rgba(0, 0, 0, 0.45); }
.warbtn span { box-shadow: 0 0 0 1px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.1); }
#res-cu { border-color: rgba(46, 230, 214, 0.5);
  box-shadow: 0 0 0 2px var(--out), inset 0 0 14px rgba(46, 230, 214, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 6px 14px rgba(0, 0, 0, 0.45); }
.meter { background: rgba(0, 0, 0, 0.55); box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.7); }
.meter span, .p-xp i { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.p-xp { background: rgba(0, 0, 0, 0.5); }
.warbtn .wsw { background: radial-gradient(circle at 50% 35%, #456673, #12252d 70%); border-color: #b4cbd3; box-shadow: 0 0 0 2px var(--out), 0 6px 14px var(--shadow), inset 0 -4px 8px rgba(0, 0, 0, 0.45); }
#chat-tab, #lay-tab { background: var(--plate-hud); box-shadow: 0 0 0 2px var(--out), 0 8px 22px var(--shadow); }
#chat-tab:hover, #chat-tab.on, #lay-tab:hover { background: linear-gradient(180deg, #21434f, #10232c); }

/* ---- the raid */
#deploy { background: linear-gradient(180deg, rgba(20, 44, 54, 0.9), rgba(7, 17, 23, 0.9)); border-color: rgba(150, 214, 222, 0.26); box-shadow: 0 0 0 2px var(--out), inset 0 1px 0 rgba(255, 255, 255, 0.08); }
.dcard { background: #132831; border-color: #2c4b57; box-shadow: 0 3px 0 var(--lip); }
.ru { background: #132831; border-color: #2c4b57; }

/* ---- 1.41.1: the red counts (the profile corner's achievements to claim, the battle log's, the Shop's, the season's,
   the games', the war's, the chat's). Nothing is drawn over one, the screen's edge cuts none, one figure is a circle.
   - The profile corner's count lay under the level badge (which has z-index 1; the count had none) with two thirds of
     it hidden, and on a phone held on its side the top of the screen cut it. It stands above the badge now, on its
     upper left shoulder, inside the screen at every size and clear of the level's figures.
   - A count's min-width was read as its content's (nothing here is border-box unless it says so), so one figure sat
     in a pill 10 px wider than its height: the battle log's lay over its own crossed swords.
   - A count stands above the buttons beside its own: on a phone the Shop's ran under the Menu button's edge. */
.badge, .p-ach { box-sizing: border-box; }
#hud-top .badge, #hud-bottom .badge, #chat-tab .badge, .p-ach { z-index: 2; }
.p-ach { left: -7px; top: -5px; }
@media (max-width: 600px) { .p-ach { top: -6px; } }
@media (max-height: 500px) { .p-ach { left: -8px; top: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; font-size: 10px; line-height: 16px; } }

/* The Army window's red take-out marks. A troop's count shared the top edge of its picture with the mark: the next
   troop's count lay over the mark (it hung 5 px left of its picture, the mark 6 px right of the one before, 8 px
   apart), and from about x200 a troop's own count ran into its own mark. The count stands at the foot of the picture
   now, as on the troops of a raid's bar; a Contract's count keeps the top (its icon stands at the foot), drawn in. */
.qi b { top: auto; bottom: 0; }
.qi i { right: -5px; }
.qi.con b { top: -6px; bottom: auto; left: -4px; }

/* The chat tab (with its count) on the left edge, against what else stands there.
   - With a season, the Crew Games and a war all on, three buttons stand over Raid, and on an upright phone under
     about 650 px of height (an iPhone in Safari with its bars, most Androids in a browser), or on a phone on its
     side, the tab lay over the topmost: by 4 to 45 px. The tab keeps 20 px clear of them now (12 on its side), and
     no higher than the plates of the top bar let it (the floors: those plates end 131 px down on a phone's layout,
     81 px down on a short wide screen, and the tab's count stands 6 px over the tab); the Layout tab across from it
     stays level with it on an upright phone. Unchanged where there was room: an upright phone of 690 px or more, a
     tablet, a PC. Not solved: a screen under about 340 px of height (a phone on its side inside a browser's bars)
     has no room between the two, and the tab still lies over the topmost button there, by less than it did.
   - A building's sheet reaches the screen's edge up to about 780 px of width, and the tab was drawn over its corner:
     it steps aside while a sheet is up, as the Layout tab does. */
@media (max-width: 560px) and (min-height: 501px) { #chat-tab, #lay-tab { top: max(169px, min(52%, calc(100% - 331px))); } }
@media (min-width: 561px) and (min-height: 501px) { #chat-tab { top: max(173px, min(44%, calc(100% - 335px))); } }
@media (min-width: 601px) and (max-height: 500px) { #chat-tab { top: max(120px, min(44%, calc(100% - 230px))); } }
@media (max-width: 780px) { #app.sheet-open #chat-tab { display: none; } }
/* 1.45: a small phone on its side (under 600 px wide). The Devs chip has room in the top row there (the rule that
   puts it under the profile corner is for upright phones), and the chat tab sits as on the wider short screens, between the
   corner's chips and the buttons */
@media (max-width: 600px) and (max-height: 500px) and (orientation: landscape) {
  .hud-c { grid-column: 2; grid-row: 1; justify-self: center; margin-top: 6px; padding-left: 0; }
  #chat-tab { top: max(112px, min(44%, calc(100% - 200px))); }
}

/* The bottom bar fits the screen, in every language. In Spanish and Portuguese it never did on a phone (since 1.34):
   "Ejército 20/20" beside "Asalto" and "Tienda" came 23 px too wide at 390 px and 53 px at 360 px, more as the army
   grew, and the Menu button was cut by the screen's edge or wholly past it. (It is an icon: the language test, which
   looks for text off the screen, never saw it.) English ran over only under 357 px, with a grown army.
   - Spanish and Portuguese on a phone: the Army button's count stands under its word (the three right-hand buttons
     stay 43 px tall); under 380 px Raid's letters and the buttons' sides come in a little, under 351 px a little more.
   - Every language under 360 px: the same stacked Army button (English needs no more than that).
   - Under 350 px the top bar's row of plates wraps (trophies and the battle log, then News under them): the News
     button had slid under the Gas bar once the battle log's button showed beside it. */
@media (max-width: 480px) {
  :lang(es) #b-army, :lang(pt) #b-army { flex-direction: column; gap: 3px; padding: 6px 10px 5px; }
  :lang(es) #b-army small, :lang(pt) #b-army small { margin-left: 0; font-size: 11px; line-height: 1; }
}
@media (max-width: 379px) {
  :lang(es) #b-raid, :lang(pt) #b-raid { font-size: 14px; padding: 14px 12px 12px; }
  :lang(es) .hb-right .btn, :lang(pt) .hb-right .btn { padding-left: 9px; padding-right: 9px; }
  :lang(es) #hud-bottom, :lang(es) .hb-right, :lang(pt) #hud-bottom, :lang(pt) .hb-right { gap: 5px; }
}
@media (max-width: 359px) {
  #b-army { flex-direction: column; gap: 3px; padding: 6px 10px 5px; }
  #b-army small { margin-left: 0; font-size: 11px; line-height: 1; }
}
@media (max-width: 350px) {
  :lang(es) #b-raid, :lang(pt) #b-raid { font-size: 13px; padding: 14px 10px 12px; }
  :lang(es) .hb-right .btn, :lang(pt) .hb-right .btn { font-size: 11px; padding-left: 7px; padding-right: 7px; }
  :lang(es) #hud-bottom, :lang(es) .hb-right, :lang(pt) #hud-bottom, :lang(pt) .hb-right { gap: 4px; }
}
@media (max-width: 349px) { .hud-l .p-row { flex-wrap: wrap; } }

/* ---- 1.42: rivals. On the leaderboards a bot's tag sits beside its name (the name gives way, never the tag); the
   dots between the top fifty and a player's own neighbours; a rivals' crew is a row, not a button. */
.bn { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bn b { min-width: 0; }
.bn .tag, .bname.crewn .tag, .lmain .tag { flex: none; }
.bgap { text-align: center; color: var(--muted); font: 900 14px/1 var(--display); letter-spacing: 0.3em; padding: 0 0 3px; }
/* (a crew's row was only ever a button, sized as buttons are: border and all. A rivals' crew is a row, and takes the
   board's width as the other rows do: at a button's 100% it stood 22px wider than the window) */
.brow.crewrow.bot { cursor: default; width: auto; }
.brow.crewrow.bot:hover { border-color: var(--edge); }
#bt-name b .tag { vertical-align: 2px; margin-left: 2px; }
/* a red tag wherever it stands (the Battle log's Payback): until 1.42 only the scout card's had the colour */
.tag.red { color: #fff; background: var(--red); }
/* a player's own row (on the Crews board, their crew's) stays in view at the foot of the Leaderboard until the list is
   scrolled down to where the row stands: with fifty rivals above, a new player's rank was a long way down. The
   window's bottom padding becomes a floor of the same height in the plate's own colour there (on a phone with a home
   bar, as tall as the bar), so the rows passing behind the pinned one end where the window's content always did. The
   row's tint is laid on a solid plate: nothing shows through it. */
.brow.me { background: linear-gradient(rgba(46, 230, 214, 0.12), rgba(46, 230, 214, 0.12)), var(--panel2); }
.modal.lb .mpanel { padding-bottom: 0; }
.modal.lb .mpanel::after { content: ''; display: block; position: sticky; bottom: 0; z-index: 1; height: max(20px, env(safe-area-inset-bottom, 0px)); background: #0e1f28; }
.modal.lb .board > .brow.me { position: sticky; bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 1; box-shadow: 0 -10px 14px -8px rgba(0, 0, 0, 0.7); }
/* 1.42.1: the pack's price in money under its CU in the purchase window, and in the crypto box's line. With no card on
   the server the window named no dollar price at all: the $CU and ETH amounts stood there with nothing to hold them
   against. */
.cu-usd { display: block; margin-top: 4px; font: 800 17px/1.1 var(--display); color: #ffd77a; letter-spacing: 0.02em; }
.cu-cxeq b { color: #fff; font-weight: 800; }
/* ---- 1.44: replay links. The title screen with a link open: the battle that was shared (who raided whom, how it
   went, when) and Watch, on a plate above Play. Play stands smaller under it and stops pulsing: Watch is the one that
   asks to be pressed. */
.sp-watch { display: grid; justify-items: center; gap: 6px; box-sizing: border-box; width: min(430px, calc(100vw - 32px)); padding: 12px 16px 16px; border-radius: 18px;
  background: rgba(7, 16, 19, 0.9); border: 1px solid rgba(46, 230, 214, 0.45); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.6); }
.sp-watch p { margin: 0; }
.spw-k { font: 800 11px var(--display); letter-spacing: 0.2em; text-transform: uppercase; color: var(--teal); }
.spw-t { font: 700 18px/1.25 var(--body); color: #dfe6ee; overflow-wrap: anywhere; text-wrap: balance; }
.spw-t b { color: #fff; }
.spw-r { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; justify-content: center; font: 700 14px var(--body); color: #b9c3d2; }
.spw-r:empty { display: none; }
.spw-r .stars { margin-left: 0; }
.spw-r b { font: 800 15px var(--display); color: #fff; }
.sp-watch .btn.big { margin-top: 4px; box-sizing: border-box; width: 100%; padding: 15px 10px 13px; font-size: clamp(15px, 5vw, 22px); white-space: normal; text-wrap: balance; }
#splash.watch #b-play:not([hidden]) { animation: none; font-size: 15px; padding: 11px 34px 9px; }
#splash:not([hidden]) #b-watch:not([hidden]) { animation: playPulse 1.9s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { #splash:not([hidden]) #b-watch:not([hidden]) { animation: none; } }
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .sp-watch { padding: 8px 14px 10px; gap: 3px; }
  .spw-t { font-size: 15px; }
  .sp-watch .btn.big { margin-top: 2px; padding: 10px 10px 8px; font-size: 17px; }
  #splash.watch #b-play:not([hidden]) { font-size: 13px; padding: 8px 26px 6px; }
}
/* the Battle log's Share, under its row: a link anyone can watch (its address, Copy, on a phone Share, how often it
   was watched, taking it down), and in a crew the line for the crew chat. The same box stands under a raid's result. */
.lshare { display: grid; gap: 8px; }
.lsl:empty { display: none; }
.lslink { display: grid; gap: 5px; min-width: 0; }
.lslink p { margin: 0; }
.lsrow, .lscrew { display: flex; gap: 6px; flex-wrap: wrap; min-width: 0; }
.lsrow input, .lscrew input { flex: 1 1 180px; min-width: 0; font: 600 16px var(--body); color: var(--ink); background: #081519; border: 1px solid #22404a; border-radius: 10px; padding: 9px 12px;
  user-select: text; -webkit-user-select: text; }
.lsrow input:focus, .lscrew input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(46, 230, 214, 0.2); }
.lsmeta:empty { display: none; }
/* (a dot on Share for a battle that has its link; an element of its own: on touch screens a button's ::after is the room around it) */
.lbtns .btn .ldot { display: none; flex: none; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 6px var(--teal); vertical-align: 1px; }
.lbtns .btn.linked .ldot { display: inline-block; }
/* (with Share… beside Copy on a phone, the address takes the row above the two) */
.lsrow.two input { flex-basis: 100%; }
.lsmeta .linkish { padding: 9px 0; }
/* a result's buttons: Return home (or Close) with Share replay under it; the link's box takes the box's width */
.ract { display: grid; justify-items: center; gap: 10px; }
.rshare { display: grid; justify-items: center; }
.rshare.open { justify-self: stretch; }
.rshare .lslink { width: 100%; text-align: left; }
/* a shared replay's result, for a visitor: the way into a station of their own, then Watch again and Close */
.rjoin { margin: 12px 0 10px; color: #dfe6ee; font-weight: 700; text-wrap: balance; }
.rmore { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 360px) { .rjoin { margin: 8px 0 6px; font-size: 13.5px; } }
/* a phone on its side: the buttons in a row (the box is as tall as the screen already), the link's box under them */
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .ract { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 10px; }
  .ract .btn.big { padding: 10px 22px 8px; font-size: 15px; }
  .rshare.open { flex: 1 1 100%; }
  .rjoin { margin: 6px 0; font-size: 13px; }
  .lslink { gap: 3px; }
  .lsrow input, .lscrew input { padding: 6px 10px; }
  .lsrow.two input { flex-basis: 180px; }
}

/* ================================================================ 1.46: menus that fit a phone held sideways
   A phone on its side is 320 to 440 px tall, and an iPhone keeps 21 px of that under its home bar and about 60 px at
   each side. Until here the windows were a computer's, a little tighter: a building's card covered two fifths of the
   station, and the upgrade window stood taller than the screen with its Cancel and Upgrade under the edge.
   The rules: over the station a card is a strip; a window is no taller than the screen and stands inside the phone's
   safe areas; the buttons that answer a window (its foot) stay in view while the rest scrolls under them; and what
   stood stacked stands side by side, the screen being wide. Nothing here touches a screen taller than 500 px. */
@media (max-height: 500px) {
  /* ---- a building's card: a strip. Picture, name and level, the numbers under them; the buttons at the right, by
     the thumb; the close button last. What the building is, and how to move it, at a tap on the "i" */
  #sheet { display: grid; grid-template-columns: 42px minmax(150px, 1fr) auto 30px; column-gap: 10px; row-gap: 3px; align-items: center; box-sizing: border-box;
    bottom: max(8px, env(safe-area-inset-bottom, 0px)); padding: 7px 10px 8px 12px; border-radius: 14px;
    width: min(760px, calc(100% - 2 * max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))); }
  #sheet > .sh-head { display: contents; }
  #sheet .sh-head img { grid-area: 1 / 1 / 3 / 2; width: 42px; height: 38px; }
  #sheet .sh-head > div { grid-area: 1 / 2 / 2 / 3; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
  #sheet .sh-head h3 { font-size: 14px; }
  #sheet .sh-head p { margin: 0; font-size: 13px; }
  #sheet .stats { grid-area: 2 / 2 / 3 / 3; gap: 4px; }
  #sheet .stats span { font-size: 12px; padding: 1px 5px; border-radius: 7px; white-space: nowrap; }
  #sheet .sh-busy { grid-area: 2 / 2 / 3 / 3; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; min-width: 0; }
  #sheet .sh-busy .prog { order: 2; flex: 1 1 60px; max-width: 160px; height: 6px; }
  #sheet .sh-busy p { margin: 0; font-size: 13px; }
  #sheet .sh-busy p.busy { order: 3; flex-basis: 100%; font-size: 12px; }
  #sheet.doing .stats { display: none; }
  #sheet .acts { grid-area: 1 / 3 / 3 / 4; margin: 0; gap: 6px; justify-content: flex-end; }
  #sheet .acts .btn { padding: 11px 10px 9px; font-size: 12px; letter-spacing: 0.04em; border-radius: 11px; gap: 5px; min-height: 38px; }
  #sheet .acts .btn .cost { font-size: 13px; }
  #sheet .sh-head .x { grid-area: 1 / 4 / 3 / 5; align-self: start; width: 30px; height: 30px; }
  #sheet .desc, #sheet .hint { display: none; margin: 0; font-size: 13px; grid-column: 1 / -1; }
  #sheet.more .desc { display: block; grid-row: 3; margin-top: 3px; }
  #sheet.more .hint { display: block; grid-row: 5; font-size: 12px; }
  #sheet .sh-warn { grid-column: 1 / -1; grid-row: 4; margin: 2px 0 0; font-size: 12px; }
  .sh-i { display: inline-grid; }
  #app.sheet-open #toasts { bottom: calc(max(8px, env(safe-area-inset-bottom, 0px)) + 96px); }       /* a word from the game stands over the strip, not on its buttons */

  /* ---- a window: inside the safe areas, no taller than the screen, less frame */
  .modal { padding: 6px max(8px, calc(env(safe-area-inset-right, 0px) - 4px)) 6px max(8px, calc(env(safe-area-inset-left, 0px) - 4px)); }
  .mpanel { box-sizing: border-box; max-height: 100%; padding: 8px 14px max(12px, calc(env(safe-area-inset-bottom, 0px) - 6px)); border-radius: 16px; }
  .mpanel header { top: -8px; margin-bottom: 6px; padding: 2px 0 4px; }
  .mpanel h2 { font-size: 17px; }
  .mpanel header .x { width: 30px; height: 30px; }
  .mpanel header .x::after, #sheet .sh-head .x::after { inset: -9px -8px; }       /* the smaller close button takes a tap as far out as the larger did */

  /* ---- "Upgrade X to level N?" (and a troop's research, a hero's level). The picture and the numbers side by side,
     what the thing does in a line across under them, and the foot (what it warns of, Cancel, the time, Upgrade) in
     view whatever the rest does: the picture gives way to the screen's height, and what still doesn't fit scrolls
     under the foot */
  .modal.upgd .mpanel { padding-bottom: 0; }
  .lvbar { height: 13px; margin-bottom: 6px; }
  .lvbar b { font-size: 9px; line-height: 13px; }
  .upg { grid-template-columns: minmax(0, 0.74fr) minmax(0, 1.26fr); gap: 6px 10px; }
  .upv { display: contents; }                       /* its picture and its lines are laid out by the window's own grid */
  .upv > img, .upv.por > img { grid-column: 1; grid-row: 1; align-self: start; box-sizing: border-box; padding: 4px; border: 1px solid var(--edge); border-radius: 12px;
    background: radial-gradient(circle at 50% 40%, rgba(46, 230, 214, 0.12), transparent 70%), var(--panel2);
    max-height: calc(100vh - 200px); max-height: calc(100dvh - 200px); min-height: 72px; }
  .modal.upgd.uw .upv > img { max-height: calc(100vh - 222px); max-height: calc(100dvh - 222px); }
  .upv.por > img { filter: none; }
  .upr { grid-column: 2; grid-row: 1; gap: 6px; }
  .upv > .upd { grid-column: 1 / -1; font-size: 13px; line-height: 1.25; }
  .upd.newlook { margin-bottom: 0; }
  .scg { gap: 6px; }
  .sc { grid-template-columns: 24px minmax(0, 1fr); padding: 5px 8px; gap: 6px; border-radius: 10px; }
  .sc .sci .i, .sc .sci img.i { width: 22px; height: 22px; }
  .scv b { font-size: 15px; }
  /* seven numbers or more (a troop with a trick of its own): four rows of them, without their bars */
  .sc:first-child:nth-last-child(n+7), .sc:first-child:nth-last-child(n+7) ~ .sc { padding: 3px 8px; }
  .sc:first-child:nth-last-child(n+7) .scb, .sc:first-child:nth-last-child(n+7) ~ .sc .scb { display: none; }
  .upr .unl { padding: 6px 8px 7px; border-radius: 12px; gap: 5px; }
  .unr { gap: 7px 5px; padding-top: 3px; }
  .ut, .ut.card { width: 44px; height: 38px; padding: 0; border-radius: 8px; box-shadow: none; }
  .ut img { max-width: 40px; max-height: 34px; }
  .ut.card img { width: 31px; height: 36px; border-radius: 5px; }
  .ut .cico { width: 32px; height: 32px; }
  .unl p { font-size: 12px; line-height: 1.2; }
  .upfoot { position: sticky; bottom: 0; z-index: 2; margin-top: 6px; padding: 7px 0 max(9px, calc(env(safe-area-inset-bottom, 0px) - 6px)); background: #0e1f28;
    box-shadow: 0 -8px 10px -8px rgba(0, 0, 0, 0.6); }
  .upfoot .upwarn { margin: 0 0 6px; font-size: 13px; line-height: 1.2; }
  .upbar { margin-top: 0; gap: 8px; flex-wrap: nowrap; }
  .upbar .btn.big { font-size: 15px; padding: 11px 20px 9px; }
  .uptime { padding: 3px 10px; border-radius: 10px; }
  .uptime b { font-size: 14px; }

  /* ---- what the windows share: tabs, headings, cards. The same things, smaller, and more of them to a row */
  .mpanel { width: min(620px, 100%); }
  .modal.narrow .mpanel { width: min(470px, 100%); }
  .tabs { gap: 5px; margin-bottom: 8px; }
  .tab { padding: 7px 10px; font-size: 12px; border-radius: 9px; }
  .mpanel h4 { margin: 10px 0 6px; font-size: 12px; }
  #m-body > p:first-child { margin: 2px 0 8px; font-size: 14px; line-height: 1.25; }      /* a window's opening line */
  .grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 7px; }
  .card { padding: 6px 5px 7px; gap: 1px; border-radius: 12px; }
  .card img { height: 58px; max-width: 100px; }
  .card b { font-size: 12px; line-height: 1.15; }
  .card .small, .tcard .small { font-size: 12px; }
  .tgrid { grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 7px; }
  .tcard { padding: 6px 4px 7px; gap: 1px; border-radius: 12px; }
  .tcard img { width: 58px; height: 68px; border-radius: 9px; }
  .tcard b { font-size: 11.5px; line-height: 1.15; }
  .tcard .row { gap: 2px 6px; }
  .tcard .qn { top: 4px; right: 4px; font-size: 11px; padding: 1px 6px; }

  /* ---- the Army: the room and the army itself stay in view, in one row under the title, while the troops scroll */
  .armytop { position: sticky; top: 26px; z-index: 1; display: flex; align-items: center; gap: 12px; margin: 0 -14px; padding: 6px 14px 7px; background: #17323d;
    box-shadow: 0 8px 10px -8px rgba(0, 0, 0, 0.7); }
  .armytop .armyhead { flex: 0 0 132px; grid-template-columns: 1fr; gap: 3px; }
  .armytop .armyhead .muted { display: none; }
  .armytop .armyrow { flex: 1 1 auto; min-width: 0; margin: 0; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; gap: 11px; padding: 7px 8px 3px 6px; }
  .armytop .armyrow > p { margin: 0; font-size: 13px; }
  .armytop .qi { flex: none; }
  .armytop .qi img { width: 40px; height: 47px; display: block; }

  /* ---- Heroes: the four of them on the screen at once, each with its buttons */
  .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .hcard { grid-template-columns: 62px minmax(0, 1fr); gap: 8px; padding: 8px 10px; border-radius: 12px; }
  .hcard img { width: 62px; height: 62px; }
  .hcard h3 { display: inline; font-size: 14px; margin-right: 6px; }
  .hcard .role { display: inline; font-size: 12px; }
  .hcard p { margin: 2px 0 0; font-size: 13px; line-height: 1.2; }
  .hcard .line { display: none; }
  .hcard .acts { margin-top: 6px; gap: 6px; }
  .hcard .acts .btn { padding: 9px 8px 7px; font-size: 10.5px; letter-spacing: 0.04em; gap: 4px; min-height: 38px; }      /* (a button with no price on it is as tall as one with) */
  .hcard .acts .btn .cost { font-size: 13px; }
  .hcard .acts .busy { flex-basis: 100%; margin: 0; font-size: 12px; }

  /* ---- Raid, and the Rug Cartel's line: three choices and the bonus on one screen */
  .modal.raidw .mpanel { width: min(680px, 100%); }
  .sbstrip { padding: 6px 10px; margin-bottom: 7px; border-radius: 12px; gap: 3px 10px; }
  .raidopts { gap: 6px; }
  .ropt { grid-template-columns: 46px 1fr; gap: 10px; padding: 6px 10px 6px 7px; border-radius: 12px; }
  .ropt img { width: 46px; height: 54px; border-radius: 8px; }
  .ropt b { font-size: 14px; margin-bottom: 1px; }
  .ropt span { font-size: 14px; line-height: 1.2; }
  .raidw #m-body > p.small { margin: 7px 0 0; }
  .cline { gap: 6px; }
  .cline::before { left: 23px; top: 16px; bottom: 16px; width: 5px; }
  .stop { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; padding: 6px 10px 6px 8px; border-radius: 12px; }
  .stop .dot { width: 30px; height: 30px; border-width: 5px; font-size: 12px; }
  .stop b { font-size: 14px; }
  .stop p { margin-top: 1px; font-size: 13px; line-height: 1.2; }
  .stop .btn { min-height: 40px; }

  /* ---- the Menu and the profile: two columns, the screen being wide */
  .modal.menu .mpanel { width: min(900px, 100%); }
  .modal.menu #m-body { column-count: 2; column-gap: 18px; }
  .modal.menu #m-body > * { break-inside: avoid; }
  .modal.menu #m-body > h4 { break-after: avoid; margin-top: 0; padding-top: 8px; }
  .modal.menu .btn.small { min-height: 30px; }        /* (more of the Menu is in view now: its small buttons a finger's size with what they take past their edges) */
  .howto { gap: 3px; font-size: 14px; line-height: 1.25; }
  .ctls { grid-template-columns: 1fr; gap: 6px; }
  .ctl { padding: 7px 10px; }
  .ctl ul { font-size: 13px; gap: 2px; }
  .acct { padding: 7px 10px; }
  .modal.pfw .mpanel { width: min(800px, 100%); }
  .pf { display: block; column-count: 2; column-gap: 20px; }
  .pf > * { break-inside: avoid; margin-bottom: 6px; }
  .pf > h4 { break-after: avoid; margin: 0 0 4px; padding-top: 4px; }
  .pf-head { grid-template-columns: 64px minmax(0, 1fr); gap: 10px; }
  .pf-head > svg { width: 64px; height: 64px; }
  .pf-id { gap: 3px; }
  .pf-id h3 { font-size: 17px; }
  .pf-lg { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; }
  .pf-lg > svg { width: 56px; height: 56px; }
  .lgladder { margin-top: 4px; }
  .pf-stats span { padding: 4px 6px; }
  .pf-btns { margin-top: 4px; }

  /* ---- Achievements and the season's quests: two to a row */
  .ach-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ach-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 8px; padding: 6px 8px; border-radius: 12px; }
  .ach-ico { width: 44px; height: 40px; }
  .ach-ico img { max-width: 44px; max-height: 40px; }
  .ach-ico img.achc { width: 33px; height: 40px; }
  .ach-ico svg.lgb { width: 38px; height: 38px; }
  .ach-big .i, .ach-big img.i.ri { width: 34px; height: 34px; }
  .ach-big.war svg { width: 32px; height: 32px; }
  .ach-main { gap: 2px; }
  .ach-top { gap: 2px 6px; }
  .ach-top b { font-size: 12.5px; }
  .ach-pips .star { width: 14px; height: 14px; }
  .ach-main p.small { font-size: 12.5px; line-height: 1.15; }
  .ach-bar { height: 13px; }
  .ach-bar em { font-size: 10px; line-height: 13px; }
  .ach-side { gap: 3px; }
  .ach-rew { font-size: 13px; }
  .ach-side .btn.small { padding: 7px 9px 6px; }
  .ssq-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  .ssq { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; padding: 5px 8px; border-radius: 12px; }
  .ssq-ico { width: 40px; height: 38px; }
  .ssq-ico img { max-width: 40px; max-height: 38px; }
  .ssq-ico img.ssq-card { width: 31px; height: 38px; }
  .ssq-big .i, .ssq-big .star, .ssq-big svg { width: 30px; height: 30px; }
  .ssq-big img.i.ri { width: 40px; height: 40px; margin: -5px; }
  .ssq-main { gap: 3px; }
  .ssq-main > b { font-size: 13.5px; line-height: 1.15; }
  .ssq-bar { height: 13px; }
  .ssq-bar em { font-size: 10px; }
  .ssq-side { gap: 6px; }
  .ssq-swap, .ssq-ok { width: 34px; height: 34px; border-radius: 10px; }

  /* ---- the season: its tier and its tabs in one row; the reward track whole, with its button; the pass's button in view */
  .modal.ssn .mpanel { padding-bottom: 0; }
  .modal.ssn #m-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 10px; align-items: center; padding-bottom: 12px; }
  .modal.ssn #m-body > * { grid-column: 1 / -1; min-width: 0; }
  .modal.ssn #m-body > .ssn-head { grid-column: 1; margin-bottom: 8px; padding: 4px 10px; gap: 8px; border-radius: 12px; }
  .modal.ssn #m-body > .tabs { grid-column: 2; margin-bottom: 8px; flex-wrap: nowrap; }
  .ssn-medal { width: 38px; height: 38px; }
  .ssn-medal b { font-size: 16px; }
  .ssn-medal small { display: none; }
  .ssn-ht { gap: 2px; }
  .ssn-l1 { font-size: 13px; }
  .ssn-l1 > b { font-size: 15px; }
  .ssn-l1 > .muted { display: none; }
  .ssn-bar { height: 6px; }
  .ssn-ht > small { font-size: 12px; line-height: 1.1; }
  .ssn-ends b { font-size: 13px; }
  .ssr-top { margin-bottom: 6px; }
  .ssr-lbls, .ssr-col { grid-template-rows: 68px 26px 68px; gap: 4px; }
  .ssr-cell.claim::after { bottom: -6px; }        /* (1.47: the rows are 4 px apart here, not 6: Claim stood 2 px onto the tier's box) */
  .ssr-col { flex-basis: 72px; }
  .ssr-track { gap: 5px; }
  .ssn-getpass { margin: 2px 0 6px; padding-top: 9px; padding-bottom: 7px; }
  .modal.ssn #m-body > .ssn-getpass { order: 1; }          /* the button straight under the track, its note after it */
  .modal.ssn #m-body > .ssr-wrap + p { order: 2; margin: 2px 0 0; }
  .ssp-card { padding: 7px 12px; gap: 10px; border-radius: 12px; }
  .ssp-card h3 { font-size: 16px; }
  .ssp-card p { margin-top: 1px; font-size: 14px; line-height: 1.2; }
  .ssp-emb .ssa { width: 40px; height: 40px; }
  .ssp-perks { margin: 7px 0; gap: 6px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ssp-perks li { grid-template-columns: 30px minmax(0, 1fr); gap: 7px; padding: 6px 8px; border-radius: 12px; }
  .ssp-perks li > i { width: 30px; height: 28px; }
  .ssp-perks li > i svg, .ssp-perks li > i img { max-width: 30px; max-height: 26px; }
  .ssp-perks b { font-size: 12px; }
  .ssp-perks p { font-size: 12.5px; line-height: 1.2; }
  .ssp-buy { position: sticky; bottom: max(8px, calc(env(safe-area-inset-bottom, 0px) - 6px)); z-index: 2; font-size: 15px; padding: 11px 20px 9px; }

  /* ---- Layouts: a layout's picture, its name and its buttons on one screen */
  .lay-note { margin-bottom: 6px; font-size: 13px; line-height: 1.25; }
  .laylist { gap: 8px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .laycard { padding: 7px 8px 8px; gap: 5px; border-radius: 12px; }
  .laymini { max-height: 84px; width: auto; max-width: 100%; margin: 0 auto; }
  .lc-b .lc-n { font-size: 13px; }
  .lc-b small { font-size: 12px; line-height: 1.2; }

  /* ---- buying CU: the card and the crypto side by side, and the thanks whole on the screen */
  .modal.buyw .mpanel { width: min(780px, 100%); }
  .modal.buyw #m-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 14px; row-gap: 8px; align-items: start; }
  .modal.buyw #m-body > * { grid-column: 1 / -1; min-width: 0; }
  .modal.buyw #m-body > .cu-buy { grid-column: 1; grid-row: 1; }
  .modal.buyw #m-body > .cf-btns { grid-column: 1; grid-row: 2; margin-top: 0; }
  .modal.buyw #m-body > .cu-cx { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
  .cu-buy > img { width: 92px; height: 92px; }
  .cu-buy p { margin-top: 4px; font-size: 14px; line-height: 1.25; }
  .cu-amt.big { font-size: 21px; }
  .cu-cx { padding: 9px 10px; gap: 6px; }
  .modal.buyw .cu-cxbs { grid-template-columns: 1fr; gap: 6px; }       /* one under the other: half the column each cut "Pay with $CU" short */
  .cu-cimg { width: min(130px, 33vmin); height: min(130px, 33vmin); }
  .cu-cbox { gap: 4px; padding: 8px 16px max(10px, env(safe-area-inset-bottom, 0px)); }
  .cu-cbox .btn.big { font-size: 16px; padding: 12px 26px 10px; }

  /* ---- forms and questions: tighter, their button on the screen */
  .suf, .crf { gap: 7px; }
  .fld { gap: 3px; }
  .suf .btn.big, .gate-btns .btn.big { font-size: 16px; padding: 12px 20px 10px; }
  .confirm { gap: 9px; }
  .confirm p { font-size: 15px; line-height: 1.3; }
  .a2hs-how { gap: 8px; }
  .a2hs-how ol { gap: 5px; }
  .a2hs-how li { line-height: 1.3; }

  /* ---- the layout editor: its tools and its tray in one row, inside the safe areas */
  #ed-top { box-sizing: border-box; width: min(640px, calc(100% - 2 * max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))); padding: 6px 8px; }
  #ed-bot { box-sizing: border-box; width: min(900px, calc(100% - 2 * max(12px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px)))); bottom: max(8px, env(safe-area-inset-bottom, 0px));
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 8px; }
  .ed-tools { flex: none; }
  .ed-tray { flex: 1 1 260px; min-width: 0; min-height: 0; padding: 2px; }

  /* ---- a crew: a member and what can be done with them in one line; a war's and the league's start on one screen;
     the Crew Games' challenges in view under their head */
  .cr-head { gap: 10px; }
  .cr-head > svg { width: 56px; height: 62px; }
  .cr-info { gap: 5px; }
  .cr-descr { font-size: 14px; line-height: 1.2; }
  .cr-chips span { font-size: 12px; padding: 2px 8px; }
  .mlist { gap: 5px; }
  .mrow { grid-template-columns: 24px minmax(0, 1fr) auto auto auto; gap: 2px 8px; padding: 5px 10px; }
  .mrow .macts { grid-column: 3; grid-row: 1; justify-content: flex-end; }
  .mrow .mnode { grid-column: 4; grid-row: 1; }
  .mrow .mt { grid-column: 5; grid-row: 1; }
  .wv-start { gap: 8px; padding: 9px 12px; border-radius: 14px; }
  .wv-sh { gap: 10px; }
  .wv-sh > svg { width: 44px; height: 44px; }
  .wv-sh h3 { font-size: 16px; }
  .wv-sh p { margin-top: 2px; font-size: 13px; line-height: 1.2; }
  .wv-pick { max-height: 132px; }
  .wp { padding: 5px 8px; }
  .wv-start .btn.big, .lg-btns .btn.big { font-size: 15px; padding: 11px 20px 9px; }
  .lg { gap: 8px; }
  .lg-head { padding: 6px 12px; gap: 10px; border-radius: 12px; }
  .lg-nob { width: 44px; height: 44px; }
  .lg-nob .wsw { width: 40px; height: 40px; }
  .lg-ht b { font-size: 17px; }
  .cg-head { padding: 6px 12px; margin-bottom: 6px; border-radius: 12px; }
  .cg-crew b { font-size: 15px; }
  .cgt-seg { height: 28px; }
  .cgt-mark { font-size: 12px; margin-top: -8px; }
  .cgt-note { margin: 4px 0 6px; }
  .cg-me { padding: 5px 12px; gap: 2px; margin-bottom: 8px; border-radius: 12px; }
  .lmsg:empty { min-height: 0; }
}
/* a short screen that is narrow too (a small or an older phone on its side, 568 to 700 px wide): one column again
   where two don't fit, and a card whose buttons are a little smaller */
@media (max-height: 500px) and (max-width: 700px) {
  #sheet { grid-template-columns: 34px minmax(120px, 1fr) auto 30px; column-gap: 8px; padding: 6px 8px 7px 10px; }
  #sheet .sh-head img { width: 34px; height: 32px; }
  #sheet .acts .btn { padding: 10px 8px 8px; font-size: 11px; }
  #sheet .stats span { font-size: 11.5px; padding: 1px 4px; }
  .tabs { gap: 6px 5px; }
  .tab { padding: 10px 10px 9px; }                     /* (tabs that wrap into two rows there have no room to take a tap past their edges) */
  .ach-list, .ssq-list { grid-template-columns: 1fr; }
  .ssp-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .laylist { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .modal.ssn #m-body { display: block; }
  .modal.ssn #m-body > .ssn-getpass + p, .modal.ssn #m-body > .ssr-wrap + p { margin: 6px 0; }
  .modal.menu #m-body, .pf { column-count: 1; }
  .modal.buyw #m-body { display: block; }
  .modal.buyw #m-body > .cf-btns, .modal.buyw #m-body > .cu-cx { margin-top: 10px; }
  .modal.buyw .cu-cxbs { grid-template-columns: 1fr 1fr; }
  .modal.buyw .mpanel { width: min(470px, 100%); }
  .hgrid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .mrow { grid-template-columns: 24px minmax(0, 1fr) auto auto; }
  .mrow .macts { grid-column: 2 / -1; grid-row: auto; justify-content: flex-start; }
  .mrow .mnode { grid-column: 3; }
  .mrow .mt { grid-column: 4; }
}
/* a phone held upright (to 640 px wide, taller than 500 px). The card stood 240 to 330 px tall there, half of a small
   phone's screen: it keeps its name, its numbers and its buttons, and what the building is waits behind the "i", as on
   the short screens. And the upgrade window's foot stays in view: on a phone 640 px tall or less the window was
   taller than its place, and Upgrade stood under the edge */
@media (max-width: 640px) and (min-height: 501px) {
  #sheet { padding: 10px 12px 12px; }
  #sheet .sh-head { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 8px; }
  #sheet .sh-head img { width: 46px; height: 40px; }
  #sheet .sh-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; }
  #sheet .sh-head h3 { font-size: 16px; }
  #sheet .sh-head p { margin: 0; font-size: 14px; }
  #sheet .desc, #sheet .hint { display: none; }
  #sheet.more .desc, #sheet.more .hint { display: block; }
  #sheet .stats { margin-top: 6px; }
  #sheet .acts { margin-top: 8px; }
  #sheet .acts .btn { padding: 12px 11px 10px; }
  #sheet .sh-busy { margin-top: 8px; }
  .sh-i { display: inline-grid; }
  .modal.upgd .mpanel { padding-bottom: 0; }
  .upfoot { position: sticky; bottom: 0; z-index: 2; margin-top: 10px; padding: 8px 0 max(12px, env(safe-area-inset-bottom, 0px)); background: #0e1f28; box-shadow: 0 -8px 10px -8px rgba(0, 0, 0, 0.6); }
  .upfoot .upwarn { margin: 0 0 8px; }
  .upbar { margin-top: 0; gap: 8px; }
  .upbar .btn.ghost { padding: 11px 12px 9px; }
  .upbar .btn.big { padding: 12px 14px 10px; }
  .uptime { padding: 4px 8px; }
  .uptime small { display: none; }                  /* the clock and the time say it */
  .uptime b { grid-row: span 2; }
  /* (three things that ran past a small upright phone's window, 320 to 360 px wide, before 1.46 too: the season's two
     wide buttons, whose words did not fit on one line; the Rug Cartel's rows; the test kit's longest buttons) */
  .ssn-getpass, .ssp-buy, .kit .btn { white-space: normal; text-wrap: balance; line-height: 1.15; }
  .stop { grid-template-columns: 50px minmax(0, 1fr) auto; }
}

/* ============================================================ 1.49: the site menu (site.js)
   Crypto Underground's own menu in the game. On a wide and tall screen the site's bar stands above the game (46 px:
   --sbar, which #app gives up at the top), in the site's own colours and letters; it goes in full screen and never
   shows on a phone. Anywhere else the title screen wears a small button in its corner, and the game's Menu a row at
   its top. Each opens the sheet: every link of it opens in a new tab. */
:root { --sbar: 0px; --cu-logo: url("data:image/webp;base64,UklGRkQVAABXRUJQVlA4WAoAAAAQAAAAcwAAXwAAQUxQSKoEAAABoEVtmyFJ+iL+WNu2bdu2bdu2bdu2bXu3d2yure74//+76N6erMyo+4iYANQ0iACYbpNDb9l9ztW23efw82666bpTjjh41zXmHB//m2JEUaMAmPOY18eS9N/Z+9/7PHb8quu+euEqAkBiOYIAE23xyJ8kaUrSTXs2Yy87Tlt6ZiDGMogAC102iGRWJ0ln7900OzU76T/cuRwQY/NiAGa67B/S1NlCJ2mZpD20IiChYQnY4v4fyWyso7uSvGdBQJoUBPM8TVKd9VXyr3MmQQqNicBeP1PVWW8l+6wPxIYIJr2TVNbfM3legjQiYc5Pqc5GmvGdeZEakLD8SGY2NvPHDZBql7DWn1Q2WKm7I4V6JWz8J5WNNucpkFCnhLX+o7HhrrwKEuojWPx3GhvvmVcjhbpEzDKUyhJ28RykmoQ48cdUljHzeKRahIT7mVlIV+4EqUPCocwsptl/S0NaJ1jyP/VyUNl/shhaFWTCr2gsaea9SK0SnMvMsmbuBGlNxBKd6oUx+2nmEFv0FpWlVT4IaYVgGyrLq1wfUl0IE/RzK9JX48VQWcK+VJZYeQBSZSF961Yk82EThVCRYGMay6zcB6miiKc8F8q8I4VQScTs/9ILReOGkEoSDmJmqbM/hlhJxKvUYjn/mAGhgohZ/6EXi8p9kSpI2IbKcmd/AbGSy5kL5vxzRoT/k9TzePF1asGo3DZNmHoW9HIUrWTZr0MvNzv2iP1332P3PXY5xVh05w/nnn7GmWeddebZF2w0jG34w47cmbXH4nnuuTO/34fGNmv8tC193JbebEvPtqWn2tKTbemJtvR0W3qyDSkf7dumvP080p46crbuquWznjvzQyPYhp/Y/JTn+3R0fPPNm6966bRP374DB/YZ8MGZywIYLyURoA+tZMqX0/jjjT++jA9AUkD38cLdzCXLPBOCHlMEELon7EEtmXGjkEJ39DZijv/o5XL+Ni0Cxj3gXWq51J9DRIUJxzAXjPsgVRExb5cXy/n7DAhVIOIF11JlfxSCShO2YLGMm1UVwgT93cpkPnTCEKpBwkHUMmUeh4SKQ5hsmFuJzL+fKoSqkHAgtUSZJ0FQeYjjd7iVx3z4ZDFUB8EG1PIod4WglYJ7mEujfDcKWhriNCPdyuLauThiayDYkLksmSdD0OqEi5hLonxLJLQsSHqduRzmP82JiNZHzDCMWgpXWw+COgqW+I1WiMwDkVBPwRqdbkXo4tlIqGvCFl20AnTxegjqm7Dp39TGZd4MCTVCwio/MjfLM69BDKh1wsL9mJtkzjMhATVPmP5FmjUmMx8ECai9AGeTuRmeOWJNJDQxBmwwkGYNUPLJmZHQUMHUN5JqNTPlLwcDgsYKsM5HpFqNTMnH5kUMaHAQyEHDSLWamJId2wMJDRdgyuOHkKbeMlcjBx0yIWJE44MAk+/7CUlVb4Grkvzm4MkAQRGDAGHde34iaVnNx8lNs5P86d4NxwMkoJRBAMywxxPfs7ubqlp3VTX2OPqhnWcAIAElDSIAplr7jGeH/Mdx/e3rB45adXIAIgHFDUkAYOKFNj7wotsfe/Pjjz9+/f7rj9t1ldkCAEgKqC9WUDggdBAAAFBAAJ0BKnQAYAA+RRyLQ6KhoRpbHaQoBES2AGcaw/+O/EDrGMd+M/JL2QLI/XPwJ+U/JI9v/bvK95p/3v3LfNb/f+pL9AewB+pf+c9fHoy/qf/H9Rv67/sl73Hof/x/qAf2P/F9ZH6Bn7Y+m7+6vwj/3z/ffth7TX/29gDWAO2P7YPNnx4eiPYvkk9Vf7P0S/l/4N/QflZ7K/63wj+PmoR+K/0b+6/lz+XnKS2j9Aj1W+ef6D+8/uJ/ff2K9s3/E9Efr97AH84/qH+U/Ln1p/Cn8n/WP8APsF/mf9Q/1f+L/cL+6fS//S/9v/O/l77d/o7/o/5/4Bf5T/SP9X/gv3j/yX//+rP//+7L9p/ZT/X5ygJjJ7dX5TKF/nwI7VOVCjMzGnqU287Hm8uv1JRGThBPlV3YNxj57IVX9lLc7i/bpB0pTq/sqDi4Q91GQRAL4fjipMxRHH8NOFAUeaB2woZDSYLZuOgh07QoJeNtGDQrv6I+NXqR9SBBsng6K/y/szLaiWd/baD0EvYValXQiBsWw3YH0cl0uXO2b0aTPlyyUIyBPM1bQ3ZRP+PjbdtoHji31zZhK717Zh33ZeDvY2lTipw/lq26/MzCcFNWsgJASAGQwm+BqiVrBmVTjhoTxolB+c+DmNpXljG9G1NAcmKRIigyje+kAnE5YhewsI+HRuWu/y1V72N9wQAA/v9gHq1puFzcmvML2pAijr/78RM4Bm0BuBfmb0enZXkOiv297cB5396UWLfeP2TWsgHER062vzTGCXi7UxOt1+etxyUhWMQFu7YeQOsic0mdj7PyB09roW3nYcTZx7TH8xHG835n37gc6/CmqFq9ONNfukxxvi9ECqCywq0Dtuwmw2w0KCvdr25Hi/cypXUqZVcVXXyiFGW1Cw5nscrSwgi3mZkU0mm+eSauyEdv2dnElYW2jr9m6UA7Fdlm+uMVBgiVh4q6O4yWQpj8pAEZSlhjKq2XQfYQCH8Sh0gKblrOsuutym6ZKAJ7l65RUCLaY4nGgFnFPE1DdAXt45j4d5s2p8utaIiKIFSpnuOl6jVkZmbcfhUJ087sPZKVHa379A2REqCtRaTYuS2Wr5auM0DFPEnFPmgmkzMTHmjHSIB0FQbd1KXMRXJd7j8nCGu5fNUZpmA3bTKO/kUl2QkARwdER8QzNgDo/AzPTrViUZqr8R3QaQqU3qfT58AAomydJViylqXApkcMfjre5uMwDtCUM7XyZaOlHvO5h6CgWcKToe1mD5UXENlIVgN75IAJjKO0ZKon9iQlykZg+5Y8b+GvCS8bbX0ppZAo9EFgVULx09JQpYWQUY/EJ5prVQgiYRlnGxJXJ0Oz7Zu08B8R2B2PiSeHq2Vt5ilvciDNzS/beaHK+hl5JZkO7hwIUDv7Ed43iuFq7UrhhfbqKRWBXyPOmt5B8EdqV1BRBiBuvhpBfEovT/BF4baP/BjnB6DsAqAHte4UAsCsk7D3414W6gaJkkrIgDqT+g3twEL50APfXgg0C2UqIqUjM6s0zlUsg3dxFh5YQ+9HV21R+A53ZTbxRy8reGzOJtsdlPRgJ01xUlo7oWE8JmsAjkEsAaZKWn3iFjC4sP2RdyLsoRArvjYXli4dusZZTp1abAuQkp6KaPnMooZek9z9z0570cw8TZ3RTLAtdvufiojJwI31Ye4h0SoFD7AfZMcnqHkaxbf5ivv4TIG1+R4X6A1VbKxpSb5W9YexkFLEJlXobEd18JsZ5LssBOMReURWk9snFMZBi75TM+eFEvpuJ/9UDe6ilF3Sr9B4mhg9x82X5Pv5FGPSfT5swolYs9FckpjY4Ti6nykw5L7kJNWMtQTj2Gme/d8nIhkzXLBxmA1GVT78N0FMN7HcLH/lf7fY9BlvfDx01DyjIiusnmukLXhSsJ0JbTtesQQaODhufFGzQP94F5xootPUgoYvZYgvReJDSA7pM2jjGMKXs+ohK9UbptzdX9DQD74jr2Y44h+lJ+WZw72wA0OkMjpg24YiIwHMVz17kLDQfr8H4LYEEVi0qupjJS09eeXoC6ZSwBso9qSIs/L3KsnkUVGOd4WRY367qPZ6P2rHGuiAQ35/J5Y7DTAZ0y2t9MPPo2BfttyoA+GKe7riJ9Z7xFkgXV/gZ1HrfYzpJTq/LUhMH6tLm2boYtDT9khYDcNHAdFfvcYtXBxi+IcsLGgJ2GY34HBgJ/O8eKsGWtP8lSKuIcw5pxbv3p0hvUWE1Z4E0Zbg5kyTWOqf6bw4GXju8uEmGzPAJ/mIDMG1oJHaaKyD4nNTKa2hfQSKBHW+8iMDHCh5BqKgnBKAWAS6XBglQW+h153NEbohP3izsSRq5lqVKT4UK/A4UPXIOn4xhlhQ+MAq8JZW+kCyy+CSz4J6eilad3H+f1VBMRa9sgoQ3sGnavvPCuD0iABhm287XXYXi5z+x8lQ9QYJNPdcBSb1Ey1LuAFdOpIGaB5A75dG/6nZPXKlwWOH2sLdfwiK9lWf1h1JUfPIGulUsQWih0FntXDmbdUwYtbrC9p/ZP1XTPwcvfRSbHIWKST6P0R/NTnQKtL/hpLMifpBcCp+Fb3B5xSCqMDKkcRWY94YZP1UFWZdhliFWQU/WvsXj/K4eKS+xd45C5F+hkVisQ1cURc+lSCas0fApGaxUidcsEeKmvnRJt3IAaf/iYZc5z42dmbjSGR/3YgeOC/TEtc4I+r84bftaRTeb6P41EXzbGp9r6lIHGMacDxkWUzq8Ov4V63VqrBVaMPJta4JJhGdLQklxTf0I8GerqKEW3/XMVSjuDVZCfCdJodd7jc7fi28QOgbZLxb8/7fzuHePr7gS7OhLjOuF/qrsgvq/Cu0OQGU28Om1g09UlYdJtoAmohb2coX2zNBJk0UdcACPPDMWG/NOuEgizEPxOnI//hSU9tbZYpRhEZWjMVRS+wb3cjP+hmcsDMRz6FkTawEsnpqh9KGWwzof7/nCzraxFH+5tIvXaSy1sUf84o2355cZNdWQNbVgxtk4rt7iIH7ifkuV9N+muxSH5bz9Is3ot1I9sC1dyZWHTjgXO557mW3cBhYAsm+J3aqHgYY5XiL2ixxZNQaTs5DBtkRo99gTfIUr+GLye6lQTxhgDY/85KSkV005Z1VQtDlRMgh05Hth8o6u/O1RiznC5ymWAlaRwLszF/v3NeqSP0Umd9sOb0vokrEPTzQd9QYUNSG47sjtkEHGv/30JNEOfh/YMAA1YdJO+iHc5etXj/1yX7Pv7xdWKlY//u1DxEAa+Tz5PvJTpFi8+idJFr/YLz35aMk6+PnJOGo6Lky7Zq9NowU32UkDJmZAsObG0ujQZBpfTNwP9vczWjU0OqnB3Nfan9LTIRqAheUYg7mgdykX5YPv2fCs/grWITdPi2DveShFpN8HON2g9RpMSbVfsUk/V6uO1dN3SeFCzjrDl1XtpZZoemJYdVh47YMGzbipvA/f8Wu8ocGKkXeYQLte5lEISi8hYO0ddqvJ/vV228EUMhjRrNS+KauEUfQ12Q2QGZLkdFCNnFyTQL4mWh8j3GiUcT/G7qdDQ+9H3/uwTeSkfx4cqFE2F12Eksv5WMeKw37+6XKBAvrL6QGp82QwH6le3Qf++iAwJwrKnUK2UYPT5dvJgt+8RRCMjcV3jxPaYxg2Jr/AtVNHWmEToSkAgHQiVb1BDbPWKEDX3nhD+k7+BQSoj9XSnTjQ8FGzNvHzscD7jizbAzRwqpSGVyZARJ+q2RbgbrNqc9WYPpODZk0KiUuYeIeKwN48RXXoJnnJ1VwOD8AjgatZUFtM1tyrRYYIKlBWpDIuGpekhosfC4zQ+RjnAU9GvJwKUHsGClKHPfRKRG4RAcA8sYnsroTv/9rd7axbi4cXdROwb/iRdbZjCV/PcPHc/lisyeyHZaeMNtPFfxELEKLUNptCgxaRHiruvNChsb5qdZ/4LAREn51/gOeRyR9ofyyeYNtGPP8KAuBFqkaeT4bYMIRD90HUf1eVSRf8Uq9yOpdC7O4P80Csv+bclS9UHX6TYOq1JpN/XnDklWOVsBLh/smGVpZJlf0UWuRQsQv+oeFDneuX3kNMAFa878EB+PA5FjgW1Iu7ItAkjgL6Ev3cvrZLJgiEynJQAtFG8FnLWFDRUieVlWnj2/PUa78B97CNL0JDV/tvpVlcdTmgUd7/YkgV/R/aGpzIdOYbve2vSgHeOQBw8Riqht7Hq5Q4TSpY0UlA0We/oBbEDzP1edz5jrK7qFVjcPgzepy2baBCS1Y1/W1EhmynwzKDmGa1nFeuVmSh+aB6UkQ2w/P8W90WwH3Y1El8m1xsjTGADswLBzS92yTNYK7yrmndyBEWJt4nlVecZVQ72wbUjU/0fDT0qs/DxL39uaUzHQy5+sazqCMUaPT2ePFWvm1BnfbGhMy6K7xEW70LlXXpsQlnckSRKDcPaBAC0JoTqYjxQoRndRhMbQhzPW7ACaJGskuQxKCAk6d6yV4LH8iuGLwJ75Bkl4Yqw18Qnvppfd5aETLqttO93fc19nRpk93pXggN/hkncccti0ywgHuQYStHm7kleFdKl41WHFyeYBXfpHLnncyM7n9qo0ca+L16GZmZzqTRY71pVV8MB5ezM/z0OTXBM+VcbOD8FmWpvAzjF7AS6IL8MfnXf97bnSjMr2rAm7Srfu+lXceeOXub347ieoNXwoViJKtQ8KFbC70KFEM/kgi1PPwKcw7um4xziKlrvQbl+oLD18wU0aNcJlMcBth4Udaml/pXv0HCzUda0fg/cO0WWjShw2Yycs4TExue5LzjcLmU0qgGcDQwW3YtEEtvzzuyH5ybsT2pSTwuMbvMJYb4RJcppXpsF6C8cnitrVAZjsnlx/CaHmqodwIHeQe9+nS+x+jjWNlVB5wDyBHK9qt2Pk360SRC2gsXGk1QjncPLAMyrRAMpKwby3AulW0EQFc55rHOp0v5qKqhobYCCOj0Z0KVIuLGxm2MCR30JejhGRLTfLWkC2YACamvOKij4DmnPYKrRSmal//owjhmlPDgioZvTcowZ/5PUqAXWM+/2O9h/INU4mDdH/kt459tp/BwkVtLfDiUcb+MctpiYaavq4R/cTtuYuEEKdPitOvFZ4QsW1IAJuu/yaFd3leGi3sutK0rZk+nxAgiKPqTC12MktCjyvHFTYygtlDdaYTEnW5YHJi082k81gnCbsAAlMuaj/Tzva2NmVw6z9OlfjqC78a82MJlsPe0LoXZF9kG+akaGvZeEQGqeKhkKV+Agik/pL7IR2Hde5YslEdHLMOkZgmFAa6U3qIfCjO/eHLAGxtOcYhlteRE9vlPpb1lI46MheLeAeSQ4k9oTCLGG/ibi+DWITaupWPdQOqNe+63pRLLllFXzsXq31gAsKj/zBF6/RhCTUCxGP3kMIIXP3/AYMcQ4Wh8ROwKbiAdDF2L0O0uhglzzn+jpIF0xKf0Nwpm10aIaby6pxAjSBoNudgk8W437n2sL9vG/Mc6rP/0FyPyjrhbChEBKuJyy+Nta1UyPBL5QGYKy0SxxEOzg4jJMhuRdNj+94n2/GPpCKfl8KNXTyVfEWT83ABHJ5tc2uF1AOmpr6S3f/prdSGaAgwAAAAAA=="); --site-bg: #0a0f14; --site-ink: #eaf4fb; --site-ink2: #a9bacb; --site-cyan: #00d4ff;
  --site-line: rgba(138, 196, 235, 0.14); --site-line-hi: rgba(138, 196, 235, 0.32); }
.cu-mark { display: inline-block; flex: 0 0 auto; width: 34px; height: 28px; background: var(--cu-logo) center / contain no-repeat; }
#sitebar { display: none; }
@media (min-width: 980px) and (min-height: 600px) {
  html.site-on { --sbar: 46px; }
  html.site-on #sitebar { display: flex; }
  html.site-on #sitepill { display: none; }
}
html.site-on.site-fs, html.site-on.swipe-mode { --sbar: 0px; }
html.site-on.site-fs #sitebar, html.site-on.swipe-mode #sitebar { display: none; }
html.site-on.site-fs #sitepill:not([hidden]) { display: inline-flex; }
#sitebar { position: relative; z-index: 2; box-sizing: border-box; height: var(--sbar); align-items: center; gap: 16px;
  padding: 0 max(12px, env(safe-area-inset-right, 0px)) 0 max(14px, env(safe-area-inset-left, 0px));
  background: var(--site-bg); border-bottom: 1px solid var(--site-line); color: var(--site-ink); user-select: none; -webkit-user-select: none; }
.sb-brand { flex: 0 0 auto; height: var(--sbar); display: inline-flex; align-items: center; gap: 9px; color: var(--site-ink); text-decoration: none; }
.sb-brand b { font: 700 12.5px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap; }
.sb-links { flex: 1 1 0; min-width: 0; height: var(--sbar); display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: center; overflow: hidden; }
.sb-link { flex: 0 0 auto; height: var(--sbar); display: inline-flex; align-items: center; padding: 0 10px; border: 0; background: none; cursor: pointer;      /* (each word's own 10 px either side takes its tap: a finger's width on a tablet) */
  font: 600 14.5px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: var(--site-ink); text-decoration: none; white-space: nowrap; }
.sb-link.off { visibility: hidden; }
.sb-brand:hover b, .sb-link:hover { color: var(--site-cyan); }
.sb-end { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 10px; }
.sb-wp { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 14px; border-radius: 10px; background: linear-gradient(135deg, #5a3fb5 0%, #3f6fdc 62%, #2c72d8 100%);
  font: 600 13.5px/1 var(--body); letter-spacing: 0.1em; text-transform: uppercase; color: #fff; text-decoration: none; white-space: nowrap; }
.sb-wp:hover { filter: brightness(1.12); }
.sb-menu, #sitepill { display: inline-flex; align-items: center; gap: 7px; box-sizing: border-box; border-radius: 999px; border: 1px solid rgba(0, 212, 255, 0.55); background: rgba(0, 212, 255, 0.1);
  color: var(--site-ink); font: 700 11.5px/1 var(--display); letter-spacing: 0.1em; text-transform: uppercase; cursor: pointer; white-space: nowrap; }
.sb-menu { position: relative; height: 30px; padding: 0 13px 0 10px; }
.sb-wp::after, .sb-menu::after { content: ""; position: absolute; inset: -8px -3px; }      /* (the bar's whole height takes their taps) */
.sb-menu:hover, #sitepill:hover { background: rgba(0, 212, 255, 0.2); border-color: var(--site-cyan); }
.sb-bars { width: 15px; height: 15px; flex: 0 0 auto; }
#sitebar a:focus-visible, #sitebar button:focus-visible, #sitepill:focus-visible, #sitesheet a:focus-visible, #sitesheet button:focus-visible { outline: 2px solid var(--site-cyan); outline-offset: 2px; }
@media (max-width: 1099px) { .sb-wp { display: none; } }          /* (a narrow bar: the Whitepaper is in the Menu) */
/* the title screen's button (where the bar is not): in the corner, clear of the title; not while a form has the screen */
#sitepill { position: absolute; z-index: 3; top: max(10px, calc(env(safe-area-inset-top, 0px) + 4px)); right: max(12px, env(safe-area-inset-right, 0px)); height: 36px; padding: 0 12px 0 5px;
  background: rgba(10, 15, 20, 0.84); border-color: rgba(138, 196, 235, 0.5); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5); }
#sitepill[hidden] { display: none; }
#sitepill::after { content: ""; position: absolute; inset: -6px -6px; }      /* (a finger's 48 px) */
#sitepill .cu-mark { width: 31px; height: 26px; }
#splash:has(.login:not([hidden])) #sitepill { display: none; }
/* a window wider than tall but not a phone's shape (a small browser window, squarer than 7 by 4, or one under 546 px
   wide): the painted title reaches its corners, so the art starts under a strip of the site's own colour, and the
   button stands in the strip. (A phone held sideways is 16 by 9 or longer and 568 px or more wide: its painted title
   ends well short of the corner.) */
@media (min-aspect-ratio: 1001/1000) and (max-aspect-ratio: 7/4) and (max-width: 979px), (min-aspect-ratio: 1001/1000) and (max-width: 545px) {
  html.site-on #splash.titled { background: linear-gradient(var(--site-bg), var(--site-bg)) center top / 100% 52px no-repeat,
      linear-gradient(180deg, rgba(4, 11, 13, 0) 0%, rgba(4, 11, 13, 0) 70%, rgba(4, 11, 13, 0.88) 100%),
      var(--splash-bg, none) center 52px / cover no-repeat, #060c0e; }
  html.site-on #sitepill { top: max(8px, env(safe-area-inset-top, 0px)); }
}
/* the sheet: over everything in the game, the loading screen too */
#sitesheet { position: absolute; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; box-sizing: border-box; background: rgba(3, 6, 10, 0.8);
  padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); }
#sitesheet[hidden] { display: none; }
.ss-card { width: min(780px, 100%); max-height: 100%; display: flex; flex-direction: column; box-sizing: border-box; overflow: hidden; background: var(--site-bg); color: var(--site-ink);
  border: 1px solid var(--site-line-hi); border-radius: 18px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7); outline: none; animation: ssIn 0.2s ease-out; }
@keyframes ssIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ss-head { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 14px; border-bottom: 1px solid var(--site-line); }
.ss-head .cu-mark { width: 46px; height: 38px; }
.ss-ttl { flex: 1 1 auto; min-width: 0; }
.ss-ttl h3 { margin: 0; font: 800 15px/1.15 var(--display); letter-spacing: 0.1em; text-transform: uppercase; }
.ss-ttl small { display: block; margin-top: 3px; font: 500 13px/1.25 var(--body); color: var(--site-ink2); }
.ss-x { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--site-line-hi); background: rgba(138, 196, 235, 0.08); color: var(--site-ink); font: 400 24px/1 system-ui, sans-serif; cursor: pointer; }
.ss-x:hover { background: rgba(138, 196, 235, 0.18); }
.ss-body { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 4px 14px 14px; }
.ss-sec h4 { margin: 12px 0 7px; font: 700 11px/1 var(--display); letter-spacing: 0.18em; text-transform: uppercase; color: var(--site-cyan); }
.ss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 8px; }
.ss-item { --acc: var(--site-line-hi); display: flex; align-items: center; gap: 10px; min-height: 50px; box-sizing: border-box; padding: 7px 10px; border-radius: 12px;
  border: 1px solid var(--site-line); border-left: 3px solid var(--acc); background: rgba(138, 196, 235, 0.05); color: var(--site-ink); text-decoration: none; }
.ss-item:hover { background: rgba(138, 196, 235, 0.12); border-color: var(--site-line-hi); border-left-color: var(--acc); }
.ss-ico { flex: 0 0 auto; width: 26px; text-align: center; font: 400 20px/1 system-ui, 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif; }
.ss-txt { flex: 1 1 auto; min-width: 0; display: grid; gap: 1px; }
.ss-txt b { font: 700 15px/1.15 var(--body); letter-spacing: 0.03em; }
.ss-txt small { font: 500 12.5px/1.2 var(--body); color: var(--site-ink2); }
.ss-go { flex: 0 0 auto; color: var(--site-ink2); font: 400 14px/1 system-ui, sans-serif; }
.ss-item:hover .ss-go { color: var(--site-cyan); }
@media (max-height: 500px) {      /* a phone held sideways: a slimmer head, the links at once */
  .ss-head { padding: 6px 8px 6px 12px; } .ss-head .cu-mark { width: 36px; height: 30px; }
  .ss-ttl h3 { font-size: 13px; } .ss-ttl small { font-size: 12px; margin-top: 1px; }
  .ss-sec h4 { margin: 9px 0 6px; } .ss-item { min-height: 44px; padding: 5px 9px; }
}
@media (max-width: 520px) { .ss-grid { grid-template-columns: 1fr 1fr; } .ss-item { gap: 7px; padding: 7px 8px; } .ss-ico { width: 22px; font-size: 18px; } .ss-go { display: none; } }
@media (max-width: 359px) { .ss-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .ss-card { animation: none; } }
/* the game's Menu: the site's row, first */
.acct.site-row { background: var(--site-bg); border-color: var(--site-line-hi); }
.site-row .sr-what { display: flex; align-items: center; gap: 10px; flex: 1 1 220px; min-width: 0; }
.site-row .sr-what b { font: 800 13px/1.2 var(--display); letter-spacing: 0.08em; text-transform: uppercase; color: var(--site-ink); }
.site-row .sr-what small { display: block; font: 500 13px/1.25 var(--body); color: var(--site-ink2); }

/* ================================================================ holiday drops (1.51)
   The button over Raid (a parcel in the holiday's colour, --hc), the card a parcel opens into, the Holiday Collection */
.hdbtn .wsw { padding: 6px; border-color: var(--hc, #d6362a); background: radial-gradient(circle at 50% 35%, #46303a, #1a1014 70%); }
.hdbtn .hdi { width: 100%; height: 100%; display: block; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.5)); }
.hdbtn.ready .wsw { animation: hdPulse 1.3s ease-in-out infinite; }
.hdbtn.ready .hdi { animation: hdHop 1.3s ease-in-out infinite; }
.hdbtn.ready span:not(.wsw) { color: #ffe7a6; border-color: rgba(242, 179, 61, 0.5); }
@keyframes hdPulse { 0%, 100% { box-shadow: 0 0 0 2px #091216, 0 6px 14px var(--shadow); } 50% { box-shadow: 0 0 0 2px #091216, 0 0 18px rgba(255, 215, 106, 0.75); } }
@keyframes hdHop { 0%, 60%, 100% { transform: none; } 72% { transform: translateY(-4px) rotate(-6deg); } 84% { transform: translateY(0) rotate(5deg); } }
@media (max-height: 500px) { .hdbtn .wsw { width: 46px; height: 46px; padding: 5px; } }
@media (prefers-reduced-motion: reduce) { .hdbtn.ready .wsw, .hdbtn.ready .hdi { animation: none; } .hdbtn.ready .wsw { box-shadow: 0 0 0 2px #091216, 0 0 14px rgba(255, 215, 106, 0.6); } }
/* how rare a piece is */
.hd-rar { display: inline-block; padding: 2px 9px; border-radius: 10px; font: 800 11px/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #0b1116; background: #b9c2d0; white-space: nowrap; }
.hd-rar.r { background: #5aaaff; } .hd-rar.e { background: #c88cff; } .hd-rar.g { background: var(--gold); }
.hd-new { display: inline-block; padding: 2px 9px; border-radius: 10px; font: 900 11px/1.3 var(--display); letter-spacing: 0.06em; text-transform: uppercase; color: #06130b; background: var(--green); }
.hd-n { font: 800 14px/1.3 var(--display); color: var(--muted); }
/* the card a parcel opens into */
.modal.hdrm .mpanel { width: min(430px, 100%); }
.hdr { position: relative; display: grid; justify-items: center; gap: 6px; text-align: center; padding: 2px 0 4px; }
.hdr > * { position: relative; }
.hdr .confetti { position: absolute; z-index: 0; }
.hdr-h { margin: 0; font: 800 12px/1.2 var(--display); letter-spacing: 0.14em; text-transform: uppercase; color: var(--hc); filter: brightness(1.35); }
.hdr-pic { width: 150px; height: 128px; display: grid; place-items: center; }
.hdr-pic img { position: relative; width: 150px; height: 128px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5)); animation: hdPop 0.55s cubic-bezier(0.2, 1.6, 0.4, 1) both; }
.hdr-rays { position: absolute; width: 210px; height: 210px; border-radius: 50%; opacity: 0.5; pointer-events: none;
  background: repeating-conic-gradient(from 0deg, rgba(255, 231, 166, 0.5) 0deg 9deg, transparent 9deg 24deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 68%); mask: radial-gradient(circle, #000 18%, transparent 68%); animation: hdSpin 16s linear infinite; }
.hdr-pic.r .hdr-rays { background: repeating-conic-gradient(from 0deg, rgba(120, 180, 255, 0.6) 0deg 9deg, transparent 9deg 24deg); }
.hdr-pic.e .hdr-rays { background: repeating-conic-gradient(from 0deg, rgba(210, 150, 255, 0.7) 0deg 9deg, transparent 9deg 24deg); opacity: 0.7; }
@keyframes hdSpin { to { transform: rotate(360deg); } }
@keyframes hdPop { from { transform: scale(0.3) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.hdr h3 { margin: 0; font: 900 20px/1.15 var(--display); }
.hdr-tags { margin: 0; display: flex; gap: 8px; align-items: center; justify-content: center; }
.hdr-desc { margin: 0; color: var(--muted); max-width: 34ch; }
.hdr-loot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hdr-loot span { display: inline-flex; align-items: center; gap: 2px; padding: 3px 10px 3px 6px; border-radius: 12px; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--edge); font: 800 15px var(--display); }
.hdr-loot span.cu b { color: var(--teal); }
.hdr-loot img.i.ri { width: 22px; height: 22px; margin: -2px 2px -2px 0; }
.hdr-note { margin: 0; max-width: 40ch; }
.hdr-gold { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center; text-align: left; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 14px;
  border: 1px solid rgba(242, 179, 61, 0.6); background: linear-gradient(180deg, rgba(242, 179, 61, 0.2), rgba(242, 179, 61, 0.07)); }
.hdr-gold img { width: 62px; height: 52px; object-fit: contain; }
.hdr-gold b { display: block; font: 900 14px/1.2 var(--display); color: #ffe7a6; letter-spacing: 0.04em; text-transform: uppercase; }
.hdr-gold span { display: block; font-size: 14px; line-height: 1.2; }
.hdr .cf-btns { justify-content: center; margin-top: 4px; }
/* (a phone held sideways: the picture beside the words, so the whole card shows without scrolling) */
@media (max-height: 500px) {
  .modal.hdrm .mpanel { width: min(620px, 100%); }
  .hdr { grid-template-columns: 150px minmax(0, 1fr); justify-items: start; text-align: left; column-gap: 14px; gap: 4px 14px; }
  .hdr-pic { grid-row: 1 / span 6; align-self: center; }
  .hdr-tags, .hdr-loot { justify-content: flex-start; }
  .hdr-gold, .hdr .cf-btns { grid-column: 1 / -1; }
  .hdr .cf-btns { justify-content: flex-end; justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) { .hdr-rays, .hdr-pic img { animation: none; } }
/* the Holiday Collection */
.hdx-body { display: grid; gap: 10px; }
.hdx-how, .hdx-off { margin: 0; color: var(--muted); }
.hdx-off { color: #ffd1a6; }
.hdx-h { border: 1px solid var(--edge); border-left: 4px solid var(--hc); border-radius: 14px; padding: 10px 12px; background: rgba(0, 0, 0, 0.18); display: grid; gap: 8px; }
.hdx-h.live { border-color: var(--hc); background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(0, 0, 0, 0.18)); }
.hdx-top { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.hdx-top h3 { margin: 0; font: 900 17px/1.2 var(--display); }
.hdx-when { font: 700 14px/1.2 var(--body); color: var(--muted); }
.hdx-when.on { color: var(--green); font-weight: 800; }
.hdx-now { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; justify-content: space-between; padding: 6px 10px; border-radius: 10px; background: rgba(242, 179, 61, 0.12); border: 1px solid rgba(242, 179, 61, 0.35); }
.hdx-set { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.hdx-p { display: grid; justify-items: center; align-content: start; gap: 3px; text-align: center; padding: 6px 4px 8px; border-radius: 12px; background: var(--tile, #1d3944); border: 1px solid var(--edge); min-width: 0; }
.hdx-p b { font: 800 13px/1.15 var(--body); overflow-wrap: anywhere; }
.hdx-im { position: relative; display: block; width: 100%; max-width: 120px; aspect-ratio: 6 / 5; }
.hdx-im img { width: 100%; height: 100%; object-fit: contain; }
.hdx-p.miss img { filter: brightness(0) opacity(0.45); }
.hdx-p.miss b { color: var(--muted); }
.hdx-p.miss .hd-rar { opacity: 0.55; }
.hdx-p.gold.got { border-color: rgba(242, 179, 61, 0.7); background: linear-gradient(180deg, rgba(242, 179, 61, 0.22), rgba(242, 179, 61, 0.06)); }
.hdx-n { position: absolute; right: 0; bottom: 0; padding: 1px 7px; border-radius: 9px; background: rgba(4, 10, 14, 0.9); border: 1px solid var(--edge); font: 800 12px/1.3 var(--display); font-style: normal; }
.hdx-prog { margin: 0; }
@media (max-width: 480px) { .hdx-set { gap: 5px; } .hdx-p { padding: 4px 2px 6px; } .hdx-p b { font-size: 12px; } .hd-rar { font-size: 9px; padding: 2px 6px; } }
