/* 붕어빵 타이쿤 — the winter-night stall is scoped to .bp-scope; the cards around it follow the orchard arcade. */
.bp-scope {
  --night: #121a2b;
  --night-2: #1a2340;
  --night-3: #253158;
  --sky-1: #1c2a54;
  --sky-2: #2a2747;
  --glow: #333a72;
  --tarp: #e5562c;
  --tarp-2: #f3e3cb;
  --bulb: #ffd88a;
  --wood: #6b4631;
  --wood-2: #4b3021;
  --iron: #202126;
  --iron-2: #2d2f35;
  --iron-cavity: #17181c;
  --iron-edge: #41444d;
  --flame: #5aa9ff;
  --ink: #f5eee2;
  --muted: #a7aec5;
  --faint: #737c9c;
  --line: rgba(245, 238, 226, 0.12);
  --scrim: rgba(9, 12, 22, 0.82);
  --bubble: #fff7e8;
  --bubble-ink: #2b1d14;
  --card: #caa47b;
  --card-ink: #3a2717;
  --card-line: rgba(58, 39, 23, 0.22);
  --gold: #ffcf5e;
  --gold-ink: #2b1d0c;
  --mint: #7fd6a6;
  --warn: #ffb356;
  --danger: #ff6a5a;
  --g-under: #586180;
  --g-over: #e0793a;
  --bake-gold: #e5a447;
  --bake-gold-s: #8c5a24;
  --bake-good: #d6984a;
  --bake-good-s: #7d5021;
  --bake-pale: #f0d48f;
  --bake-pale-s: #a88a45;
  --bake-dark: #93552a;
  --bake-dark-s: #4a2a14;
  --f-pat: #9b3b33;
  --f-shu: #f1d58b;
  --f-goguma: #e39a3b;
  --f-choco: #7a4c35;
  --f-pizza: #e0512f;
  --font-sign: "Black Han Sans", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-body: "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif;
  --font-hand: "Gaegu", "Gowun Dodum", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color-scheme: dark;
}
.bp-scope * { box-sizing: border-box; }
.bp-scope [hidden] { display: none !important; }
.bp-scope {
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: break-word;
  -webkit-tap-highlight-color: transparent;
}
.bp-scope button { font: inherit; color: inherit; }
.bp-scope :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.bp-scope .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bp-scope kbd { font-family: var(--font-body); font-size: 11px; line-height: 1; padding: 2px 5px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); background: var(--night-3); }

/* fish symbol paint, driven by custom properties on each instance */
.f-body { fill: var(--fb, var(--bake-gold)); stroke: var(--fs, var(--bake-gold-s)); stroke-width: 2; stroke-linejoin: round; }
.f-tail, .f-fin { fill: var(--fb, var(--bake-gold)); stroke: var(--fs, var(--bake-gold-s)); stroke-width: 2; stroke-linejoin: round; }
.f-line, .f-scale { fill: none; stroke: var(--fs, var(--bake-gold-s)); stroke-width: 1.7; stroke-linecap: round; opacity: 0.75; }
.f-eye { fill: var(--fe, #3a2416); }
.f-glint { fill: var(--fg, #fff3d6); opacity: 0.9; }

/* ---------- page frame ---------- */
.bp-scope .ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 8px 14px; cursor: pointer; font-size: 14px; white-space: nowrap; touch-action: manipulation; }
.bp-scope .ghost:hover { border-color: var(--muted); }
.bp-scope .primary { background: var(--tarp); color: var(--tarp-2); border: none; border-radius: 14px; padding: 13px 18px; font-family: var(--font-sign); font-size: 19px; letter-spacing: 0.02em; cursor: pointer; box-shadow: 0 6px 0 -1px #a43a1b; touch-action: manipulation; transition: transform 0.08s, box-shadow 0.08s; }
.bp-scope .primary:active { transform: translateY(3px); box-shadow: 0 3px 0 -1px #a43a1b; }
.bp-scope .primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.bp-scope .danger { background: var(--danger); color: var(--gold-ink); border: none; border-radius: 12px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
.bp-scope .link { background: none; border: none; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 6px; font-size: 14px; }
.bp-scope .row { display: flex; gap: 10px; align-items: center; }
.bp-scope .row.wrap { flex-wrap: wrap; }
.bp-scope .row > .primary { flex: 1 1 auto; }
.bp-scope .muted { color: var(--muted); }
.bp-scope .small { font-size: 13px; }
.bp-scope .eyebrow { margin: 0; font-size: 12px; letter-spacing: 0.12em; color: var(--muted); }

/* ---------- stage ---------- */
.stage.bp-scope { position: relative; width: 100%; min-height: 640px; border-radius: 22px; overflow: hidden; background: var(--night-2); box-shadow: 0 32px 60px -34px rgba(0, 0, 0, 0.75), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; }

.bp-scope .hud { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 14px 10px; background: var(--night-2); position: relative; z-index: 2; }
.bp-scope .hud-money { display: flex; flex-direction: column; min-width: 0; }
.bp-scope .hud-label { font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }
.bp-scope .hud-money strong { font-family: var(--font-sign); font-weight: 400; font-size: 30px; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bp-scope .hud-money strong.neg { color: var(--danger); }
.bp-scope .hud-right { display: flex; align-items: center; gap: 8px; }
.bp-scope .clock { font-family: var(--font-sign); font-size: 22px; font-variant-numeric: tabular-nums; min-width: 3.2ch; text-align: right; }
.bp-scope .clock.hurry { color: var(--danger); }
.bp-scope .combo { font-family: var(--font-sign); font-size: 15px; background: var(--gold); color: var(--gold-ink); border-radius: 999px; padding: 3px 10px; animation: pop 0.25s ease-out; }
.bp-scope .icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--night-3); color: var(--ink); cursor: pointer; font-size: 14px; touch-action: manipulation; }
.bp-scope .timebar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--night-3); overflow: hidden; }
.bp-scope .timebar i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--tarp), var(--gold)); transform-origin: left center; }
.bp-scope .hud-line { grid-column: 1 / -1; margin: 2px 0 0; font-size: 13px; color: var(--muted); min-height: 1.5em; }
.bp-scope .hud-line b { color: var(--ink); font-weight: 400; }

