:root {
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: #17242c;
  background: #dfeae6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --ink: #17242c;
  --paper: #f7f9f7;
  --board: #16343c;
  --mint: #55c7ae;
  --coral: #ff665c;
  --gold: #f4c64e;
  --blue: #4385f5;
  --violet: #8c6bdc;
  --danger: #e94355;
  --success: #2ead72;
}

* {
  box-sizing: border-box;
  letter-spacing: 0;
}

html,
body,
#app {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  overscroll-behavior: none;
  background: #dfeae6;
}

button,
dialog {
  font: inherit;
}

button {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

button:focus-visible {
  outline: 3px solid #4385f5;
  outline-offset: 2px;
}

.page-shell {
  width: 100%;
  height: 100dvh;
  display: grid;
  place-items: center;
  position: relative;
  background-color: #dfeae6;
  background-image:
    linear-gradient(90deg, transparent 49%, rgb(23 36 44 / 4%) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgb(23 36 44 / 4%) 50%, transparent 51%);
  background-size: 32px 32px;
}

.battle-shell {
  width: min(100vw, 430px);
  height: min(100dvh, 900px);
  padding:
    max(6px, env(safe-area-inset-top))
    8px
    max(8px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-rows: 68px clamp(116px, 18dvh, 152px) minmax(0, 1fr) 84px;
  gap: 4px;
  overflow: hidden;
  background: var(--paper);
  border-inline: 1px solid rgb(23 36 44 / 12%);
  box-shadow: 0 18px 54px rgb(23 36 44 / 20%);
}

.top-hud {
  min-width: 0;
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 82px;
  align-items: start;
  gap: 8px;
}

.role-bind-entry {
  position: absolute;
  z-index: 4;
  left: 0;
  top: 47px;
  min-width: 44px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 5px;
  border: 1px solid rgb(143 62 55 / 26%);
  border-radius: 999px;
  background: #fff8ec;
  color: #81534d;
  box-shadow: 0 2px 7px rgb(74 38 32 / 10%);
  cursor: pointer;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.role-bind-entry:hover {
  border-color: rgb(143 62 55 / 52%);
  box-shadow: 0 3px 9px rgb(74 38 32 / 16%);
  transform: translateY(-1px);
}

.role-bind-entry:active {
  transform: translateY(0);
}

.role-bind-entry:focus-visible {
  outline: 3px solid #4385f5;
  outline-offset: 2px;
}

.role-bind-entry__mark {
  width: 13px;
  height: 13px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #8f3e37;
  color: #fff2c6;
  font-family: Georgia, "Songti SC", serif;
  font-size: 8px;
  line-height: 1;
}

.role-bind-entry.is-bound {
  border-color: rgb(46 173 114 / 38%);
  background: #eaf7f0;
  color: #247d5b;
}

.role-bind-entry.is-bound .role-bind-entry__mark {
  background: #2ead72;
  color: #ffffff;
}

.icon-button,
.power-button {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-grid;
  place-items: center;
  position: relative;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 6px;
  background: #ffffff;
  cursor: pointer;
  box-shadow: 0 2px 0 rgb(23 36 44 / 10%);
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.icon-button:hover,
.power-button:hover {
  background: #edf5f2;
  border-color: rgb(23 36 44 / 28%);
}

.icon-button:active,
.power-button:active {
  transform: translateY(1px);
}

.icon-button:disabled,
.power-button:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
}

.icon-button svg,
.power-button svg,
.command-button svg,
.timer-readout svg,
.phase-pill svg,
.team-energy svg,
.seat svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.2;
}

.score-readout {
  min-width: 0;
  height: 40px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px;
  border-bottom: 2px solid var(--gold);
}

.score-readout__label {
  font-size: 11px;
  font-weight: 700;
  color: #5d6c70;
  white-space: nowrap;
}

.score-readout strong {
  max-width: 128px;
  overflow: hidden;
  font-size: 22px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.timer-readout {
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 6px;
  background: #ffffff;
  font-variant-numeric: tabular-nums;
}

.timer-readout svg {
  width: 16px;
  height: 16px;
  color: var(--coral);
}

.timer-readout strong {
  width: 46px;
  font-size: 13px;
}

.connection-status {
  position: absolute;
  top: 44px;
  right: 0;
  max-width: 130px;
  padding: 3px 7px;
  border: 1px solid rgb(23 36 44 / 14%);
  border-radius: 4px;
  background: #e8efec;
  color: #5f7073;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.connection-status::before {
  content: "";
  width: 6px;
  height: 6px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 72%);
}

.sync-detail {
  position: absolute;
  top: 47px;
  left: 54px;
  max-width: calc(100% - 192px);
  overflow: hidden;
  color: #68777a;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.connection-status[data-tone="online"] {
  color: #247d5b;
  border-color: rgb(46 173 114 / 34%);
  background: #e7f4ee;
}

.connection-status[data-tone="warning"] {
  color: #9b5f00;
  border-color: rgb(215 167 35 / 42%);
  background: #fff5ce;
}

.boss-stage {
  min-height: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 8px 8px 2px 2px;
  background: #eef6f2;
  isolation: isolate;
}

.boss-stage::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  z-index: -1;
  background: #d5ebe3;
  border-top: 1px solid rgb(23 36 44 / 8%);
}

.boss-stage[data-phase="enraged"] {
  border-top: 4px solid var(--danger);
}

.boss-stage[data-phase="exposed"] {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 2px rgb(244 198 78 / 26%);
}

.teammate-chip {
  position: absolute;
  z-index: 5;
  top: 7px;
  left: 7px;
  width: 136px;
  height: 38px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: 1fr 5px;
  gap: 0 6px;
  padding: 3px 6px 3px 3px;
  border: 1px solid rgb(23 36 44 / 14%);
  border-radius: 6px;
  background: rgb(255 255 255 / 94%);
}

.teammate-avatar {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--mint);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  border: 2px solid var(--ink);
}

.teammate-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.teammate-copy strong,
.teammate-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.teammate-copy strong {
  max-width: 58px;
  font-size: 10px;
}

.teammate-copy span {
  min-width: 0;
  font-size: 9px;
  color: #5c6c70;
}

.teammate-meter {
  overflow: hidden;
  border-radius: 2px;
  background: #dbe3e0;
}

.teammate-meter span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--mint);
  transition: width 300ms ease;
}

.phase-pill {
  position: absolute;
  z-index: 5;
  top: 7px;
  right: 7px;
  width: 104px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 6px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.phase-pill svg {
  width: 15px;
  height: 15px;
}

.phase-pill[data-phase="shielded"] svg {
  color: var(--blue);
}

.phase-pill[data-phase="exposed"] {
  background: #fff5ce;
  border-color: #d7a723;
}

.phase-pill[data-phase="enraged"] {
  color: #ffffff;
  background: var(--danger);
  border-color: #b92135;
}

.assist-feed {
  position: absolute;
  z-index: 12;
  top: 44px;
  left: 50%;
  width: 154px;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--ink);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -4px);
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.assist-feed.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.assist-feed[data-tone="star"],
.assist-feed[data-tone="break"] {
  color: var(--ink);
  background: var(--gold);
}

.assist-feed[data-tone="team"],
.assist-feed[data-tone="reward"] {
  color: var(--ink);
  background: var(--mint);
}

.assist-feed[data-tone="warning"] {
  background: var(--danger);
}

.boss-image {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 12px;
  width: clamp(138px, 45%, 186px);
  height: auto;
  transform: translateX(-50%);
  transform-origin: 50% 70%;
  filter: drop-shadow(0 5px 3px rgb(23 36 44 / 20%));
  animation: boss-breathe 2.8s ease-in-out infinite;
  pointer-events: none;
}

.boss-stage[data-phase="enraged"] .boss-image {
  animation-duration: 1.5s;
  filter: drop-shadow(0 5px 3px rgb(23 36 44 / 22%)) saturate(1.18);
}

.boss-stage.is-hit .boss-image {
  animation: boss-hit 160ms linear;
}

.damage-float {
  position: absolute;
  z-index: 9;
  top: 42%;
  left: 64%;
  color: var(--danger);
  font-size: 16px;
  font-weight: 900;
  text-shadow: 0 1px 0 #ffffff;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.damage-float[data-source="teammate"] {
  color: var(--blue);
}

.damage-float[data-source="team"] {
  color: var(--violet);
}

.damage-float.is-visible {
  animation: damage-rise 420ms ease-out;
}

.anchor-row {
  position: absolute;
  z-index: 6;
  right: 9px;
  bottom: 24px;
  display: flex;
  gap: 4px;
}

.anchor {
  width: 12px;
  height: 15px;
  display: block;
  background: var(--mint);
  border: 2px solid var(--ink);
  clip-path: polygon(50% 0, 100% 36%, 78% 100%, 22% 100%, 0 36%);
}

.anchor.is-broken {
  background: #b9c2bf;
  opacity: 0.46;
  transform: rotate(22deg) scale(0.78);
}

.boss-health {
  position: absolute;
  z-index: 7;
  left: 8px;
  right: 8px;
  bottom: 5px;
  height: 14px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 3px;
  background: #cfd8d5;
}

.boss-health__fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--coral);
  transition: width 240ms ease;
}

.boss-health strong {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #ffffff;
  font-size: 9px;
  line-height: 10px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 1px var(--ink);
}

.game-frame {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  position: relative;
  border-inline: 1px solid rgb(23 36 44 / 16%);
  background: var(--board);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#game-container {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#game-container canvas {
  display: block !important;
  max-width: 100% !important;
  max-height: 100% !important;
  touch-action: none;
  cursor: crosshair;
}

#game-container canvas:active {
  cursor: grabbing;
}

.control-dock {
  min-width: 0;
  display: grid;
  grid-template-columns: 82px minmax(44px, 1fr) 48px 44px 44px 44px;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 2px 2px 8px 8px;
  background: #edf3f0;
}

.invite-activity-button {
  color: #a83f34;
  border-color: #deb0a8;
  background: #fff1ec;
}

.invite-activity-button.has-reward {
  border-color: #c84d3f;
  box-shadow: 0 0 0 3px rgb(200 77 63 / 16%);
}

.invite-reward-dot {
  width: 11px;
  height: 11px;
  position: absolute;
  top: -3px;
  right: -3px;
  border: 2px solid #fff8ec;
  border-radius: 50%;
  background: #df2b38;
}

.next-bubble-group {
  display: grid;
  grid-template-columns: 34px 44px;
  align-items: center;
  gap: 4px;
}

.bubble-preview {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  position: relative;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset -4px -5px 0 rgb(23 36 44 / 10%);
}

.bubble-preview::after {
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 1px var(--ink);
}

.bubble-preview--coral {
  background: var(--coral);
}

.bubble-preview--coral::after {
  content: "×";
}

.bubble-preview--gold {
  background: var(--gold);
}

.bubble-preview--gold::after {
  content: "•";
}

.bubble-preview--mint {
  background: var(--mint);
}

.bubble-preview--mint::after {
  content: "◆";
}

.bubble-preview--sky {
  background: var(--blue);
}

.bubble-preview--sky::after {
  content: "≈";
}

.bubble-preview--star {
  background: #fff9df;
  border-color: var(--gold);
}

.bubble-preview--star::after {
  content: "★";
  color: #b86d00;
  text-shadow: none;
}

.team-energy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.team-energy__topline {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.team-energy__topline svg {
  width: 14px;
  height: 14px;
  color: var(--violet);
}

.team-energy__track {
  height: 7px;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 2px;
  background: #ffffff;
}

.team-energy__track span {
  width: 0;
  height: 100%;
  display: block;
  background: var(--violet);
  transition: width 240ms ease;
}

.power-button {
  width: 48px;
  height: 48px;
  color: #925c00;
  border-color: #d7aa2b;
  background: #fff6cf;
}

.power-button.is-armed {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--gold);
  box-shadow: 0 0 0 3px rgb(244 198 78 / 35%);
  animation: star-ready 800ms ease-in-out infinite alternate;
}

.count-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding-inline: 4px;
  border: 2px solid var(--paper);
  border-radius: 9px;
  background: var(--coral);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.desktop-note {
  position: absolute;
  left: 24px;
  bottom: 18px;
  margin: 0;
  color: #566a6d;
  font-size: 11px;
}

@media (max-width: 700px) {
  .desktop-note {
    display: none;
  }
}

.sheet-dialog {
  width: min(calc(100vw - 24px), 410px);
  max-width: none;
  max-height: min(86dvh, 720px);
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
}

.sheet-dialog::backdrop {
  background: rgb(15 31 37 / 68%);
}

.dialog-surface {
  max-height: min(86dvh, 720px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgb(23 36 44 / 18%);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: 0 20px 64px rgb(5 19 24 / 30%);
}

.compact-dialog {
  max-width: 340px;
  margin-inline: auto;
}

.dialog-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.dialog-heading h2,
.result-surface h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.eyebrow,
.result-kicker {
  color: #657477;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.icon-button.is-quiet {
  flex: 0 0 auto;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.command-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid rgb(23 36 44 / 20%);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.command-button.is-primary {
  color: #ffffff;
  border-color: var(--ink);
  background: var(--ink);
}

.role-bind-dialog {
  width: min(calc(100vw - 24px), 400px);
}

.role-bind-surface {
  position: relative;
  padding: 18px;
  overflow: hidden auto;
  background:
    radial-gradient(circle at 92% 4%, rgb(244 198 78 / 18%), transparent 28%),
    linear-gradient(180deg, #fffaf0 0%, #f8f5ee 100%);
}

.role-bind-surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #8f3e37, #e0a84e 52%, #3c9479);
}

.role-bind-heading {
  margin-bottom: 12px;
}

.role-bind-banner {
  min-height: 66px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 15px;
  padding: 10px 12px;
  border: 1px solid rgb(143 62 55 / 16%);
  border-radius: 13px;
  background:
    linear-gradient(105deg, rgb(143 62 55 / 8%), rgb(244 198 78 / 16%)),
    #fffdf7;
}

.role-bind-seal {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #f4d58d;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, #55c7ae, #23775f 76%);
  color: #fff4c9;
  box-shadow: inset 0 0 0 2px rgb(9 82 63 / 28%), 0 4px 12px rgb(35 119 95 / 18%);
  font-family: Georgia, "Songti SC", serif;
  font-size: 20px;
  font-weight: 800;
}

.role-bind-banner div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.role-bind-banner strong {
  color: #71382f;
  font-family: Georgia, "Songti SC", serif;
  font-size: 15px;
}

.role-bind-banner small {
  color: #6d7471;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.45;
}

.role-bind-form {
  display: grid;
  gap: 12px;
}

.role-field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.role-field > span {
  color: #5e5550;
  font-size: 11px;
  font-weight: 850;
}

.role-field input {
  width: 100%;
  min-width: 0;
  height: 46px;
  padding: 0 12px;
  border: 1px solid rgb(61 71 72 / 22%);
  border-radius: 11px;
  outline: 0;
  background: rgb(255 255 255 / 88%);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.role-field input::placeholder {
  color: #999d9a;
  font-weight: 550;
}

.role-field input:focus {
  border-color: #3c9479;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgb(60 148 121 / 14%);
}

.role-code-row {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  align-items: end;
  gap: 8px;
}

.role-code-button {
  height: 46px;
  padding-inline: 9px;
  color: #7b443b;
  border-color: rgb(143 62 55 / 26%);
  background: #fff5dc;
  white-space: nowrap;
}

.role-bind-submit {
  width: 100%;
  min-height: 48px;
  margin-top: 1px;
  letter-spacing: 0.04em;
}

.role-captcha {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgb(219 156 54 / 28%);
  border-radius: 12px;
  background: #fff7dc;
}

.role-captcha__copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.role-captcha__copy strong {
  color: #74462d;
  font-size: 12px;
}

.role-captcha__copy span {
  color: #8d745b;
  font-size: 10px;
}

.role-captcha__track {
  position: relative;
  height: 30px;
  display: flex;
  align-items: center;
}

.role-captcha__track::before {
  content: "";
  position: absolute;
  right: 5px;
  left: 5px;
  height: 8px;
  border-radius: 999px;
  background: #ded9c8;
  box-shadow: inset 0 1px 3px rgb(77 55 27 / 15%);
}

.role-captcha__target {
  position: absolute;
  z-index: 1;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid #9c493d;
  border-radius: 50%;
  background: #fff8ec;
  box-shadow: 0 0 0 4px rgb(156 73 61 / 10%);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.role-captcha input[type="range"] {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 30px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: grab;
}

.role-captcha input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #55c7ae var(--slider-progress), transparent var(--slider-progress));
}

.role-captcha input[type="range"]::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  margin-top: -9px;
  appearance: none;
  border: 2px solid #f3d078;
  border-radius: 50%;
  background: #257a60;
  box-shadow: 0 3px 8px rgb(25 86 66 / 26%);
}

.role-captcha input[type="range"]::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: #ded9c8;
}

.role-captcha input[type="range"]::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: #55c7ae;
}

.role-captcha input[type="range"]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid #f3d078;
  border-radius: 50%;
  background: #257a60;
  box-shadow: 0 3px 8px rgb(25 86 66 / 26%);
}

.role-bound-panel {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 18px 14px 14px;
  border: 1px solid rgb(46 173 114 / 24%);
  border-radius: 14px;
  background: #edf8f2;
  color: #397260;
  font-size: 11px;
  font-weight: 750;
}

.role-bound-panel__check {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #2ead72;
  color: #ffffff;
  box-shadow: 0 0 0 6px rgb(46 173 114 / 12%);
  font-size: 23px;
  font-weight: 900;
}

.role-bound-panel strong {
  max-width: 100%;
  overflow: hidden;
  color: #1d604b;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-bound-panel .command-button {
  width: 100%;
  margin-top: 3px;
  background: rgb(255 255 255 / 75%);
}

.role-bind-status {
  min-height: 18px;
  margin: 12px 0 0;
  color: #65716f;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
  text-align: center;
}

.role-bind-status[data-tone="pending"] {
  color: #7d5b1e;
}

.role-bind-status[data-tone="success"] {
  color: #247d5b;
}

.role-bind-status[data-tone="warning"] {
  color: #9b5f00;
}

.role-bind-status[data-tone="error"] {
  color: #b92135;
}

.role-bind-note {
  margin: 3px 0 0;
  color: #909794;
  font-size: 9px;
  text-align: center;
}

.team-ready-dialog {
  width: min(calc(100vw - 32px), 360px);
}

.team-ready-surface {
  position: relative;
  padding: 22px 18px 18px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(circle at 50% -8%, rgb(244 198 78 / 32%), transparent 37%),
    linear-gradient(180deg, #fffaf0, #f6f4ed);
}

.team-ready-surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, #3c9479, #f4c64e 50%, #8f3e37);
}

.team-ready-kicker {
  color: #8f3e37;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.team-ready-surface h2 {
  margin: 5px 0 7px;
  color: #5f342e;
  font-family: Georgia, "Songti SC", serif;
  font-size: 21px;
}

.team-ready-copy {
  max-width: 280px;
  margin: 0 auto 16px;
  color: #727875;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.55;
}

.team-ready-members {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: center;
  gap: 5px;
  margin-bottom: 14px;
}

.team-ready-member {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px 7px 10px;
  border: 1px solid rgb(72 81 80 / 15%);
  border-radius: 13px;
  background: rgb(255 255 255 / 70%);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.team-ready-member > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.team-ready-member strong {
  max-width: 112px;
  overflow: hidden;
  color: #414e4d;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-ready-member small {
  color: #929795;
  font-size: 9px;
  font-weight: 800;
}

.team-ready-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 2px solid #e9d7a7;
  border-radius: 50%;
  background: #efe9d8;
  color: #77584a;
  box-shadow: inset 0 0 0 2px rgb(255 255 255 / 66%);
  font-size: 15px;
  font-weight: 900;
}

