:root {
  --bg-0: #0c0f2c;
  --bg-1: #181445;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-line: rgba(233, 196, 106, 0.22);
  --ink: #ece9ff;
  --ink-mute: #c9c6f0;
  --accent: #e9c46a; /* 唯一のアクセント(金) */
  --accent-soft: rgba(233, 196, 106, 0.16);
  --card-w: 240px;       /* 引いて拡大表示するときの大きさ */
  --card-h: 360px;
  --deck-card-w: 84px;   /* シャッフル中の束は小さめ */
  --deck-card-h: 126px;
  --radius: 16px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 700px at 50% -10%, #2a2068 0%, transparent 60%),
    linear-gradient(160deg, var(--bg-0), var(--bg-1));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* 宇宙の星空背景(パーティクル)。コンテンツの背面に固定。 */
.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  display: block;
}
.stage {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ---- ブランド ---- */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  margin-bottom: 18px;
}
.brand-moon { color: var(--accent); font-size: 30px; line-height: 1; }
.brand-name { font-size: 20px; letter-spacing: 0.18em; }
.brand-sub { font-size: 12px; letter-spacing: 0.28em; color: var(--ink-mute); }

/* ---- 画面切替 ---- */
.screen {
  width: 100%;
  display: none;
  flex-direction: column;
  align-items: center;
  animation: fade-in 0.5s ease both;
}
.screen.is-active { display: flex; }

@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.lead {
  text-align: center;
  color: var(--ink-mute);
  font-size: 16px;
  margin: 4px 0 22px;
  line-height: 1.8;
}

