/* ===========================================================
   LEGION — ページ固有の見え方
   無線通信（コーデック）画面。着信 → 交信 → 記録、という順で組み立てている。
   共通キット（base / board / gate）の骨組みはそのまま、色と枠と質感をこの店の受信機に寄せる。
   =========================================================== */

/* ── 画面全体の質感：走査線と周縁の暗さ ───── */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.16) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(0, 0, 0, 0.55) 100%);
}
::selection { background: var(--accent-500); color: var(--base-900) }

/* ── 共通部品をコーデックの文法に ───────────
   見出し小（eyebrow）は [ ] で囲んだ交信ラベル、大見出しには燐光。 */
.eyebrow { color: var(--sig-dim); letter-spacing: 0.28em; text-transform: uppercase }
.eyebrow::before { content: "[ "; width: auto; height: auto; background: none; opacity: 1 }
.eyebrow::after  { content: " ]" }
.h2 { color: var(--sig); text-shadow: 0 0 14px rgba(167, 243, 192, 0.28) }
.h2-jp { color: var(--sig-dim) }
.btn {
  font-family: var(--f-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--accent-400);
  border-radius: 2px;
  color: var(--sig);
  background: var(--sig-100);
}
.btn:hover, .btn:focus-visible { background: var(--accent-400); color: var(--base-900) }
.sample-flag { font-family: var(--f-label); letter-spacing: 0.12em; color: var(--base-900); background: var(--kin) }

/* コーデックの枠：四隅の括弧 */
.frame, .servant__door, .roster, .notice, .plan, .flow, .ask, .access__map, .intro__figure, .dialog__panel {
  --c: var(--accent-400);
  background-image:
    linear-gradient(var(--c), var(--c)) 0 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 1px 14px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 14px 1px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 1px 14px no-repeat;
}

/* ── 入場：着信 ─────────────────────────────
   周波数が点滅し、呼び出しの波が走り、つながった瞬間に画面が上へ退く。 */
.muster {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 1rem;
  background:
    repeating-linear-gradient(0deg, rgba(92, 201, 139, 0.035) 0 1px, transparent 1px 4px),
    var(--base-900);
  animation: musterOut 420ms 2050ms cubic-bezier(0.7, 0, 0.3, 1) forwards;
}
.muster__crest {
  width: min(30vw, 7rem);
  padding: 0.6rem;
  border: 1px solid var(--rule-dark);
  opacity: 0;
  animation: musterIn 360ms 120ms var(--ease) forwards;
}
.muster__rule {
  width: min(64vw, 22rem);
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-400), transparent);
  transform: scaleX(0);
  animation: musterRule 520ms 420ms var(--ease) forwards;
}
.muster__freq {
  font-family: var(--f-label);
  font-size: clamp(2.2rem, 1.4rem + 4vw, 4.2rem);
  letter-spacing: 0.12em;
  color: var(--sig);
  text-shadow: 0 0 18px rgba(167, 243, 192, 0.45);
  opacity: 0;
  animation: musterIn 300ms 560ms var(--ease) forwards;
}
.muster__word {
  font-family: var(--f-label);
  font-size: 0.7rem;
  letter-spacing: 0.46em;
  text-indent: 0.46em;
  color: var(--key-400);
  opacity: 0;
  animation: musterIn 200ms 800ms var(--ease) forwards, musterBlink 700ms 1000ms steps(1) infinite;
}
@keyframes musterIn    { to { opacity: 1 } }
@keyframes musterRule  { to { transform: scaleX(1) } }
@keyframes musterBlink { 50% { opacity: 0.25 } }
@keyframes musterOut   { to { transform: translateY(-101%); visibility: hidden } }

/* ── 年齢確認：交信画面 ─────────────────────
   左に司令部（記章）、右に相手（あなた）の窓。文言は一文字ずつ届く（data-typing）。 */
