/* ─────────────────────────────────────────────────────────────
   Jetman — remastered. Two worlds on one page:
   1. #web2007: a 2007 portal page (Lucida Grande, #3b5998, gloss)
   2. #stage:   the game, which breaks out of that page
   ───────────────────────────────────────────────────────────── */

:root {
  --fb: #3b5998;
  --fb-dark: #29447e;
  --fb-light: #6d84b4;
  --fb-pale: #d8dfea;
  --lime: #e6f06a;
  --ink: #333;
  --u: 2px;  /* one original stage pixel, set from JS */
  --oy: 0px; /* top of the 300-unit cave on screen */
  --ob: 0px; /* gap below the cave */
  --lucida: "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, Tahoma, sans-serif;
  --trebuchet: "Trebuchet MS", "Lucida Grande", Verdana, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
/* no double-tap zoom anywhere; no selection, loupe or callout on the game */
html { touch-action: manipulation; -webkit-text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; }
#stage, #stage * { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#stage input, #stage select { -webkit-user-select: auto; user-select: auto; }
body.full { -webkit-user-select: none; user-select: none; overscroll-behavior: none; }
body {
  font: 11px/1.4 var(--lucida);
  color: var(--ink);
  background: #fff;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body.full { overflow: hidden; background: #000; }
button { font: inherit; cursor: pointer; }
kbd {
  font: 10px var(--lucida);
  padding: 1px 5px;
  border: 1px solid rgba(0,0,0,.25);
  border-bottom-width: 2px;
  border-radius: 3px;
  background: rgba(255,255,255,.6);
  color: #333;
}

/* ═════════ the 2007 page ═════════ */
#web2007 {
  min-height: 100%;
  background: #fff linear-gradient(#e9edf5, #fff 260px) no-repeat;
  transform-origin: 50% 0;
}
body.full #web2007 { display: none; }
#web2007.falling {
  pointer-events: none;
  animation: fallaway 1.5s cubic-bezier(.55,.0,.8,.35) forwards;
}
@keyframes fallaway {
  0%   { transform: perspective(1400px) rotateX(0) translateZ(0); opacity: 1; filter: blur(0); }
  25%  { transform: perspective(1400px) rotateX(8deg) translateZ(-60px); opacity: 1; }
  100% { transform: perspective(1400px) rotateX(64deg) translateY(30%) translateZ(-900px); opacity: 0; filter: blur(6px); }
}

