:root {
  --gold: #F3C763;
  --gold-soft: #FFE3AE;
  --gold-deep: #B47A2B;
  --orange: #FF8A3D;
  --orange-deep: #E4671F;
  --ink: #231208;
  --cream: #FFF4DE;
  --muted: rgba(255, 233, 199, 0.62);
  --faint: rgba(255, 233, 199, 0.4);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --panel-a: rgba(62, 36, 19, 0.97);
  --panel-b: rgba(28, 15, 8, 0.985);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: #1b1009;
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}

button {
  font-family: inherit;
  color: inherit;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #1b1009;
}

.scene {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------------- HUD ---------------- */
.hud {
  position: absolute;
  inset: 0;
  z-index: 5;
  padding: calc(10px + var(--safe-top)) 14px 0;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.32s ease, transform 0.32s ease;
}

.game.is-playing .hud,
.game.is-over .hud {
  opacity: 1;
  transform: translateY(0);
}

.hud-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card {
  background: linear-gradient(180deg, rgba(52, 31, 17, 0.82), rgba(28, 15, 8, 0.86));
  border: 1px solid rgba(255, 209, 133, 0.3);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 232, 186, 0.14);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hp-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 12px 8px 10px;
  min-width: 134px;
}

.hp-icon {
  width: 24px;
  height: 24px;
  color: var(--gold);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
}

.hp-meta { flex: 1; min-width: 0; }

.hp-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--muted);
  margin-bottom: 4px;
}

.hp-line b {
  font-size: 13px;
  letter-spacing: 0;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.bar {
  width: 86px;
  max-width: 100%;
  height: 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.5);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}

.bar i {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFD45F, #FF8A3D);
  box-shadow: 0 0 8px rgba(255, 160, 70, 0.6);
  transition: width 0.26s ease;
}

.hp-card.low .bar i {
  background: linear-gradient(90deg, #FF7A4E, #D82D18);
  animation: hpPulse 0.9s ease-in-out infinite;
}

.score-card {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
  margin-left: auto;
  min-width: 92px;
  justify-content: flex-end;
}

.score-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.score-card b {
  font-size: 19px;
  line-height: 1;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 8px rgba(255, 170, 60, 0.35);
  transition: transform 0.12s ease;
}

.score-card b.bump { transform: scale(1.18); }

.combo {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  padding: 3px 9px;
  border-radius: 99px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #3A1B06;
  background: linear-gradient(180deg, #FFDE8E, #F2AE43);
  border: 1px solid rgba(255, 246, 208, 0.75);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(-4px) scale(0.9);
  transition: opacity 0.18s ease, transform 0.18s ease;
  white-space: nowrap;
}

.combo.on {
  opacity: 1;
  transform: translateY(0) scale(1);
  animation: comboPop 0.26s ease;
}

.round-btn {
  pointer-events: auto;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  background: linear-gradient(180deg, rgba(58, 34, 18, 0.86), rgba(28, 15, 8, 0.9));
  border: 1px solid rgba(255, 209, 133, 0.32);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 232, 186, 0.16);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: transform 0.12s ease;
}

.round-btn:active { transform: scale(0.92); }
.round-btn .mp-icon { width: 19px; height: 19px; }
.round-btn .mp-icon[hidden] { display: none; }

.tip-strip {
  position: absolute;
  left: 50%;
  top: calc(66px + var(--safe-top));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 99px;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: rgba(255, 243, 219, 0.86);
  background: rgba(35, 19, 10, 0.62);
  border: 1px solid rgba(255, 209, 133, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
  white-space: nowrap;
  animation: tipFloat 2.6s ease-in-out infinite;
  transition: opacity 0.4s ease, transform 0.4s ease;
  max-width: calc(100% - 28px);
}

.tip-strip .mp-icon { width: 15px; height: 15px; color: var(--gold); }

.tip-strip.hide {
  opacity: 0;
  transform: translateX(-50%) translateY(-6px);
}

/* ---------------- Shield button ---------------- */
.shield-btn {
  position: absolute;
  right: 16px;
  bottom: calc(20px + var(--safe-bottom));
  z-index: 8;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-soft);
  background: radial-gradient(circle at 38% 28%, #7A4A26 0%, #482A16 42%, #26140A 100%);
  border: 2px solid rgba(255, 205, 120, 0.8);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), 0 0 0 5px rgba(40, 22, 11, 0.4),
    inset 0 2px 0 rgba(255, 231, 180, 0.3), inset 0 -8px 14px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transform: scale(0.82);
  transition: opacity 0.28s ease, transform 0.28s ease, box-shadow 0.2s ease;
  touch-action: none;
}

.game.is-playing .shield-btn {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.shield-btn:active,
.shield-btn.active {
  transform: scale(0.94);
  border-color: #FFE7A8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 24px rgba(255, 186, 86, 0.5),
    0 0 0 5px rgba(255, 178, 72, 0.16), inset 0 2px 0 rgba(255, 240, 200, 0.4);
}

.shield-btn.alert {
  animation: shieldAlert 0.62s ease-in-out infinite;
}

.shield-btn.cooling .shield-core {
  opacity: 0.62;
}

.shield-core {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transition: opacity 0.15s ease;
}

.shield-core .mp-icon {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.45));
}

