/* ============================================================
   スナックしのぶ — style.css
   設計書 stage1-design.md §3.6 準拠
   配色: 深い木目の闇 #171210 / 暖色の灯り #e8a44a / 生成りの紙 #f2e8d8
   フォント: 見出し・手紙=明朝／UI=ゴシック
   モバイルファースト（390px基準）、PCは中央668pxカラム
   ============================================================ */

/* ---------- 0. リセット ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  padding: 0;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, textarea, select {
  font: inherit;
  color: inherit;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-light);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* [hidden] 属性は常に最優先で非表示にする。
   個別クラス側で display:flex 等を指定していても、JSの
   el.hidden = true/false による表示制御が確実に効くようにするため。 */
[hidden] { display: none !important; }

/* ---------- 1. 変数・タイポグラフィ ---------- */
:root {
  --color-bg-dark: #171210;
  --color-bg-dark-2: #0f0b09;
  --color-light: #e8a44a;
  --color-light-soft: #f0c07a;
  --color-paper: #f2e8d8;
  --color-paper-2: #ece0cc;
  --color-text-on-dark: #efe4d3;
  --color-text-muted: #b6a693;
  --color-text-on-paper: #2c2117;
  --color-danger: #d97a5c;
  --color-line: rgba(232, 164, 74, 0.22);

  --font-mincho: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", serif;
  --font-gothic: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic",
    "Noto Sans JP", -apple-system, BlinkMacSystemFont, sans-serif;

  --column-max: 668px;
  --radius-md: 14px;
  --radius-lg: 22px;
}

body.app-body {
  font-family: var(--font-gothic);
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}

/* 店の外の闇（PCで中央カラムの左右を暗くする） */
body.app-body {
  background-image: radial-gradient(ellipse at 50% 0%, #241a15 0%, var(--color-bg-dark) 55%, var(--color-bg-dark-2) 100%);
}

/* ---------- 2. アプリ全体の器（全画面アプリ想定） ---------- */
.app-root {
  position: relative;
  max-width: var(--column-max);
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

@media (min-width: 700px) {
  .app-root {
    box-shadow: 0 0 80px rgba(0, 0, 0, 0.6);
    border-left: 1px solid var(--color-line);
    border-right: 1px solid var(--color-line);
  }
}

.screen {
  display: none;
  min-height: 100vh;
  min-height: 100dvh;
  flex-direction: column;
}
.screen.active { display: flex; }

/* ---------- 3. 外観（facade） ---------- */
.screen-facade {
  position: relative;
  justify-content: space-between;
  align-items: center;
  padding: 8vh 24px 6vh;
  background:
    radial-gradient(ellipse 120% 60% at 50% 0%, rgba(232, 164, 74, 0.10), transparent 60%),
    linear-gradient(180deg, #0c0908 0%, #171210 55%, #0c0908 100%);
  text-align: center;
}

.facade-alley {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8vh;
  width: 100%;
}

.facade-sign {
  padding: 14px 28px;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(232, 164, 74, 0.08), transparent);
  box-shadow: 0 0 28px rgba(232, 164, 74, 0.18);
}
.facade-sign-text {
  font-family: var(--font-mincho);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  color: var(--color-light-soft);
  text-shadow: 0 0 18px rgba(232, 164, 74, 0.55);
  writing-mode: vertical-rl;
  text-orientation: upright;
}

.facade-door {
  position: relative;
  width: min(78vw, 320px);
  height: 220px;
}
.door-panel {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background:
    repeating-linear-gradient(90deg, #241a14 0 10px, #1c140f 10px 20px);
  border: 1px solid rgba(232, 164, 74, 0.15);
  transition: transform 0.9s ease;
}
.door-left { left: 0; border-radius: 4px 0 0 4px; }
.door-right { right: 0; border-radius: 0 4px 4px 0; }

.facade-noren {
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  width: 82%;
  height: 92px;
  z-index: 2;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.5));
}
.noren-strip {
  flex: 1;
  margin: 0 1px;
  background: linear-gradient(180deg, #7a3a2a 0%, #5a2a1e 100%);
  border-top: 3px solid #2c150e;
  animation: noren-sway 4.5s ease-in-out infinite;
}
.noren-strip:nth-child(2) { animation-delay: 0.3s; }
.noren-strip:nth-child(3) { animation-delay: 0.6s; }
.noren-strip:nth-child(4) { animation-delay: 0.9s; }
.noren-strip:nth-child(5) { animation-delay: 1.2s; }

@keyframes noren-sway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(0.8deg); }
}

