
/* Bubble Wand Pop */
.mini-game-board.bubbleWandPop,
.mini-game-board.bubble-wand-pop {
  display: block;
}
.bubble-wand-shell {
  display: grid;
  gap: 12px;
  width: min(100%, 980px);
  margin: 0 auto;
}
.bubble-wand-stage {
  position: relative;
  height: clamp(430px, 66vh, 620px);
  min-height: 430px;
  overflow: hidden;
  border: 3px solid rgba(150, 48, 116, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 214, 236, 0.2)),
    url("../../data/mini_game_worlds/bubble_bounce_room.png") center / cover no-repeat;
  box-shadow: 0 18px 36px rgba(93, 38, 91, 0.16);
  touch-action: none;
}
.bubble-wand-room {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 24% 16%, rgba(255, 255, 255, 0.28), transparent 20%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}
.bubble-wand-status,
.bubble-wand-bouquet {
  position: absolute;
  z-index: 6;
  left: 14px;
  max-width: min(420px, calc(100% - 28px));
  padding: 9px 12px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #55204a;
  font:
    900 14px/1.25 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  box-shadow: 0 8px 18px rgba(88, 36, 92, 0.14);
}
.bubble-wand-status {
  top: 14px;
}
.bubble-wand-bouquet {
  top: 64px;
  color: #275c76;
}
.bubble-wand-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
.bubble-wand-bubble {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.84);
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 12%, transparent 13%),
    radial-gradient(circle at 62% 70%, rgba(255, 255, 255, 0.4) 0 18%, transparent 19%),
    rgba(157, 234, 255, 0.56);
  color: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
  box-shadow:
    inset -10px -12px 18px rgba(107, 74, 160, 0.12),
    0 12px 22px rgba(67, 55, 119, 0.18);
  transition:
    opacity 0.22s ease,
    scale 0.22s ease;
}
.bubble-wand-bubble.pink {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 12%, transparent 13%),
    radial-gradient(circle at 62% 70%, rgba(255, 255, 255, 0.42) 0 18%, transparent 19%),
    rgba(255, 169, 219, 0.58);
}
.bubble-wand-bubble.gold {
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 12%, transparent 13%),
    radial-gradient(circle at 62% 70%, rgba(255, 255, 255, 0.42) 0 18%, transparent 19%),
    rgba(255, 226, 125, 0.62);
}
.bubble-wand-bubble.popped {
  opacity: 0;
  scale: 1.28;
}
.bubble-wand-pad {
  position: absolute;
  z-index: 7;
  right: 18px;
  bottom: 18px;
  width: min(260px, calc(100% - 36px));
  height: 150px;
  border: 3px solid rgba(255, 255, 255, 0.8);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 244, 252, 0.72)),
    radial-gradient(circle at 80% 26%, rgba(255, 215, 112, 0.52), transparent 24%);
  cursor: grab;
  touch-action: none;
  box-shadow: 0 12px 26px rgba(86, 32, 91, 0.16);
}
.bubble-wand-pad:active {
  cursor: grabbing;
}
.bubble-wand-pad:focus-visible,
.bubble-wand-beacon:focus-visible,
.bubble-wand-bubble:focus-visible,
.bubble-wand-controls button:focus-visible {
  outline: 3px solid #ff4fa3;
  outline-offset: 4px;
}
.mini-game-board.bubble-wand-pop.proof-paused * {
  animation-play-state: paused !important;
  transition: none !important;
}
.bubble-wand-handle {
  position: absolute;
  right: 28px;
  bottom: 24px;
  width: 86px;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, #7b4cca, #ffd76d);
  transform: rotate(-22deg);
  box-shadow: 0 4px 10px rgba(76, 36, 126, 0.22);
}
.bubble-wand-handle::before {
  content: "";
  position: absolute;
  right: -12px;
  top: -8px;
  width: 30px;
  height: 30px;
  border: 4px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: rgba(255, 221, 119, 0.72);
}
.bubble-wand-pull {
  position: absolute;
  right: 70px;
  bottom: 140px;
  z-index: 2;
  width: 10px;
  height: 6px;
  border-radius: 999px;
  background: #7b4cca;
  opacity: 0;
  transform-origin: right center;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
  pointer-events: none;
}
.bubble-wand-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.bubble-wand-controls button {
  min-height: 46px;
  padding: 0 16px;
  border: 2px solid rgba(82, 156, 184, 0.42);
  border-radius: 8px;
  background: #ffffff;
  color: #275c76;
  font:
    900 15px/1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(82, 156, 184, 0.12);
}

