/* 屋台ラーメン繁盛記 — 朱×墨×生成り。昭和の屋台の看板・暖簾・仕入れ帳・木札 */
:root {
  --shu: #d23a1e;          /* 朱（装飾・大きな文字） */
  --shu-btn: #ad2c14;      /* 朱（ボタン地。生成りの文字で 5:1） */
  --shu-deep: #7d1d0c;
  --sumi: #15110e;
  --sumi-2: #221a15;
  --sumi-3: #30251d;
  --kinari: #f3e6c8;       /* 生成り */
  --kinari-2: #e5d3a6;
  --kinari-mute: #cbb994;  /* 墨地の上の控えめな文字 */
  --ink-mute: #5f4b39;     /* 生成り地の上の控えめな文字 */
  --akari: #f0b44a;        /* ちょうちんの灯 */
  --wood: #5a3a22;
  --wood-2: #3e281a;

  --f-sign: 'Dela Gothic One', 'Zen Kaku Gothic New', sans-serif;
  --f-body: 'Zen Kaku Gothic New', 'Hiragino Sans', 'Yu Gothic', sans-serif;
  --f-num: 'Big Shoulders Display', 'Zen Kaku Gothic New', sans-serif;

  --r-s: 4px;
  --r-m: 8px;
  --r-l: 14px;
  --sh-1: 0 2px 0 rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .35);
  --t-press: 90ms;
  --t-screen: 240ms;
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.3, 1.6, .5, 1);

  --tab-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #0b0807; }