.btn-enter {
  display: inline-block;
  padding: 16px 40px;
  border: 1px solid var(--color-light);
  border-radius: 999px;
  color: var(--color-light-soft);
  font-family: var(--font-mincho);
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  background: rgba(232, 164, 74, 0.06);
  box-shadow: 0 0 24px rgba(232, 164, 74, 0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-enter:hover { box-shadow: 0 0 32px rgba(232, 164, 74, 0.3); }
.btn-enter:active { transform: scale(0.97); }

.facade-note {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin-top: 18px;
}

/* ---------- 4. 入店演出 ---------- */
.entrance-animation {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.entrance-animation.active {
  display: flex;
  pointer-events: auto;
}
.entrance-black {
  position: absolute;
  inset: 0;
  background: #060404;
  opacity: 0;
  animation: entrance-fade 1.7s ease forwards;
}
.entrance-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 40% at 50% 55%, rgba(232, 164, 74, 0.35), transparent 70%);
  opacity: 0;
  animation: entrance-glow-in 1.7s ease forwards;
}
@keyframes entrance-fade {
  0% { opacity: 0; }
  35% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes entrance-glow-in {
  0%, 45% { opacity: 0; }
  100% { opacity: 1; }
}

.btn-skip {
  position: absolute;
  bottom: max(24px, env(safe-area-inset-bottom));
  right: 24px;
  padding: 10px 18px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .entrance-black, .entrance-glow, .noren-strip { animation: none !important; }
}

/* ---------- 5. 店内 ---------- */
.screen-store {
  padding: max(20px, env(safe-area-inset-top)) 20px max(28px, env(safe-area-inset-bottom));
  gap: 22px;
}
.screen-store[data-lighting="night"] {
  background:
    radial-gradient(ellipse 90% 40% at 50% 18%, rgba(232, 164, 74, 0.14), transparent 65%),
    linear-gradient(180deg, #14100e 0%, #171210 60%, #100c0a 100%);
}
.screen-store[data-lighting="day"] {
  background:
    radial-gradient(ellipse 90% 40% at 50% 10%, rgba(232, 164, 74, 0.08), transparent 65%),
    linear-gradient(180deg, #201812 0%, #1c1613 60%, #171210 100%);
}

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.store-header-name {
  font-family: var(--font-mincho);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--color-light-soft);
}
.btn-sound {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.btn-sound.is-on { color: var(--color-light-soft); border-color: var(--color-light); }
.sound-icon { font-size: 0.9rem; }

.store-counter {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.mama-portrait {
  width: min(56vw, 220px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(232, 164, 74, 0.12), transparent 70%);
}
.mama-name-tag {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}
.mama-greeting-bubble {
  max-width: 34em;
  padding: 16px 20px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: rgba(232, 164, 74, 0.05);
}
.mama-greeting {
  font-family: var(--font-mincho);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--color-text-on-dark);
}

.menu-board {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.menu-item {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(232, 164, 74, 0.05), transparent);
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.menu-item:hover, .menu-item:active {
  border-color: var(--color-light);
  background: rgba(232, 164, 74, 0.1);
}
.menu-item-name {
  font-family: var(--font-mincho);
  font-size: 1.05rem;
  color: var(--color-light-soft);
  grid-column: 1;
  grid-row: 1;
}
.menu-item-desc {
  font-size: 0.76rem;
  color: var(--color-text-muted);
  grid-column: 1;
  grid-row: 2;
}
.menu-item-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-size: 0.95rem;
  color: var(--color-text-on-dark);
  white-space: nowrap;
}

.fumibako-link {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}
.fumibako-link:hover { color: var(--color-light-soft); border-color: var(--color-light); }
.fumibako-icon { font-size: 1rem; }

.store-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}
.footer-links a {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-operator, .footer-ai-disclosure {
  font-size: 0.68rem;
  color: var(--color-text-muted);
}

/* ---------- 6. 完了・キャンセル画面 ---------- */
.full-screen-message {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(232, 164, 74, 0.12), transparent 70%),
    #0e0b09;
}
.fs-message-main {
  font-family: var(--font-mincho);
  font-size: 1.25rem;
  line-height: 2.1;
  color: var(--color-light-soft);
  max-width: 22em;
}
.fs-message-sub {
  font-size: 0.88rem;
  color: var(--color-text-muted);
  max-width: 26em;
}
.fs-message-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

/* ---------- 7. ボタン共通 ---------- */
.btn-primary {
  width: 100%;
  padding: 15px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--color-light), #c98536);
  color: #201409;
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  box-shadow: 0 4px 18px rgba(232, 164, 74, 0.25);
}
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary:active:not(:disabled) { transform: scale(0.99); }

.btn-secondary {
  padding: 13px 22px;
  border: 1px solid var(--color-light);
  border-radius: var(--radius-md);
  color: var(--color-light-soft);
  background: rgba(232, 164, 74, 0.06);
  font-size: 0.9rem;
}

.btn-text {
  padding: 8px 4px;
  color: var(--color-text-muted);
  font-size: 0.82rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- 8. モーダル共通 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
}
.modal[hidden] { display: none; }
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(6, 4, 3, 0.72);
  backdrop-filter: blur(2px);
}
.modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--column-max);
  margin: 0 auto;
  max-height: 88vh;
  overflow-y: auto;
  padding: 26px 22px max(26px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, #1d1613 0%, #171210 100%);
  border: 1px solid var(--color-line);
  border-bottom: none;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.5);
}
@media (min-width: 700px) {
  .modal { align-items: center; }
  .modal-panel {
    max-height: 84vh;
    border-radius: 22px;
    border-bottom: 1px solid var(--color-line);
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.3rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

.modal-title {
  font-family: var(--font-mincho);
  font-size: 1.2rem;
  color: var(--color-light-soft);
  padding-right: 40px;
}
.modal-lead {
  margin-top: 8px;
  font-size: 0.86rem;
  color: var(--color-text-muted);
}

body.modal-open { overflow: hidden; }

/* ---------- 9. フォーム部品 ---------- */
.field { margin-top: 20px; }
.field-label {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
textarea, input[type="email"], input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-text-on-dark);
  resize: vertical;
}
textarea::placeholder, input::placeholder { color: rgba(182, 166, 147, 0.6); }
textarea:focus, input:focus { border-color: var(--color-light); }

.char-counter {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
  text-align: right;
}

.field-note {
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--color-text-muted);
}
.field-note-small { font-size: 0.68rem; opacity: 0.85; }