/* ---- 今日の空と暦 ---- */
.almanac {
  width: 100%;
  margin: 2px 0 28px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
}
.almanac-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.moon-orb {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  overflow: hidden;
  background: #24244d;
  border: 1px solid rgba(233, 196, 106, 0.4);
  box-shadow: inset 0 0 28px rgba(255, 255, 255, 0.08), 0 10px 32px rgba(0, 0, 0, 0.32);
}
.moon-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.moon-disc { fill: #24244d; }
.moon-lit { fill: #f6e3a5; }
.almanac-date {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.12em;
}
.almanac-title {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.45;
  letter-spacing: 0;
}
.almanac-copy {
  margin: 16px 0 18px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.9;
}
.almanac-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.almanac-card {
  padding: 14px 15px;
  border: 1px solid rgba(233, 196, 106, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.04);
}
.almanac-label {
  display: block;
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.1em;
}
.almanac-list {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.85;
}
.almanac-list p {
  margin: 0;
}
.almanac-list p + p {
  margin-top: 8px;
}
.signs-wrap {
  margin-top: 2px;
}
.sign-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  padding: 2px 0 10px;
}
.sign-tab {
  min-width: 0;
  padding: 9px 4px;
  text-align: center;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}
.sign-tab.is-active {
  color: #1a1330;
  background: linear-gradient(180deg, #f3d585, var(--accent));
  border-color: transparent;
}
.sign-comment {
  min-height: 68px;
  margin: 2px 0 12px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(233, 196, 106, 0.18);
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.9;
}
.almanac .btn-primary {
  width: 100%;
}

/* ---- フォーム ---- */
#reading-form { width: 100%; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 14px; letter-spacing: 0.06em; }
.field-label em { color: var(--ink-mute); font-style: normal; font-size: 12px; }
.field-hint { align-self: flex-end; font-size: 12px; color: var(--ink-mute); }

input[type="text"], input[type="date"], select, textarea {
  font-family: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.7; }

/* 生年月日: 年・月・日の 3 ドロップダウン(誕生日はカレンダーより選びやすい) */
.date-selects { display: flex; gap: 8px; }
.date-selects select {
  flex: 1 1 0;
  min-width: 0;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
}

/* ---- 入口の3択(週間 / 相性 / その他) ---- */
.mode-q { margin: 0 0 10px; }
.mode-options { display: flex; flex-direction: column; gap: 10px; }
.mode-option {
  width: 100%;
  text-align: left;
  padding: 15px 16px;
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
}
.mode-option:active { transform: scale(0.99); }
.mode-option.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.mode-panel { margin-top: 2px; }

.form-error {
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  margin: 2px 0 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 8px;
  text-align: center;
}
.form-error::before { content: "⚠ ご確認ください: "; }

/* ---- ボタン ---- */
.btn-primary {
  margin-top: 8px;
  font-family: inherit;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: #1a1330;
  background: linear-gradient(180deg, #f3d585, var(--accent));
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  cursor: pointer;
  transition: transform 0.12s, opacity 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 26px rgba(233, 196, 106, 0.22);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.4; cursor: default; box-shadow: none; }

.btn-ghost {
  margin-top: 22px;
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 11px 24px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-ghost:hover { background: var(--accent-soft); }

/* ---- シャッフル ---- */
.shuffle-guide {
  text-align: center;
  font-size: 15px;
  color: var(--ink-mute);
  margin: 6px 0 18px;
}
.shuffle-guide strong { color: var(--accent); font-weight: 600; }

.deck {
  position: relative;
  width: 100%;
  height: 400px;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  overflow: visible;
}
.deck:active { cursor: grabbing; }

.deck-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(64px, var(--deck-card-w));
  height: var(--deck-card-h);
  margin: calc(var(--deck-card-h) / -2) 0 0 calc(var(--deck-card-w) / -2);
  border-radius: calc(var(--radius) * 0.6);
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
  /* 位置は毎フレーム JS の物理演算で更新するので transition は付けない。 */
  will-change: transform;
  pointer-events: none;
  border: 1px solid rgba(233, 196, 106, 0.12);
  background: rgba(255, 255, 255, 0.03);
}
.deck-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deck.is-pick-mode {
  cursor: default;
  touch-action: manipulation;
  height: 450px;
}
.deck.is-pick-mode .deck-card {
  pointer-events: auto;
  cursor: pointer;
}
.deck.is-pick-mode .deck-card:hover,
.deck.is-pick-mode .deck-card:focus-visible {
  outline: none;
  filter: brightness(1.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.46), 0 0 0 2px rgba(233, 196, 106, 0.36);
  transform: translate(var(--pick-x, 0), var(--pick-y, 0)) rotate(var(--pick-r, 0deg)) translateY(-6px);
}
.deck-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.52), 0 0 0 3px rgba(233, 196, 106, 0.42), 0 0 28px rgba(233, 196, 106, 0.5);
}

/* タップ時の選択ハイライト/長押しメニュー/画像ドラッグを抑止(束・結果のカード共通)。 */
.deck-card, .deck-card img, .reveal-face img {
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

.shuffle-meter {
  width: 220px;
  margin: 18px 0 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.shuffle-meter-bar {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}
.shuffle-meter-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f3d585, var(--accent));
  transition: width 0.2s ease;
}
.shuffle-state { font-size: 12px; letter-spacing: 0.1em; color: var(--ink-mute); }

/* Turnstile(設定時のみ表示) */
.turnstile-holder { margin: 4px 0 18px; display: flex; justify-content: center; min-height: 0; }
.turnstile-holder[hidden] { display: none; }

/* ---- 結果 ---- */
.reveal { display: flex; flex-direction: column; align-items: center; }

.reveal-card {
  width: var(--card-w);
  height: var(--card-h);
  perspective: 1400px;
  transform-origin: center center;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
/* 引く瞬間は束と同じ小ささ→めくりながら大きくなる(=「大きくなる」演出)。 */
.reveal-card.is-small {
  transform: scale(calc(var(--deck-card-w) / var(--card-w)));
}
.reveal-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal-card.is-flipped .reveal-card-inner { transform: rotateY(180deg); }

.reveal-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}
.reveal-face img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reveal-front { transform: rotateY(180deg); }
/* 逆位置はカード絵を 180 度回す */
.reveal-card.is-reversed .reveal-front img { transform: rotate(180deg); }

.reveal-card.is-waiting .reveal-card-inner { animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-6px) scale(1.015); }
}

.reveal-name {
  font-size: 22px;
  letter-spacing: 0.12em;
  margin: 22px 0 2px;
}
.reveal-orient {
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0;
  font-weight: 700;
}