.team-ready-member.is-ready {
  border-color: rgb(46 173 114 / 34%);
  background: #edf8f2;
  box-shadow: 0 5px 14px rgb(46 173 114 / 10%);
}

.team-ready-member.is-ready .team-ready-avatar {
  border-color: #8ed7b5;
  background: #2ead72;
  color: #ffffff;
}

.team-ready-member.is-ready small {
  color: #247d5b;
}

.team-ready-link {
  color: #c99b45;
  font-family: Georgia, serif;
  font-size: 20px;
  font-weight: 900;
}

.team-ready-button {
  width: 100%;
  min-height: 48px;
  background: linear-gradient(180deg, #a54b40, #84362f) !important;
  border-color: #743029 !important;
}

.team-ready-button:disabled {
  background: #7b8d86 !important;
  border-color: #697b74 !important;
}

.team-ready-status {
  min-height: 17px;
  margin: 9px 0 0;
  color: #67736f;
  font-size: 10px;
  font-weight: 750;
}

.command-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.share-dialog-surface > .command-button {
  width: 100%;
  margin-top: 8px;
}

.share-feedback {
  min-height: 18px;
  margin: 8px 0 0;
  color: #607074;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.share-feedback[data-tone="reward"] {
  color: #247d5b;
}

.share-feedback[data-tone="warning"] {
  color: #b92135;
}

.share-feedback:not(.is-visible) {
  visibility: hidden;
}

.room-meta {
  min-height: 18px;
  margin-top: 8px;
  color: #607074;
  font-size: 10px;
  line-height: 18px;
  text-align: center;
}

.room-state {
  min-height: 94px;
  display: grid;
  grid-template-columns: 108px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-block: 1px solid rgb(23 36 44 / 12%);
}

.room-state img {
  width: 108px;
  height: 82px;
  object-fit: contain;
}

.room-state div {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.room-state strong {
  font-size: 14px;
}

.room-state span {
  color: #607074;
  font-size: 11px;
  line-height: 1.45;
}

.seat-row {
  display: grid;
  grid-template-columns: 1fr 30px 1fr;
  align-items: center;
  margin: 12px 0;
}

.seat {
  height: 62px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgb(23 36 44 / 16%);
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
}

.seat-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.seat-copy strong,
.seat-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-copy small {
  color: #677679;
  font-size: 9px;
  font-weight: 700;
}

.room-progress {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 10px 0 4px;
  overflow: hidden;
  border: 1px solid rgb(23 36 44 / 14%);
  border-radius: 5px;
  background: rgb(23 36 44 / 10%);
}

.room-progress span {
  min-width: 0;
  padding: 7px 4px;
  background: #edf2f0;
  color: #718083;
  font-size: 9px;
  font-weight: 900;
  text-align: center;
}

.room-progress span.is-active {
  background: #dff3eb;
  color: #247d5b;
}

.seat.is-empty {
  color: #677679;
  border-style: dashed;
  background: #edf2f0;
}

.seat-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--coral);
  color: #ffffff;
  font-weight: 900;
}

.seat.is-empty .seat-avatar {
  color: var(--ink);
  background: #ffffff;
}

.seat > svg {
  width: 15px;
  color: var(--success);
}

.seat-link {
  display: grid;
  place-items: center;
  color: #718083;
}

.seat-link svg {
  width: 17px;
}

.demo-action {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 6px 8px 6px 10px;
  border-left: 4px solid var(--gold);
  background: #fff7d8;
}

.demo-action > span {
  color: #7a5b08;
  font-size: 11px;
  font-weight: 900;
}

.demo-action button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #c99a1d;
  border-radius: 5px;
  background: #ffffff;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.demo-action button svg {
  width: 15px;
}

.segmented-control {
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 8px;
  border: 1px solid rgb(23 36 44 / 18%);
  border-radius: 6px;
  background: #e8efec;
  padding: 2px;
}

.segmented-control button {
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.segmented-control button.is-active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgb(23 36 44 / 14%);
}

.rank-list {
  display: grid;
}

.rank-row,
.self-rank {
  min-width: 0;
  height: 64px;
  display: grid;
  grid-template-columns: 28px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgb(23 36 44 / 10%);
}

.rank-number {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.rank-row:nth-child(1) .rank-number {
  color: #b57b00;
}

.rank-row:nth-child(2) .rank-number {
  color: #66777c;
}

.rank-row:nth-child(3) .rank-number {
  color: #a9653c;
}

.rank-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
  font-size: 11px;
  font-weight: 900;
}