.agegate {
  gap: 1rem 1.6rem;
  grid-template-columns: minmax(6rem, 11rem) minmax(0, 34rem) minmax(6rem, 11rem);
  grid-template-areas: "l c r";
  align-content: center;
  align-items: start;
  background:
    repeating-linear-gradient(0deg, rgba(92, 201, 139, 0.04) 0 1px, transparent 1px 4px),
    radial-gradient(90% 70% at 50% 40%, #0C1C14 0%, var(--base-900)70%);
  color: var(--on-dark);
}
.agegate::before, .agegate::after {
  content: "";
  aspect-ratio: 4 / 5;
  width: 100%;
  border: 1px solid var(--accent-400);
  box-shadow: inset 0 0 0 4px var(--base-900), inset 0 0 0 5px var(--rule-dark), 0 0 24px rgba(92, 201, 139, 0.12);
  background:
    url("../assets/img/logo-legion.webp?v=bbee2f16") center / 62% no-repeat,
    var(--base-800);
  align-self: center;
}
.agegate::before { grid-area: l }
.agegate::after {
  grid-area: r;
  background:
    repeating-linear-gradient(0deg, rgba(92, 201, 139, 0.10) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg, rgba(92, 201, 139, 0.06) 0 1px, transparent 1px 7px),
    var(--base-800);
  animation: noise 0.9s steps(4) infinite;
}
@keyframes noise { 50% { background-position: 0 3px, 2px 0, 0 0 } }
.agegate__ask, .agegate__denied { grid-area: c }
.agegate__ask {
  display: grid;
  justify-items: center;
  gap: 1rem;
  padding: 1.4rem clamp(1rem, 4vw, 2.2rem) 1.6rem;
  border-top: 1px solid var(--accent-400);
  border-bottom: 1px solid var(--accent-400);
  background: linear-gradient(0deg, rgba(92, 201, 139, 0.05), transparent 40%);
}
.agegate__label {
  font-family: var(--f-label);
  color: var(--key-400);
  letter-spacing: 0.32em;
  font-size: 0.7rem;
}
.agegate__label::before { content: "▶ " }
.agegate__title {
  font-family: var(--f-display);
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--sig);
  text-shadow: 0 0 14px rgba(167, 243, 192, 0.35);
}
.agegate__lead, .agegate__q { font-family: var(--f-jp); color: var(--on-dark) }
/* 一文字ずつ打つあいだに行が増えて下のボタンがずれないよう、行数ぶんの高さを先に取っておく（CLS 対策） */
.agegate__label { min-height: 2.05em; line-height: 2.05 }
.agegate__title { min-height: 1.5em; line-height: 1.5 }
.agegate__lead  { min-height: calc(2.1em * 2); line-height: 2.1 }
.agegate__q     { min-height: 2.05em; line-height: 2.05 }
.agegate__actions { min-height: 3.4rem }
.agegate__note  { min-height: calc(1.9em * 2) }
.agegate::before, .agegate::after { align-self: start; margin-top: 3.4rem }
.agegate__q { color: var(--sig) }
.agegate__btn {
  font-family: var(--f-label);
  letter-spacing: 0.2em;
  border-radius: 2px;
  border-color: var(--accent-400);
  color: var(--sig);
  background: var(--sig-100);
}
.agegate__btn::before { content: "▶ "; color: var(--sig-dim) }
.agegate__btn:hover, .agegate__btn:focus-visible { background: var(--accent-400); color: var(--base-900) }
.agegate__btn--no { border-color: var(--rule-dark); color: var(--on-dark-dim) }
.agegate__btn--no:hover, .agegate__btn--no:focus-visible { background: var(--key-500); border-color: var(--key-500); color: #FFF6F6 }
.agegate__note { font-family: var(--f-label); font-size: 0.7rem; letter-spacing: 0.06em; color: var(--on-dark-dim) }
.agegate .is-typing::after { color: var(--sig) }
@media (max-width: 48rem) {
  .agegate {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "l r" "c c";
    gap: 0.9rem;
    padding: 1rem;
  }
  .agegate::before, .agegate::after { width: min(100%, 9rem); justify-self: center; aspect-ratio: 5 / 4; margin-top: 0 }
  .agegate__lead { min-height: calc(2.1em * 3) }
}

/* ── ヘッダー：状態表示バー ────────────────── */
.site-header { border-bottom: 1px solid var(--rule-dark) }
.site-header .site-header__inner { background: rgba(5, 10, 8, 0.82) }
.brandmark__name { font-family: var(--f-label); letter-spacing: 0.24em; color: var(--sig) }
.brandmark__sub { color: var(--on-dark-dim); letter-spacing: 0.1em }
.nav__link { font-family: var(--f-label); letter-spacing: 0.14em }
.nav__link::before { content: "> "; opacity: 0; transition: opacity var(--d-fast) }
.nav__link:hover::before, .nav__link[aria-current]::before { opacity: 1 }
.nav__cta { font-family: var(--f-label); border-color: var(--accent-400); color: var(--sig) }
/* 6 項目＋運営会社が一段に収まるよう、中くらいの幅では詰める（58rem 以下はハンバーガー） */
@media (max-width: 74rem) and (min-width: 58.01rem) {
  .nav__list { gap: 0.9rem }
  .nav__link { font-size: 0.7rem; letter-spacing: 0.06em }
  .nav__cta { padding-inline: 0.9em; font-size: 0.7rem }
}

/* ── ヒーロー：交信中の画面 ─────────────────
   左に文（一行ずつ届く）、右に受信映像（走査線つきの窓）。下辺は周波数の目盛り。 */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-content: center;
  padding: calc(var(--section) * 0.9) var(--gutter) calc(var(--section) * 0.7);
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, rgba(92, 201, 139, 0.05) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(92, 201, 139, 0.04) 0 1px, transparent 1px 92px),
    radial-gradient(70% 60% at 70% 40%, #0F2118 0%, var(--base-900) 70%);
}
.hero__inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--measure));
  margin-inline: auto;
  display: grid;
  gap: clamp(1.6rem, 1rem + 3vw, 3rem);
  align-items: center;
}
@media (min-width: 62rem) { .hero__inner { grid-template-columns: 1.05fr 1fr } }
.hero__text { display: grid; gap: clamp(0.9rem, 0.6rem + 1.2vw, 1.6rem); justify-items: start }
.hero__status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
  font-family: var(--f-label);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--sig-dim);
}
.hero__status b { color: var(--key-400); font-weight: 400; animation: musterBlink 1.2s steps(1) infinite }
.hero__status i { font-style: normal; color: var(--sig) }
.hero__bars { display: inline-flex; gap: 2px; align-items: flex-end; height: 0.8em; vertical-align: -0.1em }
.hero__bars span { width: 4px; background: var(--accent-400); height: 100% }
.hero__bars span:nth-child(1) { height: 35% } .hero__bars span:nth-child(2) { height: 55% } .hero__bars span:nth-child(3) { height: 75% }
.hero__bars span:nth-child(5) { background: var(--rule-dark) }
.hero__crest {
  width: min(24vw, 5.6rem);
  padding: 0.5rem;
  border: 1px solid var(--rule-dark);
}
.hero__title {
  font-family: var(--f-display);
  font-size: var(--t-hero);
  font-weight: 500;
  line-height: 0.94;
  letter-spacing: 0.16em;
  color: var(--sig);
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(167, 243, 192, 0.35), 0 0 2px rgba(167, 243, 192, 0.6);
}
.hero__title::after {
  content: "";
  display: block;
  width: 5rem;
  height: 2px;
  margin-top: 1rem;
  background: linear-gradient(90deg, var(--accent-400), transparent);
}
.hero__sub {
  font-family: var(--f-jp);
  font-size: clamp(0.95rem, 0.85rem + 0.5vw, 1.2rem);
  letter-spacing: 0.16em;
  color: var(--on-dark);
}
.hero__sub::before { content: "> "; color: var(--sig-dim); font-family: var(--f-label) }
.hero__lede { max-width: 32em; color: var(--on-dark-dim); line-height: 2.1; border-left: 1px solid var(--rule-dark); padding-left: 1rem }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--f-label);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  color: var(--on-dark-dim);
}
.hero__meta span { padding: 0.36em 0.9em; border: 1px solid var(--rule-dark); border-radius: 2px }
.hero__meta span::before { content: "[" } .hero__meta span::after { content: "]" }
.hero__meta b { color: var(--sig); font-weight: 400 }
/* 受信映像の窓 */
.hero__media {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--accent-400);
  box-shadow: inset 0 0 0 4px var(--base-900), inset 0 0 0 5px var(--rule-dark), 0 0 40px rgba(92, 201, 139, 0.12);
  overflow: hidden;
  background: var(--base-800);
}
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 72% 30%;
}
.hero__media::before {
  content: "";
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.28) 0 1px, transparent 1px 3px),
    linear-gradient(180deg, transparent 82%, rgba(5, 10, 8, 0.55));
}
.hero__media::after {
  content: "";
  position: absolute; left: 0; right: 0; height: 18%; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(167, 243, 192, 0.12), transparent);
  animation: scan 4.5s linear infinite;
}
@keyframes scan { from { top: -20% } to { top: 110% } }
.hero__media-tag {
  position: absolute; left: 0.9rem; top: 0.8rem; z-index: 3;
  font-family: var(--f-label); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--sig);
}
.hero__media-tag::before { content: ""; display: inline-block; width: 0.5em; height: 0.5em; margin-right: 0.5em; border-radius: 50%; background: var(--key-500); animation: musterBlink 1s steps(1) infinite }
/* 周波数の目盛り */
.hero__freq {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--gutter) 0.8rem;
  font-family: var(--f-label); font-size: 0.7rem; letter-spacing: 0.24em; color: var(--sig-dim);
  background:
    repeating-linear-gradient(90deg, var(--rule-dark) 0 1px, transparent 1px 12px) 0 100% / 100% 8px no-repeat,
    repeating-linear-gradient(90deg, var(--accent-400) 0 1px, transparent 1px 60px) 0 100% / 100% 16px no-repeat;
  padding-bottom: 1.6rem;
}
.hero__freq b { font-weight: 400; color: var(--sig); font-size: 1rem }

