:root {
  --bg: #FFF9F2;
  --card: #FFFFFF;
  --line: #EAD8C5;
  --ink: #4A3525;
  --muted: #8C6D56;
  --coral: #FF7B54;
  --honey: #FFB26B;
  --gold: #FFD166;
  --mint: #88C999;
  --berry: #FF8FA3;
  --edge: 3px solid #4A3525;
  --shadow: 0 5px 0 #4A3525;
  --radius: 22px;
  --dock: 118px;
}

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

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang HK", "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", sans-serif;
  background: var(--bg);
  background-image: radial-gradient(#F3E5D5 1.15px, transparent 1.15px);
  background-size: 18px 18px;
  color: var(--ink);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

img { display: block; max-width: 100%; }

.app {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  margin: 0 auto;
  min-height: 100dvh;
  padding: 0 12px 28px;
  perspective: 1100px;
}

.app.has-dock { padding-bottom: calc(var(--dock) + env(safe-area-inset-bottom)); }
.app.dock-tall { --dock: 188px; }

button, .chip, .tab, .mini, .avatar-pick { touch-action: manipulation; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 249, 242, 0.94);
  backdrop-filter: blur(8px);
  padding: calc(8px + env(safe-area-inset-top)) 0 8px;
  margin: 0 -12px;
  padding-left: 12px;
  padding-right: 12px;
}

.who-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 52px;
}

.avatar, .avatar.placeholder {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: var(--edge);
  background: var(--card);
  object-fit: contain;
  flex: 0 0 auto;
}

.avatar.placeholder {
  display: grid;
  place-items: center;
  font-weight: 900;
}

.nick { font-weight: 900; font-size: 1.05rem; }
.sub { color: var(--muted); font-size: 0.82rem; font-weight: 700; }

.mute {
  position: absolute;
  top: calc(8px + env(safe-area-inset-top));
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: var(--edge);
  background: var(--card);
  box-shadow: 0 3px 0 #4A3525;
  font-size: 1.15rem;
}

.top-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }

.app-title {
  margin: 8px 0 0;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0) 42%),
    var(--card);
  border: var(--edge);
  border-radius: var(--radius);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.9),
    0 5px 0 #4A3525,
    0 14px 18px rgba(74, 53, 37, 0.12);
  padding: 14px;
  margin: 12px 0;
  transform: rotateX(2.5deg);
  transform-origin: center top;
}

.card h2, .section-label {
  margin: 0 0 8px;
  font-size: 0.92rem;
  font-weight: 900;
}

.hint, .empty-line, .fine {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 6px 0 0;
}

.row { display: flex; gap: 8px; flex-wrap: wrap; }

.btn, .chip, .tab, .mini {
  border: var(--edge);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0) 46%),
    var(--card);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 4px 0 #4A3525,
    0 8px 10px rgba(74, 53, 37, 0.08);
  font-weight: 900;
  min-height: 46px;
  padding: 8px 12px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}

.btn { width: 100%; margin-top: 8px; border-radius: 18px; }
.btn:active, .chip:active, .tab:active, .mini:active, .mute:active, .avatar-pick:active {
  transform: translateY(4px) scale(0.985);
  box-shadow: inset 0 2px 0 rgba(74, 53, 37, 0.08), 0 1px 0 #4A3525;
}