.field-error, .inline-error {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(217, 122, 92, 0.4);
  background: rgba(217, 122, 92, 0.08);
  color: #f0b7a3;
  font-size: 0.82rem;
}

.inline-loading {
  margin-top: 20px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--color-text-muted);
  font-family: var(--font-mincho);
}

/* ピル選択（radiogroup） */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  padding: 9px 16px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  font-size: 0.82rem;
  color: var(--color-text-muted);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.15s ease;
}
.pill.is-selected {
  border-color: var(--color-light);
  color: #201409;
  background: var(--color-light);
  font-weight: 600;
}
.pill-group-large { flex-direction: column; }
.pill-large {
  width: 100%;
  padding: 14px 16px;
  text-align: left;
  font-size: 0.88rem;
}

/* お通し 結果表示 */
.speech-bubble {
  margin-top: 18px;
  padding: 18px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-line);
  background: rgba(232, 164, 74, 0.06);
  font-family: var(--font-mincho);
  font-size: 0.98rem;
  line-height: 2;
  color: var(--color-text-on-dark);
  white-space: pre-wrap;
}
.otoshi-cta {
  margin-top: 20px;
  text-align: center;
}
.otoshi-cta p {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}
#otoshi-again { display: block; margin: 14px auto 0; }

/* howto 折りたたみ */
.howto {
  margin-top: 16px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 10px 14px;
}
.howto summary {
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--color-light-soft);
}
.howto ol {
  margin-top: 10px;
  padding-left: 1.2em;
  list-style: decimal;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* ---------- 10. ウィザード（見立て注文） ---------- */
.wizard-step-count {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}
.wizard-progress {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.wizard-progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-line);
}
.wizard-progress-dot.is-active { background: var(--color-light); }

.wizard-step { display: none; }
.wizard-step.is-active { display: block; }
.wizard-step-title {
  margin-top: 18px;
  font-family: var(--font-mincho);
  font-size: 1.05rem;
  color: var(--color-light-soft);
}
.wizard-plan-summary {
  margin-top: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(232, 164, 74, 0.08);
  font-size: 0.85rem;
  color: var(--color-text-on-dark);
}

