/* 🚀 Pig Space — the deep blue-black of space, neon pink and cyan. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #05030f; color: #eef; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-user-select: none; user-select: none; touch-action: none; }
.skip-link { position: absolute; left: -9999px; top: 0; background: #ff5fa2; color: #fff; padding: 10px 16px; font-weight: 800; z-index: 50; }
.skip-link:focus { left: 0; }
#screen { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; background: #05030f; }
#hurt { position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(255,40,40,.7) 100%); }

.bar { position: fixed; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; z-index: 20; pointer-events: none; }
.bar > * { pointer-events: auto; }
.home { color: #eef; text-decoration: none; font-weight: 800; background: rgba(10,10,40,.55); padding: 8px 12px; border-radius: 12px; border: 1px solid rgba(127,232,255,.3); }
.tag { margin-left: auto; font-size: 12px; opacity: .55; }
.icon { width: 42px; height: 42px; border-radius: 12px; border: 1px solid rgba(127,232,255,.35); background: rgba(10,10,40,.55); color: #eef; font-size: 18px; cursor: pointer; }
.icon:focus-visible, .btn:focus-visible, .mission:focus-visible, .upgrade:focus-visible, .home:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 2px; }

#hud { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
.hud-l { position: absolute; left: 12px; top: 64px; display: flex; flex-direction: column; gap: 6px; }
.meter { display: flex; align-items: center; gap: 8px; font: 800 11px system-ui, sans-serif; letter-spacing: 1px; color: #bde; }
.meter span { width: 52px; }
.meter b { width: 150px; height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; display: block; }
.meter i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff5fa2, #ffb3d1); transition: width .15s; }
.meter i.low { background: #ff3030; animation: blink .5s steps(2) infinite; }
.meter.sh i { background: linear-gradient(90deg, #3aa8ff, #9fe6ff); }
.meter.bo i { background: linear-gradient(90deg, #ffb347, #ffe39a); }
@keyframes blink { 50% { opacity: .35; } }
.pill { background: rgba(10,10,40,.55); border: 1px solid rgba(127,232,255,.25); border-radius: 10px; padding: 5px 10px; font-weight: 800; font-size: 15px; width: max-content; }
#radar { position: absolute; right: 12px; top: 62px; width: 150px; height: 150px; }
.goal { position: absolute; left: 50%; top: 62px; transform: translateX(-50%); background: rgba(10,10,40,.55); border: 1px solid rgba(255,95,162,.4); border-radius: 10px; padding: 6px 12px; font-weight: 800; white-space: nowrap; }
.pausebtn { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); pointer-events: auto; z-index: 21; }
.msg { position: absolute; left: 0; right: 0; top: 26%; text-align: center; font-weight: 900; font-size: clamp(18px, 3.2vw, 30px); color: #ffe39a; text-shadow: 0 2px 0 #000, 0 0 18px rgba(0,0,0,.8); padding: 0 20px; }
.reticle { position: absolute; left: 50%; top: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border: 2px solid rgba(127,232,255,.6); border-radius: 50%; }
.reticle::after { content: ''; position: absolute; left: 50%; top: 50%; width: 4px; height: 4px; margin: -2px 0 0 -2px; background: #7fe8ff; border-radius: 50%; }
.lock { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; border: 2px dashed rgba(255,211,77,.7); border-radius: 6px; }
.lock.locked { border: 3px solid #ff5fa2; box-shadow: 0 0 12px rgba(255,95,162,.8); }

#touch { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
#touch[hidden] { display: none; }
.stick { position: absolute; left: 24px; bottom: 24px; width: 140px; height: 140px; border-radius: 50%; background: rgba(10,10,40,.4); border: 2px solid rgba(127,232,255,.35); pointer-events: auto; touch-action: none; }
.knob { position: absolute; left: 50%; top: 50%; width: 58px; height: 58px; margin: -29px 0 0 -29px; border-radius: 50%; background: rgba(127,232,255,.55); }
.buttons { position: absolute; right: 16px; bottom: 20px; display: grid; grid-template-columns: 64px 64px; gap: 10px; pointer-events: auto; }
.buttons button { width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255,95,162,.5); background: rgba(40,10,40,.55); color: #fff; font-size: 26px; touch-action: none; }

#screens { position: fixed; inset: 0; z-index: 15; display: grid; place-items: center; padding: 64px 14px 14px; overflow-y: auto; pointer-events: none; }
#screens[hidden] { display: none; }
.screen { display: none; width: 100%; max-width: 780px; pointer-events: auto; }
.screen.active { display: block; }
.panel { background: rgba(8,6,28,.82); border: 1px solid rgba(127,232,255,.35); border-radius: 18px; padding: 20px 22px; box-shadow: 0 0 60px rgba(255,95,162,.18); }
.panel.center { text-align: center; }
.logo { margin: 0; text-align: center; font-size: clamp(46px, 10vw, 92px); font-weight: 900; letter-spacing: 4px; line-height: 1; color: #ffb3d1; text-shadow: 0 0 24px rgba(255,95,162,.6), 0 4px 0 #6a1040; font-style: italic; }
.logo span { color: #7fe8ff; text-shadow: 0 0 24px rgba(127,232,255,.6), 0 4px 0 #0b3a5a; }
.lede { text-align: center; margin: 12px 0 14px; font-size: 17px; opacity: .9; }
.missions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.mission, .upgrade { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; text-align: left; padding: 12px 14px; border-radius: 12px; border: 1px solid rgba(127,232,255,.45); background: linear-gradient(180deg, rgba(30,20,80,.75), rgba(12,8,40,.75)); color: #eef; font: inherit; cursor: pointer; }
.mission:hover:not(:disabled), .upgrade:hover:not(:disabled) { border-color: #ff5fa2; }
.mission .mn { font-size: 11px; letter-spacing: 3px; color: #7fe8ff; font-weight: 900; }
.mission .st { grid-row: span 2; align-self: center; color: #ffd34d; font-size: 17px; }
.mission .st i, .upgrade .lv i { color: rgba(255,255,255,.18); font-style: normal; }
.mission .nm { font-weight: 900; font-size: 18px; }
.mission .bl { grid-column: 1 / span 2; font-size: 13px; opacity: .8; }
.mission:disabled, .upgrade:disabled { opacity: .45; cursor: not-allowed; }
.upgrades { display: grid; gap: 8px; margin: 12px 0; }
.upgrade { grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; }
.upgrade .ic { font-size: 24px; }
.upgrade .nm { font-weight: 800; }
.upgrade .lv { color: #7fe8ff; letter-spacing: 2px; }
.upgrade .cost { font-weight: 900; color: #ffd34d; }
h2 { margin: 4px 0 8px; font-size: clamp(22px, 4vw, 32px); color: #ffb3d1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel.center h2 { justify-content: center; }
.coins { font-size: 18px; color: #ffd34d; }
.how { margin: 16px 0 6px; padding-left: 20px; font-size: 14px; line-height: 1.75; opacity: .88; }
kbd { display: inline-block; min-width: 20px; padding: 0 5px; border-radius: 4px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); font: 12px/18px system-ui, sans-serif; text-align: center; }
.stars { font-size: 50px; margin: 6px 0; color: #ffd34d; letter-spacing: 6px; }
.stars i { color: rgba(255,255,255,.15); font-style: normal; }
.detail { opacity: .88; margin: 8px 0; }
.row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.btn { font: inherit; font-weight: 900; font-size: 17px; padding: 12px 18px; border-radius: 12px; border: 1px solid #ff5fa2; background: linear-gradient(180deg, #ff5fa2, #b02d6c); color: #fff; cursor: pointer; }
.btn.big { font-size: 19px; padding: 14px 22px; }
.btn.ghost { background: rgba(255,255,255,.06); border-color: rgba(127,232,255,.4); }
.btn[hidden] { display: none; }
.nogl { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: #3a1020; padding: 12px 16px; border-radius: 12px; z-index: 30; }
.pvsb-cookie-note { margin: 12px 0 0; font-size: 12px; opacity: .6; text-align: center; }

/* v1.1 — 🐷 Turbo, your wingman, and 👑 the Boar Emperor */
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 11; opacity: 0; background: #fff; }
.wingbox { background: rgba(10,10,40,.55); border: 1px solid rgba(255,122,184,.4); border-radius: 10px; padding: 5px 10px; width: 210px; display: grid; grid-template-columns: auto 1fr; gap: 4px 8px; align-items: center; font: 800 11px system-ui, sans-serif; letter-spacing: 1px; color: #ffd1e6; }
.wingbox[hidden] { display: none; }
.wb-bar { height: 8px; border-radius: 4px; background: rgba(255,255,255,.12); overflow: hidden; display: block; }
.wb-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #5ab8ff, #b8e4ff); transition: width .15s; }
.wb-call { grid-column: 1 / -1; font-size: 12px; letter-spacing: .5px; color: #bde; }
.wingbox.ready { border-color: #ffd34d; }
.wingbox.ready .wb-call { color: #ffd34d; animation: blink .8s steps(2) infinite; }
.wingbox.down { opacity: .55; }
.bossbar { position: absolute; left: 50%; top: 100px; transform: translateX(-50%); width: min(640px, 60vw); }
.bossbar[hidden] { display: none; }
.bb-name { display: flex; justify-content: space-between; gap: 10px; font: 900 13px system-ui, sans-serif; letter-spacing: 2px; color: #ffd34d; text-shadow: 0 2px 0 #000; margin-bottom: 4px; }
.bb-name span:last-child { color: #ffb3d1; }
.bb-bar { position: relative; height: 18px; border-radius: 9px; background: rgba(40,0,20,.75); border: 2px solid #ffc63a; overflow: hidden; box-shadow: 0 0 18px rgba(255,90,40,.5); }
.bb-bar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, #ff2a2a, #ff8a3a 60%, #ffd34d); transition: width .25s; }
.bb-bar s { position: absolute; top: 0; bottom: 0; width: 2px; background: rgba(255,255,255,.6); }
.bossbar.rage .bb-bar { animation: rage .4s steps(2) infinite; }
@keyframes rage { 50% { box-shadow: 0 0 28px rgba(255,40,40,1); border-color: #ff3a2a; } }
.banner { position: absolute; left: 0; right: 0; top: 38%; text-align: center; font: italic 900 clamp(30px, 6.5vw, 64px)/1.05 system-ui, sans-serif; letter-spacing: 3px; color: #ffd34d; text-shadow: 0 4px 0 #6a1040, 0 0 30px rgba(255,90,40,.8); padding: 0 16px; }
.banner[hidden] { display: none; }
.banner.go { animation: bannerIn .5s cubic-bezier(.2,1.6,.4,1) both; }
@keyframes bannerIn { from { transform: scale(2.2); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.radio { position: absolute; left: 50%; bottom: 20%; transform: translateX(-50%); width: max-content; max-width: min(560px, 88vw); background: rgba(8,6,28,.88); border: 2px solid #7fe8ff; border-radius: 14px; padding: 8px 14px; font-weight: 800; font-size: 16px; display: flex; flex-direction: column; gap: 2px; }
.radio[hidden] { display: none; }
.radio b { font-size: 11px; letter-spacing: 2px; color: #7fe8ff; }
.radio.emperor { border-color: #ffc63a; box-shadow: 0 0 22px rgba(255,60,40,.55); }
.radio.emperor b { color: #ffd34d; }
.radio.turbo { border-color: #ff7ab8; }
.radio.turbo b { color: #ff9ac8; }
#pops { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pop { position: absolute; transform: translate(-50%, -50%); font: 900 20px system-ui, sans-serif; color: #ffd34d; text-shadow: 0 2px 0 #000, 0 0 10px rgba(0,0,0,.8); white-space: nowrap; animation: popUp 1.3s ease-out forwards; }
.pop.boss { font-size: 28px; color: #ff8a3a; }
.pop.turbo { font-size: 24px; color: #ff9ac8; }
@keyframes popUp { 0% { transform: translate(-50%, -50%) scale(.4); opacity: 0; } 15% { transform: translate(-50%, -80%) scale(1.25); opacity: 1; } 100% { transform: translate(-50%, -260%) scale(1); opacity: 0; } }
.skip { position: absolute; right: 12px; top: 70px; pointer-events: auto; }
.buttons #b-call { background: conic-gradient(rgba(255,122,184,.8) var(--charge, 0deg), rgba(40,10,40,.55) 0); border-color: #ff7ab8; }
.buttons #b-call.ready { animation: callPulse .8s ease-in-out infinite; }
.buttons #b-call:disabled { opacity: .4; }
@keyframes callPulse { 50% { box-shadow: 0 0 18px #ff7ab8; transform: scale(1.06); } }
.mission.final { border-color: #ffc63a; background: linear-gradient(180deg, rgba(100,22,34,.85), rgba(34,8,22,.85)); box-shadow: 0 0 22px rgba(255,90,40,.35); }
.mission.final .mn { color: #ffd34d; }
.mission.final:disabled { box-shadow: none; }
@media (min-width: 540px) { .mission.final { grid-column: span 2; } }
.newtag { display: block; font-size: 12px; color: #ffd34d; letter-spacing: 1px; margin-top: 3px; }
.newtag[hidden] { display: none; }
.wingbay { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid #ff7ab8; background: linear-gradient(180deg, rgba(80,20,70,.75), rgba(30,8,40,.75)); margin: 4px 0 8px; }
.wb-pic { font-size: 34px; }
.wb-text { display: flex; flex-direction: column; gap: 3px; font-size: 13px; opacity: .95; }
.wb-text b { font-size: 16px; color: #ffb3d1; }
.wb-text .lv { color: #7fe8ff; letter-spacing: 2px; margin-left: 6px; }
.wb-text .lv i { color: rgba(255,255,255,.18); font-style: normal; }
.wingbay .btn { font-size: 15px; white-space: nowrap; }
.bigcoins { font: 900 clamp(30px, 6vw, 48px) system-ui, sans-serif; color: #ffd34d; margin: 2px 0; text-shadow: 0 3px 0 #6a3a00, 0 0 18px rgba(255,200,60,.5); }
.bigcoins:empty { display: none; }
@media (max-width: 520px) {
  .wingbay { grid-template-columns: auto 1fr; }
  .wingbay .btn { grid-column: 1 / -1; }
}
/* the Emperor's intro and his ending are camera shots: the gauges step aside */
#hud.cine .hud-l, #hud.cine #radar, #hud.cine .reticle, #hud.cine .lock, #hud.cine .goal { visibility: hidden; }
/* a phone: the Emperor's bar goes under the radar, the words under it, and the radio above the buttons */
@media (max-width: 600px) {
  .bossbar { top: 218px; left: 12px; right: 12px; width: auto; transform: none; }
  .bb-name { font-size: 11px; letter-spacing: 1px; }
  #hud.boss .msg { top: 262px; }
  .radio { bottom: 250px; font-size: 14px; }
}

/* v1.2 — 🔨 the Hammerhog in the hangar, and 🪐 the Boar Planet */
.bay-title { font: 900 12px system-ui, sans-serif; letter-spacing: 2px; color: #7fe8ff; margin: 12px 0 6px; }
.shipbay { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shipcard { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; text-align: left; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(127,232,255,.35); background: linear-gradient(180deg, rgba(30,20,80,.75), rgba(12,8,40,.75)); color: #eef; font: inherit; cursor: pointer; }
.shipcard:hover:not(:disabled) { border-color: #ff5fa2; }
.shipcard:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 2px; }
.shipcard.chosen { border-color: #ffd34d; box-shadow: 0 0 18px rgba(255,211,77,.45); background: linear-gradient(180deg, rgba(90,40,70,.85), rgba(30,10,40,.85)); }
.shipcard:disabled { opacity: .5; cursor: not-allowed; }
.sc-ic { font-size: 34px; grid-row: span 2; }
.sc-nm { font-weight: 900; font-size: 18px; color: #ffb3d1; }
.sc-st { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; font: 800 10px system-ui, sans-serif; letter-spacing: 1px; color: #bde; }
.sc-st b { color: #7fe8ff; letter-spacing: 2px; font-size: 11px; }
.sc-st i { color: rgba(255,255,255,.18); font-style: normal; }
.sc-bl { grid-column: 1 / -1; font-size: 13px; opacity: .88; }
.sc-go { grid-column: 1 / -1; font-weight: 900; font-size: 14px; color: #ffd34d; }
.shipcard.locked .sc-go { color: #bde; }
#hammerbay[hidden] { display: none; }
.unlock { font-weight: 900; font-size: 18px; color: #ffd34d; margin: 6px 0; text-shadow: 0 0 14px rgba(255,200,60,.5); animation: blink 1s steps(2) 3; }
.unlock[hidden] { display: none; }
.how .newline { color: #ffd34d; }
.mission.planet { border-color: #ff8a3a; background: linear-gradient(180deg, rgba(150,50,20,.85), rgba(50,12,10,.85)); box-shadow: 0 0 22px rgba(255,120,40,.4); }
.mission.planet .mn { color: #ffb36a; }
.mission.planet:disabled { box-shadow: none; }
.mission.planet.fresh { animation: planetPulse 1.4s ease-in-out infinite; }
@keyframes planetPulse { 50% { box-shadow: 0 0 34px rgba(255,140,40,.9); border-color: #ffd34d; } }
@media (min-width: 540px) { .mission.planet { grid-column: span 2; } }
@media (max-width: 520px) {
  .shipbay { grid-template-columns: 1fr; }
}
.pill.hblast { font-size: 12px; letter-spacing: .5px; color: #ffb36a; border-color: rgba(255,140,60,.45); }
.pill.hblast[hidden] { display: none; }
.pill.hblast b { color: #bde; margin-left: 4px; }
.pill.hblast.ready { border-color: #ffd34d; }
.pill.hblast.ready b { color: #ffd34d; animation: blink .8s steps(2) infinite; }
.buttons #b-special { background: conic-gradient(rgba(255,140,60,.85) var(--charge, 0deg), rgba(40,10,40,.55) 0); border-color: #ffa040; }
.buttons #b-special[hidden], .buttons #b-call[hidden] { display: none; }
.buttons #b-special.ready { animation: callPulse .8s ease-in-out infinite; }
/* (a ship card's words wrap, so a phone's hangar is no wider than the phone) */
.shipbay { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.shipcard { min-width: 0; white-space: normal; }
.screen, .panel { min-width: 0; }
@media (max-width: 520px) { .shipbay { grid-template-columns: minmax(0, 1fr); } }
/* a phone, v1.2: the 🔨 button shows the Hammer Blast's charge itself; the goal goes under the radar, the big bar under Turbo's panel */
@media (max-width: 600px) {
  .pill.hblast { display: none; }
  .goal { top: 218px; left: auto; right: 12px; transform: none; max-width: 150px; white-space: normal; text-align: center; font-size: 12px; padding: 5px 8px; }
  .bossbar { top: 262px; }
  #hud.boss .msg { top: 306px; }
}

/* v1.3 — ♾️ BOAR SURVIVAL: its button on the title, its screen, its table, and its gauges */
.survbtn { display: grid; grid-template-columns: auto 1fr; gap: 2px 14px; align-items: center; width: 100%; text-align: left; margin: 0 0 12px; padding: 14px 18px; border-radius: 16px; border: 2px solid #ffd34d; color: #fff; font: inherit; cursor: pointer;
  background: linear-gradient(110deg, rgba(160,20,60,.9), rgba(70,20,130,.9) 45%, rgba(10,90,150,.9)); box-shadow: 0 0 26px rgba(255,95,162,.45), inset 0 0 18px rgba(255,255,255,.12); animation: survGlow 2.2s ease-in-out infinite; }
.survbtn:hover { border-color: #fff; }
.survbtn:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 2px; }
.survbtn .sb-ic { grid-row: span 2; font-size: 42px; line-height: 1; filter: drop-shadow(0 0 8px rgba(255,211,77,.8)); }
.survbtn .sb-t { font: italic 900 clamp(20px, 4vw, 28px)/1.05 system-ui, sans-serif; letter-spacing: 2px; color: #ffe39a; text-shadow: 0 3px 0 #6a1040; }
.survbtn .sb-t .newtag { display: inline; margin-left: 8px; font-style: normal; font-size: 12px; vertical-align: middle; }
.survbtn .sb-t .newtag[hidden] { display: none; }
.survbtn .sb-s { font-size: 13px; font-weight: 800; color: #cfe; opacity: .95; }
@keyframes survGlow { 50% { box-shadow: 0 0 40px rgba(255,140,60,.75), inset 0 0 18px rgba(255,255,255,.18); } }
@media (prefers-reduced-motion: reduce) { .survbtn { animation: none; } }
.sv-lede { margin: 2px 0 10px; font-size: 15px; opacity: .92; }
.sv-top { display: grid; grid-template-columns: auto 1fr; gap: 10px 14px; align-items: center; }
.sv-name { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; color: #ffb3d1; }
.sv-name input { width: 9.5em; font: 900 16px system-ui, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: #fff; background: rgba(255,255,255,.08); border: 1px solid rgba(127,232,255,.5); border-radius: 10px; padding: 8px 10px; }
.sv-name input:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 1px; }
.sv-ship { font-size: 14px; color: #bde; }
.sv-ship b { color: #ffe39a; }
.sv-ship .ok { color: #ff9ac8; font-weight: 800; }
.sv-best { margin: 10px 0 0; font-weight: 900; color: #ffd34d; }
#sv-starts .btn:disabled { opacity: .45; cursor: not-allowed; }
.sv-table { list-style: none; margin: 6px 0 4px; padding: 0; display: grid; gap: 4px; }
.sv-table li { display: grid; grid-template-columns: 2.2em minmax(0, 1fr) auto auto 6.5em auto; gap: 8px; align-items: center; padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.05); font-size: 14px; }
.sv-table li:first-child:not(.empty) { background: linear-gradient(90deg, rgba(255,211,77,.25), rgba(255,255,255,.05)); }
.sv-table li.me { outline: 2px solid #ff5fa2; background: rgba(255,95,162,.2); animation: meGlow 1s ease-in-out 3; }
@keyframes meGlow { 50% { background: rgba(255,95,162,.5); box-shadow: 0 0 16px rgba(255,95,162,.7); } }
.sv-table li.empty { display: block; text-align: center; opacity: .75; }
.sv-table .rk { color: #ffd34d; font-size: 16px; }
.sv-table .nm { font-weight: 900; letter-spacing: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-table .wv { color: #7fe8ff; font-weight: 800; white-space: nowrap; }
.sv-table .wv i { color: #bde; font-style: normal; font-weight: 600; font-size: 12px; }
.sv-table .sc { font-weight: 900; color: #ffe39a; text-align: right; }
.sv-table .dt { font-size: 12px; opacity: .6; white-space: nowrap; }
.sv-table.small { max-width: 560px; margin: 8px auto 0; text-align: left; }
.sv-table[hidden] { display: none; }
.sv-guide { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 6px; }
.sv-g { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; padding: 6px 10px; border-radius: 10px; background: rgba(30,20,80,.6); border: 1px solid rgba(127,232,255,.25); font-size: 12px; }
.sv-g .ic { grid-row: span 2; font-size: 22px; }
.sv-g b { font-size: 13px; color: #ffb3d1; }
.sv-g.unmet { opacity: .55; }
.sv-g.unmet b { color: #bde; }
.sv-keys { font-size: 13px; opacity: .85; margin: 10px 0 0; line-height: 1.7; }
#r-stars.srank { font-size: clamp(22px, 5vw, 34px); letter-spacing: 1px; font-weight: 900; }
/* the gauges in a run */
.survbox { background: rgba(10,10,40,.6); border: 1px solid rgba(255,211,77,.45); border-radius: 10px; padding: 5px 10px; width: max-content; max-width: 230px; display: grid; gap: 3px; }
.survbox[hidden] { display: none; }
.sv-sc { font: 900 15px system-ui, sans-serif; color: #ffe39a; white-space: nowrap; }
.sv-sc span { font-size: 11px; letter-spacing: 2px; color: #7fe8ff; margin-right: 4px; }
.sv-pu { font: 800 12px system-ui, sans-serif; color: #ffb3d1; }
.sv-pu[hidden] { display: none; }
.combo { position: absolute; left: 50%; top: 58%; transform: translateX(-50%); font: italic 900 clamp(18px, 3vw, 26px) system-ui, sans-serif; color: #ff9ac8; text-shadow: 0 2px 0 #000, 0 0 16px rgba(255,95,162,.8); white-space: nowrap; animation: comboPop .5s ease-in-out infinite alternate; }
.combo[hidden] { display: none; }
@keyframes comboPop { to { transform: translateX(-50%) scale(1.08); } }
#pupl { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pupl { position: absolute; left: 0; top: 0; margin-left: -14px; font-size: 24px; filter: drop-shadow(0 0 6px rgba(255,255,255,.8)); }
.pupl[hidden] { display: none; }
#slowfx { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, rgba(60,120,255,0) 45%, rgba(80,140,255,.45) 100%); transition: opacity .2s; }
.radio.redtusk { border-color: #ff3a2a; box-shadow: 0 0 20px rgba(255,40,40,.5); }
.radio.redtusk b { color: #ff7a6a; }
.radio.base { border-color: #5dff8a; }
.radio.base b { color: #8fffb0; }
.buttons #b-nuke { background: radial-gradient(circle, rgba(255,120,60,.85), rgba(120,10,20,.75)); border-color: #ffd34d; animation: callPulse .8s ease-in-out infinite; }
.buttons #b-nuke[hidden] { display: none; }
@media (max-width: 520px) {
  .sv-top { grid-template-columns: 1fr; }
  .sv-table li { grid-template-columns: 1.8em minmax(0, 1fr) auto 5.2em; font-size: 13px; }
  .sv-table .wv, .sv-table .dt { display: none; }
  .survbtn { padding: 12px 14px; }
  .survbtn .sb-ic { font-size: 34px; }
}
/* a phone: the score box sits under Turbo's panel (so a boss's bar goes a little lower), the combo a little lower */
@media (max-width: 600px) {
  .survbox { max-width: 200px; }
  #hud.surv .bossbar { top: 300px; }
  #hud.surv.boss .msg { top: 344px; }
  .combo { top: 64%; font-size: 18px; }
}

/* v1.4 — 🕳️ mission 7, 👥 two players (split screen), ☄️ the Asteroid Race, 🏆 Boss Rush, ⚡ the Thunderhog */
/* the title: two new mode buttons under BOAR SURVIVAL, the black hole's mission card, the two-player switch */
.modes { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin: 0 0 12px; }
.modebtn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 10px; align-items: center; text-align: left; min-width: 0; padding: 11px 14px; border-radius: 14px; border: 2px solid #7fe8ff; color: #fff; font: inherit; cursor: pointer; animation: survGlow 2.6s ease-in-out infinite; }
.modebtn:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 2px; }
.modebtn:hover { border-color: #fff; }
.modebtn .mb-ic { grid-row: span 2; font-size: 32px; line-height: 1; filter: drop-shadow(0 0 8px rgba(255,255,255,.6)); }
.modebtn .mb-t { font: italic 900 clamp(15px, 2.6vw, 20px)/1.1 system-ui, sans-serif; letter-spacing: 1.5px; color: #e9fffb; text-shadow: 0 2px 0 #0b3a5a; }
.modebtn .mb-t .newtag { display: inline; margin-left: 6px; font-style: normal; font-size: 11px; vertical-align: middle; }
.modebtn .mb-t .newtag[hidden] { display: none; }
.modebtn .mb-s { font-size: 12px; font-weight: 800; color: #cfe; opacity: .95; overflow-wrap: anywhere; }
.modebtn.race { background: linear-gradient(110deg, rgba(10,110,120,.92), rgba(30,60,150,.92)); border-color: #7fffd4; }
.modebtn.rush { background: linear-gradient(110deg, rgba(150,90,10,.92), rgba(140,20,40,.92)); border-color: #ffd34d; }
@media (prefers-reduced-motion: reduce) { .modebtn { animation: none; } }
@media (max-width: 460px) { .modes { grid-template-columns: minmax(0, 1fr); } }
.twobtn { position: relative; }
.twobtn.on { border-color: #7dff8a; background: rgba(60,200,90,.28); box-shadow: 0 0 16px rgba(125,255,138,.45); }
.twohelp { margin: 10px 0 0; text-align: center; font-size: 13px; line-height: 1.8; color: #d8ffe0; }
.twohelp[hidden] { display: none; }
.mission.hole { border-color: #b45cff; background: linear-gradient(180deg, rgba(60,20,110,.88), rgba(14,4,30,.9)); box-shadow: 0 0 24px rgba(180,92,255,.45); }
.mission.hole .mn { color: #d7a8ff; }
.mission.hole:disabled { box-shadow: none; }
.mission.hole.fresh { animation: holePulse 1.4s ease-in-out infinite; }
@keyframes holePulse { 50% { box-shadow: 0 0 36px rgba(200,120,255,.95); border-color: #ffd34d; } }
@media (min-width: 540px) { .mission.hole { grid-column: span 2; } }

/* the hangar: the Thunderhog's card (it takes the whole row) and its upgrades */
.shipcard.wide { grid-column: 1 / -1; }
.shipcard.thunder { border-color: rgba(255,210,31,.6); background: linear-gradient(180deg, rgba(90,70,10,.8), rgba(30,20,10,.85)); }
.shipcard.thunder .sc-nm { color: #ffe36a; }
.shipcard.thunder.forsale:not(:disabled) { animation: thunderPulse 1.3s ease-in-out infinite; }
.shipcard.thunder.chosen { border-color: #ffd34d; box-shadow: 0 0 20px rgba(255,220,60,.6); }
@keyframes thunderPulse { 50% { box-shadow: 0 0 26px rgba(255,220,60,.85); border-color: #fff36a; } }
.newtag.inl { display: inline; margin-left: 6px; font-size: 11px; vertical-align: middle; }
#thunderbay[hidden] { display: none; }
.pill.hblast.thunder { color: #ffe36a; border-color: rgba(255,220,60,.5); }
.buttons #b-special.thunder { background: conic-gradient(rgba(255,220,60,.9) var(--charge, 0deg), rgba(40,30,10,.6) 0); border-color: #ffd34d; }

/* the race's screen: its three courses */
.courses { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 6px 0; }
.course { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 3px 10px; align-items: center; text-align: left; min-width: 0; padding: 12px 14px; border-radius: 14px; border: 2px solid rgba(127,255,212,.55); background: linear-gradient(180deg, rgba(10,70,90,.8), rgba(8,20,50,.85)); color: #eef; font: inherit; cursor: pointer; }
.course:hover { border-color: #fff; }
.course:focus-visible { outline: 3px solid #7fe8ff; outline-offset: 2px; }
.course.gold { border-color: #ffd34d; box-shadow: 0 0 16px rgba(255,211,77,.45); }
.course .cn { grid-column: 1 / -1; font-size: 11px; letter-spacing: 3px; color: #7fffd4; font-weight: 900; }
.course .ci { font-size: 28px; }
.course .nm { font-weight: 900; font-size: 18px; color: #e9fffb; }
.course .md { font-size: 30px; }
.course .bl, .course .bt, .course .tg { grid-column: 1 / -1; font-size: 12px; overflow-wrap: anywhere; }
.course .bt { font-weight: 900; color: #ffe39a; font-size: 13px; }
.course .tg { opacity: .8; }

/* the boss rush's screen: the eight bosses, in order */
.rushlist { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 6px; }
.rushlist li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 10px; border-radius: 10px; background: rgba(60,20,30,.6); border: 1px solid rgba(255,211,77,.3); font-size: 13px; }
.rushlist li b { color: #ffe39a; overflow-wrap: anywhere; }
.rushlist li .ic { font-size: 20px; }
.rushlist li.beaten { border-color: #5dff8a; background: rgba(30,80,40,.55); }

/* in a race: its clock, rings and best, the split against your best, and the countdown */
.racebox { position: absolute; left: 50%; top: 100px; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 4px 12px; max-width: 92vw; padding: 6px 14px; border-radius: 12px; background: rgba(8,30,40,.7); border: 2px solid #7fffd4; font-weight: 900; }
.racebox[hidden] { display: none; }
.racebox b { font: 900 24px system-ui, sans-serif; color: #e9fffb; letter-spacing: 1px; }
.racebox span { font-size: 14px; color: #7fffd4; }
.racebox i { font-style: normal; font-size: 16px; }
.racebox i.fast { color: #5dff8a; }
.racebox i.slow { color: #ff8a6a; }
.countdown { position: absolute; left: 0; right: 0; top: 30%; text-align: center; font: italic 900 clamp(70px, 16vw, 160px)/1 system-ui, sans-serif; color: #7fffd4; text-shadow: 0 6px 0 #0b3a5a, 0 0 40px rgba(127,255,212,.8); }
.countdown[hidden] { display: none; }
#hud.race .hud-l .meter:not(.bo), #hud.race .lock { display: none; }
#hud.race .goal { border-color: rgba(127,255,212,.6); }

/* 🕳️ the Void Boar's voice on the radio */
.radio.voidboar { border-color: #b45cff; box-shadow: 0 0 22px rgba(180,92,255,.6); }
.radio.voidboar b { color: #d7a8ff; }

/* 👥 two players: the screen split down the middle, a panel each, a pad each */
#screen2 { position: fixed; top: 0; left: 50vw; width: 50vw; height: 100vh; height: 100dvh; display: block; background: #05030f; }
#screen2[hidden] { display: none; }
body.split #screen { width: 50vw; }
.pl { font: 900 12px system-ui, sans-serif; letter-spacing: 2px; color: #ffb3d1; }
.pl[hidden] { display: none; }
.pl.p2 { color: #8dff9a; }
.pl span { color: #ffd34d; letter-spacing: 0; }
#hud2 { position: absolute; left: 50%; top: 0; right: 0; bottom: 0; pointer-events: none; }
#hud2[hidden] { display: none; }
#hud2::before { content: ''; position: absolute; left: -2px; top: 0; bottom: 0; width: 4px; background: linear-gradient(180deg, #ff7ab8, #7fe8ff 50%, #7dff8a); opacity: .7; }
.hud-l2 { position: absolute; left: 12px; top: 64px; display: flex; flex-direction: column; gap: 6px; }
.hud-l2 .meter i { background: linear-gradient(90deg, #39c45a, #b5ffbf); }
.hud-l2 .meter.sh i { background: linear-gradient(90deg, #3aa8ff, #9fe6ff); }
.hud-l2 .meter.bo i { background: linear-gradient(90deg, #ffb347, #ffe39a); }
#radar2 { position: absolute; right: 12px; top: 62px; width: 120px; height: 120px; }
.p2down { position: absolute; left: 0; right: 0; top: 42%; text-align: center; font: 900 clamp(16px, 2.6vw, 26px) system-ui, sans-serif; color: #ffd34d; text-shadow: 0 2px 0 #000, 0 0 16px rgba(0,0,0,.9); padding: 0 12px; }
.p2down[hidden], .p2ring[hidden] { display: none; }
.p2ring { position: absolute; left: 50%; top: 150px; transform: translateX(-50%); padding: 4px 10px; border-radius: 10px; background: rgba(8,30,40,.7); border: 2px solid #7dff8a; font-weight: 900; color: #d8ffe0; white-space: nowrap; }
#hud.two #radar { right: calc(50% + 12px); width: 120px; height: 120px; }
#hud.two > .reticle { left: 25%; }
#hud.two .meter b { width: min(150px, calc(50vw - 110px)); }
#hud.two .goal { top: 196px; max-width: 70vw; white-space: normal; text-align: center; }
#hud.two .bossbar { top: 236px; width: min(560px, 70vw); }
#hud.two .msg { top: 290px; }
#hud.two .racebox { top: 238px; }
#hud.two .wingbox { display: none; }
#touch2 { position: fixed; inset: 0; z-index: 12; pointer-events: none; }
#touch2[hidden] { display: none; }
.stick.s2 { left: auto; right: 24px; border-color: rgba(125,255,138,.45); }
.stick.s2 .knob { background: rgba(125,255,138,.55); }
.buttons.b2 { right: auto; left: calc(50% + 16px); }
.buttons.b2 button { border-color: rgba(125,255,138,.55); background: rgba(10,40,20,.55); }
body.split .buttons:not(.b2) { right: calc(50% + 16px); }
/* a narrow screen, split: smaller sticks, buttons and radars, so nothing goes off the side */
@media (max-width: 760px) {
  body.split .stick { width: 100px; height: 100px; left: 10px; bottom: 14px; }
  body.split .stick.s2 { left: auto; right: 10px; }
  body.split .knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  body.split .buttons { grid-template-columns: 48px 48px; gap: 6px; bottom: 120px; }
  body.split .buttons:not(.b2) { right: auto; left: 10px; }
  body.split .buttons.b2 { left: auto; right: 10px; }
  body.split .buttons button { width: 48px; height: 48px; font-size: 20px; }
  #hud.two #radar, #radar2 { width: 64px; height: 64px; }
  #hud.two .meter span { width: 44px; font-size: 10px; }
  #hud.two .meter b { width: max(34px, calc(50vw - 156px)); }
  .hud-l2, #hud.two .hud-l { max-width: calc(50vw - 18px); }
  #hud.two .wingbox, #hud.two .survbox { max-width: calc(50vw - 18px); }
  #hud.two .goal { top: 200px; font-size: 12px; }
}
/* a phone, in a race: the race box goes under the goal (which is under the radar) */
@media (max-width: 600px) {
  .racebox { top: 262px; padding: 4px 10px; }
  .racebox b { font-size: 18px; }
  .racebox span { font-size: 12px; }
  .countdown { top: 36%; }
}