.rank-name,
.self-rank > span:nth-child(3) {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.rank-name strong,
.rank-name small,
.self-rank strong,
.self-rank small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.rank-name strong,
.self-rank strong {
  font-size: 12px;
}

.rank-name small,
.self-rank small {
  color: #6b797c;
  font-size: 10px;
}

.rank-value {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.rank-value span {
  color: #bd7e00;
}

.self-rank {
  position: sticky;
  bottom: -18px;
  margin: 8px -18px -18px;
  padding: 0 18px;
  border-top: 2px solid var(--mint);
  border-bottom: 0;
  background: #e7f4ee;
}

.result-surface {
  text-align: center;
}

.result-kicker {
  display: block;
  color: var(--success);
}

.result-score {
  display: block;
  margin-top: 18px;
  font-size: 38px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.result-score-label {
  display: block;
  margin-top: 4px;
  color: #69777a;
  font-size: 11px;
}

.result-verification {
  min-height: 18px;
  margin: 8px 0 0;
  color: #607074;
  font-size: 10px;
  line-height: 18px;
}

.result-verification[data-tone="verified"] {
  color: #247d5b;
}

.result-verification[data-tone="warning"] {
  color: #b92135;
}

.result-verification[data-tone="pending"] {
  color: #9b5f00;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 20px 0;
  border-block: 1px solid rgb(23 36 44 / 12%);
}

.result-stats div {
  min-width: 0;
  display: grid;
  gap: 4px;
  padding: 12px 4px;
}

.result-stats div + div {
  border-left: 1px solid rgb(23 36 44 / 10%);
}

.result-stats span {
  color: #687679;
  font-size: 10px;
}

.result-stats strong {
  overflow: hidden;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.result-surface > .command-button {
  width: 100%;
  margin-top: 8px;
}

@keyframes boss-breathe {
  0%,
  100% {
    transform: translateX(-50%) translateY(0) scale(1);
  }
  50% {
    transform: translateX(-50%) translateY(-2px) scale(1.012);
  }
}

@keyframes boss-hit {
  0%,
  100% {
    transform: translateX(-50%);
    filter: brightness(1);
  }
  40% {
    transform: translateX(calc(-50% - 2px));
    filter: brightness(1.9);
  }
  70% {
    transform: translateX(calc(-50% + 2px));
  }
}

@keyframes damage-rise {
  from {
    opacity: 1;
    transform: translateY(8px) scale(0.9);
  }
  to {
    opacity: 0;
    transform: translateY(-18px) scale(1.08);
  }
}

@keyframes star-ready {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.04);
  }
}

@media (max-width: 380px), (max-height: 759px) {
  .battle-shell {
    grid-template-rows: 68px 112px minmax(0, 1fr) 88px;
    gap: 3px;
  }

  .top-hud {
    grid-template-columns: 44px minmax(0, 1fr) 78px;
    gap: 5px;
  }

  .top-hud .icon-button {
    width: 44px;
    height: 44px;
  }

  .score-readout__label,
  .teammate-copy strong {
    display: none;
  }

  .score-readout strong {
    font-size: 20px;
  }

  .boss-image {
    width: 132px;
  }

  .teammate-chip {
    width: 108px;
  }

  .teammate-copy span {
    font-size: 9px;
  }

  .phase-pill {
    width: 94px;
    font-size: 10px;
  }

  .control-dock {
    grid-template-columns: 72px minmax(32px, 1fr) 40px 40px 40px 40px;
    gap: 4px;
    padding: 4px;
  }

  .next-bubble-group {
    grid-template-columns: 29px 40px;
    gap: 3px;
  }

  .control-dock .icon-button {
    width: 40px;
    height: 40px;
  }

  .power-button {
    width: 40px;
    height: 40px;
  }

  .team-energy__topline {
    font-size: 10px;
  }

  .desktop-note {
    display: none;
  }
}

@media (max-width: 330px) {
  .battle-shell {
    padding-inline: 5px;
  }

  .control-dock {
    grid-template-columns: 72px minmax(28px, 1fr) 40px 40px 40px 40px;
    gap: 4px;
  }

  .control-dock .icon-button {
    width: 40px;
    height: 40px;
  }

  .next-bubble-group {
    grid-template-columns: 29px 40px;
    gap: 3px;
  }

  .bubble-preview {
    width: 29px;
    height: 29px;
  }

  .power-button {
    width: 40px;
    height: 40px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .page-shell {
    place-items: start center;
    overflow: auto;
  }

  .battle-shell {
    min-height: 620px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* Mid-Autumn activity polish: stronger hierarchy, touch feedback and a
   moonlit stage keep the existing game layout readable while giving the demo
   a distinct event identity. */
:root {
  --paper: #fffdf8;
  --board: #102b3a;
  --ink: #17242c;
  --moon-ink: #f8efe0;
  --moon-red: #c94e3f;
  --moon-green: #3f927b;
}

body {
  background: #102b3a;
}

.page-shell {
  background-color: #102b3a;
  background-image:
    radial-gradient(circle at 14% 16%, rgb(244 198 78 / 72%) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 12%, rgb(255 255 255 / 60%) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 78%, rgb(85 199 174 / 46%) 0 1px, transparent 2px),
    linear-gradient(155deg, #183c4b 0%, #102b3a 54%, #241d2d 100%);
  background-size: 110px 130px, 160px 180px, 210px 230px, auto;
}

.battle-shell {
  width: min(100vw, 448px);
  border-radius: 18px;
  border: 1px solid rgb(255 255 255 / 68%);
  box-shadow: 0 24px 72px rgb(4 17 25 / 42%), 0 0 0 1px rgb(244 198 78 / 12%);
  grid-template-rows: 72px clamp(154px, 22dvh, 188px) minmax(0, 1fr) 88px;
}

.top-hud {
  padding-inline: 2px;
}

.score-readout {
  height: 44px;
  border-bottom-color: var(--moon-red);
}

.score-readout strong {
  color: #9a3f36;
  font-size: 25px;
}

.timer-readout {
  border-radius: 10px;
  background: #fff8ec;
  border-color: rgb(201 78 63 / 28%);
  box-shadow: 0 3px 0 rgb(201 78 63 / 10%);
}

.boss-stage {
  border: 0;
  border-radius: 14px;
  background: #173d4b;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%), inset 0 -42px 0 rgb(6 23 32 / 20%);
}

.boss-stage::before {
  height: 42%;
  border: 0;
  background: #123343;
}

.boss-stage::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 26px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #f8e2ae;
  box-shadow: 0 0 0 10px rgb(248 226 174 / 8%), 0 0 34px rgb(248 226 174 / 22%);
  opacity: .9;
}

.boss-stage[data-phase="exposed"] {
  border-color: transparent;
  box-shadow: inset 0 0 0 2px rgb(244 198 78 / 62%), inset 0 -42px 0 rgb(6 23 32 / 20%), 0 0 22px rgb(244 198 78 / 20%);
}

.boss-stage[data-phase="enraged"] {
  border-top: 0;
  box-shadow: inset 0 0 0 2px rgb(233 67 85 / 72%), inset 0 -42px 0 rgb(6 23 32 / 20%), 0 0 24px rgb(233 67 85 / 24%);
}

.boss-image {
  width: clamp(148px, 45%, 180px);
  bottom: 13px;
  filter: drop-shadow(0 12px 8px rgb(3 17 24 / 34%));
}

.teammate-chip {
  top: 10px;
  left: 10px;
  width: 154px;
  height: 42px;
  padding: 4px 8px 4px 4px;
  border: 1px solid rgb(255 255 255 / 20%);
  border-radius: 12px;
  background: rgb(7 28 38 / 66%);
  color: var(--moon-ink);
  box-shadow: 0 8px 18px rgb(3 17 24 / 18%);
  backdrop-filter: blur(8px);
}

.teammate-avatar {
  border-color: #f8e2ae;
  background: var(--moon-green);
  color: #ffffff;
}

.teammate-copy span {
  color: rgb(248 239 224 / 72%);
}

.teammate-meter {
  background: rgb(255 255 255 / 20%);
}

.teammate-meter span {
  background: #7bd2ae;
}

.phase-pill {
  top: 10px;
  right: 10px;
  width: 116px;
  height: 32px;
  border: 1px solid rgb(255 255 255 / 24%);
  border-radius: 999px;
  background: rgb(7 28 38 / 66%);
  color: var(--moon-ink);
  box-shadow: 0 8px 18px rgb(3 17 24 / 16%);
  backdrop-filter: blur(8px);
}

.phase-pill[data-phase="exposed"] {
  color: #3a2b0d;
  background: #f8e2ae;
  border-color: #f8e2ae;
}

.phase-pill[data-phase="enraged"] {
  color: #ffffff;
  background: #b63c4a;
  border-color: #ef8c7d;
}

.boss-health {
  left: 12px;
  right: 12px;
  bottom: 8px;
  height: 16px;
  border: 2px solid #071e2a;
  border-radius: 999px;
  background: rgb(255 255 255 / 18%);
}

.boss-health__fill {
  background: linear-gradient(90deg, #e66a54, #f0b34e);
}

.boss-health strong {
  font-size: 10px;
}

.game-frame {
  margin-top: 4px;
  border: 0;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 12%), 0 8px 18px rgb(5 22 30 / 16%);
}

.game-frame::after {
  content: "拖动瞄准 · 松开发射";
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 10px;
  padding: 4px 9px;
  border: 1px solid rgb(255 255 255 / 14%);
  border-radius: 999px;
  background: rgb(7 28 38 / 54%);
  color: rgb(248 239 224 / 72%);
  font-size: 10px;
  font-weight: 700;
  transform: translateX(-50%);
  pointer-events: none;
}

.control-dock {
  margin-top: 4px;
  padding: 8px;
  border: 1px solid rgb(23 36 44 / 10%);
  border-radius: 14px;
  background: #fff8ec;
  box-shadow: 0 8px 20px rgb(23 36 44 / 10%);
}

.icon-button,
.power-button {
  border-radius: 12px;
  transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.icon-button:hover,
.power-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgb(23 36 44 / 14%);
}

.power-button {
  border-radius: 50%;
  background: #fff0c0;
}

.power-button.is-armed {
  box-shadow: 0 0 0 4px rgb(244 198 78 / 28%), 0 8px 18px rgb(185 111 0 / 22%);
}

.team-energy__track {
  height: 9px;
  border-radius: 999px;
}

.team-energy__track span {
  background: linear-gradient(90deg, #8c6bdc, #c38bf0);
}

.sheet-dialog::backdrop {
  background: rgb(5 19 28 / 76%);
  backdrop-filter: blur(3px);
}

.dialog-surface {
  border-radius: 16px;
  border-color: rgb(23 36 44 / 12%);
  box-shadow: 0 24px 72px rgb(5 19 24 / 36%);
}

.command-button {
  border-radius: 11px;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.command-button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgb(23 36 44 / 12%);
}

.command-button.is-primary {
  background: #8f3e37;
  border-color: #8f3e37;
}

.room-state {
  border-block-color: rgb(143 62 55 / 18%);
  background: #fff8ec;
  border-radius: 12px;
}

@media (max-width: 359px), (max-height: 759px) {
  .battle-shell {
    grid-template-rows: 68px 132px minmax(0, 1fr) 88px;
  }

  .boss-image {
    width: 150px;
  }

  .teammate-chip {
    width: 128px;
  }

  .phase-pill {
    width: 100px;
  }
}

body.bubble-opening-active {
  overscroll-behavior: none;
  overflow: hidden;
}

.bubble-opening {
  --opening-loading-height: max(104px, calc(88px + env(safe-area-inset-bottom)));
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100%;
  height: 100dvh;
  color: #fff8e8;
  background: radial-gradient(circle at 50% 30%, #173849, #07171f 72%);
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.bubble-opening::before,
.bubble-opening::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition: opacity 380ms ease;
}

.bubble-opening::before {
  z-index: 0;
  inset: -14%;
  background: radial-gradient(
    ellipse at 50% 16%,
    rgb(255 248 204 / 50%) 0 4%,
    rgb(255 215 112 / 22%) 14%,
    rgb(93 221 202 / 9%) 30%,
    transparent 54%
  );
  filter: blur(2px);
  mix-blend-mode: screen;
  transform-origin: 50% 16%;
  animation: opening-moon-aura 4.8s ease-in-out infinite;
}

.bubble-opening::after {
  z-index: 1;
  inset: -8% 0 0;
  background:
    radial-gradient(circle at 12% 19%, #fff7c8 0 1px, transparent 2px),
    radial-gradient(circle at 22% 31%, #bffff0 0 1px, transparent 2.2px),
    radial-gradient(circle at 84% 16%, #fff1a9 0 1.2px, transparent 2.4px),
    radial-gradient(circle at 72% 35%, #ffffff 0 1px, transparent 2px),
    radial-gradient(circle at 91% 49%, #b8f5e7 0 1px, transparent 2.1px),
    radial-gradient(circle at 8% 58%, #ffe499 0 1px, transparent 2.2px),
    radial-gradient(circle at 31% 51%, #ffffff 0 0.8px, transparent 1.8px),
    radial-gradient(circle at 67% 58%, #ffe7a5 0 1px, transparent 2.1px),
    radial-gradient(circle at 18% 73%, #aaf2df 0 0.9px, transparent 2px),
    radial-gradient(circle at 82% 72%, #fff7d0 0 1.1px, transparent 2.2px);
  filter: drop-shadow(0 0 5px rgb(255 224 132 / 88%));
  opacity: 0.78;
  mix-blend-mode: screen;
  animation: opening-stardust 7.5s ease-in-out infinite alternate;
}

.bubble-opening.is-video-active::before,
.bubble-opening.is-video-active::after {
  opacity: 0;
}

.bubble-opening.is-leaving {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.bubble-opening__media {
  position: absolute;
  z-index: -3;
  inset: 0 0 var(--opening-loading-height);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #071820;
}

.bubble-opening__cover,
.bubble-opening__video,
.bubble-opening__end {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  pointer-events: none;
}

.bubble-opening__cover {
  z-index: 0;
  opacity: 1;
  filter: saturate(1.08) contrast(1.03);
  transition: opacity 420ms ease, transform 5.8s ease;
}

.bubble-opening__video {
  z-index: 1;
  opacity: 0;
  background: #071c24;
  transition: opacity 420ms ease;
}

.bubble-opening__end {
  z-index: 2;
  opacity: 0;
  background: #071c24;
  transition: opacity 360ms ease;
}

.bubble-opening.is-opening .bubble-opening__cover {
  transform: scale(1.025);
}

.bubble-opening.is-video-active .bubble-opening__cover {
  opacity: 0;
}

.bubble-opening.is-video-active .bubble-opening__video {
  opacity: 1;
}

.bubble-opening.is-media-ended .bubble-opening__cover,
.bubble-opening.is-media-ended .bubble-opening__video {
  opacity: 0;
}

.bubble-opening.is-media-ended .bubble-opening__end {
  opacity: 1;
}

.bubble-opening__shade {
  position: absolute;
  z-index: -1;
  inset: 0 0 var(--opening-loading-height);
  background:
    linear-gradient(180deg, rgb(3 16 24 / 5%) 0%, rgb(3 16 24 / 6%) 46%, rgb(3 16 24 / 76%) 72%, rgb(3 16 24 / 96%) 100%),
    radial-gradient(circle at 50% 45%, transparent 0 32%, rgb(3 15 22 / 20%) 72%);
  transition: background-color 420ms ease, opacity 420ms ease;
}

.bubble-opening__shade::before,
.bubble-opening__shade::after {
  content: "";
  position: absolute;
  pointer-events: none;
  mix-blend-mode: screen;
}

.bubble-opening__shade::before {
  inset: -24% -45% 20%;
  background: conic-gradient(
    from 202deg at 50% 0%,
    transparent 0 31%,
    rgb(255 244 191 / 0%) 35%,
    rgb(255 238 169 / 19%) 39%,
    transparent 44% 51%,
    rgb(117 234 214 / 13%) 55%,
    transparent 60% 100%
  );
  filter: blur(9px);
  opacity: 0.64;
  transform-origin: 50% 0;
  animation: opening-light-rays 9s ease-in-out infinite alternate;
}

.bubble-opening__shade::after {
  top: 6%;
  left: 50%;
  width: min(72vw, 310px);
  aspect-ratio: 1;
  border: 1px solid rgb(255 236 167 / 35%);
  border-radius: 50%;
  box-shadow:
    0 0 24px rgb(255 226 130 / 24%),
    0 0 74px rgb(86 214 194 / 13%),
    inset 0 0 34px rgb(255 244 195 / 11%);
  opacity: 0.72;
  transform: translateX(-50%) scale(0.92);
  animation: opening-moon-ring 4.8s ease-in-out infinite;
}

.bubble-opening.is-video-active .bubble-opening__shade,
.bubble-opening.is-media-ended .bubble-opening__shade {
  opacity: 0.1;
}

.bubble-opening__content {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(var(--opening-loading-height) + 28px);
  width: min(calc(100% - 42px), 390px);
  text-align: center;
  transform: translateX(-50%);
  transition: opacity 300ms ease, transform 360ms ease;
}

.bubble-opening.is-opening .bubble-opening__content,
.bubble-opening.is-video-active .bubble-opening__content,
.bubble-opening.is-media-ended .bubble-opening__content,
.bubble-opening.is-direct .bubble-opening__content {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 12px);
}

.bubble-opening__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 12px;
  color: #ffedb6;
  background: rgb(7 33 41 / 74%);
  border: 1px solid rgb(255 219 125 / 45%);
  border-radius: 999px;
  box-shadow: 0 5px 20px rgb(0 0 0 / 24%);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  animation: opening-kicker-glow 3.2s ease-in-out infinite;
}

.bubble-opening__content h1 {
  margin: 10px 0 5px;
  color: #fff8df;
  background: linear-gradient(105deg, #fff8df 0%, #ffe394 27%, #ffffff 48%, #ffe394 68%, #fff8df 100%);
  background-size: 230% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: clamp(31px, 9vw, 44px);
  line-height: 1;
  letter-spacing: 0.06em;
  filter: drop-shadow(0 3px 8px rgb(0 0 0 / 62%)) drop-shadow(0 0 13px rgb(255 213 99 / 42%));
  animation: opening-title-shimmer 4.2s ease-in-out infinite;
}

.bubble-opening__content p {
  max-width: 330px;
  margin: 0 auto 15px;
  color: rgb(255 248 226 / 90%);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.55;
  text-shadow: 0 2px 8px rgb(0 0 0 / 66%);
}

.bubble-opening__command {
  --command-glow-rgb: 237 180 57;
  position: relative;
  z-index: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 188px;
  min-height: 48px;
  padding: 8px 24px 8px 13px;
  color: #3c2512;
  background: linear-gradient(180deg, #fff0a8 0%, #e9b63e 54%, #bd7425 100%);
  border: 1px solid #ffefad;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 8px 26px rgb(0 0 0 / 38%), inset 0 1px rgb(255 255 255 / 72%), 0 0 0 5px rgb(237 180 57 / 14%);
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-shadow: 0 1px rgb(255 255 255 / 45%);
  transition: transform 150ms ease, filter 150ms ease, box-shadow 150ms ease;
  scale: 0.985;
  will-change: scale, filter, box-shadow;
  animation: opening-command-breathe 2.6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

.bubble-opening__command::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -80%;
  bottom: -80%;
  left: -46%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 76%), transparent);
  filter: blur(1px);
  transform: rotate(18deg) translateX(-260%);
  animation: opening-command-sweep 2.8s ease-in-out infinite;
}

.bubble-opening__command:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.bubble-opening__command:active {
  transform: translateY(1px) scale(0.985);
}

.bubble-opening__command:focus-visible,
.bubble-opening__skip:focus-visible,
.bubble-opening__sound:focus-visible,
.bubble-opening__enter:focus-visible {
  outline: 3px solid #55c7ae;
  outline-offset: 3px;
}

.bubble-opening__command:disabled {
  cursor: wait;
  filter: saturate(0.72);
  animation: none;
}

.bubble-opening__command-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff8d1;
  background: radial-gradient(circle at 35% 30%, #67d6b3, #197857 72%);
  border: 2px solid #ffe993;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgb(5 66 50 / 28%), 0 2px 6px rgb(0 0 0 / 25%);
  font-family: Georgia, "Songti SC", serif;
  font-size: 16px;
  line-height: 1;
  animation: opening-command-mark 2.4s ease-in-out infinite;
}

.bubble-opening__skip,
.bubble-opening__sound {
  position: absolute;
  z-index: 10;
  top: max(12px, env(safe-area-inset-top));
  min-height: 34px;
  padding: 0 13px;
  color: #fff1c8;
  background: rgb(7 28 37 / 70%);
  border: 1px solid rgb(255 236 185 / 58%);
  border-radius: 999px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: opacity 220ms ease, background-color 140ms ease;
}

.bubble-opening__skip {
  right: max(12px, env(safe-area-inset-right));
}

.bubble-opening__sound {
  left: max(12px, env(safe-area-inset-left));
}

.bubble-opening__sound[hidden] {
  display: none;
}

.bubble-opening__skip:hover,
.bubble-opening__sound:hover {
  background: rgb(7 28 37 / 88%);
}

.bubble-opening__skip:disabled {
  cursor: wait;
  opacity: 0.45;
}

.bubble-opening__progress {
  grid-column: 1;
  height: 6px;
  overflow: hidden;
  background: rgb(255 255 255 / 15%);
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 999px;
}

.bubble-opening__progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #55c7ae, #ffe284);
  box-shadow: 0 0 8px #ffe284;
  border-radius: inherit;
  transition: width 160ms ease-out;
}

.bubble-opening__loading {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  gap: 9px 14px;
  min-height: var(--opening-loading-height);
  padding: 15px max(18px, env(safe-area-inset-right)) max(15px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgb(7 25 34 / 94%), #07171f 42%);
  border-top: 1px solid rgb(255 230 161 / 16%);
  box-shadow: 0 -14px 40px rgb(0 0 0 / 28%);
}

.bubble-opening__loading-copy {
  grid-column: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  color: rgb(255 244 211 / 82%);
  font-size: 12px;
  font-weight: 700;
}

.bubble-opening__loading-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bubble-opening__loading-copy strong {
  color: #ffe59a;
  font-variant-numeric: tabular-nums;
}

.bubble-opening__enter {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 92px;
  min-height: 40px;
  padding: 0 15px;
  color: #2f2415;
  background: linear-gradient(180deg, #fff0ad, #d9a43b);
  border: 1px solid #fff0b2;
  border-radius: 999px;
  box-shadow: 0 6px 18px rgb(0 0 0 / 25%);
  cursor: pointer;
  font-weight: 850;
}

.bubble-opening__enter[hidden] {
  display: none;
}

.bubble-opening.is-resource-ready .bubble-opening__progress span {
  background: linear-gradient(90deg, #66d9b6, #fff1a8);
}

.bubble-opening.is-resource-error .bubble-opening__loading-copy strong,
.bubble-opening.is-resource-error .bubble-opening__loading-copy span {
  color: #ffd0c8;
}

.bubble-opening.is-resource-error .bubble-opening__progress span {
  background: #e66f62;
}

.bubble-opening.is-invite .bubble-opening__content {
  padding: 16px 15px 14px;
  background: rgb(5 26 34 / 74%);
  border: 1px solid rgb(255 224 148 / 34%);
  border-radius: 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 34px rgb(0 0 0 / 26%);
}

.bubble-opening.is-invite .bubble-opening__command {
  --command-glow-rgb: 85 199 174;
  background: linear-gradient(180deg, #b4f3d7 0%, #55c7ae 55%, #259173 100%);
  border-color: #d8ffed;
  box-shadow: 0 8px 26px rgb(0 0 0 / 38%), inset 0 1px rgb(255 255 255 / 72%), 0 0 0 5px rgb(85 199 174 / 16%);
}

@keyframes opening-command-breathe {
  0%, 100% {
    scale: 0.985;
    filter: brightness(0.96) saturate(0.96);
    box-shadow:
      0 8px 25px rgb(0 0 0 / 36%),
      inset 0 1px rgb(255 255 255 / 68%),
      0 0 0 4px rgb(var(--command-glow-rgb) / 10%),
      0 0 10px rgb(var(--command-glow-rgb) / 8%);
  }
  46% {
    scale: 1.035;
    filter: brightness(1.13) saturate(1.08);
    box-shadow:
      0 10px 32px rgb(0 0 0 / 43%),
      inset 0 1px rgb(255 255 255 / 82%),
      0 0 0 11px rgb(var(--command-glow-rgb) / 16%),
      0 0 28px rgb(var(--command-glow-rgb) / 38%);
  }
  62% {
    scale: 1.02;
    filter: brightness(1.07) saturate(1.04);
    box-shadow:
      0 9px 29px rgb(0 0 0 / 40%),
      inset 0 1px rgb(255 255 255 / 76%),
      0 0 0 8px rgb(var(--command-glow-rgb) / 13%),
      0 0 21px rgb(var(--command-glow-rgb) / 27%);
  }
}

@keyframes opening-moon-aura {
  0%,
  100% {
    opacity: 0.72;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.045);
  }
}

@keyframes opening-stardust {
  0% {
    opacity: 0.5;
    transform: translate3d(0, 8px, 0) scale(0.98);
  }
  55% {
    opacity: 0.9;
  }
  100% {
    opacity: 0.68;
    transform: translate3d(4px, -12px, 0) scale(1.02);
  }
}

@keyframes opening-light-rays {
  0% {
    opacity: 0.38;
    transform: rotate(-3deg) scaleX(0.94);
  }
  100% {
    opacity: 0.72;
    transform: rotate(4deg) scaleX(1.04);
  }
}

@keyframes opening-moon-ring {
  0%,
  100% {
    opacity: 0.42;
    transform: translateX(-50%) scale(0.9);
  }
  50% {
    opacity: 0.84;
    transform: translateX(-50%) scale(1.04);
  }
}

@keyframes opening-kicker-glow {
  0%,
  100% {
    border-color: rgb(255 219 125 / 38%);
    box-shadow: 0 5px 20px rgb(0 0 0 / 24%), 0 0 0 rgb(255 225 140 / 0%);
  }
  50% {
    border-color: rgb(255 232 165 / 72%);
    box-shadow: 0 5px 20px rgb(0 0 0 / 24%), 0 0 18px rgb(255 225 140 / 22%);
  }
}

@keyframes opening-title-shimmer {
  0%,
  18% {
    background-position: 100% 50%;
  }
  62%,
  100% {
    background-position: 0 50%;
  }
}

@keyframes opening-command-sweep {
  0%,
  42% {
    transform: rotate(18deg) translateX(-260%);
  }
  72%,
  100% {
    transform: rotate(18deg) translateX(650%);
  }
}

@keyframes opening-command-mark {
  0%,
  100% {
    box-shadow: inset 0 0 0 2px rgb(5 66 50 / 28%), 0 2px 6px rgb(0 0 0 / 25%), 0 0 0 rgb(255 232 147 / 0%);
    transform: scale(1);
  }
  50% {
    box-shadow: inset 0 0 0 2px rgb(5 66 50 / 28%), 0 2px 6px rgb(0 0 0 / 25%), 0 0 15px rgb(255 232 147 / 58%);
    transform: scale(1.055);
  }
}

@media (orientation: landscape) {
  .bubble-opening {
    --opening-loading-height: max(82px, calc(68px + env(safe-area-inset-bottom)));
  }

  .bubble-opening__content {
    bottom: calc(var(--opening-loading-height) + 14px);
  }

  .bubble-opening__content h1 {
    font-size: 30px;
  }
}

@media (max-height: 700px) {
  .bubble-opening {
    --opening-loading-height: max(88px, calc(72px + env(safe-area-inset-bottom)));
  }

  .bubble-opening__content {
    bottom: calc(var(--opening-loading-height) + 18px);
  }

  .bubble-opening__content h1 {
    margin-top: 7px;
    font-size: 29px;
  }

  .bubble-opening__content p {
    margin-bottom: 10px;
    font-size: 12px;
  }

  .bubble-opening__command {
    min-height: 44px;
  }

  .bubble-opening__loading {
    gap: 6px 10px;
    padding-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bubble-opening,
  .bubble-opening__cover,
  .bubble-opening__video,
  .bubble-opening__end,
  .bubble-opening__content,
  .bubble-opening__progress span {
    transition-duration: 1ms;
  }

  .bubble-opening::before,
  .bubble-opening::after,
  .bubble-opening__shade::before,
  .bubble-opening__shade::after,
  .bubble-opening__kicker,
  .bubble-opening__content h1,
  .bubble-opening__command,
  .bubble-opening__command::before,
  .bubble-opening__command-mark {
    animation: none;
  }
}

body.bubble-opening-active {
  overscroll-behavior: none;
  overflow: hidden;
}

.bubble-opening,
.bubble-opening * {
  box-sizing: border-box;
}

.bubble-opening {
  --opening-loading-content-height: 128px;
  --opening-safe-bottom: env(safe-area-inset-bottom, 0px);
  --opening-loading-height: calc(var(--opening-loading-content-height) + var(--opening-safe-bottom));
  position: fixed;
  z-index: 2000;
  inset: 0;
  width: 100%;
  height: 100dvh;
  color: #ede5d5;
  background: #071820;
  overflow: hidden;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.bubble-opening::before,
.bubble-opening::after {
  display: none;
}

.bubble-opening.is-leaving {
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}

.bubble-opening__media {
  position: absolute;
  z-index: 0;
  inset: 0 0 var(--opening-loading-height);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #071820;
}

.bubble-opening__cover,
.bubble-opening__video,
.bubble-opening__end {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  user-select: none;
  pointer-events: none;
}

.bubble-opening__cover {
  z-index: 0;
  opacity: 1;
  filter: saturate(1.03) contrast(1.02);
  transition: opacity 360ms ease;
}

.bubble-opening__video {
  z-index: 1;
  opacity: 0;
  background: #071820;
  transition: opacity 360ms ease;
}

.bubble-opening__end {
  z-index: 2;
  opacity: 0;
  background: #071820;
  transition: opacity 300ms ease;
}

.bubble-opening.is-video-active .bubble-opening__cover {
  opacity: 0;
}

.bubble-opening.is-video-active .bubble-opening__video {
  opacity: 1;
}

.bubble-opening.is-media-ended .bubble-opening__cover,
.bubble-opening.is-media-ended .bubble-opening__video {
  opacity: 0;
}

.bubble-opening.is-media-ended .bubble-opening__end {
  opacity: 1;
}

.bubble-opening__shade {
  position: absolute;
  z-index: 1;
  inset: 0 0 var(--opening-loading-height);
  pointer-events: none;
  opacity: 0.48;
  background: linear-gradient(180deg, rgb(3 15 21 / 5%) 0%, rgb(3 15 21 / 9%) 48%, rgb(3 15 21 / 84%) 100%);
  transition: opacity 300ms ease;
}

.bubble-opening__shade::before,
.bubble-opening__shade::after {
  display: none;
}

.bubble-opening.is-opening .bubble-opening__shade,
.bubble-opening.is-video-active .bubble-opening__shade {
  opacity: 0.06;
}

.bubble-opening.is-media-ended .bubble-opening__shade {
  opacity: 0.1;
}

.bubble-opening.is-invite .bubble-opening__shade,
.bubble-opening.is-awaiting-gesture .bubble-opening__shade {
  opacity: 0.58;
}

.bubble-opening__topbar {
  position: absolute;
  z-index: 10;
  top: max(10px, env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  gap: 12px;
  pointer-events: none;
}

.bubble-opening__brand {
  color: #ede5d5;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 2px;
  text-shadow: 0 2px 8px rgb(0 0 0 / 70%);
  transition: opacity 180ms ease;
}

.bubble-opening__utilities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  gap: 4px;
  pointer-events: auto;
  transition: opacity 180ms ease;
}

.bubble-opening.is-booting .bubble-opening__utilities {
  pointer-events: none;
  opacity: 0;
}

.bubble-opening__skip,
.bubble-opening__sound {
  position: static;
  min-width: 44px;
  min-height: 44px;
  padding: 0 9px;
  color: #ede5d5;
  background: rgb(7 24 32 / 66%);
  border: 1px solid rgb(237 229 213 / 20%);
  border-radius: 4px;
  backdrop-filter: blur(7px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-shadow: 0 1px 5px rgb(0 0 0 / 65%);
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, opacity 180ms ease;
}

.bubble-opening__skip:hover,
.bubble-opening__sound:hover {
  color: #f5e8c9;
  background: rgb(10 34 43 / 86%);
  border-color: rgb(221 202 160 / 45%);
}

.bubble-opening__skip:active,
.bubble-opening__sound:active {
  background: rgb(5 19 26 / 92%);
}

.bubble-opening__skip:disabled {
  cursor: wait;
  opacity: 0.45;
}

.bubble-opening__skip[hidden],
.bubble-opening__sound[hidden] {
  display: none;
}

.bubble-opening__content {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(var(--opening-loading-height) + 34px);
  width: min(calc(100% - 48px), 360px);
  text-align: center;
  opacity: 1;
  transform: translateX(-50%);
  transition: opacity 220ms ease, transform 260ms ease;
}

.bubble-opening.is-booting .bubble-opening__content,
.bubble-opening.is-opening .bubble-opening__content,
.bubble-opening.is-video-active .bubble-opening__content,
.bubble-opening.is-media-ended .bubble-opening__content,
.bubble-opening.is-direct .bubble-opening__content,
.bubble-opening__content[aria-hidden="true"] {
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 8px);
}

.bubble-opening__kicker {
  display: inline-block;
  color: #ddcaa0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  animation: none;
}

.bubble-opening__content h1 {
  margin: 10px 0 7px;
  color: #f5e8c9;
  background: none;
  -webkit-text-fill-color: currentColor;
  font-family: Georgia, "Songti SC", "STSong", serif;
  font-size: 36px;
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: 3px;
  filter: drop-shadow(0 3px 10px rgb(0 0 0 / 68%));
  animation: none;
}

.bubble-opening__content p {
  max-width: 330px;
  margin: 0 auto 17px;
  color: rgb(237 229 213 / 88%);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgb(0 0 0 / 74%);
}

.bubble-opening__command {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 164px;
  min-height: 44px;
  padding: 8px 35px 8px 24px;
  color: #f5e8c9;
  background: rgb(7 24 32 / 70%);
  border: 1px solid #bca36d;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgb(0 0 0 / 28%), inset 0 1px rgb(255 255 255 / 8%);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1px;
  text-shadow: none;
  scale: 1;
  animation: none;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.bubble-opening__command::before {
  display: none;
}

.bubble-opening__command::after {
  content: "›";
  position: absolute;
  right: 18px;
  top: 50%;
  color: #ddcaa0;
  font-size: 18px;
  line-height: 1;
  transform: translateY(-52%);
}

.bubble-opening__command:hover {
  color: #fff4d9;
  background: rgb(13 38 47 / 88%);
  border-color: #ddcaa0;
  filter: none;
  transform: translateY(-1px);
}

.bubble-opening__command:active {
  transform: translateY(1px);
}

.bubble-opening__command:disabled {
  cursor: wait;
  opacity: 0.58;
  animation: none;
}

.bubble-opening__command-mark {
  display: none;
}

.bubble-opening__command:focus-visible,
.bubble-opening__skip:focus-visible,
.bubble-opening__sound:focus-visible,
.bubble-opening__enter:focus-visible {
  outline: 2px solid #f5e8c9;
  outline-offset: 3px;
}

.bubble-opening.is-invite .bubble-opening__content {
  padding: 20px 18px 18px;
  background: rgb(7 24 32 / 76%);
  border: 1px solid rgb(221 202 160 / 32%);
  border-radius: 8px;
  backdrop-filter: blur(8px);
  box-shadow: 0 16px 36px rgb(0 0 0 / 28%);
}

.bubble-opening.is-invite .bubble-opening__command {
  color: #f5e8c9;
  background: rgb(20 63 65 / 76%);
  border-color: #b9caa8;
  box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
}

.bubble-opening__loading {
  position: absolute;
  z-index: 12;
  right: 0;
  bottom: 0;
  left: 0;
  height: var(--opening-loading-height);
  padding: 0 max(24px, env(safe-area-inset-right, 0px)) var(--opening-safe-bottom) max(24px, env(safe-area-inset-left, 0px));
  color: #ede5d5;
  background: linear-gradient(180deg, #102832 0%, #0a1d26 58%, #071820 100%);
  border: 0;
  box-shadow: none;
  display: block;
  grid-template-columns: none;
  align-content: normal;
  gap: 0;
  min-height: 0;
}

.bubble-opening__loading::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 30px;
  pointer-events: none;
  background: linear-gradient(180deg, rgb(16 40 50 / 0%), #102832);
}

.bubble-opening__loading-inner {
  width: min(100%, 560px);
  height: var(--opening-loading-content-height);
  margin: 0 auto;
  padding: 18px 0 12px;
  display: grid;
  grid-template-rows: 22px 12px 44px;
  align-content: space-between;
}

.bubble-opening__loading-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 14px;
  color: #ede5d5;
  grid-column: auto;
  font-size: inherit;
  font-weight: inherit;
}

.bubble-opening__loading-copy > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0;
}

.bubble-opening__loading-copy strong {
  flex: 0 0 auto;
  min-width: 54px;
  color: #f5e8c9;
  font-family: Arial, sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 22px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bubble-opening__loading-copy strong small {
  margin-left: 3px;
  color: #c9b98f;
  font-size: 11px;
  font-weight: 500;
}

.bubble-opening__progress {
  --opening-progress: 0%;
  position: relative;
  width: 100%;
  height: 12px;
  overflow: visible;
  grid-column: auto;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.bubble-opening__progress .bubble-opening__progress-track,
.bubble-opening__progress .bubble-opening__progress-fill,
.bubble-opening__progress .bubble-opening__progress-head {
  position: absolute;
  display: block;
  pointer-events: none;
  transition: none;
}

.bubble-opening__progress .bubble-opening__progress-track {
  top: calc(50% - 0.5px);
  right: 0;
  left: 0;
  height: 1px;
  width: auto;
  background: #60747b;
  border-radius: 0;
  box-shadow: none;
}

.bubble-opening__progress .bubble-opening__progress-fill {
  top: calc(50% - 1.5px);
  left: 0;
  width: var(--opening-progress);
  height: 3px;
  overflow: hidden;
  border-radius: 1px;
  background: linear-gradient(90deg, #af945f 0%, #ddcaa0 68%, #f5e8c9 100%);
  box-shadow: 0 0 7px rgb(226 204 155 / 20%);
  opacity: 1;
}

.bubble-opening__progress-fill::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: rgb(255 248 230 / 42%);
}

.bubble-opening__progress .bubble-opening__progress-head {
  top: 50%;
  left: var(--opening-progress);
  left: clamp(3px, var(--opening-progress), calc(100% - 3px));
  width: 6px;
  height: 6px;
  background: #fff1cb;
  box-shadow: 0 0 7px rgb(255 228 164 / 54%);
  opacity: 0.72;
  transform: translate(-50%, -50%) rotate(45deg);
  animation: opening-progress-breathe 2.8s ease-in-out infinite;
}

.bubble-opening.is-progress-zero .bubble-opening__progress .bubble-opening__progress-fill,
.bubble-opening.is-progress-zero .bubble-opening__progress .bubble-opening__progress-head {
  opacity: 0;
}

.bubble-opening.is-resource-ready .bubble-opening__progress .bubble-opening__progress-fill {
  background: linear-gradient(90deg, #b49a68, #f5e8c9);
}

.bubble-opening.is-resource-ready .bubble-opening__progress .bubble-opening__progress-track,
.bubble-opening.is-resource-error .bubble-opening__progress .bubble-opening__progress-track {
  background: #60747b;
}

.bubble-opening.is-resource-ready .bubble-opening__progress-fill::after {
  animation: opening-progress-ready 280ms ease-out both;
}

.bubble-opening.is-resource-ready .bubble-opening__progress-head {
  opacity: 0;
  animation: none;
}

.bubble-opening__loading-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  align-items: center;
  gap: 14px;
  min-width: 0;
  height: 44px;
}

.bubble-opening__loading-action > span {
  min-width: 0;
  color: #9eb1b8;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
}

.bubble-opening__enter {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 112px;
  height: 44px;
  padding: 0 12px;
  color: #ead8ae;
  background: rgb(7 24 32 / 48%);
  border: 1px solid #bca36d;
  border-radius: 4px;
  box-shadow: inset 0 1px rgb(255 255 255 / 7%);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, opacity 160ms ease, transform 140ms ease;
  grid-column: auto;
  grid-row: auto;
  align-self: center;
  min-width: 0;
  min-height: 0;
}

.bubble-opening__enter > span:last-child {
  color: #ddcaa0;
  font-size: 18px;
  line-height: 1;
}

.bubble-opening__enter:hover {
  color: #fff4d9;
  background: rgb(221 202 160 / 9%);
  border-color: #ddcaa0;
}

.bubble-opening__enter:active {
  transform: translateY(1px);
}

.bubble-opening__enter[hidden] {
  display: none;
}

.bubble-opening.is-loading-slow .bubble-opening__loading-copy > span {
  color: #e5d6b4;
}

.bubble-opening.is-resource-error .bubble-opening__loading-copy > span,
.bubble-opening.is-resource-error .bubble-opening__loading-copy strong,
.bubble-opening.is-resource-error .bubble-opening__loading-copy strong small {
  color: #e8b4a7;
}

.bubble-opening.is-resource-error .bubble-opening__progress .bubble-opening__progress-fill {
  background: #bf9181;
  box-shadow: none;
}

.bubble-opening.is-resource-error .bubble-opening__progress .bubble-opening__progress-head {
  background: #e8b4a7;
  box-shadow: none;
  animation: none;
}

@keyframes opening-progress-breathe {
  0%,
  100% {
    opacity: 0.58;
  }
  50% {
    opacity: 0.84;
  }
}

@keyframes opening-progress-ready {
  from {
    opacity: 0.3;
  }
  to {
    opacity: 0.8;
  }
}

@media (max-height: 700px) and (orientation: portrait) {
  .bubble-opening {
    --opening-loading-content-height: 112px;
  }

  .bubble-opening__content {
    bottom: calc(var(--opening-loading-height) + 20px);
  }

  .bubble-opening__content h1 {
    margin-top: 7px;
    font-size: 30px;
  }

  .bubble-opening__content p {
    margin-bottom: 12px;
    font-size: 12px;
  }

  .bubble-opening__loading {
    padding-right: max(20px, env(safe-area-inset-right, 0px));
    padding-left: max(20px, env(safe-area-inset-left, 0px));
  }

  .bubble-opening__loading-inner {
    padding-top: 12px;
    padding-bottom: 8px;
    grid-template-rows: 20px 10px 44px;
  }

  .bubble-opening__loading-copy > span {
    font-size: 12px;
  }

  .bubble-opening__loading-copy strong {
    font-size: 18px;
  }
}

@media (orientation: landscape) {
  .bubble-opening {
    --opening-loading-content-height: 88px;
  }

  .bubble-opening__content {
    bottom: calc(var(--opening-loading-height) + 12px);
  }

  .bubble-opening__content h1 {
    margin: 6px 0 4px;
    font-size: 28px;
  }

  .bubble-opening__content p {
    margin-bottom: 8px;
    font-size: 11px;
  }

  .bubble-opening__command {
    min-height: 40px;
  }

  .bubble-opening__loading-inner {
    padding-top: 6px;
    padding-bottom: 4px;
    grid-template-rows: 18px 8px 34px;
  }

  .bubble-opening__loading-copy > span {
    font-size: 12px;
    line-height: 18px;
  }

  .bubble-opening__loading-copy strong {
    font-size: 18px;
    line-height: 18px;
  }

  .bubble-opening__loading-action {
    height: 34px;
  }

  .bubble-opening__enter {
    height: 34px;
    min-height: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bubble-opening,
  .bubble-opening__cover,
  .bubble-opening__video,
  .bubble-opening__end,
  .bubble-opening__shade,
  .bubble-opening__topbar,
  .bubble-opening__content,
  .bubble-opening__enter {
    transition-duration: 1ms;
  }

  .bubble-opening__progress-head,
  .bubble-opening.is-resource-ready .bubble-opening__progress-fill::after {
    animation: none;
  }
}


/* ===== 月夜 UI 换皮（2026-09-02，素材 assets/ui/） ===== */
/* 宽屏（桌面浏览器）：底图只铺在游戏栏内，栏外用底图边缘采样色做纵向渐变填充 */
.page-shell {
  background-color: #101a4d;
  background-image: linear-gradient(180deg, #101a4d 0%, #28348a 38%, #4859b3 62%, #6b66b8 100%);
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% 100%;
}

.battle-shell {
  background-image: url("../assets/ui/lantern.png"), url("../assets/ui/bg-page.jpg");
  background-repeat: no-repeat, no-repeat;
  background-position: left 3% top 36%, center top;
  background-size: 30px auto, cover;
  border-inline: none;
  box-shadow: none;
  grid-template-rows: 68px clamp(150px, 22dvh, 178px) minmax(0, 1fr) 84px;
}

/* 宽屏（视口比底图 1634×2600 更宽，如桌面浏览器）：2048 舞台方案——
   游戏栏锁底图纵横比，底图完整展示不变形不裁剪；栏外由 .page-shell 渐变填充。
   窄屏（手机竖屏）不命中此查询，保持 cover 全幅出血。 */
@media (min-aspect-ratio: 1634/2600) {
  .battle-shell {
    width: auto;
    height: min(100dvh, 1300px);
    aspect-ratio: 1634 / 2600;
    background-size: 30px auto, 100% 100%;
    grid-template-rows: 64px clamp(120px, 20dvh, 178px) minmax(0, 1fr) 80px;
  }
}

/* --- 顶部 HUD --- */
.top-hud .icon-button {
  border-radius: 50%;
  border-color: rgb(244 198 78 / 38%);
  background: rgb(20 28 62 / 78%);
  color: #f4e6c0;
  box-shadow: none;
}

.score-readout {
  border-bottom-color: rgb(244 198 78 / 55%);
}

.score-readout__label {
  color: #c8cfe8;
}

.score-readout strong {
  color: #ffffff;
  text-shadow: 0 2px 6px rgb(0 0 0 / 45%);
}

.timer-readout {
  border-color: rgb(244 198 78 / 40%);
  background: rgb(20 28 62 / 78%);
  color: #f4e6c0;
}

.timer-readout svg {
  color: #f4c64e;
}

.connection-status {
  border-color: rgb(255 255 255 / 12%);
  background: rgb(20 28 62 / 72%);
  color: #aab4d8;
}

.sync-detail {
  color: #8f9ac0;
}

/* --- Boss 舞台 --- */
.boss-stage {
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

/* Boss 状态条（月徽章+困倦中+能量槽 已烘焙进素材） */
.boss-stage::before {
  display: block;
  inset: auto 6px 0;
  height: auto;
  aspect-ratio: 561 / 98;
  z-index: 1;
  background: url("../assets/ui/boss-bar.png") center / 100% 100% no-repeat;
  border: 0;
}

.boss-stage::after {
  display: none;
}

.boss-stage .boss-image {
  display: block;
  width: 108px;
  bottom: 40px;
  z-index: 2;
}

.teammate-chip {
  border-color: rgb(244 198 78 / 35%);
  background: rgb(20 28 62 / 80%);
}

.teammate-avatar {
  background: #d9a441;
  border-color: #f4e6c0;
  color: #3b2a1e;
}

.teammate-copy strong {
  color: #f4e6c0;
}

.teammate-copy span {
  color: #aab4d8;
}

.teammate-meter {
  background: rgb(10 16 40 / 80%);
}

.teammate-meter span {
  background: #f4c64e;
}

.phase-pill {
  border-color: rgb(244 198 78 / 40%);
  background: rgb(20 28 62 / 82%);
  color: #f4e6c0;
}

.phase-pill[data-phase="exposed"] {
  background: rgb(120 84 20 / 88%);
  border-color: #f4c64e;
  color: #fff3cf;
}

.phase-pill[data-phase="enraged"] {
  background: rgb(160 32 48 / 88%);
  border-color: #ff8a8a;
  color: #ffffff;
}

.assist-feed {
  border: 1px solid rgb(244 198 78 / 30%);
  background: rgb(14 20 48 / 88%);
}

/* 锚点叠放在 boss-bar 右侧原绿方块位置 */
.anchor-row {
  left: 83.2%;
  right: auto;
  bottom: 28px;
  gap: 8px;
  z-index: 3;
}

.anchor {
  width: 8px;
  height: 11px;
  border: none;
  border-radius: 2px;
  clip-path: none;
  background: #4ed8b2;
  box-shadow: 0 0 4px rgb(78 216 178 / 60%);
}

.anchor.is-broken {
  background: #3a4666;
  box-shadow: none;
}

/* HP 条叠放在 boss-bar 橙色条区域，填充用原切图（左侧裁剪式收缩） */
.boss-health {
  left: 14.5%;
  right: 7.5%;
  bottom: 13px;
  height: 14px;
  z-index: 3;
  border: none;
  border-radius: 999px;
  background: transparent;
}

.boss-health__fill {
  background: url("../assets/ui/boss-hp-fill.png") left center / auto 100% no-repeat;
}

.boss-health strong {
  color: #ffffff;
  text-shadow: 0 1px 2px rgb(0 0 0 / 55%);
}

/* --- 战斗画布 --- */
.game-frame {
  border-inline: none;
  background: transparent;
}

/* --- 底部控制坞 --- */
.control-dock {
  grid-template-columns: 86px minmax(44px, 1fr) 58px 48px 48px 48px;
  border-color: rgb(244 198 78 / 30%);
  border-radius: 14px;
  background: linear-gradient(180deg, rgb(58 47 126 / 92%), rgb(39 32 79 / 94%));
}

.control-dock .icon-button,
.control-dock .power-button {
  border: none;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

.control-dock .icon-button svg,
.control-dock .power-button svg {
  display: none;
}

#swap-button {
  width: 48px;
  height: 48px;
  background-image: url("../assets/ui/btn-swap.png");
}

#star-button {
  width: 56px;
  height: 56px;
  background-image: url("../assets/ui/btn-star.png");
}

#star-button.is-armed {
  filter: drop-shadow(0 0 7px rgb(244 198 78 / 85%));
}

#invite-button {
  width: 48px;
  height: 48px;
  background-image: url("../assets/ui/btn-share.png");
}

#invite-activity-button {
  width: 48px;
  height: 48px;
  background-image: url("../assets/ui/btn-gift.png");
}

#leaderboard-button {
  width: 48px;
  height: 48px;
  background-image: url("../assets/ui/btn-trophy.png");
}

.control-dock .icon-button:hover,
.control-dock .power-button:hover {
  background-color: transparent;
  filter: brightness(1.12);
}

/* 下一颗泡泡：蓝色圆槽 + 泡泡贴图 */
.next-bubble-group {
  grid-template-columns: 46px 44px;
}

.bubble-preview {
  width: 44px;
  height: 45px;
  border: none;
  box-shadow: none;
  background: url("../assets/ui/btn-current.png") center / contain no-repeat;
}

.bubble-preview::after {
  content: "";
  width: 26px;
  height: 26px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  text-shadow: none;
}

.bubble-preview--coral::after {
  background-image: url("../assets/ui/bubble-coral.png");
}

.bubble-preview--gold::after {
  background-image: url("../assets/ui/bubble-gold.png");
}

.bubble-preview--mint::after {
  background-image: url("../assets/ui/bubble-mint.png");
}

.bubble-preview--sky::after {
  background-image: url("../assets/ui/bubble-sky.png");
}

.bubble-preview--star::after {
  content: "★";
  width: auto;
  height: auto;
  background: none;
  color: #b86d00;
}

.team-energy__topline {
  color: #e8ddc0;
}

.team-energy__track {
  border-color: rgb(244 198 78 / 35%);
  background: rgb(10 16 40 / 80%);
}

.count-badge {
  border-color: rgb(14 20 48 / 70%);
}

.desktop-note {
  color: #aab4d8;
}

/* ===== 中秋图二布局（2026-09-03）：主体放大压矮，信息降噪 ===== */
/* 仅屏蔽左上角「暂停」「已绑定」两个按钮；积分/倒计时/连接状态保留 */
#pause-button,
#role-bind-entry {
  display: none;
}

/* 底部控制坞整排隐藏（万能球/连击/互换先下线），功能迁移：
   - 互换：点击发射栏任意区域或下一球预览
   - 分享/奖励/排行榜：棋盘内浮动按钮 */
.control-dock {
  display: none;
}

/* 战斗壳改为三行：顶栏 + Boss 舞台（压矮）+ 棋盘（吃满剩余） */
.battle-shell {
  position: relative;
  grid-template-rows: 68px clamp(140px, 20dvh, 190px) minmax(0, 1fr);
  gap: 2px;
}

@media (min-aspect-ratio: 1634/2600) {
  .battle-shell {
    grid-template-rows: 64px clamp(130px, 18dvh, 180px) minmax(0, 1fr);
  }
}

/* Boss 形象放大一点，贴近图二比例 */
.boss-stage .boss-image {
  width: 140px;
  bottom: 42px;
}

/* 棋盘锁画布纵横比（360×460）并在行内居中，让 DOM 悬浮层与画布坐标对齐 */
.game-frame {
  width: 100%;
  max-height: 100%;
  aspect-ratio: 360 / 460;
  align-self: center;
}

/* 棋盘内四角浮动按钮（礼物=左下，分享=右下） */
.frame-corner {
  position: absolute;
  z-index: 6;
  bottom: 2.6%;
  width: 46px;
  height: 46px;
  border: none;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
  cursor: pointer;
}

.frame-corner svg {
  display: none;
}

.frame-corner--left {
  left: 4%;
}

.frame-corner--right {
  right: 4%;
}

.frame-corner:hover {
  background-color: transparent;
  filter: brightness(1.12);
}

#invite-button {
  background-image: url("../assets/ui/btn-share.png");
}

#invite-activity-button {
  background-image: url("../assets/ui/btn-gift.png");
}

#invite-activity-button .invite-reward-dot {
  position: absolute;
  top: 2px;
  right: 2px;
}

/* 下一球预览：发射区右下角（炮碗右侧），整组可点=互换 */
.next-bubble-group {
  position: absolute;
  z-index: 6;
  left: 64%;
  bottom: 2.2%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.next-bubble-group .bubble-preview {
  width: 40px;
  height: 41px;
}

/* 瞄准提示从底部挪到危险线与炮碗之间（图二同款位置） */
.game-frame::after {
  bottom: 21.5%;
  background: rgb(7 16 40 / 48%);
}

/* 排行榜按钮：右下角分享按钮上方叠放 */
.frame-corner--raised {
  bottom: calc(2.6% + 52px);
}

#leaderboard-button {
  background-image: url("../assets/ui/btn-trophy.png");
}

/* 暂停/绑定隐藏后，钉住积分与倒计时的原始栅格列位 */
.score-readout {
  grid-column: 2;
}

.timer-readout {
  grid-column: 3;
}

/* Keep collaboration controls outside the board's aiming surface. */
.battle-shell { grid-template-rows: 68px clamp(120px, 18dvh, 160px) minmax(0, 1fr) 48px; }
#pause-button { display: inline-grid; }
.control-dock { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; height: 48px; min-height: 0; gap: 14px; padding: 0 14px; background: transparent; border: 0; box-shadow: none; }
.control-dock::before, .control-dock::after, .game-frame::after { display: none; }
.control-dock .icon-button, .control-dock .power-button { width: 42px; height: 42px; }
.team-energy { min-width: 0; width: 100%; }
.count-badge { width: auto; min-width: 20px; padding-inline: 3px; font-size: 10px; }
.top-hud .reconnect-button { position: absolute; left: 0; top: 42px; width: 30px; height: 26px; border-radius: 4px; }
.sync-detail { left: 38px; max-width: calc(100% - 180px); }
.teammate-chip { width: min(200px, calc(100% - 116px)); height: 48px; grid-template-columns: 28px minmax(0, 1fr) 36px; grid-template-rows: 1fr 4px; gap: 2px 5px; border-radius: 8px; }
.teammate-copy { grid-column: 2; flex-direction: column; align-items: start; justify-content: center; gap: 1px; }
.teammate-copy strong { max-width: 100%; }
.teammate-copy span { max-width: 100%; }
.teammate-meter { grid-column: 2; }
.rescue-button { grid-column: 3; grid-row: 1 / 3; width: 36px; height: 36px; border-radius: 6px; background: #244741; color: #a9eed4; border-color: #6fafa0; }
.rescue-button.is-available { background: #236b53; border-color: #9ef5d2; }
.anchor-row { left: auto; right: 9%; bottom: 30px; gap: 7px; }
.phase-step { font-size: 9px; color: #9fbab8; line-height: 1.2; }
.phase-step.is-active { color: #fff2c3; font-weight: 700; }
.battle-countdown { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgb(10 23 30 / 35%); pointer-events: none; }
.battle-countdown strong { font-size: 64px; color: #fff4c6; text-shadow: 0 3px 8px #182d35; }
.feedback-settings { display: flex; gap: 20px; padding: 12px 0; border-block: 1px solid #d7e3df; margin-block: 12px; }
.feedback-settings label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.feedback-settings input { width: 20px; height: 20px; accent-color: #208862; }
.rematch-status { min-height: 20px; margin: 8px 0; font-size: 12px; color: #4c7168; }
.result-surface { max-height: 90dvh; overflow-y: auto; }
@media (max-height: 650px) { .battle-shell { grid-template-rows: 64px 112px minmax(0, 1fr) 44px; } .boss-stage .boss-image { width: 108px; } }

/* ===== 中秋「双兔捣月」皮肤（2026-09-10，设计稿基准 720×1280） ===== */
/* 布局约定：.moon2-top 按 720×330 锁定比例，.game-frame 按 630×950 锁定比例，
   DOM 悬浮层用设计像素换算成百分比，与 Phaser 画布坐标一一对应。 */

.page-shell {
  background-color: #3b2f63;
  background-image: url("../assets/moon2/bg-page.jpg");
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.battle-shell.moon2 {
  position: relative;
  width: min(100vw, 520px);
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0;
  overflow: hidden;
  border: none;
  box-shadow: none;
  background: none;
  grid-template-rows: none;
}

/* 旧壳元素：暂停/绑定/连接状态/底栏保留 DOM（JS 引用），默认不显示 */
.moon2 .top-hud {
  position: absolute;
  z-index: 24;
  top: max(6px, env(safe-area-inset-top));
  left: 50%;
  display: flex;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}

.moon2 .top-hud > * {
  pointer-events: auto;
}

.moon2 #pause-button,
.moon2 #role-bind-entry,
.moon2 .connection-status,
.moon2 .sync-detail {
  display: none;
}

.moon2 .control-dock {
  display: none;
}

/* 队友卡 / 阶段徽章 / 阶段三步条：已放出，位置见文件末「五次修正」
   （队友卡=分数条下方右侧；阶段徽章=血条行左端；三步条=倒计时牌左侧） */

/* --- 顶部：标题 / 分数条 / 双兔 BOSS / 倒计时 --- */
.moon2-top {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  aspect-ratio: 720 / 330;
  overflow: visible;
}

.moon2-title {
  position: absolute;
  left: 0.4%;
  top: 1.8%;
  width: 39.2%;
  height: auto;
  filter: drop-shadow(0 3px 6px rgb(20 6 40 / 45%));
}

.moon2-chips {
  position: absolute;
  right: 2.5%;
  top: 0;
  width: 27.5%;
  height: 100%;
}

.moon2-chip {
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 262 / 63;
  display: block;
}

.moon2-chip--best {
  top: 6.7%;
}

.moon2-chip--team {
  top: 24.2%;
}

.moon2-chip__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.moon2-chip__value {
  position: absolute;
  left: 27%;
  right: 9%;
  top: 50%;
  overflow: hidden;
  color: #7b3b36;
  font-size: var(--moon2-chip-font, 13px);
  font-weight: 900;
  line-height: 1;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

.moon2 .boss-stage {
  position: absolute;
  inset: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.moon2 .boss-stage::before,
.moon2 .boss-stage::after {
  display: none;
}

.moon2 .boss-stage .boss-image {
  position: absolute;
  left: 17.9%;
  top: 0.9%;
  width: 67.5%;
  height: auto;
  bottom: auto;
  transform: none;
  /* 旧皮肤关键帧带 translateX(-50%)，会顶掉定位，改用只缩放的呼吸动画 */
  animation: moon2-boss-breathe 3.4s ease-in-out infinite;
  transform-origin: 50% 78%;
  filter: drop-shadow(0 4px 8px rgb(30 10 50 / 35%));
}

@keyframes moon2-boss-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.014);
  }
}

.moon2 .timer-readout {
  position: absolute;
  z-index: 7;
  left: 40%;
  top: 84.5%;
  width: 20%;
  height: auto;
  aspect-ratio: 247 / 98;
  display: block;
  border: none;
  border-radius: 0;
  background: url("../assets/moon2/timer-plaque.png") center / 100% 100% no-repeat;
  box-shadow: none;
}

.moon2 .timer-readout svg {
  display: none;
}

.moon2 .timer-readout strong {
  position: absolute;
  left: 0;
  right: 0;
  top: 47%;
  width: auto;
  color: #7a3a33;
  font-size: var(--moon2-timer-font, 16px);
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  text-shadow: 0 1px 0 rgb(255 246 226 / 70%);
  transform: translateY(-50%);
}

/* --- 棋盘：底盘 + 球 + 炮台（画布），悬浮层按设计像素定位 --- */
.moon2 .game-frame {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, calc((100dvh - 45.8%) * 0.6633));
  aspect-ratio: 630 / 950;
  margin: 0 auto;
  border: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  overflow: visible;
}

.moon2 .game-frame::after {
  content: none;
}

.moon2 #game-container {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* 血条：叠在底盘上沿 */
.moon2 .boss-health {
  position: absolute;
  z-index: 7;
  left: 8.9%;
  top: -1.05%;
  right: auto;
  bottom: auto;
  width: 84%;
  height: 3.58%;
  display: flex;
  align-items: center;
  padding: 0 6%;
  border: none;
  border-radius: 0;
  background: url("../assets/moon2/hp-frame.png") center / 100% 100% no-repeat;
  box-sizing: border-box;
}

.moon2 .boss-health__fill {
  display: block;
  width: 0;
  height: 46%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb04a 0%, #ff7a3c 62%, #f2603c 100%);
  box-shadow: 0 0 4px rgb(255 140 60 / 55%);
}

.moon2 .boss-health strong {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  color: #ffffff;
  font-size: var(--moon2-hp-font, 10px);
  font-weight: 900;
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 1px 2px rgb(96 32 26 / 85%), 0 0 3px rgb(96 32 26 / 70%);
  transform: translateY(-50%);
}

/* 下一球预告（发射区左下） */
.moon2 .next-bubble-group {
  position: absolute;
  z-index: 8;
  left: 19.7%;
  right: auto;
  top: 87.9%;
  bottom: auto;
  display: block;
  width: 9.5%;
  aspect-ratio: 109 / 114;
  cursor: pointer;
}

.moon2 .next-bubble-group .bubble-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  background: url("../assets/moon2/next-frame.png") center / 100% 100% no-repeat;
}

.moon2 .bubble-preview::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80%;
  height: 80%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  transform: translate(-50%, -50%);
}

.moon2 .bubble-preview--coral::after {
  background-image: url("../assets/moon2/bubble-coral.png");
}

.moon2 .bubble-preview--gold::after {
  background-image: url("../assets/moon2/bubble-gold.png");
}

.moon2 .bubble-preview--mint::after {
  background-image: url("../assets/moon2/bubble-mint.png");
}

.moon2 .bubble-preview--sky::after {
  background-image: url("../assets/moon2/bubble-sky.png");
}

.moon2 .bubble-preview--stone::after {
  background-image: url("../assets/moon2/bubble-stone.png");
}

.moon2 .bubble-preview--star::after {
  content: "";
  width: 80%;
  height: 80%;
  background-image: url("../assets/moon2/bubble-star.png");
}

/* 互换提示（炮台右侧，纯提示，点击穿透到画布的发射栏） */
.moon2 .swap-hint {
  position: absolute;
  z-index: 8;
  left: 65.7%;
  top: 88.6%;
  width: 6.3%;
  aspect-ratio: 1;
  background: url("../assets/moon2/swap-arrows.png") center / contain no-repeat;
  pointer-events: none;
}

/* 连击（炮台下方牌面） */
.moon2 .combo-badge {
  position: absolute;
  z-index: 8;
  left: 38.6%;
  top: 92.1%;
  width: 22%;
  aspect-ratio: 327 / 88;
  display: flex;
  align-items: center;
  justify-content: center;
  background: url("../assets/moon2/alt-combo-plate.png") center / 100% 100% no-repeat;
  color: #ffe7bd;
  font-size: var(--moon2-combo-font, 12px);
  font-weight: 900;
  letter-spacing: 0.5px;
  text-align: center;
  text-shadow: 0 1px 2px rgb(60 20 20 / 80%);
  pointer-events: none;
}

.moon2 .combo-badge span {
  display: block;
  max-width: 82%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 左下奖励 / 右下分享 */
.moon2 .frame-corner {
  position: absolute;
  z-index: 9;
  right: auto;
  bottom: auto;
  border: none;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  box-shadow: none;
}

/* 注意：旧皮肤用 ID 选择器写死 48px（#invite-button/#invite-activity-button），
   新皮肤必须同样用 ID 提高优先级，否则宽高会被锁死在 48px */
.moon2 #invite-activity-button {
  left: 0.6%;
  top: 86.8%;
  width: 21.4%;
  height: auto;
  aspect-ratio: 168 / 157;
  background-image: url("../assets/moon2/btn-reward.png");
}

.moon2 #invite-button {
  right: auto;
  left: 78%;
  top: 86.5%;
  width: 21%;
  height: auto;
  aspect-ratio: 163 / 157;
  background-image: url("../assets/moon2/btn-share.png");
}

/* 铜钱按钮（排行榜）：设计稿在炮台右侧，素材未导出，暂用预告圆框+金桂花球拼装 */
.moon2 #leaderboard-button {
  left: 71.9%;
  top: 89.2%;
  right: auto;
  bottom: auto;
  width: 10%;
  height: auto;
  aspect-ratio: 109 / 114;
  background-image: url("../assets/moon2/next-frame.png");
}

.moon2 #leaderboard-button::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 62%;
  height: 62%;
  background: url("../assets/moon2/bubble-gold.png") center / contain no-repeat;
  transform: translate(-50%, -50%);
}

.moon2 #leaderboard-button svg {
  display: none;
}

/* 结算倒计时（3/2/1） */
.moon2 .battle-countdown {
  position: absolute;
  z-index: 20;
  inset: auto;
  left: 50%;
  top: 38%;
  width: auto;
  height: auto;
  background: transparent;
  transform: translate(-50%, -50%);
}

/* 顶部浮动提示 */
.moon2 .assist-feed {
  position: absolute;
  z-index: 22;
  top: 12%;
  left: 50%;
  width: auto;
  max-width: 60%;
  border: 1px solid rgb(255 214 150 / 45%);
  background: rgb(38 22 68 / 82%);
  color: #ffe7bd;
}

/* 顶部信息条字号随容器宽度缩放 */
.battle-shell.moon2 {
  --moon2-chip-font: clamp(9px, 3.4vw, 15px);
  --moon2-timer-font: clamp(12px, 4.6vw, 20px);
  --moon2-hp-font: clamp(8px, 2.8vw, 13px);
  --moon2-combo-font: clamp(9px, 3.2vw, 14px);
}

@media (min-aspect-ratio: 1634/2600) {
  .battle-shell.moon2 {
    height: min(100dvh, 1050px);
  }
}

/* ===== 双兔捣月 二次修正（2026-09-10 晚）：按萧何 8 条反馈 ===== */
/* 1) 背景换成夜湖全景图（1152×2048 源图 → 864×1536 JPEG） */
.page-shell {
  background-image: url("../assets/moon2/bg-page.jpg");
}

/* 2) 分数条文字（素材本身不含文字，需 DOM 补） */
.moon2 .moon2-chip__label {
  position: absolute;
  left: 28%;
  right: 40%;
  top: 50%;
  overflow: hidden;
  color: #7b3b36;
  font-size: var(--moon2-chip-font, 13px);
  font-weight: 900;
  line-height: 1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateY(-50%);
}

.moon2 .moon2-chip__value {
  left: 62%;
  right: 7%;
  font-size: calc(var(--moon2-chip-font, 13px) * 1.05);
}

/* 3) 连击文字直接写在炮台自带底板上（去掉额外底框） */
.moon2 .combo-badge {
  left: 42.8%;
  top: 92.7%;
  width: 15%;
  background: none;
  color: #ffe7bd;
}

/* 4) 排行榜：移到 BOSS 血条右上角，做成中元节同款「榜」圆钮 */
.moon2 #leaderboard-button {
  left: 88.4%;
  top: -3.6%;
  right: auto;
  bottom: auto;
  width: 9.6%;
  height: auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 34%, #4b3b7c 0%, #2c2153 72%);
  box-shadow: 0 0 0 2px #f2d693, 0 0 0 4px rgb(122 88 42 / 70%), 0 2px 7px rgb(10 6 30 / 60%);
  color: #f7e3ac;
  font-size: var(--moon2-rank-font, 15px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 1px rgb(40 20 10 / 80%);
  cursor: pointer;
  z-index: 8;
}

.moon2 #leaderboard-button::before {
  content: "榜";
}

.moon2 #leaderboard-button svg {
  display: none;
}

.moon2 #leaderboard-button:hover {
  filter: brightness(1.12);
}

/* 5) 发射器左侧：应援星球按钮（原图位置） */
.moon2 #star-button {
  position: absolute;
  left: 19.7%;
  top: 87.9%;
  right: auto;
  bottom: auto;
  width: 9.5%;
  height: auto;
  aspect-ratio: 109 / 114;
  border: none;
  background: url("../assets/moon2/next-frame.png") center / 100% 100% no-repeat;
  box-shadow: none;
  cursor: pointer;
  z-index: 8;
}

.moon2 #star-button .moon2-assist__ball {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 84%;
  height: 84%;
  background: url("../assets/moon2/alt-bubble-rainbow-swirl.png") center / contain no-repeat;
  transform: translate(-50%, -50%);
}

.moon2 #star-button .count-badge {
  position: absolute;
  right: 0;
  top: 0;
  min-width: 14px;
  padding: 0 3px;
  border-radius: 999px;
  background: #f2603c;
  color: #fff;
  font-size: 9px;
  font-weight: 900;
  line-height: 14px;
  text-align: center;
}

.moon2 #star-button.is-armed {
  filter: drop-shadow(0 0 8px rgb(255 220 130 / 95%));
}

.moon2 #star-button:disabled {
  opacity: 0.45;
  cursor: default;
}

/* 互换箭头：本轮已互换 / 星泡已装备 / 不可发射时，与左侧应援星泡一致的禁用表现 */
.moon2 .swap-hint:disabled {
  opacity: 0.45;
  cursor: default;
  transition: opacity 120ms ease;
}

.moon2 .swap-hint:disabled:active {
  transform: none;
}

/* 6) 发射器右侧：下个球预告（点击可与互换按钮一样换球） */
.moon2 .next-bubble-group {
  left: 71.9%;
  top: 89.2%;
  right: auto;
  bottom: auto;
  width: 10%;
}

/* 7) 中间的互换按钮：可点击 */
.moon2 .swap-hint {
  left: 65.1%;
  top: 88.5%;
  right: auto;
  bottom: auto;
  width: 5.4%;
  padding: 0;
  border: none;
  background-color: transparent;
  background-image: url("../assets/moon2/swap-arrows.png");
  box-shadow: none;
  cursor: pointer;
  pointer-events: auto;
  z-index: 9;
}

.moon2 .swap-hint:active {
  transform: scale(0.92);
}

/* 8) BOSS 血条整体下移一点 */
.moon2 .boss-health {
  top: 0.35%;
}

/* 榜按钮字号随容器宽度 */
.battle-shell.moon2 {
  --moon2-rank-font: clamp(10px, 3.8vw, 17px);
}

/* 分数条文字：按设计稿尺寸（约 9-10px）排版，标签左、数值右 */
.moon2 .moon2-chip__label {
  left: 27%;
  right: 41%;
  font-size: calc(var(--moon2-chip-font, 13px) * 0.72);
}

.moon2 .moon2-chip__value {
  left: 59%;
  right: 6%;
  font-size: calc(var(--moon2-chip-font, 13px) * 0.78);
}

/* 连击文字贴到炮台底板中心 */
.moon2 .combo-badge {
  top: 92.2%;
}

.moon2 .moon2-chip__label {
  left: 26%;
  right: 36%;
  font-size: calc(var(--moon2-chip-font, 13px) * 0.68);
}

.moon2 .moon2-chip__value {
  left: 56%;
  right: 6%;
}

/* ===== 双兔捣月 三次修正（2026-09-11）===== */
/* 4) 背景：中间完整铺图（不裁切），两侧用与背景同色的蓝紫渐变（参考七夕 2048 做法） */
.page-shell {
  background-color: #5b57a8;
  background-image: linear-gradient(
    180deg,
    #6466c8 0%,
    #3c4699 12%,
    #34487f 30%,
    #345a9c 50%,
    #555ab6 70%,
    #8374cc 88%,
    #8682d7 100%
  );
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

/* 注意：battle-shell 自身就带 moon2 类，后代选择器 .moon2 .battle-shell 不匹配！ */
.battle-shell.moon2 {
  background-image: url("../assets/moon2/bg-page.jpg");
  background-size: 100% 100%;
  background-position: center top;
  background-repeat: no-repeat;
}

/* 5) 血条：三段化（见文件末「六次修正」），旧单填充块样式已废弃 */
.moon2 .boss-health {
  align-items: center;
}

/* 3) 榜单按钮：去掉误留的金球，底框缩到贴住「榜」字 */
.moon2 #leaderboard-button::after {
  content: none;
  background: none;
}

.moon2 #leaderboard-button {
  width: 6.6%;
  left: 89.4%;
  top: -1.2%;
  background: radial-gradient(circle at 50% 34%, #4b3b7c 0%, #2c2153 72%);
  box-shadow: 0 0 0 1.6px #f2d693, 0 0 0 3px rgb(122 88 42 / 68%), 0 2px 6px rgb(10 6 30 / 60%);
  font-size: var(--moon2-rank-font, 13px);
}

/* 2) 应援星球右移，并与右侧预告球同一水平线 */
.moon2 #star-button {
  left: 23%;
  top: 89%;
}

/* 1) 右侧下个球预告左移；中间的互换按钮同步左移保持间距 */
.moon2 .next-bubble-group {
  left: 69.8%;
  top: 89%;
}

.moon2 .swap-hint {
  left: 64%;
  top: 88.6%;
}

.battle-shell.moon2 {
  --moon2-rank-font: clamp(9px, 3vw, 14px);
}

/* ===== 双兔捣月 四次修正（2026-09-11 上午）===== */
/* 5) 分数数字放大并右移（中文标签保持） */
.moon2 .moon2-chip__value {
  left: 60%;
  right: 4%;
  font-size: calc(var(--moon2-chip-font, 13px) * 0.9);
}

/* 6) 连击文字精准落在炮台自带底板中心（素材底板 bbox 82x48 @(137.5,186.5)/277x243） */
.moon2 .combo-badge {
  left: 42.9%;
  top: 95.3%;
  width: 16%;
  height: 4.04%;
  transform: translateY(-50%);
  align-items: center;
  justify-content: center;
}

/* 7) 两侧按钮再向中间靠一点 */
.moon2 #star-button {
  left: 25%;
}

.moon2 .next-bubble-group {
  left: 68.5%;
}

/* ===== 双兔捣月 五次修正（2026-09-11 下午）：放出队友卡 / 阶段徽章 / 阶段三步条 ===== */
/* 位置按萧何截图稿：
   ① 队友卡 = 分数条正下方右侧（同右边距 2.5%、同宽 27.5%，紧贴「团队得分」）
   ② 阶段徽章 = 血条行左端，压在血条左段上（血条本身不动）
   ③ 阶段三步条 = 倒计时牌左侧，正好在徽章上方一层
   三块都跟着各自容器等比缩放，不额外占高，也不压棋盘与瞄准区。 */

/* --- ① 队友卡：头像 + 名字/状态 + 贡献条 + 救援按钮 --- */
.moon2 .teammate-chip {
  position: absolute;
  top: 41%;
  left: auto;
  right: 2.5%;
  bottom: auto;
  width: 27.5%;
  height: 3.5em;
  display: grid;
  grid-template-columns: 2.4em minmax(0, 1fr) 2.6em;
  grid-template-rows: minmax(0, 1fr) 0.5em;
  gap: 0.15em 0.45em;
  padding: 0.25em 0.35em;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid rgb(242 214 147 / 45%);
  border-radius: 0.7em;
  background: rgb(28 18 56 / 92%);
  box-shadow: inset 0 0 1em rgb(126 96 206 / 30%);
  font-size: clamp(8px, 2.6vw, 13px);
}

.moon2 .teammate-avatar {
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  width: 2.4em;
  height: 2.4em;
  display: grid;
  place-items: center;
  border: 1px solid #f4e6c0;
  border-radius: 50%;
  background: linear-gradient(#f6dda0, #d9a441);
  color: #4a2f16;
  font-size: 1em;
  font-weight: 900;
}

.moon2 .teammate-copy {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  line-height: 1.15;
}

.moon2 .teammate-copy strong {
  max-width: 100%;
  display: block; /* 旧皮肤在 <=380 宽 / <=759 高时会把队友名藏掉，这里恢复 */
  color: #ffe7bd;
  font-size: 0.95em;
}

.moon2 .teammate-copy span {
  max-width: 100%;
  color: #b3afe0;
  font-size: 0.72em;
}

.moon2 .teammate-meter {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
  height: 0.5em;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(8 4 26 / 80%);
}

.moon2 .teammate-meter span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #f2d693, #ffb04a);
}

.moon2 .rescue-button {
  grid-column: 3;
  grid-row: 1 / 3;
  align-self: center;
  width: 2.5em;
  height: 2.5em;
  padding: 0;
  border: 1px solid rgb(242 214 147 / 40%);
  border-radius: 50%;
  background: rgb(58 38 104 / 95%);
  color: #cfc7ef;
  box-shadow: none;
}

.moon2 .rescue-button:disabled {
  background: rgb(58 38 104 / 95%);
  opacity: 0.55;
  cursor: default;
}

.moon2 .rescue-button.is-available {
  border-color: #fff0c4;
  background: linear-gradient(#f2d693, #d9a441);
  color: #4a2f16;
  box-shadow: 0 0 0.6em rgb(255 214 130 / 72%);
  opacity: 1;
}

.moon2 .rescue-button svg {
  width: 1.4em;
  height: 1.4em;
}

/* --- ② 阶段徽章：血条左上角，压在血条上沿外侧。三步文字已删（与血条三段重复） --- */
.moon2-phase-tag {
  position: absolute;
  z-index: 9;
  left: 8.9%;
  top: calc(0.35% - 1.5em);
  display: flex;
  align-items: center;
  /* 字号目标值：3.1vw；窄屏/矮屏时 .game-frame 会被高度约束收窄，纯 vw 会相对壳宽偏大
     而撞上计时牌 → main.js syncPhaseTagSize() 再套一层「实测装得下」的上限。 */
  font-size: var(--moon2-tag-font, clamp(9px, 3.1vw, 13px));
  line-height: 1;
  pointer-events: none;
}

.moon2 .phase-pill {
  position: static;
  inset: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3em;
  width: auto;
  height: 1.75em;
  padding: 0 0.5em;
  box-sizing: border-box;
  border: 1px solid rgb(242 214 147 / 48%);
  border-radius: 999px;
  background: rgb(28 18 56 / 94%);
  color: #ffe7bd;
  font-size: 1em;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 4px rgb(10 6 30 / 55%);
}

.moon2 .phase-pill svg {
  width: 1.15em;
  height: 1.15em;
  color: #9fd8ff;
}

.moon2 .phase-pill[data-phase="exposed"] {
  border-color: #f4c64e;
  background: rgb(122 86 20 / 94%);
  color: #fff3cf;
}

.moon2 .phase-pill[data-phase="exposed"] svg {
  color: #ffe9a8;
}

.moon2 .phase-pill[data-phase="enraged"] {
  border-color: #ff8a8a;
  background: rgb(158 32 48 / 94%);
  color: #ffffff;
}

.moon2 .phase-pill[data-phase="enraged"] svg {
  color: #ffd2d2;
}

.moon2 .phase-pill[data-phase="defeated"] {
  border-color: #9ef5d2;
  background: rgb(24 92 72 / 94%);
  color: #d6ffee;
}

.moon2 .phase-pill[data-phase="defeated"] svg {
  color: #b6ffe4;
}

/* ===== 双兔捣月 六次修正（2026-09-11 下午）：三阶段直接映射到血条 ===== */
/* 阈值同 core-shared.js:598-605：hp>70% 护盾 ×0.65 / 35%<hp≤70% 破防 ×1.6 / hp≤35% 狂暴 ×1.2。
   血条左锚定、从右往左掉 → 最右段（护盾）先被打空，前沿依次经过 护盾→破防→狂暴。
   填充与刻度放进同一个 track，避免旧皮肤 padding:0 6% 造成的刻度错位。 */
.moon2 .boss-health__track {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  height: 46%;
}

.moon2 .boss-health__zone {
  position: absolute;
  top: 0;
  bottom: 0;
  overflow: hidden;
  /* 非活跃段必须仍然看得清（底盘 hp-frame.png 是浅粉底，深色低透明会糊成一片）→ 用亮色 + 0.72 透明 */
  opacity: 0.72;
  transition: opacity 220ms ease;
}

.moon2 .boss-health__zone[data-zone="rage"] {
  left: 0;
  width: 35%;
  border-radius: 999px 0 0 999px;
}

.moon2 .boss-health__zone[data-zone="break"] {
  left: 35%;
  width: 35%;
}

.moon2 .boss-health__zone[data-zone="shield"] {
  left: 70%;
  width: 30%;
  border-radius: 0 999px 999px 0;
}

.moon2 .boss-health__zone > span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  display: block;
  width: 0;
  transition: width 240ms ease;
}

/* 左→右 = 蓝(护盾) → 金(破防) → 红(狂暴)，与扣血方向一致，读作一条温度带 */
.moon2 .boss-health__zone[data-zone="rage"] > span {
  background: #e5533f;
  box-shadow: 0 0 5px rgb(229 83 63 / 60%);
}

.moon2 .boss-health__zone[data-zone="break"] > span {
  background: #f0b23f;
  box-shadow: 0 0 5px rgb(240 178 63 / 60%);
}

.moon2 .boss-health__zone[data-zone="shield"] > span {
  background: #5b9ce8;
  box-shadow: 0 0 5px rgb(91 156 232 / 60%);
}

.moon2 .boss-health__zone.is-active {
  opacity: 1;
}

/* 破防期是唯一的输出翻倍窗口，当前段让它呼吸起来 */
.moon2 .boss-health__zone[data-zone="break"].is-active > span {
  animation: moon2-break-window 1.5s ease-in-out infinite;
}

@keyframes moon2-break-window {
  0%,
  100% { filter: brightness(1); }
  50% { filter: brightness(1.38); }
}

.moon2 .boss-health__tick {
  position: absolute;
  top: -14%;
  bottom: -14%;
  width: 2px;
  background: #f2d693;
  box-shadow: 0 0 3px rgb(48 22 12 / 75%);
}

.moon2 .boss-health__tick[data-mark="35"] { left: 35%; }
.moon2 .boss-health__tick[data-mark="70"] { left: 70%; }

.moon2 .boss-health[data-phase="defeated"] {
  opacity: 0.5;
}

/* ===== 双兔捣月 七次修正（2026-09-11 中午）：删三步文字 / 放大徽章 / 缩榜按钮 ===== */
/* 1) 三步文字（.anchor-row）整块删除 —— 与血条三段重复，DOM 与样式一并移除。
      徽章现在独占血条左上角，字号目标值从 1.55vw 提到 3.1vw（390 宽下约 8px → 12.1px）。
      注意 .moon2-phase-tag 的 -1.5em 会随字号同步上移，徽章变高后下沿约压在血条上沿 3px 处。 */

/* 2) 榜按钮：底框与「榜」字按 0.82 比例同步缩小（原来视觉过重）。
      右缘仍在 96%（left 89.4+6.6 → 90.6+5.4）；圆钮高度 = 宽度，缩了以后中心会上移，
      用 translateY(11.11%) 补回来 —— translate 的百分比相对元素自身高度，
      正好等于旧的「0.6% × 容器宽」位移，不受容器高宽比影响。 */
.moon2 #leaderboard-button {
  width: 5.4%;
  left: 90.6%;
  transform: translateY(11.11%);
  box-shadow: 0 0 0 1.3px #f2d693, 0 0 0 2.5px rgb(122 88 42 / 68%), 0 1.6px 5px rgb(10 6 30 / 60%);
}

.battle-shell.moon2 {
  --moon2-rank-font: clamp(7.5px, 2.45vw, 11.5px);
}

/* ===== 双兔捣月 八次修正（2026-09-11 下午）：蓝紫玻璃体 / 底部按钮上移 + 文字 / 预告球左移 ===== */

/* --- ① 统一材质：跟棋盘底图同色系的蓝紫渐变 + 半透明 ---
   实测 board-panel.png 的中位色带已收敛到 rgb(64-68 59-60 94-97) ≈ #6b5e95（纯蓝紫，几乎无渐变），
   所以这里用「同色系三分段」的浅→深渐变做玻璃质感，而不是照抄底图的平面色 ——
   平面色叠在底盘上会糊成一片，看不出层级。透明度取 0.82~0.90：既能透出底色纹理，又不至于看不清文字。 */
.battle-shell.moon2 {
  --moon2-glass: linear-gradient(
    158deg,
    rgb(146 132 202 / 88%) 0%,
    rgb(108 95 150 / 84%) 48%,
    rgb(76 69 116 / 90%) 100%
  );
}

.moon2 .phase-pill {
  background: var(--moon2-glass);
}

/* 三阶段语义色保留（护盾蓝紫 / 破防金 / 狂暴红 —— 颜色本身是状态信息，统一成蓝紫会丢语义），
   只把「平面色块」换成同色相的渐变玻璃体，与新材质保持一致。 */
.moon2 .phase-pill[data-phase="exposed"] {
  background: linear-gradient(158deg, rgb(214 168 68 / 90%) 0%, rgb(150 105 26 / 86%) 100%);
}

.moon2 .phase-pill[data-phase="enraged"] {
  background: linear-gradient(158deg, rgb(214 84 96 / 90%) 0%, rgb(150 30 46 / 88%) 100%);
}

.moon2 .phase-pill[data-phase="defeated"] {
  background: linear-gradient(158deg, rgb(58 158 126 / 90%) 0%, rgb(22 88 70 / 88%) 100%);
}

.moon2 #leaderboard-button {
  background: var(--moon2-glass);
}

.moon2 .teammate-chip {
  background: var(--moon2-glass);
  border-color: rgb(242 214 147 / 38%);
}

/* --- ② 底部两角按钮：整体上移 4%（= 38 设计像素），给下方文字腾出位置 ---
   原来 top 86.8%/86.5% + 高 126px 正好顶到壳底（86.8%+13.3%=100.1%，已溢出 1px），
   文字没有立足之地。上移后底边落在 91.8% ≈ 872 设计像素，下方还有 ~40px 放标签。 */
.moon2 #invite-activity-button {
  top: 82.8%;
}

.moon2 #invite-button {
  top: 82.5%;
}

/* 图标文本：用伪元素补字（与 #leaderboard-button::before 的「榜」同一套做法，
   不往 button 里塞子元素，避免 .icon-button 的居中布局把图标顶偏，也不占点击区）。
   底色用小胶囊而不是纯文字：按钮下方是夜湖深色底，浅色字直接压上去在部分分辨率下会发虚。 */
.moon2 #invite-activity-button::after,
.moon2 #invite-button::after {
  position: absolute;
  left: 50%;
  top: 100%;
  padding: 0.18em 0.5em;
  border-radius: 999px;
  background: rgb(28 18 56 / 72%);
  color: #ffe7bd;
  font-size: clamp(9px, 2.7vw, 13px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.5px;
  white-space: nowrap;
  text-align: center;
  text-shadow: 0 1px 2px rgb(10 6 30 / 70%);
  transform: translateX(-50%);
  pointer-events: none;
}

.moon2 #invite-activity-button::after {
  content: "婵娟赠礼";
}

.moon2 #invite-button::after {
  content: "邀请搭档";
}

/* --- ③ 下个球预告：再左移 2%（= 12.6 设计像素），贴回发射器右侧 ---
   互换箭头必须同步左移相同的 2%：预告左缘 66.5% 会切进箭头右缘（旧 69.4%），
   不移的话两者重叠会从 0.9% 变成 2.9%（≈11px），箭头会糊在预告框上。
   同步移动后重叠仍是 0.9%（≈3.5px），与本次改动前一致。 */
.moon2 .next-bubble-group {
  left: 66.5%;
}

.moon2 .swap-hint {
  left: 62%;
}

/* ===== 双兔捣月 九次修正（2026-09-11 迭代9）：棋盘还原、炮台簇独立上移一行距 ===== */
/* 棋盘 11→10 行空出一行距（√3·36 ≈ 62.4 设计px = 6.56% 帧高）。棋盘/底盘已还原到 A 方案
   屏幕位置（Phaser 侧 BOARD_DROP_PX=20 恢复）；炮台独立上移（CANNON_Y 533→500.1）填补空行，
   DOM 侧炮台簇四件套同步上移 6.56%，与炮台保持贴合：
   星按钮 top 89% → 82.4% ／ 待发射球 89% → 82.4% ／ 互换箭头 88.6% → 82% ／ 连击文本 95.3% → 88.7% */
.moon2 #star-button {
  top: 82.4%;
}