body {
  font-family: var(--f-body);
  color: var(--kinari);
  font-size: 15px;
  line-height: 1.6;
  line-break: strict;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "palt" 0;
}
@media (min-width: 600px) {
  body {
    background:
      radial-gradient(60% 40% at 50% 10%, rgba(210, 58, 30, .22), transparent 70%),
      repeating-linear-gradient(90deg, #120d0a 0 28px, #0e0a08 28px 30px), #0b0807;
  }
}
button, a { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
a { text-decoration: none; }
svg { width: 1em; height: 1em; flex: none; }
img { display: block; max-width: 100%; }
.num { font-family: var(--f-num); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.nowrap { white-space: nowrap; }
h1, h2, h3 { font-feature-settings: "palt"; word-break: keep-all; margin: 0; }
p { margin: 0; }

.app {
  position: fixed; inset: 0; margin: 0 auto; max-width: 430px;
  background: var(--sumi); overflow: hidden; overflow: clip;
}
@media (min-width: 600px) { .app { box-shadow: 0 0 0 1px #2a1f18, 0 30px 80px rgba(0, 0, 0, .6); } }

.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  background: var(--sumi);
}
.screen.is-on { display: flex; }
.screen.is-enter { animation: scr-in var(--t-screen) var(--ease-out); }
.screen.is-enter-back { animation: scr-back var(--t-screen) var(--ease-out); }
@keyframes scr-in { from { opacity: 0; transform: translateX(18px); } }
@keyframes scr-back { from { opacity: 0; transform: translateX(-18px); } }
.scroll { flex: 1; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.has-tabs .scroll { padding-bottom: calc(var(--tab-h) + var(--safe-b) + 24px); }

/* ---------- ボタン ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 20px; border-radius: var(--r-m);
  font-weight: 900; font-size: 16px; letter-spacing: .04em; word-break: keep-all;
  transition: transform var(--t-press) ease, filter var(--t-press) ease, box-shadow var(--t-press) ease;
  user-select: none; -webkit-user-select: none;
}
.btn svg { font-size: 22px; }
.btn:active { transform: translateY(2px) scale(.98); }
.btn--xl { min-height: 64px; font-size: 20px; width: 100%; }
.btn--l { min-height: 54px; width: 100%; }
.btn--s { min-height: 44px; padding: 0 14px; font-size: 15px; }
.btn--shu {
  background: var(--shu-btn); color: var(--kinari);
  box-shadow: 0 4px 0 var(--shu-deep), 0 10px 24px rgba(173, 44, 20, .35);
}
.btn--shu:active { box-shadow: 0 2px 0 var(--shu-deep); }
.btn--shu[disabled], .btn--shu.is-off { background: var(--sumi-3); color: var(--kinari-mute); box-shadow: 0 3px 0 #120d0a; }
.btn--gold { background: var(--akari); color: var(--sumi); box-shadow: 0 4px 0 #a5721d; }
.btn--ghost { background: var(--sumi-2); color: var(--kinari); box-shadow: inset 0 0 0 2px var(--sumi-3); }
.btn--danger { background: #8f1d0d; color: #fff3e6; box-shadow: 0 4px 0 #4f0f06; }
.icon-btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--sumi-2); color: var(--kinari); font-size: 22px;
  box-shadow: inset 0 0 0 1.5px var(--sumi-3); transition: transform var(--t-press);
}
.icon-btn:active { transform: scale(.92); }

/* ---------- タイトル ---------- */
.screen--title {
  background: #0d0a14 url(/app-development/apps/a009/img/title.webp) center bottom / cover no-repeat;
  padding: calc(var(--safe-t) + 10px) 20px calc(var(--safe-b) + 22px);
}
.screen--title::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 6, 12, .25) 0%, transparent 35%, rgba(10, 7, 6, .0) 55%, rgba(10, 7, 6, .85) 100%);
}
.title__top { position: relative; display: flex; justify-content: flex-end; }
.title__logo { position: relative; margin-top: 4vh; text-align: center; }
.title__kicker {
  display: inline-block; padding: 4px 12px; border-radius: 99px; background: var(--sumi);
  color: var(--akari); font-weight: 900; font-size: 14px; letter-spacing: .14em; word-break: keep-all;
}
.logo { display: flex; flex-direction: column; align-items: center; margin-top: 10px; font-family: var(--f-sign); font-weight: 400; line-height: 1; }
.logo__sm { font-size: clamp(26px, 8.4vw, 34px); color: var(--kinari); letter-spacing: .12em; text-shadow: 0 3px 0 #000, 0 0 18px rgba(0, 0, 0, .9); }
.logo__lg {
  margin-top: 8px; font-size: clamp(64px, 22vw, 92px); color: var(--shu); letter-spacing: .04em;
  text-shadow: 0 4px 0 #3b0c04, 0 0 30px rgba(240, 120, 60, .45), 0 0 2px #000;
  -webkit-text-stroke: 1.5px #3b0c04;
}
.hanko {
  position: absolute; right: 3%; top: 74%; display: grid; grid-template-columns: 1fr; place-items: center;
  width: 46px; padding: 5px 0; border: 2.5px solid var(--kinari); border-radius: 6px; background: var(--shu-btn);
  color: var(--kinari); font-family: var(--f-sign); font-size: 15px; line-height: 1.12; transform: rotate(8deg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
}
.title__bottom { position: relative; margin-top: auto; display: grid; gap: 12px; }
.save-card {
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0 12px;
  padding: 12px 16px; border-radius: var(--r-m); background: var(--sumi); box-shadow: inset 0 0 0 1.5px var(--wood);
}
.save-card__k { grid-column: 1 / -1; font-size: 12px; font-weight: 700; color: var(--kinari-mute); letter-spacing: .1em; }
.save-card__v { font-weight: 900; font-size: 16px; word-break: keep-all; }
.save-card__m { font-size: 14px; white-space: nowrap; color: var(--akari); font-weight: 700; }
.save-card__m .num, .save-card__m span:first-child { font-family: var(--f-num); font-size: 26px; font-weight: 800; }
.title__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.title__sub .btn { font-size: 15px; padding: 0 10px; }

/* ---------- 店 ---------- */
.screen--shop { background: #0e0b10; }
.shop__bg {
  position: absolute; inset: 0; background: #0e0b10 center 42% / cover no-repeat;
  transition: opacity .5s;
}
.shop__bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 12, .55) 0%, rgba(10, 8, 12, 0) 28%, rgba(10, 8, 12, 0) 52%, rgba(12, 8, 6, .82) 74%, #0f0a08 100%);
}
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

.board {
  position: relative; z-index: 4; display: flex; align-items: stretch; gap: 10px;
  margin: calc(var(--safe-t) + 10px) 12px 0; padding: 10px 10px 10px 16px;
  border-radius: var(--r-m); background: var(--sumi);
  box-shadow: inset 0 0 0 2px var(--wood), inset 0 0 0 5px var(--sumi), inset 0 0 0 6px #4a3020, 0 10px 24px rgba(0, 0, 0, .5);
}
.board__main { flex: 1; min-width: 0; }
.board__k { font-size: 12px; font-weight: 700; letter-spacing: .2em; color: var(--kinari-mute); }
.board__money { display: flex; align-items: baseline; gap: 4px; line-height: 1; margin-top: 2px; white-space: nowrap; }
.board__money .num { font-size: 46px; color: var(--kinari); font-weight: 900; transition: color .2s; }
.board__money.is-bump .num { animation: bump .22s var(--ease-spring); }
@keyframes bump { 40% { transform: scale(1.06); color: var(--akari); } }
.board__money .num { display: inline-block; transform-origin: left 70%; }
.board__yen { font-family: var(--f-sign); font-size: 18px; color: var(--akari); }
.board__rate { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--kinari-mute); }
.board__rate .num { font-size: 17px; color: var(--akari); }
.board__sep { width: 1px; height: 12px; background: var(--sumi-3); }
.board__side { display: flex; flex-direction: column; gap: 8px; }

.rank {
  position: relative; z-index: 4; margin: 8px 12px 0; padding: 9px 12px 10px;
  border-radius: var(--r-m); background: var(--sumi-2);
}
.rank__head { display: flex; align-items: baseline; gap: 10px; }
.rank__no { flex: none; font-weight: 900; font-size: 13px; color: var(--akari); white-space: nowrap; }
.rank__no .num { font-size: 20px; }
.rank__no small { font-size: 13px; color: var(--kinari-mute); }
.rank__name { font-weight: 900; font-size: 15px; word-break: keep-all; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank__bar { position: relative; height: 8px; margin-top: 7px; border-radius: 99px; background: #0f0b09; overflow: hidden; }
.rank__bar i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--shu), var(--akari)); transition: width .3s; }
.rank__bar--light { background: var(--kinari-2); }
.rank__next { margin-top: 5px; font-size: 13px; font-weight: 700; color: var(--kinari-mute); }
.rank__next .num { font-size: 16px; color: var(--kinari); }
.rank__go { display: none; width: 100%; margin-top: 8px; min-height: 46px; animation: glow 1.4s ease-in-out infinite; }
.rank.is-ready .rank__next { display: none; }
.rank.is-ready .rank__go { display: flex; }
@keyframes glow { 50% { box-shadow: 0 4px 0 #a5721d, 0 0 26px rgba(240, 180, 74, .65); } }

.phone {
  position: absolute; z-index: 5; left: 16px; top: 44%; display: none; flex-direction: column; align-items: center; gap: 4px;
  width: 92px; padding: 8px 0 6px;
}
.phone.is-on { display: flex; animation: phone-in .35s var(--ease-spring); }
.phone__svg { width: 64px; height: 64px; animation: ring .5s linear infinite; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .6)); }
.phone__label { padding: 3px 10px; border-radius: 99px; background: var(--shu-btn); color: var(--kinari); font-size: 13px; font-weight: 900; white-space: nowrap; }
.phone__ring { position: absolute; top: 6px; width: 70px; height: 70px; border-radius: 50%; pointer-events: none; }
.phone__ring i { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--akari); opacity: 0; animation: ripple 1s ease-out infinite; }
.phone__timer { position: absolute; left: 6px; right: 6px; bottom: -6px; height: 4px; border-radius: 9px; background: var(--sumi); overflow: hidden; }
.phone__timer i { position: absolute; inset: 0; background: var(--akari); transform-origin: left; }
@keyframes phone-in { from { transform: scale(.4); opacity: 0; } }
@keyframes ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-9deg); } 20%, 40% { transform: rotate(9deg); } }
@keyframes ripple { from { transform: scale(.7); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }

.counter {
  position: relative; z-index: 4; margin-top: auto; display: flex; flex-direction: column; align-items: center;
  padding-bottom: 6px;
}
.order {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 6px; border-radius: 99px;
  background: var(--sumi); box-shadow: inset 0 0 0 1.5px var(--wood); font-weight: 900; font-size: 15px; white-space: nowrap;
}
.order__k { padding: 1px 8px; border-radius: 99px; background: var(--kinari); color: var(--sumi); font-size: 12px; letter-spacing: .1em; }
.bowl {
  position: relative; width: min(64vw, 30dvh, 260px); aspect-ratio: 240 / 190; margin-top: 4px;
  touch-action: manipulation; cursor: pointer; transform-origin: 50% 70%;
}
.bowl__svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .55)); }
.bowl.is-hit { animation: bowl-hit .16s ease-out; }
.bowl.is-serve { animation: bowl-serve .42s var(--ease-out) forwards; }
.bowl.is-new { animation: bowl-new .3s var(--ease-spring); }
@keyframes bowl-hit { 0% { transform: scale(1); } 35% { transform: scale(1.06, .93); } 100% { transform: scale(1); } }
@keyframes bowl-serve { 0% { transform: scale(1.12); } 18% { transform: scale(1.12); } 100% { transform: translate(70%, -10%) scale(.5); opacity: 0; } }
@keyframes bowl-new { from { transform: translateX(-40%) scale(.7); opacity: 0; } }
.b-tare, .b-soup, .b-men, .b-gu { opacity: 0; transition: opacity .12s, transform .25s var(--ease-spring); transform-box: fill-box; transform-origin: center; }
.bowl[data-step="1"] .b-tare, .bowl[data-step="2"] .b-tare, .bowl[data-step="3"] .b-tare, .bowl[data-step="4"] .b-tare { opacity: 1; }
.bowl[data-step="2"] .b-soup, .bowl[data-step="3"] .b-soup, .bowl[data-step="4"] .b-soup { opacity: 1; }
.bowl[data-step="3"] .b-men, .bowl[data-step="4"] .b-men { opacity: 1; }
.bowl[data-step="4"] .b-gu { opacity: 1; }
.bowl[data-step="0"] .b-gu, .bowl[data-step="0"] .b-men { transform: translateY(-14px) scale(1.06); }
.bowl__hit { position: absolute; left: 50%; top: 34%; width: 10px; height: 10px; border-radius: 50%; pointer-events: none; }
.steps { display: flex; gap: 8px; margin-top: 2px; }
.steps i { width: 26px; height: 6px; border-radius: 9px; background: var(--sumi-3); transition: background .1s; }
.steps i.is-on { background: var(--akari); }
.per-bowl { margin-top: 6px; padding: 2px 12px; border-radius: 99px; background: var(--sumi); font-size: 13px; font-weight: 700; color: var(--kinari-mute); }
.per-bowl .num { font-size: 17px; color: var(--kinari); }