/* street + counter */
.bp-scope .street { position: relative; padding: 60px 10px 0; background: linear-gradient(180deg, var(--sky-1), var(--sky-2)); }
.bp-scope .street::before { content: ""; position: absolute; inset: 0; background:
  radial-gradient(1.2px 1.2px at 12% 72%, var(--ink), transparent 60%),
  radial-gradient(1px 1px at 84% 64%, var(--ink), transparent 60%),
  radial-gradient(1.4px 1.4px at 66% 86%, var(--muted), transparent 60%),
  radial-gradient(1px 1px at 33% 92%, var(--muted), transparent 60%);
  opacity: 0.55; pointer-events: none; }
.bp-scope .awning { position: absolute; top: 0; left: 0; right: 0; height: 34px; background: repeating-linear-gradient(90deg, var(--tarp) 0 30px, var(--tarp-2) 30px 60px); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.5); }
.bp-scope .awning::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 15px; background:
  radial-gradient(circle at 15px 0, var(--tarp) 14.5px, transparent 15px) 0 0 / 60px 15px repeat-x,
  radial-gradient(circle at 45px 0, var(--tarp-2) 14.5px, transparent 15px) 0 0 / 60px 15px repeat-x; }
.bp-scope .lights { position: absolute; top: 40px; left: 6px; right: 6px; height: 10px; background: radial-gradient(circle, var(--bulb) 2.6px, transparent 3.4px) 0 50% / 34px 10px repeat-x; filter: drop-shadow(0 0 5px var(--bulb)); opacity: 0.9; pointer-events: none; }
.bp-scope .queue { position: absolute; top: 46px; right: 12px; font-size: 12px; color: var(--ink); background: var(--night-3); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; z-index: 1; }
.bp-scope .queue:empty { display: none; }
.bp-scope .counter { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-height: 150px; align-items: end; }
.bp-scope .counter-edge { height: 14px; margin: 0 -10px; background: linear-gradient(180deg, var(--wood), var(--wood-2)); box-shadow: 0 -2px 0 rgba(255, 255, 255, 0.08) inset; }