.moon2 .next-bubble-group {
  top: 82.4%;
}

.moon2 .swap-hint {
  top: 82%;
}

.moon2 .combo-badge {
  top: 88.7%;
}

/* ===== 双兔捣月 十次修正（2026-09-11 迭代10）：连击回底板 / 炮台簇下移 / 顶排对齐 ===== */
/* ③ 连击文本放进炮台底板：底板=炮台素材蓝紫区（bbox 82x51 @(137.5,187)），
      按显示 222x195 换算板中心距炮台左上 (110.6,150.5)；炮台 CANNON_Y 上移5px 后
      板中心 = 911 设计px = 95.9% 帧高（translateY(-50%) 语义下 top=中心）。 */
.moon2 .combo-badge {
  top: 95.9%;
}

/* ④ 应援星球/预告泡泡/互换按钮下移 55 设计px = 5.79% 帧高（回到炮台两侧高度） */
.moon2 #star-button {
  top: 88.2%;
}

.moon2 .next-bubble-group {
  top: 88.2%;
}

.moon2 .swap-hint {
  top: 87.8%;
}

/* ⑤ 榜按钮上移，与月华护盾徽章同一水平线（徽章中心 -8.7 设计px）。
      榜按钮原生效值是 4021 行的 top:-1.2%（3828 行 -3.6% 被覆盖），
      目标中心 -8.7 → top = (-8.7-16.95-3.77)/950 = -3.1%。
      血条不参与本次上移（迭代10.1 萧何纠正：血条保持原位 0.35%，仍在徽章下方）。 */