.reading-wrap { width: 100%; display: flex; flex-direction: column; align-items: center; animation: fade-in 0.6s ease both; }
.reading-wrap[hidden] { display: none; } /* display:flex が hidden 属性を上書きして空枠が残るのを防ぐ */
.reading-text {
  width: 100%;
  margin-top: 26px;
  padding: 22px 22px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: var(--radius);
  font-size: 15px;
  line-height: 2.05;
  white-space: pre-wrap;
}
.reading-foot {
  width: 100%;
  margin: 14px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-mute);
  text-align: center;
}
.share-card-ui {
  width: 100%;
  margin-top: 18px;
  padding: 14px 16px 16px;
  border: 1px solid rgba(233, 196, 106, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  text-align: center;
}
.share-card-ui[hidden] { display: none; }
.share-card-title {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.share-card-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}
.share-card-actions .btn-primary,
.share-card-actions .btn-ghost {
  margin-top: 0;
  text-decoration: none;
}
.today-video-card {
  width: 100%;
  margin-top: 18px;
  border: 1px solid rgba(233, 196, 106, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
}
.today-video-card[hidden] { display: none; }
.today-video-link {
  display: grid;
  grid-template-columns: 132px 1fr;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
}
.today-video-link img {
  width: 132px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}
.today-video-copy {
  min-width: 0;
  padding: 12px 14px 12px 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.today-video-label {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.today-video-title {
  font-size: 15px;
  line-height: 1.5;
}
.reading-status { margin-top: 16px; font-size: 14px; letter-spacing: 0.22em; color: var(--ink-mute); }
/* 「占っています」を金色でやさしく点滅(確実に表示される方式)。 */
.reading-status.is-loading {
  color: var(--accent);
  animation: status-pulse 2.4s ease-in-out infinite;
}
@keyframes status-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ---- 鑑定生成中: ローダー/文言以外(カード・ヘッダー)を少し暗くする ---- */
body.is-casting .brand,
body.is-casting #screen-result .reveal {
  opacity: 0.16;
  filter: blur(1px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}
/* ローダーと「占っています」は明るいまま。 */
body.is-casting .astro-loader { opacity: 1; }

/* ---- 鑑定生成中ローダー(ホロスコープ風) ---- */
.astro-loader { position: relative; width: 96px; height: 96px; margin: 26px auto 4px; }
.astro-loader[hidden] { display: none; }
.astro-ring, .astro-ring2 {
  position: absolute; inset: 0; border-radius: 50%;
  border: 1px dashed rgba(233, 196, 106, 0.55);
  animation: astro-spin 6.5s linear infinite;
}
.astro-ring2 {
  inset: 16px; border-style: dotted; border-color: rgba(233, 196, 106, 0.35);
  animation: astro-spin 4.2s linear infinite reverse;
}
.astro-orbit { position: absolute; inset: 0; animation: astro-spin 8s linear infinite; }
.astro-star {
  position: absolute; left: 50%; top: 50%; width: 16px; height: 16px;
  margin: -8px 0 0 -8px; line-height: 16px; text-align: center;
  color: var(--accent); font-size: 13px;
  transform: rotate(var(--a)) translateY(-47px);
}
.astro-core {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 26px; animation: astro-pulse 2.4s ease-in-out infinite;
}
@keyframes astro-spin { to { transform: rotate(360deg); } }
@keyframes astro-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.94); }
  50% { opacity: 1; transform: scale(1.06); }
}

.btn-ghost:disabled { opacity: 0.4; cursor: default; }

/* ---- スプレッド選択 ---- */
.spread-reason {
  text-align: center; color: var(--accent); font-size: 14px; line-height: 1.9;
  margin: 0 0 18px; padding: 0 6px;
}
.spread-options { width: 100%; display: flex; flex-direction: column; gap: 12px; }
.spread-option {
  position: relative; text-align: left; cursor: pointer;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  padding: 16px 18px; color: var(--ink); font-family: inherit;
  transition: border-color 0.2s, background 0.2s, transform 0.12s;
}
.spread-option:hover { border-color: var(--accent); }
.spread-option:active { transform: scale(0.99); }
.spread-option .so-name { font-size: 16px; letter-spacing: 0.06em; }
.spread-option .so-count { color: var(--ink-mute); font-size: 12px; margin-left: 8px; }
.spread-option .so-desc { color: var(--ink); font-size: 14px; line-height: 1.7; margin-top: 6px; }
.spread-option.is-recommended { border-color: var(--accent); background: var(--accent-soft); }
.spread-option .so-badge {
  position: absolute; top: -9px; right: 14px;
  background: linear-gradient(180deg, #f3d585, var(--accent)); color: #1a1330;
  font-size: 11px; letter-spacing: 0.08em; padding: 3px 10px; border-radius: 999px;
}

/* ---- スプレッド盤面(展開+順次リビール) ---- */
.board-spread-name { font-size: 14px; letter-spacing: 0.14em; color: var(--accent); margin: 2px 0 4px; }
.board {
  --slot-w: 42px; --slot-h: 63px;
  position: relative; width: 100%; height: 320px; margin: 0 auto 2px;
}
.board-slot {
  position: absolute; width: var(--slot-w); height: var(--slot-h);
  margin: calc(var(--slot-h) / -2) 0 0 calc(var(--slot-w) / -2);
  border-radius: 7px; overflow: hidden; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
  transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.board-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }

.board-focus {
  --focus-w: 232px; --focus-h: calc(var(--focus-w) * 1.5); /* 高さは幅追従(2:3) */
  position: absolute; left: 50%; top: 50%;
  width: var(--focus-w); height: var(--focus-h);
  margin: calc(var(--focus-h) / -2) 0 0 calc(var(--focus-w) / -2);
  perspective: 1200px; z-index: 30;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.board-focus[hidden] { display: none; }
.board-focus-inner {
  position: absolute; inset: 0; transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}
.board-focus.is-flipped .board-focus-inner { transform: rotateY(180deg); }
.board-focus .reveal-face { border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55); }
.board-focus.is-reversed .reveal-front img { transform: rotate(180deg); }

.board-caption { width: 100%; text-align: center; animation: fade-in 0.4s ease both; }
.board-caption[hidden] { display: none; }
.board-pos { font-size: 12px; letter-spacing: 0.12em; color: var(--ink-mute); margin: 4px 0 0; }
.board-caption .reveal-name { margin: 6px 0 2px; }
.board-blurb {
  width: 100%; margin: 8px 0 0; padding: 12px 16px;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius);
  font-size: 14px; line-height: 1.85;
}
/* めくったカードはタイトル/ボタンの上まで大きく出す。「次へ」は小型・前面で押せるように。 */
#board-next {
  margin-top: 4px; position: relative; z-index: 40;
  font-size: 13px; letter-spacing: 0.08em; padding: 9px 22px;
  box-shadow: 0 6px 18px rgba(233, 196, 106, 0.2);
}
/* 配り演出は「背景として」見せたいので、カードより控えめな減光。 */
body.is-casting #board { opacity: 0.42; filter: blur(0.4px); transition: opacity 0.4s ease, filter 0.4s ease; }

