/* =========================================================
   Airbrake Check, Air Leak Test simulator
   One-screen dashboard layout, mobile-first light theme.
   The whole UI lives on a fixed-size "stage" that
   js/airbrake_check.js scales to fit any screen with no
   scrolling.
   ========================================================= */

:root {
  --blue: #123a8c;
  --blue-dark: #0d2a66;
  --bg: #f2f4f7;
  --card: #ffffff;
  --card-border: #dde3ea;
  --text: #1b2430;
  --muted: #5b6675;
  --red: #d92b21;
  --green: #1d9a4c;
  --amber: #c78a00;
  --lcd-digit: #17264a;
  --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #d9dee4;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  position: fixed;
  inset: 0;
}

button { font-family: inherit; }

/* ---------- Scaled stage ---------- */
.stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 390px;
  height: 722px;  /* keep in sync with actual content height */
  transform: translate(-50%, -50%) scale(1);
  transform-origin: center center;
  background: var(--bg);
  border-radius: 10px;
  box-shadow: 0 6px 30px rgba(15, 25, 45, 0.18);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Top banner ---------- */
.top-banner {
  background: var(--blue);
  color: #ffffff;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  padding: 3px 8px;
  flex-shrink: 0;
}

/* ---------- Header ---------- */
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  height: 36px;
  padding: 0 12px;
  border-bottom: 1px solid var(--card-border);
  flex-shrink: 0;
}

.menu-icon {
  width: 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.menu-icon span {
  height: 2.5px;
  border-radius: 2px;
  background: var(--blue);
}

.app-title {
  flex: 1;
  text-align: center;
  color: var(--blue);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.end-test-btn {
  border: 1.5px solid var(--red);
  color: var(--red);
  background: #ffffff;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.4px;
  padding: 5px 9px;
  border-radius: 7px;
  cursor: pointer;
  flex-shrink: 0;
}
.end-test-btn:active { background: #fdecea; }

/* ---------- Test mode + tabs ---------- */
.test-mode-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 0;
  flex-shrink: 0;
}
.test-mode-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.test-tabs {
  display: flex;
  gap: 5px;
  flex: 1;
}
.tab {
  flex: 1;
  border: 1px solid var(--card-border);
  background: #ffffff;
  color: var(--muted);
  border-radius: 7px;
  padding: 5px 2px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  line-height: 1.2;
  white-space: nowrap;
}
.tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #ffffff;
}
.tab.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- Guidance bar ---------- */
.guidance {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 8px;
  padding: 5px 10px;
  background: #e8f0ff;
  border: 1.5px solid #b9cdf3;
  border-radius: 10px;
  flex-shrink: 0;
  min-height: 34px;
}
.guidance-step {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.guidance-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-dark);
  line-height: 1.25;
}
.guidance.flash { animation: guideflash 0.6s ease; }
@keyframes guideflash {
  0% { background: #fff3c8; }
  100% { background: #e8f0ff; }
}

/* ---------- Layout grid ---------- */
.grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: min-content;
  gap: 6px;
  padding: 0 8px 8px;
  min-height: 0;
}
.grid > .card.third { grid-column: span 2; }  /* rows of three */
.grid > .card.half  { grid-column: span 3; }  /* rows of two */

.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 5px 6px 6px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(20, 30, 50, 0.06);
  min-width: 0;
}

.card-title {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title.trailer-title { color: var(--red); }

/* ---------- Status tags ---------- */
.status-line { margin-top: 3px; }
.status-tag {
  display: inline-block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  padding: 2.5px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.status-tag.off,
.status-tag.idle { background: #f1f3f5; color: #66707c; }
.status-tag.on,
.status-tag.good { background: #e3f6ea; color: var(--green); }
.status-tag.warn { background: #fdeeea; color: var(--red); }

/* ---------- Ignition ---------- */
.ignition-tap {
  border: none;
  background: none;
  cursor: pointer;
  width: 100%;
  padding: 0;
}
.ignition-svg {
  width: 100%;
  max-width: 80px;
  display: block;
  margin: 0 auto;
}
.ign-label {
  font-size: 15px;
  font-weight: 800;
  fill: var(--muted);
  letter-spacing: 0.5px;
}
.ign-label.ign-off { fill: var(--red); }
body.ignition-on .ign-label.ign-off { fill: var(--muted); }
body.ignition-on .ign-label.ign-on { fill: var(--green); }

.key-group {
  transform: rotate(-45deg);
  transform-origin: 110px 92px;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1);
}
body.ignition-on .key-group { transform: rotate(45deg); }
.key-ring { opacity: 0.9; }

/* ---------- Low air lamp ---------- */
.lowair-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px 0 1px;
}
.warn-lamp {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(160deg, #cdd3da, #8d949d);
  padding: 4px;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.7), 0 2px 5px rgba(0,0,0,0.25);
}
.warn-lamp-glass {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #7a1613, #4a0c0a 60%, #300605);
  box-shadow: inset 0 -3px 8px rgba(0,0,0,0.6);
  transition: background 0.25s ease, box-shadow 0.25s ease;
}
.warn-lamp.lit .warn-lamp-glass {
  background: radial-gradient(circle at 35% 30%, #ff9d94, #f2261a 55%, #b90f07);
  box-shadow: 0 0 14px 5px rgba(242, 38, 26, 0.55), inset 0 -3px 8px rgba(120,0,0,0.55);
  animation: lampPulse 1.1s ease-in-out infinite;
}
@keyframes lampPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.35); }
}
.lowair-word {
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.7px;
  color: #c9ced5;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.lowair-word.lit {
  color: var(--red);
  text-shadow: 0 0 10px rgba(242, 38, 26, 0.45);
}

/* ---------- Engine ---------- */
.engine-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 3px 1px 0;
}
.engine-btn {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 13px 2px;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.22), inset 0 1.5px 2px rgba(255,255,255,0.35), inset 0 -3px 4px rgba(0,0,0,0.25);
  transition: transform 0.1s ease, box-shadow 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}