.shield-core em {
  font-style: normal;
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: rgba(255, 233, 190, 0.9);
}

.shield-cd {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(rgba(0, 0, 0, 0.66) var(--cd, 0deg), rgba(0, 0, 0, 0) 0deg);
  pointer-events: none;
  z-index: 1;
}

/* ---------------- Announce / flash ---------------- */
.announce {
  position: absolute;
  left: 50%;
  top: 30%;
  z-index: 9;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-align: center;
  pointer-events: none;
  opacity: 0;
  width: max-content;
  max-width: calc(100% - 40px);
}

.announce b {
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.16em;
  color: #FFE2A1;
  text-shadow: 0 2px 0 rgba(92, 42, 10, 0.65), 0 10px 26px rgba(0, 0, 0, 0.6);
}

.announce span {
  font-size: 11.5px;
  letter-spacing: 0.16em;
  color: rgba(255, 238, 206, 0.82);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

.announce.show {
  animation: announceIn 2.4s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.damage-flash {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 50% 76%, rgba(255, 52, 26, 0.46), rgba(255, 30, 10, 0) 58%);
  transition: opacity 0.28s ease;
}

.damage-flash.on {
  opacity: 1;
  transition: opacity 0.06s ease;
}

/* ---------------- Overlays ---------------- */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(20px + var(--safe-top)) 18px calc(20px + var(--safe-bottom));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 168, 92, 0.16), rgba(18, 9, 4, 0) 55%),
    linear-gradient(180deg, rgba(20, 10, 4, 0.38), rgba(16, 8, 3, 0.8));
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

.overlay[hidden] { display: none; }

.overlay.is-open .panel {
  animation: panelIn 0.46s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.panel {
  position: relative;
  width: 100%;
  max-width: 364px;
  margin: auto;
  padding: 30px 22px 22px;
  border-radius: 22px;
  text-align: center;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 178, 92, 0.16), rgba(255, 178, 92, 0) 60%),
    linear-gradient(160deg, var(--panel-a), var(--panel-b));
  border: 1px solid rgba(255, 205, 120, 0.46);
  box-shadow:
    0 30px 70px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(255, 234, 188, 0.07),
    inset 0 0 0 5px rgba(0, 0, 0, 0.26),
    inset 0 0 0 6px rgba(255, 205, 120, 0.12),
    inset 0 -40px 60px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.panel::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 226, 168, 0.65), transparent);
}

.seal {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 40px;
  height: 52px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(208, 74, 48, 0.88);
  border-radius: 4px;
  color: #E97455;
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  line-height: 1.12;
  letter-spacing: 0.05em;
  transform: rotate(6deg);
  opacity: 0.92;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 0 10px rgba(208, 74, 48, 0.15);
}