.moon2 #leaderboard-button {
  top: -3.1%;
}

/* ===== 双兔捣月 十一次修正（2026-09-11）：婵娟赠礼面板 =====
   入口按钮 #invite-activity-button 的行为从「整页跳转邀请活动」改为「打开本面板」：
   面板 = ①我的状态（主游戏角色）②活动积分与档位赠礼 ③邀请赠礼入口行（点这一行才进原邀请页）。
   面板沿用 .dialog-surface 的浅色纸质底（--paper / --ink），强调色用月华金 --gold，
   与排行榜/结算弹窗同一材质；邀请行固定在底部，只有中间内容区滚动。 */
.gift-dialog {
  width: min(calc(100vw - 24px), 420px);
}

.gift-surface {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: min(88dvh, 740px);
  overflow: hidden;
  padding: 16px 14px 12px;
}

.gift-surface [hidden] {
  display: none !important;
}

.gift-scroll {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  margin: 0 -2px;
  padding: 0 2px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ① 我的状态 */
.gift-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgb(244 198 78 / 45%);
  border-radius: 10px;
  background: linear-gradient(150deg, #fffaf0 0%, #fdf3e0 100%);
}

.gift-avatar {
  position: relative;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 8px;
  background: #f2e8d4;
}

.gift-avatar__img {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
}

.gift-avatar__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 56px;
  height: 56px;
  object-fit: contain;
  pointer-events: none;
}

