/* ラーメン屋台 天下一 の 色と、このゲームだけの 画面 */
:root {
  --bg: #fbf3e6; --bg2: #2a120a; --panel: #ffffff; --ink: #2a1a10; --dim: #7a6a5a; --btn: #f1e4d0;
  --pri1: #ff6a2a; --pri2: #d01d1d; --accent: #b8460e; --bar: #3a1a10; --logo-stroke: #7a0c1e;
  --title-bg: linear-gradient(180deg, #1a1030 0%, #3a1a40 40%, #e8743a 100%);
  --banner-bg: radial-gradient(circle at 70% 40%, #ffd27a, #e5452a 50%, #5a0c1e);
}
#title::before { content: ""; position: absolute; inset: 0; background: url(img/bg/yatai.webp) center/cover; opacity: .75; }
.gold { color: #c88a00; font-weight: 800; }
.huge { font-size: 2.2em; font-weight: 900; margin: 0; color: var(--pri2); }

/* ガチャの 入れもの：どんぶり */
.gobj.o-bowl { width: 210px; height: 120px; }
.gobj.o-bowl .body { border-radius: 8px 8px 50% 50% / 8px 8px 100% 100%; top: 30%; }
.gobj.o-bowl .body::before { content: ""; position: absolute; left: -6%; right: -6%; top: -16%; height: 34%; border-radius: 50%; background: inherit; filter: brightness(1.15); }

/* お店 */
.scene { position: relative; height: 300px; overflow: hidden; }
.sbg { position: absolute; inset: 0; background: center 70%/cover no-repeat, #3a2a40; }
.sstaff img { position: absolute; bottom: 38%; height: 40%; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); cursor: pointer; }
.st0 { left: 40%; } .st1 { left: 18%; height: 44% !important; } .st2 { left: 62%; height: 44% !important; }
.queue { position: absolute; left: 0; right: 0; bottom: 0; height: 42%; pointer-events: none; }
.cust { position: absolute; bottom: 0; height: 100%; left: -30%; animation: walk 12s linear infinite; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
@keyframes walk { 0% { left: -25%; transform: translateY(0); } 50% { transform: translateY(-3px); } 100% { left: 105%; } }
.shopname { position: absolute; left: 8px; top: 8px; background: rgba(42,18,10,.85); color: #fff; padding: 4px 12px; border-radius: 10px; display: flex; flex-direction: column; line-height: 1.15; border: 2px solid #ffcc33; }
.shopname small { color: #ffcc33; font-size: var(--fs-xs); } .shopname b { font-size: 1.1em; }
.boostbadge { position: absolute; left: 8px; top: 58px; background: linear-gradient(90deg, #ff3550, #ff9a2e); color: #fff; font-weight: 900; font-size: .8em; padding: 3px 10px; border-radius: 99px; animation: pop 1.2s infinite; }
.cashbar { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: linear-gradient(90deg, #3a1a10, #6a2a14); color: #fff; }
.cashbar > div:first-child { flex: 1; display: flex; flex-direction: column; }
.cashbig { font-size: 1.5em; color: #ffd23f; } .persec { opacity: .85; }
.mini { display: flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border-radius: 12px; padding: 4px 8px 4px 4px; cursor: pointer; }
.mini span { display: flex; flex-direction: column; font-size: .8em; } .mini b { color: #ffd23f; font-size: 1.1em; }
.stats3 { display: flex; justify-content: space-around; font-size: .8em; padding: 6px; color: var(--dim); }
.stats3 b { color: var(--ink); }
.ups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 8px; }
.upbtn { border: 0; border-radius: 14px; padding: 8px 4px; background: #e9dcc8; display: flex; flex-direction: column; align-items: center; gap: 1px; box-shadow: 0 3px 0 rgba(0,0,0,.15); opacity: .75; }
.upbtn.can { background: linear-gradient(180deg, #ffe08a, #ffb02e); opacity: 1; }
.upbtn small { font-size: var(--fs-xs); color: var(--dim); } .upbtn span { display: flex; align-items: center; gap: 2px; font-weight: 800; font-size: .85em; }
.upbtn .ico, .act .ico, .buildbox .ico { width: 15px; height: 15px; vertical-align: middle; }
.x10 { display: block; text-align: right; font-size: .78em; padding: 4px 12px 0; }
.acts { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; padding: 8px; }
.act { border: 0; border-radius: 14px; padding: 8px 4px; color: #fff; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.act small { font-size: var(--fs-xs); opacity: .95; }
.act.rush { background: linear-gradient(180deg, #ff6a2a, #d01d1d); } .act.boost { background: linear-gradient(180deg, #ff5f8f, #b8204a); } .act.warp { background: linear-gradient(180deg, #7a5af0, #3a2a9a); }
.buildbox { margin: 0 8px 8px; padding: 10px; border-radius: 14px; background: var(--panel); border: 2px dashed #e0b070; display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; }
.buildbox small { grid-column: 1; color: var(--dim); font-size: .78em; } .buildbox .btn { grid-row: 1 / 3; grid-column: 2; }
.buildbox.fame { border-color: #b47cff; }

/* どんぶりの 絵（部品を かさねる） */
.bowlmix { position: relative; aspect-ratio: 1; flex: 0 0 auto; }
.bowlmix img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.bowlmix.small { width: 54px; } .bowlmix.big { width: 46%; } .bowlmix.tiny { width: 40px; }
.menutop { display: flex; gap: 10px; align-items: center; padding: 10px; background: radial-gradient(circle at 30% 50%, #fff7e6, #f1e0c4); }
.menuinfo { display: flex; flex-direction: column; gap: 3px; }
.price { font-size: 1.7em; color: var(--pri2); }
.combo { background: linear-gradient(90deg, #ffcc33, #ff8a2e); color: #fff; font-weight: 900; padding: 3px 10px; border-radius: 99px; align-self: flex-start; animation: pop 1.6s infinite; }
.hscroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 8px 8px; }
.pick { flex: 0 0 86px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: var(--fs-xs); text-align: center; }
.pick .card { width: 100%; }
.pick.on .card { outline: 4px solid var(--pri1); outline-offset: 1px; }
.pick.on small { color: var(--pri2); font-weight: 800; }
.combos { display: flex; flex-direction: column; gap: 6px; padding: 0 8px; }
.cmb { background: var(--panel); border-radius: 12px; padding: 8px 10px; font-size: .85em; opacity: .8; }
.cmb.ok { opacity: 1; border: 2px solid #ffcc33; }
.cneed { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 3px; }
.cneed span { background: var(--btn); border-radius: 6px; padding: 1px 6px; font-size: .9em; color: var(--dim); }
.cneed span.have { background: #ffe9a8; color: var(--ink); font-weight: 700; }

/* ラーメンラッシュ */
#rush { position: fixed; inset: 0; z-index: 60; max-width: 520px; margin: 0 auto; background: radial-gradient(circle at 50% 30%, #6a2a14, #1a0a04); color: #fff; display: flex; flex-direction: column; }
.rtop { display: flex; justify-content: space-between; align-items: center; padding: max(10px, env(safe-area-inset-top)) 12px 6px; font-size: 1.05em; }
.rtop b { font-size: 1.3em; color: #ffd23f; }
.rcombo { color: #ff8ab0; font-weight: 900; font-size: 1.2em; animation: pop .6s infinite; }
.rhint { text-align: center; font-size: .82em; opacity: .85; margin: 0 0 6px; }
.rgrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 10px max(14px, env(safe-area-inset-bottom)); }
.seat { position: relative; border-radius: 16px; background: rgba(255,255,255,.07); border: 2px solid rgba(255,255,255,.12); overflow: hidden; display: flex; align-items: flex-end; justify-content: center; cursor: pointer; transition: transform .1s; }
.seat .rc { height: 92%; opacity: 0; transform: translateY(20%); transition: .15s; pointer-events: none; }
.seat .order { position: absolute; top: 6px; right: 6px; background: #fff; border-radius: 50%; padding: 3px; opacity: 0; transition: .15s; }
.seat .ring { position: absolute; left: 8px; top: 8px; width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(#ffd23f calc(var(--p, 1) * 360deg), rgba(255,255,255,.15) 0); opacity: 0; }
.seat.on { background: rgba(255,210,63,.18); border-color: #ffd23f; }
.seat.on .rc, .seat.on .order, .seat.on .ring { opacity: 1; transform: none; }
.seat:active { transform: scale(.96); }
.seat.miss { background: rgba(255,53,80,.35); }
.pop { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); font-weight: 900; font-size: 20px; color: #fff; text-shadow: 0 0 4px #000, 0 2px 0 #000; animation: popup .9s forwards; pointer-events: none; white-space: nowrap; z-index: 5; }
.pop.good { color: #ffd23f; }
@keyframes popup { from { transform: translate(-50%, 10px) scale(.6); } 30% { transform: translate(-50%, -14px) scale(1.15); } to { transform: translate(-50%, -40px); opacity: 0; } }
.bresult { position: absolute; inset: 0; display: grid; place-items: center; font-size: 50px; font-weight: 900; font-style: italic; text-shadow: 0 4px 0 #000; animation: zoom .3s; z-index: 9; background: rgba(0,0,0,.35); color: #ffd23f; }

/* お店の 舞台（背景・店員・手前の カウンター・お客さん を かさねる） */
.scene { position: relative; overflow: hidden; height: auto; background: #1a1430; }
.stage2 { position: relative; width: 100%; }
.stage2 .layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.stage2 .front { pointer-events: none; }
.staffL .stf { cursor: pointer; filter: drop-shadow(0 3px 3px rgba(0,0,0,.35)); }
.custL { pointer-events: none; }
.custL .cust { animation: none; filter: drop-shadow(0 3px 3px rgba(0,0,0,.4)); }
.coinpop { position: absolute; transform: translateX(-50%); font-weight: 900; font-size: 15px; color: #ffd23f; text-shadow: 0 0 3px #000, 0 2px 0 #7a3a00; white-space: nowrap; animation: coinup 1.3s forwards; z-index: 2000; }
.coinpop::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff6b0, #ffcc33 50%, #c88a00); }
@keyframes coinup { from { opacity: 0; transform: translate(-50%, 10px) scale(.7); } 20% { opacity: 1; transform: translate(-50%, 0) scale(1.15); } to { opacity: 0; transform: translate(-50%, -34px); } }
.stage2 .staffL { z-index: 1; } .stage2 .front { z-index: 2; } .stage2 .custL { z-index: 3; }
/* 舞台を すこし 寄せて 見せる（空と 道路を けずる） */
.scene { aspect-ratio: 4 / 3; }
.scene .stage2 { position: absolute; width: 128%; left: -14%; top: -9%; }

/* 会話シーン・指さし */
#scene { position: fixed; inset: 0; z-index: 80; max-width: 520px; margin: 0 auto; overflow: hidden; background: #1a1030; cursor: pointer; }
.scbg { position: absolute; inset: 0; background: center/cover no-repeat; filter: brightness(.75); }
.scwho { position: absolute; bottom: 120px; height: 72%; filter: drop-shadow(0 6px 10px rgba(0,0,0,.5)); }
.scwho.l { left: -12%; } .scwho.r { right: -12%; }
.scwho.in { animation: scin .35s ease-out; }
@keyframes scin { from { opacity: 0; transform: translateY(20px); } }
.scbox { position: absolute; left: 10px; right: 10px; bottom: max(14px, env(safe-area-inset-bottom)); min-height: 110px; background: rgba(255,250,240,.96); border: 3px solid #3a1a10; border-radius: 16px; padding: 10px 14px 18px; box-shadow: 0 6px 16px rgba(0,0,0,.4); }
.scname { position: absolute; top: -16px; left: 14px; background: #d01d1d; color: #fff; padding: 2px 14px; border-radius: 99px; font-size: .9em; }
.sctext { margin: 8px 0 0; font-size: 1.05em; font-weight: 700; line-height: 1.6; }
.scnext { position: absolute; right: 14px; bottom: 6px; color: #d01d1d; animation: pop .8s infinite; }
.scskip { position: fixed; top: max(10px, env(safe-area-inset-top)); right: max(10px, calc(50% - 250px)); z-index: 95; border: 0; border-radius: 99px; padding: 6px 12px; background: rgba(0,0,0,.45); color: #fff; font-weight: 700; font-size: .8em; }
.roadmap { position: absolute; left: 10px; right: 10px; top: 40%; display: flex; gap: 4px; align-items: center; justify-content: center; }
.roadmap div { flex: 1; text-align: center; color: #fff; font-weight: 800; font-size: 11px; text-shadow: 0 1px 3px #000; }
.roadmap img { width: 100%; border-radius: 8px; border: 2px solid #ffd23f; box-shadow: 0 3px 8px rgba(0,0,0,.5); }
.roadmap .arrow { flex: 0 0 auto; font-size: 18px; color: #ffd23f; }
.ptdim { position: fixed; background: rgba(10,6,20,.62); z-index: 85; }
.ptring { position: fixed; z-index: 86; border: 3px solid #ffd23f; border-radius: 14px; box-shadow: 0 0 18px #ffd23f; pointer-events: none; animation: pop 1s infinite; }
.pthand { position: fixed; z-index: 87; font-size: 36px; pointer-events: none; animation: tapme .9s infinite; }
.pthand.up { transform: rotate(180deg); }
@keyframes tapme { 50% { translate: 0 10px; } }
.ptbubble { position: fixed; left: 50%; transform: translateX(-50%); width: min(92vw, 470px); z-index: 87; display: flex; gap: 8px; align-items: center; background: #fffaf0; border: 3px solid #d01d1d; border-radius: 16px; padding: 8px 12px; font-weight: 800; box-shadow: 0 6px 16px rgba(0,0,0,.35); pointer-events: none; }
.ptbubble img { width: 56px; height: 56px; object-fit: cover; object-position: 50% 5%; border-radius: 50%; background: #f1e0c4; flex: 0 0 auto; }
.ptbubble.solo { top: 70px; animation: fade .3s; }

/* 目標への 道（屋台 → 本店ビル） */
.road { padding: 6px 8px 8px; background: #2a120a; }
.road .chips { display: flex; gap: 4px; }
.road .chips span { flex: 1; display: flex; flex-direction: column; align-items: center; opacity: .45; filter: grayscale(.8); }
.road .chips span.done { opacity: .8; filter: none; }
.road .chips span.now { opacity: 1; filter: none; }
.road .chips span.now img { border-color: #ffd23f; box-shadow: 0 0 8px #ffd23f; }
.road .chips img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; border: 2px solid #6a4a3a; }
.road .chips small { color: #fff; font-size: var(--fs-xs); font-weight: 800; margin-top: 1px; }
.rprog { position: relative; height: 18px; margin-top: 5px; background: rgba(255,255,255,.12); border-radius: 99px; overflow: hidden; }
.rprog i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #ffd23f, #ff7a2e); }
.rprog span { position: relative; display: block; text-align: center; font-size: 11px; line-height: 18px; color: #fff; font-weight: 800; text-shadow: 0 1px 2px #000; }
.ptbubble .face { width: 58px; height: 58px; flex: 0 0 auto; border-radius: 50%; background: #f1e0c4 no-repeat; background-size: 330%; background-position: 50% 7%; border: 2px solid #d01d1d; }

/* 行動ボタン（文字の 見直し） */
.act { gap: 1px; padding: 8px 4px 7px; line-height: 1.3; }
.act b { font-size: var(--fs-m); font-weight: 800; white-space: nowrap; }
.act small { font-size: var(--fs-xs); white-space: nowrap; }
.act em { font-style: normal; margin-top: 3px; font-size: var(--fs-xs); font-weight: 700; background: rgba(0,0,0,.22); border-radius: 99px; padding: 0 8px; display: inline-flex; align-items: center; gap: 2px; }
.act em .ico { width: 13px; height: 13px; }
.upbtn { padding: 8px 4px 7px; line-height: 1.3; }
.upbtn b { font-size: var(--fs-m); } .upbtn small { white-space: nowrap; } .upbtn span { font-size: var(--fs-s); }
.stats3 { font-size: var(--fs-s); }
.x10 { font-size: var(--fs-s); }

/* Painted counter occlusion uses the exact background pixels. Customers remain above it. */
.stage2 > .front { clip-path: polygon(0 54%,100% 54%,100% 100%,0 100%); pointer-events:none; }

/* Shop mascots wait by the storefront, outside the kitchen counter. */
.stage2 .mascotL { z-index: 4; pointer-events: none; }
.mascotL .stf { cursor: pointer; pointer-events: auto; }