.bp-scope .cust { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 8px; min-height: 140px; justify-content: flex-end; background: none; border: none; border-radius: 14px; cursor: pointer; touch-action: manipulation; min-width: 0; }
.bp-scope .cust:disabled { cursor: default; }
.bp-scope .cust:not(:disabled):hover .c-bubble { transform: translateY(-2px); }
.bp-scope .cust.arrive { animation: arrive 0.35s ease-out; }
.bp-scope .cust.shake { animation: shake 0.36s; }
.bp-scope .c-empty { font-size: 12px; color: var(--faint); padding-bottom: 18px; }
.bp-scope .c-bubble { position: relative; display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 6px; max-width: 100%; padding: 6px 8px; border-radius: 12px; background: var(--bubble); color: var(--bubble-ink); font-family: var(--font-hand); font-weight: 700; font-size: 16px; line-height: 1.1; transition: transform 0.12s; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.bp-scope .c-bubble::after { content: ""; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: var(--bubble); transform: translateX(-50%) rotate(45deg); border-radius: 2px; }
.bp-scope .o-item { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; position: relative; z-index: 1; }
.bp-scope .o-item b { font-family: var(--font-sign); font-weight: 400; font-size: 14px; }
.bp-scope .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.18); }
.bp-scope .dot.f-pat { background: var(--f-pat); } .bp-scope .dot.f-shu { background: var(--f-shu); } .bp-scope .dot.f-goguma { background: var(--f-goguma); } .bp-scope .dot.f-choco { background: var(--f-choco); } .bp-scope .dot.f-pizza { background: var(--f-pizza); }
.bp-scope .c-face { position: relative; font-size: 38px; line-height: 1.1; margin-top: 6px; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }
.bp-scope .c-mood { position: absolute; top: -4px; right: -14px; font-size: 16px; }
.bp-scope .c-name { font-size: 12px; color: var(--muted); white-space: nowrap; }
.bp-scope .c-pat { width: 74%; height: 5px; border-radius: 3px; background: var(--night-3); overflow: hidden; }
.bp-scope .c-pat i { display: block; height: 100%; width: calc(var(--pat, 1) * 100%); background: var(--mint); transition: background 0.3s; }
.bp-scope .cust[data-mood="meh"] .c-pat i { background: var(--warn); }
.bp-scope .cust[data-mood="mad"] .c-pat i { background: var(--danger); }
.bp-scope .cust[data-mood="mad"] .c-face { animation: wobble 0.6s infinite; }
.bp-scope .c-key { position: absolute; top: 0; left: 4px; }
.bp-scope .cust[data-ready="1"] .c-bubble { box-shadow: 0 0 0 2px var(--mint), 0 3px 0 rgba(0, 0, 0, 0.18); }