.gift-avatar__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #b09154;
  font-size: 20px;
  font-weight: 800;
}

.gift-profile__meta {
  flex: 1;
  min-width: 0;
}

.gift-profile__line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.gift-profile__name {
  color: #2f2a3a;
  font-size: 16px;
  font-weight: 800;
}

.gift-profile__server {
  color: #8b8296;
  font-size: 12px;
  font-weight: 600;
}

.gift-profile__title {
  display: block;
  max-width: 118px;
  max-height: 24px;
  margin-top: 4px;
}

.gift-profile__hint {
  margin: 4px 0 0;
  color: #9a90a8;
  font-size: 11px;
}

.gift-profile__switch {
  flex: none;
  width: auto;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
}

/* ② 活动积分 */
.gift-points {
  padding: 10px 12px 12px;
  border: 1px solid rgb(23 36 44 / 10%);
  border-radius: 10px;
  background: #fff;
}

.gift-points__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.gift-points__label {
  color: #5b5468;
  font-size: 13px;
  font-weight: 700;
}

.gift-points__value {
  color: #b8860b;
  font-size: 22px;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.gift-points__track {
  position: relative;
  height: 8px;
  margin-top: 8px;
  border-radius: 999px;
  background: #efe8db;
  overflow: hidden;
}

.gift-points__fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0%, #e0932c 100%);
  transition: width 220ms ease;
}