.pops { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.pop {
  position: absolute; left: 0; top: 0; padding: 2px 10px; border-radius: 99px; background: var(--sumi);
  color: var(--akari); font-family: var(--f-num); font-weight: 900; font-size: 22px; white-space: nowrap;
  box-shadow: inset 0 0 0 1.5px var(--akari); will-change: transform, opacity;
}
.pop--big { font-size: 28px; background: var(--shu-btn); color: var(--kinari); box-shadow: none; }
.pop small { font-family: var(--f-body); font-size: 13px; font-weight: 900; margin-left: 2px; }

.tip {
  position: relative; z-index: 4; display: flex; align-items: center; gap: 10px;
  margin: 4px 12px calc(var(--tab-h) + var(--safe-b) + 10px); padding: 8px 8px 8px 12px;
  border-radius: var(--r-m); background: var(--sumi-2); box-shadow: inset 0 0 0 1.5px var(--sumi-3);
}
.tip__body { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.tip__ico { width: 36px; height: 36px; padding: 7px; border-radius: 50%; background: var(--kinari); color: var(--sumi); }
.tip__k { font-size: 12px; font-weight: 700; color: var(--kinari-mute); }
.tip__v { font-size: 15px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tip .btn { flex: none; min-width: 104px; }
.tip.is-pulse { animation: tip-pulse .5s var(--ease-spring); }
@keyframes tip-pulse { 40% { transform: scale(1.03); } }

/* ---------- 暖簾のタブバー ---------- */
.noren {
  position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; display: none;
  grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 7px 8px calc(var(--safe-b) + 6px);
  background: linear-gradient(180deg, rgba(10, 7, 6, 0), #0d0907 30%);
}
.app.has-tabs .noren { display: grid; }
.noren__rod {
  position: absolute; left: 4px; right: 4px; top: 4px; height: 6px; border-radius: 9px;
  background: linear-gradient(180deg, #8a5b36, #4a2f1c); box-shadow: 0 2px 4px rgba(0, 0, 0, .6);
}
.noren__tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  height: calc(var(--tab-h) - 14px); margin-top: 5px; border-radius: 0 0 6px 6px;
  background: var(--sumi-2); color: var(--kinari-mute); font-weight: 900; font-size: 13px; letter-spacing: .12em;
  transition: transform .2s var(--ease-spring), background .15s, color .15s; transform-origin: top center;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .3);
}
.noren__tab svg { font-size: 22px; }
.noren__tab:active { transform: scaleY(.94); }
.noren__tab.is-on {
  background: var(--shu-btn); color: var(--kinari); height: calc(var(--tab-h) - 8px);
  box-shadow: inset 0 -3px 0 var(--shu-deep), 0 6px 14px rgba(173, 44, 20, .35);
}
.noren__tab.is-on::after {
  content: ""; position: absolute; left: 50%; top: 0; bottom: 12px; width: 1px; background: rgba(0, 0, 0, .22);
}
.noren__tab.is-sway { animation: sway .6s ease-out; }
@keyframes sway { 25% { transform: rotate(2.4deg); } 55% { transform: rotate(-1.6deg); } 80% { transform: rotate(.6deg); } }
.noren__badge {
  position: absolute; top: 4px; right: 12%; min-width: 10px; height: 10px; border-radius: 50%;
  background: var(--akari); box-shadow: 0 0 0 2px var(--sumi-2);
}
.noren__tab.is-on .noren__badge { box-shadow: 0 0 0 2px var(--shu-btn); }

/* ---------- 強化（仕入れ帳） ---------- */
.screen--upgrade { background: var(--kinari); color: var(--sumi); }
.ledger__head { position: relative; background: var(--sumi); color: var(--kinari); padding-top: var(--safe-t); }
.ledger__photo {
  height: 104px; background: #1a120d url(/app-development/apps/a009/img/kitchen.webp) center 62% / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.ledger__headrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: -34px; padding: 0 16px 12px; position: relative; }
.ledger__title { font-family: var(--f-sign); font-weight: 400; font-size: 30px; letter-spacing: .1em; line-height: 1.1; text-shadow: 0 2px 0 #000; }
.ledger__money { display: flex; align-items: baseline; gap: 4px; padding: 4px 12px; border-radius: 99px; background: var(--sumi-2); white-space: nowrap; font-weight: 700; }
.ledger__k { font-size: 12px; color: var(--kinari-mute); margin-right: 2px; }
.ledger__money .num { font-size: 22px; color: var(--akari); }
.ledger__ctrl { display: flex; gap: 8px; align-items: center; padding: 12px 12px 8px; background: var(--kinari); border-bottom: 2px solid var(--sumi); }
.seg { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; border-radius: 10px; background: var(--kinari-2); }
.seg button { min-height: 40px; border-radius: 8px; font-weight: 900; font-size: 15px; color: var(--ink-mute); transition: background .15s, color .15s; }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] { background: var(--sumi); color: var(--kinari); }
.qty { display: grid; grid-auto-flow: column; gap: 2px; padding: 3px; border-radius: 10px; background: var(--kinari-2); }
.qty button { min-width: 42px; min-height: 40px; border-radius: 8px; font-family: var(--f-num); font-weight: 800; font-size: 16px; color: var(--ink-mute); }
.qty button[data-v="max"] { font-family: var(--f-body); font-size: 13px; font-weight: 900; }
.qty button[aria-pressed="true"] { background: var(--shu-btn); color: var(--kinari); }
.ledger__scroll { background: var(--kinari); }
.ledger__note { margin: 12px 16px 6px; padding-left: 12px; border-left: 3px solid var(--shu-btn); font-size: 14px; color: var(--ink-mute); font-weight: 500; }
.items { list-style: none; margin: 0; padding: 0 12px; }
.item {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px 12px;
  padding: 12px 0; border-bottom: 1.5px dashed rgba(95, 75, 57, .35);
}
.item__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sumi); color: var(--kinari); font-size: 24px; position: relative; }
.item__lv { position: absolute; right: -6px; bottom: -4px; min-width: 24px; padding: 0 4px; border-radius: 4px; background: var(--shu-btn); color: var(--kinari); font-family: var(--f-num); font-size: 14px; font-weight: 800; line-height: 18px; text-align: center; }
.item__name { font-weight: 900; font-size: 16px; line-height: 1.3; word-break: keep-all; }
.item__desc { font-size: 13px; color: var(--ink-mute); font-weight: 500; line-height: 1.4; }
.item__eff { margin-top: 3px; font-size: 13px; font-weight: 700; color: var(--shu-btn); white-space: nowrap; }
.item__eff .num { font-size: 15px; }
.item__ms { display: block; font-size: 12px; color: var(--ink-mute); font-weight: 700; white-space: nowrap; }
.item__buy {
  position: relative; overflow: hidden; display: grid; place-items: center; min-width: 96px; min-height: 52px; padding: 4px 10px;
  border-radius: var(--r-m); background: var(--shu-btn); color: var(--kinari); box-shadow: 0 3px 0 var(--shu-deep);
  transition: transform var(--t-press);
}
.item__buy:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--shu-deep); }
.item__buy b { position: relative; font-family: var(--f-num); font-weight: 800; font-size: 19px; line-height: 1.05; white-space: nowrap; }
.item__buy small { position: relative; font-size: 12px; font-weight: 900; white-space: nowrap; }
.item__buy.is-off { background: var(--kinari-2); color: var(--sumi); box-shadow: inset 0 0 0 1.5px rgba(95, 75, 57, .45); }
.item__buy.is-off i { position: absolute; inset: 0 auto 0 0; background: rgba(173, 44, 20, .16); }
.item.is-locked .item__ico { background: var(--kinari-2); color: var(--ink-mute); }
.item.is-locked .item__name { color: var(--ink-mute); }
.item__lock { display: inline-flex; align-items: center; gap: 4px; padding: 6px 10px; border-radius: var(--r-m); background: var(--kinari-2); color: var(--sumi); font-size: 13px; font-weight: 900; white-space: nowrap; }
.item.is-bought { animation: bought .4s var(--ease-out); }
@keyframes bought { 0% { background: rgba(240, 180, 74, .55); } 100% { background: transparent; } }

