/* Mochi's Mini Kitchen */
:root {
  --cocoa: #5a3d36; --cocoa2: #8a6a60; --cream: #fff3e8; --cream2: #ffe9d6;
  --pink: #ff8fb1; --pink2: #ffd6e4; --mint: #7fd8be; --butter: #ffd24d; --sky: #8ec9ff; --lilac: #c7b5ff; --peach: #ffb37f; --tomato: #ff6b6b;
  --r: 22px; --shadow: 0 6px 0 rgba(90, 61, 54, .18);
  --font: 'Fredoka', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font); color: var(--cocoa); font-weight: 500;
  background-color: var(--cream);
  background-image: radial-gradient(circle at 20% 10%, #ffe1ec 0, transparent 40%), radial-gradient(circle at 90% 80%, #e2f7ee 0, transparent 40%),
    radial-gradient(#f7dcc6 1.6px, transparent 1.8px);
  background-size: auto, auto, 26px 26px;
  overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
button { font-family: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; touch-action: manipulation; }
svg { display: block; overflow: visible; }
.hidden { display: none !important; }
b { font-weight: 700; }
.gold { color: #e39a14; }

#app { min-height: 100vh; min-height: 100dvh; max-width: 1180px; margin: 0 auto; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* ---------- buttons ---------- */
.big-btn {
  line-height: 1.15; text-align: center;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--pink); color: #fff; font-weight: 700; font-size: 1.2rem; letter-spacing: .01em;
  padding: 14px 28px; border-radius: 999px; border: 3px solid var(--cocoa);
  box-shadow: 0 6px 0 var(--cocoa), inset 0 -5px 0 rgba(0, 0, 0, .12), inset 0 4px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 2px 0 rgba(90, 61, 54, .35); transition: transform .08s, box-shadow .08s;
}
.big-btn:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--cocoa), inset 0 -3px 0 rgba(0, 0, 0, .12); }
.big-btn.alt { background: var(--mint); }
.big-btn.disabled { background: #d9cfc4; pointer-events: none; }
.big-btn svg { width: 28px; height: 28px; }
.small-btn { line-height: 1.15; text-align: center; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; padding: 10px 18px; font-weight: 700; font-size: 1rem; box-shadow: 0 4px 0 var(--cocoa); }
.small-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cocoa); }
.small-btn.ghost { background: #fff8f0; }
.icon-btn { width: 46px; height: 46px; border-radius: 16px; background: var(--pink2); border: 3px solid var(--cocoa); box-shadow: 0 4px 0 var(--cocoa); display: grid; place-items: center; font-size: 1.8rem; font-weight: 700; line-height: 1; flex: none; }
.icon-btn svg { width: 30px; height: 30px; }
.icon-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cocoa); }
.icon-btn:disabled { opacity: .35; }
.chip { padding: 8px 14px; border-radius: 999px; background: #fff; border: 2.5px solid var(--cocoa); font-weight: 600; font-size: .95rem; box-shadow: 0 3px 0 var(--cocoa); white-space: nowrap; }
.chip.on { background: var(--gc, var(--butter)); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--cocoa); }
.pill { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; padding: 4px 12px 4px 6px; font-weight: 700; font-size: 1.1rem; box-shadow: 0 3px 0 var(--cocoa); }
.pill svg { width: 28px; height: 28px; }
.pill.bump { animation: bump .3s; }
@keyframes bump { 50% { transform: scale(1.18); } }

/* ---------- topbar ---------- */
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 6px; position: relative; z-index: 5; }
.tb-title { flex: 1; font-size: 1.5rem; font-weight: 700; text-align: center; text-shadow: 0 2px 0 #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-right { display: flex; align-items: center; gap: 8px; }
.tb-spacer { width: 46px; }
.sound-btn { background: var(--sky); }
.home-btn { background: var(--butter); }

/* ---------- iris transition ---------- */
#iris { position: fixed; inset: 0; z-index: 100; pointer-events: none; background: var(--pink); clip-path: circle(0% at 50% 50%); display: grid; place-items: center; }
#iris.closing { clip-path: circle(75% at 50% 50%); transition: clip-path .38s cubic-bezier(.6, 0, .4, 1); pointer-events: all; }
#iris.open { clip-path: circle(0% at 50% 50%); transition: clip-path .42s cubic-bezier(.6, 0, .4, 1); }
#iris::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(#ffb3cb 3px, transparent 3.5px); background-size: 34px 34px; }
.iris-face { width: 180px; position: relative; animation: bob 1s infinite ease-in-out; }

/* ---------- shared character animations ---------- */
.mochi { width: 100%; height: auto; }
.mochi .m-tail { transform-origin: 168px 160px; animation: tail 1.8s ease-in-out infinite; }
.mochi .m-body { transform-origin: 110px 185px; animation: breathe 2.6s ease-in-out infinite; }
.mochi .m-hat { transform-box: fill-box; }
@keyframes tail { 50% { transform: rotate(-12deg); } }
@keyframes breathe { 50% { transform: scale(1.025, .975); } }
@keyframes bob { 50% { transform: translateY(-8px); } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); } 50% { transform: translateY(-14px) rotate(calc(var(--rot, 0deg) + 6deg)); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-9px) rotate(-3deg); } 40% { transform: translateX(8px) rotate(3deg); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }
@keyframes popIn { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.08); opacity: 1; } 100% { transform: scale(1); } }
.shake { animation: shake .45s; }
.twinkle { animation: twinkle 1.4s ease-in-out infinite; }
@keyframes twinkle { 50% { opacity: .35; } }
.steam { animation: steam 2s ease-in-out infinite; }
@keyframes steam { 0% { opacity: 0; transform: translateY(4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(-8px); } }
.flame { transform-box: fill-box; transform-origin: 50% 100%; animation: flick .4s ease-in-out infinite alternate; }
@keyframes flick { to { transform: scale(1.1, .9); } }
.clock-tail { transform-box: fill-box; transform-origin: 50% 0; animation: wiggle 1s ease-in-out infinite; }
.food.silhouette * { fill: #e9ded3 !important; stroke: #d6c8bb !important; }
.food.silhouette .kface { display: none; }

/* ---------- TITLE ---------- */
.title-screen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px 16px 32px; position: relative; overflow: hidden; min-height: 100dvh; text-align: center; }
.title-sky { position: absolute; inset: 0; pointer-events: none; }
.sprinkle { position: absolute; top: -20px; width: 8px; height: 22px; border-radius: 4px; animation: fall linear infinite; opacity: .8; }
.sprinkle.s0 { background: var(--pink); } .sprinkle.s1 { background: var(--mint); } .sprinkle.s2 { background: var(--butter); } .sprinkle.s3 { background: var(--sky); } .sprinkle.s4 { background: var(--lilac); }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); } }
.title-float { position: absolute; z-index: 1; opacity: .9; width: clamp(60px, 12vw, 120px); animation: floaty 4s ease-in-out infinite; pointer-events: none; }
.title-float.f1 { left: 6%; top: 10%; --rot: -12deg; } .title-float.f2 { right: 7%; top: 12%; --rot: 10deg; animation-delay: -1s; }
.title-float.f3 { left: 4%; bottom: 30%; animation-delay: -2s; } .title-float.f4 { right: 5%; bottom: 30%; --rot: 8deg; animation-delay: -3s; }
.title-float.f5 { left: 18%; top: 34%; width: clamp(50px, 9vw, 90px); animation-delay: -1.5s; opacity: .9; } .title-float.f6 { right: 17%; top: 38%; width: clamp(50px, 9vw, 90px); animation-delay: -2.5s; }
.logo { position: relative; z-index: 2; }
.logo-small { font-size: clamp(1.2rem, 4vw, 1.7rem); font-weight: 600; color: var(--cocoa2); transform: rotate(-4deg); }
.logo h1 { margin: 0; line-height: .92; font-weight: 700; font-size: clamp(3rem, 12vw, 6rem); color: #fff; letter-spacing: .01em;
  -webkit-text-stroke: 4px var(--cocoa); paint-order: stroke fill; text-shadow: 0 7px 0 var(--cocoa); }