.gift-points__hint {
  margin: 6px 0 0;
  color: #9a90a8;
  font-size: 11px;
}

/* ③ 积分奖励档位 */
.gift-section-title {
  margin: 2px 0 0;
  color: #5b5468;
  font-size: 13px;
  font-weight: 800;
}

.gift-reward-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.gift-reward {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e8e1d3;
  border-radius: 10px;
  background: #fff;
}

.gift-reward.is-claimable {
  border-color: rgb(244 198 78 / 78%);
  background: linear-gradient(150deg, #fffdf5 0%, #fdf6e4 100%);
}

.gift-reward.is-claimed {
  opacity: 0.72;
}

.gift-reward__info {
  flex: 1;
  min-width: 0;
}

.gift-reward__desc {
  margin: 0 0 8px;
  color: #3c3749;
  font-size: 12.5px;
  font-weight: 600;
}

.gift-reward__goods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gift-reward__side {
  flex: none;
  text-align: right;
}

.gift-reward__progress {
  margin: 0 0 6px;
  color: #9a90a8;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.gift-reward__progress.is-done {
  color: #b8860b;
  font-weight: 700;
}

.gift-reward__claim {
  width: auto;
  min-height: 0;
  padding: 6px 14px;
  font-size: 13px;
}

.gift-reward__state {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
}

.gift-reward__state.is-claimed {
  color: #3f927b;
}

.gift-reward__state.is-locked {
  color: #b3aabd;
  font-weight: 600;
}

.gift-reward__state.is-pending {
  color: #c98a1f;
}

.gift-empty {
  margin: 8px 0 0;
  color: #9a90a8;
  font-size: 12.5px;
}

/* 道具图标（含数量，点击出气泡） */
.gift-good {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  cursor: pointer;
}

.gift-good__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 44px;
  height: 44px;
}

.gift-good__icon {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.gift-good__count {
  position: absolute;
  right: 1px;
  bottom: 0;
  color: #2a2530;
  font-size: 11px;
  font-weight: 800;
  font-style: normal;
  text-shadow:
    -1px -1px 0 #fff, 1px -1px 0 #fff,
    -1px 1px 0 #fff, 1px 1px 0 #fff,
    0 -1px 0 #fff, 0 1px 0 #fff,
    -1px 0 0 #fff, 1px 0 0 #fff;
}

/* 无 goods-info 时降级为文字胶囊 */
.gift-good[data-fallback="true"] {
  display: inline-flex;
  align-items: center;
  width: auto;
  height: auto;
  padding: 4px 8px;
  border-radius: 6px;
  background: #f4efe4;
}

.gift-good[data-fallback="true"] .gift-good__label {
  color: #4a4356;
  font-size: 12px;
}

.gift-good[data-fallback="true"] .gift-good__count {
  position: static;
  margin-left: 4px;
  text-shadow: none;
}

/* ④ 邀请赠礼入口行（固定在底部，点击才跳转原邀请页） */
.gift-invite-row {
  display: flex;
  flex: none;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 2px;
  padding: 10px;
  border: 1px solid rgb(244 198 78 / 62%);
  border-radius: 10px;
  background: linear-gradient(150deg, #fff8e6 0%, #fdeecd 100%);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.gift-invite-row:hover {
  box-shadow: 0 6px 18px rgb(196 148 32 / 22%);
}

.gift-invite-row:active {
  transform: translateY(1px);
}

.gift-invite-row__icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--gold);
  color: #46340a;
}

.gift-invite-row__icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.gift-invite-row__copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.gift-invite-row__copy strong {
  color: #4a3608;
  font-size: 14px;
  font-weight: 800;
}

.gift-invite-row__copy small {
  color: #8a6f2c;
  font-size: 11.5px;
}

.gift-invite-row__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 0 3px rgb(233 67 85 / 18%);
}

.gift-invite-row__arrow {
  flex: none;
  width: 18px;
  height: 18px;
  color: #a8822e;
  stroke-width: 2.4;
}

/* 道具详情气泡 */
.gift-good-tip {
  position: absolute;
  z-index: 6;
  max-width: 210px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgb(38 28 66 / 95%);
  box-shadow: 0 8px 20px rgb(8 10 34 / 35%);
  color: #f4effc;
  font-size: 12px;
  line-height: 1.5;
}

.gift-good-tip strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
}

.gift-good-tip p {
  margin: 0;
}

@media (max-height: 720px) {
  .gift-surface {
    gap: 8px;
    padding: 12px 12px 10px;
  }

  .gift-avatar {
    width: 48px;
    height: 48px;
  }

  .gift-avatar__img {
    left: 3px;
    top: 3px;
    width: 42px;
    height: 42px;
  }

  .gift-avatar__frame {
    width: 48px;
    height: 48px;
  }
}

/* ===== 月势连章：连击倍率、升格横幅与结算荣誉 ===== */
.moon2 .combo-badge {
  left: 50%;
  display: grid;
  grid-template-rows: 20px 15px;
  align-content: center;
  justify-items: center;
  width: 116px;
  min-width: 116px;
  height: 39px;
  min-height: 39px;
  padding: 2px 8px;
  overflow: hidden;
  border-radius: 6px;
  color: #fff9e8;
  text-align: center;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: filter 160ms ease, transform 160ms ease;
}

.moon2 #pause-button {
  position: absolute;
  left: 1.3%;
  top: -3.1%;
  z-index: 10;
  display: grid;
  width: 6.6%;
  min-width: 0;
  height: auto;
  min-height: 0;
  aspect-ratio: 1;
  place-items: center;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--moon2-glass);
  box-shadow: 0 0 0 1.6px #f2d693, 0 0 0 3px rgb(122 88 42 / 68%), 0 2px 6px rgb(10 6 30 / 60%);
  color: #f7e3ac;
}

.moon2 #pause-button svg {
  width: 56%;
  height: 56%;
}

.feedback-settings {
  flex-wrap: wrap;
  row-gap: 10px;
}

.moon2 .combo-badge span,
.moon2 .combo-badge small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

.moon2 .combo-badge span {
  font-size: 14px;
  line-height: 20px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgb(35 22 66 / 80%);
}

.moon2 .combo-badge small {
  color: #ffe5a0;
  font-size: 10px;
  line-height: 15px;
  font-weight: 800;
}

.moon2 .combo-badge.is-primed {
  filter: drop-shadow(0 0 5px rgb(255 225 122 / 78%));
  animation: moon-combo-primed 400ms ease-in-out 1;
}

.moon2 .combo-badge.is-broken {
  transform: translate(-50%, -50%) scale(0.94);
  filter: saturate(0.45);
}

.moon2 .combo-badge[data-tier="moonlit-court"],
.moon2 .combo-badge[data-tier="sky-moon"] {
  color: #cffff0;
}

.moon2 .combo-badge[data-tier="palace-echo"],
.moon2 .combo-badge[data-tier="moon-palace-peerless"] {
  color: #fff0a8;
  filter: drop-shadow(0 0 6px rgb(255 217 99 / 75%));
}

@keyframes moon-combo-primed {
  from { transform: translate(-50%, -50%) scale(1); }
  to { transform: translate(-50%, -50%) scale(1.04); }
}

.combo-presentation {
  --combo-accent: #f2b3aa;
  --combo-secondary: #98ddc6;
  position: absolute;
  left: 2.5%;
  top: 53%;
  z-index: 48;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(66%, 340px);
  height: 102px;
  overflow: hidden;
  border: 2px solid var(--combo-accent);
  border-radius: 8px;
  background-color: rgb(46 37 78 / 96%);
  background-image: url("../assets/moon2/alt-combo-plate.png");
  background-position: center;
  background-size: 100% 100%;
  box-shadow:
    0 12px 28px rgb(24 20 58 / 42%),
    inset 0 0 0 1px rgb(255 255 255 / 24%);
  opacity: 0;
  transform: translateY(-48%) scale(0.94);
  transform-origin: left center;
  pointer-events: none;
  transition: opacity 150ms ease, transform 180ms ease;
}

.combo-presentation[hidden] {
  display: none;
}

.combo-presentation.is-visible {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.combo-presentation.is-compact {
  top: 58%;
  grid-template-columns: 56px minmax(0, 1fr);
  width: min(62%, 300px);
  height: 68px;
}

.combo-presentation[data-tier="laurel-flow"] {
  --combo-accent: #f2a99f;
  --combo-secondary: #9de3c9;
}

.combo-presentation[data-tier="moonlit-court"] {
  --combo-accent: #8ee6c4;
  --combo-secondary: #f5b4aa;
}

.combo-presentation[data-tier="sky-moon"] {
  --combo-accent: #9fd6ff;
  --combo-secondary: #f4c96d;
}

.combo-presentation[data-tier="palace-echo"] {
  --combo-accent: #f5cf6f;
  --combo-secondary: #b8f0df;
}

.combo-presentation[data-tier="moon-palace-peerless"],
.combo-presentation[data-tier="full-moon-clear"] {
  --combo-accent: #ffe08a;
  --combo-secondary: #f29f9b;
  box-shadow:
    0 14px 34px rgb(24 20 58 / 52%),
    0 0 18px rgb(255 222 119 / 42%),
    inset 0 0 0 1px rgb(255 255 255 / 30%);
}

.combo-presentation__art {
  position: relative;
  grid-row: 1 / 3;
  min-width: 0;
  overflow: hidden;
}

.combo-presentation__moon {
  position: absolute;
  left: 8px;
  top: 18px;
  width: 58px;
  height: 58px;
  border: 3px solid rgb(255 239 166 / 92%);
  border-radius: 50%;
  background: #ffe9a3;
  box-shadow: 0 0 14px rgb(255 226 121 / 70%);
}

.combo-presentation__art img {
  position: absolute;
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 3px 4px rgb(22 18 54 / 45%));
}

.combo-presentation__art img:nth-of-type(1) { left: 2px; top: 48px; }
.combo-presentation__art img:nth-of-type(2) { left: 21px; top: 21px; width: 38px; height: 38px; }
.combo-presentation__art img:nth-of-type(3) { left: 42px; top: 49px; }

.combo-presentation.is-visible .combo-presentation__art img:nth-of-type(1) {
  animation: moon-combo-orbit-left 650ms ease-out both;
}

.combo-presentation.is-visible .combo-presentation__art img:nth-of-type(3) {
  animation: moon-combo-orbit-right 650ms ease-out both;
}

.combo-presentation__copy {
  align-self: center;
  min-width: 0;
  padding: 5px 14px 3px 2px;
  color: #fffdf5;
  text-shadow: 0 1px 2px rgb(26 20 59 / 80%);
}

.combo-presentation__copy > span,
.combo-presentation__copy > strong,
.combo-presentation__copy > small,
.combo-presentation__copy > b {
  display: block;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  letter-spacing: 0;
}

.combo-presentation__copy > span {
  color: var(--combo-secondary);
  font-size: 10px;
  line-height: 14px;
  font-weight: 800;
}

.combo-presentation__copy > strong {
  color: #fff4bf;
  font-size: 23px;
  line-height: 28px;
  font-weight: 950;
}

.combo-presentation__copy > small {
  color: #e8f8f2;
  font-size: 11px;
  line-height: 15px;
}

.combo-presentation__copy > b {
  color: #ffe19a;
  font-size: 11px;
  line-height: 15px;
}

.combo-presentation__tags {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  min-height: 21px;
  padding: 0 12px 8px 2px;
  overflow: hidden;
}

.combo-presentation__tags:empty {
  display: none;
}