.engine-btn.start { background: linear-gradient(180deg, #35c46e, #158741 75%, #0c6330); }
.engine-btn.stop  { background: linear-gradient(180deg, #f36a5f, #c81e14 75%, #93130b); }
.engine-btn:disabled {
  filter: grayscale(0.85) brightness(1.05);
  opacity: 0.55;
  cursor: not-allowed;
}
.engine-btn:not(:disabled):active { transform: scale(0.95); }
.engine-btn.glow {
  box-shadow: 0 0 12px 3px rgba(53, 196, 110, 0.55), inset 0 1.5px 2px rgba(255,255,255,0.4), inset 0 -3px 4px rgba(0,0,0,0.25);
}
.engine-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 1px;
}
.engine-lamp {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #b9c0c8;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.35);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  flex-shrink: 0;
}
.engine-lamp.running {
  background: radial-gradient(circle at 35% 30%, #7bf0a8, #1d9a4c);
  box-shadow: 0 0 9px 2px rgba(29, 154, 76, 0.6);
}
.engine-status {
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: var(--muted);
  white-space: nowrap;
}
.engine-status.running { color: var(--green); }

/* ---------- Knobs ---------- */
.knob-btn {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  width: 100%;
}
.knob-plate {
  position: relative;
  width: 104px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  border-radius: 12px;
  background: linear-gradient(160deg, #d7dbe0, #a4abb4 60%, #7f8791);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.6), inset 0 -3px 6px rgba(0,0,0,0.25), 0 2px 5px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}
.screw {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8ebee, #8b929b 65%, #5f666f);
  box-shadow: inset 0 -1px 2px rgba(0,0,0,0.5);
}
.screw::after {
  content: "";
  position: absolute;
  left: 15%;
  top: 45%;
  width: 70%;
  height: 1.3px;
  background: #4c525a;
  transform: rotate(35deg);
}
.screw.s1 { top: 4px; left: 4px; }
.screw.s2 { top: 4px; right: 4px; }
.screw.s3 { bottom: 4px; left: 4px; }
.screw.s4 { bottom: 4px; right: 4px; }

.knob-move {
  width: 90%;
  transition: transform 0.28s cubic-bezier(0.34, 1.3, 0.64, 1), filter 0.28s ease;
  transform: scale(1);
  filter: drop-shadow(0 7px 6px rgba(0, 0, 0, 0.4));
}
.knob-move.pushed-in {
  transform: scale(0.84);
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.35));
}
.knob-svg { width: 100%; display: block; }

.knob-edge-text {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
  fill: #6a5200;
}
.knob-edge-text.light { fill: #ffd9d6; }
.knob-main-text {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.5px;
  fill: #202020;
}
.knob-main-text.light { fill: #ffffff; }
.knob-small-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.6px;
  fill: #ffd9d6;
}

/* ---------- Stabilization card (left of brake hold) ---------- */
.card.stab { text-align: left; padding: 6px 8px; }
.stab-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.stab-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--blue);
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stab-icon.ok { border-color: var(--green); color: var(--green); }
.stab-title {
  flex: 1;
  min-width: 0;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stab-title.ok { color: var(--green); }
.stab-psi {
  margin-top: 4px;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue-dark);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.stab-arrow {
  margin: 0 4px;
  color: var(--blue);
}
.stab-substate {
  margin-left: 7px;
  font-size: 8.5px;
  font-weight: 700;
  color: var(--blue);
}
.stab-text {
  font-size: 8.5px;
  color: var(--muted);
  margin-top: 3px;
  line-height: 1.25;
  min-height: 21px;
}
.spinner {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2.5px solid #ccd8ee;
  border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
.spinner.hidden { visibility: hidden; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Brake hold card (right of stabilization) ---------- */
.hold-card { padding: 6px 8px; text-align: left; }
.hold-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.hold-head {
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.hold-time {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}
.hold-total {
  font-size: 10px;
  color: var(--muted);
  font-weight: 700;
}
.hold-bar-track {
  margin-top: 5px;
  height: 7px;
  border-radius: 999px;
  background: #e3e7ec;
  overflow: hidden;
}
.hold-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f5fce, var(--blue));
  transition: width 0.15s linear;
}
.hold-bar.complete { background: linear-gradient(90deg, #29b866, var(--green)); }
.hold-bar.failed { background: linear-gradient(90deg, #e0564c, var(--red)); }
.hold-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.hold-instruction {
  flex: 1;
  min-width: 0;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
  min-height: 21px;
}
.hold-instruction.alert { color: var(--red); font-weight: 800; }
.hold-instruction.good { color: var(--green); font-weight: 800; }

/* ---------- Air tank pressure card (gauge + compact digital) ---------- */
.lcd-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  background: linear-gradient(180deg, #f3f6f2, #e2e8df);
  border: 1.5px solid #b9c2b6;
  border-radius: 7px;
  box-shadow: inset 0 1.5px 4px rgba(40, 60, 40, 0.18);
  padding: 3px 12px;
  margin-bottom: 2px;
}
.lcd-value {
  font-family: "Courier New", Courier, monospace;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--lcd-digit);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.lcd-unit {
  font-size: 10px;
  font-weight: 800;
  color: var(--lcd-digit);
}
.lcd-note {
  margin-top: 2px;
  font-size: 8.5px;
  font-weight: 600;
  color: var(--muted);
  min-height: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- Analog gauge ---------- */
.gauge-wrap {
  width: 100%;
  max-width: 122px;
  margin: 0 auto;
}
.gauge-svg {
  width: 100%;
  display: block;
}
.gauge-tick { stroke: #2c3646; }
.gauge-tick.minor { stroke: #8b95a2; }
.gauge-label {
  font-size: 15px;
  font-weight: 700;
  fill: #2c3646;
}
.gauge-psi {
  font-size: 13px;
  font-weight: 800;
  fill: var(--blue);
  letter-spacing: 1px;
}
.gauge-value {
  font-size: 27px;
  font-weight: 800;
  fill: var(--blue);
}
#gauge_needle {
  transform-origin: 110px 110px;
  transition: transform 0.25s ease-out;
}

/* ---------- Service brake pedal card ---------- */
.pedal-card { padding-bottom: 7px; }
.pedal-cta {
  color: var(--red);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.25;
}
.pedal-zone {
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
  outline: none;
  margin-top: 3px;
}
.pedal-perspective {
  perspective: 420px;
  width: 100%;
  max-width: 126px;
  margin: 0 auto;
  padding-top: 4px;
}
.pedal-body {
  position: relative;
  width: 72%;
  margin: 0 auto;
  transform: rotateX(36deg);
  transform-origin: 50% 100%;
  transition: transform 0.12s ease-out;
}
.pedal-zone.pressed .pedal-body {
  transform: rotateX(54deg) translateY(5px);
}
.pedal-face {
  position: relative;
  width: 100%;
  aspect-ratio: 8 / 9;
  border-radius: 11px;
  background: linear-gradient(180deg, #3a3e44, #23262b 60%, #17191d);
  border: 2px solid #0e1013;
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.18), 0 8px 11px rgba(0,0,0,0.4);
  overflow: hidden;
  transition: box-shadow 0.12s ease-out;
}
.pedal-zone.pressed .pedal-face {
  box-shadow: inset 0 2px 3px rgba(255,255,255,0.12), 0 3px 5px rgba(0,0,0,0.45);
}
.pedal-ribs {
  position: absolute;
  inset: 7px 9px;
  border-radius: 6px;
  background: repeating-linear-gradient(
    180deg,
    #43474d 0px, #43474d 4px,
    #1a1c20 4px, #1a1c20 10px
  );
  box-shadow: inset 0 0 5px rgba(0,0,0,0.6);
}
.pedal-side {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: -6px;
  height: 9px;
  border-radius: 0 0 8px 8px;
  background: #101215;
}
.pedal-stem {
  width: 12px;
  height: 16px;
  margin: 1px auto 0;
  background: linear-gradient(90deg, #6e757e, #3d434b 60%, #23272d);
  border-radius: 3px;
}
.pedal-base {
  width: 56%;
  height: 9px;
  margin: 0 auto;
  border-radius: 3px;
  background: linear-gradient(180deg, #9aa1aa, #5c636c);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
.pedal-state {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.pedal-state.released { background: #f1f3f5; color: #66707c; }
.pedal-state.applied  { background: #e3f6ea; color: var(--green); }

/* ---------- Completed test tabs ---------- */
.tab.done { color: var(--green); border-color: #bfe6cd; }
.tab.active.done { color: #ffffff; background: var(--green); border-color: var(--green); }

/* ---------- Continue button in the guidance bar ---------- */
.guidance-continue {
  flex-shrink: 0;
  margin-left: auto;
  border: none;
  border-radius: 999px;
  background: linear-gradient(180deg, #2fbf68, #1d9a4c 75%, #15803c);
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  padding: 7px 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 5px rgba(21, 128, 60, 0.35), inset 0 1.5px 2px rgba(255,255,255,0.35);
  animation: continuePulse 1.6s ease-in-out infinite;
}
.guidance-continue:active { transform: scale(0.95); }
.guidance-continue.hidden { display: none; }
.guidance-arrow { font-size: 11px; }
@keyframes continuePulse {
  0%, 100% { box-shadow: 0 2px 5px rgba(21, 128, 60, 0.35), inset 0 1.5px 2px rgba(255,255,255,0.35); }
  50% { box-shadow: 0 0 10px 3px rgba(47, 191, 104, 0.55), inset 0 1.5px 2px rgba(255,255,255,0.35); }
}

/* Guidance bar turns green when the current test is completed */
.guidance.done {
  background: #e6f7ec;
  border-color: #ade0c2;
}
.guidance.done .guidance-step {
  background: var(--green);
}
.guidance.done .guidance-text {
  color: #14532d;
}

/* ---------- Test-speed chip (X1 / X2 / X4 / X10) ---------- */
.speed-chip {
  flex-shrink: 0;
  border: 1.5px solid #e3b341;
  background: #fff8e6;
  color: #9a6b00;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.4px;
  border-radius: 999px;
  padding: 3.5px 9px;
  cursor: pointer;
  white-space: nowrap;
}
.speed-chip:active { transform: scale(0.94); }
.speed-chip.fast {
  background: #ffedc2;
  color: #7a5200;
  box-shadow: 0 0 6px rgba(227, 179, 65, 0.6);
}

/* Guidance bar warning state (wrong order of operations) */
.guidance.warn {
  background: #fdecea;
  border-color: #f2b3ae;
}
.guidance.warn .guidance-step {
  background: var(--red);
}
.guidance.warn .guidance-text {
  color: #8f1710;
}

/* Tiny smiley in the top banner */
.banner-smile {
  font-size: 10px;
  vertical-align: 1px;
}
.speed-chip.hidden { display: none; }

/* ---------- CDL123 logo badge (replaces the hamburger) ---------- */
.logo-badge {
  width: 24px;
  height: 24px;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.logo-badge:active { transform: scale(0.88); }

/* ---------- Logo pop-out with sparkles ---------- */
.logo-pop {
  position: absolute;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.logo-pop.hidden { display: none; }
.logo-pop-inner {
  position: relative;
  width: 80%;
  max-width: 320px;
  animation: logoPop 2s cubic-bezier(0.34, 1.35, 0.64, 1) forwards;
  filter: drop-shadow(0 10px 28px rgba(10, 20, 40, 0.45));
}
.logo-pop-inner img {
  width: 100%;
  display: block;
}
@keyframes logoPop {
  0%   { transform: scale(0.08); opacity: 0; }
  12%  { transform: scale(1.1);  opacity: 1; }
  20%  { transform: scale(1); }
  82%  { transform: scale(1);    opacity: 1; }
  100% { transform: scale(0.08); opacity: 0; }
}
.sparkles {
  position: absolute;
  inset: -12%;
  pointer-events: none;
}
.sparkle {
  position: absolute;
  color: #ffd11a;
  text-shadow: 0 0 10px rgba(255, 209, 26, 0.95), 0 0 20px rgba(255, 170, 0, 0.55);
  animation: sparkleTwinkle 0.9s ease-in-out both;
  animation-iteration-count: 2;
}
@keyframes sparkleTwinkle {
  0%   { transform: scale(0) rotate(0deg);    opacity: 0; }
  40%  { transform: scale(1.25) rotate(25deg); opacity: 1; }
  100% { transform: scale(0) rotate(55deg);   opacity: 0; }
}
