/* Family reward chrome. Idle doll box stays 88px.
   Big actions last 0.55s and scale to 2.2 (about 106px of growth, under the 120px cap).
   The star badge sits below the fixed speaker. Companion off hides the doll only.
   Dress layers are same-size transparent PNGs stacked with z-index (pants, top, shoes, head). */
.reward-home { margin: 8px 0 12px; }
.reward-round, .reward-real { margin: 0 0 6px; font-weight: 700; color: #9a7420; }
.reward-dock {
  position: fixed;
  z-index: 75;
  top: calc(104px + env(safe-area-inset-top, 0px));
  right: max(8px, env(safe-area-inset-right, 0px));
  width: max-content;
  min-width: 88px;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
}
.reward-dock-count {
  margin: 0 0 6px;
  text-align: center;
  font-weight: 800;
  font-size: 1.7rem;
  line-height: 1.1;
  color: #6d4e00;
  background: #fff8e8;
  border: 3px solid #e2b43a;
  border-radius: 999px;
  padding: 6px 12px;
  min-width: 4.5rem;
  box-shadow: 0 2px 0 #fff;
  visibility: visible;
}
.reward-bunny {
  position: relative;
  width: 88px;
  height: 88px;
}
.reward-bunny img.reward-bunny-still,
.reward-bunny img.reward-bunny-happy {
  position: absolute;
  inset: 0;
  width: 88px;
  height: 88px;
  object-fit: contain;
  border-radius: 18px;
  z-index: 1;
}
.reward-layers {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.reward-bunny img.reward-bunny-happy,
.reward-bunny.is-happy img.reward-bunny-still { display: none; }
.reward-bunny.is-happy img.reward-bunny-happy { display: block; }
.reward-bunny.is-off { visibility: hidden; }
.reward-bunny-preview {
  width: min(200px, 56vw);
  height: min(300px, 84vw);
  margin: 0 auto 8px;
}
.reward-bunny-preview img.reward-bunny-still,
.reward-bunny-preview img.reward-bunny-happy {
  width: 100%;
  height: 100%;
}
.reward-stage { display: flex; justify-content: center; }
.reward-pieces { margin: 8px 0 12px; }
.reward-piece {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.reward-piece .reward-chip {
  flex: 1;
  min-height: 76px;
  font-size: 1.35rem;
  display: flex;
  align-items: center;
}
.reward-wear-btn {
  width: auto;
  margin-top: 0;
  min-width: 112px;
  min-height: 76px;
  font-size: 1.3rem;
  font-weight: 800;
}
.reward-cats {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  background: #fff;
  padding: 8px 0 0;
}
.reward-cats .btn {
  width: auto;
  margin-top: 0;
  min-height: 48px;
  padding: 8px 4px;
  font-size: 1rem;
  font-weight: 800;
}
.reward-cats .btn.is-on {
  box-shadow: inset 0 0 0 3px #2f6fed;
  background: #e7f0ff;
  color: #1b3f86;
}
.reward-draws { display: flex; gap: 8px; }
.reward-draws .btn { width: auto; flex: 1; margin-top: 0; min-height: 72px; font-size: 1.05rem; line-height: 1.25; }
.btn.reward-draw-normal { background: #2f6fed; }
.btn.reward-draw-pretty { background: #8d4db8; }
.reward-wear {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  display: none;
  border: 0;
  border-radius: 18px;
  background: transparent;
}
.reward-wear.is-on { display: block; }
.reward-wear.reward-wear-preview { opacity: 0.58; }
.reward-wear.reward-wear-preview.is-on { display: block; }
.reward-wear[data-wear="bg"],
.reward-wear[data-wear="furn"],
.reward-wear[data-wear="tail"] { z-index: 0; }
.reward-wear[data-wear="bottom"] { z-index: 2; }
.reward-wear[data-wear="shoes"] { z-index: 3; }
.reward-wear[data-wear="top"] { z-index: 4; }
.reward-wear[data-wear="hair"] { z-index: 5; }
.reward-wear[data-wear="eyes"],
.reward-wear[data-wear="ears"],
.reward-wear[data-wear="nose"],
.reward-wear[data-wear="blush"],
.reward-wear[data-wear="mouth"] { z-index: 6; }
.reward-wear[data-wear="head"] { z-index: 7; }
.reward-wear[data-wear="acc"] { z-index: 8; }
.reward-wear[data-wear="pet"],
.reward-wear[data-wear="hold"] { z-index: 9; }
.reward-wear[data-wear="fx"] { z-index: 10; }
.reward-doll-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
}
.reward-doll-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.reward-chip-layered {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff8ee;
}
.reward-sticker-grid .reward-sticker { min-width: 44px; min-height: 32px; font-size: 0.75rem; }
.reward-place-grid .reward-sticker { min-width: 120px; min-height: 72px; font-size: 1.15rem; }
.reward-wearing { margin: 0 0 8px; font-weight: 800; text-align: center; }
.reward-deco {
  position: absolute;
  z-index: 12;
  left: 0;
  right: 0;
  top: -18px;
  display: flex;
  justify-content: center;
  gap: 2px;
}
.reward-deco img { width: 18px; height: 18px; border-radius: 50%; }
.reward-bunny.act-hop { animation: reward-hop 0.55s ease-out 1 both; }
.reward-bunny.act-spin { animation: reward-spin 0.55s ease-out 1 both; }
.reward-bunny.act-pop { animation: reward-pop 0.55s ease-out 1 both; }
.reward-bunny.act-wiggle { animation: reward-wiggle 0.55s ease-out 1 both; }
.reward-bunny.act-gentle { animation: reward-gentle 0.4s ease-out 1 both; }
@keyframes reward-hop {
  0% { transform: translateY(0) scale(1); }
  45% { transform: translateY(-28px) scale(2.2); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes reward-spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(2.2); }
  100% { transform: rotate(360deg) scale(1); }
}
@keyframes reward-pop {
  0% { transform: scale(1); }
  40% { transform: scale(2.2); }
  100% { transform: scale(1); }
}
@keyframes reward-wiggle {
  0% { transform: rotate(0deg) scale(1); }
  35% { transform: rotate(-14deg) scale(2.2); }
  70% { transform: rotate(12deg) scale(1.4); }
  100% { transform: rotate(0deg) scale(1); }
}
@keyframes reward-gentle {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(-8deg) scale(1.05); }
  100% { transform: rotate(0deg) scale(1); }
}
.reward-sheet {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(0, 0, 0, 0.28);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}
.reward-sheet-card {
  width: min(560px, 100%);
  max-height: 78vh;
  overflow: auto;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
}
.reward-need {
  margin: 0 0 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffe8e6;
  color: #8f1d1d;
  font-weight: 800;
  font-size: 1.45rem;
  line-height: 1.35;
}
.btn.reward-draw.is-short,
.btn.reward-draw.is-short:disabled,
.btn.reward-draw.is-short:active {
  background: #fff1f0 !important;
  color: #8f1d1d !important;
  opacity: 1 !important;
  box-shadow: inset 0 0 0 3px #e35d5d !important;
}
.reward-sticker-grid, .reward-place-grid, .reward-owned {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 12px;
}
.reward-sticker, .reward-chip {
  min-width: 72px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  padding: 8px;
  font-weight: 700;
}
.reward-chip.is-on { outline: 3px solid #2f6fed; }
.reward-chip.is-locked,
.reward-piece.is-locked .reward-chip {
  filter: grayscale(1);
  background: #e4e4e4;
  color: #4e4e4e;
}
.reward-lock-badge {
  margin-left: auto;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.reward-try-btn,
.reward-clear-try {
  width: auto;
  margin-top: 0;
  min-width: 112px;
  min-height: 76px;
  font-size: 1.3rem;
  font-weight: 800;
  background: #fff7ea;
  color: #5c3a12;
  box-shadow: inset 0 0 0 3px #e2b43a;
  touch-action: manipulation;
}
.reward-clear-try { width: 100%; margin: 0 0 8px; }
.reward-try-btn.is-on { background: #ffe08a; }
.reward-preview-note {
  margin: 0 0 8px;
  font-weight: 800;
  text-align: center;
  color: #6d4e00;
}
.reward-piece .reward-chip { cursor: pointer; }
.reward-owned-row { display: flex; gap: 8px; align-items: center; width: 100%; }
.reward-slot-title { margin: 8px 0 4px; font-weight: 700; }
.reward-banner {
  position: fixed;
  z-index: 76;
  left: 50%;
  top: calc(96px + env(safe-area-inset-top, 0px));
  transform: translateX(-50%);
  max-width: min(520px, calc(100% - 24px));
  background: #ffe08a;
  color: #3d2e08;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

/* Standalone house page (/bunny.html). Practice dock stays 88px. */
.house-page {
  margin: 0;
  min-height: 100%;
  background: #f6c7b8;
  overflow: hidden;
}
.house-page .house-room {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: #f6c7b8 url("reward/bunny-room-bg.jpg") center center / cover no-repeat;
}
.house-page .house-spot {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom, 0px));
  width: min(520px, 92vw);
  height: min(780px, 72vh);
  transform: translateX(-50%);
  pointer-events: none;
  overflow: visible;
}
/* Wardrobe open: doll stays large on the left. The right panel is the path. */
.house-page.is-dressing .house-spot {
  left: 0;
  right: auto;
  top: 0;
  bottom: 0;
  width: min(960px, 68vw);
  height: 100%;
  transform: none;
}
.house-page.is-dressing .house-bar,
.house-page.is-dressing .house-back,
.house-page.is-dressing .layer-eye-link {
  visibility: hidden;
  pointer-events: none;
}
.house-page .reward-pixi-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
  background: transparent;
}
.house-page .house-bunny.is-pixi .reward-pixi-stage {
  pointer-events: auto;
  touch-action: none;
}
.house-page.is-dressing .reward-pixi-stage {
  pointer-events: none;
}
/* House only: base tee, then shoes, pants, top, head. Practice keeps the catalog z. */
.house-page .reward-wear[data-wear="shoes"] { z-index: 4; }
.house-page .reward-wear[data-wear="bottom"] { z-index: 5; }
.house-page .reward-wear[data-wear="top"] { z-index: 6; }
.house-page .reward-wear[data-wear="head"] { z-index: 9; }
.house-page .house-bunny.is-pixi > img {
  visibility: hidden;
}
.house-page .house-bunny:not(.is-pixi) .reward-pixi-stage {
  visibility: hidden;
}
.house-page .house-spot .reward-bunny {
  width: 100%;
  height: 100%;
}
.house-page .house-spot .reward-bunny img.reward-bunny-still,
.house-page .house-spot .reward-bunny img.reward-bunny-happy,
.house-page .house-spot .reward-bunny img.reward-wear {
  width: 100%;
  height: 100%;
  border-radius: 0;
}
.house-page #rewardBunny.is-off { visibility: visible; }
.house-page .btn.reward-draw-normal { background: #2f6fed; color: #fff; }
.house-page .btn.reward-draw-pretty { background: #8d4db8; color: #fff; }
.house-page .house-spot .reward-deco img { width: 42px; height: 42px; }
.house-page .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  min-height: 52px;
  padding: 12px 16px;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: inherit;
  border: none;
  border-radius: 14px;
  background: #2f6fed;
  color: #fff;
  box-sizing: border-box;
}
.house-page .btn-secondary { background: #e8eef5; color: #1a2b3c; }
.house-page #rewardSheetClose { width: 100%; margin-top: 12px; }
.house-page .house-back {
  position: fixed;
  z-index: 40;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  min-width: 96px;
  min-height: 64px;
  margin: 0;
  padding: 10px 18px;
  width: auto;
  text-decoration: none;
  background: #fff7ea;
  color: #5c3a12;
  border: 3px solid #e2b43a;
  box-sizing: border-box;
}
.house-page .house-bar {
  position: fixed;
  z-index: 40;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 248, 240, 0.94);
}
.house-page .house-bar .btn {
  width: auto;
  margin: 0;
  min-height: 64px;
  font-size: 1.35rem;
  background: #fff7ea;
  color: #5c3a12;
  border: 3px solid #e2b43a;
}
.house-page .hidden { display: none !important; }
.house-page #rewardHome {
  position: fixed;
  z-index: 45;
  left: 12px;
  right: 12px;
  top: calc(76px + env(safe-area-inset-top, 0px));
  pointer-events: none;
}
.house-page #rewardHome > :not(#rewardSaveNote) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.house-page #rewardSaveNote {
  margin: 0 auto;
  max-width: 520px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fff7ea;
  color: #5c3a12;
  font-weight: 800;
  text-align: center;
}
.house-page .reward-sheet {
  z-index: 80;
  top: auto;
  right: 0;
  bottom: 0;
  left: 0;
  height: auto;
  max-height: none;
  padding: 0;
  background: rgba(255, 248, 240, 0.96);
  align-items: stretch;
  overflow: visible;
}
.house-page .reward-sheet-card {
  width: 100%;
  max-width: none;
  max-height: none;
  height: auto;
  overflow: visible;
  margin: 0;
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 24px rgba(80, 40, 20, 0.16);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding-left: max(8px, env(safe-area-inset-left, 0px));
  padding-right: max(8px, env(safe-area-inset-right, 0px));
}
.house-page #rewardSheetBody {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.house-page.is-dressing #rewardSheetBody {
  flex-direction: row;
  align-items: stretch;
  flex: 1 1 auto;
  height: 100%;
  min-height: 0;
  gap: 6px;
}
.house-page .reward-wearing {
  margin: 2px 12px 8px;
  padding: 0 8px;
  font-size: 1.05rem;
  line-height: 1.45;
  font-weight: 800;
  white-space: normal;
}
.house-page .reward-stage { display: none; }
/* Wardrobe grid sits beside the right rail. The closed-sheet rules below stay for the old row. */
.house-page.is-dressing .reward-grid-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  order: 1;
}
.house-page.is-dressing .reward-pieces {
  display: grid;
  /* One column. Five pieces already pass an iPad sheet (~1024 tall), so acc (10) scrolls a lot. */
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  width: auto;
  margin: 0;
  padding: 8px 4px 12px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  flex: 1 1 auto;
  min-height: 0;
}
.house-page.is-dressing .reward-piece {
  display: flex;
  flex: none;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  width: auto;
  min-width: 0;
  margin: 0;
}
.house-page.is-dressing .reward-piece .reward-chip {
  flex: none;
  min-width: 0;
  min-height: 200px;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 6px;
  touch-action: manipulation;
}
.house-page.is-dressing .reward-doll-thumb,
.house-page.is-dressing .reward-piece-thumb {
  width: 100px;
  height: 100px;
  flex: 0 0 100px;
  margin: 0 auto;
}
.house-page .reward-pieces {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 10px;
  width: auto;
  margin: 4px -4px 8px;
  padding: 2px 4px 8px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
  scroll-snap-type: none;
}
.house-page .reward-piece {
  display: flex;
  flex: 0 0 92px;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  width: 92px;
  margin: 0;
}
.house-page .reward-piece .reward-chip {
  flex: none;
  min-height: 0;
  width: 100%;
  flex-direction: column;
  justify-content: center;
  position: relative;
  padding: 6px;
}
.house-page .reward-doll-thumb,
.house-page .reward-piece-thumb {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  margin: 0 auto;
}
.house-page .reward-piece-thumb canvas,
.house-page .reward-piece-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.house-page .reward-piece-thumb.is-pending {
  background: #fff8ee;
}
.house-page .reward-piece.is-locked .reward-piece-thumb.is-pending {
  background: #e4e4e4;
}
.house-page .reward-piece-name,
.house-page .reward-lock-word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.house-page .reward-lock-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  margin: 0;
  font-size: 1.25rem;
}
.house-page .reward-piece .reward-try-btn,
.house-page .reward-piece .reward-wear-btn,
.house-page .reward-piece .btn-secondary {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  margin: 0;
  padding: 6px 4px;
  font-size: 1.05rem;
}
.house-page.is-dressing .reward-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 4px 8px 8px;
  flex: 0 0 auto;
}
.house-page.is-dressing .reward-swatches:empty {
  display: none;
}
.house-page.is-dressing .reward-swatch {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: inset 0 0 0 2px #c4a574;
  touch-action: manipulation;
}
.house-page.is-dressing .reward-swatch.is-on {
  box-shadow: inset 0 0 0 3px #e2b43a, 0 0 0 3px #5c3a12;
}
.house-page.is-dressing .reward-swatch.is-locked {
  opacity: 0.45;
}
.house-page.is-dressing .reward-cats {
  position: static;
  order: 2;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  flex: 0 0 80px;
  width: 80px;
  gap: 8px;
  margin: 0;
  padding: 4px 2px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  background: transparent;
}
.house-page.is-dressing .reward-cats .btn {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  min-width: 72px;
  min-height: 72px;
  margin: 0;
  padding: 0;
  font-size: 0;
  line-height: 0;
  border-radius: 20px;
  background: #fff7ea;
  color: #5c3a12;
  border: 3px solid transparent;
  box-shadow: none;
}
.house-page.is-dressing .reward-cats .rail-icon {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
  background: transparent;
}
.house-page.is-dressing .reward-cats .btn.is-on {
  background: #ffe08a;
  color: #5c3a12;
  border-color: #e2b43a;
  box-shadow: inset 0 0 0 3px #e2b43a;
}
.house-page .reward-cats {
  position: static;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  touch-action: pan-x;
}
.house-page .reward-cats .btn {
  flex: 0 0 auto;
  min-width: 64px;
  min-height: 40px;
  padding: 4px 8px;
  font-size: 0.95rem;
}
.house-page.is-dressing .reward-sheet {
  top: 0;
  right: 0;
  bottom: 0;
  left: 70vw;
  width: auto;
  height: 100%;
  max-height: none;
  padding: 0;
  overflow: hidden;
  background: rgba(255, 248, 240, 0.96);
  border-radius: 28px 0 0 28px;
  box-shadow: -10px 0 28px rgba(80, 40, 20, 0.14);
}
.house-page.is-dressing .reward-sheet-card {
  width: 100%;
  max-width: none;
  max-height: none;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 28px 0 0 28px;
  box-shadow: none;
  position: relative;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  padding-left: 10px;
  padding-right: max(6px, env(safe-area-inset-right, 0px));
}
.house-page.is-dressing #rewardSheetTitle,
.house-page.is-dressing #rewardSheetNote,
.house-page.is-dressing .reward-wearing {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.house-page.is-dressing #rewardSheetClose {
  position: fixed;
  top: calc(8px + env(safe-area-inset-top, 0px));
  left: max(12px, env(safe-area-inset-left, 0px));
  right: auto;
  z-index: 90;
  width: 64px;
  min-width: 64px;
  height: 64px;
  min-height: 64px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  font-size: 0;
  line-height: 0;
  background: #fff7ea;
  color: #5c3a12;
  border: 3px solid #e2b43a;
  box-shadow: 0 4px 14px rgba(80, 40, 20, 0.16);
}
.house-page.is-dressing #rewardSheetClose::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin-left: 6px;
  border-left: 4px solid #5c3a12;
  border-bottom: 4px solid #5c3a12;
  transform: rotate(45deg);
  box-sizing: border-box;
}
@media (max-width: 700px) {
  .house-page.is-dressing .house-spot {
    width: 56vw;
  }
  .house-page.is-dressing .reward-sheet {
    left: 58vw;
  }
  .house-page.is-dressing .reward-pieces {
    grid-template-columns: minmax(0, 1fr);
  }
  .house-page.is-dressing .reward-piece .reward-chip {
    min-height: 96px;
  }
  .house-page.is-dressing .reward-doll-thumb,
  .house-page.is-dressing .reward-piece-thumb {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }
  .house-page.is-dressing .reward-cats {
    flex-basis: 68px;
    width: 68px;
  }
  .house-page.is-dressing .reward-cats .btn {
    width: 64px;
    min-width: 64px;
    min-height: 64px;
  }
}
.house-page .house-bunny.is-equip-normal,
.house-page .house-bunny.is-equip-pretty {
  animation: none;
  filter: none;
}
.house-page .house-bunny.is-equip-normal::before,
.house-page .house-bunny.is-equip-normal::after,
.house-page .house-bunny.is-equip-pretty::before,
.house-page .house-bunny.is-equip-pretty::after {
  content: none;
  animation: none;
  filter: none;
}