.combo-presentation__tags span {
  flex: 0 1 auto;
  min-width: 0;
  padding: 2px 6px;
  overflow: hidden;
  border: 1px solid rgb(255 232 157 / 78%);
  border-radius: 4px;
  background: rgb(48 36 81 / 72%);
  color: #fff0b5;
  font-size: 9px;
  line-height: 13px;
  font-weight: 850;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.combo-presentation__tags span.is-team {
  border-color: rgb(145 231 202 / 85%);
  color: #c9ffec;
}

.combo-presentation__tags [data-tag="full-moon-clear"] { border-radius: 50%; }
.combo-presentation__tags [data-tag="star-wish"] { border-style: dashed; }
.combo-presentation__tags [data-tag="moonfall"] { border-width: 2px; }
.combo-presentation[data-tier="jade-chime"] { border-style: dotted; }
.combo-presentation[data-tier="laurel-flow"] { border-style: dashed; }
.combo-presentation[data-tier="moonlit-court"] { border-width: 3px; }
.combo-presentation[data-tier="sky-moon"] { border-style: double; border-width: 4px; }
.combo-presentation[data-tier="palace-echo"] { border-style: ridge; border-width: 4px; }
.combo-presentation[data-tier="moon-palace-peerless"] { border-style: double; border-width: 5px; }

.combo-presentation.is-compact .combo-presentation__moon {
  left: 10px;
  top: 9px;
  width: 48px;
  height: 48px;
}

.combo-presentation.is-compact .combo-presentation__art img {
  width: 23px;
  height: 23px;
}

.combo-presentation.is-compact .combo-presentation__art img:nth-of-type(1) { left: 3px; top: 34px; }
.combo-presentation.is-compact .combo-presentation__art img:nth-of-type(2) { left: 23px; top: 14px; width: 28px; height: 28px; }
.combo-presentation.is-compact .combo-presentation__art img:nth-of-type(3) { left: 33px; top: 35px; }
.combo-presentation.is-compact .combo-presentation__copy { padding-top: 7px; }
.combo-presentation.is-compact .combo-presentation__copy > strong { font-size: 18px; line-height: 22px; }
.combo-presentation.is-compact .combo-presentation__copy > small,
.combo-presentation.is-compact .combo-presentation__copy > b { display: none; }
.combo-presentation.is-compact .combo-presentation__tags { padding-bottom: 5px; }

.combo-presentation.is-teammate .combo-presentation__copy > b {
  display: none;
}

@keyframes moon-combo-orbit-left {
  from { opacity: 0; transform: translate(18px, -10px) scale(0.7); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}

@keyframes moon-combo-orbit-right {
  from { opacity: 0; transform: translate(-18px, -8px) scale(0.7); }
  to { opacity: 1; transform: translate(0, 0) scale(1); }
}

.result-combo {
  display: grid;
  justify-items: center;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid rgb(230 178 72 / 48%);
  border-radius: 6px;
  background: #fff7df;
  color: #4a315d;
}

.result-combo[hidden] {
  display: none;
}

.result-combo span,
.result-combo small {
  font-size: 11px;
  line-height: 15px;
}

.result-combo strong {
  color: #8d3d54;
  font-size: 20px;
  line-height: 25px;
}

.result-combo small {
  white-space: pre-line;
  overflow-wrap: anywhere;
  text-align: center;
}

@media (max-width: 360px), (max-height: 720px) {
  .combo-presentation {
    top: 55%;
    grid-template-columns: 54px minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 18px;
    width: 66%;
    height: 72px;
  }

  .combo-presentation__moon {
    left: 9px;
    top: 10px;
    width: 48px;
    height: 48px;
  }

  .combo-presentation__art img {
    width: 23px;
    height: 23px;
  }

  .combo-presentation__art img:nth-of-type(1) { left: 3px; top: 37px; }
  .combo-presentation__art img:nth-of-type(2) { left: 21px; top: 16px; width: 29px; height: 29px; }
  .combo-presentation__art img:nth-of-type(3) { left: 31px; top: 38px; }
  .combo-presentation__copy { padding: 5px 7px 0 1px; }
  .combo-presentation__copy > strong { font-size: 17px; line-height: 21px; }
  .combo-presentation__copy > small,
  .combo-presentation__copy > b { display: none; }
  .combo-presentation__tags { min-height: 18px; padding: 0 6px 3px 1px; }
  .combo-presentation__tags span { padding: 1px 3px; font-size: 8px; line-height: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .moon2 .combo-badge,
  .combo-presentation,
  .combo-presentation__art img {
    animation: none !important;
    transition: none !important;
  }
}

.bubble-reduced-motion .moon2 .combo-badge,
.bubble-reduced-motion .combo-presentation,
.bubble-reduced-motion .combo-presentation__art img {
  animation: none !important;
  transition: none !important;
}

.combo-presentation-active .assist-feed {
  opacity: 0;
}

.combo-presentation__art .combo-presentation__duo {
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: none !important;
}

.combo-presentation__art > :not(.combo-presentation__duo) { display: none; }
.moon2 .teammate-copy { position: relative; }
.moon2 #teammate-combo {
  position: absolute;
  top: 100%;
  right: 0;
  padding: 2px 4px;
  background: #314139;
  color: #fff0b5;
  font-size: 10px;
  white-space: nowrap;
  pointer-events: none;
  border-radius: 3px;
}

.combo-presentation.is-visible .combo-presentation__tags span {
  animation: combo-stamp-in 180ms ease-out both;
}
.combo-presentation.is-visible .combo-presentation__tags span:nth-child(2) { animation-delay: 50ms; }
.combo-presentation.is-visible .combo-presentation__tags span:nth-child(3) { animation-delay: 90ms; }
@keyframes combo-stamp-in {
  from { opacity: 0; transform: scale(1.18); }
  to { opacity: 1; transform: scale(1); }
}
.bubble-reduced-motion .combo-presentation__tags span { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .combo-presentation__tags span { animation: none !important; }
}

.combo-presentation[data-tier="moon-palace-peerless"] .combo-presentation__art > *,
.combo-presentation[data-tier="full-moon-clear"] .combo-presentation__art > * {
  display: none;
}

.combo-presentation[data-tier="moon-palace-peerless"] .combo-presentation__art .combo-presentation__duo,
.combo-presentation[data-tier="full-moon-clear"] .combo-presentation__art .combo-presentation__duo {
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: none;
}

/* Moon chapter presentation: pearl, laurel, and crown compositions. */
.combo-presentation {
  background: #173e3a;
  border: 1px solid #d5be79 !important;
  border-radius: 6px 24px 6px 24px;
  box-shadow: inset 0 0 0 3px #214d46, inset 0 0 0 4px #799578, 0 8px 18px #142d4559;
  grid-template-columns: 88px minmax(0, 1fr);
  height: 104px;
  isolation: isolate;
}
.combo-presentation::before {
  content: '';
  position: absolute;
  inset: 9px;
  border: 1px solid #d5be7966;
  border-radius: 3px 17px 3px 17px;
  z-index: -1;
  pointer-events: none;
}
.combo-presentation::after {
  content: '◆';
  position: absolute;
  right: 11px;
  top: 8px;
  color: #ecd791;
  font-size: 10px;
}
.combo-presentation[data-composition="pearl"] {
  height: 84px;
  grid-template-columns: 68px minmax(0, 1fr);
  background: #314957;
  box-shadow: inset 0 0 0 3px #314957, inset 0 0 0 4px #93b5b3, 0 6px 16px #172b4a55;
}
.combo-presentation[data-composition="laurel"] {
  background: #174b40;
}
.combo-presentation[data-composition="crown"] {
  background: #53313e;
  box-shadow: inset 0 0 0 3px #53313e, inset 0 0 0 4px #e4c685, 0 8px 20px #241b4255;
}
.combo-presentation[data-tier="moon-palace-peerless"]::after { content: '无双'; }
.combo-presentation[data-tier="moon-palace-peerless"]::after {
  top: 8px;
  right: 9px;
  width: 17px;
  padding: 4px 1px;
  border: 1px solid #f4cf9a;
  border-radius: 2px;
  background: #a84443;
  font-family: 'STKaiti', 'KaiTi', serif;
  font-size: 12px;
  line-height: 13px;
  text-align: center;
}
.combo-presentation__copy { padding: 10px 25px 0 0; }
.combo-presentation__copy > strong {
  font-family: 'STKaiti', 'KaiTi', 'Noto Serif CJK SC', serif;
  font-size: 25px;
  line-height: 30px;
  color: #ffedbc;
  text-shadow: 0 2px 0 #53372b, 0 0 9px #ebcf8240;
}
.combo-presentation__copy > span { color: #d1e6d4; font-size: 10px; line-height: 13px; }
.combo-presentation__copy > b { color: #f9d5a7; line-height: 14px; }
.combo-presentation__copy > small { font-size: 10px; line-height: 12px; }
.combo-presentation__copy > small:empty { display: none; }
.combo-presentation[data-composition="pearl"] .combo-presentation__copy { padding-top: 8px; }
.combo-presentation[data-composition="pearl"] .combo-presentation__copy > strong { font-size: 21px; line-height: 25px; }
.combo-presentation[data-composition="pearl"] .combo-presentation__copy > b { display: none; }
.combo-presentation .combo-presentation__art .combo-presentation__duo {
  inset: 4px 0 0;
  width: 100%;
  height: calc(100% - 4px);
  object-fit: contain;
  filter: drop-shadow(0 3px 2px #15292570);
  transform-origin: 50% 90%;
}
.combo-presentation.is-visible .combo-presentation__art .combo-presentation__duo {
  animation: combo-cheer-arrive 400ms cubic-bezier(.2,.8,.3,1) both !important;
}
@keyframes combo-cheer-arrive {
  0% { opacity: 0; transform: translate(-9px, 7px) rotate(-8deg) scale(.82); }
  65% { opacity: 1; transform: translate(0, -2px) rotate(2deg) scale(1.03); }
  100% { opacity: 1; transform: none; }
}

#result-dialog .result-surface {
  background: #eef3e9;
  border: 3px solid #ccb477;
  box-shadow: inset 0 0 0 3px #eef3e9, inset 0 0 0 4px #9ead8b, 0 18px 60px #111b3860;
  padding: 20px;
}
#result-dialog .result-combo {
  position: relative;
  background: transparent;
  border: 0;
  padding: 0 0 10px;
}
.result-combo-art { width: 104px; height: 104px; object-fit: contain; }
#result-combo-highlight { margin: 4px 0; white-space: pre-line; color: #67444b; font-size: 14px; line-height: 21px; }
.result-combo details { width: 100%; }
.result-combo summary { color: #426957; font-size: 12px; cursor: pointer; padding: 5px; }
#result-dialog .result-score { font-size: 32px; line-height: 38px; color: #2f594c; }
#result-dialog .command-button { min-height: 40px; border-radius: 5px; border-color: #aab998; background: #e1eadc; color: #315b4c; }
#result-dialog .command-button.is-primary { background: #315b4c; border-color: #d9c087; color: #fff0c3; }
.sheet-dialog .feedback-settings { border-color: #c8d3bd; }
#pause-dialog .dialog-surface { background: #eef3e9; border: 2px solid #cdbb85; }
.moon2 .icon-button:active, .moon2 .command-button:active { scale: .95; transition: scale 90ms ease-out; }
.moon2-chip__value { font-variant-numeric: tabular-nums; text-shadow: 0 1px #fff6d7; }
.team-celebration { position: absolute; inset: 18% 5% 10%; z-index: 40; pointer-events: none; overflow: hidden; }
.team-celebration i { position: absolute; top: 35%; width: 38%; height: 3px; background: #b5efd1; border-radius: 50%; box-shadow: 0 0 7px #dfffaa; animation: team-arc-left 500ms ease-in both; }
.team-celebration i:nth-child(2) { right: 0; background: #ffc0aa; animation-name: team-arc-right; }
.team-celebration b { position: absolute; left: 45%; top: 25%; color: #ffe5a4; font-size: 32px; animation: team-moon 650ms ease-out both; }
@keyframes team-arc-left { from { transform: translate(-100%,-20px) rotate(15deg); opacity: 0; } 50% { opacity: 1; } to { transform: translate(110%,15px); opacity: 0; } }
@keyframes team-arc-right { from { transform: translate(100%,-20px) rotate(-15deg); opacity: 0; } 50% { opacity: 1; } to { transform: translate(-110%,15px); opacity: 0; } }
@keyframes team-moon { from { opacity: 0; scale: .3; } 55% { opacity: 1; scale: 1; } to { opacity: 0; scale: 1.4; } }
.team-celebration--rescue b { color: #aef1c7; }
.teammate-avatar.has-contributed, .seat-avatar.has-contributed {
  outline: 2px solid #fff2ad; outline-offset: 2px;
  box-shadow: -3px 0 0 1px #8bdeb9;
}
#original-cast.has-contributed { border-bottom: 3px solid #b7e9c4; }
.stage-flourish { position:absolute;inset:0;overflow:hidden;pointer-events:none;z-index:39; }
.stage-flourish--break i,.stage-flourish--rage i {
  position:absolute;left:50%;top:60%;width:20px;height:32px;
  border:2px solid #bfeeff;border-radius:2px;
  transform:rotate(calc(var(--piece)*45deg));
  animation: shield-shatter 550ms ease-out both;
}
.stage-flourish--rage i {border-color:#ffc3a2;border-radius:50%;}
@keyframes shield-shatter {from{opacity:.8;transform:rotate(calc(var(--piece)*45deg)) translateY(-28px) scale(.5);}to{opacity:0;transform:rotate(calc(var(--piece)*45deg)) translateY(-100px) scale(.9);}}
.stage-flourish--clear i {position:absolute;left:26%;top:15%;width:48%;aspect-ratio:1;border:3px solid #ffe4a6;border-bottom-color:transparent;border-left-color:transparent;border-radius:50%;animation:stage-moon-close 900ms ease-out both;}
.stage-flourish--clear i:nth-child(2){rotate:180deg;}
@keyframes stage-moon-close {from{opacity:0;transform:translateY(50px) rotate(-120deg) scale(.65);}60%{opacity:1;transform:none;}to{opacity:0;transform:translateY(-10px) scale(1.05);}}
.moon2 #next-bubble-group:active {transform:rotate(12deg) scale(.93);transition:transform 100ms;}
.moon2 #star-button.is-armed {filter:drop-shadow(0 0 7px #ffe597);}
.moon2 #pause-button {min-width:28px;min-height:28px;}
.moon2 #pause-button::after {content:'';position:absolute;inset:-7px;}
.moon2 #boss-health[data-phase="exposed"] {filter:drop-shadow(0 0 3px #bee8d0);}
.moon2 #boss-health[data-phase="enraged"] {filter:drop-shadow(0 0 3px #f4a58b);}

/* Painted frames, separate character/prop layers, and authored title plates. */
.combo-presentation[data-composition] {
  background: #263f42 url('../assets/combo/frame-pearl.webp') center / 100% 100% no-repeat;
  border: 0 !important;
  box-shadow: none;
  border-radius: 6px;
}
.combo-presentation[data-composition="crown"] { background-color:#53313e; }
.combo-presentation[data-composition="laurel"] { background-color:#174b40; }
.combo-presentation[data-composition] .combo-presentation__copy { padding-top:12px;padding-right:24px; }
.combo-presentation[data-composition] .combo-presentation__tags { padding-bottom:9px; }
.combo-presentation[data-composition="laurel"] { background-image: url('../assets/combo/frame-laurel.webp'); }
.combo-presentation[data-composition="crown"] { background-image: url('../assets/combo/frame-crown.webp'); }
.combo-presentation[data-composition]::before { border: 0; }
.combo-presentation[data-composition]::after { display: none; }
.combo-presentation[data-tier="moon-palace-peerless"][data-composition]::after {
  display:block;content:'';width:25px;height:25px;top:8px;right:12px;
  border:0;background:url('../assets/combo/stamp-peerless.png') center / contain no-repeat;
}
.moon2 .combo-badge .combo-best-record {
  position:absolute;bottom:calc(100% + 7px);left:50%;transform:translateX(-50%);
  padding:2px 6px 2px 22px;max-width:none;font-size:10px;line-height:16px;
  background:#355647 url('../assets/combo/stamp-best.png') 3px center / 16px 16px no-repeat;
  border:1px solid #dbbc80;border-radius:4px;color:#ffe9b5;
}
.moon2 .combo-badge .combo-best-record[hidden] {display:none;}
#result-combo-next {font-size:11px;color:#55745d;margin:3px 0;}
.moon2 #star-button.is-armed::after {content:'';position:absolute;inset:-3px;border:2px solid #ffeab2;border-radius:50%;pointer-events:none;box-shadow:0 0 5px #ffeab2;}
.team-celebration--rescue i {height:8px;border-radius:100% 0;background:#c8e9a1;}
#teammate-combo:not([hidden]) {animation:teammate-cheer 200ms ease-out;}
.sheet-dialog .dialog-surface {background-color:#eef3e9;border:2px solid #cdbb85;}
.sheet-dialog .icon-button {color:#355d4e;}
.sheet-dialog .command-button {border-radius:5px;}
.combo-presentation.is-visible [data-combo-score] {animation:combo-score-settle 350ms ease-out both;}
@keyframes combo-score-settle {from{opacity:0;transform:translateY(5px) scale(.96);}to{opacity:1;transform:none;}}
.bubble-reduced-motion [data-combo-score],.bubble-reduced-motion #teammate-combo {animation:none !important;}
@media(prefers-reduced-motion:reduce){[data-combo-score],#teammate-combo{animation:none !important;}}
@keyframes teammate-cheer {from{opacity:0;translate:0 3px;}to{opacity:1;translate:0 0;}}
.combo-presentation.has-title-art [data-combo-title] {
  position: absolute;
  width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);
}
.combo-title-art { display: block; width: 100%; height: 31px; object-fit: contain; object-position: left center; }
.combo-title-art[hidden] { display: none; }
.combo-presentation .combo-presentation__art .combo-presentation__duo {
  inset: 12% auto 0 0; width: 96%; height: 85%;
}
.combo-presentation .combo-presentation__art .combo-presentation__prop {
  display: block !important; position: absolute; width: 45%; height: 48%;
  left: 52%; top: 23%; object-fit: contain; filter: drop-shadow(0 1px 3px #664d3470);
  transform-origin: 25% 80%; z-index: 2;
}
.combo-presentation[data-pose="moon"] .combo-presentation__art .combo-presentation__prop {
  left: 30%;top: 0;width: 42%;height: 45%;z-index: 0;
}
.combo-presentation[data-pose="crown"] .combo-presentation__art .combo-presentation__prop { left: 30%;top: 36%;width: 64%;height: 40%; }
.combo-presentation.is-visible .combo-presentation__prop { animation: combo-prop-lift 600ms cubic-bezier(.2,.7,.3,1) both; }
.combo-presentation[data-pose="fan"].is-visible .combo-presentation__prop { animation-name: combo-prop-fan; }
.combo-presentation[data-pose="moon"].is-visible .combo-presentation__prop { animation-name: combo-prop-moon; }
@keyframes combo-prop-lift { from { opacity: 0;transform: translateY(13px) rotate(-12deg); } 70% { opacity: 1;transform: translateY(-3px) rotate(3deg); } to { opacity:1;transform:none; } }
@keyframes combo-prop-fan { from { opacity:0;transform:rotate(-65deg) scale(.7); } to { opacity:1;transform:rotate(5deg); } }
@keyframes combo-prop-moon { from { opacity:0;transform:translateY(18px) scale(.3); } 65% { opacity:1;transform:scale(1.12); } to { opacity:1;transform:none; } }
.combo-presentation__tags span { display:flex;align-items:center; }
.combo-presentation__tags span img { width:14px;height:14px;object-fit:contain;margin-right:2px; }
.combo-presentation__tags span::before { display:none; }
.combo-presentation.is-moon-complete::before {
  display:block;inset:5px;border:2px solid #ffe5a0;border-radius:50%;
  animation: combo-clear-moon 900ms ease-out both;
}
@keyframes combo-clear-moon { from {opacity:0;transform:scale(.6) rotate(-45deg);clip-path:inset(0 50% 0 0);} 60% {opacity:.8;clip-path:inset(0);transform:scale(1);} to {opacity:0;transform:scale(1.1);} }
.combo-presentation.is-compact .combo-title-art { height:24px; }
@media (max-width:360px), (max-height:720px) { .combo-title-art {height:25px;} .combo-presentation__tags span img {width:10px;height:10px;} }
.bubble-reduced-motion .combo-presentation__prop,
.bubble-reduced-motion .combo-presentation.is-moon-complete::before {animation:none !important;}
@media(prefers-reduced-motion:reduce){.combo-presentation__prop,.combo-presentation.is-moon-complete::before{animation:none !important;}}
.boss-stage.is-hit .boss-image { filter: brightness(1.15) drop-shadow(0 0 7px #ffe8a7); }
.boss-health__track { box-shadow: inset 0 1px 4px #3a2d4045; }
.moon2 .boss-health__trail {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: 999px;
  background: #fff3c9;
  box-shadow: 0 0 5px #ffedb2;
  pointer-events: none;
}
.moon2 .boss-health__zone > span { transition: none; }
.moon2 .damage-float {
  left: 40%;
  right: 2%;
  max-width: 90%;
  font-size: 19px;
  line-height: 1.25;
  white-space: normal;
}
.moon2 .damage-float.is-visible { animation: battle-damage-rise var(--damage-duration, 800ms) ease-out both; }
@keyframes battle-damage-rise {
  0% { opacity: 0; transform: translateY(5px); }
  15%, 78% { opacity: 1; transform: translateY(-3px); }
  100% { opacity: 0; transform: translateY(-10px); }
}
.bubble-reduced-motion .damage-float.is-visible { animation: none; opacity: 1; transform: none; }
.moon2 .boss-stage[data-hit-level="2"] .damage-float { font-size: 22px; }
.moon2 .boss-stage[data-hit-level="3"] .damage-float { font-size: 25px; }
.result-surface { position: relative; isolation: isolate; }
.result-finale {
  position: absolute; inset: 0 0 auto; height: 155px; overflow: hidden;
  pointer-events: none; z-index: -1;
}
.result-finale[hidden] { display: none; }
.result-finale img {
  position: absolute; width: 140px; height: 140px; object-fit: contain;
  left: calc(50% - 70px); top: 0; opacity: 0;
  animation: result-moon-release 700ms ease-out both;
}
.result-finale i {
  position: absolute; left: 50%; top: 75px; width: 3px; height: 10px;
  background: #eec46d; border-radius: 50%; opacity: 0;
  animation: result-moon-dust 650ms calc(120ms + var(--dust-index) * 8ms) ease-out both;
}
@keyframes result-moon-release {
  0% { opacity: .45; transform: scale(.82); }
  38% { opacity: .35; filter: brightness(1.4); }
  100% { opacity: 0; transform: scale(1.12) translateY(-12px); }
}
@keyframes result-moon-dust {
  0% { opacity: 0; transform: translate(0, 0); }
  22% { opacity: .8; }
  100% { opacity: 0; transform: translate(var(--dust-x), var(--dust-y)) rotate(80deg); }
}
.result-finale.is-reduced img { animation: none; opacity: .15; }
.result-finale.is-reduced i { display: none; }
#result-dialog[open] .result-combo-art { animation: combo-cheer-arrive 500ms ease-out both; }
@media (max-height: 760px) {
  .result-combo-art { width: 72px; height: 72px; }
  #result-dialog .result-surface { padding: 12px 18px; }
}
.bubble-reduced-motion #result-dialog .result-combo-art { animation: none !important; }
@media (prefers-reduced-motion: reduce) { #result-dialog .result-combo-art { animation: none !important; } }
.combo-presentation__tags { gap: 5px; padding: 2px 12px 8px 0; min-height: 23px; }
.combo-presentation__tags span {
  border: 1px solid #a5bf93 !important;
  border-radius: 3px !important;
  color: #e6edc1;
  background: #173730;
  font-size: 9px;
  line-height: 13px;
  padding: 1px 4px;
}
.combo-presentation__tags span::before { margin-right: 2px; color: #f4d089; }
.combo-presentation__tags [data-tag="moonfall"]::before { content: '◈'; }
.combo-presentation__tags [data-tag="star-wish"]::before { content: '✦'; }
.combo-presentation__tags [data-tag="full-moon-clear"]::before { content: '◉'; }
.combo-presentation__tags [data-tag="laurel-rain"]::before { content: '❧'; }
.combo-presentation__tags [data-tag="twin-rabbits"]::before { content: '∞'; }
.combo-presentation.is-visible .combo-presentation__tags span:nth-child(2) { animation-delay: 120ms; }
.combo-presentation.is-visible .combo-presentation__tags span:nth-child(3) { animation-delay: 220ms; }
.combo-presentation.is-compact { height: 68px; grid-template-columns: 56px minmax(0, 1fr); }
.combo-presentation.is-compact .combo-presentation__copy { padding-top: 6px; }
.combo-presentation.is-compact .combo-presentation__copy > strong { font-size: 18px; line-height: 23px; }
.combo-presentation.is-compact .combo-presentation__tags { padding-bottom: 6px; }

.moon2 .combo-badge {
  overflow: visible;
  background: #263f3b;
  border: 1px solid #edd49a;
  box-shadow: inset 0 0 0 2px #263f3b, inset 0 0 0 3px #809e7f, 0 3px 6px #28302060;
  width: 106px;
  min-width: 106px;
  height: 42px;
  border-radius: 6px 6px 15px 15px;
}
.moon2 .combo-badge #combo-value { font-size: 16px; line-height: 20px; color: #fff2c9; }
.moon2 .combo-badge #combo-multiplier { font-size: 11px; line-height: 15px; }
.moon2 .combo-badge .combo-next-tier {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
  padding: 2px 7px;
  border: 1px solid #dabf86;
  border-radius: 4px;
  background: #254740ed;
  color: #fff0c0;
  font-size: 10px;
  line-height: 15px;
}
.moon2 .combo-badge .combo-next-tier[hidden] { display: none; }
.moon2 .combo-badge .combo-moon-progress {
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 3px;
  padding: 0 5px;
  background: #263f3b;
  border-radius: 4px;
}
.combo-moon-progress i { width: 13px; height: 5px; border-radius: 0 0 8px 8px; background: #6c8475; }
[data-moon-steps="1"] .combo-moon-progress i:nth-child(n+2),
[data-moon-steps="2"] .combo-moon-progress i:nth-child(3) { display: none; }
[data-moon-fill="1"] .combo-moon-progress i:first-child,
[data-moon-fill="2"] .combo-moon-progress i:nth-child(-n+2),
[data-moon-fill="3"] .combo-moon-progress i { background: #ffe0a1; box-shadow: 0 0 4px #f0d28f80; }
@media (max-width: 360px), (max-height: 720px) {
  .combo-presentation,
  .combo-presentation[data-composition="pearl"] { height: 76px; grid-template-columns: 58px minmax(0, 1fr); }
  .combo-presentation__copy { padding: 7px 22px 0 0; }
  .combo-presentation__copy > strong,
  .combo-presentation[data-composition="pearl"] .combo-presentation__copy > strong { font-size: 18px; line-height: 23px; }
  .combo-presentation__tags { padding: 1px 5px 5px 0; gap: 3px; }
  .combo-presentation__tags span { font-size: 8px; padding: 0 2px; }
  .combo-presentation__tags span::before { display: none; }
}
.bubble-reduced-motion .combo-presentation.is-visible .combo-presentation__art .combo-presentation__duo { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .combo-presentation.is-visible .combo-presentation__art .combo-presentation__duo { animation: none !important; }
}
