/* まっすぐ帰れない。 — 画面全体を使う1画面ゲーム。夜の街（紺〜紫）にネオンのピンクを1色だけ効かせる */
/* レイアウト：ゲーム世界(canvas)を全面に敷き、HUDは四隅。PC横長とスマホ縦長は data-layout で別配置 */
:root {
  color-scheme: dark;
  --night-0: #05060f;
  --night-1: #0b1030;
  --night-2: #151c48;
  --panel: rgba(9, 13, 38, 0.8);
  --panel-solid: #0d1334;
  --ink: #f6f4ff;
  --ink-dim: #b9bde0;
  --line: rgba(205, 212, 255, 0.55);
  --line-strong: rgba(240, 242, 255, 0.9);
  --pink: #ff4fa3;
  --pink-deep: #9c2a70;
  --pink-soft: #ff9ac8;
  --violet: #a86bff;
  --gold: #ffd84a;
  --warn: #ff7a6b;
  --font-ui: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Noto Sans CJK JP", "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
  --font-hand: "Yomogi", "Hiragino Maru Gothic ProN", "Noto Sans CJK JP", cursive;
  --u: 16px;          /* HUDの基準サイズ。画面に合わせてJSが更新する */
  --mu: 17px;         /* メニュー類の基準サイズ */
  --ui-scale: 1;
}

[hidden] { display: none !important; } /* 公開サーバーでも hidden の要素を必ず隠す */
html, body { height: 100%; box-sizing: border-box; }
html { background: var(--night-0); }
body { background: var(--night-0); color: var(--ink); font-family: var(--font-ui); overflow: hidden; }

#app {
  position: relative; height: 100%; overflow: hidden; background: var(--night-0);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none; -webkit-tap-highlight-color: transparent;
  font-variant-numeric: tabular-nums;
}
#app *, #app *::before, #app *::after { box-sizing: border-box; }
#world, #ui { position: absolute; inset: 0; }
#world canvas { display: block; width: 100%; height: 100%; }
#ui { pointer-events: none; }
#ui > * { pointer-events: auto; }
.u { font-size: calc(var(--u) * var(--ui-scale)); }
.ic { width: 1em; height: 1em; display: block; flex: none; }
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
:focus { outline: none; }
:is(:focus-visible, .is-focus) { outline: 2px solid var(--pink-soft); outline-offset: 2px; }
.scroll { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; }