.btn-primary { background: var(--coral); color: #fff; }
.btn-gold { background: var(--gold); }
.btn-mint { background: var(--mint); }
.btn-honey { background: var(--honey); }
.btn-berry { background: var(--berry); color: #fff; }
.btn-ghost { background: transparent; box-shadow: none; border-style: dashed; }

.btn[disabled] { opacity: 0.45; transform: none; box-shadow: 0 4px 0 #4A3525; }

.btn-primary.bouncy { animation: bob 1.25s ease-in-out infinite; }
.btn-primary.bouncy:active { animation: none; }

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tab[aria-selected="true"] { background: var(--coral); color: #fff; }

.mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode .tab { min-height: 52px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; width: auto; border-radius: 999px; box-shadow: 0 3px 0 #4A3525; padding: 4px 10px 4px 4px; }
.chip img { width: 32px; height: 32px; object-fit: contain; }
.chip.on { background: var(--gold); }
.chip.want { background: var(--mint); }
.chip.avoid { background: var(--berry); color: #fff; }
.chip.locked { opacity: 0.55; }

.switch {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  text-align: left;
  margin-top: 8px;
}
.switch small { display: block; font-weight: 700; color: var(--muted); }
.switch.on { background: var(--gold); }
.switch.rain.on { background: var(--mint); }

.stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stepper .mini { width: 52px; }

.slots { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.slot {
  min-width: 92px;
  border: var(--edge);
  border-radius: 16px;
  background: #fff;
  padding: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  box-shadow: 0 3px 0 #4A3525;
}
.slot img { width: 48px; height: 48px; margin: 0 auto; object-fit: contain; }
.slot.empty { border-style: dashed; color: var(--muted); box-shadow: none; }

.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.avatar-pick {
  border: var(--edge);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 4px 0 #4A3525;
  padding: 4px 2px 6px;
  text-align: center;
}
.avatar-pick img { width: 100%; height: 68px; object-fit: contain; }
.avatar-pick span { display: block; font-size: 0.72rem; font-weight: 900; line-height: 1.2; }
.avatar-pick em { display: block; font-style: normal; font-size: 0.68rem; color: var(--muted); font-weight: 700; }
.avatar-pick.selected { background: var(--gold); }

.field {
  width: 100%;
  border: var(--edge);
  border-radius: 16px;
  min-height: 48px;
  padding: 10px 12px;
  background: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-top: 8px;
}

.dock {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(430px, 100%);
  background: #FFF9F2;
  border-top: var(--edge);
  padding: 8px 12px calc(10px + env(safe-area-inset-bottom));
  z-index: 40;
}
.dock .count { font-weight: 900; text-align: center; }
.dock .btn { margin-top: 6px; }

.stage {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  overflow: visible;
  perspective: 800px;
  transform: none;
  padding-top: 6px;
}

.stage.fly-ok {
  display: block;
  overflow: visible;
  min-height: 0;
}

#shakerImg, #scrollImg {
  width: min(78vw, 280px);
  height: auto;
  transform-origin: 50% 78%;
  user-select: none;
  pointer-events: none;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 16px 8px rgba(74, 53, 37, 0.28));
}

.stick {
  position: absolute;
  top: 18%;
  left: 50%;
  margin-left: -9px;
  width: 18px;
  height: 92px;
  transform-origin: 50% 100%;
  border-radius: 8px;
  background: #FFE8B6;
  border: 3px solid #4A3525;
  opacity: 0;
  display: grid;
  place-items: start center;
  font-weight: 900;
  color: #fff;
}
.stick::before {
  content: "吉";
  background: var(--coral);
  width: 100%;
  border-radius: 6px 6px 0 0;
  text-align: center;
  font-size: 12px;
}

.meter {
  width: min(280px, 80%);
  height: 14px;
  border: var(--edge);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  margin-top: 8px;
}
.meter > div {
  position: relative;
  height: 100%;
  width: 0;
  background: linear-gradient(180deg, #ffe08a, var(--honey) 40%, var(--coral));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.65);
  transition: width 0.12s ease-out;
}
.meter > div.hot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.75), transparent 80%);
  animation: meterShine 0.7s linear infinite;
}

.sparks { position: absolute; inset: 0; pointer-events: none; }
.spark {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 14px;
  height: 14px;
  margin: -7px;
  background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
}

.stamp {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: var(--coral);
  color: #fff;
  border: var(--edge);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 900;
}

.bubble {
  background: #fff;
  border: var(--edge);
  border-radius: 18px 18px 18px 6px;
  box-shadow: var(--shadow);
  padding: 12px 14px;
  font-weight: 900;
  margin: 12px 0;
}

.tier {
  display: inline-block;
  border: var(--edge);
  border-radius: 999px;
  padding: 2px 10px;
  font-weight: 900;
  background: var(--honey);
}
.tier.ssr { background: var(--gold); }
.tier.low { background: var(--berry); color: #fff; }

.duo { display: flex; justify-content: center; gap: 8px; }
.duo img { width: 112px; height: 112px; object-fit: contain; }

.result-name { margin: 8px 0 0; font-size: 1.25rem; font-weight: 900; text-align: center; }
.center { text-align: center; }

.target {
  position: relative;
  text-align: center;
}
.target .duo img { width: 96px; height: 96px; }
.cracks { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.cracks path { fill: none; stroke: #4A3525; stroke-width: 4; stroke-linecap: round; opacity: 0; }
.crack-1 .ck1 { opacity: 0.9; }
.crack-2 .ck1, .crack-2 .ck2 { opacity: 0.95; }
.crack-3 path { opacity: 1; stroke: var(--coral); }

.hp {
  height: 16px;
  border: var(--edge);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
  margin-top: 8px;
}
.hp > div { height: 100%; background: linear-gradient(90deg, var(--mint), var(--gold), var(--coral)); }

.hammer {
  width: 150px;
  height: auto;
  transform-origin: 72% 84%;
  pointer-events: none;
  margin: 0 auto;
  filter: drop-shadow(10px 16px 0 rgba(74, 53, 37, 0.18));
}

.fly-star {
  position: absolute;
  left: 18px;
  top: 12px;
  font-size: 28px;
  opacity: 0;
  color: var(--gold);
  text-shadow: 0 2px 0 #4A3525;
}

.rumble { animation: rumble 0.18s linear; }
@keyframes rumble {
  0%, 100% { transform: translate3d(0, 0, 0) rotateX(0); }
  25% { transform: translate3d(-7px, 2px, 0) rotateZ(-1.5deg) rotateX(4deg); }
  50% { transform: translate3d(6px, -5px, 8px) rotateZ(1.5deg) rotateX(-3deg); }
  75% { transform: translate3d(-4px, 3px, 0) rotateZ(-1deg); }
}

.choice {
  width: 100%;
  display: flex;
  gap: 8px;
  align-items: center;
  text-align: left;
  margin-top: 8px;
}
.choice img { width: 42px; height: 42px; object-fit: contain; }
.choice.on { background: var(--gold); }

.moon-row { display: flex; justify-content: center; gap: 18px; min-height: 150px; perspective: 700px; }
.moon3d { width: 120px; height: 140px; }
.moon-inner { width: 100%; height: 100%; position: relative; transform-style: preserve-3d; transition: transform 0.9s cubic-bezier(.2,.8,.2,1); }
.moon-front, .moon-back { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; overflow: hidden; }
.moon-back {
  transform: rotateX(180deg);
  background: #F2C1A0;
  border: var(--edge);
  box-shadow: inset 0 0 0 8px #E7A87C;
}
.moon-front img { width: 210%; height: 100%; max-width: none; object-fit: cover; }
.moon-front.right img { margin-left: -108%; }

.wheel-wrap { position: relative; width: 260px; height: 260px; margin: 12px auto 0; }
.pointer {
  position: absolute;
  left: 50%;
  top: -6px;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 18px solid #4A3525;
  z-index: 2;
}
.wheel {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: var(--edge);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform 4s cubic-bezier(.15,.7,.1,1);
}
.wlabel {
  position: absolute;
  left: 50%;
  top: 50%;
  font-size: 0.75rem;
  font-weight: 900;
  transform-origin: 0 0;
  white-space: nowrap;
}

.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(74, 53, 37, 0.35);
  z-index: 50;
  display: grid;
  align-items: end;
  justify-content: center;
}
.sheet {
  width: min(430px, 100%);
  max-height: min(88dvh, 760px);
  overflow: auto;
  background: var(--bg);
  border: var(--edge);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow);
  padding: 14px 14px calc(18px + env(safe-area-inset-bottom));
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(148px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  background: #4A3525;
  color: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  max-width: min(380px, 92vw);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); transition: 0.2s ease; }

.title-chip {
  display: inline-block;
  background: var(--gold);
  border: var(--edge);
  border-radius: 999px;
  padding: 4px 8px;
  margin: 4px 4px 0 0;
  font-weight: 900;
  font-size: 0.82rem;
}

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  background: #fff;
  border: var(--edge);
  border-radius: 16px;
  text-align: center;
  padding: 8px 4px;
  font-weight: 900;
}
.stat b { display: block; font-size: 1.2rem; }

.list-line { font-weight: 800; font-size: 0.85rem; padding: 6px 0; border-bottom: 2px solid var(--line); }

.report {
  white-space: pre-wrap;
  font-weight: 800;
  background: #fff;
  border: var(--edge);
  border-radius: 16px;
  padding: 10px;
}

.ambience {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambience span {
  position: absolute;
  width: 10px;
  height: 10px;
  background: #ffd166;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  opacity: 0.55;
  animation: floatSpark 7s ease-in-out infinite;
}
.ambience span:nth-child(1) { left: 8%; top: 18%; animation-duration: 6.5s; }
.ambience span:nth-child(2) { left: 86%; top: 12%; width: 8px; height: 8px; animation-delay: -1.4s; background: #ff8fa3; }
.ambience span:nth-child(3) { left: 78%; top: 46%; animation-delay: -3s; background: #ffb26b; }
.ambience span:nth-child(4) { left: 6%; top: 62%; width: 7px; height: 7px; animation-delay: -2s; }
.ambience span:nth-child(5) { left: 48%; top: 8%; width: 6px; height: 6px; animation-delay: -4s; background: #fff; }
.ambience span:nth-child(6) { left: 92%; top: 72%; animation-delay: -2.6s; background: #88c999; }

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: 0;
  pointer-events: none;
  border-radius: 50%;
}
body::before {
  width: 260px;
  height: 260px;
  left: -70px;
  top: 40px;
  background: radial-gradient(circle, rgba(255, 178, 107, 0.55), transparent 68%);
  animation: drift 10s ease-in-out infinite;
}
body::after {
  width: 220px;
  height: 220px;
  right: -60px;
  top: 28%;
  background: radial-gradient(circle, rgba(255, 143, 163, 0.4), transparent 70%);
  animation: drift 12s ease-in-out infinite reverse;
}

.avatar, .avatar.placeholder {
  box-shadow:
    inset 0 1px 0 #fff,
    0 4px 0 #4A3525,
    0 8px 10px rgba(74, 53, 37, 0.16);
}
.mute {
  box-shadow:
    inset 0 1px 0 #fff,
    0 3px 0 #4A3525,
    0 8px 10px rgba(74, 53, 37, 0.12);
}
.topbar {
  box-shadow: 0 10px 18px rgba(255, 249, 242, 0.65);
}

.avatar-pick {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0) 50%),
    #fff;
  box-shadow:
    inset 0 1px 0 #fff,
    0 4px 0 #4A3525,
    0 10px 12px rgba(74, 53, 37, 0.1);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.avatar-pick img {
  filter: drop-shadow(0 8px 3px rgba(74, 53, 37, 0.18));
}
.avatar-pick.selected {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 46%),
    var(--gold);
  transform: translateY(-5px) rotateX(8deg);
  box-shadow:
    inset 0 1px 0 #fff,
    0 8px 0 #4A3525,
    0 16px 16px rgba(74, 53, 37, 0.16);
}

.chip img, .choice img, .slot img {
  filter: drop-shadow(0 3px 0 rgba(74, 53, 37, 0.12));
}
.duo img {
  filter: drop-shadow(0 12px 6px rgba(74, 53, 37, 0.22));
}
.stage-in .duo img {
  animation: popIn 0.5s cubic-bezier(.2, .85, .2, 1) backwards;
}
.stage-in .duo img:nth-child(2) { animation-delay: 0.08s; }

.stage-in .card:not(.stage):not(.target) {
  animation: cardIn 0.42s cubic-bezier(.2, .8, .2, 1) both;
}
.stage-in .bubble {
  animation: liftIn 0.4s cubic-bezier(.2, .8, .2, 1) backwards;
}
.stage-in .card:nth-child(2) { animation-delay: 0.05s; }
.stage-in .card:nth-child(3) { animation-delay: 0.1s; }
.stage-in .avatar-pick { animation: liftIn 0.4s cubic-bezier(.2, .8, .2, 1) backwards; }
.stage-in .avatar-pick:nth-child(2) { animation-delay: 0.03s; }
.stage-in .avatar-pick:nth-child(3) { animation-delay: 0.06s; }
.stage-in .avatar-pick:nth-child(4) { animation-delay: 0.09s; }
.stage-in .avatar-pick:nth-child(5) { animation-delay: 0.12s; }
.stage-in .avatar-pick:nth-child(6) { animation-delay: 0.15s; }
.stage-in .avatar-pick:nth-child(7) { animation-delay: 0.18s; }
.stage-in .avatar-pick:nth-child(8) { animation-delay: 0.21s; }

.cup-float { animation: cupIdle 2.8s ease-in-out infinite; filter: drop-shadow(0 12px 6px rgba(74, 53, 37, 0.25)); }

.prop-stage {
  position: relative;
  width: min(74vw, 260px);
  height: auto;
  perspective: 700px;
  transform-style: preserve-3d;
  margin: 0 auto;
}
.prop-stage #shakerImg { width: 100%; height: auto; animation: cupIdle 2.6s ease-in-out infinite; }
.prop-shadow {
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 5%;
  height: 18px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(74, 53, 37, 0.38), transparent 72%);
  z-index: 0;
  pointer-events: none;
}
.meter-block { width: 100%; position: relative; z-index: 3; }
.stick {
  z-index: 3;
  top: 16%;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.7),
    4px 8px 0 rgba(74, 53, 37, 0.18);
  transform-style: preserve-3d;
}

.spark { animation: twinkle 0.9s ease-in-out infinite; opacity: 0.85; }
.spark:nth-child(1) { transform: translate(-78px, -36px); }
.spark:nth-child(2) { transform: translate(72px, -28px); animation-delay: 0.1s; background: #fff; }
.spark:nth-child(3) { transform: translate(-46px, 24px); animation-delay: 0.2s; background: #ffb26b; }
.spark:nth-child(4) { transform: translate(54px, 18px); animation-delay: 0.15s; }
.spark:nth-child(5) { transform: translate(-96px, 8px); animation-delay: 0.28s; width: 10px; height: 10px; }
.spark:nth-child(6) { transform: translate(96px, -6px); animation-delay: 0.05s; background: #ff8fa3; }
.spark:nth-child(7) { transform: translate(-8px, -62px); animation-delay: 0.22s; }
.spark:nth-child(8) { transform: translate(12px, 48px); animation-delay: 0.33s; background: #fff; }
.stage.shaking .spark { animation-duration: 0.35s; }

.tier {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 3px 0 #4A3525;
  transform: rotate(-2deg);
}
.stage-in .tier.ssr { animation: stampPop 0.55s cubic-bezier(.2, .9, .2, 1) both; }
.bubble { box-shadow: inset 0 1px 0 #fff, 0 5px 0 #4A3525, 0 12px 14px rgba(74, 53, 37, 0.1); }
.result-name { text-shadow: 0 2px 0 rgba(255, 255, 255, 0.8); }

.target {
  transform-style: preserve-3d;
}
.target.hit-flash::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: inherit;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), rgba(255, 209, 102, 0.15) 42%, transparent 68%);
  animation: flash 0.32s ease-out;
  pointer-events: none;
}
.hammer { animation: hammerIdle 2.4s ease-in-out infinite; }
.hp > div { transition: width 0.12s ease-out; box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45); }

.dock {
  background: linear-gradient(180deg, rgba(255, 249, 242, 0.94), #fff9f2 36%);
  box-shadow: 0 -10px 22px rgba(74, 53, 37, 0.1);
}
.sheet {
  box-shadow: 0 -16px 30px rgba(74, 53, 37, 0.18);
  animation: sheetIn 0.32s cubic-bezier(.2, .8, .2, 1);
}
.wheel {
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.35),
    0 5px 0 #4A3525,
    0 16px 18px rgba(74, 53, 37, 0.16);
}
.slot, .stat, .field {
  box-shadow: inset 0 1px 0 #fff, 0 3px 0 #4A3525;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) rotateX(8deg); }
  to { opacity: 1; transform: rotateX(2.5deg); }
}
@keyframes liftIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.86) rotateX(12deg); }
  to { opacity: 1; transform: none; }
}
@keyframes stampPop {
  0% { transform: rotate(-8deg) scale(1.4); }
  60% { transform: rotate(2deg) scale(0.96); }
  100% { transform: rotate(-2deg) scale(1); }
}
@keyframes cupIdle {
  0%, 100% { transform: translateY(0) rotateZ(-1.5deg); }
  50% { transform: translateY(-7px) rotateZ(1.5deg); }
}
@keyframes hammerIdle {
  0%, 100% { transform: rotate(-18deg) translateY(0); }
  50% { transform: rotate(-12deg) translateY(-6px); }
}
@keyframes floatSpark {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.35; }
  50% { transform: translateY(-16px) scale(1.15); opacity: 0.8; }
}
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(18px, 12px, 0); }
}
@keyframes meterShine {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}
@keyframes twinkle {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.6); }
}
@keyframes flash {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes sheetIn {
  from { transform: translateY(24px); }
  to { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .btn-primary.bouncy { animation: none; }
  .wheel { transition: none; }
  .moon-inner { transition: none; }
  .stage-in .card,
  .stage-in .bubble,
  .stage-in .avatar-pick,
  .stage-in .duo img,
  .stage-in .tier.ssr,
  .cup-float,
  .prop-stage #shakerImg,
  .hammer,
  .ambience span,
  body::before,
  body::after,
  .spark,
  .meter > div.hot::after,
  .sheet { animation: none; }
  .card, .avatar-pick.selected, .tier { transform: none; }
  .btn, .chip, .tab, .mini, .meter > div, .hp > div { transition: none; }
  .tease, .hammer-arm, .paper-villain { animation: none; }
}

.brief-lock, .brief-last {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brief-lock img, .brief-last img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 8px 4px rgba(74, 53, 37, 0.2));
}
.brief-lock b, .brief-last b { display: block; font-size: 1.05rem; }
.brief-lock span, .brief-last span { display: block; color: var(--muted); font-size: 0.82rem; font-weight: 800; }
.brief-lock .mini { width: auto; margin-left: auto; }
.brief-fact {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 8px 0 0;
  font-weight: 800;
}
.brief-fact span { color: var(--muted); flex: 0 0 auto; }
.brief-fact b { text-align: right; }
.tease-feed { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.tease {
  align-self: flex-start;
  max-width: 92%;
  background: #fff;
  border: var(--edge);
  border-radius: 18px 18px 18px 6px;
  box-shadow: inset 0 1px 0 #fff, 0 4px 0 #4A3525;
  padding: 10px 12px;
  font-weight: 900;
  animation: bubbleRoll 0.55s cubic-bezier(.2, .8, .2, 1) both;
}
.card .tease { margin-top: 8px; }

.arena-wrap { position: relative; perspective: 1100px; }
.arena {
  position: relative;
  height: 460px;
  margin: 8px 0 12px;
  border: var(--edge);
  border-radius: 26px;
  overflow: hidden;
  background: linear-gradient(180deg, #fff4e4 0%, #f6d7b4 55%, #e7b98a 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.7), 0 10px 0 #c9aa90, 0 18px 22px rgba(74, 53, 37, 0.16);
  transform-style: preserve-3d;
}
.arena-wall {
  position: absolute;
  left: 8%;
  right: 8%;
  top: 18px;
  height: 150px;
  border-radius: 18px 18px 8px 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 40%),
    repeating-linear-gradient(90deg, #f3c9a4 0 18px, #e7b48a 18px 20px);
  transform: translateZ(-80px) rotateX(8deg);
  box-shadow: inset 0 -20px 0 rgba(74, 53, 37, 0.08);
}
.arena-floor {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -30px;
  height: 210px;
  background:
    repeating-linear-gradient(90deg, rgba(74, 53, 37, 0.08) 0 2px, transparent 2px 28px),
    linear-gradient(180deg, #f0c89a, #d7a56f);
  transform: rotateX(68deg);
  transform-origin: center top;
  box-shadow: 0 -18px 30px rgba(74, 53, 37, 0.18);
}
.paper-rig {
  position: absolute;
  left: 50%;
  top: 36px;
  width: 214px;
  margin-left: -107px;
  z-index: 2;
  transform-style: preserve-3d;
}
.paper-villain {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.45), transparent 30%),
    #f8e7a0;
  border: 3px solid #4A3525;
  border-radius: 8px 14px 10px 16px;
  min-height: 250px;
  padding: 10px 10px 12px;
  box-shadow:
    8px 16px 0 rgba(74, 53, 37, 0.18),
    0 24px 18px rgba(74, 53, 37, 0.12);
  transform: rotateX(14deg) rotateZ(-2deg) translateZ(36px);
  transform-origin: center bottom;
  clip-path: polygon(4% 0, 96% 2%, 100% 18%, 97% 78%, 100% 100%, 8% 97%, 0 80%, 2% 12%);
}
.paper-kicker {
  margin: 0;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  color: #8c3a32;
}
.paper-name {
  margin: 0 0 4px;
  text-align: center;
  font-size: 1.85rem;
  line-height: 1.15;
  font-weight: 900;
  color: #c23b32;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.45);
}
.paper-villain .duo img { width: 72px; height: 72px; }
.paper-villain .result-name { font-size: 1rem; }
.paper-villain .cracks { z-index: 3; }
.paper-rig .hp, .paper-rig .fine { position: relative; z-index: 2; }
.hammer-arm {
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 180px;
  z-index: 4;
  transform-origin: 78% 12%;
  transform: rotateX(-62deg) rotateZ(-18deg) translateZ(70px);
  animation: armIdle 2.1s ease-in-out infinite;
  pointer-events: none;
}
.arena .hammer {
  width: 168px;
  animation: none;
  filter: drop-shadow(16px 22px 0 rgba(74, 53, 37, 0.28));
}
.paper-villain.rumble { animation: paperHit 0.28s linear; }
.target.hit-flash .paper-villain::after {
  content: "";
  position: absolute;
  inset: 10% 12%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.9), transparent 62%);
  animation: flash 0.32s ease-out;
  pointer-events: none;
}

@keyframes bubbleRoll {
  from { opacity: 0; transform: translateY(22px) rotateX(16deg) scale(0.94); }
  to { opacity: 1; transform: none; }
}
@keyframes armIdle {
  0%, 100% { transform: rotateX(-62deg) rotateZ(-18deg) translateZ(70px); }
  50% { transform: rotateX(-50deg) rotateZ(-10deg) translateZ(78px); }
}
@keyframes paperHit {
  0% { transform: rotateX(14deg) rotateZ(-2deg) translateZ(36px); }
  35% { transform: rotateX(28deg) rotateZ(6deg) translateZ(8px) translateY(8px); }
  100% { transform: rotateX(14deg) rotateZ(-2deg) translateZ(36px); }
}
