/* ============================================
   背番号のない名選手 ― 高橋達也 人生アーカイブ
   夏の夜のナイターをテーマにした一枚語りのページ
   ============================================ */
:root {
  --night: #0c1626;
  --night-2: #11203a;
  --night-3: #16294a;
  --lamp: #f2c744;
  --lamp-soft: #e8d9a0;
  --paper: #f5efe3;
  --paper-dim: #cfc8b8;
  --grass: #2e5d43;
  --clay: #b0713f;
  --stripe: rgba(242, 199, 68, .05);
  --maru: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", sans-serif;
  --dot: "DotGothic16", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--maru);
  background-color: var(--night);
  background-image: repeating-linear-gradient(90deg, transparent 0 46px, var(--stripe) 46px 48px);
  color: var(--paper);
  line-height: 2.1;
  letter-spacing: .05em;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- ローディング（プレイボール） ---------- */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--night);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px;
  transition: opacity .8s ease, visibility .8s ease;
}
#loader.done { opacity: 0; visibility: hidden; }
#loader .lamp-row { display: flex; gap: 14px; }
#loader .lamp-row span {
  width: 14px; height: 14px; border-radius: 50%;
  background: #2a3b58;
  animation: lampOn 1.2s ease infinite;
}
#loader .lamp-row span:nth-child(2) { animation-delay: .15s; }
#loader .lamp-row span:nth-child(3) { animation-delay: .3s; }
#loader .lamp-row span:nth-child(4) { animation-delay: .45s; }
#loader .lamp-row span:nth-child(5) { animation-delay: .6s; }
@keyframes lampOn { 0%,100% { background: #2a3b58; } 50% { background: var(--lamp); box-shadow: 0 0 14px var(--lamp); } }
#loader p { font-family: var(--dot); letter-spacing: .4em; font-size: .8rem; color: var(--lamp-soft); }

/* ---------- スコアボード進行（電光掲示板風） ---------- */
.inning-rail {
  position: fixed; right: 18px; top: 50%; transform: translateY(-50%);
  z-index: 90; display: flex; flex-direction: column; gap: 3px;
  background: linear-gradient(180deg, #0a1526 0%, #0d1a2e 100%);
  border: 1px solid #1c2c46;
  padding: 12px 8px 10px; border-radius: 6px;
  box-shadow: inset 0 0 22px rgba(0,0,0,.55), 0 4px 18px rgba(0,0,0,.35);
}
.inning-rail::before {
  content: ""; position: absolute; inset: 4px; border: 1px dashed rgba(226,175,58,.14);
  border-radius: 4px; pointer-events: none;
}
.inning-rail .rail-title, .inning-rail .rail-total {
  font-family: var(--dot); font-size: .5rem; letter-spacing: .28em;
  color: rgba(226,175,58,.5); text-align: center; padding: 2px 0 4px;
}
.inning-rail .rail-total {
  border-top: 1px dashed rgba(226,175,58,.14);
  margin-top: 4px; padding-top: 6px;
}
.inning-rail a {
  font-family: var(--dot); font-size: .62rem; letter-spacing: .1em;
  color: rgba(226,175,58,.5); padding: 2px 4px; border-radius: 3px;
  display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 8px;
  transition: color .3s ease, background .3s ease, transform .3s ease;
  position: relative;
}
.inning-rail a .cell {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; padding: 3px 0;
  background: #050b17; border: 1px solid #1a2841;
  border-radius: 2px;
  color: rgba(226,175,58,.35); font-size: .68rem; letter-spacing: 0;
  text-shadow: 0 0 4px rgba(226,175,58,0);
  transition: color .3s ease, background .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.inning-rail a:hover { color: var(--lamp-soft); transform: translateX(-2px); }
.inning-rail a:hover .cell { border-color: rgba(226,175,58,.35); color: rgba(226,175,58,.85); }
.inning-rail a.on { color: var(--lamp); }
.inning-rail a.on .cell {
  color: var(--lamp);
  background: #0a1526;
  border-color: var(--lamp);
  box-shadow: 0 0 10px rgba(226,175,58,.45), inset 0 0 6px rgba(226,175,58,.25);
  text-shadow: 0 0 6px rgba(226,175,58,.6);
}

/* ---------- ヒーロー ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden; padding: 90px 6vw;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  opacity: .55; filter: saturate(.85);
  animation: heroDrift 18s ease-out forwards;
}
@keyframes heroDrift { from { transform: scale(1.12); } to { transform: scale(1.02); } }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center 40%, transparent 0%, rgba(12,22,38,.55) 55%, var(--night) 100%);
}
.hero-inner { position: relative; z-index: 2; }
.hero .play-ball {
  font-family: var(--dot); font-size: .76rem; letter-spacing: .5em;
  color: var(--lamp); text-shadow: 0 0 12px rgba(242,199,68,.6);
  opacity: 0; animation: fadeUp 1.4s ease .6s forwards;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.8rem); font-weight: 700; letter-spacing: .14em;
  line-height: 1.7; margin: 26px 0 18px;
  opacity: 0; animation: fadeUp 1.4s ease 1.1s forwards;
}
.hero h1 .thin { display: block; font-size: .42em; font-weight: 500; color: var(--lamp-soft); letter-spacing: .3em; margin-bottom: 14px; }
.hero .hero-sub {
  font-size: clamp(.85rem, 1.7vw, 1rem); color: var(--paper-dim); letter-spacing: .16em;
  opacity: 0; animation: fadeUp 1.4s ease 1.6s forwards;
}
.hero .hero-years {
  margin-top: 30px; font-family: var(--dot); font-size: .8rem; letter-spacing: .3em; color: #7d8db0;
  opacity: 0; animation: fadeUp 1.4s ease 2s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.hero-scroll {
  position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--dot); font-size: .6rem; letter-spacing: .4em; color: #7d8db0;
}
.hero-scroll::after {
  content: ""; display: block; width: 1px; height: 40px; margin: 8px auto 0;
  background: linear-gradient(to bottom, var(--lamp), transparent);
  animation: scrollBlink 2s ease infinite;
}
@keyframes scrollBlink { 0%,100% { opacity: .3; } 50% { opacity: 1; } }

/* ---------- セクション共通 ---------- */
.inning { padding: 110px 6vw; position: relative; }
.inning-inner { max-width: 900px; margin: 0 auto; }
.inning-head { text-align: center; margin-bottom: 60px; }
.inning-head .no {
  font-family: var(--dot); font-size: .74rem; letter-spacing: .42em; color: var(--lamp);
  display: inline-block; border: 1px solid #3a4c6e; border-radius: 999px;
  padding: 5px 22px; background: rgba(17,32,58,.6);
}
.inning-head h2 { font-size: clamp(1.4rem, 3.2vw, 2rem); letter-spacing: .18em; font-weight: 700; margin-top: 22px; }
.inning-head .sub { font-size: .82rem; color: var(--paper-dim); margin-top: 8px; letter-spacing: .14em; }

.story p { font-size: .96rem; line-height: 2.4; margin-bottom: 1.8em; color: #e7e0d0; }
.story .em { color: var(--lamp); font-weight: 700; }

.reveal { opacity: 0; transform: translateY(36px); transition: opacity 1s ease, transform 1s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
.rv1 { transition-delay: .12s; } .rv2 { transition-delay: .24s; } .rv3 { transition-delay: .36s; }

/* ---------- ポラロイド写真 ---------- */
.polaroid {
  background: #f8f5ec; padding: 12px 12px 16px; border-radius: 2px;
  box-shadow: 0 10px 34px rgba(0,0,0,.45);
  color: #4a4436; position: relative;
}
.polaroid img { border-radius: 1px; filter: saturate(.92) contrast(.98); display: block; }
.polaroid .cap {
  margin-top: 12px; text-align: center; line-height: 1.5;
  font-size: .72rem; letter-spacing: .12em; color: #6d6552;
}
.polaroid.tilt-l { transform: rotate(-2.4deg); }
.polaroid.tilt-r { transform: rotate(2deg); }
.polaroid .pin {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  width: 20px; height: 20px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #ffd977, var(--clay));
  box-shadow: 0 3px 6px rgba(0,0,0,.4);
}

.photo-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin: 60px 0 10px; align-items: start; }
.photo-solo { max-width: 460px; margin: 56px auto 10px; }

/* ---------- 勝った夜・負けた夜 ---------- */
.win-lose { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; margin: 56px 0 10px; }
.wl-card {
  border-radius: 10px; padding: 34px 30px; border: 1px solid #2b3d5c;
  background: linear-gradient(160deg, var(--night-2), var(--night-3));
}
.wl-card.win { border-color: rgba(242,199,68,.5); }
.wl-card .wl-label { font-family: var(--dot); font-size: .68rem; letter-spacing: .3em; }
.wl-card.win .wl-label { color: var(--lamp); }
.wl-card.lose .wl-label { color: #7d8db0; }
.wl-card h3 { font-size: 1.05rem; letter-spacing: .14em; margin: 12px 0 12px; }
.wl-card p { font-size: .84rem; color: #cfc8b8; line-height: 2; }

/* ---------- スコアボード年表 ---------- */
.scoreboard {
  background: #0a121f; border: 2px solid #24354f; border-radius: 12px;
  padding: 34px 26px; box-shadow: 0 16px 50px rgba(0,0,0,.5), inset 0 0 60px rgba(0,0,0,.5);
}
.scoreboard .sb-head {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--dot); font-size: .7rem; letter-spacing: .26em; color: #51648a;
  border-bottom: 1px dashed #24354f; padding-bottom: 16px; margin-bottom: 8px;
}
.sb-row {
  display: flex; gap: 24px; align-items: baseline;
  padding: 17px 8px; border-bottom: 1px dashed #1c2b44;
  transition: background .3s ease;
}
.sb-row:hover { background: rgba(242,199,68,.05); }
.sb-row:last-child { border-bottom: none; }
.sb-row .year {
  font-family: var(--dot); font-size: 1.02rem; color: var(--lamp);
  width: 74px; flex-shrink: 0; text-align: right;
  text-shadow: 0 0 10px rgba(242,199,68,.35);
}
.sb-row .age { font-family: var(--dot); font-size: .62rem; color: #51648a; width: 52px; flex-shrink: 0; }
.sb-row .what { font-size: .9rem; color: #e7e0d0; line-height: 1.9; }
.sb-row .what small { display: block; font-size: .76rem; color: #93a4c5; }

/* ---------- 思い出カード（フリップ） ---------- */
.memory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.mem-card { perspective: 900px; height: 190px; cursor: pointer; }
.mem-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; transition: transform .7s cubic-bezier(.4, .1, .2, 1);
}
.mem-card.flipped .mem-inner { transform: rotateY(180deg); }
.mem-face {
  position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 20px; text-align: center;
}
.mem-front {
  background: linear-gradient(150deg, var(--night-2), var(--night-3));
  border: 1px solid #2b3d5c;
}
.mem-front .mk { font-family: var(--dot); font-size: .58rem; letter-spacing: .3em; color: var(--lamp); margin-bottom: 12px; }
.mem-front h3 { font-size: .98rem; letter-spacing: .1em; font-weight: 700; line-height: 1.8; }
.mem-front .hint { margin-top: 14px; font-size: .6rem; color: #51648a; letter-spacing: .2em; }
.mem-back {
  background: #f8f5ec; color: #454033; transform: rotateY(180deg);
  border: 1px solid #d9d2c0;
}
.mem-back p { font-size: .78rem; line-height: 1.95; }
.mem-back .by { margin-top: 10px; font-size: .64rem; color: #948a70; }

/* ---------- コロのコーナー ---------- */
.koro-quote {
  margin: 60px auto 0; max-width: 640px; text-align: center;
  padding: 36px 30px; border-radius: 14px;
  background: rgba(17,32,58,.55); border: 1px dashed #3a4c6e;
}
.koro-quote .paw { font-family: var(--dot); letter-spacing: .3em; font-size: .66rem; color: var(--lamp); }
.koro-quote p { margin-top: 14px; font-size: .96rem; line-height: 2.2; color: #e7e0d0; }

/* ---------- 想い出アルバム（9回表） ---------- */
.album-grid { columns: 3; column-gap: 22px; }
.album-shot {
  break-inside: avoid; margin-bottom: 22px;
  background: #f8f5ec; padding: 10px 10px 14px; border-radius: 3px;
  box-shadow: 0 8px 26px rgba(0,0,0,.4);
  transform: rotate(-.6deg);
}
.album-shot:nth-child(2n) { transform: rotate(.8deg); }
.album-shot:nth-child(3n) { transform: rotate(-1.2deg); }
.album-shot:hover { transform: rotate(0) scale(1.02); transition: transform .35s ease; }
.album-shot img { width: 100%; border-radius: 2px; filter: saturate(.94); }
.album-shot figcaption {
  font-size: .68rem; color: #6d6552; letter-spacing: .06em;
  padding: 9px 4px 0; line-height: 1.8;
}
@media (max-width: 860px) { .album-grid { columns: 2; } }
@media (max-width: 540px) { .album-grid { columns: 1; } }

/* ---------- 応援ボード（家族の声） ---------- */
.cheer-list { display: flex; flex-direction: column; gap: 40px; max-width: 780px; margin: 0 auto; }
.cheer {
  position: relative; border-radius: 14px; padding: 34px 36px;
  background: var(--paper); color: #3d382c;
  box-shadow: 0 14px 40px rgba(0,0,0,.4);
}
.cheer::before {
  content: ""; position: absolute; top: -14px; left: 44px;
  width: 84px; height: 26px; background: rgba(242,199,68,.75);
  transform: rotate(-3deg); border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.cheer:nth-child(even)::before { left: auto; right: 44px; transform: rotate(2.4deg); }
.cheer p { font-size: .92rem; line-height: 2.2; }
.cheer .who { margin-top: 18px; text-align: right; font-size: .8rem; color: #7d7460; }
.cheer .who strong { color: #3d382c; font-size: .92rem; letter-spacing: .12em; }

/* ---------- 9回裏（エンディング） ---------- */
.final {
  position: relative; padding: 150px 6vw; text-align: center; overflow: hidden;
}
.final-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .3; }
.final::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, transparent 0%, var(--night) 90%); }
.final-inner { position: relative; z-index: 2; max-width: 720px; margin: 0 auto; }
.final .game-set { font-family: var(--dot); font-size: .78rem; letter-spacing: .48em; color: var(--lamp); text-shadow: 0 0 14px rgba(242,199,68,.5); }
.final h2 { font-size: clamp(1.5rem, 3.6vw, 2.3rem); letter-spacing: .16em; font-weight: 700; margin: 28px 0; line-height: 1.9; }
.final p { font-size: .94rem; color: #cfc8b8; line-height: 2.4; }

/* ---------- このアーカイブについて（アコーディオン） ---------- */
.about-acc { max-width: 780px; margin: 70px auto 0; text-align: left; }
.about-acc details {
  border: 1px solid #2b3d5c; border-radius: 10px; margin-bottom: 14px;
  background: rgba(17,32,58,.5); overflow: hidden;
}
.about-acc summary {
  cursor: pointer; padding: 18px 24px; font-size: .9rem; letter-spacing: .12em;
  list-style: none; display: flex; align-items: center; gap: 14px;
  transition: background .3s ease;
}
.about-acc summary::-webkit-details-marker { display: none; }
.about-acc summary:hover { background: rgba(242,199,68,.06); }
.about-acc summary::before {
  content: "＋"; font-family: var(--dot); color: var(--lamp); flex-shrink: 0;
}
.about-acc details[open] summary::before { content: "－"; }
.about-acc .acc-body { padding: 4px 26px 24px 52px; font-size: .82rem; line-height: 2.2; color: #cfc8b8; }
.about-acc .acc-body ul { list-style: none; }
.about-acc .acc-body li { padding-left: 18px; position: relative; margin-bottom: 8px; }
.about-acc .acc-body li::before { content: "・"; position: absolute; left: 0; color: var(--lamp); }

/* ---------- フッター ---------- */
.site-footer {
  background: #080f1b; padding: 66px 6vw 36px; text-align: center;
  border-top: 1px solid #1c2b44;
}
.site-footer .f-title { font-size: 1rem; letter-spacing: .3em; color: var(--paper); }
.site-footer .f-en { font-family: var(--dot); font-size: .6rem; letter-spacing: .36em; color: #51648a; margin-top: 10px; }
.site-footer .f-note {
  max-width: 640px; margin: 30px auto 0; font-size: .74rem; line-height: 2.1; color: #93a4c5;
  border-top: 1px solid #1c2b44; padding-top: 26px;
}
.site-footer .f-legal { font-size: .64rem; margin-top: 26px; line-height: 1.9; color: #51648a; }

/* ---------- レスポンシブ ---------- */
@media (max-width: 860px) {
  .inning { padding: 84px 6vw; }
  .photo-duo { grid-template-columns: 1fr; gap: 34px; max-width: 420px; margin-left: auto; margin-right: auto; }
  .win-lose { grid-template-columns: 1fr; }
  .memory-grid { grid-template-columns: 1fr 1fr; }
  .inning-rail .rail-title, .inning-rail .rail-total { font-size: .42rem; letter-spacing: .18em; }
  .inning-rail {
    top: auto; bottom: 0; right: 0; left: 0; transform: none;
    flex-direction: row; justify-content: center; gap: 2px;
    border-radius: 0; border-left: none; border-right: none; border-bottom: none;
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  }
  .inning-rail a { padding: 2px 3px; font-size: .5rem; grid-template-columns: 26px; gap: 0; }
  .inning-rail a .label { display: none; }
  .inning-rail a .cell { min-width: 26px; font-size: .58rem; padding: 2px 0; }
  body { padding-bottom: 44px; }
}
@media (max-width: 540px) {
  .memory-grid { grid-template-columns: 1fr; }
  .mem-card { height: 170px; }
  .sb-row { gap: 14px; }
  .sb-row .age { display: none; }
  .cheer { padding: 30px 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-bg { animation: none; }
}

/* ---------- サービス誘導CTA ---------- */
.service-cta {
  padding: 100px 6vw; text-align: center;
  background: linear-gradient(180deg, var(--night), #070d17);
  border-top: 1px dashed #24354f;
}
.service-cta .sc-label { font-family: var(--dot); font-size: .62rem; letter-spacing: .4em; color: var(--lamp); }
.service-cta h2 { font-family: var(--maru); font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 20px 0 18px; line-height: 1.9; }
.service-cta p { max-width: 560px; margin: 0 auto 40px; font-size: .88rem; color: var(--paper-dim); line-height: 2.2; }
.service-cta .sc-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--lamp); color: #1a1408; font-weight: 700;
  padding: 17px 44px; border-radius: 999px; font-size: .88rem; letter-spacing: .08em;
  transition: transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 10px 30px -8px rgba(242,199,68,.5);
}
.service-cta .sc-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 36px -8px rgba(242,199,68,.65); }
.service-cta .sc-note { margin-top: 18px; font-size: .68rem; color: #6b7898; letter-spacing: .06em; }
