@import url("https://fonts.googleapis.com/css2?family=DotGothic16&family=Press+Start+2P&family=M+PLUS+Rounded+1c:wght@500;700;800&display=swap");
/* スナトミ — design-system/ から生成。直接編集しない。 */

:root, [data-theme="yoru"] {
  --screen: #16123a;
  --screen-2: #221c55;
  --screen-3: #2e2770;
  --ink: #f5f2ff;
  --ink-muted: #b8b1e3;
  --ramune: #43cde6;
  --umaibo: #ffd23a;
  --ichigo: #ff6d9c;
  --melon: #7fe08c;
  --on-candy: #16123a;
  --tomita-red: #e60012;
  --shadow-window: 0 0 0 4px #16123a, 0 0 0 7px #f5f2ff;
  --shadow-bevel: inset -4px -4px 0 rgba(0, 0, 0, 0.28), inset 4px 4px 0 rgba(255, 255, 255, 0.35);
}

[data-theme="hiru"] {
  --screen: #eaf7fb;
  --screen-2: #ffffff;
  --screen-3: #d3eef6;
  --ink: #16123a;
  --ink-muted: #4a4478;
  --ramune: #087489;
  --umaibo: #ffd23a;
  --ichigo: #d81b5f;
  --melon: #1b7a33;
  --on-candy: #16123a;
  --tomita-red: #e60012;
  --shadow-window: 0 0 0 4px #eaf7fb, 0 0 0 7px #16123a;
  --shadow-bevel: inset -4px -4px 0 rgba(0, 0, 0, 0.28), inset 4px 4px 0 rgba(255, 255, 255, 0.35);
}

:root {
  --px-1: 4px;
  --px-2: 8px;
  --px-3: 12px;
  --px-4: 16px;
  --px-6: 24px;
  --px-8: 32px;
  --px-12: 48px;
  --px-16: 64px;
  --radius-0: 0;
  --radius-window: 6px;
  --radius-pill: 999px;
  --font-pixel: "DotGothic16", "MS Gothic", "Osaka-Mono", monospace;
  --font-arcade: "Press Start 2P", "DotGothic16", monospace;
  --font-body: "M PLUS Rounded 1c", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Meiryo", sans-serif;
}
/* スナトミ components — tokens.css を先に読み込むこと。クラスは st- で始まる。 */

.st-root, body.st-root {
  background: var(--screen); color: var(--ink);
  font-family: var(--font-body); font-size: 16px; line-height: 1.8; font-weight: 500;
}
/* ブラウン管の走査線。夜だけ、地にうっすら */
.st-scan { background-image: repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 4px); }
[data-theme="hiru"] .st-scan, .st-scan[data-theme="hiru"] { background-image: none; }

/* ---- Wordmark：ロゴは文字だけ。スナ=ichigo、トミ=ramune ---- */
.st-wordmark { font-family: var(--font-pixel); font-weight: 400; line-height: 1; letter-spacing: .04em; white-space: nowrap; }
.st-wordmark .sna { color: var(--ichigo); }
.st-wordmark .tomi { color: var(--ramune); }
.st-wordmark .place { color: var(--ink); margin-left: .25em; }

/* ---- Label：英字の小見出し ---- */
.st-label { font-family: var(--font-arcade); font-size: 11px; letter-spacing: .08em; line-height: 1.6; color: var(--ink-muted); text-transform: uppercase; }

/* ---- Button：ファミコン風のボタン。角はピクセルで1段落とす ---- */
.st-btn {
  --st-btn-bg: var(--screen-2); --st-btn-fg: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px;
  padding: 12px 22px; border: 0; cursor: pointer; text-decoration: none;
  font-family: var(--font-pixel); font-size: 18px; line-height: 1.2;
  background: var(--st-btn-bg); color: var(--st-btn-fg);
  box-shadow: inset 0 0 0 3px var(--ink), inset -6px -6px 0 rgba(0,0,0,.22);
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
  transition: transform 80ms steps(2, end);
}
.st-btn:hover { transform: translateY(-2px); }
.st-btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 3px var(--ink); }
.st-btn:focus-visible { outline: 3px dashed var(--umaibo); outline-offset: 4px; }
.st-btn--start { --st-btn-bg: var(--umaibo); --st-btn-fg: var(--on-candy); box-shadow: inset 0 0 0 3px var(--on-candy), inset -6px -6px 0 rgba(0,0,0,.22); }
.st-btn--start:active { box-shadow: inset 0 0 0 3px var(--on-candy); }
.st-btn--ramune { --st-btn-bg: var(--ramune); --st-btn-fg: var(--on-candy); box-shadow: inset 0 0 0 3px var(--on-candy), inset -6px -6px 0 rgba(0,0,0,.22); }
[data-theme="hiru"] .st-btn--ramune { --st-btn-fg: #ffffff; }
.st-btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

/* Command：メニューの行。ホバーで ▶ が出る */
.st-command { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-pixel); font-size: 18px; color: var(--ink); text-decoration: none; padding: 4px 0; }
.st-command::before { content: "▶"; font-size: .8em; color: var(--umaibo); visibility: hidden; }
[data-theme="hiru"] .st-command::before { color: var(--ichigo); }
.st-command:hover::before, .st-command:focus-visible::before, .st-command[aria-current]::before { visibility: visible; animation: st-blink 1s steps(1, end) infinite; }
.st-command:focus-visible { outline: none; }

