:root {
  --orange: #FF8A3D;
  --orange-deep: #E45F26;
  --orange-dark: #B8461D;
  --cream: #FFF7EA;
  --cream-2: #FFEBCF;
  --paper: #FFFDF8;
  --ink: #35251B;
  --ink-2: #6E5949;
  --ink-3: #9A836F;
  --line: #E4C7A5;
  --gold: #F4A91F;
  --green: #3C7E60;
  --danger: #D84B39;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow-card: 0 4px 0 rgba(104, 72, 45, .12), 0 10px 24px rgba(52, 37, 26, .15);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #21372b;
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; border: 0; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }

.game {
  position: relative;
  width: 100%;
  max-width: 520px;
  height: 100vh;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  background: #6f9f58;
  box-shadow: 0 0 80px rgba(0, 0, 0, .35);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

.terrain {
  position: absolute;
  inset: -1px;
  background-image: url("assets/bg.svg");
  background-repeat: no-repeat;
  background-size: 100% 100%;
  z-index: 0;
  transform: scale(1.008);
  transform-origin: center;
  filter: saturate(.96) contrast(1.015);
}
.terrain-shade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(38, 54, 31, .34) 0%, rgba(38, 54, 31, 0) 16%, rgba(38, 54, 31, 0) 75%, rgba(35, 48, 29, .42) 100%),
    radial-gradient(ellipse at 50% 47%, rgba(255, 242, 204, 0) 52%, rgba(41, 61, 34, .26) 100%);
}
.terrain-shade::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 72% 23%, rgba(255, 211, 122, .19), transparent 22%),
    radial-gradient(circle at 11% 62%, rgba(225, 255, 175, .12), transparent 19%);
  mix-blend-mode: screen;
}
#gameCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