.logo h1 span { display: block; color: var(--pink); }
.logo h1 .l2 { color: #fff; font-size: .62em; margin-top: 6px; }
.logo-sub { margin-top: 12px; font-size: clamp(1rem, 3.4vw, 1.3rem); background: #fff; display: inline-block; padding: 6px 16px; border-radius: 999px; border: 2.5px solid var(--cocoa); box-shadow: 0 3px 0 var(--cocoa); }
.title-mochi { width: clamp(180px, 42vw, 300px); position: relative; z-index: 2; animation: bob 2.4s ease-in-out infinite; cursor: pointer; }
.play-btn { font-size: 1.6rem; padding: 18px 46px; z-index: 2; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.06); } }
.title-foot { position: relative; max-width: 420px; color: var(--cocoa2); font-size: 1rem; z-index: 2; }

/* ---------- HUB ---------- */
.hub { flex: 1; display: grid; gap: 16px; padding: 4px 14px 24px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .hub { grid-template-columns: 1.25fr 1fr; align-items: start; } }
.hub-stage { position: relative; }
.hub-sign { position: absolute; z-index: 3; top: -6px; left: 50%; transform: translateX(-50%) rotate(-2deg); background: #fff; border: 3px solid var(--cocoa); border-radius: 16px; padding: 4px 18px; font-weight: 700; font-size: 1.15rem; box-shadow: 0 4px 0 var(--cocoa); white-space: nowrap; }
.hub-sign span { color: var(--pink); }
.room-wrap { position: relative; border-radius: 26px; overflow: hidden; border: 4px solid var(--cocoa); box-shadow: 0 8px 0 var(--cocoa); background: #fff; }
.room { width: 100%; height: auto; display: block; }
.room-mochi { position: absolute; left: 50%; bottom: 4%; width: 24%; transform: translateX(-50%); cursor: pointer; z-index: 2; }
.room-mochi .mochi-holder { animation: bob 3s ease-in-out infinite; }
.bubble { position: absolute; bottom: 92%; left: 50%; width: max-content; max-width: min(300px, 70vw); transform: translateX(-50%) scale(0); transform-origin: 50% 100%;
  background: #fff; border: 3px solid var(--cocoa); border-radius: 18px; padding: 10px 14px; font-size: .98rem; line-height: 1.3; box-shadow: 0 4px 0 var(--cocoa); transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); pointer-events: none; z-index: 4; text-align: center; }
.bubble::after { content: ''; position: absolute; left: 50%; bottom: -12px; width: 18px; height: 18px; background: #fff; border-right: 3px solid var(--cocoa); border-bottom: 3px solid var(--cocoa); transform: translateX(-50%) rotate(45deg); }
.bubble.pop { transform: translateX(-50%) scale(1); }
.deco-btn { position: absolute; right: 10px; bottom: 10px; z-index: 3; display: flex; align-items: center; gap: 4px; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; padding: 4px 12px 4px 4px; font-weight: 700; box-shadow: 0 3px 0 var(--cocoa); }
.deco-btn svg { width: 30px; height: 30px; }
.hub-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.menu-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: left; padding: 12px; border-radius: var(--r); border: 3px solid var(--cocoa); box-shadow: 0 6px 0 var(--cocoa); background: #fff; transition: transform .1s; min-height: 140px; overflow: hidden; }
.menu-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cocoa); }
.menu-card .mc-art { display: flex; height: 58px; align-items: flex-end; }
.menu-card .mc-art svg { height: 58px; width: auto; }
.menu-card .mc-art.heads svg { height: 50px; margin-right: -12px; }
.menu-card .mc-art svg + svg { margin-left: -14px; }
.menu-card b { font-size: 1.25rem; display: block; }
.menu-card small { font-size: .85rem; color: var(--cocoa2); line-height: 1.25; display: block; font-weight: 500; }
.mc-rush { background: linear-gradient(160deg, #ffe0d1, #ffc9b3); grid-column: span 2; flex-direction: row; align-items: center; min-height: 120px; gap: 14px; }
.mc-rush .mc-art { height: 84px; } .mc-rush .mc-art svg { height: 84px; }
.mc-rush b { font-size: 1.6rem; }
.mc-quiz { background: linear-gradient(160deg, #e6dcff, #d1c2ff); grid-column: span 2; flex-direction: row; align-items: center; min-height: 110px; gap: 22px; }
.mc-quiz .mc-art { height: 64px; flex: none; } .mc-quiz .mc-art.heads svg { height: 64px; }
.mc-quiz b { font-size: 1.5rem; }
.mc-study { background: linear-gradient(160deg, #e3f8ef, #bdeedd); grid-column: span 2; flex-direction: row; align-items: center; min-height: 96px; gap: 14px; }
.mc-study .mc-art, .mc-study .mc-art svg { height: 70px; }
.mc-box { background: linear-gradient(160deg, #ffe3ef, #ffc9de); }
.mc-book { background: linear-gradient(160deg, #e3f8ef, #c7efdf); }
.mc-shop { background: linear-gradient(160deg, #fff6d2, #ffe9a3); }
.mc-set { background: linear-gradient(160deg, #e2f1ff, #c9e4ff); }
.badge { position: absolute; top: 8px; right: 8px; background: var(--tomato); color: #fff; font-weight: 700; font-size: .85rem; padding: 3px 10px; border-radius: 999px; border: 2.5px solid var(--cocoa); animation: pulse 1.2s infinite; }

/* ---------- modal / toast / fx ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 60; background: rgba(90, 61, 54, .45); display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .25s; }
.modal-wrap.in { opacity: 1; }
.modal { background: var(--cream); border: 4px solid var(--cocoa); border-radius: 28px; box-shadow: 0 10px 0 var(--cocoa); padding: 22px; width: min(520px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto; text-align: center; transform: scale(.85); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.modal-wrap.in .modal { transform: scale(1); }
.modal h2 { margin: 4px 0 10px; font-size: 1.8rem; }
.modal-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.modal-actions.col { flex-direction: column; align-items: center; }
.toast { position: fixed; left: 50%; top: 14px; z-index: 80; transform: translate(-50%, -140%); transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; padding: 10px 16px; box-shadow: 0 5px 0 var(--cocoa); display: flex; align-items: center; gap: 10px; font-size: 1rem; max-width: calc(100vw - 24px); text-align: left; }
.toast.in { transform: translate(-50%, 0); }
.toast svg { width: 44px; height: 44px; flex: none; }
.toast-miss { background: #ffe3e3; }
.toast-hurry { background: var(--butter); font-size: 1.2rem; }
.fx-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 90; }
.float-text { position: fixed; z-index: 91; transform: translate(-50%, -50%); font-weight: 700; font-size: 1.8rem; color: #fff; -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; pointer-events: none; animation: floatUp 1.3s ease-out forwards; white-space: nowrap; }
.ft-gold { color: var(--butter); } .ft-pink { color: var(--pink); font-size: 1.5rem; } .ft-blue { color: var(--sky); }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -20%) scale(.5); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1); } }
.fly-coin { position: fixed; z-index: 92; width: 30px; height: 30px; pointer-events: none; }
.fly-coin svg { width: 100%; height: 100%; }

/* ---------- Daily / progress ---------- */
.daily-mochi { width: 150px; margin: -10px auto 0; animation: bob 2s infinite; }
.daily-box { width: 120px; margin: 6px auto 14px; }
.wiggle { animation: wiggle 1s ease-in-out infinite; }
.modal-wrap.tall .modal { width: min(620px, 100%); }
.prog-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 8px; }
.prog-stats div { background: #fff; border: 2.5px solid var(--cocoa); border-radius: 16px; padding: 8px 4px; }
.prog-stats b { font-size: 1.4rem; display: block; } .prog-stats small { font-size: .78rem; color: var(--cocoa2); }
.prog-hint { font-size: .9rem; color: var(--cocoa2); margin: 8px 0; }
.prog-list { text-align: left; display: grid; gap: 10px; }
.prog-group h4 { margin: 4px 0; display: inline-block; background: var(--gc); padding: 2px 12px; border-radius: 999px; border: 2px solid var(--cocoa); }
.prog-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 6px; border-bottom: 2px dashed #f0dccb; }
.hearts { display: flex; gap: 2px; } .hearts svg { width: 22px; height: 22px; }
.settings { display: grid; gap: 10px; text-align: left; margin-top: 16px; background: #fff; padding: 12px 16px; border-radius: 16px; border: 2.5px solid var(--cocoa); }
.settings label { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; }
.settings input { width: 24px; height: 24px; accent-color: var(--pink); }

/* ---------- RUSH MAP ---------- */
.rushmap { padding: 4px 14px 30px; display: flex; flex-direction: column; gap: 14px; }
.map-intro { display: flex; align-items: center; gap: 10px; }
.map-mochi { width: 110px; flex: none; }
.map-bubble { background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; padding: 12px 14px; box-shadow: 0 4px 0 var(--cocoa); font-size: 1rem; line-height: 1.35; position: relative; }
.map-path { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .map-path { grid-template-columns: 1fr 1fr; } .shift-card:last-child { grid-column: span 2; } }
.shift-card { display: flex; align-items: center; gap: 12px; text-align: left; background: #fff; border: 3px solid var(--cocoa); border-radius: var(--r); box-shadow: 0 6px 0 var(--cocoa); padding: 10px 14px; position: relative; background-image: linear-gradient(90deg, color-mix(in srgb, var(--sc) 40%, #fff), #fff 70%); }
.shift-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cocoa); }
.shift-card.locked { filter: grayscale(.85); opacity: .75; }
.shift-num { position: absolute; top: -10px; left: -8px; width: 34px; height: 34px; border-radius: 50%; background: var(--sc); border: 3px solid var(--cocoa); display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; }
.shift-dish { width: 76px; height: 76px; flex: none; display: grid; place-items: center; }
.shift-dish svg { width: 76px; height: 76px; } .shift-card.locked .shift-dish svg { width: 46px; }
.shift-info b { font-size: 1.25rem; display: block; } .shift-info small { color: var(--cocoa2); display: block; }
.shift-stars { display: flex; gap: 2px; margin-top: 4px; } .shift-stars svg { width: 28px; height: 28px; }
.shift-info .best { font-size: .8rem; }
.map-foot { text-align: center; color: var(--cocoa2); font-size: .9rem; margin: 0; }

/* ---------- RUSH ---------- */
.screen-rush { max-width: none; }
.rush { flex: 1; display: grid; gap: 8px; padding: 8px 10px 12px; position: relative;
  grid-template-columns: 1fr; grid-template-areas: 'hud' 'rail' 'board' 'station' 'answers'; grid-template-rows: auto auto auto auto 1fr;
  background: linear-gradient(#fff3e8 0, #fff3e8 60%, #ffe2d0 100%); min-height: 100dvh; overflow: hidden; }
.rush::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(45deg, rgba(255, 179, 199, .14) 25%, transparent 25%, transparent 75%, rgba(255, 179, 199, .14) 75%), linear-gradient(45deg, rgba(255, 179, 199, .14) 25%, transparent 25%, transparent 75%, rgba(255, 179, 199, .14) 75%); background-size: 44px 44px; background-position: 0 0, 22px 22px; pointer-events: none; }
.rush > * { position: relative; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .rush { grid-template-columns: 1.1fr 1fr; grid-template-areas: 'hud hud' 'rail answers' 'board answers' 'station answers' '. answers'; grid-template-rows: auto auto auto auto 1fr; max-width: 1280px; margin: 0 auto; width: 100%; column-gap: 22px; row-gap: 14px; padding: 14px 22px; align-content: center; }
  .station { min-height: 210px; margin-top: 6px; }
  .answer-area { padding-top: 10px; }
  .tip-bubble { left: auto; right: 22px; width: 46%; bottom: 96px; }
}
.rush-hud { grid-area: hud; display: flex; align-items: center; gap: 10px; }
.hud-timer { display: flex; align-items: center; gap: 6px; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; padding: 3px 14px 3px 6px; box-shadow: 0 3px 0 var(--cocoa); font-size: 1.4rem; min-width: 112px; }
.hud-timer svg { width: 30px; height: 30px; }
.hud-timer.hurry { background: #ffd0d0; animation: pulse .5s infinite; }
.hud-score { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.hud-coins { display: flex; align-items: center; gap: 4px; font-size: 1.4rem; } .hud-coins svg { width: 32px; height: 32px; }
.star-bar { flex: 1; max-width: 460px; height: 18px; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; position: relative; margin-right: 14px; }
.star-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--butter), #ffb02e); transition: width .4s; }
.sb-star { position: absolute; top: 50%; width: 30px; height: 30px; transform: translate(-50%, -50%); }
.sb-star.on { animation: popIn .4s; }
.hud-streak { display: flex; align-items: center; font-size: 1.3rem; min-width: 0; }
.hud-streak svg { width: 26px; height: 30px; } .hud-streak.hot { color: #ff6b3d; animation: pulse .6s infinite; }

.ticket-rail { grid-area: rail; display: flex; gap: 10px; min-height: 124px; padding: 14px 4px 6px; background: linear-gradient(#c99b75, #b5835b); border: 3px solid var(--cocoa); border-radius: 18px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .12); align-items: flex-start; overflow: hidden; }
.ticket { position: relative; width: 104px; flex: none; background: #fffdf6; border: 3px solid var(--cocoa); border-radius: 6px 6px 14px 14px; padding: 6px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; box-shadow: 0 4px 0 rgba(90, 61, 54, .3); transform-origin: 50% 0; transition: transform .2s; }
.ticket.active { transform: scale(1.08); background: #fff; box-shadow: 0 0 0 4px var(--butter), 0 4px 0 rgba(90, 61, 54, .3); z-index: 2; }
.ticket.special { background: #fff3fa; }
.ticket.enter { animation: tkIn .45s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes tkIn { from { transform: translateX(120px) rotate(8deg); opacity: 0; } }
.ticket.angry { animation: angry .4s infinite; }
@keyframes angry { 25% { transform: rotate(-3deg); } 75% { transform: rotate(3deg); } }
.ticket.served { animation: served .5s forwards; }
@keyframes served { to { transform: translateY(-40px) scale(.6); opacity: 0; } }
.ticket.stormed { animation: stormed .5s forwards; }
@keyframes stormed { to { transform: translateY(80px) rotate(-20deg); opacity: 0; } }
.tk-pin { position: absolute; top: -10px; width: 14px; height: 14px; border-radius: 50%; background: var(--tomato); border: 2.5px solid var(--cocoa); }
.tk-num { font-size: .75rem; color: var(--cocoa2); font-weight: 700; }
.tk-dish svg { width: 46px; height: 46px; }
.tk-label { font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.1; }
.tk-bar { width: 100%; height: 9px; border-radius: 999px; background: #efe6dc; border: 2px solid var(--cocoa); overflow: hidden; margin-top: 3px; }
.tk-bar i { display: block; height: 100%; width: 100%; background: #7fd86b; }
.calm .tk-bar { display: none; }

.order-board { grid-area: board; background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; box-shadow: 0 5px 0 var(--cocoa); padding: 10px 16px 14px; min-height: 92px; text-align: center; }
.ob-label { display: flex; align-items: center; justify-content: center; gap: 6px; margin: -24px auto 4px; width: max-content; background: var(--sc); border: 3px solid var(--cocoa); border-radius: 999px; padding: 2px 14px 2px 14px; font-weight: 700; font-size: .95rem; min-height: 30px; }
.ob-label svg { width: 34px; height: 34px; margin: -8px -6px -8px 0; }
.ob-label:empty { display: none; }
.ob-q { font-size: 1.08em; font-weight: 600; line-height: 1.3; font-size: clamp(1rem, 2.6vw, 1.3rem); }

.station { grid-area: station; display: grid; grid-template-columns: 1fr 1.25fr 1fr; align-items: end; gap: 6px; min-height: 150px; padding: 0 4px; position: relative; }
.station::after { content: ''; position: absolute; left: -10px; right: -10px; bottom: 0; height: 28px; background: #e9e3dc; border: 3px solid var(--cocoa); border-radius: 12px; z-index: -1; box-shadow: inset 0 5px 0 #fff; }
.st-mochi { width: 100%; max-width: 140px; justify-self: center; margin-bottom: 10px; }
.st-pot { position: relative; justify-self: center; width: 100%; max-width: 210px; margin-bottom: 12px; }
.st-pot .pot-svg { width: 100%; }
.st-pot.cooking .pot-svg { animation: wiggle .2s infinite; }
.pot-bubbles circle { animation: bubble 1.4s ease-in infinite; transform-box: fill-box; }
.pot-bubbles circle:nth-child(2) { animation-delay: -.5s; } .pot-bubbles circle:nth-child(3) { animation-delay: -.9s; }
@keyframes bubble { 0% { transform: scale(.3); opacity: 0; } 50% { opacity: 1; } 100% { transform: scale(1.3) translateY(-6px); opacity: 0; } }
.pot-steam { position: absolute; left: 0; right: 0; top: -14px; display: flex; justify-content: center; gap: 22px; pointer-events: none; }
.pot-steam i { width: 8px; height: 22px; border-radius: 10px; background: rgba(255, 255, 255, .9); animation: steam 2s ease-in-out infinite; }
.pot-steam i:nth-child(2) { animation-delay: -.7s; } .pot-steam i:nth-child(3) { animation-delay: -1.3s; }
.cooking .pot-steam i { animation-duration: .6s; }
.pot-fire { position: absolute; left: 50%; top: -40%; width: 90%; height: 110%; transform: translateX(-50%) scale(var(--fs, 1)); transform-origin: 50% 100%; transition: transform .2s; pointer-events: none; z-index: 3; }
.pot-fire .fl { position: absolute; bottom: 0; width: 46%; animation: flick .25s ease-in-out infinite alternate; transform-origin: 50% 100%; }
.pot-fire .fl.a { left: 0; } .pot-fire .fl.b { left: 27%; width: 50%; bottom: 8%; animation-delay: -.1s; } .pot-fire .fl.c { right: 0; animation-delay: -.18s; }
.pot-dish { position: absolute; left: 50%; top: 0; width: 70%; transform: translate(-50%, 0) scale(0); z-index: 4; pointer-events: none; }
.pot-dish.show { transform: translate(-50%, -70%) scale(1); transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
.pot-dish.to-pass { transform: translate(90%, -10%) scale(.6); opacity: 0; transition: all .45s ease-in; }
.st-pass { justify-self: center; width: 100%; max-width: 130px; margin-bottom: 14px; background: #d8f1ff; border: 3px solid var(--cocoa); border-radius: 14px 14px 6px 6px; height: 104px; position: relative; overflow: hidden; box-shadow: inset 0 -16px 0 #fff; }
.pass-label { position: absolute; top: 4px; left: 0; right: 0; text-align: center; font-weight: 700; font-size: .8rem; letter-spacing: .15em; color: #5b8db5; }
.pass-slot { position: absolute; left: 50%; bottom: 8px; width: 70px; transform: translateX(-50%); }
.pass-slot.slide { animation: passSlide 1.6s forwards; }
@keyframes passSlide { 0% { transform: translate(-50%, 0) scale(.5); opacity: 0; } 20% { transform: translate(-50%, 0) scale(1); opacity: 1; } 75% { transform: translate(-50%, 0); opacity: 1; } 100% { transform: translate(120%, 0); opacity: 0; } }
.tip-bubble { cursor: pointer; position: absolute; left: 12px; right: 12px; bottom: 84px; margin: 0 auto; max-width: 560px; display: flex; align-items: center; gap: 10px; font-size: 1.05rem !important; background: #fff; border: 3px solid var(--cocoa); border-radius: 16px; padding: 8px 12px; font-size: .95rem; line-height: 1.3; box-shadow: 0 4px 0 var(--cocoa); transform: scale(0); transform-origin: 50% 100%; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); z-index: 22; pointer-events: none; }
.tip-bubble.show { pointer-events: auto; }
.tb-m { width: 54px; flex: none; }
.tip-bubble.show { transform: scale(1); }

.answer-area { grid-area: answers; display: grid; gap: 12px; align-content: start; }
.answer-area.jars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-area.jars.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.answer-area.jars.n2 .jar { aspect-ratio: 1 / 1; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) { .answer-area { align-content: center; } }
.jar { position: relative; aspect-ratio: 1 / .92; min-height: 120px; max-height: 210px; display: grid; place-items: center; transition: transform .12s; }
.jar .jar-svg { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 5px 0 rgba(90, 61, 54, .25)); }
.jar-label { position: relative; z-index: 1; margin-top: 20%; width: 84%; max-width: 180px; background: #fff; border: 2.5px solid var(--cocoa); border-radius: 12px; padding: 6px 6px; font-weight: 700; font-size: clamp(.92rem, 2.6vw, 1.2rem); line-height: 1.12; text-align: center; box-shadow: 0 3px 0 rgba(90, 61, 54, .25); }
.jar.long .jar-label { font-size: clamp(.8rem, 2.1vw, 1rem); }
.jar:active { transform: scale(.94); }
.jar.used { filter: grayscale(1); opacity: .45; pointer-events: none; }
.jar.used::after { content: '✕'; position: absolute; top: 4%; right: 8%; font-size: 2.2rem; font-weight: 700; color: var(--tomato); -webkit-text-stroke: 2px var(--cocoa); }
.jar.chosen { animation: tilt .45s; }
@keyframes tilt { 40% { transform: rotate(-24deg) translateY(-12px); } }
.blob { position: fixed; z-index: 50; width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--cocoa); pointer-events: none; }

.answer-area.sort { grid-template-columns: 1fr 1.1fr 1fr; align-items: center; }
.bowl { display: flex; flex-direction: column; align-items: center; gap: 2px; background: #fff; border: 3px solid var(--cocoa); border-radius: 22px; padding: 12px 8px; box-shadow: 0 5px 0 var(--cocoa); font-size: 1.15rem; }
.bowl small { color: var(--cocoa2); font-size: .85rem; }
.bowl-bio { background: #ecfbe8; } .bowl-abio { background: #e8f3ff; }
.bowl-art { width: 100%; max-width: 120px; }
.bowl:active, .bowl.gulp { transform: scale(.94); }
.sort-item { background: #fff; border: 3px dashed var(--cocoa); border-radius: 22px; padding: 10px; text-align: center; font-size: 1.3rem; }
.sort-item.pop-in { animation: popIn .35s; }
.si-icon { width: 100%; max-width: 120px; margin: 0 auto; animation: bob 1.4s ease-in-out infinite; }
.sort-dots { display: flex; justify-content: center; gap: 5px; margin-top: 6px; }
.sort-dots i { width: 11px; height: 11px; border-radius: 50%; background: #efe6dc; border: 2px solid var(--cocoa); }
.sort-dots i.done { background: var(--mint); } .sort-dots i.cur { background: var(--butter); }

.answer-area.stack { grid-template-columns: .9fr 1.1fr; align-items: center; }
.cake-tower { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; min-height: 220px; }
.cake-tower .layer { width: 92%; height: 46px; border: 3px dashed #d9cfc4; border-radius: 14px; display: grid; place-items: center; font-size: .78rem; font-weight: 600; color: #b8a99c; margin-top: -3px; text-align: center; padding: 0 4px; line-height: 1.05; }
.cake-tower .layer.on { border: 3px solid var(--cocoa); color: var(--cocoa); animation: popIn .35s; }
.cake-tower .layer.l0.on { background: #c8f1c0; width: 100%; } .cake-tower .layer.l1.on { background: #fff1b8; width: 92%; }
.cake-tower .layer.l2.on { background: #ffd0b8; width: 82%; } .cake-tower .layer.l3.on { background: #ffc4d6; width: 72%; box-shadow: inset 0 6px 0 #fff; }
.cake-plate { width: 100%; height: 14px; background: #fff; border: 3px solid var(--cocoa); border-radius: 50%; margin-top: -4px; }
.chain-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.chain-card { background: #fff; border: 3px solid var(--cocoa); border-radius: 18px; box-shadow: 0 4px 0 var(--cocoa); padding: 8px; display: flex; flex-direction: column; align-items: center; font-size: 1.05rem; }
.chain-card svg { width: 100%; max-width: 86px; }
.chain-card.placed { opacity: .3; pointer-events: none; transform: scale(.92); }
.chain-card:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--cocoa); }

.fire-cover { position: absolute; inset: 0; z-index: 20; background: rgba(255, 110, 60, .06); cursor: pointer; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 18px; animation: fireflash .5s infinite alternate; }
@keyframes fireflash { to { background: rgba(255, 70, 40, .16); } }
.fc-msg { max-width: calc(100% - 16px); display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--cocoa); border-radius: 999px; padding: 6px 18px 6px 8px; font-weight: 700; font-size: 1.15rem; box-shadow: 0 5px 0 var(--cocoa); animation: pulse .6s infinite; pointer-events: none; }
.fc-msg svg { width: 36px; height: 48px; }
.on-fire .st-pot { z-index: 21; }
.puff { position: fixed; z-index: 95; width: 34px; height: 34px; border-radius: 50%; background: #fff; border: 2px solid #ddd; pointer-events: none; animation: puff .7s ease-out forwards; }
@keyframes puff { from { transform: translate(-50%, -50%) scale(.4); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.8); opacity: 0; } }
.ready-go, .times-up { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: rgba(255, 243, 232, .55); }
.ready-go span, .times-up span { font-size: clamp(3rem, 14vw, 6rem); font-weight: 700; color: #fff; -webkit-text-stroke: 4px var(--cocoa); paint-order: stroke fill; text-shadow: 0 8px 0 var(--cocoa); animation: popIn .5s; }
.times-up span { color: var(--tomato); }

.results .res-stars { display: flex; justify-content: center; gap: 6px; margin: 4px 0; }
.res-stars .rs { width: 74px; height: 74px; } .res-stars .rs:nth-child(2) { transform: translateY(-14px); width: 88px; height: 88px; }
.rs.pop { animation: popIn .5s; }
.res-mochi { width: 130px; margin: -4px auto 0; }
.res-msg { font-size: 1.3rem; font-weight: 700; margin-bottom: 10px; }
.res-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.res-stats div { background: #fff; border: 2.5px solid var(--cocoa); border-radius: 14px; padding: 6px 2px; }
.res-stats b { display: block; font-size: 1.4rem; } .res-stats small { font-size: .75rem; color: var(--cocoa2); }
.res-stats .gold b { color: #e39a14; }
.res-bonus { margin-top: 10px; background: #ffe3ef; border: 2.5px solid var(--cocoa); border-radius: 14px; padding: 8px; }
.res-bonus.mint { background: #dcf7ec; }
.study { margin-top: 12px; text-align: left; background: #fff; border: 2.5px solid var(--cocoa); border-radius: 16px; padding: 10px 12px; }
.study h4 { margin: 0 0 6px; }
.study.perfect { text-align: center; font-weight: 700; background: #dcf7ec; }
.study-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-top: 2px dashed #f0dccb; }
.study-row b { display: block; } .study-row small { font-size: .88rem; color: var(--cocoa2); line-height: 1.25; display: block; }
.sr-ico { width: 44px; flex: none; }
.pause-mochi { width: 150px; margin: 0 auto; }

/* ---------- BAKE-OFF ---------- */
.bakeoff { flex: 1; display: flex; flex-direction: column; padding: 6px 14px 20px; }
.bo-lobby { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; padding-top: 6px; }
.bo-banner { background: linear-gradient(#b9a5ff, #9b84ff); color: #fff; border: 4px solid var(--cocoa); border-radius: 24px; padding: 10px 26px; box-shadow: 0 6px 0 var(--cocoa); transform: rotate(-2deg); }
.bo-banner span { display: block; font-size: 1.1rem; } .bo-banner b { font-size: clamp(1.8rem, 7vw, 2.8rem); -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; }
.bo-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bo-p { width: 96px; display: flex; flex-direction: column; align-items: center; background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; padding: 8px 4px; box-shadow: 0 4px 0 var(--cocoa); animation: popIn .5s backwards, bob 2s 1s infinite ease-in-out; font-size: .9rem; }
.bo-p svg { width: 70px; height: 70px; }
.bo-rules { max-width: 520px; font-size: 1.05rem; margin: 0; }
.bo-topic { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }
.bo-topic > span { font-weight: 700; }
.bo-q { flex: 1; display: flex; flex-direction: column; gap: 12px; }
.bo-top { display: flex; justify-content: space-between; }
.bo-top .pill { font-size: .95rem; padding: 4px 14px; }
.bo-card { position: relative; background: #fff; border: 4px solid var(--cocoa); border-radius: 26px; box-shadow: 0 7px 0 var(--cocoa); padding: 26px 20px 22px; text-align: center; min-height: 120px; display: flex; flex-direction: column; justify-content: center; animation: popIn .4s; }
.bo-prompt { font-weight: 700; line-height: 1.25; }
.bo-peek { position: absolute; top: -34px; right: 16px; width: 64px; }
.bo-ready { height: 10px; border-radius: 999px; background: #efe6dc; margin-top: 16px; overflow: hidden; border: 2px solid var(--cocoa); }
.bo-ready i { display: block; height: 100%; background: var(--lilac); animation: fillBar 2s linear forwards; }
@keyframes fillBar { from { width: 0; } to { width: 100%; } }
.bo-mid { display: flex; justify-content: center; min-height: 76px; }
.bo-timer { position: relative; width: 76px; height: 76px; }
.bo-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.tr-bg { fill: #fff; stroke: #efe6dc; stroke-width: 10; } .tr-fg { fill: none; stroke: #9b84ff; stroke-width: 10; stroke-linecap: round; }
.bo-timer b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 1.8rem; }
.bo-timer.low .tr-fg { stroke: var(--tomato); } .bo-timer.low b { color: var(--tomato); animation: pulse .5s infinite; }
.bo-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.tile span, .jar-label, .chain-card b, .opt .otx, .chip-w, .m-slot, .m-def, .q-prompt, .bo-prompt, .ob-q, .row .nm { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; min-width: 0; }
.tile { --tc: #ff6b81; display: flex; align-items: center; gap: 12px; text-align: left; background: var(--tc); color: #fff; border: 3px solid var(--cocoa); border-radius: 20px; box-shadow: 0 6px 0 var(--cocoa), inset 0 -6px 0 rgba(0, 0, 0, .12); padding: 14px 14px; min-height: 92px; font-weight: 700; font-size: clamp(1.05rem, 3vw, 1.35rem); line-height: 1.15; text-shadow: 0 2px 0 rgba(90, 61, 54, .4); animation: popIn .35s backwards; transition: opacity .25s, transform .2s; }
.bo-tiles.long .tile { font-size: clamp(.85rem, 2.2vw, 1.02rem); grid-column: span 2; min-height: 70px; }
.bo-tiles.two .tile { min-height: 120px; font-size: 1.6rem; justify-content: center; }
.tile:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--cocoa); }
.tile-shape { width: 38px; height: 38px; flex: none; }
.tile.dim { opacity: .3; transform: scale(.96); }
.tile.picked { outline: 5px solid #fff; outline-offset: -10px; }
.tile.right { opacity: 1; animation: rightPulse .6s; }
.tile { position: relative; }
.tile.right::after { content: '✓'; position: absolute; top: 2px; right: 8px; font-size: 1.5rem; line-height: 1; }
@keyframes rightPulse { 50% { transform: scale(1.05); } }
.bo-result { display: none; position: relative; margin-top: 4px; padding: 14px 16px 16px; text-align: center; color: #fff; border: 4px solid var(--cocoa); border-radius: 22px; box-shadow: 0 6px 0 var(--cocoa); }
.bo-result.show { display: block; animation: popIn .35s; }
.bo-result.good { background: #2fbf7f; } .bo-result.bad { background: #ff5d6c; }
.br-head { font-size: 2rem; font-weight: 700; -webkit-text-stroke: 1.5px var(--cocoa); paint-order: stroke fill; }
.br-pts { display: inline-block; background: rgba(0, 0, 0, .18); border-radius: 999px; padding: 2px 18px; font-size: 1.5rem; font-weight: 700; margin: 4px 0; }
.br-streak { display: flex; align-items: center; justify-content: center; gap: 4px; font-weight: 700; } .br-streak svg { width: 24px; height: 28px; }
.br-ans { font-size: 1.2rem; } .br-tip { font-size: 1rem; opacity: .95; margin-top: 4px; max-width: 640px; margin-inline: auto; }
.next-btn { margin-top: 10px; color: var(--cocoa); }
.bo-board { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bo-board h2 { margin: 6px 0; font-size: 2rem; }
.bo-board .rows { width: min(560px, 100%); display: flex; flex-direction: column; gap: 8px; }
.bo-board .row { display: flex; align-items: center; gap: 10px; background: #fff; border: 3px solid var(--cocoa); border-radius: 18px; padding: 6px 14px; box-shadow: 0 4px 0 var(--cocoa); font-size: 1.15rem; }
.bo-board .row.me { background: #ffe3ef; }
.row .rank { width: 26px; font-weight: 700; font-size: 1.3rem; } .row svg.chef-head { width: 46px; height: 46px; }
.row .nm { flex: 1; } .row .stk { display: flex; align-items: center; color: #ff6b3d; font-weight: 700; } .row .stk svg { width: 20px; height: 24px; }
.row .gain { color: #2fbf7f; font-weight: 700; font-size: .95rem; min-width: 52px; text-align: right; }
.row .sc { font-weight: 700; min-width: 58px; text-align: right; }
.bo-podium { text-align: center; }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 18px auto 10px; max-width: 520px; height: 300px; }
.pod { flex: 1; display: flex; flex-direction: column; align-items: center; opacity: 0; transform: translateY(40px); transition: all .5s cubic-bezier(.3, 1.4, .5, 1); }
.pod.show { opacity: 1; transform: translateY(0); }
.pod-head { display: flex; flex-direction: column; align-items: center; font-size: .95rem; } .pod-head svg { width: 72px; height: 72px; } .pod-head small { color: var(--cocoa2); }
.pod-block { width: 100%; border: 4px solid var(--cocoa); border-radius: 14px 14px 0 0; display: grid; place-items: center; font-size: 2.6rem; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; }
.pod1 .pod-block { height: 170px; background: var(--butter); } .pod2 .pod-block { height: 120px; background: #d6dee8; } .pod3 .pod-block { height: 90px; background: #f0b98a; }
.pod1 .pod-head svg { width: 92px; height: 92px; }
.pod.me .pod-head b { color: var(--pink); }
.bo-final { display: flex; flex-direction: column; align-items: center; gap: 6px; animation: popIn .4s; }
.bf-mochi { width: 120px; }
.bf-text b { font-size: 1.6rem; display: block; }

/* ---------- BOOK ---------- */
.book { padding: 4px 14px 30px; display: flex; flex-direction: column; gap: 14px; }
.book-head { display: flex; align-items: center; gap: 10px; }
.book-mochi { width: 90px; flex: none; }
.book-head p { margin: 0; background: #fff; border: 3px solid var(--cocoa); border-radius: 18px; padding: 10px 12px; box-shadow: 0 4px 0 var(--cocoa); }
.book-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 8px; }
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.recipe { background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; box-shadow: 0 5px 0 var(--cocoa); padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 1.05rem; text-align: center; position: relative; background-image: linear-gradient(var(--gc) 0 30%, #fff 30%); }
.recipe:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--cocoa); }
.rc-icon { width: 80px; height: 80px; background: #fff; border-radius: 50%; border: 3px solid var(--cocoa); padding: 6px; }
.practice { align-self: center; }
.flip-modal .modal { background: transparent; border: 0; box-shadow: none; padding: 0; overflow: visible; }
.flip-wrap { perspective: 1200px; }
.flip { display: grid; position: relative; width: 100%; min-height: 420px; transform-style: preserve-3d; transition: transform .6s cubic-bezier(.3, 1.3, .5, 1); cursor: pointer; }
.flip.flipped { transform: rotateY(180deg); }
.face { grid-area: 1 / 1; position: relative; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; border: 4px solid var(--cocoa); border-radius: 28px; box-shadow: 0 8px 0 var(--cocoa); padding: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.face.front { text-align: center; background-image: radial-gradient(circle at 50% 38%, var(--gc) 0 36%, #fff 36.5%); }
.fc-icon { width: 170px; height: 170px; animation: bob 2s ease-in-out infinite; }
.face.front h2 { font-size: 2.2rem; margin: 14px 0 4px; } .face.front small { color: var(--cocoa2); }
.flip .face { transition: visibility 0s linear .15s; }
.flip:not(.flipped) .face.back, .flip.flipped .face.front { visibility: hidden; }
.face.back { transform: rotateY(180deg); text-align: left; justify-content: flex-start; align-items: stretch; gap: 10px; }
.face.back h3 { margin: 0; font-size: 1.6rem; background: var(--gc); align-self: flex-start; padding: 2px 14px; border-radius: 999px; border: 2.5px solid var(--cocoa); }
.fc-def { font-size: 1.35rem; font-weight: 600; margin: 0; line-height: 1.3; }
.fc-tip { display: flex; gap: 10px; align-items: center; background: #fff3fa; border: 2.5px solid var(--cocoa); border-radius: 16px; padding: 8px 10px; font-size: 1rem; }
.fc-tip b { display: block; color: var(--pink); }
.fc-m { width: 64px; flex: none; }
.fc-ex { margin: 0; font-size: 1rem; color: var(--cocoa2); }
.flip-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 10px; }
.flip-nav .icon-btn { background: #fff; }

/* ---------- SHOP ---------- */
.shop { padding: 4px 14px 30px; display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.shop > *, .hub > *, .book > *, .rush > * { min-width: 0; }
@media (min-width: 900px) { .shop { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; } .shop-preview { position: sticky; top: 10px; } }
.shop-tabs { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 2px 10px; }
@media (min-width: 900px) { .shop-tabs { flex-wrap: wrap; overflow: visible; } }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.shop-item { background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; box-shadow: 0 5px 0 var(--cocoa); padding: 10px 8px; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .98rem; text-align: center; }
.shop-item:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--cocoa); }
.shop-item.on { background: #fff3fa; box-shadow: 0 0 0 4px var(--pink), 0 5px 0 var(--cocoa); }
.si-prev { width: 100%; height: 96px; display: grid; place-items: center; background: #fff8f0; border-radius: 14px; }
.si-prev svg { max-width: 100%; max-height: 92px; width: auto; height: 92px; }
.si-price { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; background: var(--butter); border: 2px solid var(--cocoa); border-radius: 999px; padding: 2px 10px 2px 4px; font-size: .95rem; }
.si-price svg { width: 22px; height: 22px; }
.shop-item.owned .si-price { background: var(--mint); padding: 2px 10px; }
.shop-item.on .si-price { background: var(--pink); color: #fff; }
.shop-item.poor .si-price { background: #efe6dc; color: #a8968a; }
.buy-prev { width: 200px; height: 160px; margin: 0 auto; display: grid; place-items: center; background: #fff; border-radius: 20px; border: 3px solid var(--cocoa); padding: 8px; }
.buy-prev svg { width: 184px; height: 144px; }
.buy .gold svg { width: 24px; height: 24px; display: inline-block; vertical-align: -5px; }

/* ---------- BOXES ---------- */
.boxes { padding: 4px 14px 30px; }
.box-tabs { display: flex; justify-content: center; gap: 10px; margin-bottom: 12px; }
.box-shop { overflow: hidden; padding-bottom: 8px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.series { background: #fff; border: 3px solid var(--cocoa); border-radius: 20px; padding: 8px 22px; box-shadow: 0 4px 0 var(--cocoa); }
.series small { display: block; color: var(--pink); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; } .series b { font-size: 1.6rem; display: block; } .series span { font-size: .9rem; color: var(--cocoa2); }
.stage { position: relative; width: min(340px, 86vw); height: 300px; display: grid; place-items: center; }
.rays { position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg, rgba(255, 210, 77, .28) 0 10deg, transparent 10deg 24deg); border-radius: 50%; animation: spin 18s linear infinite; mask: radial-gradient(circle, #000 30%, transparent 70%); -webkit-mask: radial-gradient(circle, #000 30%, transparent 70%); }
@keyframes spin { to { transform: rotate(360deg); } }
.stage-box { width: 200px; position: relative; z-index: 2; animation: floaty 3s ease-in-out infinite; cursor: pointer; }
.stage-box.jiggle { animation: wiggle .25s 2; }
.pedestal { position: absolute; bottom: 14px; width: 220px; height: 44px; background: #fff; border: 4px solid var(--cocoa); border-radius: 50%; box-shadow: inset 0 -10px 0 #ffd6e4; }
.stage-mochi { position: absolute; right: 0; bottom: 0; width: 110px; z-index: 3; }
.open-btn { font-size: 1.3rem; }
.need { margin: 0; color: var(--cocoa2); }
.odds { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; width: min(560px, 100%); }
.odd { background: #fff; border: 2.5px solid var(--cocoa); border-radius: 14px; padding: 6px 2px; font-size: .78rem; display: flex; flex-direction: column; align-items: center; }
.odd i { width: 16px; height: 16px; border-radius: 50%; background: var(--rc); border: 2px solid var(--cocoa); }
.odd b { font-size: .8rem; } .odd span { font-weight: 700; }
.odds-note { font-size: .85rem; color: var(--cocoa2); margin: 0; max-width: 460px; }
.collection { display: flex; flex-direction: column; gap: 12px; }
.col-group h4 { margin: 0 0 8px; display: inline-block; background: var(--rc); color: #fff; padding: 2px 14px; border-radius: 999px; border: 2.5px solid var(--cocoa); -webkit-text-stroke: .6px var(--cocoa); }
.col-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.mini-card { position: relative; background: #fff; border: 3px solid var(--cocoa); border-radius: 18px; padding: 8px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .85rem; box-shadow: 0 4px 0 var(--cocoa); text-align: center; }
.mini-card.has { box-shadow: 0 0 0 3px var(--rc), 0 4px 0 var(--cocoa); }
.mc-img { width: 74px; height: 74px; }
.mini-card .cnt { position: absolute; top: 4px; right: 6px; background: var(--butter); border: 2px solid var(--cocoa); border-radius: 999px; padding: 0 6px; font-weight: 700; font-size: .8rem; }
.col-note { text-align: center; color: var(--cocoa2); }
.mini-show .ms-img { width: 180px; margin: 0 auto; animation: bob 2s infinite; filter: drop-shadow(0 0 18px var(--rc)); }
.rarity-tag { display: inline-block; background: var(--rc); color: #fff; font-weight: 700; padding: 4px 18px; border-radius: 999px; border: 3px solid var(--cocoa); -webkit-text-stroke: .8px var(--cocoa); font-size: 1.1rem; letter-spacing: .05em; }

.unbox { position: fixed; inset: 0; z-index: 70; background: radial-gradient(circle at 50% 45%, #fff3fa 0, #ffc9de 70%); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; opacity: 0; transition: opacity .3s; overflow: hidden; padding: 20px; text-align: center; }
.unbox.in { opacity: 1; }
.ub-rays { position: absolute; width: 180vmax; height: 180vmax; background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 8deg, transparent 8deg 20deg); animation: spin 14s linear infinite; mask: radial-gradient(circle, #000 15%, transparent 55%); -webkit-mask: radial-gradient(circle, #000 15%, transparent 55%); }
.unbox.reveal { background: radial-gradient(circle at 50% 42%, #fff 0, var(--rc) 80%); }
.unbox.r-secret { background: conic-gradient(from 0deg, #ff9ec0, #ffd24d, #7fd8be, #8ec9ff, #c7b5ff, #ff9ec0); }
.unbox.r-secret .ub-rays { animation-duration: 5s; }
.ub-hint { position: relative; font-size: 1.6rem; font-weight: 700; color: #fff; -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; min-height: 2em; animation: pulse 1.2s infinite; }
.ub-shakes { position: relative; display: flex; gap: 10px; } .ub-shakes i { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--cocoa); } .ub-shakes i.on { background: var(--pink); animation: popIn .3s; }
.ub-stage { position: relative; width: min(320px, 80vw); height: min(360px, 46vh); display: grid; place-items: center; cursor: pointer; }
.ub-stage > div { position: absolute; width: 100%; display: grid; place-items: center; }
.ub-box svg { width: min(260px, 66vw); }
.ub-box.drop { animation: drop .7s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes drop { from { transform: translateY(-120vh) rotate(-20deg); } }
.ub-box.jiggle { animation: jig .4s; }
@keyframes jig { 20% { transform: rotate(-12deg) scale(1.05); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg) scale(1.05); } 80% { transform: rotate(5deg); } }
.ub-box .bb-lid { transition: transform .5s cubic-bezier(.3, 1.4, .5, 1); transform-box: fill-box; transform-origin: 50% 100%; }
.ub-box.open .bb-lid { transform: translateY(-160px) rotate(-30deg); opacity: 0; transition: transform .6s ease-out, opacity .6s .2s; }
.ub-box.away { transform: translateY(70vh); opacity: 0; transition: all .5s ease-in; }
.ub-bag svg { width: min(200px, 52vw); filter: drop-shadow(0 0 22px var(--glow, #fff)) drop-shadow(0 0 8px var(--glow, #fff)); transition: filter .1s; }
.ub-bag.rise { animation: rise .6s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes rise { from { transform: translateY(100px) scale(.4); opacity: 0; } }
.ub-bag.throb { animation: throb .15s; }
@keyframes throb { 50% { transform: scale(1.08) rotate(3deg); } }
.ub-bag.tear { animation: tear .45s forwards; }
@keyframes tear { 30% { transform: scale(1.15) rotate(-6deg); } 100% { transform: scale(1.6); opacity: 0; filter: brightness(3); } }
.ub-mini svg { width: min(240px, 60vw, 30vh); filter: drop-shadow(0 0 26px #fff) drop-shadow(0 10px 0 rgba(90, 61, 54, .2)); }
.ub-mini.spin-in { animation: spinIn .9s cubic-bezier(.3, 1.4, .5, 1), bob 2s .9s infinite ease-in-out; }
@keyframes spinIn { from { transform: scale(0) rotate(-540deg); } }
.ub-info { position: relative; margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; animation: popIn .4s; }
.ub-info h2 { margin: 0; font-size: 2rem; color: #fff; -webkit-text-stroke: 2px var(--cocoa); paint-order: stroke fill; text-shadow: 0 4px 0 var(--cocoa); }
.new-badge { background: var(--tomato); color: #fff; font-weight: 700; padding: 2px 16px; border-radius: 999px; border: 3px solid var(--cocoa); font-size: 1.2rem; animation: pulse .8s infinite; }
.dup { background: #fff; border: 2.5px solid var(--cocoa); border-radius: 999px; padding: 4px 14px; font-weight: 600; }
.secret-msg { position: absolute; top: 12%; font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 700; color: #fff; -webkit-text-stroke: 2.5px var(--cocoa); paint-order: stroke fill; animation: popIn .6s, pulse 1s .6s infinite; }

/* ---------- phone tweaks ---------- */
@media (max-width: 520px) {
  .room-mochi { width: 30%; }
  .tb-title { font-size: 1.2rem; }
  .pill { font-size: 1rem; padding: 3px 10px 3px 4px; } .pill svg { width: 24px; height: 24px; }
  .icon-btn { width: 42px; height: 42px; }
  .menu-card { min-height: 128px; padding: 10px; } .menu-card b { font-size: 1.1rem; } .menu-card small { font-size: .8rem; }
  .mc-rush b { font-size: 1.35rem; } .mc-quiz b { font-size: 1.3rem; }
  .mc-rush .mc-art, .mc-rush .mc-art svg { height: 64px; }
  .mc-quiz .mc-art.heads svg { height: 46px; }
  .ticket { width: 92px; } .tk-dish svg { width: 38px; height: 38px; }
  .ticket-rail { min-height: 112px; }
  .hud-timer { font-size: 1.15rem; min-width: 92px; } .hud-coins { font-size: 1.15rem; }
  .station { min-height: 120px; grid-template-columns: .9fr 1.2fr .9fr; }
  .st-pass { height: 84px; }
  .jar { min-height: 108px; }
  .answer-area.sort { grid-template-columns: 1fr 1fr; } .answer-area.sort .sort-item { grid-column: span 2; order: -1; }
  .si-icon { max-width: 90px; }
  .cake-tower { min-height: 190px; } .cake-tower .layer { height: 40px; font-size: .7rem; }
  .chain-card svg { max-width: 64px; } .chain-card { font-size: .92rem; }
  .bo-tiles { gap: 9px; } .tile { min-height: 84px; padding: 10px; gap: 8px; } .tile-shape { width: 30px; height: 30px; }
  .res-stats b { font-size: 1.15rem; } .prog-stats b { font-size: 1.15rem; }
  .odds { grid-template-columns: repeat(5, 1fr); } .odd b { font-size: .66rem; }
  .podium { height: 270px; }
}
@media (max-height: 780px) and (max-width: 700px) {
  .rush { gap: 6px; padding-top: 6px; }
  .ticket-rail { min-height: 92px; padding-top: 12px; } .ticket { width: 82px; padding: 4px 4px 6px; } .tk-dish svg { width: 30px; height: 30px; } .tk-label { font-size: .66rem; }
  .order-board { min-height: 64px; padding: 6px 12px 8px; } .ob-q { font-size: 1rem; }
  .station { min-height: 92px; } .st-mochi { max-width: 84px; margin-bottom: 8px; } .st-pot { max-width: 136px; margin-bottom: 8px; } .st-pass { height: 66px; max-width: 96px; margin-bottom: 10px; }
  .answer-area { gap: 8px; } .jar { aspect-ratio: 1 / .66; min-height: 0; }
  .sort-item { display: grid; grid-template-columns: 76px 1fr; align-items: center; padding: 6px 10px; text-align: left; } .si-icon { max-width: 70px; grid-row: span 2; } .sort-dots { justify-content: flex-start; }
  .bowl { padding: 6px; } .bowl-art { max-width: 76px; }
  .cake-tower { min-height: 150px; } .cake-tower .layer { height: 32px; } .chain-card svg { max-width: 48px; } .chain-card { padding: 4px; }
  .tip-bubble { bottom: 70px; font-size: .92rem !important; } .tb-m { width: 40px; }
}
@media (max-width: 420px) {
  .topbar { gap: 6px; padding: 10px 10px 6px; }
  .tb-title { font-size: 1.05rem; }
  .tb-right { gap: 5px; }
  .pill { font-size: .95rem; padding: 2px 8px 2px 3px; gap: 4px; } .pill svg { width: 22px; height: 22px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 13px; } .icon-btn svg { width: 24px; height: 24px; }
  .shop-tabs .chip, .book-tabs .chip { padding: 6px 11px; font-size: .88rem; }
  .fc-msg { font-size: .95rem; padding: 5px 12px 5px 6px; } .fc-msg svg { width: 28px; height: 38px; }
}
@media (max-width: 420px) {
  .title-float.f2, .title-float.f3, .title-float.f4, .title-float.f5, .title-float.f6 { display: none; }
  .title-float.f1 { top: 4%; left: 3%; width: 54px; } .title-float.f3, .title-float.f4 { width: 50px; bottom: 6%; }
  .bo-board .row { gap: 6px; padding: 6px 10px; font-size: 1rem; } .row svg.chef-head { width: 36px; height: 36px; }
  .row .gain { min-width: 0; font-size: .82rem; } .row .sc { min-width: 40px; } .row .rank { width: 18px; }
  .bo-tiles.two .tile { font-size: 1.3rem; min-height: 96px; }
}
@media (max-width: 340px) { .tb-title { font-size: .95rem; } .token-pill { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