/* ---- 起動中 ---- */
#boot { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--night-0); z-index: 50; transition: opacity .4s; }
#boot.is-done { opacity: 0; pointer-events: none; }
.boot__moon { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset -12px -4px 0 0 var(--gold); animation: bob 1.6s ease-in-out infinite; }
.boot__text { margin: 0; color: var(--ink-dim); letter-spacing: .12em; font-size: 14px; }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* ---- タイトル ---- */
#title { position: absolute; inset: 0; overflow: hidden; background: var(--night-0); }
.title__blur { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(26px) brightness(.45); }
.title__stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.title__art { position: absolute; left: 0; top: 0; width: 100%; height: 100%; max-width: none; display: block; }
.tbtn {
  position: absolute; display: flex; align-items: center; border-radius: 15px; padding: 0 0 0 var(--tb-pad, 44px); white-space: nowrap;
  background: #0e1632; border: 2px solid rgba(190, 200, 255, .62); color: #fff; font-weight: 800; letter-spacing: .1em;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5); text-align: left;
}
.tbtn .ic { width: 1.5em; height: 1.5em; margin-right: var(--tb-gap, 39px); }
.tbtn--primary { background: linear-gradient(180deg, #a4347a, #6e1f58); border-color: var(--pink-soft); box-shadow: 0 0 14px rgba(255, 79, 163, .85), inset 0 0 12px rgba(255, 154, 200, .3); }
.tbtn:not(:disabled):hover, .tbtn:is(:focus-visible, .is-focus) { border-color: #fff; box-shadow: 0 0 18px rgba(255, 79, 163, .95); outline: none; }
.tbtn:disabled { color: #6a7096; border-color: rgba(120, 128, 170, .5); }
.tbtn small { margin-left: auto; margin-right: 1.4em; font-size: .5em; letter-spacing: .04em; font-weight: 700; color: #8087b0; }
.title__logo { position: absolute; max-width: none; height: auto; pointer-events: none; }
.title__hand { position: absolute; white-space: pre; line-height: 1.35; font-family: var(--font-hand); color: #ffe9f5; pointer-events: none;
  text-shadow: 0 0 .25em #ff6fb8, 0 0 .6em #ff4fa3, 0 0 1.2em #a86bff; transform-origin: 0 0; }
.title__ver { position: absolute; padding: 2px 8px 3px; border-radius: 6px; background: #0b0d1c; color: #e8e9f7; font-weight: 700; white-space: nowrap; }

/* ---- HUD ---- */
#hud { position: absolute; inset: 0; pointer-events: none; }
#hud > * { position: absolute; pointer-events: auto; }
.pane { background: var(--panel); border: .09em solid var(--line); border-radius: .75em; }

.status { left: 1.6em; top: 1.25em; display: flex; }
.status__face { width: 8em; height: 7.5em; border: .12em solid var(--line-strong); border-radius: .65em; object-fit: cover; background: #2a1a3a; }
.status__body { margin-left: .55em; width: 22.4em; padding: .2em 1.1em .5em .7em; background: var(--panel); border-radius: .7em; display: flex; flex-direction: column; justify-content: space-between; }
.st-row { display: flex; align-items: center; gap: .5em; line-height: 1; white-space: nowrap; }
.st-drunk span { font-size: 1.6em; font-weight: 700; }
.st-drunk b { font-size: 2.1em; font-weight: 800; }
.bar { height: 1em; border: .1em solid var(--line-strong); border-radius: 1em; background: rgba(8, 8, 26, .7); overflow: hidden; }
.bar > i { display: block; height: 100%; width: 50%; border-radius: 1em; background: linear-gradient(90deg, #ff4f93, #ff8ab8); transition: width .35s ease; }
.bar--drunk { width: 20.4em; }
.bar--stamina { width: 14.7em; height: .95em; }
.st-stamina .ic { font-size: 1.5em; color: var(--pink); }
.st-stamina span { font-size: 1.25em; font-weight: 700; margin-right: .6em; }
.st-money .ic { font-size: 1.6em; color: var(--gold); }
.st-money span { font-size: 1.4em; font-weight: 700; }
.st-money b { font-size: 1.6em; font-weight: 800; margin-left: 1.6em; }
.is-low > i { background: linear-gradient(90deg, #ff6a4f, #ffb27a); }

.dist { right: 16.6em; top: 1.4em; width: 16em; height: 5.1em; display: flex; align-items: center; gap: .7em; padding: 0 1em; white-space: nowrap; line-height: 1.15; }
.dist > .ic { font-size: 2.9em; }
.dist span { font-size: 1.1em; font-weight: 700; display: block; }
.dist small { font-size: 1.25em; font-weight: 700; }
.dist b { font-size: 1.95em; font-weight: 800; }
.clock { right: 1.5em; top: 1.4em; width: 13.8em; height: 5.3em; display: flex; align-items: center; justify-content: center; gap: .6em; padding: 0 .8em; white-space: nowrap; line-height: 1.15; }
.clock > .ic { font-size: 2.7em; }
.clock small { font-size: 1.2em; font-weight: 700; }
.clock b { font-size: 1.9em; font-weight: 800; }
.clock span { font-size: 1.15em; font-weight: 700; display: block; text-align: right; }

.hbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; padding: 0; color: #fff; }
.hbtn--menu { right: 33.7em; top: 1.4em; width: 5.1em; height: 5.1em; }
.hbtn--menu .ic { font-size: 2.2em; }
.hbtn--menu span { font-size: .85em; font-weight: 700; }

.minimap { right: 1.25em; top: 7.9em; width: 19.6em; height: 19.6em; transition: transform .2s; transform-origin: 100% 0; }
.minimap canvas { width: 100%; height: 100%; display: block; border-radius: 50%; }
.minimap.is-big { transform: scale(1.5); z-index: 3; }
[data-minimap="small"] .minimap { transform: scale(.7); }
[data-minimap="small"] .minimap.is-big { transform: scale(1.2); }
[data-minimap="off"] .minimap { display: none; }

.rbtn {
  width: 8.1em; height: 8.1em; border-radius: 50%; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em;
  background: rgba(8, 12, 34, .88); border: .13em solid var(--line-strong); color: #fff;
}
.rbtn .ic { font-size: 3.3em; }
.rbtn span { font-size: 1.05em; font-weight: 700; letter-spacing: .04em; }
.rbtn:active, .rbtn.is-held { background: rgba(120, 36, 92, .92); border-color: var(--pink-soft); }
.rbtn.is-ready { border-color: var(--pink-soft); box-shadow: 0 0 1em rgba(255, 79, 163, .8); animation: ready 1.1s ease-in-out infinite; }
@keyframes ready { 50% { box-shadow: 0 0 1.6em rgba(255, 79, 163, 1); } }
.rbtn--talk { right: 23em; bottom: 3.5em; }
.rbtn--item { right: 13em; bottom: 3.5em; }
.rbtn--dash { right: 2.55em; bottom: 3.5em; }
kbd { position: absolute; top: -.5em; right: -.2em; min-width: 2em; padding: .15em .45em; border-radius: .5em; background: #f4f2ff; color: #151a40; font: 800 max(.8em, 9px)/1.2 var(--font-ui); text-align: center; }
.hbtn kbd { top: -.55em; right: -.5em; font-size: max(.7em, 9px); }
[data-input="touch"] kbd { display: none; }

.stick { left: 2em; bottom: 13em; width: 11em; height: 11em; border-radius: 50%; background: rgba(8, 12, 34, .55); border: .1em solid rgba(235, 238, 255, .7); display: none; touch-action: none; }
.stick::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background:
  conic-gradient(from -8deg, rgba(255,255,255,.45) 16deg, transparent 0) 50% 6% / 9% 9% no-repeat; opacity: .0; }
.stick i { position: absolute; width: 0; height: 0; border: .42em solid transparent; opacity: .6; }
.stick i:nth-child(1) { left: 50%; top: .55em; margin-left: -.42em; border-bottom-color: #fff; border-top-width: 0; }
.stick i:nth-child(2) { left: 50%; bottom: .55em; margin-left: -.42em; border-top-color: #fff; border-bottom-width: 0; }
.stick i:nth-child(3) { top: 50%; left: .55em; margin-top: -.42em; border-right-color: #fff; border-left-width: 0; }
.stick i:nth-child(4) { top: 50%; right: .55em; margin-top: -.42em; border-left-color: #fff; border-right-width: 0; }
.stick__knob { position: absolute; left: 50%; top: 50%; width: 48%; height: 48%; margin: -24% 0 0 -24%; border-radius: 50%; background: rgba(200, 200, 215, .82); border: .1em solid #fff; pointer-events: none; }
[data-input="touch"] .stick { display: block; }

/* ---- 会話 ---- */
#dialog { position: absolute; left: 1.75em; bottom: 2.75em; width: 44em; min-height: 8.1em; display: flex; gap: 1.1em; padding: .55em; background: rgba(8, 11, 32, .9); border: .1em solid rgba(225, 230, 255, .85); border-radius: .85em; }
[data-layout="pc"][data-input="touch"] #dialog { left: 15em; }
.dialog__face { width: 8.2em; height: 7em; border-radius: .5em; object-fit: cover; flex: none; background: #2a1a3a; }
.dialog__body { min-width: 0; flex: 1; padding: .25em 2.2em .2em 0; }
.dialog__name { font-size: 1.35em; font-weight: 700; color: #e6e2ff; letter-spacing: .08em; }
.dialog__text { font-size: 1.5em; line-height: 1.45; font-weight: 500; white-space: pre-wrap; overflow-wrap: anywhere; }
.dialog__next { position: absolute; right: 1.7em; bottom: 1.2em; width: 0; height: 0; border: .7em solid transparent; border-top: 1em solid var(--pink); border-bottom-width: 0; animation: bob 1s ease-in-out infinite; }
#dialog.is-mutter .dialog__next, #dialog.is-typing .dialog__next { visibility: hidden; }
#dialog.is-mutter { pointer-events: none; }

#choices { position: absolute; left: 1.75em; bottom: 12.4em; width: 30em; display: flex; flex-direction: column; gap: .6em; }
.choice { min-height: 44px; padding: .55em 1.1em; text-align: left; font-size: 1.35em; font-weight: 700; border-radius: .7em; background: rgba(10, 14, 40, .95); border: .09em solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.choice:is(:focus-visible, .is-focus), .choice:not(:disabled):hover { border-color: var(--pink-soft); background: #4a1c4e; box-shadow: 0 0 .9em rgba(255, 79, 163, .7); outline: none; }
.choice:disabled { color: #7a80a8; }
.choice > span { position: relative; }
.choice.is-focus > span::before { content: ''; position: absolute; left: -.85em; top: 50%; margin-top: -.38em; border: .38em solid transparent; border-left: .5em solid var(--pink); border-right-width: 0; animation: nudge .8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(.18em); } }
.choice small { font-size: .72em; color: var(--warn); font-weight: 700; white-space: nowrap; }

#card { position: absolute; left: 0; right: 0; top: 24%; text-align: center; pointer-events: none; animation: card 2.6s ease both; }
#card b { display: block; font-size: 3.4em; font-weight: 800; letter-spacing: .3em; text-indent: .3em; text-shadow: 0 0 .25em #fff, 0 0 .7em var(--pink), 0 0 1.4em var(--violet); }
#card span { display: block; margin-top: .5em; font: 1.5em var(--font-hand); color: #ffe6f3; text-shadow: 0 0 .5em var(--pink); }
@keyframes card { 0% { opacity: 0; transform: translateY(.6em); } 18%, 78% { opacity: 1; transform: none; } 100% { opacity: 0; } }

#toasts { position: absolute; left: 50%; top: 8em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .4em; pointer-events: none; }
.toast { padding: .45em 1.2em; font-size: 1.25em; font-weight: 700; border-radius: 2em; background: rgba(8, 11, 32, .92); border: .08em solid var(--pink-soft); white-space: nowrap; animation: toast 2.6s ease both; }
@keyframes toast { 0% { opacity: 0; transform: translateY(-.4em); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.fx-text { position: absolute; font: 1.7em var(--font-hand); color: #fff; text-shadow: 0 0 .4em var(--pink), 0 0 .8em var(--violet); pointer-events: none; white-space: nowrap; animation: fxt 1.8s ease-out both; }
@keyframes fxt { 0% { opacity: 0; } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(-.6em, -1.2em); } }

#balance { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); width: 26em; padding: .8em 1.2em 1em; text-align: center; }
#balance p { margin: 0 0 .6em; font-size: 1.3em; font-weight: 700; }
.bal { position: relative; height: 1.4em; border-radius: 1em; background: rgba(8, 8, 26, .8); border: .1em solid var(--line-strong); }
.bal::before { content: ""; position: absolute; left: 30%; right: 30%; top: 0; bottom: 0; background: rgba(120, 220, 170, .35); }
.bal i { position: absolute; top: -.35em; width: .5em; height: 2.1em; margin-left: -.25em; border-radius: .3em; background: var(--pink); box-shadow: 0 0 .6em var(--pink); left: 50%; }
.bal-time { height: .35em; margin-top: .6em; border-radius: 1em; background: var(--gold); transform-origin: 0 50%; }

#fade { position: absolute; inset: 0; background: var(--night-0); opacity: 0; pointer-events: none; transition: opacity .32s ease; display: grid; place-items: center; z-index: 20; }
#fade.is-on { opacity: 1; pointer-events: auto; }
#fade span { font: 2em var(--font-hand); color: #ffe6f3; text-shadow: 0 0 .5em var(--pink); }

/* ---- メニュー類（重ねて出す画面） ---- */
.modal { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 20, .74); font-size: calc(var(--mu) * var(--ui-scale)); }
.panel { width: min(100%, 34em); max-height: 100%; display: flex; flex-direction: column; background: var(--panel-solid); border: 1.5px solid var(--line); border-radius: 1em; box-shadow: 0 0 2em rgba(255, 79, 163, .25); overflow: hidden; }
.panel--wide { width: min(100%, 44em); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 1em; padding: .9em 1.2em; border-bottom: 1px solid rgba(205, 212, 255, .25); }
.panel__head h2 { margin: 0; font-size: 1.25em; font-weight: 800; letter-spacing: .12em; text-wrap: balance; }
.panel__body { padding: 1em 1.2em 1.2em; display: flex; flex-direction: column; gap: .7em; min-height: 0; }
.panel__body p { margin: 0; line-height: 1.6; color: var(--ink-dim); }
.mbtn { min-height: 46px; padding: .6em 1.1em; display: flex; align-items: center; gap: .8em; border-radius: .7em; background: #111a40; border: 1.5px solid var(--line); font-weight: 700; text-align: left; }
.mbtn .ic { font-size: 1.3em; }
.mbtn small { margin-left: auto; color: var(--ink-dim); font-weight: 500; font-size: .85em; text-align: right; }
.mbtn:is(:focus-visible, .is-focus), .mbtn:not(:disabled):hover { border-color: var(--pink-soft); background: #4a1c4e; box-shadow: 0 0 .8em rgba(255, 79, 163, .6); outline: none; }
.mbtn:disabled { color: #7a80a8; border-color: rgba(120, 128, 170, .4); }
.mbtn--primary { background: linear-gradient(180deg, #a4347a, #6e1f58); border-color: var(--pink-soft); }
.mbtn--ghost { min-height: 40px; padding: .35em .9em; background: transparent; }
.row { display: flex; gap: .7em; flex-wrap: wrap; }
.row > .mbtn { flex: 1 1 9em; justify-content: center; }

.set { display: flex; flex-direction: column; gap: .5em; }
.set h3 { margin: .9em 0 .1em; font-size: .9em; font-weight: 800; letter-spacing: .14em; color: var(--pink-soft); }
.set h3:first-child { margin-top: 0; }
.field { display: flex; align-items: center; justify-content: space-between; gap: .8em 1em; flex-wrap: wrap; min-height: 44px; }
.field > label, .field > span.lbl { flex: 1 1 8em; min-width: 0; font-weight: 700; }
.field input[type="range"] { flex: 1 1 10em; min-width: 0; height: 30px; accent-color: var(--pink); touch-action: pan-x; }
.seg { display: flex; gap: .35em; flex-wrap: wrap; }
.seg button { min-height: 40px; min-width: 3.4em; padding: .3em .8em; border-radius: .6em; background: #111a40; border: 1.5px solid var(--line); font-weight: 700; }
.seg button[aria-pressed="true"] { background: var(--pink-deep); border-color: var(--pink-soft); }
.seg button:is(:focus-visible, .is-focus) { box-shadow: 0 0 .8em rgba(255, 79, 163, .8); border-color: #fff; outline: none; }
.note { font-size: .85em; color: var(--ink-dim); line-height: 1.55; }
.bind { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: .4em .8em; }
.bind span { font-weight: 700; min-width: 0; }
.bind code { font: 700 .95em var(--font-ui); padding: .2em .7em; border-radius: .5em; background: #1b2452; white-space: nowrap; }
.pads { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: .35em; }
.pads li { display: flex; align-items: center; gap: .6em; }
.pads button { flex: 1; min-width: 0; }
.pads .mbtn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.items { display: flex; flex-direction: column; gap: .5em; }
.items .mbtn b { min-width: 2.2em; text-align: right; }
.items .mbtn img { width: 2.4em; height: 2.4em; object-fit: contain; flex: none; }

.result__img { display: block; width: 100%; max-width: 100%; aspect-ratio: 4 / 3; max-height: 42vh; object-fit: cover; object-position: 50% 30%; border-radius: .7em; border: 1px solid var(--line); }
.result h2 { font-size: 1.7em; text-shadow: 0 0 .5em var(--pink); }
.result__kicker { font-size: .85em; letter-spacing: .3em; color: var(--pink-soft); font-weight: 800; }
.stats { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .35em 1.4em; }
.stats dt { color: var(--ink-dim); }
.stats dd { margin: 0; font-weight: 800; text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: .4em; }
.tags span { padding: .2em .8em; border-radius: 2em; background: #1b2452; font-size: .85em; font-weight: 700; }

#rotate { position: absolute; inset: 0; z-index: 60; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 24px; background: var(--night-0); text-align: center; }
#rotate .ic { font-size: 56px; color: var(--pink-soft); }
#rotate p { margin: 0; font-size: 16px; font-weight: 700; line-height: 1.7; }

/* ---- スマホ縦持ち（1em = 見本画像の32px相当）。PCの縮小ではなく専用の配置 ---- */
[data-layout="sp"] .status { left: .62em; top: .87em; }
[data-layout="sp"] .status__face { width: 4.25em; height: 4.25em; border-radius: .36em; border-width: .06em; }
[data-layout="sp"] .status__body { margin-left: .3em; width: 9.3em; padding: .12em .45em .3em .4em; border-radius: .4em; }
[data-layout="sp"] .st-row { gap: .25em; }
[data-layout="sp"] .st-drunk span { font-size: max(.95em, 12px); }
[data-layout="sp"] .st-drunk b { font-size: max(1.25em, 15px); }
[data-layout="sp"] .bar { height: .62em; border-width: .05em; }
[data-layout="sp"] .bar--drunk { width: 100%; }
[data-layout="sp"] .bar--stamina { flex: 1; width: auto; height: .55em; }
[data-layout="sp"] .st-stamina .ic, [data-layout="sp"] .st-money .ic { font-size: .82em; }
[data-layout="sp"] .st-stamina span, [data-layout="sp"] .st-money span { font-size: max(.7em, 10px); margin-right: .1em; }
[data-layout="sp"] .st-money b { font-size: max(.95em, 12px); margin-left: auto; }
[data-layout="sp"] .pane { border-width: .05em; border-radius: .4em; }
[data-layout="sp"] .dist { left: 14.85em; right: auto; top: .87em; width: 6.8em; height: 2.65em; padding: 0 .3em; gap: .25em; }
[data-layout="sp"] .dist > .ic { font-size: 1.3em; }
[data-layout="sp"] .dist span { font-size: max(.5em, 9px); }
[data-layout="sp"] .dist small { font-size: max(.5em, 9px); }
[data-layout="sp"] .dist b { font-size: max(.82em, 13px); }
[data-layout="sp"] .clock { right: .3em; top: .87em; width: 5.4em; height: 2.4em; padding: 0 .2em; gap: .2em; }
[data-layout="sp"] .clock > .ic { font-size: .95em; }
[data-layout="sp"] .clock small { font-size: max(.45em, 8px); }
[data-layout="sp"] .clock b { font-size: max(.72em, 11.5px); }
[data-layout="sp"] .clock span { font-size: max(.48em, 9px); }
[data-layout="sp"] .hbtn--menu { right: .3em; top: 3.7em; width: 3.2em; height: 3.2em; }
[data-layout="sp"] .hbtn--menu .ic { font-size: 1.35em; }
[data-layout="sp"] .hbtn--menu span { font-size: max(.42em, 8px); }
[data-layout="sp"] .minimap { right: .55em; top: 7.3em; width: 9.5em; height: 9.5em; }
[data-layout="sp"] .rbtn { width: 4em; height: 4em; border-width: .06em; }
[data-layout="sp"] .rbtn .ic { font-size: 1.6em; }
[data-layout="sp"] .rbtn span { font-size: max(.5em, 9px); }
[data-layout="sp"] .rbtn--talk { left: .56em; right: auto; bottom: 13.9em; }
[data-layout="sp"] .rbtn--item { left: .56em; right: auto; bottom: 9.6em; }
[data-layout="sp"] .rbtn--dash { right: .53em; bottom: 8.85em; width: 4.1em; height: 4.1em; }
[data-layout="sp"] .stick { display: block; left: .62em; bottom: 2.06em; width: 6.9em; height: 6.9em; border-width: .05em; }
[data-layout="sp"] .stick i { border-width: .22em; }
[data-layout="sp"] .stick i:nth-child(1), [data-layout="sp"] .stick i:nth-child(2) { margin-left: -.22em; }
[data-layout="sp"] .stick i:nth-child(3), [data-layout="sp"] .stick i:nth-child(4) { margin-top: -.22em; }
[data-layout="sp"] kbd { display: none; }
[data-layout="sp"] #dialog { left: 8.1em; right: .7em; width: auto; bottom: 2.75em; min-height: 4.15em; gap: .5em; padding: .3em; border-radius: .45em; border-width: .05em; }
[data-layout="sp"] .dialog__face { width: 4.1em; height: 3.5em; border-radius: .28em; }
[data-layout="sp"] .dialog__body { padding: .1em 1em .1em 0; }
[data-layout="sp"] .dialog__name { font-size: max(.68em, 10px); }
[data-layout="sp"] .dialog__text { font-size: max(.75em, 12px); line-height: 1.4; }
[data-layout="sp"] .dialog__next { right: .6em; bottom: .5em; border-width: .34em; border-top-width: .5em; }
[data-layout="sp"][data-choice] .rbtn { opacity: 0; pointer-events: none; }
[data-layout="sp"] #choices { left: 1em; right: 1em; width: auto; bottom: 10.2em; gap: .35em; }
[data-layout="sp"] .choice { font-size: max(.8em, 14px); padding: .5em .9em; border-radius: .5em; }
[data-layout="sp"] #card { top: 30%; }
[data-layout="sp"] #card b { font-size: 1.9em; }
[data-layout="sp"] #card span { font-size: max(.8em, 13px); }
[data-layout="sp"] #toasts { top: 18.5em; }
[data-layout="sp"] .toast { font-size: max(.72em, 12px); }
[data-layout="sp"] .fx-text { font-size: max(.9em, 13px); }
[data-layout="sp"] #balance { top: 26%; width: 16em; padding: .4em .6em .5em; }
[data-layout="sp"] #balance p { font-size: max(.7em, 12px); margin-bottom: .4em; }
[data-layout="sp"] .bal { height: .7em; }
[data-layout="sp"] .bal i { width: .26em; height: 1.1em; top: -.2em; margin-left: -.13em; }
[data-layout="sp"] .bal-time { height: .2em; margin-top: .35em; }
[data-layout="sp"] #fade span { font-size: max(1em, 16px); }
[data-layout="sp"] .modal { padding: 12px; }

@media (prefers-reduced-motion: reduce) {
  .rbtn.is-ready, .dialog__next, .boot__moon { animation: none; }
  .bar > i, #fade { transition: none; }
}

/* ---- ミニゲーム ---- */
.mg-time { height: .45em; border-radius: 1em; background: rgba(255,255,255,.08); overflow: hidden; }
.mg-time i { display: block; height: 100%; background: var(--gold); transform-origin: 0 50%; }
.mg-time i.is-low { background: var(--warn); }
.mg-who { margin: 0; font-weight: 700; color: var(--ink) !important; }
.mg-bill { display: flex; justify-content: space-between; align-items: baseline; padding: .4em .8em; border-radius: .6em; background: #111a40; }
.mg-bill span { color: var(--ink-dim); font-weight: 700; }
.mg-bill b { font-size: 1.6em; font-weight: 800; }
.mg-bill--paid b { color: var(--gold); }
.mg-bill.is-short { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-.4em); } 75% { transform: translateX(.4em); } }
.mg-coins { display: grid; grid-template-columns: repeat(5, 1fr); gap: .45em; }
.mg-coin { min-height: 3.6em; border-radius: 50%; aspect-ratio: 1; max-width: 100%; border: 2px solid #c9a24a; background: radial-gradient(circle at 35% 30%, #fff1b8, #d4a63c 70%); color: #3a2a08; font-weight: 800; font-size: .9em; padding: 0; }
.mg-coin.is-bill { border-radius: .5em; aspect-ratio: auto; border-color: #8ab08a; background: linear-gradient(135deg, #e8f2df, #b9d3ad); color: #23402a; }
.mg-coin:is(:focus-visible, .is-focus), .mg-coin:hover { box-shadow: 0 0 0 3px var(--pink-soft); outline: none; }
.mg-coin.is-pop { animation: pop .18s; }
@keyframes pop { 50% { transform: scale(.88); } }
.is-wobble .mg-bill b, .is-wobble .mg-bubble { display: inline-block; animation: wob 1.7s ease-in-out infinite; }
@keyframes wob { 0%, 100% { transform: translateX(0) rotate(0); } 30% { transform: translateX(.15em) rotate(.6deg); } 70% { transform: translateX(-.15em) rotate(-.6deg); } }

.panel--phone { width: min(100%, 22em); background: #0b0f26; border-radius: 1.6em; border: 3px solid #2b3160; }
.mg-phone { display: flex; flex-direction: column; gap: .6em; }
.mg-phone__bar { display: flex; justify-content: space-between; font-size: .8em; color: var(--ink-dim); font-weight: 700; }
.mg-phone__from { font-weight: 800; color: var(--pink-soft); }
.mg-bubble { align-self: flex-start; max-width: 90%; padding: .6em .9em; border-radius: 1em 1em 1em .3em; background: #f2f0fa; color: #1d1b26; line-height: 1.55; }
.mg-phone__ask { margin: .3em 0 0 !important; font-size: .85em; font-weight: 700; }
.mg-replies { display: flex; flex-direction: column; gap: .4em; }
.mg-replies .mbtn { justify-content: flex-end; text-align: right; background: #3a1f4e; border-color: #7a4a9a; }

.mg-field { position: relative; height: 13em; border-radius: .8em; background: radial-gradient(ellipse at 50% 120%, #3b2f5c, #151a38 70%); overflow: hidden; }
.mg-item { position: absolute; width: 23%; max-width: 6em; display: flex; flex-direction: column; align-items: center; gap: .1em; padding: .25em; border-radius: .6em; background: rgba(255,255,255,.06); border: 1.5px solid transparent; min-height: 44px; }
.mg-item img { width: 3em; height: 3em; object-fit: contain; pointer-events: none; }
.mg-item span { font-size: .72em; font-weight: 700; white-space: nowrap; }
.mg-item:is(:focus-visible, .is-focus), .mg-item:hover { border-color: var(--pink-soft); background: rgba(255,79,163,.18); outline: none; }
.mg-item.is-got { opacity: 0; transform: scale(.4) translateY(-1em); transition: opacity .25s, transform .25s; }
.is-drift .mg-item:not(.is-got) { animation: drift var(--d) ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(-.5em, .2em) rotate(-4deg); } to { transform: translate(.5em, -.3em) rotate(4deg); } }

/* ---- END一覧 ---- */
.title__ends { position: absolute; text-decoration: none; display: flex; align-items: center; gap: .4em; padding: .3em .9em; border-radius: 2em; background: rgba(11, 13, 28, .85); border: 1.5px solid rgba(255,154,200,.7); color: #fff; font-weight: 800; white-space: nowrap; }
.title__ends:hover, .title__ends:is(:focus-visible, .is-focus) { box-shadow: 0 0 .8em rgba(255,79,163,.8); outline: none; }
.ends { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5em, 1fr)); gap: .8em; }
.end-card { display: flex; flex-direction: column; gap: .3em; padding: 0; border-radius: .7em; overflow: hidden; background: #111a40; border: 1.5px solid var(--line); text-align: left; }
.end-card img, .end-card .end-card__q { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: grid; place-items: center; background: #1b2147; color: #6c74a8; font-size: 2em; font-weight: 800; }
.end-card b { padding: 0 .7em; font-size: .95em; }
.end-card small { padding: 0 .7em .7em; color: var(--ink-dim); font-size: .8em; line-height: 1.5; }
.end-card:is(:focus-visible, .is-focus), .end-card:hover { border-color: var(--pink-soft); outline: none; }
.end-view img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: .7em; }

/* =====================================================================
   見た目のテーマ（場面ごとに使い分け）
   - 会話の選択肢・タイトル・ふつうのボタン … 飲み屋街のネオン看板
   - 一時停止メニュー … 主人公のスマホのロック画面
   - アイテム … ピンクのバッグの中
   - お会計・リザルト … お店のレシート
   ===================================================================== */
:root { --tube: #8f3d6b; --tube-hi: #ff7cc0; --tube-bg: rgba(20, 6, 18, .66); --tube-ink: #ebb8d2; --sign: #b98cff; --cyan: #3fd8ff; --font-receipt: "DotGothic16", "MS Gothic", monospace; }
@keyframes flick { 0%, 91%, 100% { opacity: 1; } 92% { opacity: .55; } 93% { opacity: 1; } 95% { opacity: .72; } 96% { opacity: 1; } }

/* ---- ネオン管のボタン ---- */
.choice, .mbtn, .seg button {
  border-radius: 2em; background: var(--tube-bg); border: .12em solid var(--tube); color: var(--tube-ink);
  box-shadow: 0 0 .35em rgba(255, 79, 163, .28); letter-spacing: .04em;
}
.choice { padding-left: 2.1em; }
.choice:is(.is-focus, :focus-visible), .choice:not(:disabled):hover,
.mbtn:is(.is-focus, :focus-visible), .mbtn:not(:disabled):hover,
.seg button:is(.is-focus, :focus-visible) {
  background: rgba(52, 8, 38, .78); border-color: var(--tube-hi); color: #fff4fa; outline: none;
  box-shadow: 0 0 .3em #ff4fa3, 0 0 .9em #ff4fa3, 0 0 1.8em rgba(255, 79, 163, .45), inset 0 0 .6em rgba(255, 79, 163, .5);
  text-shadow: 0 0 .2em #fff, 0 0 .55em #ff4fa3;
}
.choice:is(.is-focus, :focus-visible), .mbtn:is(.is-focus, :focus-visible) { animation: flick 3.4s linear infinite; }
.choice:disabled, .mbtn:disabled { background: rgba(12, 8, 18, .72); border-color: #3e2438; color: #6b4a63; box-shadow: none; text-shadow: none; }
/* 押せない項目には「札」を下げる */
.choice small { padding: .18em .6em; border-radius: .25em; background: #f1e3c2; color: #5a3a22; font-size: .66em; letter-spacing: .06em; transform: rotate(4deg); box-shadow: 0 .15em .3em rgba(0, 0, 0, .5); }
/* 選択中の目印：黄色いネオンの矢印 */
.choice.is-focus > span::before { left: -1.25em; border-left-color: #ffe14a; filter: drop-shadow(0 0 .25em #ffd84a); }
.mbtn--primary { background: rgba(60, 10, 44, .8); border-color: var(--tube-hi); color: #fff; box-shadow: 0 0 .5em rgba(255, 79, 163, .55); }
.mbtn--ghost { background: transparent; border-color: rgba(63, 216, 255, .45); color: #bdefff; box-shadow: none; }
.mbtn small { color: inherit; opacity: .7; }
.seg button { border-radius: 2em; }
.seg button[aria-pressed="true"] { background: rgba(60, 10, 44, .85); border-color: var(--tube-hi); color: #fff; box-shadow: 0 0 .5em rgba(255, 79, 163, .6); }

/* 酔いが深いと、選択肢の文字がゆらゆらする（設定の「酔いの演出：なし」で止まる） */
[data-lv="4"]:not([data-fx="off"]) .choice > span, [data-lv="5"]:not([data-fx="off"]) .choice > span { display: inline-block; animation: wob 2.4s ease-in-out infinite; }
[data-lv="5"]:not([data-fx="off"]) .choice > span { animation-duration: 1.6s; }

/* ---- 会話の枠：紫のネオン看板 ---- */
#dialog { background: rgba(8, 4, 20, .88); border: .12em solid var(--sign); border-radius: 1em; box-shadow: 0 0 .3em #a86bff, 0 0 1.2em rgba(168, 107, 255, .55), inset 0 0 .8em rgba(168, 107, 255, .3); }
.dialog__face { border: .1em solid var(--tube-hi); box-shadow: 0 0 .5em rgba(255, 79, 163, .55); }
.dialog__name { color: #8ff5ff; text-shadow: 0 0 .45em var(--cyan); letter-spacing: .12em; }

/* ---- 重ねる画面：暗いガラスにネオンの縁 ---- */
.panel { background: rgba(10, 6, 22, .95); border: .12em solid var(--sign); box-shadow: 0 0 .35em #a86bff, 0 0 1.4em rgba(168, 107, 255, .4); }
.panel__head { border-bottom-color: rgba(185, 140, 255, .3); }
.panel__head h2 { color: #e6fbff; text-shadow: 0 0 .25em #fff, 0 0 .7em var(--cyan); }
.set h3 { color: #ff9ac8; text-shadow: 0 0 .5em rgba(255, 79, 163, .6); }

/* ---- タイトルのボタン ---- */
.tbtn { background: rgba(14, 6, 24, .82); border-color: var(--tube); color: var(--tube-ink); box-shadow: 0 0 .5em rgba(255, 79, 163, .3); }
.tbtn--primary { background: rgba(60, 10, 44, .85); border-color: var(--tube-hi); color: #fff; box-shadow: 0 0 .6em rgba(255, 79, 163, .7), inset 0 0 .6em rgba(255, 79, 163, .35); }
.tbtn:not(:disabled):hover, .tbtn:is(:focus-visible, .is-focus) {
  background: rgba(52, 8, 38, .9); border-color: var(--tube-hi); color: #fff4fa; outline: none;
  box-shadow: 0 0 .3em #ff4fa3, 0 0 1em #ff4fa3, 0 0 2em rgba(255, 79, 163, .5), inset 0 0 .6em rgba(255, 79, 163, .5);
  text-shadow: 0 0 .2em #fff, 0 0 .55em #ff4fa3;
}
.tbtn:is(:focus-visible, .is-focus) { animation: flick 3.4s linear infinite; }
.tbtn:disabled { background: rgba(12, 8, 18, .8); border-color: #3e2438; color: #6b4a63; box-shadow: none; }

/* ---- 一時停止メニュー：スマホのロック画面 ---- */
.modal .panel--smart { width: min(100%, 21em); max-height: 100%; padding: .55em; background: #f2b8cf; border: 0; border-radius: 2.6em; box-shadow: 0 1.5em 3em rgba(0, 0, 0, .7), inset 0 0 0 .12em #ffd6e6; transform: rotate(-1.5deg); }
.panel--smart .panel__body { border-radius: 2.1em; padding: .9em .85em .55em; gap: .55em; color: #fff; overflow-y: auto;
  background: radial-gradient(circle at 86% 19%, rgba(255, 216, 74, .85) 0 .7em, rgba(255, 216, 74, .15) .75em 1.5em, transparent 1.6em), linear-gradient(#2b1f57, #120f2a 70%); }
.sp-bar { display: flex; justify-content: space-between; align-items: center; padding: 0 .7em; font-size: .72em; font-weight: 700; }
.sp-bat { display: flex; align-items: center; gap: .35em; }
.sp-bat i { position: relative; width: 1.9em; height: .9em; border: .12em solid currentColor; border-radius: .2em; }
.sp-bat b { position: absolute; left: .1em; top: .1em; bottom: .1em; max-width: calc(100% - .2em); background: currentColor; border-radius: .08em; }
.sp-bat.is-low { color: #ff8a7a; }
.sp-lock { text-align: center; padding: .5em 0 .4em; }
.sp-date { font-size: .85em; font-weight: 700; color: #e9e6ff; }
.sp-time { font-size: 3.6em; font-weight: 500; line-height: 1.05; letter-spacing: .02em; }
.sp-time small { font-size: .26em; margin-left: .3em; font-weight: 700; }
.sp-sub { font-size: .75em; font-weight: 700; color: #ffd0e3; }
.sp-list { display: flex; flex-direction: column; gap: .45em; }
.sp-note { display: flex; align-items: center; gap: .7em; min-height: 3.1em; padding: .4em .7em; text-align: left; border: 0; border-radius: 1.1em; background: rgba(255, 255, 255, .17); color: #fff; font-weight: 700; transition: transform .12s; }
.sp-note > span { display: flex; flex-direction: column; line-height: 1.3; }
.sp-note small { font-size: .72em; font-weight: 500; color: #ddd6f0; }
.sp-app { width: 2.1em; height: 2.1em; flex: none; border-radius: .6em; background: var(--c); display: grid; place-items: center; color: #fff; }
.sp-app .ic { width: 1.15em; height: 1.15em; }
.sp-note:is(.is-focus, :focus-visible), .sp-note:hover { background: #fff; color: #2a1f3d; outline: none; transform: scale(1.03); box-shadow: 0 0 0 .18em #ff4fa3, 0 .35em .9em rgba(255, 79, 163, .45); }
.sp-note:is(.is-focus, :focus-visible) small, .sp-note:hover small { color: #7d7398; }
.sp-hint { margin: 0 !important; font-size: .68em; text-align: center; color: #cfc8e8 !important; line-height: 1.5 !important; }
.sp-home { display: block; align-self: center; width: 6.5em; height: .28em; margin-top: .2em; border-radius: 1em; background: rgba(255, 255, 255, .7); flex: none; }

/* スマホ確認ミニゲームも同じスマホに */
.panel--phone { background: #1a1438; border: .5em solid #f2b8cf; border-radius: 2.2em; box-shadow: 0 1.5em 3em rgba(0, 0, 0, .7); }
.mg-replies .mbtn { justify-content: flex-end; text-align: right; background: #fff; border: 0; color: #3a3356; border-radius: 1.2em 1.2em .35em 1.2em; box-shadow: none; text-shadow: none; animation: none; }
.mg-replies .mbtn:is(.is-focus, :focus-visible), .mg-replies .mbtn:hover { background: #ff4fa3; color: #fff; box-shadow: 0 0 0 .2em rgba(255, 79, 163, .3), 0 .3em .7em rgba(255, 79, 163, .45); text-shadow: none; }

/* ---- アイテム：ピンクのバッグの中 ---- */
.modal .panel--bag { position: relative; width: min(100%, 40em); max-height: calc(100% - 2.4em); margin-top: 2.4em; padding: .75em; overflow: visible; background: #f4a6c6; border: 0; border-radius: 2em 2em 4em 4em; box-shadow: 0 1.5em 3em rgba(0, 0, 0, .6); }
.panel--bag::before { content: ""; position: absolute; left: 50%; top: -2.5em; width: 14em; height: 3.4em; margin-left: -7em; border: .7em solid #e889b2; border-bottom: 0; border-radius: 7em 7em 0 0; box-sizing: border-box; }
.panel--bag .panel__body { background: #4a2240; border: .15em dashed rgba(255, 255, 255, .7); border-radius: 1.5em 1.5em 3.4em 3.4em; padding: .9em 1.1em 1.3em; gap: .8em; overflow-y: auto; }
.bag-head { display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.bag-head h2 { margin: 0; font: 400 1.5em var(--font-hand); color: #ffd6e8; }
.bag-head .mbtn--ghost { color: #ffd6e8; border-color: rgba(255, 214, 232, .5); }
.bag-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.2em, 1fr)); gap: .7em; }
.bag-it { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; min-height: 7.2em; padding: .5em .3em; border: 0; border-radius: .9em; background: rgba(255, 255, 255, .1); color: #fbe8f1; font-size: .9em; font-weight: 700; transition: transform .12s; }
.bag-it img { width: 4em; height: 4em; object-fit: contain; pointer-events: none; }
.bag-it span { line-height: 1.25; text-align: center; }
.bag-it b { position: absolute; right: .45em; top: .3em; color: #ffd84a; font-weight: 800; }
.bag-it:is(.is-focus, :focus-visible), .bag-it:hover { background: #fff4f9; color: #4a2240; outline: none; transform: translateY(-.35em) rotate(-2deg); box-shadow: 0 0 0 .18em #ff4fa3, 0 .6em 1em rgba(0, 0, 0, .45); }
.bag-it:is(.is-focus, :focus-visible) b, .bag-it:hover b { color: #e2357e; }
.bag-desc { display: flex; flex-direction: column; gap: .1em; padding: .6em .9em; border-radius: .7em; background: #fff4f9; color: #4a2240; }
.bag-desc b { font-size: 1.05em; }
.bag-desc span { font-size: .85em; font-weight: 700; color: #8a4a72; }
.bag-desc i { font: 400 .95em var(--font-hand); color: #6a4a5e; }
.bag-pocket { display: flex; flex-wrap: wrap; align-items: center; gap: .5em .9em; padding: .6em .9em; background: rgba(0, 0, 0, .25); border-radius: 1em 1em 2.6em 2.6em; }
.bag-pocket em { font-style: normal; font-size: .75em; font-weight: 800; color: #ffb3d1; letter-spacing: .1em; }
.bag-pocket span { display: flex; flex-direction: column; align-items: center; font-size: .72em; font-weight: 700; color: #f2d4e2; }
.bag-pocket img { width: 2.6em; height: 2.6em; object-fit: contain; }
.bag-empty { font: 400 1.05em var(--font-hand) !important; color: #e7bfd3 !important; }

/* ---- レシート（お会計・リザルト共通） ---- */
.receipt {
  display: flex; flex-direction: column; gap: .25em; padding: 1.2em 1.3em 1.9em; background: #fbfaf5; color: #2a2622; font-family: var(--font-receipt);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - .6em), 95% 100%, 90% calc(100% - .6em), 85% 100%, 80% calc(100% - .6em), 75% 100%, 70% calc(100% - .6em), 65% 100%, 60% calc(100% - .6em), 55% 100%, 50% calc(100% - .6em), 45% 100%, 40% calc(100% - .6em), 35% 100%, 30% calc(100% - .6em), 25% 100%, 20% calc(100% - .6em), 15% 100%, 10% calc(100% - .6em), 5% 100%, 0 calc(100% - .6em));
}
.rc-shop { text-align: center; font-size: 1.25em; letter-spacing: .1em; }
.rc-small { text-align: center; font-size: .75em; color: #6b655d; }
.rc-cut { border-top: .12em dashed #b8b1a6; margin: .45em 0; }
.rc-line { display: flex; align-items: baseline; gap: .4em; }
.rc-line i { flex: 1; border-bottom: .12em dotted #9a938a; transform: translateY(-.3em); }
.rc-sub { font-size: .8em; color: #6b655d; padding-left: .6em; }
.rc-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.35em; }
.rc-hand, .rc-thanks { text-align: center; padding-top: .5em; font: 400 1.05em var(--font-hand); color: #c8323c; transform: rotate(-2deg); }
.rc-note { margin: .3em 0 0 !important; font-size: .8em; color: #2f6fb8 !important; text-align: center; }
.rc-badges { display: flex; flex-wrap: wrap; gap: .3em; padding-top: .4em; }
.rc-badges span { padding: .1em .6em; border: .1em solid #e2357e; border-radius: 2em; color: #e2357e; font-size: .78em; }

/* リザルト：写真の下にその夜のレシート */
.result .panel__body { align-items: center; }
.result .result__img { border-color: var(--sign); }
.result .receipt { width: min(100%, 26em); transform: rotate(-.8deg); }
.result .rc-title { margin: .2em 0 0; text-align: center; font: 800 1.45em var(--font-ui); color: #2a2622; text-shadow: none; }
.result .rc-text { margin: 0; font: 500 .9em/1.65 var(--font-ui); color: #4a443c; }
.result .row { width: min(100%, 26em); }

/* お会計：左にレシート、右にお金を置くトレー */
.mg-pay { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 1.4em; align-items: start; }
[data-layout="sp"] .mg-pay { grid-template-columns: minmax(0, 1fr); gap: .8em; }
.receipt--pay { transform: rotate(-1.5deg); }
.rc-diff[data-state="short"] b { color: #b3262f; }
.rc-diff[data-state="exact"] b { color: #e2357e; }
.rc-diff[data-state="over"] b { color: #2f6fb8; }
.rc-diff.is-short { animation: shake .35s; }
.is-wobble .rc-total b { display: inline-block; animation: wob 1.7s ease-in-out infinite; }
.pay-side { display: flex; flex-direction: column; gap: .8em; min-width: 0; }
.mg-who { font: 400 1.15em var(--font-hand); color: #ffe6f3 !important; }
.tray { position: relative; height: 6.5em; border-radius: 1.2em; overflow: hidden; background: #2f6fb8; box-shadow: inset 0 .35em 0 rgba(255, 255, 255, .25), inset 0 -.6em 1em rgba(0, 0, 0, .3); }
.tray em { position: absolute; left: .9em; top: .5em; font-style: normal; font-size: .7em; font-weight: 800; color: #cfe3ff; letter-spacing: .1em; }
.tray-coin { position: absolute; left: 50%; top: 55%; width: 2.7em; height: 2.7em; margin: -1.35em 0 0 -1.35em; border-radius: 50%; display: grid; place-items: center; font-size: .85em; font-weight: 800; transform: translate(var(--x), var(--y)) rotate(var(--r)); box-shadow: inset 0 -.18em 0 rgba(0, 0, 0, .18), 0 .15em .3em rgba(0, 0, 0, .4); animation: coin-drop .2s ease-out; }
.tray-coin.c1000 { width: 4.6em; height: 2.4em; margin: -1.2em 0 0 -2.3em; border-radius: .3em; }
@keyframes coin-drop { from { scale: 1.5; } }
.mg-coins { align-items: center; justify-items: center; }
.mg-coin { width: 100%; max-width: 4.2em; min-height: 44px; border: 0; color: #3a2a08; box-shadow: inset 0 -.2em 0 rgba(0, 0, 0, .18), 0 .2em .4em rgba(0, 0, 0, .4); transition: transform .1s; }
.mg-coin.c1000, .tray-coin.c1000 { background: #c7d9b9; color: #3d5a32; }
.mg-coin.c1000 { border-radius: .35em; aspect-ratio: 1.7; max-width: 5em; }
.c500 { background: #e8c45a; color: #6d531a; }
.c100, .c50 { background: #d9dde4; color: #5d6470; }
.mg-coin.c50 { max-width: 3.6em; }
.c10 { background: #c97a4a; color: #fff3e6; }
.mg-coin:is(.is-focus, :focus-visible), .mg-coin:hover { outline: none; transform: translateY(-.2em); box-shadow: 0 0 0 .15em #4a0f2a, 0 0 0 .32em #ff4fa3, 0 0 .9em rgba(255, 79, 163, .8); }

@media (prefers-reduced-motion: reduce) {
  .choice, .mbtn, .tbtn, .choice > span { animation: none !important; }
}