/* 換裝反饋。只係 CSS，唔用額外圖。
   普通 0.5s：輕彈＋兩粒小閃星。
   靚 0.5s：彈幅更大、外框柔光、頭頂光環（中心透明）、多粒閃星。
   光環同閃星避開面（約頂部同兩側）。fx 槽 PNG 唔係呢套動畫。 */

.doll,
.reward-bunny {
  position: relative;
  transform-origin: 50% 70%;
}

.doll.is-equip-normal,
.reward-bunny.is-equip-normal {
  animation: doll-equip-pop 0.5s ease both;
}

.doll.is-equip-pretty,
.reward-bunny.is-equip-pretty {
  animation: doll-equip-pretty-pop 0.5s cubic-bezier(0.2, 0.85, 0.2, 1) both;
}

@keyframes doll-equip-pop {
  0% { transform: scale(0.97); }
  45% { transform: scale(1.035); }
  100% { transform: scale(1); }
}

@keyframes doll-equip-pretty-pop {
  0% {
    transform: scale(0.96);
    filter: drop-shadow(0 0 0 rgba(255, 186, 220, 0));
  }
  42% {
    transform: scale(1.055);
    filter:
      drop-shadow(0 0 12px rgba(255, 170, 214, 0.9))
      drop-shadow(0 0 20px rgba(186, 150, 255, 0.45));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0 rgba(255, 186, 220, 0));
  }
}