/* ── 序（交信記録） ───────────────────────── */
.intro__grid { display: grid; gap: clamp(2rem, 1rem + 4vw, 4.5rem); align-items: center }
@media (min-width: 62rem) { .intro__grid { grid-template-columns: 1fr 1fr } }
.intro__body { display: grid; gap: 1.4rem }
.intro__body p { color: var(--on-dark-dim); line-height: 2.15 }
.intro__figure { position: relative; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--rule-dark); background: var(--base-800) }
.intro__figure img { width: 100%; height: 100%; object-fit: cover; object-position: 68% 26%}
.intro__figure::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.25) 0 1px, transparent 1px 3px) }

/* ── 本日の任務：受信中の窓 ─────────────────
   共通の掲示は「扉」の意匠なので、この店ではコーデックの窓に置き換える。 */
.servant__door {
  padding: 2.4rem 1rem 1.4rem;
  border-radius: 2px;
  border: 1px solid var(--rule-dark);
  background: linear-gradient(168deg, #10201A 0%, var(--base-800) 100%);
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.6);
  transform-origin: center;
}
.servant__door::before {
  inset: 0; border-radius: 0; box-shadow: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.servant__door::after { display: none }
.servant:hover .servant__door, .servant:focus-within .servant__door { transform: translateY(-3px); border-color: var(--accent-400); box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.5), 0 0 28px rgba(92, 201, 139, 0.16) }
.servant__plate {
  top: 0.9rem; border-radius: 2px;
  font-family: var(--f-label); font-size: 0.66rem; letter-spacing: 0.2em;
  color: var(--sig); background: var(--sig-100); box-shadow: inset 0 0 0 1px var(--rule-dark);
}
.servant__window { aspect-ratio: 1 / 1.12; border-radius: 2px; -webkit-mask: none; mask: none; box-shadow: inset 0 0 0 1px var(--accent-400) }
.servant__window::after { background: linear-gradient(180deg, rgba(167, 243, 192, 0.08), transparent 20%, transparent 60%, rgba(5, 10, 8, 0.85)) }
.servant__name { letter-spacing: 0.12em; color: var(--sig) }
.servant__hours { font-family: var(--f-label); color: var(--sig-dim) }
.servant__knob { display: none }
.board__stamp { font-family: var(--f-label); letter-spacing: 0.1em; color: var(--sig-dim) }