/* ---------- top battle HUD ---------- */
.hud {
  position: absolute;
  z-index: 20;
  top: calc(var(--safe-top) + 10px);
  left: 14px;
  right: 14px;
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 7px;
  pointer-events: none;
  animation: hudDrop .55s cubic-bezier(.2, .8, .25, 1) both;
}
.stat-pill, .wave-pill {
  display: flex;
  align-items: center;
  background: rgba(255, 250, 239, .96);
  border: 1.5px solid rgba(124, 88, 56, .35);
  box-shadow: 0 3px 0 rgba(89, 62, 40, .18), 0 9px 20px rgba(44, 35, 22, .16);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.stat-pill {
  min-width: 82px;
  height: 50px;
  padding: 5px 9px 5px 6px;
  border-radius: 18px;
  gap: 7px;
}
.stat-orb {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #FFE1BE;
  border: 1px solid rgba(226, 139, 77, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75);
}
.lives-pill .stat-orb { color: #E65945; background: #FFE0D1; border-color: #F1AD95; }
.gold-pill .stat-orb { color: #D88A12; background: #FFEDB8; border-color: #EAC66C; }
.stat-orb .mp-icon { width: 20px; height: 20px; }
.stat-text { display: flex; flex-direction: column; line-height: 1; min-width: 0; }
.stat-text b { font-size: 18px; font-weight: 900; letter-spacing: -.03em; white-space: nowrap; }
.stat-text small { margin-top: 4px; font-size: 9px; color: var(--ink-3); font-weight: 600; letter-spacing: .08em; }
.wave-pill {
  justify-content: center;
  flex: 0 0 auto;
  min-width: 103px;
  margin-left: auto;
  padding: 5px 10px;
  border-radius: 18px;
  gap: 6px;
  color: var(--orange-dark);
  background: linear-gradient(180deg, #FFF9EF, #FFE7C8);
  border-color: rgba(220, 122, 63, .48);
}
.wave-pill > .mp-icon { width: 22px; height: 22px; flex: 0 0 22px; color: var(--orange-deep); }
.wave-pill span { display: flex; flex-direction: column; line-height: 1; }
.wave-pill b { font-size: 13px; font-weight: 900; color: #763B1E; white-space: nowrap; }
.wave-pill small { margin-top: 4px; font-size: 9px; color: #A5704B; font-weight: 700; letter-spacing: .05em; }

/* ---------- tutorial / toast / boss ---------- */
.hint {
  position: absolute;
  z-index: 22;
  top: calc(var(--safe-top) + 78px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 206px;
  padding: 9px 16px 9px 10px;
  color: #FFF6E7;
  background: rgba(53, 38, 28, .93);
  border: 1px solid rgba(255, 205, 143, .54);
  border-radius: 18px;
  box-shadow: 0 9px 22px rgba(36, 27, 18, .28);
  pointer-events: none;
  animation: hintBob 2.1s ease-in-out infinite, fadeSlide .5s .6s both;
  transition: opacity .3s, transform .3s;
}
.hint.is-hidden { opacity: 0; transform: translate(-50%, -8px); animation: none; }
.hint-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex: 0 0 33px;
  color: #FFB35D;
  background: rgba(255, 138, 61, .16);
  border-radius: 12px;
  border: 1px solid rgba(255, 174, 92, .25);
}
.hint-icon .mp-icon { width: 21px; height: 21px; }
.hint-copy { display: flex; flex-direction: column; line-height: 1.12; }
.hint-copy b { font-size: 12px; letter-spacing: .02em; }
.hint-copy small { margin-top: 4px; font-size: 10px; color: #D8C3AC; }
.hint-pulse {
  position: absolute;
  right: 9px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FFAD53;
  box-shadow: 0 0 0 0 rgba(255, 173, 83, .6);
  animation: dotPulse 1.5s infinite;
}
.toast {
  position: absolute;
  z-index: 35;
  left: 50%;
  top: calc(var(--safe-top) + 136px);
  transform: translate(-50%, -8px) scale(.96);
  max-width: calc(100% - 58px);
  padding: 9px 16px;
  border-radius: 999px;
  color: #FFF8EB;
  background: rgba(48, 36, 27, .92);
  border: 1px solid rgba(255, 196, 126, .36);
  box-shadow: 0 8px 22px rgba(36, 25, 16, .25);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.boss-alert {
  position: absolute;
  z-index: 24;
  top: calc(var(--safe-top) + 76px);
  left: 50%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px 9px 10px;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFF4DF, #FFD9BC);
  border: 1.5px solid #D95B36;
  box-shadow: 0 8px 24px rgba(76, 35, 22, .3);
  color: #7C2E1F;
  opacity: 0;
  transform: translate(-50%, -14px) scale(.95);
  pointer-events: none;
  transition: opacity .3s, transform .35s cubic-bezier(.2, 1.4, .4, 1);
}
.boss-alert.is-on { opacity: 1; transform: translate(-50%, 0) scale(1); }
.boss-alert .mp-icon { width: 24px; height: 24px; color: #D84B2F; }
.boss-alert span { display: flex; flex-direction: column; white-space: nowrap; }
.boss-alert b { font-size: 12px; font-weight: 900; letter-spacing: .05em; }
.boss-alert small { font-size: 9.5px; margin-top: 3px; color: #9E5A41; }

/* ---------- bottom dock ---------- */
.dock {
  position: absolute;
  z-index: 20;
  left: 14px;
  right: 14px;
  bottom: calc(var(--safe-bottom) + 12px);
  height: 78px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px 10px 15px;
  background: rgba(255, 248, 237, .97);
  border: 1.5px solid rgba(118, 83, 52, .33);
  border-radius: 23px;
  box-shadow: 0 4px 0 rgba(84, 59, 37, .2), 0 14px 30px rgba(36, 26, 16, .24);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: dockRise .6s .15s cubic-bezier(.2, .8, .25, 1) both;
}
.dock-main { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; justify-content: center; }
.dock-kicker {
  align-self: flex-start;
  color: var(--orange-deep);
  font-size: 9px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .14em;
  padding: 4px 7px;
  border-radius: 6px;
  background: #FFE3C0;
}
.dock-line { display: flex; align-items: baseline; gap: 7px; margin-top: 3px; min-width: 0; }
.dock-line strong { font-size: 18px; font-weight: 900; letter-spacing: -.03em; white-space: nowrap; }
.dock-line span { color: var(--ink-2); font-size: 10.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wave-progress {
  height: 5px;
  margin-top: 6px;
  border-radius: 999px;
  background: #EADBC6;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(82, 56, 33, .1);
}
.wave-progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #FFAC54, #F76B2C);
  transition: width .18s linear;
}
.launch-btn {
  flex: 0 0 91px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #FFF9F0;
  background: linear-gradient(180deg, #FFA14F 0%, #FF7A2F 58%, #EE6122 100%);
  border: 1px solid #D75C20;
  border-bottom: 3px solid #B94918;
  box-shadow: 0 5px 12px rgba(209, 86, 29, .32), inset 0 1px 0 rgba(255, 255, 255, .38);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .02em;
  transition: transform .12s, filter .12s, opacity .12s;
}
.launch-btn .mp-icon { width: 22px; height: 22px; margin-left: -3px; }
.launch-btn:active { transform: translateY(2px) scale(.98); filter: brightness(.96); }
.launch-btn.is-busy {
  color: #FFF9ED;
  background: linear-gradient(180deg, #C4B29E, #A99580);
  border-color: #8F7B67;
  border-bottom-color: #7B6856;
  box-shadow: 0 3px 0 rgba(71, 55, 42, .2);
  font-size: 12px;
}
.launch-btn.is-busy .mp-icon { animation: busyPulse 1.1s ease-in-out infinite; }
.launch-btn:focus-visible, .icon-btn:focus-visible, .build-card:focus-visible, .upgrade-btn:focus-visible, .replay-btn:focus-visible {
  outline: 3px solid rgba(255, 190, 94, .9);
  outline-offset: 2px;
}

/* ---------- sheets ---------- */
.sheet-scrim {
  position: absolute;
  inset: 0;
  z-index: 29;
  background: rgba(35, 27, 20, .32);
  backdrop-filter: blur(2.5px);
  -webkit-backdrop-filter: blur(2.5px);
  opacity: 0;
  transition: opacity .25s;
}
.sheet-scrim.is-on { opacity: 1; }
.sheet {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  bottom: 0;
  transform: translateY(112%);
  pointer-events: none;
  background:
    radial-gradient(circle at 14% 0%, rgba(255, 210, 153, .45), transparent 30%),
    linear-gradient(180deg, #FFFBF3 0%, #FFF2DD 100%);
  border-top: 1.5px solid rgba(255, 255, 255, .8);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -2px 0 rgba(190, 141, 97, .35), 0 -16px 50px rgba(47, 32, 22, .3);
  padding: 9px 16px calc(15px + var(--safe-bottom));
  transition: transform .34s cubic-bezier(.18, .95, .35, 1);
}
.sheet.is-open { transform: translateY(0); pointer-events: auto; }
.sheet-grip { width: 39px; height: 4px; border-radius: 99px; background: #D8BFA3; margin: 0 auto 8px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 1px 11px; }
.sheet-title { display: flex; flex-direction: column; }
.sheet-title strong { font-size: 18px; font-weight: 900; letter-spacing: -.02em; }
.sheet-title small { margin-top: 3px; color: var(--ink-2); font-size: 10.5px; }
.icon-btn {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #F6E6D2;
  color: #8E6D52;
  border: 1px solid #E4CBB0;
  transition: transform .12s, background .12s;
}
.icon-btn .mp-icon { width: 19px; height: 19px; }
.icon-btn:active { transform: scale(.92); background: #EFD9BE; }
.build-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.build-card {
  position: relative;
  height: 142px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: 5px 5px 9px;
  background: linear-gradient(180deg, #FFFDF8 0%, #FFF0DC 100%);
  border: 1.5px solid #E5C8A8;
  border-bottom: 3px solid #D6B28C;
  border-radius: 18px;
  box-shadow: 0 5px 12px rgba(102, 68, 38, .09), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: transform .12s, filter .12s, opacity .15s;
}
.build-card::before {
  content: "";
  position: absolute;
  inset: 5px 5px auto;
  height: 76px;
  border-radius: 13px;
  background: radial-gradient(circle at 50% 72%, rgba(255, 190, 113, .28), rgba(255, 243, 222, 0) 68%);
  pointer-events: none;
}
.build-card:active { transform: translateY(2px) scale(.98); }
.build-card.is-poor { opacity: .56; filter: grayscale(.4); }
.build-figure { position: relative; z-index: 1; height: 72px; display: flex; align-items: flex-end; justify-content: center; margin-bottom: 1px; }
.build-figure img { width: auto; height: 70px; filter: drop-shadow(0 4px 4px rgba(64, 42, 25, .15)); }
.build-name { font-size: 13px; font-weight: 900; line-height: 1.1; }
.build-role { margin-top: 2px; font-size: 9px; color: var(--ink-3); font-weight: 600; }
.build-price {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  margin-top: 4px;
  min-width: 47px;
  height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  background: #FFE9B9;
  color: #9E6018;
  border: 1px solid #E8C57E;
  font-size: 11px;
}
.build-price .mp-icon { width: 12px; height: 12px; color: #D58A12; }
.build-price em { font-style: normal; font-weight: 900; }
.build-card.is-poor .build-price { background: #F4DDD0; color: #A96754; border-color: #E4BFB0; }

.tower-sheet { padding-bottom: calc(16px + var(--safe-bottom)); }
.tower-head { display: flex; align-items: flex-start; gap: 10px; padding: 0 1px 10px; }
.tower-portrait {
  width: 62px;
  height: 74px;
  flex: 0 0 62px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  border-radius: 16px;
  background: linear-gradient(180deg, #FFF8EC, #FFE4C3);
  border: 1px solid #E3C29E;
  overflow: hidden;
}
.tower-portrait img { width: 58px; height: auto; }
.tower-title { min-width: 0; flex: 1 1 auto; display: flex; flex-direction: column; padding-top: 2px; }
.tower-level { align-self: flex-start; font-size: 9px; font-weight: 900; color: #A85E21; background: #FFE3B9; border: 1px solid #E9C47E; border-radius: 999px; padding: 3px 7px; line-height: 1; letter-spacing: .04em; }
.tower-title strong { margin-top: 4px; font-size: 19px; font-weight: 900; line-height: 1.1; }
.tower-title small { margin-top: 4px; color: var(--ink-2); font-size: 9.5px; line-height: 1.35; }
.tower-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 15px;
  background: rgba(246, 229, 207, .76);
  border: 1px solid #E9D0B4;
  margin: 0 0 10px;
  padding: 8px 4px;
}
.tower-stats div { display: flex; flex-direction: column; align-items: center; border-right: 1px solid rgba(205, 171, 137, .48); }
.tower-stats div:last-child { border-right: 0; }
.tower-stats small { color: var(--ink-3); font-size: 9px; font-weight: 700; letter-spacing: .06em; }
.tower-stats b { margin-top: 2px; font-size: 17px; font-weight: 900; color: #6A4429; }
.upgrade-btn {
  width: 100%;
  height: 49px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #FFF8EC;
  background: linear-gradient(180deg, #FFA14F, #F6752B);
  border: 1px solid #D95F23;
  border-bottom: 3px solid #B54A18;
  box-shadow: 0 4px 10px rgba(199, 82, 28, .25);
  font-size: 14px;
  font-weight: 900;
}
.upgrade-btn .mp-icon { width: 19px; height: 19px; }
.upgrade-btn em { display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 12px; background: rgba(69, 34, 14, .2); padding: 3px 7px; border-radius: 8px; }
.upgrade-btn em .mp-icon { width: 13px; height: 13px; }
.upgrade-btn:active { transform: translateY(2px) scale(.995); }
.upgrade-btn.is-max, .upgrade-btn:disabled {
  background: linear-gradient(180deg, #D5C3AF, #BEA890);
  border-color: #A88F77;
  border-bottom-color: #917960;
  box-shadow: none;
  color: #FFF8EC;
  opacity: .78;
}

/* ---------- result ---------- */
.result {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 26px;
  background: rgba(31, 24, 18, .58);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  opacity: 0;
}
.result.is-show { opacity: 1; }
.result-card {
  width: 100%;
  max-width: 328px;
  padding: 25px 22px 21px;
  text-align: center;
  border-radius: 30px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 213, 142, .55), transparent 42%),
    linear-gradient(180deg, #FFFDF7 0%, #FFF0D9 100%);
  border: 2px solid #F2CC97;
  box-shadow: 0 6px 0 rgba(120, 78, 42, .22), 0 28px 60px rgba(29, 20, 14, .4);
  transform: translateY(16px) scale(.9);
  opacity: 0;
  transition: transform .4s cubic-bezier(.18, 1.25, .34, 1), opacity .25s;
}
.result.is-show .result-card { transform: translateY(0) scale(1); opacity: 1; }
.result-emblem {
  width: 72px;
  height: 72px;
  margin: -58px auto 5px;
  border-radius: 26px;
  display: grid;
  place-items: center;
  color: #FFF7E7;
  background: linear-gradient(160deg, #FFAD5A, #F26D2A);
  border: 3px solid #FFF5E4;
  box-shadow: 0 8px 20px rgba(185, 72, 25, .35);
  transform: rotate(-4deg);
}
.result-emblem .mp-icon { width: 38px; height: 38px; }
.result-kicker { font-size: 11px; font-weight: 900; letter-spacing: .22em; color: var(--orange-deep); }
.result-card h2 { margin: 7px 0 0; font-size: 27px; font-weight: 900; letter-spacing: -.04em; color: #4B2B1C; }
.result-card p { margin: 8px auto 0; max-width: 240px; font-size: 11.5px; line-height: 1.6; color: var(--ink-2); }
.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 16px 0;
  padding: 10px 2px;
  background: rgba(255, 237, 211, .88);
  border: 1px solid #EDD2B1;
  border-radius: 17px;
}
.result-stats div { display: flex; flex-direction: column; border-right: 1px solid rgba(201, 166, 126, .4); }
.result-stats div:last-child { border-right: 0; }
.result-stats b { font-size: 20px; font-weight: 900; line-height: 1; color: #6E3A20; }
.result-stats small { margin-top: 4px; font-size: 9px; color: var(--ink-3); font-weight: 700; }
.replay-btn {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #FFF8EC;
  background: linear-gradient(180deg, #FFA24E, #F47227);
  border: 1px solid #D75D22;
  border-bottom: 3px solid #B64A17;
  box-shadow: 0 5px 12px rgba(192, 75, 24, .3);
  font-size: 15px;
  font-weight: 900;
}
.replay-btn .mp-icon { width: 21px; height: 21px; }
.replay-btn:active { transform: translateY(2px) scale(.99); }

.game.is-shaking { animation: boardShake .32s ease-in-out; }
.game.is-flashing::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background: radial-gradient(circle at 50% 22%, rgba(255, 78, 46, .32), transparent 50%);
  animation: redFlash .34s ease-out both;
}

@keyframes hudDrop { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes dockRise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
@keyframes fadeSlide { from { opacity: 0; transform: translate(-50%, -7px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes hintBob { 0%, 100% { margin-top: 0; } 50% { margin-top: -4px; } }
@keyframes dotPulse { 0% { box-shadow: 0 0 0 0 rgba(255, 173, 83, .55); } 70% { box-shadow: 0 0 0 7px rgba(255, 173, 83, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 173, 83, 0); } }
@keyframes busyPulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes boardShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes redFlash { from { opacity: 1; } to { opacity: 0; } }

@media (max-width: 350px) {
  .hud { left: 10px; right: 10px; gap: 5px; }
  .stat-pill { min-width: 72px; padding-right: 6px; gap: 5px; }
  .stat-orb { width: 28px; height: 28px; flex-basis: 28px; }
  .stat-text b { font-size: 16px; }
  .wave-pill { min-width: 82px; padding: 4px 6px; gap: 3px; }
  .wave-pill > .mp-icon { width: 18px; height: 18px; flex-basis: 18px; }
  .wave-pill b { font-size: 11px; }
  .dock { left: 10px; right: 10px; padding-left: 12px; }
  .launch-btn { flex-basis: 82px; }
  .dock-line strong { font-size: 16px; }
  .build-card { height: 136px; }
  .build-figure { height: 66px; }
  .build-figure img { height: 64px; }
}
@media (max-height: 700px) {
  .hint { top: calc(var(--safe-top) + 72px); padding-top: 7px; padding-bottom: 7px; }
  .dock { height: 72px; bottom: calc(var(--safe-bottom) + 8px); }
  .launch-btn { height: 50px; }
  .build-sheet { padding-top: 6px; }
  .build-card { height: 128px; }
  .build-figure { height: 60px; }
  .build-figure img { height: 58px; }
  .sheet-grip { margin-bottom: 4px; }
  .tower-sheet { padding-top: 6px; }
  .tower-portrait { height: 64px; }
  .result-card { padding-top: 21px; }
  .result-card h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
.result.is-lose .result-emblem { background: linear-gradient(160deg, #8f7a67, #5e4b3d); box-shadow: 0 8px 20px rgba(55, 39, 26, .34); }
.result.is-lose .result-kicker { color: #8b5a43; }
.result:not(.is-show) { pointer-events: none; }