/* 普通：兩粒小星，左右側，唔蓋面 */
.doll.is-equip-normal::before,
.doll.is-equip-normal::after,
.reward-bunny.is-equip-normal::before,
.reward-bunny.is-equip-normal::after {
  content: "";
  position: absolute;
  z-index: 8;
  width: 14px;
  height: 14px;
  pointer-events: none;
  background: #ffe56a;
  clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
  animation: doll-equip-spark 0.5s ease both;
}

.doll.is-equip-normal::before,
.reward-bunny.is-equip-normal::before {
  left: 12%;
  top: 22%;
}

.doll.is-equip-normal::after,
.reward-bunny.is-equip-normal::after {
  right: 14%;
  top: 18%;
  width: 10px;
  height: 10px;
}

@keyframes doll-equip-spark {
  0% { opacity: 0; transform: scale(0.4) translateY(6px); }
  35% { opacity: 1; transform: scale(1) translateY(0); }
  100% { opacity: 0; transform: scale(1.15) translateY(-10px); }
}

/* 靚：頭頂光環。只有邊，中心透明，停喺頭髮上，唔落到眼。 */
.doll.is-equip-pretty::before,
.reward-bunny.is-equip-pretty::before {
  content: "";
  position: absolute;
  z-index: 8;
  left: 50%;
  top: 2%;
  width: 46%;
  height: 16%;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 3px solid rgba(255, 214, 102, 0.95);
  background: transparent;
  box-shadow:
    0 0 10px 3px rgba(255, 196, 92, 0.55),
    inset 0 0 8px rgba(255, 236, 170, 0.28);
  pointer-events: none;
  animation: doll-equip-halo 0.5s ease both;
}