/* ---- Window：RPGのメッセージウィンドウ。カードの代わり ---- */
.st-window {
  position: relative; background: var(--screen-2); color: var(--ink);
  border: 3px solid var(--ink); border-radius: var(--radius-window);
  box-shadow: var(--shadow-window); padding: 24px; margin: 7px;
  display: grid; gap: 14px; align-content: start; min-width: 0;
}
.st-window__title {
  position: absolute; top: -16px; left: 18px; padding: 0 10px;
  background: var(--screen-2); font-family: var(--font-pixel); font-size: 18px; line-height: 28px; color: var(--ink);
  border: 3px solid var(--ink); border-radius: 4px;
}
.st-window__more { justify-self: end; font-size: 14px; color: var(--umaibo); animation: st-bob 1s steps(2, end) infinite; }
[data-theme="hiru"] .st-window__more { color: var(--ichigo); }

/* ---- Status：RPGのステータス表。営業時間などの一覧 ---- */
.st-status { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; }
.st-status dt { font-family: var(--font-pixel); color: var(--ink-muted); font-size: 15px; line-height: 1.8; }
.st-status dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.st-status dd .st-num { font-family: var(--font-arcade); font-size: 14px; letter-spacing: .02em; }

/* ---- Tag：状態の印 ---- */
.st-tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; font-family: var(--font-pixel); font-size: 14px; line-height: 1.6; background: var(--screen-3); color: var(--ink); }
.st-tag::before { content: ""; width: 8px; height: 8px; background: currentColor; }
.st-tag--open { background: var(--melon); color: var(--on-candy); }
.st-tag--soon { background: var(--umaibo); color: var(--on-candy); }
.st-tag--rent { background: var(--ramune); color: var(--on-candy); }
[data-theme="hiru"] .st-tag--open, [data-theme="hiru"] .st-tag--rent { color: #ffffff; }

/* ---- Chip：使い方の例など ---- */
.st-chip { display: inline-block; padding: 2px 14px; border: 2px solid var(--ink-muted); border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; color: var(--ink); }

/* ---- Price：アーケードの得点表示のような数字 ---- */
.st-price { display: grid; gap: 4px; }
.st-price__value { font-family: var(--font-arcade); font-size: 26px; line-height: 1.3; color: var(--ichigo); font-variant-numeric: tabular-nums; }
.st-price__unit { font-family: var(--font-pixel); font-size: 16px; margin-left: 4px; color: var(--ink); }
.st-price__note { font-size: 14px; color: var(--ink-muted); }

/* ---- Coin：駄菓子の10円玉。リストの印 ---- */
.st-coins { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.st-coins li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: baseline; }
.st-coins li::before { content: ""; width: 10px; height: 10px; background: var(--umaibo); box-shadow: 0 0 0 2px var(--on-candy) inset; transform: translateY(1px); }
[data-theme="hiru"] .st-coins li::before { background: var(--ichigo); box-shadow: none; }

/* ---- Group：有限会社富田商店のお店どうしをつなぐ帯 ---- */
.st-group { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 14px 18px; border: 2px dashed var(--ink-muted); }
.st-group__corp { font-size: 14px; color: var(--ink-muted); width: 100%; }
.st-group a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--font-pixel); font-size: 17px; }
.st-group a:hover, .st-group a:focus-visible { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.st-group .mark { width: 14px; height: 14px; flex: none; }
.st-group .mark--tomita { background: var(--tomita-red); }
.st-group .mark--fuchu { background: var(--ichigo); }
.st-group .mark--sakae { background: var(--ramune); }

/* ---- Dots：区切りのドット線 ---- */
.st-dots { height: 8px; background-image: radial-gradient(circle, var(--ink-muted) 2px, transparent 2.5px); background-size: 16px 8px; opacity: .6; border: 0; margin: 0; }

@keyframes st-blink { 50% { opacity: 0; } }
@keyframes st-bob { 50% { transform: translateY(3px); } }
@media (prefers-reduced-motion: reduce) {
  .st-command::before, .st-window__more { animation: none !important; }
  .st-btn { transition: none; }
}
