/* 全ページ共通のスタイル。やさしい パステル調・大きめの文字(小さい子でも読みやすく) */
:root {
  --bg: #fff8ec;
  --card: #ffffff;
  --ink: #3b2f2a;
  --muted: #7a6a60;
  --line: #efdcc4;
  --accent: #ff8a65;
  --accent-dark: #e8663f;
  --peach: #ffb4a2;
  --leaf: #7bc47f;
  --sky: #7ec8e3;
  --gold: #f4c542;
  --danger: #e5484d;
  --radius: 16px;
  --shadow: 0 4px 0 rgba(59, 47, 42, 0.08);
  --font: "Hiragino Maru Gothic ProN", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 2.1; /* ふりがなが 上の行に ぶつからないように 行間を広めに */
}

a { color: var(--accent-dark); }

h1, h2, h3 { line-height: 1.9; margin: 0 0 0.4em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.25rem; }
p { margin: 0.3em 0; }

/* ふりがな */
ruby { ruby-position: over; }
rt {
  font-size: 0.55em;
  line-height: 1;
  color: var(--muted);
  letter-spacing: 0;
  font-weight: normal;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

[hidden] { display: none !important; }

/* ── ヘッダー ─────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  padding: 6px 16px;
  background: #fff3dd;
  border-bottom: 3px solid var(--line);
}
.site-logo {
  font-weight: bold;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 14px;
  font-size: 0.9rem;
}
.st-power { display: inline-flex; align-items: center; gap: 6px; }
.st-power .bar { width: 90px; }
.st-power.is-pinch { color: var(--danger); font-weight: bold; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 16px;
}

.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 24px 16px;
}

/* ── カード・メッセージ ───────────── */
.card {
  background: var(--card);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 16px;
}
.notice { border-color: var(--sky); }
.notice.is-pinch { border-color: var(--danger); background: #fff0f0; }

.flash {
  border-radius: 12px;
  padding: 8px 16px;
  margin: 0 0 12px;
  background: #eef7ff;
  border: 2px solid var(--sky);
}
.flash-good { background: #effaf0; border-color: var(--leaf); }
.flash-great { background: #fff8d6; border-color: var(--gold); font-weight: bold; }
.flash-bad { background: #fff0f0; border-color: var(--danger); }

.note { color: var(--muted); font-size: 0.9rem; }
.hint { color: var(--accent-dark); font-weight: bold; }
.tag {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.75rem;
  line-height: 1.8;
  vertical-align: middle;
}
.buffs { color: #8a5a00; font-size: 0.9rem; }
.owned { color: var(--muted); font-size: 0.85rem; }

/* ── ボタン ───────────────────────── */
.btn {
  display: inline-block;
  font: inherit;
  font-size: 1rem;
  line-height: 2;
  color: var(--ink);
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 999px;
  padding: 2px 18px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 3px 0 var(--line);
  transition: transform 0.05s;
  margin: 2px 0;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(2px); box-shadow: none; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: var(--accent-dark); color: #fff; box-shadow: 0 3px 0 var(--accent-dark); }
.btn-gacha { background: var(--gold); border-color: #c99a14; box-shadow: 0 3px 0 #c99a14; font-weight: bold; }
.btn-flee { color: var(--muted); }
.btn-big { font-size: 1.2rem; padding: 6px 28px; }
.btn-small { font-size: 0.85rem; padding: 0 12px; }
.btn.is-active { background: var(--leaf); border-color: #4f9a53; color: #fff; }
.btn-buy { white-space: nowrap; }
.inline-forms { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* ── ゲージ ───────────────────────── */
.bar {
  height: 14px;
  background: #f1e6d8;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid #e2cfb6;
}
.bar-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--leaf);
  border-radius: 999px;
  transition: width 0.3s;
}
.bar.is-low .bar-fill { background: var(--danger); }
.bar-enemy .bar-fill { background: #b36bd6; }
.bar-timer .bar-fill { background: var(--sky); transition: none; }

/* ── 画像(無いときは絵文字) ──────── */
.gimg { display: inline-block; vertical-align: middle; }
img.gimg { max-width: 100%; height: auto; object-fit: contain; }
.gimg.emoji { line-height: 1.2; font-size: 2rem; text-align: center; }

/* ── 町なみ(背景) ────────────────── */
.scene {
  position: relative;
  border-radius: var(--radius);
  padding: 12px;
  margin: 8px 0;
  text-align: center;
  background: linear-gradient(#bfe6ff, #e9f7d8);
  overflow: hidden;
}
.scene-peach { background: linear-gradient(#ffd9e2, #fff1d6); }
.scene-seto { background: linear-gradient(#a9dcf5, #d6f1ff); }
.scene.is-future { background: linear-gradient(#2d2a6e, #6b5bd6 60%, #ffb4a2); color: #fff; }
.scene-row { font-size: 2.4rem; letter-spacing: 0.2em; line-height: 1.6; }
.scene-bg { width: 100%; border-radius: 12px; }
.scene-deco { font-size: 1.8rem; letter-spacing: 0.3em; }
.scene-progress { font-weight: bold; font-size: 0.95rem; }

/* ── 一覧 ─────────────────────────── */
.plain-list { padding-left: 1.2em; margin: 0.4em 0; }
.goods, .enemy-list, .member-list, .dest-list, .trouble-list, .invention-list, .equip-list, .parts-pick, .garden {
  list-style: none;
  padding: 0;
  margin: 0;
}

.table { width: 100%; border-collapse: collapse; margin: 8px 0; font-size: 0.95rem; }
.table th, .table td { border-bottom: 2px solid var(--line); padding: 4px 8px; text-align: left; }
.rarity-super td:first-child { color: #c95b00; font-weight: bold; }
.rarity-ultra td:first-child { color: #b000c9; font-weight: bold; }

@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.35rem; }
  .card { padding: 12px 14px; }
  .st-power .bar { width: 60px; }
}