@media (max-width: 420px) {
  :root { --card-w: 208px; --card-h: 312px; --deck-card-w: 76px; --deck-card-h: 114px; }
  .deck { height: 360px; }
  .deck.is-pick-mode { height: 520px; }
  .today-video-link { grid-template-columns: 112px 1fr; gap: 12px; }
  .today-video-link img { width: 112px; }
  .today-video-title { font-size: 14px; }
  /* スマホでは拡大カードを画面いっぱい近くまで大きく(高さは幅追従)。 */
  .board-focus { --focus-w: 300px; }
}

/* ===== サイトフッター(規約・ポリシーへの導線) ===== */
.site-foot {
  width: 100%;
  max-width: 560px;
  margin: 8px auto 0;
  padding: 18px 20px 8px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  border-top: 1px solid var(--panel-line);
}
.site-foot a { color: var(--accent); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot .foot-sep { margin: 0 8px; opacity: 0.5; }
.site-foot .foot-note { display: block; margin-top: 8px; opacity: 0.85; line-height: 1.7; }

/* ===== 規約・ポリシーページ ===== */
.legal {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 4px 22px 64px;
  line-height: 1.9;
}
.legal h1 {
  font-size: 22px;
  letter-spacing: 0.06em;
  margin: 12px 0 4px;
  color: var(--ink);
}
.legal .updated { font-size: 12px; color: var(--ink-mute); margin: 0 0 22px; }
.legal h2 {
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin: 28px 0 8px;
  padding-left: 10px;
  border-left: 2px solid var(--panel-line);
}
.legal p { margin: 8px 0; color: var(--ink); font-size: 14px; }
.legal ul { margin: 8px 0; padding-left: 1.2em; }
.legal li { margin: 5px 0; font-size: 14px; }
.legal .lead { color: var(--ink-mute); font-size: 14px; }
.legal a { color: var(--accent); }
.legal .back {
  display: inline-block;
  margin-top: 36px;
  font-size: 14px;
  color: var(--accent);
  text-decoration: none;
}
.legal .back:hover { text-decoration: underline; }

/* ===== オートフィル(端末内保存)の注記と「消す」リンク ===== */
.saved-note {
  width: 100%;
  margin: 14px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-mute);
}
.saved-note[hidden] { display: none; }
.link-clear {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 4px;
  background: none;
  border: none;
  color: var(--accent);
  font: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
}
.link-clear:hover { opacity: 0.85; }
.link-clear[hidden] { display: none; }