.stagecard { margin: 12px 4px 6px; display: grid; gap: 10px; }
.stagecard__now, .stagecard__next { position: relative; border-radius: var(--r-m); overflow: hidden; background: var(--sumi); color: var(--kinari); }
.stagecard__img { aspect-ratio: 16 / 9; background: #120d0a center 45% / cover no-repeat; }
.stagecard__body { padding: 10px 14px 14px; display: grid; gap: 6px; }
.stagecard__k { font-size: 12px; color: var(--kinari-mute); font-weight: 700; letter-spacing: .1em; }
.stagecard__name { font-weight: 900; font-size: 18px; word-break: keep-all; }
.stagecard__x { font-size: 14px; color: var(--akari); font-weight: 700; }
.stagecard__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.stagecard__list li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-m); background: var(--sumi); color: var(--kinari); font-weight: 700; font-size: 14px; }
.stagecard__list li.is-done { background: var(--kinari-2); color: var(--sumi); }
.stagecard__list .num { margin-left: auto; font-size: 17px; white-space: nowrap; }

/* ---------- 実績（木札） ---------- */
.screen--records {
  background:
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .0) 0 62px, rgba(0, 0, 0, .35) 62px 64px),
    linear-gradient(180deg, #2b1d14, #1b120d);
  background-color: #23180f;
}
.rec__scroll { padding: calc(var(--safe-t) + 18px) 14px 0; }
.rec__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; }
.rec__title { font-family: var(--f-sign); font-weight: 400; font-size: 28px; letter-spacing: .08em; color: var(--kinari); }
.rec__fame { display: flex; align-items: baseline; gap: 4px; padding: 3px 12px; border-radius: 99px; background: var(--sumi); font-weight: 700; font-size: 13px; color: var(--kinari-mute); white-space: nowrap; }
.rec__fame .num { font-size: 20px; color: var(--kinari); }
.rec__fameplus { margin-left: 8px; color: var(--akari); }
.rec__fameplus .num { color: var(--akari); font-size: 18px; }
.banzuke {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0 0; padding: 0;
  border-radius: var(--r-m); overflow: hidden; background: var(--wood);
  box-shadow: 0 0 0 2px var(--wood);
}
.banzuke div { padding: 10px 12px; background: var(--kinari); color: var(--sumi); }
.banzuke dt { font-size: 12px; font-weight: 900; color: var(--ink-mute); letter-spacing: .06em; }
.banzuke dd { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.banzuke dd .num { font-size: 24px; color: var(--shu-btn); margin-right: 2px; }
.rec__hint { margin: 12px 2px 6px; font-size: 14px; color: var(--kinari-mute); }
.tags { list-style: none; margin: 0; padding: 18px 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 10px; position: relative; }
.tags li { position: relative; }
.tags li::before { content: ""; position: absolute; left: -8px; right: -8px; top: -10px; height: 4px; background: #4d3220; box-shadow: 0 2px 3px rgba(0, 0, 0, .5); }
.tag {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  width: 100%; min-height: 150px; padding: 18px 0 10px; border-radius: 4px 4px 3px 3px;
  background: linear-gradient(90deg, #ead9b3, #f3e6c8 45%, #e2cda0); color: var(--sumi);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .45), inset 0 -3px 0 rgba(95, 75, 57, .25);
  transform-origin: 50% -6px; transition: transform .1s;
}
.tag::before { content: ""; position: absolute; top: -14px; left: 50%; width: 2px; height: 16px; background: #c9b48a; transform: translateX(-50%); }
.tag::after { content: ""; position: absolute; top: 6px; left: 50%; width: 7px; height: 7px; border-radius: 50%; background: #5f4b39; transform: translateX(-50%); }
.tag:active { transform: rotate(3deg); }
.tag.is-sway { animation: sway .7s ease-out; }
.tag__name {
  writing-mode: vertical-rl; text-orientation: upright; font-family: var(--f-sign); font-size: 15px; line-height: 1;
  letter-spacing: .06em; margin-top: 6px; white-space: nowrap;
}
.tag__seal {
  position: absolute; right: 4px; bottom: 6px; width: 22px; height: 22px; border-radius: 4px; border: 2px solid var(--shu-btn);
  color: var(--shu-btn); font-family: var(--f-sign); font-size: 12px; line-height: 18px; text-align: center; transform: rotate(-10deg); background: rgba(243, 230, 200, .7);
}
.tag.is-locked { background: linear-gradient(90deg, #3a2719, #46301f 45%, #36241a); color: var(--kinari-mute); box-shadow: 0 6px 10px rgba(0, 0, 0, .45); }
.tag__lock { width: 26px; height: 26px; margin-top: 30px; color: #b9a47e; }
.tag.is-locked .tag__name { font-family: var(--f-body); font-weight: 900; color: #b9a47e; }
.tag.is-new { animation: tag-new 1.2s var(--ease-spring); }
@keyframes tag-new { 0% { transform: rotate(-14deg) scale(.6); } 30% { transform: rotate(10deg) scale(1.1); } 60% { transform: rotate(-5deg); } }
.sec-h { margin: 28px 2px 10px; font-family: var(--f-sign); font-weight: 400; font-size: 20px; letter-spacing: .08em; color: var(--kinari); }
.walk { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.walk li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-m); background: var(--sumi); }
.walk__img { width: 84px; height: 64px; border-radius: 6px; background: #120d0a center 45% / cover no-repeat; }
.walk li.is-future .walk__img { filter: grayscale(1) brightness(.35); }
.walk__no { font-size: 12px; font-weight: 700; color: var(--akari); letter-spacing: .1em; }
.walk__name { font-weight: 900; font-size: 15px; word-break: keep-all; }
.walk__when { font-size: 13px; color: var(--kinari-mute); }
.walk li.is-future .walk__name { color: var(--kinari-mute); }

/* ---------- 設定 ---------- */
.screen--settings { background: var(--sumi); }
.topbar { display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 8px) 10px 8px; background: var(--sumi); border-bottom: 1px solid var(--sumi-3); }
.topbar__title { flex: 1; text-align: center; font-family: var(--f-sign); font-weight: 400; font-size: 19px; letter-spacing: .08em; }
.topbar__sp { width: 44px; }
.set__scroll { padding: 4px 14px 0; }
.screen--settings .sec-h { font-size: 17px; margin: 24px 2px 10px; color: var(--akari); }
.howto { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.howto__item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 14px; border-radius: var(--r-m); background: var(--sumi-2); }
.howto__no { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--shu-btn); color: var(--kinari); font-size: 22px; }
.howto__item h3 { font-size: 16px; font-weight: 900; line-height: 1.4; }
.howto__item p { margin-top: 4px; font-size: 14px; color: var(--kinari-mute); word-break: normal; }
.group { border-radius: var(--r-m); background: var(--sumi-2); overflow: hidden; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; padding: 10px 14px; border-bottom: 1px solid var(--sumi-3); }
.row:last-child { border-bottom: 0; }
.row--stack { flex-direction: column; align-items: stretch; }
.row__label { font-weight: 700; font-size: 15px; }
.row__label small { display: block; font-size: 12px; color: var(--kinari-mute); font-weight: 500; }
.row__note { font-size: 13px; color: var(--kinari-mute); }
.row--btn { width: 100%; justify-content: flex-start; color: #ff9d86; font-weight: 900; }
.row--btn svg { font-size: 22px; }
.seg--dark { background: var(--sumi); }
.seg--dark button { color: var(--kinari-mute); }
.seg--dark button[aria-pressed="true"] { background: var(--shu-btn); color: var(--kinari); }
.switch { position: relative; width: 56px; height: 34px; border-radius: 99px; background: var(--sumi-3); transition: background .2s; flex: none; }
.switch i { position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: var(--kinari); transition: transform .25s var(--ease-spring); }
.switch[aria-checked="true"] { background: var(--shu-btn); }
.switch[aria-checked="true"] i { transform: translateX(22px); }
.about { padding: 16px; display: grid; gap: 12px; }
.about__head { display: flex; align-items: center; gap: 14px; }
.about__head img { width: 64px; height: 64px; border-radius: 15px; }
.about__name { font-family: var(--f-sign); font-size: 18px; }
.about__ver { font-size: 13px; color: var(--kinari-mute); }
.about__note { font-size: 14px; word-break: normal; }
.about__k { font-size: 13px; font-weight: 900; color: var(--akari); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { padding: 4px 10px; border-radius: 99px; background: var(--sumi); font-size: 13px; font-weight: 700; white-space: nowrap; }
.about__cta { margin-top: 4px; }

/* ---------- エンディング ---------- */
.screen--ending { background: #0d0a10 url(/app-development/apps/a009/img/stage5.webp) center top / cover no-repeat; }
.end__scroll { padding: calc(var(--safe-t) + 24px) 16px calc(var(--safe-b) + 24px); }
.end__hero { text-align: center; padding: 10px 0 30vh; }
.end__kicker { display: inline-block; padding: 3px 14px; border-radius: 99px; background: var(--sumi); color: var(--akari); font-weight: 900; font-size: 14px; letter-spacing: .14em; }
.end__title { display: block; margin-top: 10px; }
.end__title span { display: inline-block; padding: 6px 16px 10px; border-radius: var(--r-m); background: var(--shu-btn); font-family: var(--f-sign); font-weight: 400; font-size: clamp(34px, 11vw, 46px); line-height: 1.15; letter-spacing: .06em; color: var(--kinari); box-shadow: 0 6px 0 var(--shu-deep); }
.end__lead { margin: 14px auto 0; max-width: 300px; padding: 8px 14px; border-radius: var(--r-m); background: var(--sumi); font-size: 14px; font-weight: 700; word-break: normal; }
.end__card { display: grid; gap: 12px; padding: 18px 16px; border-radius: var(--r-l); background: var(--kinari); color: var(--sumi); box-shadow: 0 -10px 40px rgba(0, 0, 0, .55); }
.end__meter { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; white-space: nowrap; }
.end__k { width: 100%; font-size: 13px; font-weight: 900; color: var(--ink-mute); }
.end__meter .num { font-size: 40px; color: var(--shu-btn); line-height: 1; }
.end__u { font-weight: 900; }
.end__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.end__stats div { padding: 8px 10px; border-radius: var(--r-m); background: var(--kinari-2); }
.end__stats dt { font-size: 12px; font-weight: 900; color: var(--ink-mute); }
.end__stats dd { margin: 0; font-size: 13px; font-weight: 700; white-space: nowrap; }
.end__stats .num { font-size: 20px; }
.end__noren { font-size: 14px; color: var(--ink-mute); word-break: normal; }
.screen--ending .btn--ghost { background: var(--kinari-2); color: var(--sumi); box-shadow: none; }
.screen--ending .btn--shu[disabled] { background: var(--kinari-2); color: var(--ink-mute); box-shadow: none; }

/* ---------- シート・演出 ---------- */
.scrim { position: absolute; inset: 0; z-index: 40; background: rgba(5, 3, 2, .62); opacity: 0; pointer-events: none; transition: opacity .25s; }
.scrim.is-on { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; z-index: 41; left: 0; right: 0; bottom: 0; display: grid; gap: 10px;
  padding: 10px 18px calc(var(--safe-b) + 20px); border-radius: 22px 22px 0 0; background: var(--kinari); color: var(--sumi);
  transform: translateY(110%); transition: transform .32s var(--ease-out), visibility 0s .32s; box-shadow: 0 -12px 40px rgba(0, 0, 0, .5);
  max-height: 92%; overflow-y: auto; visibility: hidden;
}
.sheet.is-on { transform: translateY(0); visibility: visible; transition: transform .32s var(--ease-out); }
.sheet__grab { justify-self: center; width: 40px; height: 5px; border-radius: 9px; background: rgba(95, 75, 57, .45); margin-bottom: 4px; }
.sheet h2 { font-family: var(--f-sign); font-weight: 400; font-size: 23px; line-height: 1.3; letter-spacing: .04em; }
.sheet p { font-size: 15px; word-break: normal; }
.sheet__kicker { font-size: 13px !important; font-weight: 900; color: var(--shu-btn); letter-spacing: .12em; }
.sheet .btn--ghost { background: var(--kinari-2); color: var(--sumi); box-shadow: none; }
.away__img { height: 150px; margin: 0 -18px 4px; background: #1a120d url(/app-development/apps/a009/img/away.webp) center 40% / cover no-repeat; border-radius: 0; }
.js-sheet-away { padding-top: 0; overflow: hidden; }
.js-sheet-away .sheet__grab { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); background: rgba(243, 230, 200, .7); }
.away__time { display: flex; align-items: baseline; gap: 6px; font-weight: 700; }
.away__time .num { font-size: 26px; color: var(--sumi); }
.away__line { font-weight: 700; }
.away__line .num { font-size: 20px; }
.away__yen { display: flex; align-items: baseline; gap: 2px; font-weight: 900; color: var(--shu-btn); white-space: nowrap; }
.away__yen .num { font-size: 48px; line-height: 1; }

.stageup { position: absolute; inset: 0; z-index: 50; display: none; flex-direction: column; justify-content: flex-end; background: #0b0807; }
.stageup.is-on { display: flex; }
.stageup__img { position: absolute; inset: 0; background: #0b0807 center 40% / cover no-repeat; animation: su-zoom 2.4s var(--ease-out) both; }
@keyframes su-zoom { from { transform: scale(1.25); filter: brightness(2.2) saturate(.4); } }
.stageup__band {
  position: relative; display: grid; gap: 8px; justify-items: center; text-align: center;
  padding: 22px 20px calc(var(--safe-b) + 22px); background: var(--sumi); box-shadow: 0 -20px 40px rgba(0, 0, 0, .6);
  animation: band-in .5s .35s var(--ease-out) both;
}
@keyframes band-in { from { transform: translateY(40px); opacity: 0; } }
.stageup__k { font-weight: 900; color: var(--akari); letter-spacing: .2em; }
.stageup__k .num { font-size: 26px; }
.stageup__title span { display: inline-block; font-family: var(--f-sign); font-weight: 400; font-size: clamp(26px, 8vw, 34px); line-height: 1.25; letter-spacing: .04em; }
.stageup__x { font-weight: 700; color: var(--kinari-mute); }
.stageup__x .num { font-size: 26px; color: var(--akari); }
.stageup__new { font-size: 14px; color: var(--kinari-mute); word-break: normal; }
.stageup .btn { margin-top: 6px; }

.toast {
  position: absolute; z-index: 60; left: 50%; top: calc(var(--safe-t) + 12px); width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-m);
  background: var(--kinari); color: var(--sumi); font-weight: 900; font-size: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .5);
  transform: translate(-50%, calc(-100% - 60px)); transition: transform .3s var(--ease-spring), visibility 0s .3s; visibility: hidden; pointer-events: none; word-break: keep-all;
}
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition: transform .3s var(--ease-spring); }
.toast__tag { flex: none; display: grid; place-items: center; width: 30px; height: 40px; border-radius: 3px; background: var(--sumi); color: var(--kinari); font-family: var(--f-sign); font-size: 11px; writing-mode: vertical-rl; }

.splash { position: absolute; inset: 0; z-index: 90; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: var(--sumi); }
.splash.is-on { display: flex; }
.splash.is-out { opacity: 0; transition: opacity .3s; }
.splash img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 10px 40px rgba(210, 58, 30, .45); }
.splash p { font-family: var(--f-sign); font-size: 20px; letter-spacing: .1em; }
.noscript, .jsfail { position: absolute; inset: auto 16px 40% 16px; z-index: 95; padding: 16px; border-radius: var(--r-m); background: var(--kinari); color: var(--sumi); font-weight: 700; text-align: center; }

@media (max-height: 700px) {
  .board__money .num { font-size: 38px; }
  .rank { padding: 7px 12px 8px; }
  .tip { padding: 6px 6px 6px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .phone__svg, .rank__go { animation: none !important; }
}

/* はじめての一杯の案内 */
.bowl.is-coach::after {
  content: ""; position: absolute; left: 50%; top: 36%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  border: 3px solid var(--akari); animation: coach 1.2s ease-out infinite; pointer-events: none;
}
@keyframes coach { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