.w7-head {
  background: linear-gradient(#5b76b4, var(--fb) 55%, #344f8a);
  border-bottom: 1px solid #1d3263;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.w7-head-inner {
  max-width: 980px;
  margin: 0 auto;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 14px;
}
.w7-brand { display: block; height: 34px; }
.w7-brand .logo-svg { height: 34px; width: auto; }
.w7-tabs { display: flex; gap: 2px; align-self: flex-end; }
.w7-tabs a {
  display: block;
  padding: 6px 14px 7px;
  color: #fff;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.18);
  border-bottom: 0;
}
.w7-tabs a:hover { background: rgba(255,255,255,.28); }
.w7-tabs a.on { background: #fff; color: var(--fb); border-color: #1d3263; }
.w7-hello { margin-left: auto; color: #d8dfea; }
.w7-hello b { color: #fff; }

.w7-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 16px;
}
.w7-crumb { color: #777; margin-bottom: 8px; }
.w7-crumb b { color: var(--fb); }
.w7-beta {
  display: inline-block;
  font: bold 9px var(--trebuchet);
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(#ff8a3c, #e2531b);
  border-radius: 3px;
  padding: 1px 5px;
  vertical-align: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.w7-embed {
  background: #f7f7f7;
  border: 1px solid #b7b7b7;
  padding: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
#embed-slot {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #000;
}
.w7-under {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.w7-tip { color: #666; margin-right: auto; }
.w7-tip em { color: #999; font-style: normal; }
.w7-btn {
  border: 1px solid #1d3263;
  color: #fff;
  font-weight: bold;
  padding: 3px 10px;
  border-radius: 2px;
  background: linear-gradient(#6d84b4, var(--fb));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.w7-btn:hover { background: linear-gradient(#7c92c0, #4163a8); }
.w7-btn:active { background: var(--fb-dark); }
.w7-btn.w7-aqua {
  border-color: #1d6fb8;
  background: linear-gradient(#bfe3ff, #6fb6f3 49%, #3f96e6 50%, #7cc6ff);
  color: #07335c;
  text-shadow: 0 1px 0 rgba(255,255,255,.6);
  border-radius: 11px;
  padding: 3px 12px;
}

.w7-box {
  border: 1px solid #b7c3db;
  background: #f7f9fc;
  margin-bottom: 12px;
}
.w7-box h3 {
  margin: 0;
  padding: 4px 8px;
  color: #fff;
  font-size: 11px;
  background: linear-gradient(#6d84b4, var(--fb));
  border-bottom: 1px solid #1d3263;
}
.w7-box h3 small { display: block; font-weight: normal; color: #d8dfea; font-size: 9px; }
.w7-thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 8px; }
.w7-thumbs button {
  aspect-ratio: 1;
  border: 1px solid #ccd5e6;
  background: #fff center / 88% no-repeat;
  border-radius: 3px;
  padding: 0;
}
.w7-thumbs button:hover { border-color: var(--fb); box-shadow: 0 0 0 2px #d8dfea; }
.w7-thumbs button.on { border-color: var(--fb); background-color: #eef2fa; }
.w7-thumbs button.locked { filter: grayscale(1) contrast(.3) brightness(1.3); }
.w7-scores { margin: 0; padding: 8px 8px 8px 28px; min-height: 40px; color: #555; }
.w7-scores li { padding: 1px 0; }
.w7-scores b { color: var(--fb); }
.w7-badges { display: flex; gap: 6px; padding: 8px; background: #fff; }
.w7-badge, .w7-counter {
  flex: 1;
  text-align: center;
  font-size: 9px;
  color: #555;
  border: 1px solid #ddd;
  background: linear-gradient(#fff, #eee);
  padding: 4px;
}
.w7-counter span {
  display: inline-block;
  margin-top: 2px;
  font: bold 12px "Courier New", monospace;
  letter-spacing: 1px;
  color: #7fff00;
  background: #111;
  padding: 1px 4px;
  border: 1px inset #666;
}
.w7-foot {
  max-width: 980px;
  margin: 0 auto 30px;
  padding: 10px 14px;
  border-top: 1px solid #ddd;
  color: #999;
}
.w7-credit { margin: 4px 0 0; font-size: 10px; color: #aaa; }
.w7-credit a, .title-credit a, .credit a { color: inherit; }
.w7-ribbon {
  position: fixed;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  overflow: hidden;
  pointer-events: none;
  z-index: 3;
}
.w7-ribbon span {
  position: absolute;
  top: 26px;
  right: -34px;
  width: 170px;
  transform: rotate(45deg);
  text-align: center;
  color: #fff;
  font: bold italic 12px var(--trebuchet);
  padding: 4px 0;
  background: linear-gradient(#ff5a4e, #d6130a);
  box-shadow: 0 2px 4px rgba(0,0,0,.3);
  text-shadow: 0 -1px 0 rgba(0,0,0,.3);
}
@media (max-width: 760px) {
  .w7-page { grid-template-columns: 1fr; }
  .w7-hello { display: none; }
  .w7-head-inner { height: auto; flex-wrap: wrap; padding-top: 6px; gap: 6px; }
  .w7-tabs { width: 100%; overflow-x: auto; }
  .w7-tabs a { padding: 6px 9px 7px; white-space: nowrap; }
  .w7-ribbon { display: none; }
}
/* portrait phones: centre the title stack in the band of cave */
#stage.portrait .title-logo { left: 50%; translate: -50% 0; top: calc(var(--oy) + var(--u) * 38); }
#stage.portrait .title-howto, #stage.portrait .title-menu { margin-left: 0; padding: 0 12px; }
#stage.portrait .title-howto { font-size: max(12px, calc(var(--u) * 11)); }

/* ═════════ the stage ═════════ */
#stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #000;
  perspective: 1100px;
  perspective-origin: 50% 50%;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: pointer;
  font-family: var(--lucida);
  color: #fff;
}
body.full #stage { position: fixed; inset: 0; z-index: 10; transform-origin: 0 0; }
#stage.flip { transition: transform 1s cubic-bezier(.2, 1.25, .35, 1); }
#stage.cracking { animation: crackshake .09s linear infinite; }
@keyframes crackshake {
  0% { translate: 1px 0; } 25% { translate: -1px 1px; } 50% { translate: 1px -1px; } 75% { translate: -1px 0; }
}
#rig {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
}
.layer {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
}
.layer canvas { position: absolute; left: 0; top: 0; }
.layer::after {
  content: attr(data-label);
  position: absolute;
  left: 18px;
  top: 16px;
  font: bold 15px var(--lucida);
  color: #fff;
  background: rgba(59, 89, 152, .85);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 3px;
  padding: 2px 7px;
  opacity: 0;
  transition: opacity .6s;
}
#stage.revealed .layer { outline: 1px solid rgba(160, 190, 255, .35); background: rgba(80, 110, 190, .035); }
#stage.revealed .layer::after { opacity: .9; }

/* HUD: the original bottom-left score, sized in stage pixels */
#hud { position: absolute; inset: 0; pointer-events: none; }
.hud-score, .hud-best {
  position: absolute;
  bottom: calc(var(--ob) + var(--u) * 1.5);
  font-weight: bold;
  font-size: calc(var(--u) * 15);
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 calc(var(--u) * .3) 0 rgba(0,0,0,.35);
}
.hud-score { left: calc(var(--u) * 20); color: #fff; }
.hud-best { left: calc(var(--u) * 160); color: var(--lime); }
#stage.remaster .hud-score, #stage.remaster .hud-best {
  font-size: clamp(16px, calc(var(--u) * 11), 44px);
  bottom: clamp(10px, calc(var(--u) * 3), 26px);
  text-shadow: 0 2px 0 rgba(0,0,0,.5), 0 0 18px rgba(0,0,0,.6);
}
#stage.remaster .hud-score { left: clamp(14px, calc(var(--u) * 8), 60px); }
#stage.remaster .hud-best { left: auto; right: clamp(14px, calc(var(--u) * 8), 60px); }
.hud-score span, .hud-best span { font-variant-numeric: tabular-nums; }
.hud-right {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}
.hud-chip {
  font: bold 12px var(--lucida);
  padding: 3px 10px;
  border-radius: 11px;
  color: #eaf4ff;
  background: rgba(20, 34, 70, .72);
  border: 1px solid rgba(160, 200, 255, .35);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.hud-chip.ahead { color: #b9ffb0; }
.hud-chip.behind { color: #ffc4b0; }
.hud-combo { color: #fff3a8; animation: pop .25s cubic-bezier(.3,1.6,.5,1); }
@keyframes pop { from { transform: scale(.6); } to { transform: scale(1); } }
body.embedded .hud-right { display: none; }

/* ── screens ── */
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility 0s .35s;
  pointer-events: none;
}
.screen.on { opacity: 1; visibility: visible; transition: opacity .35s; pointer-events: auto; }
#scr-title, #scr-ready { pointer-events: none; }
#scr-title.on .title-menu { pointer-events: auto; }

/* title: the original composition — logo right of the hovering Jetman */
#scr-title { display: block; }
.copyright {
  position: absolute;
  left: calc(var(--u) * 7);
  top: calc(var(--oy) + var(--u) * 5);
  font: bold calc(var(--u) * 9) "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.02em;
  color: #666;
}
.title-logo {
  position: absolute;
  left: calc(var(--u) * 172);
  top: calc(var(--oy) + var(--u) * 106);
  width: calc(var(--u) * 175);
}
.logo-svg.big { width: 100%; height: auto; overflow: visible; }
.title-year {
  position: relative;
  margin: calc(var(--u) * -3) 0 0 calc(var(--u) * 42);
  padding-top: calc(var(--u) * 2);
  border-top: calc(var(--u) * .8) solid #fff;
  width: calc(var(--u) * 116);
  font-size: calc(var(--u) * 17);
  height: calc(var(--u) * 22);
}
.title-year .y2007, .title-year .y2026 { position: absolute; left: calc(var(--u) * 3); }
.title-year .y2026 { opacity: 0; color: var(--lime); font-weight: bold; }
#stage.remaster .title-year .y2007 { animation: strike 3s 1s forwards; }
#stage.remaster .title-year .y2026 { animation: y26 3s 1s forwards; }
@keyframes strike {
  0%, 30% { opacity: 1; text-decoration: none; }
  40% { opacity: 1; text-decoration: line-through #ff5a4e 3px; transform: none; }
  60%, 100% { opacity: .35; text-decoration: line-through #ff5a4e 3px; transform: translateY(40%) scale(.7); transform-origin: left; }
}
@keyframes y26 {
  0%, 45% { opacity: 0; transform: translate(60%, -40%) rotate(-8deg) scale(1.6); }
  60% { opacity: 1; transform: translate(60%, -40%) rotate(-8deg) scale(1); }
  100% { opacity: 1; transform: translate(60%, -40%) rotate(-8deg) scale(1); }
}
.title-howto {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--oy) + var(--u) * 180);
  margin: 0 0 0 calc(var(--u) * 80);
  text-align: center;
  font-weight: bold;
  font-size: calc(var(--u) * 13);
  line-height: 1.4;
  color: #aaa;
}
.title-howto span { font-weight: normal; }
.title-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--oy) + var(--u) * 222);
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-left: calc(var(--u) * 80);
}
#stage.remaster .title-menu { display: flex; }
.title-sub { margin: 0; color: #9fb1d8; font-size: 12px; min-height: 1em; }
#stage.remaster .title-logo { filter: drop-shadow(0 6px 20px rgba(59, 89, 152, .55)); }
#stage.remaster .title-howto { color: #c7cfdf; }
.title-credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--ob) + var(--u) * 18);
  margin: 0;
  padding: 0 12px;
  text-align: center;
  font-size: 11px;
  color: rgba(185, 200, 230, .55);
  display: none;
  pointer-events: auto;
}
#stage.remaster .title-credit { display: block; }
.title-pills { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.ready-hint {
  position: absolute;
  top: 30%;
  width: 100%;
  text-align: center;
  font-weight: bold;
  font-size: calc(var(--u) * 12);
  color: rgba(255,255,255,.75);
  animation: blink 1.2s steps(2) infinite;
}
@keyframes blink { 50% { opacity: .3; } }

/* ── Web 2.0 panels ── */
.panel-screen { background: rgba(4, 8, 20, .45); }
body.embedded .panel-screen { background: rgba(0,0,0,.6); }
.panel {
  position: relative;
  width: min(520px, 92%);
  max-height: 88%;
  overflow: auto;
  color: #333;
  font-size: 12px;
  background: linear-gradient(#ffffff, #eef2f9);
  border: 1px solid #1d3263;
  border-radius: 10px;
  box-shadow: 0 18px 50px rgba(0,0,0,.55), inset 0 1px 0 #fff;
  transform: translateY(14px) scale(.96);
  transition: transform .45s cubic-bezier(.2, 1.4, .4, 1);
  cursor: default;
}
.screen.on .panel { transform: none; }
.panel.wide { width: min(760px, 94%); }
.panel.small { width: min(380px, 92%); text-align: center; padding-bottom: 16px; }
body.embedded .panel { font-size: 11px; }
.panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 9px 14px;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(#6d84b4, var(--fb) 60%, #344f8a);
  border-bottom: 1px solid #1d3263;
  border-radius: 9px 9px 0 0;
  text-shadow: 0 -1px 0 rgba(0,0,0,.35);
}
.panel-head small { font-weight: normal; color: #d8dfea; font-size: 11px; margin-left: 6px; }
.panel-head .x {
  position: absolute;
  right: 8px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.15);
  color: #fff;
  line-height: 18px;
  font-size: 16px;
  padding: 0;
}
.panel-head .x:hover { background: rgba(255,255,255,.3); }

.pill {
  border: 1px solid #9aa9c7;
  color: #2a3f6e;
  font-weight: bold;
  padding: 6px 14px;
  border-radius: 14px;
  background: linear-gradient(#ffffff, #f0f3f9 49%, #e1e7f2 50%, #eef2f9);
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.15);
  text-shadow: 0 1px 0 #fff;
  transition: transform .12s, box-shadow .12s;
}
.pill:hover { border-color: var(--fb); box-shadow: inset 0 1px 0 #fff, 0 0 0 3px rgba(109,132,180,.25); }
.pill:active { transform: translateY(1px); }
.pill.aqua {
  border-color: #1d6fb8;
  color: #062c52;
  background: linear-gradient(#cdeaff, #7fc0f7 49%, #3f96e6 50%, #86cdff);
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}
.pill.big { font-size: 14px; padding: 8px 20px; border-radius: 18px; }
.pill kbd { margin-left: 6px; }
#stage.remaster .title-pills .pill {
  color: #eaf1ff;
  border-color: rgba(160,190,255,.45);
  background: linear-gradient(rgba(255,255,255,.2), rgba(255,255,255,.06) 50%, rgba(255,255,255,.02) 51%, rgba(255,255,255,.08));
  text-shadow: 0 1px 1px rgba(0,0,0,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
#stage.remaster .title-pills .pill:hover { background-color: rgba(109,132,180,.35); }

.seg { display: inline-flex; border: 1px solid #1d3263; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.seg button {
  border: 0;
  padding: 6px 14px;
  font-weight: bold;
  color: #2a3f6e;
  background: linear-gradient(#fff, #e3e8f3);
}
.seg button + button { border-left: 1px solid #9aa9c7; }
.seg button.on {
  color: #fff;
  background: linear-gradient(#6d84b4, var(--fb) 55%, #344f8a);
  text-shadow: 0 -1px 0 rgba(0,0,0,.3);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.3);
}
.seg.small button { padding: 3px 10px; font-size: 11px; }

/* starburst banners, after the 2008 "Score Set!" / "Challenge Won!" art */
.burst {
  --c1: #7ea0e8;
  --c2: var(--fb);
  position: relative;
  margin: -46px auto 0;
  width: 150px;
  height: 150px;
  display: grid;
  place-items: center;
  animation: spin-in .7s cubic-bezier(.2,1.5,.4,1);
}
.burst::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, #fff 0 10%, var(--c1) 38%, var(--c2) 70%);
  clip-path: polygon(50% 0%, 61% 25%, 88% 12%, 80% 40%, 100% 50%, 80% 60%, 88% 88%, 61% 75%, 50% 100%, 39% 75%, 12% 88%, 20% 60%, 0% 50%, 20% 40%, 12% 12%, 39% 25%);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,.35));
  animation: slowspin 18s linear infinite;
}
.burst span {
  position: relative;
  font: bold italic 19px var(--trebuchet);
  color: #fff;
  text-align: center;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
  transform: rotate(-8deg);
  line-height: 1.05;
}
.burst.won { --c1: #9bff7a; --c2: #1d9e2c; }
.burst.lost { --c1: #ffd36e; --c2: #e2531b; }
.burst.gold { --c1: #fff08a; --c2: #d99a00; }
@keyframes spin-in { from { transform: scale(0) rotate(-120deg); } to { transform: none; } }
@keyframes slowspin { to { transform: rotate(360deg); } }

.over-panel { text-align: center; overflow: visible; margin-top: 40px; }
.over-body { padding: 0 18px 18px; }
.over-score, .over-best { display: inline-block; margin: 0 16px; }
.over-score small, .over-best small { display: block; color: #6d84b4; font-weight: bold; text-transform: uppercase; font-size: 10px; letter-spacing: .08em; }
.over-score b { font-size: 42px; color: var(--fb); line-height: 1.05; }
.over-best b { font-size: 26px; color: #7a8bb0; }
.over-best em { display: block; font-style: normal; font-weight: bold; color: #e2531b; animation: pop .4s cubic-bezier(.3,1.6,.5,1); }
.over-line { color: #666; min-height: 1.4em; margin: 8px 0 14px; }
.over-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.challenge-copy, .pause-copy { padding: 0 20px; font-size: 13px; color: #444; }

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  padding: 14px;
}
.char {
  position: relative;
  border: 1px solid #b7c3db;
  border-radius: 8px;
  padding: 8px 8px 10px;
  background: linear-gradient(#fff, #f1f4fa);
  text-align: center;
  color: #333;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.char:hover { transform: translateY(-2px); border-color: var(--fb); box-shadow: 0 6px 14px rgba(29, 50, 99, .2); }
.char.on { border: 2px solid var(--fb); padding: 7px 7px 9px; background: linear-gradient(#f5f8ff, #dfe7f7); }
.char canvas { width: 100%; height: 70px; display: block; }
.char b { display: block; font-size: 12px; color: var(--fb); margin-top: 4px; }
.char small { display: block; color: #777; font-size: 10px; min-height: 2.6em; }
.char .cbest { color: #999; font-size: 10px; }
.char.locked canvas { filter: brightness(0) opacity(.35); }
.char.locked b { color: #888; }
.char.locked::after {
  content: '\1F512';
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 12px;
  filter: grayscale(1);
  opacity: .6;
}

.score-tabs { margin: 12px 14px 0; }
.board { margin: 10px 0 0; padding: 0 14px 0 40px; min-height: 60px; }
.board li { padding: 5px 0; border-bottom: 1px dotted #ccd5e6; }
.board li b { color: var(--fb); display: inline-block; min-width: 56px; }
.board li span { color: #888; }
.board .empty { list-style: none; margin-left: -26px; color: #888; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px 14px 16px; }
.stats div { background: #eef2f9; border: 1px solid #d8dfea; border-radius: 6px; padding: 6px; text-align: center; }
.stats b { display: block; font-size: 16px; color: var(--fb); }
.stats small { color: #777; }

.settings { padding: 12px 18px 18px; display: grid; gap: 10px; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: bold; color: #2a3f6e; }
.settings label.check { justify-content: flex-start; font-weight: normal; color: #444; }
.settings input[type=range] { width: 55%; accent-color: var(--fb); }
.settings select { width: 55%; padding: 3px 4px; border: 1px solid #9aa9c7; border-radius: 3px; font: inherit; }
.settings input:not([type]) { width: 55%; padding: 4px 6px; border: 1px solid #9aa9c7; border-radius: 3px; font: inherit; }
.settings .hint { margin: -4px 0 0; color: #777; font-size: 11px; }
.settings .keys { margin-top: 4px; line-height: 2; }
.settings-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* shattered glass overlay for the breakout */
#glass { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 20; }

/* growl-style toasts */
#toasts {
  position: fixed;
  top: 14px;
  left: 50%;
  translate: -50% 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 240px;
  max-width: 90vw;
  padding: 8px 14px 8px 8px;
  font: 12px var(--lucida);
  color: #333;
  background: linear-gradient(#fffbe0, #fff3b0);
  border: 1px solid #e0c34a;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35), inset 0 1px 0 #fff;
  animation: toast-in .5s cubic-bezier(.2,1.5,.4,1), toast-out .4s ease-in forwards 3.6s;
}
.toast canvas { width: 54px; height: 34px; }
.toast b { display: block; color: #7a5a00; }
@keyframes toast-in { from { transform: translateY(-30px) scale(.8); opacity: 0; } }
@keyframes toast-out { to { transform: translateY(-20px); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .burst, .burst::before, #stage.cracking, .toast { animation: none; }
  #web2007.falling { animation-duration: .01s; }
}