.seal-sm {
  width: 34px;
  height: 44px;
  font-size: 16px;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 10.5px;
  letter-spacing: 0.34em;
  color: rgba(255, 214, 156, 0.6);
  text-indent: 0.34em;
}

.title {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 64px;
  line-height: 0.98;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-indent: 0.1em;
  background: linear-gradient(180deg, #FFF3CE 0%, #FFD070 42%, #E9973B 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 0 rgba(74, 34, 6, 0.55)) drop-shadow(0 14px 26px rgba(0, 0, 0, 0.55));
}

.subtitle {
  margin: 10px 0 18px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 0 0 4px;
}

.rule {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 3px 9px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 243, 217, 0.055), rgba(255, 243, 217, 0.015));
  border: 1px solid rgba(255, 210, 140, 0.14);
}

.rule .mp-icon {
  width: 21px;
  height: 21px;
  color: var(--gold);
  margin-bottom: 1px;
}

.rule b {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 243, 223, 0.94);
}

.rule span {
  font-size: 9px;
  letter-spacing: 0.02em;
  color: var(--faint);
  white-space: nowrap;
}

.best-line {
  margin: 13px 0 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.best-line b {
  margin-left: 5px;
  font-size: 16px;
  letter-spacing: 0;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(255, 180, 70, 0.4);
}

.cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 54px;
  margin-top: 14px;
  border-radius: 14px;
  border: 1px solid #FFD69A;
  background: linear-gradient(180deg, #FFAD63 0%, #FA8A38 44%, #EC6C1E 100%);
  color: #3C1B05;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-indent: 0.16em;
  box-shadow:
    0 12px 26px rgba(232, 104, 28, 0.34),
    inset 0 1px 0 rgba(255, 246, 218, 0.72),
    inset 0 -4px 0 rgba(151, 62, 9, 0.3);
  overflow: hidden;
  transition: transform 0.1s ease, filter 0.15s ease;
}

.cta::after {
  content: "";
  position: absolute;
  left: -30%;
  top: -60%;
  width: 60%;
  height: 200%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
  animation: ctaShine 4.2s ease-in-out infinite;
  pointer-events: none;
}

.cta:active {
  transform: translateY(2px) scale(0.986);
  filter: brightness(0.96);
}

.cta .mp-icon {
  width: 19px;
  height: 19px;
  color: #4A2107;
}

.ghost-btn {
  width: 100%;
  height: 44px;
  margin-top: 9px;
  border-radius: 12px;
  border: 1px solid rgba(255, 218, 160, 0.24);
  color: rgba(255, 240, 215, 0.82);
  font-size: 13px;
  letter-spacing: 0.12em;
  background: rgba(255, 240, 215, 0.03);
  transition: background 0.15s ease, transform 0.12s ease;
}

.ghost-btn:active {
  transform: scale(0.985);
  background: rgba(255, 240, 215, 0.08);
}

.foot-note {
  margin: 11px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: rgba(255, 220, 165, 0.34);
  text-indent: 0.28em;
}

/* ---------------- End screen ---------------- */
.end-panel {
  max-width: 360px;
  padding-top: 26px;
}

.result-title {
  margin: 0;
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 50px;
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-indent: 0.14em;
  background: linear-gradient(180deg, #FFF7DA, #FFD171 46%, #E08F32);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 0 rgba(70, 31, 5, 0.55)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.5));
}

.end-panel.lose .result-title {
  background: linear-gradient(180deg, #FFD6C2, #FF9268 46%, #C44828);
  -webkit-background-clip: text;
  background-clip: text;
}

.end-panel.lose .seal {
  border-color: rgba(120, 104, 96, 0.8);
  color: rgba(214, 178, 158, 0.9);
}

.end-panel .subtitle {
  margin: 6px 0 12px;
}

.stars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  margin: 0 0 12px;
}

.stars .mp-icon {
  width: 31px;
  height: 31px;
  color: rgba(255, 224, 168, 0.16);
  transition: color 0.3s ease, transform 0.3s ease;
}

.stars .mp-icon.on {
  color: #FFD05E;
  filter: drop-shadow(0 0 10px rgba(255, 178, 66, 0.55)) drop-shadow(0 3px 4px rgba(0, 0, 0, 0.35));
  animation: starPop 0.42s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.stars .mp-icon.on[data-star="2"] { animation-delay: 0.12s; }
.stars .mp-icon.on[data-star="3"] { animation-delay: 0.24s; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin: 0 0 4px;
}

.stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 11px;
  background: linear-gradient(180deg, rgba(255, 243, 215, 0.055), rgba(255, 243, 215, 0.012));
  border: 1px solid rgba(255, 210, 140, 0.12);
}

.stat span {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  color: var(--faint);
}

.stat b {
  font-size: 17px;
  letter-spacing: 0;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
}

.record {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 11px 0 0;
  padding: 5px 11px;
  border-radius: 99px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: #FFD88B;
  background: rgba(255, 178, 64, 0.12);
  border: 1px solid rgba(255, 198, 108, 0.35);
  box-shadow: 0 0 16px rgba(255, 160, 50, 0.16);
}

.record[hidden] { display: none; }

.record .mp-icon {
  width: 13px;
  height: 13px;
}

/* ---------------- Keyframes ---------------- */
@keyframes panelIn {
  from { opacity: 0; transform: translateY(16px) scale(0.955); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes comboPop {
  0% { transform: scale(0.82); }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes tipFloat {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-4px); }
}

@keyframes shieldAlert {
  0%, 100% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), 0 0 0 5px rgba(40, 22, 11, 0.4), inset 0 2px 0 rgba(255, 231, 180, 0.3); }
  50% { box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), 0 0 0 9px rgba(255, 96, 48, 0.2), 0 0 26px rgba(255, 110, 50, 0.55), inset 0 2px 0 rgba(255, 231, 180, 0.3); }
}