@keyframes doll-equip-halo {
  0% { opacity: 0; transform: translateX(-50%) scale(0.86); }
  40% { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) scale(1.08); }
}

/* 靚：多粒閃星，只放頭頂同兩側，中間面位留空 */
.doll.is-equip-pretty::after,
.reward-bunny.is-equip-pretty::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 16%, #ffe27a 0 5px, transparent 6px),
    radial-gradient(circle at 30% 10%, #fff 0 3px, transparent 4px),
    radial-gradient(circle at 78% 14%, #fff6c8 0 5px, transparent 6px),
    radial-gradient(circle at 88% 24%, #ffd0ea 0 4px, transparent 5px),
    radial-gradient(circle at 12% 32%, #ffd6ef 0 4px, transparent 5px),
    radial-gradient(circle at 84% 36%, #ffe9a0 0 3px, transparent 5px),
    radial-gradient(circle at 22% 8%, #fff 0 2px, transparent 4px);
  animation: doll-equip-spark-pretty 0.5s ease both;
}

@keyframes doll-equip-spark-pretty {
  0% { opacity: 0; transform: translateY(8px) scale(0.85); }
  30% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-14px) scale(1.08); }
}

.btn.reward-draw.is-spinning,
#rewardGachaBtn.is-spinning {
  animation: gacha-press 0.45s ease;
}
.reward-egg-show {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 244, 230, 0.42);
}
.reward-egg {
  position: relative;
  width: 148px;
  height: 176px;
  animation: egg-pop 1.4s ease both;
}
.reward-egg-top,
.reward-egg-bot {
  position: absolute;
  left: 0;
  right: 0;
  height: 54%;
  background: linear-gradient(#fff8dc, #ffd56a);
  border: 4px solid #e2b43a;
  box-sizing: border-box;
}
.reward-egg-top {
  top: 0;
  border-radius: 74px 74px 16px 16px;
  animation: egg-crack-top 1.4s ease both;
}
.reward-egg-bot {
  bottom: 0;
  border-radius: 16px 16px 74px 74px;
  animation: egg-crack-bot 1.4s ease both;
}
.reward-egg-top::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -3px;
  height: 8px;
  background:
    radial-gradient(circle at 8px 4px, transparent 5px, #e2b43a 6px, #e2b43a 7px, transparent 8px) 0 0 / 16px 8px repeat-x;
}
.reward-egg-prize {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: egg-reveal 1.4s ease both;
}
.reward-egg-name {
  margin: 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: #fff7ea;
  color: #5c3a12;
  font-size: 1.25rem;
  font-weight: 800;
}
@keyframes gacha-press {
  0% { transform: scale(1) rotate(0deg); }
  35% { transform: scale(0.92) rotate(-10deg); }
  70% { transform: scale(1.06) rotate(8deg); }
  100% { transform: scale(1) rotate(0deg); }
}
@keyframes egg-pop {
  0% { transform: translateY(-36vh) scale(0.45); }
  26% { transform: translateY(0) scale(1.08); }
  40% { transform: translateY(0) scale(1); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes egg-crack-top {
  0%, 42% { transform: translateY(0) rotate(0deg); }
  68%, 100% { transform: translateY(-34px) rotate(-14deg); }
}
@keyframes egg-crack-bot {
  0%, 42% { transform: translateY(0) rotate(0deg); }
  68%, 100% { transform: translateY(26px) rotate(10deg); }
}
@keyframes egg-reveal {
  0%, 52% { opacity: 0; transform: scale(0.7); }
  72%, 100% { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .btn.reward-draw.is-spinning,
  #rewardGachaBtn.is-spinning,
  .reward-egg,
  .reward-egg-top,
  .reward-egg-bot,
  .reward-egg-prize {
    animation: none;
  }
  .reward-egg-top { transform: translateY(-34px) rotate(-14deg); }
  .reward-egg-bot { transform: translateY(26px) rotate(10deg); }
  .reward-egg-prize { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .doll.is-equip-normal,
  .doll.is-equip-pretty,
  .reward-bunny.is-equip-normal,
  .reward-bunny.is-equip-pretty,
  .doll.is-equip-normal::before,
  .doll.is-equip-normal::after,
  .doll.is-equip-pretty::before,
  .doll.is-equip-pretty::after,
  .reward-bunny.is-equip-normal::before,
  .reward-bunny.is-equip-normal::after,
  .reward-bunny.is-equip-pretty::before,
  .reward-bunny.is-equip-pretty::after {
    animation: none;
  }
}
