/* =========================================================================
   パチンコ・パチスロ 思い出年表
   ========================================================================= */

:root {
  --bg:          #0e0f14;
  --bg-soft:     #161822;
  --bg-raise:    #1d2030;
  --line:        #2a2e42;
  --text:        #e7e9f0;
  --text-dim:    #9aa0b5;
  --text-faint:  #666d85;

  --pachi:       #ff4d6d;   /* パチンコ = 赤 */
  --pachi-soft:  rgba(255, 77, 109, .12);
  --slot:        #3fc7e8;   /* パチスロ = 青 */
  --slot-soft:   rgba(63, 199, 232, .12);
  --gold:        #f5c04a;

  --radius:      12px;
  --shadow:      0 8px 24px rgba(0,0,0,.45);

  --rail:        108px;     /* 中央の年レーンの幅 */
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 15% -10%, rgba(255,77,109,.10), transparent 60%),
    radial-gradient(900px 500px at 85% -10%, rgba(63,199,232,.10), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 最初の画面 ---------- */
.opening {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(700px 420px at 20% 10%, rgba(255,77,109,.16), transparent 65%),
    radial-gradient(700px 420px at 80% 90%, rgba(63,199,232,.14), transparent 65%),
    #0b0c11;
  overflow-y: auto;
}
.opening[hidden] { display: none; }
.opening-inner { max-width: 520px; width: 100%; text-align: center; margin: auto; }
.opening-eyebrow {
  margin: 0; font-size: .72rem; letter-spacing: .34em; color: var(--text-faint);
}
.opening-title {
  margin: 8px 0 0; font-size: clamp(2.2rem, 8vw, 3.4rem); font-weight: 800;
  letter-spacing: .1em;
  background: linear-gradient(92deg, var(--pachi), var(--gold) 55%, var(--slot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.opening-lead { margin: 18px 0 34px; font-size: .9rem; color: var(--text-dim); line-height: 2; }

.opening-field {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap;
}
.opening-field > span:first-child {
  flex-basis: 100%; font-size: .84rem; color: var(--text); margin-bottom: 10px;
}
.opening-field input {
  width: 160px; font: inherit; font-size: 1.6rem; font-weight: 700; text-align: center;
  letter-spacing: .08em;
  padding: 10px 12px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg-soft); color: var(--text);
}
.opening-field input:focus { outline: none; border-color: var(--gold); }
.opening-unit { font-size: 1rem; color: var(--text-dim); }
.opening-hint { margin: 16px 0 0; font-size: .72rem; color: var(--text-faint); line-height: 1.9; }
.opening-actions {
  display: flex; gap: 12px; justify-content: center; align-items: center;
  margin-top: 30px; flex-wrap: wrap;
}
.btn-lg { font-size: .95rem; padding: 13px 42px; }

/* ---------- ヘッダ ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(14,15,20,.85);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 30;
}
.header-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand h1 {
  margin: 0; font-size: 1.35rem; letter-spacing: .14em; font-weight: 800;
  background: linear-gradient(92deg, var(--pachi), var(--gold) 55%, var(--slot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.tagline { margin: 2px 0 0; font-size: .78rem; color: var(--text-faint); letter-spacing: .06em; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- ボタン ---------- */
.btn {
  font: inherit; font-size: .82rem; cursor: pointer;
  padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--bg-soft); color: var(--text-dim);
  transition: .16s ease;
}
.btn:hover { color: var(--text); border-color: #3c4160; background: var(--bg-raise); }
.btn-primary { background: linear-gradient(94deg, var(--pachi), #ff7a4d); border-color: transparent; color: #fff; font-weight: 700; padding: 9px 26px; }
.btn-primary:hover { filter: brightness(1.12); color: #fff; }
.btn-travel {
  background: linear-gradient(94deg, var(--gold), #e0a13a);
  border-color: transparent; color: #241a05; font-weight: 800; letter-spacing: .04em;
}
.btn-travel:hover { filter: brightness(1.12); color: #241a05; border-color: transparent; }
.btn-sound {
  background: linear-gradient(94deg, var(--pachi), #ff7a4d);
  border-color: transparent; color: #fff; font-weight: 700;
}
.btn-sound:hover { filter: brightness(1.14); color: #fff; border-color: transparent; }
.btn-danger { color: #ff8b9f; border-color: rgba(255,77,109,.35); background: transparent; }
.btn-danger:hover { background: var(--pachi-soft); color: #ffb3c0; }

/* ---------- 年齢バナー ---------- */
.age-banner {
  max-width: 1180px; margin: 14px auto 0; padding: 10px 18px;
  background: linear-gradient(90deg, var(--pachi-soft), transparent 60%, var(--slot-soft));
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: .84rem; color: var(--text-dim); text-align: center;
}
.age-banner b { color: var(--gold); }
.banner-guide { display: block; font-size: .92rem; color: var(--text); }
.banner-guide b { color: var(--gold); }
.banner-sub { display: block; margin-top: 4px; font-size: .76rem; color: var(--text-faint); }
.banner-sub b { color: var(--text-dim); }

/* ---------- ツールバー ---------- */
.toolbar { position: sticky; top: 63px; z-index: 25; background: rgba(14,15,20,.9); backdrop-filter: blur(8px); }
.toolbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.search {
  flex: 1 1 240px; min-width: 180px;
  font: inherit; font-size: .88rem;
  padding: 9px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--bg-soft); color: var(--text);
}
.search::placeholder { color: var(--text-faint); }
.search:focus { outline: none; border-color: var(--gold); }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font: inherit; font-size: .78rem; cursor: pointer;
  padding: 7px 15px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--text-faint);
  transition: .16s ease;
}
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 700; }
.count { font-size: .76rem; color: var(--text-faint); margin-left: auto; white-space: nowrap; }

/* ---------- 年表 ---------- */
.timeline-wrap { max-width: 1180px; margin: 0 auto; padding: 8px 20px 80px; }

.col-headings {
  display: grid; grid-template-columns: 1fr var(--rail) 1fr;
  padding: 10px 0 4px; position: sticky; top: 122px; z-index: 20;
  background: linear-gradient(180deg, var(--bg) 62%, transparent);
}
.col-heading { font-size: .72rem; letter-spacing: .2em; font-weight: 700; }
.heading-p { text-align: right; color: var(--pachi); }
.heading-s { text-align: left;  color: var(--slot); }

.timeline { position: relative; }
/* 中央の縦ライン */
.timeline::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%;
  width: 2px; margin-left: -1px;
  background: linear-gradient(180deg, transparent, var(--line) 6%, var(--line) 94%, transparent);
}

/* 時代の帯 */
.era {
  position: relative; z-index: 2; margin: 34px 0 22px;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 20px; border-radius: var(--radius);
  background: linear-gradient(90deg, rgba(245,192,74,.14), rgba(245,192,74,.03));
  border: 1px solid rgba(245,192,74,.3);
}
.era-year { font-size: .95rem; font-weight: 800; color: var(--gold); letter-spacing: .05em; flex: 0 0 auto; }
.era-label { font-weight: 700; font-size: .92rem; flex: 0 0 auto; }
.era-desc { font-size: .78rem; color: var(--text-dim); }

/* 年ブロック */
.year-row {
  display: grid; grid-template-columns: 1fr var(--rail) 1fr;
  align-items: start; gap: 0; padding: 12px 0; position: relative; z-index: 2;
}
.rail { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.rail-year {
  font-size: 1.02rem; font-weight: 800; letter-spacing: .04em;
  background: var(--bg); padding: 3px 12px; border-radius: 999px; border: 1px solid var(--line);
}
/* 年号はボタン。押せることが伝わるよう、常に淡く光らせておく */
.rail-year {
  font: inherit; cursor: pointer; transition: .16s ease; position: relative;
  box-shadow: 0 0 0 3px rgba(245,192,74,.07);
}
.rail-year:hover {
  border-color: var(--gold); color: var(--gold); transform: scale(1.08);
  box-shadow: 0 0 0 4px rgba(245,192,74,.2);
}
/* ホバー中だけ「この年へ」と出す */
.rail-year::after {
  content: "この年へ";
  position: absolute; left: 50%; top: -22px; transform: translateX(-50%);
  font-size: .6rem; letter-spacing: .08em; white-space: nowrap;
  color: var(--gold); background: var(--bg-raise);
  border: 1px solid rgba(245,192,74,.4); border-radius: 999px; padding: 1px 8px;
  opacity: 0; pointer-events: none; transition: opacity .14s ease;
}
.rail-year:hover::after { opacity: 1; }
.rail-year.is-done { border-color: rgba(126, 217, 87, .55); color: #b9f0a0; }
.rail-year.has-memo { border-color: var(--gold); color: var(--gold); box-shadow: 0 0 0 3px rgba(245,192,74,.12); }
.rail-memo {
  margin-top: 5px; font-size: .64rem; font-weight: 700;
  color: var(--gold); background: rgba(245,192,74,.1);
  border: 1px solid rgba(245,192,74,.3);
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}
.rail-done {
  margin-top: 5px; font-size: .64rem; font-weight: 700; letter-spacing: .04em;
  color: #7ed957; background: rgba(126, 217, 87, .1);
  border: 1px solid rgba(126, 217, 87, .3);
  padding: 1px 8px; border-radius: 999px; white-space: nowrap;
}

.rail-age {
  margin-top: 6px; font-size: .72rem; font-weight: 700; color: var(--gold);
  background: rgba(245,192,74,.1); border: 1px solid rgba(245,192,74,.28);
  padding: 2px 10px; border-radius: 999px; white-space: nowrap;
}
.side { display: flex; flex-direction: column; gap: 10px; }
.side-p { align-items: flex-end;   padding-right: 18px; }
.side-s { align-items: flex-start; padding-left: 18px; }

/* ---------- その年の世の中（世相の帯） ---------- */
.year-context {
  position: relative; z-index: 2;
  margin: 2px 0 16px; padding: 9px 18px;
  display: flex; flex-wrap: wrap; gap: 6px 22px;
  border-radius: var(--radius);
  background: rgba(63, 199, 232, .05);
  border: 1px solid rgba(63, 199, 232, .16);
  border-left: 3px solid rgba(63, 199, 232, .45);
}
.ctx-item { display: flex; align-items: baseline; gap: 7px; font-size: .78rem; }
.ctx-icon { flex: 0 0 auto; font-size: .82rem; cursor: default; }
.ctx-text { color: var(--text-dim); }

.chip-toggle { border-color: rgba(63,199,232,.4); color: var(--slot); }
.chip-toggle.is-active { background: var(--slot); border-color: var(--slot); color: #08222b; font-weight: 700; }

/* ---------- 機種カード ---------- */
/* カード本体と「打った」ボタンを重ねる。押し間違えないよう役割を分ける */
.card-wrap { position: relative; width: 100%; max-width: 340px; }

.mark {
  position: absolute; top: 8px; right: 10px; z-index: 3;
  font: inherit; font-size: .62rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 9px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: var(--bg); color: var(--text-faint);
  opacity: .55; transition: .14s ease;
}
.card-wrap:hover .mark { opacity: 1; }
.mark:hover { border-color: var(--gold); color: var(--gold); }
.mark.is-on {
  opacity: 1; background: var(--gold); border-color: var(--gold); color: #241a05;
}

.card.is-played { border-color: rgba(245,192,74,.5); background: rgba(245,192,74,.05); }
.card-p.is-played { border-left-color: var(--pachi); }
.card-s.is-played { border-right-color: var(--slot); }

.card {
  width: 100%; max-width: 340px; text-align: left;
  font: inherit; cursor: pointer;
  background: var(--bg-soft); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 15px;
  transition: .16s ease; position: relative;
}
.card:hover { transform: translateY(-2px); border-color: #414868; box-shadow: var(--shadow); }
.card-p { border-left: 3px solid var(--pachi); }
.card-p:hover { background: linear-gradient(90deg, var(--pachi-soft), var(--bg-soft) 55%); }
.card-s { border-right: 3px solid var(--slot); }
.card-s:hover { background: linear-gradient(270deg, var(--slot-soft), var(--bg-soft) 55%); }

/* 機種カードのサムネイル（動画IDが分かっている機種だけ表示） */
.card-thumb {
  position: relative; margin: -1px -1px 8px; border-radius: 11px 11px 0 0;
  overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg);
}
.card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-thumb-play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #fff; background: rgba(0,0,0,.15);
  opacity: 0; transition: opacity .14s ease;
}
.card:hover .card-thumb-play { opacity: 1; background: rgba(0,0,0,.35); }

.card-name { font-weight: 700; font-size: .95rem; color: var(--text); padding-right: 58px; }
.card-maker { font-size: .74rem; color: var(--text-faint); margin-top: 1px; }
.card-month { color: var(--text-dim); }
.card-note { font-size: .76rem; color: var(--text-dim); margin-top: 7px; }
.card-memo {
  margin-top: 9px; padding-top: 8px; border-top: 1px dashed var(--line);
  font-size: .78rem; color: var(--gold);
}
.card-memo::before { content: "🎴 "; }
.card.has-memo { border-color: rgba(245,192,74,.42); }

.badges { display: flex; gap: 5px; margin-top: 7px; flex-wrap: wrap; }
.badge {
  font-size: .64rem; letter-spacing: .06em; padding: 1px 7px;
  border-radius: 999px; border: 1px solid var(--line); color: var(--text-faint);
}
.badge-warn { color: #ffb26b; border-color: rgba(255,178,107,.35); background: rgba(255,178,107,.08); }

/* ---------- オーバーレイ / パネル ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(6,7,11,.72); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow-y: auto;
}
/* display:flex が hidden 属性を上書きしてしまうため明示的に打ち消す */
.overlay[hidden] { display: none; }
.panel {
  position: relative; width: 100%; max-width: 620px; margin: auto;
  background: var(--bg-raise); border: 1px solid var(--line);
  border-radius: 16px; padding: 26px 28px 22px; box-shadow: var(--shadow);
}
.panel-narrow { max-width: 440px; }
.panel-close {
  position: absolute; top: 12px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text-dim); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.panel-close:hover { color: var(--text); background: var(--bg); }

.panel h2 { margin: 6px 0 2px; font-size: 1.25rem; }
.type-tag { font-size: .68rem; font-weight: 700; letter-spacing: .16em; padding: 2px 10px; border-radius: 999px; }
.type-p { background: var(--pachi-soft); color: var(--pachi); border: 1px solid rgba(255,77,109,.4); }
.type-s { background: var(--slot-soft);  color: var(--slot);  border: 1px solid rgba(63,199,232,.4); }
.panel-meta { margin: 2px 0 0; font-size: .8rem; color: var(--text-faint); }
.panel-note { margin: 10px 0 0; font-size: .84rem; color: var(--text-dim); }
.panel-age {
  margin: 16px 0 4px; padding: 10px 16px; border-radius: var(--radius);
  background: rgba(245,192,74,.09); border: 1px solid rgba(245,192,74,.28);
  font-size: .86rem; color: var(--gold); text-align: center;
}
.panel-age b { font-size: 1.25rem; }

.panel-thumb {
  display: block; position: relative; margin-top: 14px; border-radius: var(--radius);
  overflow: hidden; aspect-ratio: 16 / 9; background: var(--bg);
}
.panel-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.panel-thumb-play {
  position: absolute; left: 14px; bottom: 12px; padding: 5px 14px; border-radius: 999px;
  background: rgba(0,0,0,.65); color: #fff; font-size: .82rem; font-weight: 700;
}

.panel-links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.chime-note { margin: 6px 0 0; font-size: .68rem; color: var(--text-faint); }
.btn-link { text-decoration: none; display: inline-block; }
.btn-link:hover { color: var(--gold); border-color: var(--gold); }

.field { display: block; margin-top: 18px; }
.field-label { display: block; font-size: .78rem; color: var(--text-dim); margin-bottom: 6px; letter-spacing: .05em; }
.field-hint { display: block; font-size: .72rem; color: var(--text-faint); margin-top: 7px; line-height: 1.6; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .9rem;
  padding: 10px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
  resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); }

.panel-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }

/* ---------- タイムマシン（その年に入り込む画面） ---------- */
.panel-year { max-width: 860px; }

.year-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 18px; }
.year-head-main { flex: 1; text-align: center; }
.year-head-main h2 {
  margin: 0; font-size: 2.6rem; letter-spacing: .06em; font-weight: 800;
  background: linear-gradient(92deg, var(--pachi), var(--gold) 55%, var(--slot));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.year-age { margin: 2px 0 0; font-size: .86rem; color: var(--gold); }
.year-nav {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text-dim); font-size: 1.4rem; line-height: 1; cursor: pointer;
  transition: .16s ease;
}
.year-nav:hover:not(:disabled) { color: var(--gold); border-color: var(--gold); }
.year-nav:disabled { opacity: .25; cursor: default; }

.year-world {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 20px;
}
.yw-row { display: flex; align-items: baseline; gap: 12px; padding: 5px 0; flex-wrap: wrap; }
.yw-row + .yw-row { border-top: 1px dashed var(--line); }
.yw-key { flex: 0 0 128px; font-size: .74rem; color: var(--text-faint); letter-spacing: .04em; }
.yw-val { flex: 1 1 240px; font-size: .86rem; color: var(--text); }
.yw-feature-row { justify-content: center; }
.yw-feature {
  display: inline-block; text-decoration: none;
  font-size: .84rem; font-weight: 700; letter-spacing: .04em;
  padding: 7px 22px; border-radius: 999px;
  border: 1px solid rgba(245,192,74,.5); color: var(--gold);
  background: rgba(245,192,74,.08); transition: .15s ease;
}
.yw-feature:hover { background: var(--gold); color: #241a05; }

.yw-play {
  flex: 0 0 auto; font-size: .74rem; text-decoration: none;
  padding: 3px 13px; border-radius: 999px;
  border: 1px solid rgba(255,77,109,.45); color: var(--pachi);
  transition: .16s ease;
}
.yw-play:hover { background: var(--pachi); color: #fff; border-color: var(--pachi); }

/* その年の音 */
.year-sound {
  background: rgba(255,77,109,.05); border: 1px solid rgba(255,77,109,.25);
  border-left: 3px solid var(--pachi);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 12px;
}
.year-sound:empty { display: none; }
.sound-note { font-size: .66rem; color: var(--text-faint); font-weight: 400; margin-left: 10px; letter-spacing: 0; }
.sound-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.sound-btn {
  font: inherit; font-size: .76rem; cursor: pointer;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid rgba(255,77,109,.4); background: var(--bg); color: var(--pachi);
  transition: .14s ease;
}
.sound-btn:hover { background: var(--pachi); color: #fff; }
.sound-btn:active { transform: scale(.95); }
.sound-hero {
  background: var(--gold); border-color: var(--gold); color: #241a05; font-weight: 800;
}
.sound-hero:hover { background: #f5d07a; border-color: #f5d07a; color: #241a05; }
.sound-stop { border-color: var(--line); color: var(--text-faint); }
.sound-stop:hover { background: var(--bg-soft); color: var(--text); }

/* 攻略法 */
.panel-tip {
  margin-top: 14px; padding: 12px 16px;
  background: var(--bg); border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius); font-size: .82rem; color: var(--text-dim); line-height: 1.8;
}
.tip-k {
  display: block; font-size: .68rem; letter-spacing: .12em;
  color: var(--gold); font-weight: 700; margin-bottom: 5px;
}
.year-tips {
  background: var(--bg); border: 1px solid var(--line); border-left: 3px solid var(--gold);
  border-radius: var(--radius); padding: 12px 16px; margin-bottom: 20px;
}
.year-tips:empty { display: none; }
.tip-list { margin: 0; }
.tip-list dt { font-size: .82rem; font-weight: 700; color: var(--gold); margin-top: 9px; }
.tip-list dt:first-child { margin-top: 0; }
.tip-list dd { margin: 2px 0 0; font-size: .79rem; color: var(--text-dim); line-height: 1.75; }

/* あなたの記録 */
.rec-stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 22px; }
.rec-fig {
  flex: 1 1 90px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 14px; text-align: center;
}
.rec-fig b { display: block; font-size: 1.7rem; font-weight: 800; color: var(--gold); line-height: 1.1; }
.rec-fig span { display: block; font-size: .7rem; color: var(--text-faint); margin-top: 3px; }
.rec-span b { font-size: 1.05rem; }
.rec-h {
  margin: 22px 0 10px; font-size: .74rem; letter-spacing: .14em; color: var(--text-dim);
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.rec-list { display: grid; gap: 10px; }
.rec-item {
  background: var(--bg); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: var(--radius); padding: 11px 15px;
}
.rec-item header { font-size: .88rem; font-weight: 700; }
.rec-age, .rec-year { font-size: .72rem; font-weight: 400; color: var(--text-faint); }
.rec-item p { margin: 5px 0 0; font-size: .82rem; color: var(--text-dim); white-space: pre-wrap; line-height: 1.8; }
.rec-memo { color: var(--gold) !important; }
.rec-played { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px !important; }
.rec-chip {
  font-size: .72rem; padding: 2px 10px; border-radius: 999px;
  border: 1px solid var(--line); white-space: nowrap;
}
.rec-chip.chip-p { color: var(--pachi); border-color: rgba(255,77,109,.35); background: var(--pachi-soft); }
.rec-chip.chip-s { color: var(--slot);  border-color: rgba(63,199,232,.35); background: var(--slot-soft); }
.rec-sub { margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--line); }
.rec-sub b { font-size: .82rem; }
.btn-mark { border-color: rgba(245,192,74,.45); color: var(--gold); }
.btn-mark:hover { background: rgba(245,192,74,.12); color: var(--gold); border-color: var(--gold); }
.btn-mark.is-on { background: var(--gold); border-color: var(--gold); color: #241a05; font-weight: 700; }
.btn-mark.is-on:hover { filter: brightness(1.1); color: #241a05; }
.rec-empty { text-align: center; color: var(--text-faint); font-size: .85rem; padding: 30px 0; line-height: 2; }

/* 画面下に固定した音のバー。探さなくても常に見えるようにする */
.soundbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  background: rgba(20,10,14,.96);
  border-top: 2px solid var(--pachi);
  box-shadow: 0 -6px 24px rgba(0,0,0,.5);
  backdrop-filter: blur(10px);
}
.soundbar[hidden] { display: none; }
.soundbar-label {
  flex: 0 0 auto; font-size: .82rem; font-weight: 700; color: var(--gold);
  letter-spacing: .06em;
}
.soundbar-btns { flex: 1 1 auto; display: flex; gap: 7px; flex-wrap: wrap; }
.soundbar-hide {
  flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--bg-soft);
  color: var(--text-faint); font-size: 1rem; line-height: 1; cursor: pointer;
}
.soundbar-hide:hover { color: var(--text); }

/* バーの分だけ本文の下に余白を作る */
.site-footer { padding-bottom: 110px; }

@media (max-width: 700px) {
  .soundbar { gap: 8px; padding: 8px 12px; }
  .soundbar-label { flex-basis: 100%; font-size: .74rem; }
  .soundbar .sound-btn { font-size: .7rem; padding: 5px 10px; }
}

/* 音のパネル（ヘッダーから開く） */
.snd-lead { margin: 6px 0 16px; font-size: .84rem; color: var(--text-dim); line-height: 1.7; }
.snd-all { flex-direction: column; gap: 8px; }
.snd-row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 16px; border-radius: 10px; }
.snd-name { font-size: .88rem; font-weight: 700; }
.snd-desc { font-size: .72rem; opacity: .8; }
.snd-hint { margin: 18px 0 0; font-size: .76rem; color: var(--text-faint); line-height: 1.7; }
.snd-hint b { color: var(--gold); }

/* 暮らしとホールの風景 */
.year-life { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.life-block {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 16px;
}
.life-hall  { border-left: 3px solid var(--pachi);  grid-column: 1 / -1; }
.life-money { border-left: 3px solid var(--gold); }
.life-life  { border-left: 3px solid var(--slot); }
.life-h { margin: 0 0 7px; font-size: .74rem; letter-spacing: .1em; color: var(--text-dim); font-weight: 700; }
.life-list { margin: 0; padding-left: 1.1em; }
.life-list li { font-size: .8rem; color: var(--text); margin: 3px 0; line-height: 1.65; }

/* この年の思い出 */
.year-memo {
  background: rgba(245,192,74,.05); border: 1px solid rgba(245,192,74,.25);
  border-radius: var(--radius); padding: 4px 18px 16px; margin-bottom: 20px;
}
.year-memo-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.field-prompt { color: var(--gold); font-weight: 400; margin-left: 6px; }

.year-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.year-col-h {
  margin: 0 0 8px; font-size: .74rem; letter-spacing: .18em; font-weight: 700;
  padding-bottom: 6px; border-bottom: 1px solid var(--line);
}
.year-col-p { color: var(--pachi); }
.year-col-s { color: var(--slot); }
.year-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow-y: auto; }
.year-item {
  padding: 7px 10px; border-radius: 8px; cursor: pointer;
  border: 1px solid transparent; transition: .14s ease;
}
.year-item:hover { background: var(--bg-soft); border-color: var(--line); }
.year-item.has-memo { border-color: rgba(245,192,74,.4); }
.year-item.has-memo .yi-name::after { content: " 🎴"; }
.yi-name { display: block; font-size: .85rem; }
.yi-maker { display: block; font-size: .72rem; color: var(--text-faint); margin-top: 1px; }
.year-empty { padding: 10px; font-size: .8rem; color: var(--text-faint); }

@media (max-width: 700px) {
  .year-cols, .year-life { grid-template-columns: 1fr; }
  .year-head-main h2 { font-size: 2rem; }
  .yw-key { flex-basis: 100%; }
}

/* ---------- フッタ / その他 ---------- */
.empty { text-align: center; color: var(--text-faint); padding: 60px 0; }
.site-footer {
  max-width: 1180px; margin: 0 auto; padding: 26px 20px 50px;
  border-top: 1px solid var(--line); font-size: .76rem; color: var(--text-dim);
}
.site-footer p { margin: 0 0 6px; }
.site-footer code { background: var(--bg-soft); padding: 1px 6px; border-radius: 4px; color: var(--gold); }
.muted { color: var(--text-faint); }

.toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 90; padding: 11px 24px; border-radius: 999px;
  background: var(--bg-raise); border: 1px solid var(--gold);
  color: var(--gold); font-size: .85rem; box-shadow: var(--shadow);
}

/* ---------- モバイル ---------- */
@media (max-width: 760px) {
  :root { --rail: 0px; }
  .col-headings { display: none; }
  .timeline::before { left: 14px; }

  .year-row { grid-template-columns: 1fr; padding: 4px 0 14px 34px; }
  .rail {
    flex-direction: row; align-items: center; gap: 8px;
    justify-content: flex-start; margin: 10px 0 8px -34px; padding-top: 0;
  }
  .rail-age { margin-top: 0; }

  .side { align-items: stretch !important; padding: 0 !important; }
  .side + .side { margin-top: 10px; }
  .card { max-width: none; }
  .card-s { border-right: none; border-left: 3px solid var(--slot); }

  .era { margin-left: 0; }
  .era { flex-wrap: wrap; gap: 6px 12px; }
  .toolbar { top: 0; position: static; }
  .count { margin-left: 0; }
}