@media (max-width: 560px) {
  .bubble-wand-shell {
    gap: 8px;
  }
  .bubble-wand-stage {
    height: min(60dvh, 520px);
    min-height: 390px;
  }
  .bubble-wand-status,
  .bubble-wand-bouquet {
    left: 10px;
    right: 10px;
    max-width: none;
    font-size: 13px;
  }
  .bubble-wand-bouquet {
    top: 72px;
  }
  .bubble-wand-pad {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    height: 128px;
  }
  .bubble-wand-controls button {
    flex: 1 1 140px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mini-game-board.bubble-wand-pop .bubble-wand-beacon,
  .mini-game-board.bubble-wand-pop .bubble-wand-bubble,
  .mini-game-board.bubble-wand-pop .bubble-wand-ray {
    transition: none;
  }
}

@media (forced-colors: active) {
  .mini-game-board.bubble-wand-pop .bubble-wand-stage {
    border-color: CanvasText;
    background: Canvas;
  }
  .mini-game-board.bubble-wand-pop .bubble-wand-status,
  .mini-game-board.bubble-wand-pop .bubble-wand-bouquet,
  .mini-game-board.bubble-wand-pop .bubble-wand-mission,
  .mini-game-board.bubble-wand-pop .bubble-wand-pad {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    forced-color-adjust: none;
  }
  .mini-game-board.bubble-wand-pop .bubble-wand-beacon,
  .mini-game-board.bubble-wand-pop .bubble-wand-bubble {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
    box-shadow: none;
    forced-color-adjust: none;
  }
  .mini-game-board.bubble-wand-pop .bubble-wand-beacon.helper-path {
    outline: 4px solid Highlight;
    outline-offset: 4px;
    animation: none;
  }
  .mini-game-board.bubble-wand-pop .bubble-wand-reticle {
    border-color: CanvasText;
    filter: none;
  }
}

/* Princess Accessory Builder */
.mini-game-board.princess-dress-up {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: min(70vh, 740px);
  padding: 0;
  overflow: visible;
  background: #f4e8ff;
}
.dress-up-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: min(70vh, 740px);
}
.dress-up-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(100%, 980px);
  min-height: min(58vh, 560px);
  margin: 0 auto;
  overflow: hidden;
  border: 3px solid rgba(117, 70, 158, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.84), transparent 32%),
    linear-gradient(180deg, #fff7fb, #e9f6ff);
  box-shadow: 0 18px 36px rgba(91, 55, 132, 0.16);
}
.dress-up-card {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  width: min(360px, calc(100% - 24px));
  padding: 10px 12px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  color: #40265f;
  font: 800 13px/1.24 "Trebuchet MS", Arial, sans-serif;
}
.dress-up-card strong {
  display: block;
  margin-bottom: 4px;
  font:
    900 15px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.dress-up-princess-wrap {
  position: relative;
  width: min(280px, 58vw);
  aspect-ratio: 1 / 1;
}
.dress-up-princess {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: url("../../data/princess4_imagegen_20260530.png") 0 0 / 400% 400%
    no-repeat;
  filter: drop-shadow(0 14px 18px rgba(75, 45, 108, 0.18));
}
.dress-up-slots {
  position: absolute;
  inset: 0;
}
.dress-up-slot {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 82px;
  min-height: 38px;
  padding: 5px 7px;
  transform: translate(-50%, -50%);
  border: 2px dashed rgba(117, 70, 158, 0.45);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: #5b2f80;
  font:
    900 12px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  text-align: center;
}
.dress-up-slot.filled {
  border-style: solid;
  background: #fff6c9;
  box-shadow: 0 8px 18px rgba(91, 55, 132, 0.16);
}
.dress-up-slot.rose,
.dress-up-piece.rose {
  background: #ffe1ee;
  color: #7d2457;
}
.dress-up-slot.moon,
.dress-up-piece.moon,
.dress-up-slot.blue,
.dress-up-piece.blue {
  background: #e1f1ff;
  color: #255b7d;
}
.dress-up-slot.garden,
.dress-up-piece.garden {
  background: #e2ffe1;
  color: #2c7035;
}
.dress-up-slot.star,
.dress-up-piece.star,
.dress-up-slot.gold,
.dress-up-piece.gold {
  background: #fff0b8;
  color: #76531d;
}
.dress-up-tray {
  display: grid;
  grid-template-columns: repeat(6, minmax(82px, 1fr));
  gap: 8px;
  padding: 0 8px 2px;
}
.dress-up-piece {
  min-height: 48px;
  border: 2px solid rgba(117, 70, 158, 0.22);
  border-radius: 8px;
  background: #fff;
  font:
    900 12px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: grab;
  touch-action: none;
}
.dress-up-piece.dragging {
  box-shadow: 0 18px 30px rgba(91, 55, 132, 0.22);
}
.dress-up-piece.placed {
  opacity: 0.58;
}
.mini-game-board.princess-dress-up.complete {
  animation: princess-accessory-complete-glow 0.8s ease;
}
@keyframes princess-accessory-complete-glow {
  0%,
  100% {
    box-shadow: 0 18px 36px rgba(91, 55, 132, 0.16);
  }
  50% {
    box-shadow: 0 0 34px rgba(255, 216, 107, 0.72);
  }
}
@media (max-width: 620px) {
  .dress-up-shell {
    min-height: auto;
  }
  .dress-up-stage {
    min-height: 430px;
  }
  .dress-up-card {
    left: 8px;
    top: 8px;
    width: calc(100% - 16px);
    font-size: 11px;
  }
  .dress-up-princess-wrap {
    width: min(250px, 72vw);
    margin-top: 58px;
  }
  .dress-up-slot {
    min-width: 70px;
    min-height: 36px;
    font-size: 10px;
  }
  .dress-up-tray {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }
  .dress-up-piece {
    min-height: 44px;
  }
}

.mini-game-board.princess-dress-up .dress-up-stage {
  isolation: isolate;
}
.mini-game-board.princess-dress-up .dress-up-slot {
  min-width: 92px;
  min-height: 52px;
  gap: 3px;
  padding: 5px 8px;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    box-shadow 120ms ease,
    transform 120ms ease;
  user-select: none;
}
.mini-game-board.princess-dress-up .dress-up-slot.drop-target {
  border-color: #e84393;
  outline: 4px solid rgba(232, 67, 147, 0.28);
  outline-offset: 3px;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 28px rgba(232, 67, 147, 0.8),
    0 8px 18px rgba(91, 55, 132, 0.16);
  transform: translate(-50%, -50%) scale(1.04);
}
.dress-up-slot-mark,
.dress-up-piece-mark {
  display: inline-grid;
  place-items: center;
  min-width: 1.2em;
  font-size: 1.35em;
  line-height: 1;
}
.dress-up-slot.filled {
  border-width: 3px;
}
.dress-up-piece {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 52px;
  padding: 7px 8px;
  transition:
    border-color 120ms ease,
    box-shadow 120ms ease,
    opacity 120ms ease;
}
.dress-up-piece:focus-visible {
  outline: 4px solid #e84393;
  outline-offset: 3px;
}
.dress-up-piece.dragging {
  cursor: grabbing;
  border-color: #e84393;
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 26px rgba(232, 67, 147, 0.72),
    0 18px 30px rgba(91, 55, 132, 0.22);
}
.dress-up-piece.placed {
  opacity: 0.78;
  border-color: rgba(117, 70, 158, 0.55);
}
.mini-game-board.princess-dress-up[data-proof-paused] *,
.mini-game-board.princess-dress-up[data-proof-paused] *::before,
.mini-game-board.princess-dress-up[data-proof-paused] *::after {
  animation-play-state: paused !important;
  transition: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .mini-game-board.princess-dress-up,
  .mini-game-board.princess-dress-up * {
    animation: none !important;
    transition: none !important;
  }
}
@media (forced-colors: active) {
  .mini-game-board.princess-dress-up {
    background: Canvas;
    color: CanvasText;
  }
  .mini-game-board.princess-dress-up .dress-up-stage,
  .mini-game-board.princess-dress-up .dress-up-card,
  .mini-game-board.princess-dress-up .dress-up-slot,
  .mini-game-board.princess-dress-up .dress-up-piece {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
    box-shadow: none;
    forced-color-adjust: none;
  }
  .mini-game-board.princess-dress-up .dress-up-slot.drop-target,
  .mini-game-board.princess-dress-up .dress-up-piece:focus-visible {
    outline: 4px solid Highlight;
    outline-offset: 3px;
  }
}
@media (max-width: 520px) {
  .mini-game-board.princess-dress-up .dress-up-slot {
    min-width: 76px;
    min-height: 48px;
    padding: 5px 6px;
  }
  .mini-game-board.princess-dress-up .dress-up-piece {
    min-height: 48px;
  }
}
.mini-game-board.princess-dress-up .dress-up-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0 8px 4px;
}
.mini-game-board.princess-dress-up .dress-up-action {
  min-height: 44px;
  padding: 8px 12px;
  border: 2px solid rgba(117, 70, 158, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #40265f;
  font: 800 12px/1.1 "Trebuchet MS", Arial, sans-serif;
  cursor: pointer;
}
.mini-game-board.princess-dress-up .dress-up-action:disabled {
  opacity: 0.46;
  cursor: not-allowed;
}
.mini-game-board.princess-dress-up .dress-up-action:focus-visible {
  outline: 4px solid #e84393;
  outline-offset: 3px;
}
.mini-game-board.princess-dress-up .dress-up-slot.drop-target-wrong {
  border-color: #b36b00;
  outline: 4px dashed rgba(179, 107, 0, 0.55);
  outline-offset: 3px;
  transform: translate(-50%, -50%) scale(1.02);
}
@media (forced-colors: active) {
  .mini-game-board.princess-dress-up .dress-up-action {
    border-color: CanvasText;
    background: Canvas;
    color: CanvasText;
  }
}
@media (max-width: 520px) {
  .mini-game-board.princess-dress-up .dress-up-actions {
    justify-content: stretch;
  }
  .mini-game-board.princess-dress-up .dress-up-action {
    flex: 1 1 140px;
  }
}
.mini-game-board.princess-dress-up .dress-up-tray {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}
.mini-game-board.princess-dress-up .dress-up-choice-group {
  min-width: 0;
  margin: 0;
  padding: 4px;
  border: 1px solid rgba(117, 70, 158, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.34);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}
.mini-game-board.princess-dress-up .dress-up-choice-group legend {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0 4px 2px;
  color: #5e3c7b;
  font: 900 10px/1.1 "Trebuchet MS", Arial, sans-serif;
  text-align: center;
}
.mini-game-board.princess-dress-up .dress-up-choice-group .dress-up-piece {
  min-width: 0;
  width: 100%;
}
@media (max-width: 620px) {
  .mini-game-board.princess-dress-up .dress-up-tray {
    grid-template-columns: 1fr;
  }
  .mini-game-board.princess-dress-up .dress-up-choice-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (forced-colors: active) {
  .mini-game-board.princess-dress-up .dress-up-choice-group {
    border-color: CanvasText;
    background: Canvas;
  }
  .mini-game-board.princess-dress-up .dress-up-choice-group legend {
    color: CanvasText;
  }
}
@media (orientation: landscape) and (max-height: 520px) {
  .mini-game-board.princess-dress-up .dress-up-card {
    width: min(300px, calc(100% - 24px));
    font-size: 11px;
    line-height: 1.18;
  }
}

/* Crown Rhythm Tap */
.mini-game-board.crown-rhythm-tap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: min(70vh, 740px);
  padding: 0;
  overflow: visible;
  background: #211737;
}
.crown-rhythm-shell {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-height: min(70vh, 740px);
}
.crown-rhythm-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: min(66vh, 680px);
  overflow: hidden;
  border: 3px solid rgba(255, 213, 121, 0.84);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 42%, rgba(122, 82, 175, 0.5), transparent 34%),
    radial-gradient(circle at 18% 82%, rgba(32, 189, 178, 0.2), transparent 28%),
    radial-gradient(circle at 84% 74%, rgba(240, 94, 154, 0.17), transparent 26%),
    linear-gradient(160deg, #17132b, #352044 55%, #54253f);
  box-shadow: inset 0 0 48px rgba(8, 5, 24, 0.42), 0 18px 38px rgba(42, 20, 54, 0.26);
}
.crown-rhythm-stage::before,
.crown-rhythm-stage::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff0af;
  box-shadow:
    92px 28px 0 #8ff4e7,
    208px 92px 0 #f7a4d1,
    346px 26px 0 #fff0af,
    472px 84px 0 #8ff4e7,
    612px 34px 0 #f7a4d1,
    730px 116px 0 #fff0af;
  opacity: 0.52;
}
.crown-rhythm-stage::before { left: 8%; top: 24%; }
.crown-rhythm-stage::after { right: 10%; bottom: 28%; transform: rotate(180deg); }
.crown-rhythm-card {
  box-sizing: border-box;
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 5;
  width: min(470px, calc(100% - 164px));
  min-height: 88px;
  padding: 11px 14px;
  border: 2px solid rgba(255, 226, 167, 0.78);
  border-radius: 14px;
  background: rgba(255, 249, 235, 0.94);
  color: #3c2458;
  font: 800 13px/1.24 "Trebuchet MS", Arial, sans-serif;
  box-shadow: 0 10px 24px rgba(13, 8, 31, 0.24);
}
.crown-rhythm-card strong {
  display: block;
  margin-bottom: 4px;
  font:
    900 15px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
}
.crown-rhythm-card span,
.crown-rhythm-card em { display: block; }
.crown-rhythm-card em {
  margin-top: 4px;
  color: #19675f;
  font-style: normal;
}
.crown-rhythm-pattern {
  box-sizing: border-box;
  position: absolute;
  z-index: 5;
  top: 112px;
  left: 50%;
  width: min(500px, calc(100% - 220px));
  min-height: 42px;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 229, 179, 0.5);
  border-radius: 14px;
  background: rgba(18, 13, 39, 0.92);
}
.crown-rhythm-chip {
  min-width: 65px;
  padding: 5px 9px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #281a3e;
  background: #fff0af;
  text-align: center;
  font: 900 12px/1.1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.crown-rhythm-chip.rose { background: #f7a4d1; }
.crown-rhythm-chip.blue { background: #8ff4e7; }
.crown-rhythm-chip.violet { background: #c8a8ff; }
.crown-rhythm-chip.mystery { color: #fff; background: #6b3a8d; }
.crown-rhythm-chip.active {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 0 20px rgba(255, 240, 175, 0.92);
}
.crown-rhythm-replay {
  position: absolute;
  z-index: 6;
  top: 12px;
  right: 12px;
  min-width: 126px;
  min-height: 48px;
  border: 2px solid rgba(255, 225, 164, 0.82);
  border-radius: 14px;
  color: #fff9ec;
  background: linear-gradient(150deg, #764b92, #4a2a65);
  box-shadow: inset 0 -4px 0 rgba(26, 13, 47, 0.28), 0 8px 20px rgba(11, 6, 26, 0.24);
  font: 900 13px/1.1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  cursor: pointer;
}
.crown-rhythm-replay:focus-visible,
.crown-rhythm-tap-btn:focus-visible,
.crown-rhythm-choices button:focus-visible {
  outline: 4px solid #8ff4e7;
  outline-offset: 2px;
}
.crown-rhythm-replay:disabled { opacity: 0.55; cursor: default; }
.crown-rhythm-ring {
  --beat-angle: 0deg;
  --beat-counter-angle: 0deg;
  --rhythm-radius: 112px;
  position: relative;
  z-index: 2;
  width: min(324px, 72vw);
  aspect-ratio: 1;
  margin-top: 64px;
  border: 8px solid rgba(255, 211, 112, 0.94);
  border-radius: 50%;
  background:
    radial-gradient(circle, #211737 0 43%, transparent 44%),
    conic-gradient(
      from -45deg,
      #f7a4d1,
      #fff0af 25%,
      #8ff4e7 50%,
      #c8a8ff 75%,
      #f7a4d1
    );
  box-shadow:
    inset 0 0 0 10px rgba(255, 255, 255, 0.18),
    inset 0 0 28px rgba(255, 244, 201, 0.28),
    0 0 0 7px rgba(80, 46, 101, 0.72),
    0 24px 42px rgba(10, 5, 24, 0.38);
}
.crown-rhythm-center {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  width: 104px;
  height: 88px;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  color: #fff0af;
  text-align: center;
  font: 900 15px/1.05 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
}
.crown-rhythm-center b { position: relative; z-index: 2; padding-bottom: 7px; }
.crown-rhythm-center::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 50%;
  width: 80px;
  height: 48px;
  transform: translateX(-50%);
  clip-path: polygon(0 42%, 18% 8%, 38% 42%, 57% 0, 76% 42%, 100% 10%, 88% 82%, 12% 82%);
  background: #fff0af;
  filter: drop-shadow(0 0 8px rgba(255, 240, 175, 0.45));
}
.crown-rhythm-center i {
  display: none;
}
.crown-rhythm-markers { position: absolute; inset: 0; }
.crown-rhythm-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  display: grid;
  place-items: center;
  border: 3px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  color: #2d1d40;
  background: #fff0af;
  box-shadow: 0 0 0 5px rgba(255, 240, 175, 0.16), 0 0 18px rgba(255, 240, 175, 0.55);
  transform: rotate(var(--marker-angle)) translateX(var(--rhythm-radius)) rotate(var(--marker-counter-angle));
  font: 900 13px/1 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  transition: width 150ms ease, height 150ms ease, margin 150ms ease, box-shadow 150ms ease;
}
.crown-rhythm-marker.rose { background: #f7a4d1; }
.crown-rhythm-marker.blue { background: #8ff4e7; }
.crown-rhythm-marker.violet { background: #c8a8ff; }
.crown-rhythm-marker.preview { opacity: 0.58; }
.crown-rhythm-marker.preview.active,
.crown-rhythm-marker.target {
  opacity: 1;
  box-shadow: 0 0 0 8px rgba(255, 240, 175, 0.27), 0 0 28px rgba(255, 240, 175, 0.96);
}
.crown-rhythm-marker.target {
  background: #f7a4d1;
  box-shadow:
    0 0 0 8px rgba(247, 164, 209, 0.38),
    0 0 28px rgba(247, 164, 209, 0.98),
    0 0 44px rgba(255, 240, 175, 0.78);
  animation: crown-rhythm-target-pulse 0.74s ease-in-out infinite alternate;
}
.crown-rhythm-marker.target.assist {
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-style: dashed;
}
.crown-rhythm-marker.finale {
  border-color: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 7px rgba(255, 240, 175, 0.2), 0 0 22px rgba(255, 240, 175, 0.82);
}
.crown-rhythm-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 32px;
  height: 32px;
  margin: -16px 0 0 -16px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #46e1d3;
  box-shadow:
    0 0 0 6px rgba(70, 225, 211, 0.24),
    0 0 24px rgba(70, 225, 211, 0.82);
}
.crown-rhythm-choices {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 68px;
  width: min(700px, calc(100% - 28px));
  transform: translateX(-50%);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.crown-rhythm-choices[hidden] { display: none; }
.crown-rhythm-choices button {
  min-width: 0;
  min-height: 54px;
  padding: 7px 5px;
  border: 2px solid rgba(255, 226, 169, 0.76);
  border-radius: 14px;
  color: #fff9ea;
  background: linear-gradient(160deg, #764b92, #4a2a65);
  box-shadow: inset 0 -4px 0 rgba(24, 12, 42, 0.26), 0 8px 20px rgba(10, 6, 23, 0.26);
  cursor: pointer;
}
.crown-rhythm-choices strong,
.crown-rhythm-choices small { display: block; }
.crown-rhythm-choices strong { font: 900 13px/1.05 "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
.crown-rhythm-choices small { margin-top: 3px; color: #ffe3a6; font: 750 11px/1 system-ui, sans-serif; }
.crown-rhythm-tap-btn {
  position: absolute;
  left: 50%;
  bottom: 68px;
  z-index: 4;
  min-width: min(260px, calc(100% - 40px));
  min-height: 54px;
  transform: translateX(-50%);
  border: 2px solid rgba(255, 226, 169, 0.88);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff0af, #f3c96f);
  color: #3b2452;
  font:
    900 14px/1.1 "Arial Rounded MT Bold",
    "Trebuchet MS",
    Arial,
    sans-serif;
  cursor: pointer;
  box-shadow: inset 0 -5px 0 rgba(132, 78, 44, 0.18), 0 10px 22px rgba(10, 6, 24, 0.3);
}
.crown-rhythm-tap-btn[hidden] { display: none; }
.crown-rhythm-tap-btn:disabled {
  cursor: default;
  opacity: 0.66;
}
.mini-game-board.crown-rhythm-tap.complete {
  animation: crown-rhythm-complete-glow 0.8s ease;
}
@keyframes crown-rhythm-target-pulse {
  from {
    transform: rotate(var(--marker-angle)) translateX(var(--rhythm-radius)) rotate(var(--marker-counter-angle)) scale(1);
  }
  to {
    transform: rotate(var(--marker-angle)) translateX(var(--rhythm-radius)) rotate(var(--marker-counter-angle)) scale(1.12);
  }
}
@keyframes crown-rhythm-complete-glow {
  0%,
  100% {
    box-shadow: 0 18px 36px rgba(42, 20, 54, 0.24);
  }
  50% {
    box-shadow: 0 0 42px rgba(255, 216, 107, 0.82);
  }
}
@media (max-width: 620px) {
  .crown-rhythm-shell {
    min-height: auto;
  }
  .crown-rhythm-stage {
    min-height: 550px;
  }
  .crown-rhythm-card {
    left: 8px;
    top: 8px;
    width: calc(100% - 16px);
    min-height: 92px;
    padding: 9px 11px;
    font-size: 11px;
  }
  .crown-rhythm-replay {
    top: 108px;
    right: 8px;
    min-width: 116px;
    min-height: 46px;
  }
  .crown-rhythm-pattern {
    top: 108px;
    left: 8px;
    width: calc(100% - 138px);
    min-height: 46px;
    transform: none;
    justify-content: flex-start;
    gap: 4px;
    overflow: hidden;
  }
  .crown-rhythm-chip {
    min-width: 0;
    flex: 1 1 0;
    padding: 5px 4px;
    font-size: 9px;
  }
  .crown-rhythm-ring {
    --rhythm-radius: 88px;
    width: min(252px, 72vw);
    margin-top: 104px;
  }
  .crown-rhythm-center {
    transform: translate(-50%, -50%) scale(0.82);
  }
  .crown-rhythm-choices {
    width: calc(100% - 16px);
    gap: 5px;
    bottom: 70px;
  }
  .crown-rhythm-choices button {
    min-height: 50px;
    padding: 6px 3px;
  }
  .crown-rhythm-choices strong { font-size: 10px; }
  .crown-rhythm-choices small { font-size: 9px; }
  .crown-rhythm-tap-btn {
    bottom: 70px;
    min-height: 52px;
  }
}
@media (orientation: landscape) and (max-height: 520px) and (min-width: 700px) {
  .crown-rhythm-stage {
    min-height: calc(100vh - 74px);
  }
  .crown-rhythm-card {
    width: min(330px, calc(100% - 514px));
    min-height: 74px;
    padding: 8px 11px;
    font-size: 11px;
  }
  .crown-rhythm-card strong { font-size: 13px; }
  .crown-rhythm-pattern {
    top: 12px;
    left: 63%;
    width: min(300px, calc(100% - 480px));
    min-height: 42px;
    padding: 5px 7px;
  }
  .crown-rhythm-chip {
    min-width: 0;
    padding: 4px 6px;
    font-size: 10px;
  }
  .crown-rhythm-ring {
    --rhythm-radius: clamp(62px, 18vh, 78px);
    width: min(220px, 48vh);
    margin-top: 0;
    transform: translateY(-40px);
  }
  .crown-rhythm-tap-btn,
  .crown-rhythm-choices { bottom: 16px; }
  .crown-rhythm-tap-btn,
  .crown-rhythm-choices button { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .crown-rhythm-chip,
  .crown-rhythm-marker,
  .crown-rhythm-marker.target,
  .mini-game-board.crown-rhythm-tap.complete { transition: none; animation: none; }
}