/* ── 予定・通達・隊員：記録パネル ─────────── */
.plan-list > *, .notice-list > *, .roster-list > *, .flow, .ask { border-radius: 2px; border-color: var(--rule-dark); background: var(--base-800) }
.roster { border-radius: 2px }
.roster:hover { border-color: var(--accent-400) }
.roster__face, .plan__face { border-radius: 2px}
.roster__name, .plan__day, .notice__title, .flow__title, .ask__q { color: var(--sig) }
.plan__chip { border-radius: 2px; font-family: var(--f-label); letter-spacing: 0.06em }
.plan__date, .plan__week, .notice__date, .notice__tag { font-family: var(--f-label); letter-spacing: 0.1em }
.plan.is-today { border-color: var(--accent-400); box-shadow: 0 0 22px rgba(92, 201, 139, 0.14) }
.notice__title::before { content: ">> "; color: var(--sig-dim); font-family: var(--f-label) }
.flow::before { font-family: var(--f-label); color: var(--sig); border-color: var(--accent-400) }

/* ── 「紙」の区画も暗い記録パネルに ───────── */
.on-paper {
  background:
    repeating-linear-gradient(90deg, rgba(92, 201, 139, 0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg, rgba(92, 201, 139, 0.04) 0 1px, transparent 1px 40px),
    var(--paper-100);
  color: var(--on-light);
  border-top: 1px solid var(--rule-dark);
  border-bottom: 1px solid var(--rule-dark);
}
.on-paper::before { display: none }
.on-paper .eyebrow, .on-paper .h2-jp, .on-paper .fleuron { color: var(--sig-dim) }
.on-paper .sample-flag { color: var(--base-900); background: var(--kin) }

/* ── 配置（アクセス） ─────────────────────── */
.access__grid { display: grid; gap: clamp(1.6rem, 1rem + 3vw, 3.2rem) }
@media (min-width: 56rem) { .access__grid { grid-template-columns: 1fr 1fr } }
.access dl { display: grid; gap: 0.9rem }
.access__row { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--rule-dark) }
.access__row dt { font-family: var(--f-label); font-size: 0.7rem; letter-spacing: 0.2em; color: var(--sig-dim); padding-top: 0.3em }
.access__row dt::before { content: "> " }
.access__row dd { line-height: 1.9 }
.access__todo { display: inline-flex; align-items: center; gap: 0.5em; color: var(--on-dark-dim); font-size: 0.9rem }
.access__todo::before { content: ""; width: 0.5em; height: 0.5em; border-radius: 50%; background: var(--key-500); animation: musterBlink 1.2s steps(1) infinite }
.access__map {
  border: 1px solid var(--rule-dark);
  background:
    repeating-linear-gradient(90deg, rgba(92, 201, 139, 0.07) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(0deg,  rgba(92, 201, 139, 0.07) 0 1px, transparent 1px 40px),
    radial-gradient(60% 60% at 50% 50%, rgba(92, 201, 139, 0.10), transparent 70%),
    var(--base-800);
  display: grid; place-content: center; gap: 0.9rem;
  padding: 3rem 1.5rem; text-align: center; min-height: 15rem;
}
.access__stamp { width: 4.4rem; margin-inline: auto; opacity: 0.9}

/* ── 通達の詳細（ダイアログ）と脚部 ────────── */
.dialog__panel { background: var(--base-800); border: 1px solid var(--accent-400); color: var(--on-dark) }
.dialog__title { color: var(--sig) }
.site-footer { border-top: 1px solid var(--rule-dark) }
.site-footer__name { font-family: var(--f-label); letter-spacing: 0.3em; color: var(--sig) }
.site-footer__base { font-family: var(--f-label); letter-spacing: 0.16em }
.site-footer__base::before { content: "— TRANSMISSION END — "; color: var(--sig-dim) }

/* ── 動きを控える設定のとき ───────────────── */
@media (prefers-reduced-motion: reduce) {
  .muster { animation: none; display: none }
  .muster__crest, .muster__rule, .muster__freq, .muster__word, .hero__media::after, .hero__status b, .agegate::after, .access__todo::before { animation: none }
}

/* ── 予定の日付は明るい側に（2026-10-09） ── */
.on-paper .plan__date { color: var(--on-dark); }
.on-paper .plan__week { color: var(--on-dark-dim); }
.on-paper .plan__pending, .on-paper .plan__closed { color: var(--on-dark-dim); }

/* ── お知らせの種別札（2026-10-13）── この店は paper-200 が暗い緑なので、info の札は明るい字にする */
.notice.is-info .notice__tag, .dialog__body.is-info .notice__tag { color: var(--on-dark); }