@keyframes hpPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.62; }
}

@keyframes announceIn {
  0% { opacity: 0; transform: translate(-50%, 12px) scale(0.94); }
  12% { opacity: 1; transform: translate(-50%, 0) scale(1.02); }
  20% { transform: translate(-50%, 0) scale(1); }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(1); }
}

@keyframes starPop {
  0% { transform: scale(0.3) rotate(-18deg); opacity: 0; }
  70% { transform: scale(1.16) rotate(3deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); }
}

@keyframes ctaShine {
  0%, 55% { left: -40%; }
  80%, 100% { left: 125%; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 340px) {
  .hp-card { min-width: 118px; }
  .bar { width: 70px; }
  .rule span { font-size: 8.5px; }
  .title { font-size: 56px; }
  .shield-btn { width: 74px; height: 74px; }
  .shield-core .mp-icon { width: 27px; height: 27px; }
}

@media (min-width: 560px) {
  .panel { max-width: 392px; }
  .start-panel { max-width: 392px; }
}

@media (orientation: landscape) and (max-height: 900px) {
  .hud { padding: calc(8px + var(--safe-top)) 12px 0; }
  .hp-card { padding: 5px 10px 6px 8px; min-width: 120px; }
  .hp-icon { width: 20px; height: 20px; }
  .bar { width: 76px; height: 6px; }
  .score-card { padding: 6px 10px; }
  .score-card b { font-size: 17px; }
  .round-btn { width: 34px; height: 34px; flex-basis: 34px; }

  .tip-strip { top: calc(56px + var(--safe-top)); }

  .shield-btn {
    width: 72px;
    height: 72px;
    right: 14px;
    bottom: calc(14px + var(--safe-bottom));
  }
  .shield-core .mp-icon { width: 27px; height: 27px; }

  .announce { top: 22%; }
  .announce b { font-size: 26px; }

  .start-panel {
    max-width: 620px;
    padding: 18px 26px 16px;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    grid-template-areas:
      "eyebrow eyebrow"
      "title rules"
      "sub rules"
      "best rules"
      "cta cta"
      "foot foot";
    align-items: center;
    column-gap: 20px;
    text-align: left;
  }
  .start-panel .eyebrow { grid-area: eyebrow; text-align: left; margin-bottom: 4px; }
  .start-panel .title { grid-area: title; font-size: 52px; text-align: left; }
  .start-panel .subtitle { grid-area: sub; margin: 4px 0 8px; text-align: left; }
  .start-panel .rule-grid { grid-area: rules; margin: 0; }
  .start-panel .rule { padding: 9px 3px 8px; }
  .start-panel .best-line { grid-area: best; margin-top: 2px; text-align: left; }
  .start-panel .cta { grid-area: cta; height: 46px; margin-top: 12px; font-size: 16px; }
  .start-panel .foot-note { grid-area: foot; margin-top: 8px; }
  .start-panel .seal { display: none; }

  .end-panel {
    max-width: 600px;
    padding: 16px 24px 16px;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    grid-template-areas:
      "eyebrow stats"
      "title stats"
      "stars stats"
      "sub stats"
      "record stats"
      "actions stats";
    column-gap: 20px;
    text-align: left;
  }
  .end-panel .eyebrow { grid-area: eyebrow; margin: 0 0 2px; text-align: left; }
  .end-panel .result-title { grid-area: title; font-size: 38px; text-align: left; }
  .end-panel .subtitle { grid-area: sub; margin: 2px 0 4px; text-align: left; }
  .end-panel .stars { grid-area: stars; justify-content: flex-start; height: 30px; margin: 4px 0 4px; }
  .end-panel .stars .mp-icon { width: 24px; height: 24px; }
  .end-panel .stat-grid { grid-area: stats; align-self: center; gap: 6px; }
  .end-panel .record { grid-area: record; margin: 4px 0 0; justify-self: start; }
  .end-panel .cta { grid-area: actions; height: 44px; margin-top: 8px; font-size: 15px; }
  .end-panel .ghost-btn { grid-area: actions; height: 36px; margin-top: 58px; font-size: 12px; }
  .end-panel .seal { display: none; }
  .end-panel .stat b { font-size: 15px; }
}

@media (orientation: landscape) and (max-height: 460px) {
  .overlay { padding: calc(10px + var(--safe-top)) 14px calc(10px + var(--safe-bottom)); }
  .start-panel { max-width: 680px; padding: 12px 20px 12px; }
  .start-panel .title { font-size: 40px; }
  .start-panel .subtitle { font-size: 10.5px; margin: 2px 0 6px; }
  .start-panel .rule span { display: none; }
  .start-panel .rule { padding: 7px 2px; }
  .start-panel .rule b { font-size: 10px; }
  .start-panel .rule .mp-icon { width: 17px; height: 17px; }
  .start-panel .best-line { font-size: 10px; }
  .start-panel .best-line b { font-size: 14px; }
  .start-panel .foot-note { display: none; }
  .start-panel .cta { height: 40px; margin-top: 8px; }
  .start-panel .seal { display: none; }

  .end-panel { max-width: 640px; padding: 12px 20px; }
  .end-panel .result-title { font-size: 30px; }
  .end-panel .subtitle { display: none; }
  .end-panel .stars { height: 24px; margin: 2px 0; }
  .end-panel .stars .mp-icon { width: 20px; height: 20px; }
  .end-panel .record { display: none; }
  .end-panel .cta { height: 38px; margin-top: 4px; }
  .end-panel .ghost-btn { height: 30px; margin-top: 48px; }
  .end-panel .seal { display: none; }
  .end-panel .stat { padding: 6px 9px; }
  .end-panel .stat b { font-size: 14px; }

  .shield-btn { width: 64px; height: 64px; }
  .shield-core .mp-icon { width: 24px; height: 24px; }
  .shield-core em { font-size: 8.5px; }
}
