* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #fdf6e3;
  --card: #ffffff;
  --ink: #4a3f35;
  --accent: #ff8c42;
  --accent-soft: #ffe3cc;
  --green: #3cb371;
  --green-soft: #d8f3e3;
  --red: #e85555;
  --blue: #5b9bd5;
  --border: #e8ddc9;
  font-size: clamp(12px, 1.3vw, 18px);
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Zen Maru Gothic", "M PLUS Rounded 1c", "Yu Gothic UI", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
}

/* ---------- ヘッダー ---------- */
header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem;
  background: var(--card);
  border-bottom: 3px solid var(--accent-soft);
}
.logo {
  font-size: 1.3rem;
  font-weight: 700;
  margin-right: auto;
}
.icon-btn {
  font-size: 1.3rem;
  background: var(--accent-soft);
  border: none;
  border-radius: 12px;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  transition: transform 0.1s;
}
.icon-btn:hover { transform: scale(1.1); }

/* ---------- レイアウト ---------- */
.layout {
  flex: 1;
  display: flex;
  min-height: 0;
}
#main {
  flex: 1.8;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  overflow-y: auto;
}
#chart {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 0.8rem;
  background: #fbf0da;
  border-left: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

/* ---------- 50音表 ---------- */
.chart-caption {
  font-size: 0.85rem;
  font-weight: 700;
  color: #8a7a63;
  align-self: flex-start;
}
.chart-table {
  border-collapse: separate;
  border-spacing: 2px;
}
.chart-table td {
  width: 3rem;
  height: 3rem;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s, background 0.15s;
}
.chart-table td:hover:not(.empty) { background: var(--accent-soft); transform: scale(1.07); }
.chart-table td.empty {
  background: transparent;
  border-color: transparent;
  cursor: default;
}
.cell-kana {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.15;
}
.cell-roma {
  display: block;
  font-size: 0.65rem;
  color: #a0937f;
  font-family: Consolas, monospace;
}
.chart-table td.target {
  background: var(--accent);
  border-color: #e07a30;
  transform: scale(1.12);
  animation: pulse 1s infinite;
}
.chart-table td.target .cell-kana { color: #fff; }
.chart-table td.target .cell-roma { color: #ffe9d6; }
@keyframes pulse {
  0%, 100% { transform: scale(1.12); }
  50% { transform: scale(1.2); }
}

/* ---------- ボタン ---------- */
.btn {
  font-family: inherit;
  font-weight: 700;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--accent);
  border-radius: 14px;
  padding: 0.5rem 1rem;
  font-size: 1.1rem;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.btn:hover { background: var(--accent-soft); transform: scale(1.05); }
.btn.small { font-size: 0.9rem; padding: 0.3rem 0.8rem; border-width: 2px; }
.btn.big { font-size: 1.4rem; padding: 0.8rem 1.6rem; }

/* ---------- メニュー ---------- */
.menu { max-width: 42rem; width: 100%; }
.menu-title { font-size: 1.7rem; text-align: center; margin-bottom: 0.2rem; }
.menu-lead { text-align: center; color: #8a7a63; margin-bottom: 0.8rem; font-weight: 700; font-size: 0.9rem; }
.menu-section { margin-bottom: 1rem; }
.menu-section h2 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.menu-section h2 small { font-size: 0.8rem; color: #a0937f; font-weight: 400; }
.row-btns { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.5rem; }
.row-btn { width: 3.4rem; height: 3.4rem; font-size: 1.5rem; padding: 0; }
.row-btn.daku { border-color: var(--blue); }
.row-btn.daku:hover { background: #dcebf8; }
.word-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem; }
.word-btn {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  padding: 0.35rem 0.7rem;
  font-size: 1rem;
}
.word-btn-num {
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  width: 1.8rem;
  height: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.word-btn-label small { display: block; font-size: 0.7rem; color: #a0937f; font-weight: 400; }
/* おもしろ ことば */
.word-btn.fun { border-color: #b5854b; background: #fdf3e3; }
.word-btn.fun:hover { background: #f7e4c8; }
.word-btn.fun .word-btn-num { background: none; font-size: 1.5rem; }

/* ---------- れんしゅう画面 ---------- */
.practice {
  width: 100%;
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.practice-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.practice-label { font-weight: 700; font-size: 1.1rem; color: #8a7a63; }

.word-line { display: flex; align-items: center; gap: 0.8rem; }
.word-emoji { font-size: 3rem; }
.word-kana { font-size: 2.4rem; font-weight: 700; letter-spacing: 0.15em; }
.w-done { color: var(--green); }
.w-now {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}
.w-todo { color: #c9bda9; }
.word-progress { font-size: 0.9rem; color: #a0937f; font-weight: 700; }

.target-kana {
  font-size: clamp(4rem, 13vh, 8rem);
  font-weight: 700;
  line-height: 1.05;
  background: var(--card);
  border: 4px solid var(--accent);
  border-radius: 24px;
  padding: 0.2rem 2.2rem;
  min-width: 14rem;
  text-align: center;
  box-shadow: 0 6px 0 var(--accent-soft);
}
.hint {
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(2rem, 6vh, 3rem);
  font-weight: 700;
  letter-spacing: 0.1em;
}
.hint-done { color: var(--green); }
.hint-rest { color: #c9bda9; }

.typed-box {
  background: var(--card);
  border: 3px dashed var(--border);
  border-radius: 16px;
  padding: 0.5rem 1.5rem;
  min-width: 18rem;
  text-align: center;
}
.typed-label { font-size: 0.8rem; color: #a0937f; font-weight: 700; }
.typed-line {
  font-family: Consolas, "Courier New", monospace;
  font-size: 2.4rem;
  font-weight: 700;
  min-height: 3rem;
  letter-spacing: 0.1em;
}
.typed-ok { color: var(--green); }
.typed-bad {
  color: var(--red);
  background: #ffe0e0;
  border-radius: 8px;
  padding: 0 0.2em;
  animation: shake 0.3s;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.typed-caret {
  display: inline-block;
  width: 3px;
  height: 2.2rem;
  background: var(--accent);
  vertical-align: middle;
  margin-left: 4px;
  animation: blink 1s step-start infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.oops { font-size: 1.2rem; font-weight: 700; color: var(--red); }
.hidden-oops { visibility: hidden; }

/* ---------- 画面キーボード(JIS配列) ---------- */
.keyboard {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-top: 0.5rem;
  background: #f3e8d0;
  border: 3px solid var(--border);
  border-radius: 14px;
  padding: 0.5rem;
}
.kb-row { display: flex; gap: 0.3rem; }
.kb-key {
  flex: 1;
  height: clamp(1.8rem, 5vh, 2.8rem);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 7px;
  font-family: Consolas, "Courier New", monospace;
  font-size: clamp(0.85rem, 2vh, 1.25rem);
  font-weight: 700;
  color: #8a7a63;
  box-shadow: 0 2px 0 var(--border);
  position: relative;
}
/* Shift・Enter などの そうさキーは うすく */
.kb-key.kb-mod {
  background: #ece0c8;
  color: #b5a88f;
  font-family: inherit;
}
.kb-key.kb-small { font-size: 0.6rem; }
/* ホームポジション(F・J)の でっぱり */
.kb-key.kb-home::after {
  content: "";
  position: absolute;
  bottom: 3px;
  width: 40%;
  height: 2px;
  background: #c9bda9;
  border-radius: 2px;
}
.kb-key.kb-active {
  background: var(--accent);
  border-color: #e07a30;
  color: #fff;
  box-shadow: 0 3px 0 #e07a30;
  animation: pulse-key 0.8s infinite;
  z-index: 1;
}
.kb-key.kb-active.kb-home::after { background: rgba(255, 255, 255, 0.7); }
@keyframes pulse-key {
  0%, 100% { transform: scale(1.05); }
  50% { transform: scale(1.18); }
}

.dots { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.dot {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--card);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #c9bda9;
}
.dot.now { border-color: var(--accent); color: var(--accent); transform: scale(1.15); }
.dot.done { background: var(--green-soft); border-color: var(--green); color: var(--green); }

/* ---------- きょうりゅう そだて ---------- */
.dino-entry {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  margin-bottom: 0.8rem;
  padding: 0.35rem 1rem;
  border-color: var(--green);
  background: var(--green-soft);
  text-align: left;
}
.dino-entry:hover { background: #c4ecd8; }
.dino-entry-art { width: 3.2rem; flex-shrink: 0; }
.dino-entry-art svg { width: 100%; display: block; }
.dino-entry-text { font-size: 1.2rem; }
.dino-entry-text small {
  display: block;
  font-size: 0.75rem;
  color: #6c8f7c;
  font-weight: 400;
}

.dino-home {
  width: 100%;
  max-width: 46rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}
.dino-stage {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  background: var(--card);
  border: 3px solid var(--green);
  border-radius: 20px;
  padding: 0.8rem 1.5rem;
  width: 100%;
}
.dino-svg { width: clamp(6rem, 18vh, 10rem); display: block; }
.dino-info { flex: 1; }
.dino-title { display: flex; align-items: center; gap: 0.5rem; }
.dino-name { font-size: 1.4rem; font-weight: 700; }
/* レベル */
.lv-badge {
  background: linear-gradient(135deg, #ffb347, #ff8c42);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.1rem 0.6rem;
  box-shadow: 0 2px 0 #e07a30;
}
.lv-badge b { font-size: 1.2rem; }
/* けいけんちバー */
.exp-row { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.25rem; }
.exp-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 5px;
  padding: 0.05rem 0.35rem;
  flex-shrink: 0;
  width: 2.6rem;
  text-align: center;
}
.exp-label.evo { background: var(--green); }
.gauge.exp, .gauge.evo { flex: 1; margin: 0; position: relative; }
.gauge.evo .gauge-fill { background: linear-gradient(90deg, var(--green), #8fd6ae); }
.gauge.exp .gauge-fill { background: linear-gradient(90deg, #ffb347, #ffd89b); }
.gauge-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #4a3f35;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.dino-badge {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border-radius: 999px;
  padding: 0.1rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0.2rem 0;
}
.dino-typed { font-size: 0.85rem; color: #8a7a63; }
.gauge {
  height: 0.9rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin: 0.4rem 0 0.2rem;
}
.gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--green), #8fd6ae);
  border-radius: 999px;
  transition: width 0.4s;
}
.gauge-text { font-size: 0.8rem; color: #8a7a63; font-weight: 700; }

.stage-no { font-size: 0.7rem; opacity: 0.85; }

/* ぼうけんボタン */
.adventure-btns { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
.adventure-btn {
  border-color: var(--red);
  background: #fff2f2;
  font-size: 1.2rem;
  padding: 0.5rem 1.4rem;
}
.adventure-btn:hover { background: #ffe0e0; }
.adventure-btn small { display: block; font-size: 0.7rem; color: #a0937f; font-weight: 400; }
.adventure-btn.continue { border-color: var(--blue); background: #f0f7fd; }
.adventure-btn.continue:hover { background: #dcebf8; }

/* てきずかん */
.battle-title { font-size: 1rem; margin-top: 0.2rem; }
.battle-title small { font-size: 0.72rem; color: #a0937f; font-weight: 400; }
.zukan {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr));
  gap: 0.25rem;
  width: 100%;
}
.zukan-cell {
  font-family: inherit;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 0.15rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s;
}
.zukan-cell.reachable:hover { background: var(--accent-soft); transform: scale(1.07); }
.zukan-cell[disabled] { cursor: default; opacity: 0.85; }
/* まだ あっていない てきは シルエット */
.zukan-cell[disabled] .zukan-art svg { filter: brightness(0) opacity(0.22); }
.zukan-cell.done { border-color: var(--green); background: var(--green-soft); }
.zukan-no {
  position: absolute;
  top: 1px; left: 3px;
  font-size: 0.6rem;
  color: #a0937f;
  font-weight: 700;
}
.zukan-art { width: 2.4rem; }
.zukan-art svg { width: 100%; display: block; }
.zukan-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: #8a7a63;
  line-height: 1.1;
  text-align: center;
}
.zukan-cell.done .zukan-name { color: var(--green); }

/* かくしボス */
.hidden-title { color: #8b5cf6; }
.hidden-zukan {
  grid-template-columns: repeat(auto-fill, minmax(4.6rem, 1fr));
  background: linear-gradient(135deg, #f3edff, #fff6f9);
  border: 2px dashed #b39ddb;
  border-radius: 12px;
  padding: 0.3rem;
}
.hidden-cell { border-color: #b39ddb; }
.hidden-cell.reachable:hover { background: #ede4ff; }
.hidden-cell .zukan-art { width: 3.2rem; }
.hidden-cell.done { border-color: #8b5cf6; background: #ede4ff; }
.hidden-cell.done .zukan-name { color: #7c3aed; }
.hidden-hint {
  font-size: 1.1rem;
  font-weight: 700;
  color: #8b5cf6;
  margin-bottom: 0.4rem;
  animation: pop-up 0.6s;
}

/* はじめから そだてなおす */
.reset-link {
  font-family: inherit;
  font-size: 0.78rem;
  color: #a0937f;
  background: none;
  border: none;
  border-bottom: 1px dotted #c9bda9;
  cursor: pointer;
  margin-top: 0.5rem;
  padding: 0.1rem 0.3rem;
}
.reset-link:hover { color: var(--red); border-color: var(--red); }
/* かくにんパネルは まんなかに うかせて 出す */
.reset-confirm {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 20;
  background: #fff6f6;
  border: 4px solid var(--red);
  border-radius: 18px;
  padding: 1.2rem 1.8rem;
  text-align: center;
  box-shadow: 0 10px 30px #00000030;
}
.reset-q { font-size: 1.1rem; font-weight: 700; }
.reset-warn { font-size: 0.78rem; color: #a0937f; margin: 0.2rem 0 0.5rem; }
.reset-btns { display: flex; gap: 0.7rem; justify-content: center; }
#btn-reset-yes { border-color: var(--red); font-size: 0.95rem; }
#btn-reset-yes:hover { background: #ffe0e0; }
#btn-reset-no { border-color: var(--green); font-size: 0.95rem; }
#btn-reset-no:hover { background: var(--green-soft); }

/* ---------- バトル ---------- */
.battle {
  width: 100%;
  max-width: 52rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}
.battle-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: var(--card);
  border: 3px solid var(--border);
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
}
.fighter { text-align: center; }
.fighter .dino-svg, .enemy-svg { width: clamp(5rem, 14vh, 8rem); display: block; }
/* HPバー */
.hp-bar {
  position: relative;
  height: 1.2rem;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.2rem;
}
.hp-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s;
}
.hp-bar.mine .hp-fill { background: linear-gradient(90deg, var(--green), #8fd6ae); }
.hp-bar.foe  .hp-fill { background: linear-gradient(90deg, #e85555, #ff9a8b); }
.hp-num {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #4a3f35;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.stage-count {
  margin-left: auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: #a0937f;
}
.defeat-note { text-align: center; padding: 0.3rem 0; }
.defeat-emoji { font-size: 2.2rem; animation: bounce 0.5s infinite alternate; }
.exp-gain {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  animation: pop-up 0.5s;
}
.level-note {
  font-size: 1.3rem;
  font-weight: 700;
  color: #e0a800;
  animation: pop-up 0.5s;
}
@keyframes pop-up {
  0% { transform: translateY(14px) scale(0.7); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.fighter-lv {
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  border-radius: 6px;
  padding: 0 0.4rem;
  display: inline-block;
}

/* ---------- こうげきエフェクト(おとな いこう) ---------- */
.fx-wrap { position: relative; }
.fx {
  position: absolute;
  top: 50%;
  left: 60%;
  pointer-events: none;
  z-index: 2;
}
/* かぜの きりさき(おとな〜つばさりゅう) */
.fx-slash {
  width: 6rem;
  height: 6rem;
  transform: translateY(-50%);
  background:
    linear-gradient(115deg, transparent 42%, #fff 46%, #ffe14d 50%, #fff 54%, transparent 58%),
    linear-gradient(105deg, transparent 45%, #fff 49%, #ffd166 52%, transparent 56%);
  filter: drop-shadow(0 0 5px #ffcc33);
  animation: slash-go 0.55s ease-out forwards;
}
@keyframes slash-go {
  0%   { opacity: 0; transform: translate(-30%, -50%) scale(0.5) rotate(-15deg); }
  30%  { opacity: 1; transform: translate(10%, -50%) scale(1.1) rotate(0deg); }
  100% { opacity: 0; transform: translate(60%, -50%) scale(1.3) rotate(10deg); }
}
/* ほのおの ブレス(ひりゅう いこう) */
.fx-fire {
  width: 7rem;
  height: 3.4rem;
  transform: translateY(-50%);
  border-radius: 50% 60% 60% 50% / 50%;
  background: radial-gradient(ellipse at 10% 50%, #fff8b0 0%, #ffd166 25%, #ff8c42 55%, #e8674e 78%, rgba(232,103,78,0) 100%);
  filter: drop-shadow(0 0 8px #ff8c42);
  animation: fire-go 0.6s ease-out forwards;
}
@keyframes fire-go {
  0%   { opacity: 0; transform: translate(-20%, -50%) scaleX(0.2) scaleY(0.6); }
  35%  { opacity: 1; transform: translate(0, -50%) scaleX(1) scaleY(1); }
  70%  { opacity: 0.95; transform: translate(18%, -50%) scaleX(1.25) scaleY(1.1); }
  100% { opacity: 0; transform: translate(45%, -50%) scaleX(1.4) scaleY(0.9); }
}
.battle-msg {
  flex: 1;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  padding: 0 0.5rem;
}
/* こうげき・ダメージの うごき */
.dino-attack { animation: lunge-right 0.6s; }
.enemy-attack { animation: lunge-left 0.6s; }
.dino-hurt, .enemy-hurt { animation: hurt 0.6s; }
@keyframes lunge-right {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(28px) scale(1.08); }
}
@keyframes lunge-left {
  0%, 100% { transform: translateX(0); }
  40% { transform: translateX(-28px) scale(1.08); }
}
@keyframes hurt {
  0%, 100% { transform: translateX(0); opacity: 1; }
  20%, 60% { transform: translateX(-8px); opacity: 0.5; }
  40%, 80% { transform: translateX(8px); opacity: 0.5; }
}
.evolve-note {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--green);
  margin-bottom: 0.5rem;
}

/* ---------- おわり画面 ---------- */
.finish { text-align: center; }
.finish-emoji { font-size: 6rem; animation: bounce 0.8s infinite alternate; }
@keyframes bounce { from { transform: translateY(0); } to { transform: translateY(-14px); } }
.finish-text { font-size: 3rem; font-weight: 700; color: var(--accent); margin: 0.5rem 0; }
.finish-sub { font-size: 1.2rem; color: #8a7a63; font-weight: 700; margin-bottom: 1.5rem; }
.finish-btns { display: flex; gap: 1rem; justify-content: center; }

/* ---------- メニュー下のリンク ---------- */
.menu-foot {
  margin-top: 1.2rem;
  text-align: center;
  font-size: 0.85rem;
}
.menu-foot a {
  color: #a0937f;
  margin: 0 0.8rem;
}
.menu-foot .support-link {
  display: inline-block;
  color: var(--accent);
  font-weight: 700;
  background: var(--card);
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 0.35rem 1.2rem;
  margin-bottom: 0.6rem;
  text-decoration: none;
  transition: transform 0.1s, background 0.15s;
}
.menu-foot .support-link:hover { background: var(--accent-soft); transform: scale(1.05); }

/* ---------- 文書ページ(おうちのかたへ・プライバシーポリシー) ---------- */
body.doc {
  display: block;
  overflow: auto;
}
.doc-wrap {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.2rem 4rem;
  line-height: 1.9;
}
.doc-wrap h1 {
  font-size: 1.6rem;
  border-bottom: 4px solid var(--accent-soft);
  padding-bottom: 0.4rem;
  margin-bottom: 1.2rem;
}
.doc-wrap h2 {
  font-size: 1.2rem;
  color: var(--accent);
  margin: 1.8rem 0 0.6rem;
}
.doc-wrap p, .doc-wrap ul, .doc-wrap ol { margin-bottom: 0.8rem; }
.doc-wrap ul, .doc-wrap ol { padding-left: 1.5rem; }
.doc-wrap a { color: var(--blue); }
.pr-note {
  font-size: 0.8rem;
  color: #8a7a63;
  background: var(--accent-soft);
  border-radius: 8px;
  padding: 0.3rem 0.8rem;
  display: inline-block;
  margin-bottom: 1rem;
}
.ad-slot {
  background: var(--card);
  border: 3px dashed var(--border);
  border-radius: 14px;
  padding: 1.2rem;
  margin: 1rem 0;
  text-align: center;
  color: #b5a88f;
  font-size: 0.9rem;
}
.doc-foot {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: #a0937f;
}

/* ---------- 縦長画面(タブレット縦など) ---------- */
@media (max-aspect-ratio: 1/1) {
  .layout { flex-direction: column; }
  #chart {
    border-left: none;
    border-top: 3px solid var(--border);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
  .chart-caption { align-self: center; width: 100%; text-align: center; }
  .target-kana { font-size: 6rem; }
}