.wizard-nav {
  display: flex;
  gap: 10px;
  margin-top: 26px;
}
.wizard-nav .btn-primary { flex: 1; }
.wizard-nav #wizard-prev { flex: 0 0 auto; }

/* ---------- 11. 文箱ページ ---------- */
.fumibako-body {
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(232, 164, 74, 0.08), transparent 60%),
    var(--color-bg-dark);
}
.fumibako-root {
  max-width: var(--column-max);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px 60px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
  min-height: 100dvh;
}
.fumibako-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.fumibako-back { font-size: 0.8rem; color: var(--color-text-muted); }
.fumibako-header-name {
  font-family: var(--font-mincho);
  font-size: 0.9rem;
  color: var(--color-light-soft);
}
.fumibako-title {
  font-family: var(--font-mincho);
  font-size: 1.4rem;
  color: var(--color-light-soft);
  text-align: center;
  margin-top: 8px;
}

.letter-token-form {
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  background: rgba(232, 164, 74, 0.04);
}
.letter-token-form p { font-size: 0.84rem; color: var(--color-text-muted); margin-bottom: 12px; }
.letter-token-form form { display: flex; gap: 8px; flex-wrap: wrap; }
.letter-token-form input { flex: 1; min-width: 0; }
.letter-token-form .btn-primary { width: auto; padding: 12px 20px; }

.letter-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.letter-meta { text-align: center; }
.letter-greeting-name, .letter-date {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.letter-body-wrap {
  position: relative;
  padding: 28px 20px;
  border-radius: var(--radius-md);
  background:
    repeating-linear-gradient(0deg, rgba(0,0,0,0.02) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.015) 0 2px, transparent 2px 4px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.4), transparent 60%),
    var(--color-paper);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 60px rgba(140, 108, 60, 0.08);
  border: 1px solid var(--color-paper-2);
}
.btn-toggle-writing {
  display: block;
  margin: 0 auto 18px;
  padding: 8px 16px;
  border: 1px solid rgba(44, 33, 23, 0.3);
  border-radius: 999px;
  font-size: 0.74rem;
  color: var(--color-text-on-paper);
}
.letter-body {
  font-family: var(--font-mincho);
  color: var(--color-text-on-paper);
  font-size: 1rem;
  white-space: pre-wrap;
}
.letter-body.vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  height: 66vh;
  max-height: 640px;
  overflow-x: auto;
  overflow-y: hidden;
  line-height: 2.15;
  letter-spacing: 0.04em;
  padding-bottom: 8px;
}
.letter-body.horizontal {
  writing-mode: horizontal-tb;
  height: auto;
  overflow: visible;
  line-height: 2.05;
}

.letter-footer-note {
  text-align: center;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-family: var(--font-mincho);
}

.fumibako-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--color-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

/* ---------- 12. 法務ページ ---------- */
.legal-body { background: var(--color-bg-dark); }
.legal-root {
  max-width: var(--column-max);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 20px 60px;
}
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
  margin-bottom: 24px;
}
.legal-back { font-size: 0.8rem; color: var(--color-text-muted); }
.legal-header-name {
  font-family: var(--font-mincho);
  font-size: 0.9rem;
  color: var(--color-light-soft);
}
.legal-title {
  font-family: var(--font-mincho);
  font-size: 1.5rem;
  color: var(--color-light-soft);
  margin-bottom: 18px;
}
.legal-placeholder-notice {
  padding: 12px 14px;
  border: 1px dashed var(--color-line);
  border-radius: 10px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 26px;
}
.legal-section { margin-bottom: 24px; }
.legal-section h2 {
  font-family: var(--font-mincho);
  font-size: 1rem;
  color: var(--color-light-soft);
  margin-bottom: 10px;
}
.legal-section p, .legal-section li {
  font-size: 0.85rem;
  color: var(--color-text-on-dark);
  margin-bottom: 8px;
}
.legal-section ul { padding-left: 1.2em; list-style: disc; }

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-bottom: 24px;
}
.legal-table th, .legal-table td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--color-line);
  vertical-align: top;
}
.legal-table th {
  width: 34%;
  color: var(--color-text-muted);
  font-weight: 500;
}
.legal-table td { color: var(--color-text-on-dark); }

.legal-updated {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: 30px;
}

/* ---------- 13. アクセシビリティ ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