/* warming rack */
.bp-scope .rack { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 10px; align-items: center; padding: 10px 12px; background: linear-gradient(180deg, #3a2a20, #2b1f18); border-bottom: 1px solid rgba(0, 0, 0, 0.35); }
.bp-scope .rack-head { display: flex; flex-direction: column; line-height: 1.15; }
.bp-scope .rack-label { font-size: 12px; color: var(--tarp-2); letter-spacing: 0.06em; }
.bp-scope .rack-count { font-family: var(--font-sign); font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; }
.bp-scope .rack-count.full { color: var(--danger); }
.bp-scope .rack-items { display: flex; flex-wrap: wrap; gap: 2px; min-height: 30px; align-items: center; background: repeating-linear-gradient(90deg, transparent 0 9px, rgba(245, 238, 226, 0.14) 9px 10px); border-radius: 6px; padding: 2px 4px; }
.bp-scope .rack-items:empty::before { content: "아직 꺼낸 붕어빵이 없어요"; font-size: 12px; color: var(--faint); }
.bp-scope .ri { position: relative; width: 34px; height: 24px; flex: none; }
.bp-scope .ri svg { width: 100%; height: 100%; display: block; }
.bp-scope .ri.new { animation: drop 0.3s ease-out; }
.bp-scope .ri.q-gold { --fb: var(--bake-gold); --fs: var(--bake-gold-s); }
.bp-scope .ri.q-good { --fb: var(--bake-good); --fs: var(--bake-good-s); }
.bp-scope .ri.q-poor.t-pale { --fb: var(--bake-pale); --fs: var(--bake-pale-s); }
.bp-scope .ri.q-poor.t-dark, .bp-scope .ri.q-good.t-dark { --fb: var(--bake-dark); --fs: var(--bake-dark-s); }
.bp-scope .ri.cold svg { filter: saturate(0.45) brightness(0.8); }
.bp-scope .ri-tag { position: absolute; right: 1px; bottom: 0; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px #2b1f18; }
.bp-scope .ri-tag.f-pat { background: var(--f-pat); } .bp-scope .ri-tag.f-shu { background: var(--f-shu); } .bp-scope .ri-tag.f-goguma { background: var(--f-goguma); } .bp-scope .ri-tag.f-choco { background: var(--f-choco); } .bp-scope .ri-tag.f-pizza { background: var(--f-pizza); }
.bp-scope .ri.q-gold::before { content: "★"; position: absolute; left: 0; top: -5px; font-size: 9px; color: var(--gold); }
.bp-scope .ri:not(.cold)::after { content: ""; position: absolute; left: 40%; top: -9px; width: 6px; height: 10px; border-radius: 50%; border-left: 2px solid rgba(245, 238, 226, 0.45); animation: steam 1.8s ease-in-out infinite; }
.bp-scope .rack-sum { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--tarp-2); min-height: 1.4em; }
.bp-scope .rack-sum span { display: inline-flex; align-items: center; gap: 4px; }

/* grill */
.bp-scope .grill { position: relative; flex: 1 0 auto; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 9px; padding: 12px 12px 20px; background: radial-gradient(120% 80% at 50% 120%, rgba(90, 169, 255, 0.18), transparent 60%), linear-gradient(180deg, var(--iron), #1a1b1f); align-content: start; }
.bp-scope .grill::after { content: ""; position: absolute; left: 12%; right: 12%; bottom: 4px; height: 5px; background: repeating-linear-gradient(90deg, var(--flame) 0 7px, transparent 7px 15px); filter: blur(1.4px); opacity: 0.8; animation: flicker 1.1s ease-in-out infinite alternate; pointer-events: none; }
.bp-scope .mold { position: relative; aspect-ratio: 1 / 0.86; min-width: 0; border-radius: 16px; border: none; padding: 16px 6px 18px; background: linear-gradient(180deg, var(--iron-2), var(--iron)); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.07), inset 0 -8px 14px rgba(0, 0, 0, 0.45), 0 4px 0 #0e0f12; cursor: pointer; display: grid; place-items: center; touch-action: manipulation; transition: box-shadow 0.15s, transform 0.08s; --fb: var(--iron-cavity); --fs: var(--iron-edge); }
.bp-scope .mold:active { transform: translateY(2px); }
.bp-scope .mold svg.fish { width: 92%; max-height: 100%; overflow: visible; transition: transform 0.2s; }
.bp-scope .mold[data-state="empty"] svg.fish { opacity: 0.9; }
.bp-scope .mold[data-state="empty"] .f-eye, .bp-scope .mold[data-state="empty"] .f-glint { opacity: 0.25; }
.bp-scope .mold.flip svg.fish { animation: flipFish 0.32s ease-in-out; }
.bp-scope .m-side { position: absolute; top: 5px; left: 8px; font-size: 11px; color: var(--muted); }
.bp-scope .m-fill { position: absolute; top: 4px; right: 7px; font-size: 11px; color: var(--ink); display: inline-flex; align-items: center; gap: 3px; }
.bp-scope .m-hint { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; font-size: 13px; color: var(--muted); pointer-events: none; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); }
.bp-scope .mold[data-state="A"] .m-hint, .bp-scope .mold[data-state="B"] .m-hint { top: auto; bottom: 18px; transform: none; font-family: var(--font-sign); font-size: 14px; color: var(--gold); }
.bp-scope .mold[data-zone="over"] .m-hint { color: var(--g-over); }
.bp-scope .m-hint b { display: block; font-family: var(--font-sign); font-weight: 400; font-size: 16px; color: var(--danger); }
.bp-scope .m-hint small { display: block; font-size: 11px; color: var(--muted); }
.bp-scope .mold[data-zone="under"] .m-hint { opacity: 0; }
.bp-scope .gauge { position: absolute; left: 9px; right: 9px; bottom: 8px; height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--g-under) 0 50%, var(--gold) 50% 70.59%, var(--g-over) 70.59% 100%); opacity: 0; transition: opacity 0.15s; }
.bp-scope .mold[data-state="A"] .gauge, .bp-scope .mold[data-state="B"] .gauge { opacity: 0.92; }
.bp-scope .needle { position: absolute; top: -4px; bottom: -4px; width: 3px; margin-left: -1.5px; left: calc(var(--p, 0) * 100%); border-radius: 2px; background: var(--ink); box-shadow: 0 0 6px var(--ink); }
.bp-scope .mold[data-zone="gold"] { box-shadow: 0 0 0 2px var(--gold), 0 0 22px -4px var(--gold), inset 0 -8px 14px rgba(0, 0, 0, 0.45), 0 4px 0 #0e0f12; }
.bp-scope .mold[data-zone="over"] { box-shadow: 0 0 0 2px var(--g-over), inset 0 -8px 14px rgba(0, 0, 0, 0.45), 0 4px 0 #0e0f12; animation: warnPulse 0.6s ease-in-out infinite alternate; }
.bp-scope .mold[data-state="burnt"] { --fb: #2b1f18; --fs: #0f0a08; }
.bp-scope .mold[data-state="burnt"]::before { content: ""; position: absolute; left: 30%; top: 10%; width: 40%; height: 40%; border-radius: 50%; background: radial-gradient(circle, rgba(160, 160, 170, 0.5), transparent 70%); animation: smoke 1.4s ease-out infinite; pointer-events: none; }
.bp-scope .m-key { position: absolute; bottom: 16px; left: 6px; opacity: 0.6; }
@media (hover: none), (pointer: coarse), (max-width: 520px) { .bp-scope .m-key, .bp-scope .c-key, .bp-scope .fill-chip kbd { display: none; } }
@media (max-width: 520px) { .bp-scope .fill-chip { padding: 8px 10px; gap: 5px; } .bp-scope .tray { gap: 6px; } }

/* fillings tray */
.bp-scope .tray { display: flex; gap: 8px; padding: 10px 12px 14px; background: var(--night-2); overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.bp-scope .tray::-webkit-scrollbar { display: none; }
.bp-scope .fill-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--night-3); color: var(--ink); cursor: pointer; font-size: 14px; touch-action: manipulation; }
.bp-scope .fill-chip[aria-pressed="true"] { background: var(--tarp-2); color: var(--bubble-ink); border-color: transparent; box-shadow: 0 0 0 2px var(--tarp); }
.bp-scope .fill-chip .price { font-size: 12px; opacity: 0.75; }
.bp-scope .fill-chip kbd { margin-left: 2px; }
.bp-scope .fill-chip[aria-pressed="true"] kbd { color: var(--bubble-ink); background: transparent; border-color: rgba(43, 29, 20, 0.25); }

/* toast + floats */
.bp-scope .toast { position: absolute; left: 50%; bottom: 74px; transform: translate(-50%, 6px); max-width: calc(100% - 32px); background: var(--ink); color: var(--night); padding: 8px 14px; border-radius: 999px; font-size: 13px; opacity: 0; transition: opacity 0.18s, transform 0.18s; z-index: 15; pointer-events: none; text-align: center; }
.bp-scope .toast.show { opacity: 1; transform: translate(-50%, 0); }
.bp-scope .floats { position: absolute; inset: 0; pointer-events: none; z-index: 14; overflow: hidden; }
.bp-scope .float { position: absolute; transform: translate(-50%, -50%); font-family: var(--font-sign); font-size: 18px; white-space: nowrap; color: var(--gold); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.45); animation: floatUp 1s ease-out forwards; }
.bp-scope .float.good { color: var(--ink); }
.bp-scope .float.poor, .bp-scope .float.bad { color: var(--danger); }
.bp-scope .float.money { font-size: 21px; }

/* overlays */
.bp-scope .overlay { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-start; justify-content: center; padding: 18px 14px; overflow-y: auto; background: var(--scrim); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.bp-scope .sheet { width: 100%; max-width: 420px; margin: auto 0; background: var(--night-2); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: grid; gap: 12px; box-shadow: 0 24px 50px -24px rgba(0, 0, 0, 0.8); }
.bp-scope .sheet.small { max-width: 360px; }
.bp-scope .sheet.wide { max-width: 460px; }
.bp-scope .sheet h2 { margin: 0; font-family: var(--font-sign); font-weight: 400; font-size: 24px; line-height: 1.2; text-wrap: balance; }
.bp-scope .start-title { font-size: 30px !important; }
.bp-scope .start-title span { color: var(--gold); }
.bp-scope .start-sub { margin: 0; color: var(--muted); font-size: 14px; }
.bp-scope .field { font-size: 13px; color: var(--muted); margin-bottom: -6px; }
.bp-scope .input { width: 100%; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--night); color: var(--ink); font: inherit; font-size: 16px; }
.bp-scope .input:focus { outline: none; border-color: var(--gold); }
.bp-scope .nick-err { margin: -4px 0 0; font-size: 13px; color: var(--danger); }
.bp-scope .modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bp-scope .mode { text-align: left; display: grid; gap: 2px; padding: 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--night-3); cursor: pointer; min-width: 0; }
.bp-scope .mode[aria-checked="true"] { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.bp-scope .mode-name { font-family: var(--font-sign); font-size: 17px; }
.bp-scope .mode-desc { font-size: 12px; color: var(--muted); }
.bp-scope .mode-meta { font-size: 12px; color: var(--gold); margin-top: 4px; }
.bp-scope .mini-steps { margin: 2px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; counter-reset: s; }
.bp-scope .mini-steps li { counter-increment: s; font-size: 12px; color: var(--muted); text-align: center; line-height: 1.3; }
.bp-scope .mini-steps li::before { content: counter(s); display: block; margin: 0 auto 4px; width: 22px; height: 22px; line-height: 22px; border-radius: 50%; background: var(--night-3); color: var(--gold); font-family: var(--font-sign); font-size: 13px; }

.bp-scope #ov-count { align-items: center; background: rgba(9, 12, 22, 0.45); backdrop-filter: none; -webkit-backdrop-filter: none; }
.bp-scope #count-num { font-family: var(--font-sign); font-size: 92px; color: var(--gold); text-shadow: 0 6px 0 rgba(0, 0, 0, 0.4); animation: pop 0.4s ease-out; }
.bp-scope #count-num.go { font-size: 54px; }

.bp-scope .confirm { display: grid; gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.bp-scope .confirm p { margin: 0; font-size: 14px; color: var(--muted); }

.bp-scope .res-title { font-size: 26px !important; }
.bp-scope .res-net { margin: 0; font-family: var(--font-sign); font-size: 46px; line-height: 1; color: var(--gold); font-variant-numeric: tabular-nums; }
.bp-scope .res-net.neg { color: var(--danger); }
.bp-scope .res-sub { margin: 0; font-size: 14px; color: var(--muted); }
.bp-scope .res-sub b { color: var(--ink); font-weight: 400; }
.bp-scope .res-rank { margin: 0; font-family: var(--font-sign); font-size: 17px; color: var(--mint); }
.bp-scope .res-stars { font-size: 30px; letter-spacing: 4px; color: var(--gold); line-height: 1; }
.bp-scope .res-stars .off { color: var(--night-3); }
.bp-scope .res-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.bp-scope .res-grid div { background: var(--night-3); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.bp-scope .res-grid dt { font-size: 11px; color: var(--muted); }
.bp-scope .res-grid dd { margin: 0; font-family: var(--font-sign); font-size: 19px; font-variant-numeric: tabular-nums; }
.bp-scope .res-pvs { margin: 0; font-family: var(--font-hand); font-weight: 700; font-size: 18px; color: var(--tarp-2); }
.bp-scope .res-ach { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-scope .res-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bp-scope .res-actions .primary { grid-column: 1 / -1; }
.bp-scope .sticky-actions { position: sticky; bottom: 0; z-index: 2; margin: 0 -20px -20px; padding: 14px 20px 20px; border-radius: 0 0 20px 20px; background: linear-gradient(180deg, transparent, var(--night-2) 30%); }
.bp-scope .res-ach span { font-size: 12px; background: var(--gold); color: var(--gold-ink); padding: 3px 9px; border-radius: 999px; }

.bp-scope .shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; }
.bp-scope .wallet { margin: 0; text-align: right; }
.bp-scope .wallet span { display: block; font-size: 12px; color: var(--muted); }
.bp-scope .wallet strong { font-family: var(--font-sign); font-weight: 400; font-size: 24px; color: var(--gold); font-variant-numeric: tabular-nums; }
.bp-scope .shop-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bp-scope .up { display: grid; gap: 4px; align-content: start; padding: 11px; border-radius: 14px; background: var(--night-3); border: 1px solid var(--line); min-width: 0; }
.bp-scope .up h3 { margin: 0; font-family: var(--font-sign); font-weight: 400; font-size: 15px; }
.bp-scope .up p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.35; }
.bp-scope .up .now { color: var(--ink); }
.bp-scope .pips { display: flex; gap: 3px; }
.bp-scope .pips i { width: 14px; height: 4px; border-radius: 2px; background: var(--night); }
.bp-scope .pips i.on { background: var(--gold); }
.bp-scope .up button { margin-top: 4px; padding: 7px 8px; border-radius: 10px; border: none; background: var(--tarp); color: var(--tarp-2); font-family: var(--font-sign); font-size: 14px; cursor: pointer; touch-action: manipulation; }
.bp-scope .up button:disabled { background: var(--night); color: var(--faint); cursor: not-allowed; }
.bp-scope .up.maxed button { background: transparent; color: var(--mint); }

.bp-scope .share-img { width: 100%; border-radius: 12px; background: var(--night); aspect-ratio: 4 / 5; object-fit: cover; }
.bp-scope .share-text { width: 100%; resize: none; border-radius: 10px; border: 1px solid var(--line); background: var(--night); color: var(--ink); font: inherit; font-size: 13px; padding: 8px 10px; }

/* ---------- side panels ---------- */

/* ---------- motion ---------- */
@keyframes pop { from { transform: scale(0.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes arrive { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes drop { from { transform: translateY(-10px) scale(1.2); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes steam { 0% { transform: translateY(4px) scaleY(0.6); opacity: 0; } 40% { opacity: 0.8; } 100% { transform: translateY(-6px) scaleY(1.1); opacity: 0; } }
@keyframes flicker { from { opacity: 0.55; transform: scaleY(0.8); } to { opacity: 0.95; transform: scaleY(1.15); } }
@keyframes flipFish { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(1.08); } 100% { transform: rotateY(0); } }
@keyframes warnPulse { from { filter: brightness(1); } to { filter: brightness(1.18); } }
@keyframes smoke { from { transform: translateY(0) scale(0.6); opacity: 0.8; } to { transform: translateY(-26px) scale(1.4); opacity: 0; } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, -30%); } 15% { opacity: 1; transform: translate(-50%, -60%); } 100% { opacity: 0; transform: translate(-50%, -190%); } }
@media (prefers-reduced-motion: reduce) {
  .bp-scope *, .bp-scope *::before, .bp-scope *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .bp-scope .ri:not(.cold)::after, .bp-scope .grill::after { display: none; }
}
@media (max-width: 380px) {
  .bp-scope .hud-money strong { font-size: 26px; }
  .bp-scope .c-face { font-size: 33px; }
  .bp-scope .c-bubble { font-size: 14px; padding: 5px 6px; }
  .bp-scope .modes { grid-template-columns: 1fr; }
  .bp-scope .mini-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- orchard frame around the stall ---------- */
/* The stall (.bp-scope) keeps its winter-night palette; everything around it uses the arcade shell. */
.bungeoppang-page .arcade-hero h1 .hero-dot{font-size:13px;color:#e5562c;margin-left:9px;vertical-align:middle}
.bungeoppang-page .arcade-stage{max-width:480px;margin-inline:auto;width:100%}
.bungeoppang-page .stage{scroll-margin-top:10px}
.bungeoppang-page .bp-actions{margin-top:12px}
.bungeoppang-page .bp-actions .b{flex:1 1 0}
/* wide screens: stall and "how to bake" on the left, the cards on the right */
@media(min-width:761px){
  .bungeoppang-page .bp-layout{grid-template-columns:minmax(0,480px) minmax(240px,300px);grid-template-rows:auto 1fr;grid-template-areas:"stage side" "howto side";row-gap:22px;max-width:804px}
  .bungeoppang-page .bp-layout>.arcade-stage{grid-area:stage}
  .bungeoppang-page .bp-layout>.bp-sidebar{grid-area:side}
  .bungeoppang-page .bp-layout>.bp-howto{grid-area:howto;align-self:start}
}

.bp-howto .steps{margin:0;padding:0;list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;counter-reset:h}
.bp-howto .steps li{counter-increment:h;display:grid;grid-template-columns:24px minmax(0,1fr);column-gap:9px;font-size:11px;line-height:1.75;color:#687a69}
.bp-howto .steps li::before{content:counter(h);grid-row:span 2;width:22px;height:22px;line-height:22px;text-align:center;border-radius:50%;background:#e8eedc;color:#2f7659;font-size:11px;font-weight:800}
.bp-howto .steps b{color:#203e32;font-size:12px}
.bp-howto .keys{margin:16px 0 0;padding-top:12px;border-top:1px solid #e1e6d8;font-size:10px;line-height:2.3;color:#687a69}
.bp-howto .keys kbd{font-size:10px;padding:1px 4px}

.bp-sidebar .box-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 12px}
.bp-sidebar .box-head h2{margin:0}
.bp-sidebar .tag{flex:none;font-size:10px;font-weight:700;color:#6b7a65;border:1px solid #dce3d4;border-radius:999px;padding:3px 9px;white-space:nowrap}
.bp-sidebar .tag.live{color:#2f7659;border-color:#a9c9b1;background:#eef5ea}
.bp-sidebar .tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding:3px;margin:0 0 10px;border-radius:10px;background:#eef1e4}
.bp-sidebar .tabs button{border:0;background:transparent;color:#6b7a65;padding:8px 0;border-radius:8px;cursor:pointer;font:inherit;font-size:12px;font-weight:700}
.bp-sidebar .tabs button[aria-selected="true"]{background:#fffef9;color:#203e32;box-shadow:0 1px 0 #d6dfcb}
.bp-sidebar .board{list-style:none;margin:0;padding:0}
.bp-sidebar .board li{display:grid;grid-template-columns:24px minmax(0,1fr) auto;gap:8px;align-items:center;padding:7px 6px;border-radius:8px;font-size:13px}
.bp-sidebar .board li+li{border-top:1px dashed #e4e9dc}
.bp-sidebar .board .rk{font-weight:800;font-size:12px;color:#8a977f;text-align:center;font-variant-numeric:tabular-nums}
.bp-sidebar .board li:nth-child(-n+3) .rk{color:#c0731b}
.bp-sidebar .board li.me{background:#fbf2dc;border-top-color:transparent}
.bp-sidebar .board .nm{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.bp-sidebar .board .sc{font-weight:700;font-variant-numeric:tabular-nums}
.bp-sidebar .board li.empty{display:block;color:#7b8873;font-size:12px;line-height:1.7;padding:8px 2px}
.bp-sidebar .board-note{margin:10px 0 0;font-size:11px;line-height:1.6;color:#77836e}
.bp-sidebar .board-note:empty{display:none}

/* the stall's handwritten price card, hung on the orchard wall */
.bp-sidebar .pricecard{position:relative;margin:6px 4px 4px;padding:16px 18px 14px;border-radius:6px;transform:rotate(-1.4deg);background:#caa47b repeating-linear-gradient(0deg,transparent 0 25px,rgba(58,39,23,.18) 25px 26px);color:#3a2717;font-family:"Gaegu","Gowun Dodum","Apple SD Gothic Neo","Malgun Gothic",sans-serif;box-shadow:0 12px 22px -16px rgba(32,62,50,.7)}
.bp-sidebar .pricecard::before{content:"";position:absolute;top:-7px;left:50%;width:14px;height:14px;margin-left:-7px;border-radius:50%;background:#e5562c;box-shadow:0 2px 0 rgba(0,0,0,.25)}
.bp-sidebar .pricecard h2{margin:0 0 4px;font-family:inherit;font-weight:700;font-size:25px;line-height:1.1;letter-spacing:0}
.bp-sidebar .pricecard ul{list-style:none;margin:0;padding:0;display:grid;gap:1px}
.bp-sidebar .pricecard li{display:flex;justify-content:space-between;font-size:20px;font-weight:700;line-height:1.25}
.bp-sidebar .pricecard li.locked{opacity:.45;text-decoration:line-through;text-decoration-thickness:2px}
.bp-sidebar .pricecard p{margin:6px 0 0;font-size:16px;font-weight:700}

.bp-sidebar .ledger{margin:0;display:grid;gap:8px}
.bp-sidebar .ledger div{display:flex;justify-content:space-between;align-items:baseline;gap:10px;font-size:12px}
.bp-sidebar .ledger dt{color:#6b7a65}
.bp-sidebar .ledger dd{margin:0;font-weight:700;font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}

.bp-sidebar .ach-list{list-style:none;margin:0;padding:0;display:grid;gap:9px}
.bp-sidebar .ach-list li{display:grid;grid-template-columns:28px minmax(0,1fr);gap:9px;align-items:center;font-size:11px;line-height:1.5;color:#8a977f}
.bp-sidebar .ach-list li b{display:block;font-size:12px;font-weight:700;color:#6b7a65}
.bp-sidebar .ach-list li.on b{color:#203e32}
.bp-sidebar .ach-badge{width:28px;height:20px;--fb:#e7ebdc;--fs:#b8c3ad;--fe:#9aa58f;--fg:#f4f6ee}
.bp-sidebar .ach-list li.on .ach-badge{--fb:#e5a447;--fs:#8c5a24;--fe:#3a2416;--fg:#fff3d6}

.bp-tip{display:flex;align-items:flex-start;gap:12px}
.bp-tip>span{font-size:24px;color:#c0731b;margin-top:2px}
.bp-tip h3{margin:0 0 7px;font-size:13px}
.bp-tip p{font-size:12px;line-height:1.85;margin:0}
.bp-other-game{display:flex;align-items:center;gap:13px;padding:17px;background:#ecefdc;border:1px solid #dce3cc;border-radius:17px;text-decoration:none;color:#203e32}
.bp-other-game>span{font-size:29px}
.bp-other-game small{font-size:10px;color:#687a69;display:block;margin-bottom:6px}
.bp-other-game strong{font-size:13px}
.bp-other-game strong span{margin-left:10px}

@media(max-width:760px){
  .bp-sidebar>*{grid-column:1/-1}
  .bp-sidebar .pricecard{margin:6px 6px 2px}
}
@media(max-width:420px){
  .bp-howto .steps{grid-template-columns:1fr}
}
