/* SWARMGRID (templates/swarmgrid.html, static/swarmgrid.js). A wide stage
   (16:10) sized to the window's height, so a run needs no scrolling; on a
   phone held upright it is taller than wide, with the thumb's stick wherever
   the thumb comes down. The bars, the menus, the upgrade cards and the
   results sit over the canvas. One look throughout: deep navy panels with
   cut corners, a teal edge light, lime for what to press, gold for a fusion.
   How to play follows below the game. */
.sw-page{padding:var(--s3) 0 var(--s5);background:radial-gradient(900px 520px at 80% 0%,rgba(44,207,192,.08),transparent 60%),var(--bg);}
.sw-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px;margin-bottom:var(--s2);}
.sw-head .crumbs{flex-basis:100%;}
.sw-head h1{font-size:clamp(30px,3.6vw,44px);line-height:1.05;letter-spacing:.01em;font-weight:800;margin-top:6px;
  background:linear-gradient(90deg,#7CF5EC,#2CCFC0 40%,#B6FF4A);-webkit-background-clip:text;background-clip:text;color:transparent;padding-right:.15em;}
.sw-head .lede{margin:0;font-size:16px;}

.sw-shell{position:relative;width:min(100%,calc((100svh - 225px) * 16 / 10));margin:0 auto;scroll-margin:84px 0 8px;}
.sw-stage{--sw-cut:polygon(0 10px,10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%);
  position:relative;width:100%;aspect-ratio:16/10;min-height:300px;border-radius:14px;overflow:hidden;background:#02040A;color:#E8F4F6;
  box-shadow:0 30px 70px -20px rgba(5,10,24,.75),0 0 0 1px rgba(44,207,192,.28),0 0 60px -10px rgba(44,207,192,.2);
  font-family:Manrope,system-ui,sans-serif;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;touch-action:none;}
.sw-canvas{position:absolute;inset:0;display:block;width:100%;height:100%;outline:none;touch-action:none;}
.sw-canvas:focus-visible{box-shadow:inset 0 0 0 2px rgba(182,255,74,.7);}

/* ---- While playing ---- */
.sw-hud{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;padding:0 12px 10px;pointer-events:none;}
.sw-hud[hidden]{display:none;}
.sw-xp{position:relative;height:16px;margin:0 -12px 8px;background:rgba(3,6,14,.82);border-bottom:1px solid rgba(44,207,192,.4);}
.sw-xp i{display:block;height:100%;width:0;background:linear-gradient(90deg,#12898A,#2CCFC0 60%,#B6FF4A);box-shadow:0 0 12px rgba(44,207,192,.7);transition:width .12s linear;}
.sw-level{position:absolute;left:50%;top:0;transform:translateX(-50%);font-size:11px;line-height:16px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#fff;
  text-shadow:0 1px 2px #02040A,0 0 6px #02040A;white-space:nowrap;}
.sw-hud-top{display:grid;grid-template-columns:1fr auto 1fr;align-items:start;gap:8px;}
.sw-hud-bottom{display:flex;align-items:flex-end;gap:10px;margin-top:auto;}
.sw-hud-left{display:flex;flex-direction:column;gap:4px;align-items:flex-start;}
.sw-hud-mid{display:flex;flex-direction:column;align-items:center;gap:4px;min-width:0;}
.sw-hud-right{display:flex;align-items:center;justify-content:flex-end;gap:10px;}
.sw-score{display:flex;align-items:baseline;gap:8px;font-size:24px;font-weight:800;line-height:1;font-variant-numeric:tabular-nums;color:#fff;
  text-shadow:0 2px 0 #02040A,0 0 14px rgba(44,207,192,.7);}
.sw-score small{font-size:11px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;color:#DFFF9A;}
.sw-score small[hidden]{display:none;}
.sw-combo,.sw-clock,.sw-kills,.sw-boss,.sw-health,.sw-slot{
  background:rgba(4,8,18,.76);border:1px solid rgba(44,207,192,.35);}
.sw-combo,.sw-clock,.sw-kills,.sw-boss,.sw-health{clip-path:polygon(0 5px,5px 0,100% 0,100% calc(100% - 5px),calc(100% - 5px) 100%,0 100%);}
.sw-bar{display:inline-block;width:56px;height:6px;background:rgba(255,255,255,.14);vertical-align:middle;}
.sw-bar i{display:block;height:100%;width:0;background:#B6FF4A;}
.sw-combo{display:inline-flex;align-items:center;gap:6px;padding:3px 9px;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:#8FA3B8;font-variant-numeric:tabular-nums;}
.sw-combo b{font-size:15px;font-weight:800;color:#C8D6E4;}
.sw-combo em{font-style:normal;font-weight:800;color:#C8D6E4;}
.sw-combo.is-on{color:#DFFF9A;border-color:#B6FF4A;box-shadow:0 0 14px rgba(182,255,74,.4);}
.sw-combo.is-on b,.sw-combo.is-on em{color:#fff;}
.sw-combo.is-pop{animation:swPop .3s ease-out;}
@keyframes swPop{0%{transform:scale(1.25);}100%{transform:scale(1);}}
.sw-clock{padding:3px 14px;font-size:20px;font-weight:800;line-height:1.2;color:#fff;font-variant-numeric:tabular-nums;text-shadow:0 0 12px rgba(44,207,192,.7);}
.sw-boss{display:flex;align-items:center;gap:10px;padding:4px 12px;border-color:#FF5A72;white-space:nowrap;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase;color:#FFC4CC;}
.sw-boss[hidden]{display:none;}
.sw-boss-bar{width:min(26vw,220px);height:8px;}
.sw-boss-bar i{background:linear-gradient(90deg,#A81C48,#FF5A72);transition:width .15s linear;}
.sw-kills{white-space:nowrap;padding:5px 10px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#B8C6D6;font-variant-numeric:tabular-nums;}
.sw-kills b{margin-left:4px;font-size:14px;color:#fff;}
.sw-icon{pointer-events:auto;width:40px;height:40px;border-radius:8px;border:1px solid rgba(44,207,192,.4);background:rgba(4,8,18,.76);
  color:#E8F4F6;font-size:12px;cursor:pointer;}
.sw-icon:hover{background:rgba(18,137,138,.5);}
.sw-icon:focus-visible{outline:2px solid #B6FF4A;outline-offset:2px;}
.sw-slots{display:flex;gap:5px;}
.sw-slot{position:relative;display:block;width:42px;height:50px;border-radius:7px;overflow:hidden;}
.sw-slot canvas{display:block;width:40px;height:40px;}
.sw-slot.is-empty{opacity:.45;border-style:dashed;}
.sw-slot.is-fused{border-color:#FFE27A;box-shadow:0 0 12px rgba(255,226,122,.5);}
.sw-slots-parts .sw-slot{width:34px;height:42px;}
.sw-slots-parts .sw-slot canvas{width:32px;height:32px;}
.sw-pips{display:flex;justify-content:center;gap:2px;padding-top:2px;}
.sw-pips i{display:block;width:5px;height:5px;border-radius:1px;background:rgba(255,255,255,.2);}
.sw-pips i.on{background:#7CF5EC;box-shadow:0 0 4px #2CCFC0;}
.sw-slot.is-fused .sw-pips i{background:#FFE27A;box-shadow:0 0 4px #FFC93C;}
.sw-slots-parts .sw-pips i.on{background:#CDB8FF;box-shadow:0 0 4px #8A66F0;}
.sw-health{display:inline-flex;align-items:center;gap:8px;margin-left:auto;padding:6px 11px;font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:#B8C6D6;font-variant-numeric:tabular-nums;}
.sw-health .sw-bar{width:120px;height:9px;}
.sw-health .sw-bar i{background:linear-gradient(90deg,#18B45A,#7CFFB0);transition:width .12s linear;}
.sw-health b{min-width:2.2em;font-size:14px;color:#fff;text-align:right;}
.sw-health.is-low{border-color:#FF5A72;}
.sw-health.is-low .sw-bar i{background:linear-gradient(90deg,#A81C48,#FF5A72);}

/* The card across the middle: a swarm, a boss, a streak, something unlocked. */
.sw-card{position:absolute;left:0;right:0;top:20%;z-index:3;display:flex;flex-direction:column;align-items:center;gap:2px;padding:10px 16px 12px;
  text-align:center;pointer-events:none;opacity:0;visibility:hidden;
  background:linear-gradient(90deg,rgba(4,8,18,0),rgba(4,8,18,.84) 22%,rgba(4,8,18,.84) 78%,rgba(4,8,18,0));
  border-top:1px solid rgba(44,207,192,.5);border-bottom:1px solid rgba(44,207,192,.5);}
.sw-card.is-on{visibility:visible;animation:swCard 2.3s ease both;}
@keyframes swCard{0%{opacity:0;transform:translateX(-28px);}12%{opacity:1;transform:none;}82%{opacity:1;transform:none;}100%{opacity:0;transform:translateX(28px);}}
.sw-card p{margin:0;}
.sw-card-top{font-size:11.5px;font-weight:800;letter-spacing:.24em;text-transform:uppercase;color:#B6FF4A;}
.sw-card-name{font-size:clamp(20px,3.8vw,34px);font-weight:800;letter-spacing:.04em;line-height:1.1;text-transform:uppercase;color:#fff;
  text-shadow:0 2px 0 #0B4F58,0 0 22px rgba(44,207,192,.7);}
.sw-card-name:empty,.sw-card-tip:empty{display:none;}
.sw-card-tip{font-size:13px;font-weight:700;color:#C8FAFF;}

/* ---- The screens ---- */
.sw-screen{position:absolute;inset:0;z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:safe center;gap:9px;padding:12px 20px;text-align:center;
  overflow-y:auto;touch-action:pan-y;scrollbar-width:thin;scrollbar-color:rgba(44,207,192,.5) transparent;}
.sw-screen[hidden]{display:none;}
.sw-screen p{margin:0;}
.sw-title{background:radial-gradient(120% 90% at 50% 40%,rgba(4,8,18,.66),rgba(4,8,18,.93));}
.sw-panel{background:rgba(4,8,18,.88);}
.sw-cards,.sw-crate{background:radial-gradient(120% 90% at 50% 45%,rgba(4,8,18,.72),rgba(4,8,18,.92));}
.sw-logo{font-weight:800;font-size:clamp(30px,5vw,54px);letter-spacing:.06em;line-height:1;color:#fff;
  text-shadow:0 3px 0 #0B4F58,0 0 26px rgba(44,207,192,.8),0 0 60px rgba(182,255,74,.3);padding:0 .1em;}
.sw-logo span{color:#B6FF4A;text-shadow:0 3px 0 #2E4A12,0 0 26px rgba(182,255,74,.7);}
.sw-tag{font-size:12px;font-weight:800;letter-spacing:.2em;text-transform:uppercase;color:#9AF7EA;text-shadow:0 1px 3px rgba(0,0,0,.8);}
.sw-play{font:inherit;font-size:17px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;min-width:180px;min-height:52px;padding:12px 28px;border:0;
  cursor:pointer;color:#06140C;background:linear-gradient(90deg,#DFFF9A,#B6FF4A 45%,#2CCFC0);clip-path:var(--sw-cut);
  filter:drop-shadow(0 8px 18px rgba(182,255,74,.4));}
.sw-play:hover{filter:drop-shadow(0 8px 22px rgba(182,255,74,.65)) brightness(1.08);}
.sw-play:focus-visible,.sw-ghost:focus-visible,.sw-daily:focus-visible,.sw-char:focus-visible,.sw-up:focus-visible{outline:2px solid #fff;outline-offset:3px;}
.sw-daily{font:inherit;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:1px;min-height:52px;padding:6px 18px;cursor:pointer;text-align:left;
  color:#FFF0A8;background:rgba(40,28,4,.7);border:1px solid rgba(255,226,122,.6);border-radius:8px;}
.sw-daily strong{font-size:14px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;}
.sw-daily small{font-size:11.5px;color:#E0C88A;}
.sw-daily:hover{background:rgba(80,56,8,.8);}
.sw-ghost{font:inherit;font-size:13px;font-weight:700;min-height:44px;padding:8px 16px;cursor:pointer;color:#D6F4F2;background:rgba(4,8,18,.6);
  border:1px solid rgba(44,207,192,.45);border-radius:8px;}
.sw-ghost:hover{background:rgba(18,137,138,.45);}
.sw-small{font-size:12.5px;}
.sw-row{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:10px;}
.sw-bestline{font-size:13px;color:#B8C6D6;text-shadow:0 1px 3px rgba(0,0,0,.8);}
.sw-bestline strong{color:#fff;font-size:14.5px;font-variant-numeric:tabular-nums;}
.sw-dotsep{margin:0 4px;opacity:.6;}

/* The technicians. */
.sw-chars{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;width:min(100%,640px);}
.sw-char{font:inherit;display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto 1fr;column-gap:8px;align-items:center;justify-items:start;padding:7px 9px;min-height:74px;
  cursor:pointer;text-align:left;color:#D6F4F2;background:rgba(8,14,32,.78);border:1px solid rgba(44,207,192,.3);border-radius:9px;}
.sw-char canvas{grid-row:1 / 4;width:34px;height:46px;}
.sw-char strong{font-size:13px;font-weight:800;color:#fff;line-height:1.2;}
.sw-char-tool{font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:#7CF5EC;}
.sw-char small{font-size:10.5px;line-height:1.25;color:#A9B8CA;align-self:start;}
.sw-char:hover{border-color:rgba(44,207,192,.7);}
.sw-char.is-sel{border-color:#B6FF4A;background:rgba(24,44,20,.8);box-shadow:0 0 16px rgba(182,255,74,.35);}
.sw-char.is-locked{cursor:default;border-style:dashed;}
.sw-char.is-locked canvas{filter:grayscale(1) brightness(.5);}
.sw-char.is-locked strong{color:#8FA3B8;}
.sw-char.is-locked .sw-char-tool{color:#6F7EA6;}
.sw-char.is-locked small{color:#FFE27A;}

/* The achievements: what earns each, how far along, what it unlocks. */
.sw-achs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px 6px;width:min(100%,760px);margin:0;padding:0;list-style:none;}
.sw-achs li{display:grid;grid-template-columns:1fr auto;gap:1px 6px;align-items:baseline;padding:4px 8px 5px;text-align:left;background:rgba(8,14,32,.7);
  border:1px solid rgba(255,255,255,.1);border-radius:6px;}
.sw-achs strong{font-size:11px;font-weight:800;color:#E8F4F6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.sw-achs em{font-style:normal;font-size:10.5px;font-weight:800;color:#B8C6D6;font-variant-numeric:tabular-nums;white-space:nowrap;}
.sw-ach-text{grid-column:1 / 3;margin-top:2px;font-size:10px;line-height:1.25;color:#94A6BA;}
.sw-achs .sw-bar{grid-column:1 / 3;width:100%;height:3px;margin-top:1px;}
.sw-achs .sw-bar i{background:#2CCFC0;}
.sw-achs li.is-done{border-color:rgba(182,255,74,.5);}
.sw-achs li.is-done em{color:#B6FF4A;}
.sw-achs li.is-done .sw-bar i{background:#B6FF4A;}

.sw-keys{display:flex;flex-wrap:wrap;justify-content:center;gap:5px 14px;margin:0;padding:0;list-style:none;font-size:12px;font-weight:700;color:#C8D6E4;text-shadow:0 1px 3px rgba(0,0,0,.8);}
.sw-keys kbd,.sw-keep kbd,.sw-up-key{display:inline-block;margin-right:3px;padding:1px 7px;border-radius:5px;border:1px solid rgba(44,207,192,.5);border-bottom-width:2px;
  background:rgba(4,8,18,.7);font:800 11.5px/1.5 Manrope,system-ui,sans-serif;color:#fff;text-shadow:none;}
.sw-keys-touch{display:none;}
@media (hover:none),(pointer:coarse){ .sw-keys-desk{display:none;} .sw-keys-touch{display:flex;} .sw-up-key{display:none;} }
.sw-panel-title{font-size:13px;font-weight:800;letter-spacing:.24em;text-transform:uppercase;color:#B6FF4A;}
.sw-keep{font-size:12.5px;color:#B8C6D6;}
.sw-build{max-width:40em;font-size:13px;font-weight:700;color:#C8FAFF;}

/* ---- Upgrade cards ---- */
.sw-cards-title{font-size:clamp(22px,3.6vw,32px);font-weight:800;letter-spacing:.04em;text-transform:uppercase;line-height:1;color:#fff;text-shadow:0 2px 0 #0B4F58,0 0 22px rgba(44,207,192,.7);}
.sw-deal{display:flex;justify-content:center;align-items:stretch;gap:12px;width:100%;}
.sw-up{font:inherit;position:relative;display:flex;flex-direction:column;align-items:center;gap:5px;flex:0 1 210px;min-width:0;padding:14px 12px 12px;text-align:center;
  color:#D6F4F2;background:linear-gradient(180deg,rgba(18,34,64,.96),rgba(6,12,28,.96));border:1px solid rgba(124,245,236,.45);border-radius:12px;
  box-shadow:0 14px 30px -12px rgba(0,0,0,.8);}
button.sw-up{cursor:pointer;animation:swDeal .28s ease-out both;}
button.sw-up:nth-child(2){animation-delay:.06s;}
button.sw-up:nth-child(3){animation-delay:.12s;}
@keyframes swDeal{from{opacity:0;transform:translateY(16px);}to{opacity:1;transform:none;}}
button.sw-up:hover,.sw-up.is-sel{border-color:#B6FF4A;box-shadow:0 0 0 2px rgba(182,255,74,.5),0 0 26px rgba(182,255,74,.35);transform:translateY(-3px);}
.sw-up canvas{display:block;width:64px;height:64px;}
.sw-up-key{position:absolute;left:8px;top:8px;margin:0;}
.sw-up-tag{font-size:10.5px;font-weight:800;letter-spacing:.16em;text-transform:uppercase;color:#7CF5EC;}
.sw-up-name{font-size:17px;font-weight:800;line-height:1.15;color:#fff;}
.sw-up-text{font-size:12.5px;line-height:1.4;color:#C8D6E4;}
.sw-up-hint{margin-top:auto;padding-top:4px;font-size:11px;font-weight:700;color:#FFE27A;}
.sw-up .sw-pips i{width:9px;height:6px;}
.sw-up-part{border-color:rgba(183,156,255,.5);background:linear-gradient(180deg,rgba(40,26,84,.96),rgba(12,8,32,.96));}
.sw-up-part .sw-up-tag{color:#CDB8FF;}
.sw-up-part .sw-pips i.on{background:#CDB8FF;box-shadow:0 0 4px #8A66F0;}
.sw-up-fuse{border-color:#FFE27A;background:linear-gradient(180deg,rgba(86,58,8,.96),rgba(28,18,2,.96));box-shadow:0 0 30px rgba(255,226,122,.35);}
.sw-up-fuse .sw-up-tag{color:#FFE27A;}
.sw-up-item{border-color:rgba(160,255,170,.5);background:linear-gradient(180deg,rgba(18,58,30,.96),rgba(6,20,12,.96));}
.sw-up-item .sw-up-tag{color:#A0FFAA;}
/* What a crate held comes up one card after another. */
.sw-loot.is-open .sw-up{animation:swLoot .5s ease-out both;}
.sw-loot.is-open .sw-up:nth-child(1){animation-delay:.35s;}
.sw-loot.is-open .sw-up:nth-child(2){animation-delay:.65s;}
.sw-loot.is-open .sw-up:nth-child(3){animation-delay:.95s;}
@keyframes swLoot{from{opacity:0;transform:translateY(26px) scale(.8);}to{opacity:1;transform:none;}}

/* ---- The results ---- */
.sw-final{font-size:46px;font-weight:800;line-height:1;color:#fff;text-shadow:0 3px 0 #0B4F58,0 0 22px rgba(44,207,192,.7);font-variant-numeric:tabular-nums;}
.sw-line{font-size:14.5px;font-weight:700;color:#DFFF9A;max-width:38em;}
.sw-fresh{font-size:13.5px;font-weight:800;color:#FFE27A;}
.sw-fresh[hidden]{display:none;}
.sw-next{font-size:12.5px;color:#B8C6D6;max-width:40em;}
.sw-next span{color:#C8FAFF;font-weight:700;}
.sw-rank-row{display:flex;align-items:center;justify-content:center;gap:18px;}
.sw-rank{display:inline-flex;align-items:center;justify-content:center;width:64px;height:64px;font-size:44px;font-weight:800;line-height:1;clip-path:var(--sw-cut);
  color:#8FA3B8;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.18);}
.sw-rank[data-rank="S"]{color:#06140C;background:linear-gradient(135deg,#FFF0A8,#FFC93C);}
.sw-rank[data-rank="A"]{color:#06140C;background:linear-gradient(135deg,#DFFF9A,#9BD63C);}
.sw-rank[data-rank="B"]{color:#04121A;background:linear-gradient(135deg,#C8FAFF,#48D8F0);}
.sw-rank[data-rank="C"]{color:#fff;background:#5238A8;}
.sw-rank[data-rank="D"]{color:#fff;background:#3D4866;}
.sw-stats{display:grid;grid-template-columns:auto auto auto auto;gap:4px 12px;margin:0;text-align:left;}
.sw-stats div{display:contents;}
.sw-stats dt{font-size:11.5px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:#8FA3B8;align-self:center;}
.sw-stats dd{margin:0;font-size:16px;font-weight:800;color:#fff;font-variant-numeric:tabular-nums;}
.sw-over{gap:6px;}
.sw-crate-icon{width:60px;height:60px;filter:drop-shadow(0 0 16px rgba(255,226,122,.6));}
.sw-loot.is-open ~ .sw-play{animation:swLoot .4s ease-out .5s both;}
.sw-over .champ-entry{width:min(340px,92%);margin:2px 0;padding:10px 12px;}

@media (hover:none),(pointer:coarse){
  .sw-shell{width:min(100%,calc((100svh - 150px) * 16 / 10));}
  .sw-stage{min-height:0;}
}
/* A phone held sideways: the stage as tall as the window. */
@media (pointer:coarse) and (orientation:landscape) and (max-height:540px){
  .sw-shell{width:min(100%,calc((100svh - 92px) * 2.2));}
  .sw-stage{aspect-ratio:auto;height:calc(100svh - 92px);}
  .sw-screen{gap:6px;padding:10px 14px;}
  .sw-logo{font-size:30px;}
  .sw-up{padding:8px 10px;gap:3px;}
  .sw-up canvas{width:40px;height:40px;}
  .sw-up-name{font-size:14.5px;}
  .sw-up-text{font-size:11.5px;}
  .sw-final{font-size:34px;}
  .sw-rank{width:56px;height:56px;font-size:38px;}
}

.sw-info{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:var(--s4);margin-top:var(--s4);}
.sw-how{margin:0;padding:0;list-style:none;display:grid;gap:10px;}
.sw-how li{position:relative;padding-left:24px;font-size:15px;line-height:1.55;color:var(--text-2);}
.sw-how li::before{content:"";position:absolute;left:3px;top:.5em;width:9px;height:9px;transform:rotate(45deg);background:#2CCFC0;}
.sw-notes{display:grid;gap:10px;align-content:start;}
.sw-notes p{margin:0;}
.sw-info kbd{display:inline-block;min-width:22px;padding:1px 6px;border:1px solid var(--border-strong,var(--border));
  border-bottom-width:2px;border-radius:5px;font:700 12px/1.5 ui-monospace,Menlo,Consolas,monospace;text-align:center;background:var(--surface);}

@media (max-width:860px){
  .sw-info{grid-template-columns:1fr;gap:var(--s3);}
  .sw-achs{grid-template-columns:repeat(2,minmax(0,1fr));}
  .sw-chars{grid-template-columns:repeat(2,minmax(0,1fr));}
}
/* A phone held upright: a tall stage, smaller lettering, the cards one under another. */
@media (max-width:620px){
  .sw-page{padding-top:var(--s2);}
  .sw-head .lede{font-size:14.5px;}
  .sw-shell{width:100%;}
  .sw-stage{border-radius:10px;aspect-ratio:auto;height:min(142vw,calc(100svh - 96px));min-height:380px;}
  .sw-hud{padding:0 7px 7px;}
  .sw-xp{margin:0 -7px 6px;height:14px;}
  .sw-level{font-size:10px;line-height:14px;}
  .sw-score{font-size:18px;}
  .sw-combo{padding:2px 6px;font-size:9.5px;gap:4px;}
  .sw-combo b{font-size:12.5px;}
  .sw-bar{width:30px;height:5px;}
  .sw-clock{padding:2px 9px;font-size:16px;}
  .sw-boss{position:absolute;left:50%;top:76px;transform:translateX(-50%);font-size:9.5px;letter-spacing:.08em;padding:3px 7px;gap:6px;}
  .sw-boss-bar{width:34vw;height:6px;}
  .sw-kills{padding:3px 6px;font-size:9.5px;}
  .sw-kills b{font-size:12px;}
  .sw-icon{width:34px;height:34px;}
  .sw-hud-bottom{flex-wrap:wrap;gap:5px 6px;}
  .sw-slots{gap:3px;}
  .sw-slot{width:32px;height:40px;border-radius:5px;}
  .sw-slot canvas{width:30px;height:30px;}
  .sw-slots-parts .sw-slot{width:27px;height:35px;}
  .sw-slots-parts .sw-slot canvas{width:25px;height:25px;}
  .sw-pips{gap:1px;}
  .sw-pips i{width:4px;height:4px;}
  .sw-health{padding:4px 7px;font-size:9.5px;gap:5px;}
  .sw-health .sw-bar{width:72px;height:7px;}
  .sw-health b{font-size:12px;}
  .sw-health span:first-child{display:none;}
  .sw-screen{gap:8px;padding:12px;}
  .sw-tag{font-size:10.5px;letter-spacing:.14em;}
  .sw-play{min-height:46px;font-size:15px;min-width:140px;}
  .sw-daily{min-height:46px;padding:5px 12px;}
  .sw-ghost{min-height:40px;padding:6px 12px;font-size:12.5px;}
  .sw-bestline{font-size:12px;}
  .sw-deal{flex-direction:column;align-items:stretch;gap:8px;}
  .sw-up{flex:none;display:grid;grid-template-columns:52px 1fr;column-gap:10px;row-gap:1px;justify-items:start;align-items:center;padding:9px 11px;text-align:left;}
  .sw-up canvas{grid-row:1 / 7;grid-column:1;width:52px;height:52px;}
  .sw-up > :not(canvas):not(.sw-up-key){grid-column:2;}
  .sw-up-name{font-size:15.5px;}
  .sw-up-text{font-size:12px;}
  .sw-up-hint{margin-top:0;padding-top:0;}
  button.sw-up:hover,.sw-up.is-sel{transform:none;}
  .sw-final{font-size:36px;}
  .sw-rank{width:58px;height:58px;font-size:40px;}
  .sw-stats dd{font-size:14px;}
  .sw-line{font-size:13px;}
  .sw-card{top:27%;padding:7px 10px;}
  .sw-card-tip{font-size:11.5px;}
  .sw-row{gap:8px;}
}
@media (prefers-reduced-motion:reduce){
  .sw-combo.is-pop,button.sw-up,.sw-loot.is-open .sw-up,.sw-loot.is-open ~ .sw-play{animation:none;}
  .sw-card.is-on{animation:swCardCalm 2.3s linear both;}
  .sw-xp i,.sw-boss-bar i,.sw-health .sw-bar i{transition:none;}
  button.sw-up:hover,.sw-up.is-sel{transform:none;}
}
.sw-stage.is-calm .sw-combo.is-pop,.sw-stage.is-calm button.sw-up,.sw-stage.is-calm .sw-loot.is-open .sw-up,.sw-stage.is-calm .sw-loot.is-open ~ .sw-play{animation:none;}
.sw-stage.is-calm .sw-card.is-on{animation:swCardCalm 2.3s linear both;}
@keyframes swCardCalm{0%,96%{opacity:1;}100%{opacity:0;}}
