:root {
  --ink: #0d0f10;
  --ink-soft: #414345;
  --paper: #fff8ec;
  --paper-deep: #f0dfc9;
  --white: #fffdf8;
  --muted: #7c746f;
  --accent: #8aa15c;
  --accent-rgb: 138, 161, 92;
  --accent-soft: #ecb6b8;
  --accent-soft-rgb: 236, 182, 184;
  --line: rgba(13, 15, 16, 0.16);
  --font-body: "M PLUS 2", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-display: "M PLUS 2", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --font-english: "Bungee", "Arial Black", sans-serif;
  --header-height: 82px;
  --content-width: min(1180px, calc(100vw - 96px));
  color-scheme: light;
  font-family: var(--font-body);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

section[id] {
  scroll-margin-top: calc(var(--header-height) + 12px);
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.8;
}

body.menu-open {
  overflow: hidden;
}

.noscript-message {
  position: relative;
  z-index: 1000;
  padding: 12px 20px;
  background: #f1e9d7;
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

.noscript-message a {
  margin-left: 8px;
  border-bottom: 1px solid currentColor;
  font-weight: 700;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* コンテンツ追加時の破綻防止：長い語でもレイアウトを壊さない */
h1, h2, h3, h4, p, dd, dt, li, a, span {
  overflow-wrap: break-word;
}

/* 日付・時刻は途中で折り返さない */
time {
  white-space: nowrap;
}

a {
  color: inherit;
  text-decoration: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
  font: inherit;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  background: var(--white);
  color: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: fixed;
  z-index: 100;
  inset: 0 0 auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
  background: linear-gradient(180deg, rgba(255, 249, 232, 0.88), rgba(255, 249, 232, 0));
  color: var(--ink);
  border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease, height 0.35s ease, transform 0.3s ease;
}

/* 下方向スクロール中はヘッダーを隠し、ロゴやコンテンツに被らないようにする */
.site-header.is-hidden {
  transform: translateY(-100%);
}

/* メニューを開いている間はヘッダーを必ず表示（transformはメニューの基準を壊すため解除） */
body.menu-open .site-header {
  transform: none;
}

.header-logo {
  position: relative;
  z-index: 3;
  width: 76px;
  flex: 0 0 auto;
  transition: width 0.35s ease, transform 0.2s ease;
}

.header-logo img {
  width: 100%;
  height: auto;
}

.header-logo:hover,
.header-logo:focus-visible {
  transform: translateY(-2px);
}

/* 注意: ここに backdrop-filter や transform を足すと、
   ヘッダー内の全画面メニュー(.global-nav)の基準がヘッダーの帯に変わって壊れる */
.site-header.is-scrolled {
  height: 68px;
  background: rgba(255, 249, 232, 0.97);
  border-color: rgba(41, 54, 77, 0.12);
}

.site-header.is-scrolled .header-logo {
  width: 63px;
}

.global-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.global-nav a {
  position: relative;
  padding: 8px 0;
}

.global-nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.25s ease;
}

.global-nav a:hover::after,
.global-nav a:focus-visible::after {
  transform: scaleX(1);
  transform-origin: left;
}

.global-nav > a span {
  margin-right: 5px;
  color: var(--accent);
  transition: color 0.4s ease;
}


.menu-button {
  display: none;
}

.hero {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  /* キービジュアルの縦横比（1493:2000）に合わせてヒーローを縦に伸ばし、画像を切らない */
  height: calc((100vw - clamp(400px, 34vw, 560px)) * 1.3395);
  display: grid;
  grid-template-columns: clamp(400px, 34vw, 560px) 1fr;
  grid-template-rows: 1fr;
  overflow: hidden;
  overflow: clip;
  background: var(--paper);
  color: var(--ink);
}

.hero__backdrop,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__shade {
  display: none;
}

.hero__backdrop {
  z-index: -4;
  overflow: hidden;
  background: #f7ead0;
}

.hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.12) saturate(0.88);
  opacity: 0.08;
  transform: scale(1.035);
  transition: opacity 0.4s ease;
}

.hero__shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 248, 236, 1) 0%, rgba(255, 248, 236, 0.94) 28%, rgba(255, 248, 236, 0.04) 58%, rgba(255, 248, 236, 0.06) 100%),
    linear-gradient(0deg, rgba(255, 248, 236, 0.48) 0%, transparent 28%);
}

.hero__art {
  grid-area: 1 / 2 / 2 / 3;
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-left: 1px solid rgba(13, 15, 16, 0.12);
}

.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 24px 6px rgba(255, 248, 236, 0.05);
  pointer-events: none;
}

.hero__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0%;
  filter: contrast(1.06) saturate(1.05);
  transition: opacity 0.32s ease;
}

.hero__content {
  grid-area: 1 / 1 / 2 / 2;
  z-index: 6;
  min-height: 0;
  align-self: start;
  /* 内容が画面より長い分だけスクロールした後、固定される（JSが --hero-pin を算出） */
  position: sticky;
  top: var(--hero-pin, 0px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 96px 36px 28px;
}

.hero__content > * {
  flex: 0 0 auto;
}

/* 左カラムの積み物（ロゴ・タグライン・NEWS・CTA）の共通幅。
   画面の高さ・カラム幅から「1画面に収まる最大サイズ」を計算 */
@media (min-width: 981px) {
  .hero {
    --stack: min(400px, 34vw - 72px);
  }
}

.hero-news {
  margin-top: 12px;
}

.hero__content > * {
  margin: 0;
}

.hero__tagline {
  position: relative;
  width: var(--stack, 100%);
  padding: 10px 22px 12px 28px;
  background: var(--ink);
  color: white;
  font-size: min(38px, calc((var(--stack, 390px) - 50px) / 8.64));
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.5;
  word-break: auto-phrase;
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
}

.hero__tagline::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8px -8px -10px 8px;
  background: var(--accent);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  opacity: 0.85;
}

.u-nowrap {
  white-space: nowrap;
}

.title-logo {
  width: var(--stack, 100%);
  margin: 0;
  line-height: 1;
}

.title-logo img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 4px 16px rgba(255, 253, 248, 0.94));
}

.hero-news {
  width: var(--stack, 100%);
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 254, 249, 0.92);
  box-shadow: 0 14px 40px rgba(92, 74, 50, 0.1);
  backdrop-filter: blur(9px);
}

.hero-news__head {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px 0 0;
  border-bottom: 1px solid var(--line);
}

.hero-news__label {
  margin: 0;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--accent);
  color: white;
  font-family: var(--font-english);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.18em;
  transition: background 0.4s ease;
}


.hero-news__head a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-english);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.hero-news__head a span {
  color: var(--accent);
  font-family: var(--font-body);
  font-size: 15px;
}

.hero-news__list {
  min-width: 0;
}

.hero-news__item {
  min-width: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 45px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(41, 54, 77, 0.1);
}

.hero-news__item:hover,
.hero-news__item:focus-visible {
  background: rgba(var(--accent-soft-rgb), 0.28);
}

.hero-news__item:last-child {
  border-bottom: 0;
}

.hero-news__item time {
  color: rgba(41, 54, 77, 0.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-news__item p {
  margin: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero-news__more {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 254, 249, 0.72);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: background 0.2s ease;
}

.hero-news__more[hidden] {
  display: none;
}

.hero-news__more:hover,
.hero-news__more:focus-visible {
  background: rgba(var(--accent-rgb), 0.1);
}

.hero-news__more i {
  color: var(--accent);
  font-size: 13px;
  font-style: normal;
  transition: transform 0.3s ease;
}

.hero-news__more[aria-expanded="true"] i {
  transform: rotate(180deg);
}

.hero-news__list.is-collapsed .hero-news__item:nth-child(n + 4) {
  display: none;
}

.hero__scroll {
  position: absolute;
  z-index: 3;
  right: 32px;
  bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(41, 54, 77, 0.72);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3em;
  writing-mode: vertical-rl;
  transition: opacity 0.35s ease;
}

.hero__scroll.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.hero__scroll i {
  position: relative;
  width: 1px;
  height: 72px;
  overflow: hidden;
  background: rgba(41, 54, 77, 0.18);
}

.hero__scroll i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--ink);
  animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
  0% { transform: translateY(-100%); }
  50%, 100% { transform: translateY(100%); }
}

.section {
  position: relative;
  padding: 124px 0;
}

.section--sunny {
  background:
    linear-gradient(135deg, transparent 0 78%, rgba(var(--accent-rgb), 0.07) 78% 100%),
    linear-gradient(rgba(13, 15, 16, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 16, 0.02) 1px, transparent 1px),
    #f3e6d5;
  background-size: auto, 48px 48px, 48px 48px, auto;
  color: var(--ink);
}

.section-heading {
  position: relative;
  width: var(--content-width);
  margin: 0 auto 62px;
  display: flex;
  align-items: flex-end;
  gap: 22px;
}

.section-heading::before {
  content: "";
  width: 9px;
  height: 54px;
  flex: 0 0 auto;
  margin-right: 3px;
  background: var(--accent);
  transform: skewX(-13deg);
}

.section-heading p,
.section-heading h2 {
  margin: 0;
}

.section-heading p {
  font-family: var(--font-english);
  font-size: clamp(38px, 6.6vw, 98px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 0.72;
}

.section-heading h2 {
  padding-bottom: 1px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.section-heading--ink p {
  color: rgba(11, 13, 15, 0.08);
  -webkit-text-stroke: 1px rgba(11, 13, 15, 0.62);
}

.cta-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 12px;
  width: var(--stack, calc(100% - 72px));
  margin: 12px auto 0;
  padding: 22px 26px 24px;
  background: var(--ink);
  color: var(--white);
  border: 2px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(var(--accent-rgb), 0.65);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 5;
}

.cta-banner:hover,
.cta-banner:focus-visible {
  transform: translate(-3px, -3px);
  box-shadow: 12px 12px 0 rgba(var(--accent-rgb), 0.7);
}

.cta-banner__lead {
  font-family: var(--font-english);
  font-size: 11px;
  letter-spacing: 0.26em;
  color: var(--accent);
}

.cta-banner__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 800;
  letter-spacing: 0.05em;
  line-height: 1.5;
}

.cta-banner__cta {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  margin-top: 4px;
  padding: 10px 18px;
  background: var(--accent);
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  white-space: nowrap;
  transition: background 0.2s ease, color 0.2s ease;
}

.cta-banner__cta i {
  font-style: normal;
  font-size: 16px;
}

.cta-banner:hover .cta-banner__cta,
.cta-banner:focus-visible .cta-banner__cta {
  background: var(--white);
  color: var(--ink);
}

.intro {
  min-height: 700px;
  overflow: hidden;
  background:
    linear-gradient(rgba(71, 59, 38, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 59, 38, 0.04) 1px, transparent 1px),
    var(--paper);
  background-size: 54px 54px;
}

.intro::before,
.intro::after {
  content: "";
  position: absolute;
  width: 40vw;
  height: 1px;
  background: rgba(11, 13, 15, 0.15);
  transform: rotate(-8deg);
}

.intro::before {
  top: 35%;
  left: -10%;
}

.intro::after {
  right: -10%;
  bottom: 22%;
}

.intro__body {
  position: relative;
  width: min(980px, calc(100vw - 96px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
  align-items: start;
}

.intro__lead {
  position: relative;
  z-index: 1;
  margin: -10px 0 0;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.6vw, 62px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.55;
  white-space: nowrap;
  word-break: auto-phrase;
}

.intro__lead::after {
  /* 緑のアクセント線。文字サイズに追従するようem単位で指定（固定pxにするとスマホ/タブレットでズレる） */
  content: "";
  position: absolute;
  z-index: -1;
  left: -0.35em;
  bottom: 0.32em;
  width: 4.2em;
  height: 0.23em;
  background: var(--accent);
  opacity: 0.7;
  transform: rotate(-2deg) skewX(-20deg);
}

.intro__copy {
  position: relative;
  z-index: 1;
  padding-top: 8px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 2.15;
  color: var(--ink);
}

.intro__copy p {
  margin: 0 0 24px;
}


.intro__kanji {
  position: absolute;
  z-index: 0;
  right: -80px;
  bottom: -110px;
  color: rgba(var(--accent-soft-rgb), 0.18);
  font-family: var(--font-display);
  font-size: 520px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(7deg);
}

.episodes {
  overflow: hidden;
}

.episodes::before {
  content: "";
  position: absolute;
  right: -16vw;
  top: 80px;
  width: 50vw;
  aspect-ratio: 1;
  border: 1px solid rgba(41, 54, 77, 0.08);
  border-radius: 50%;
}

.episodes__lead {
  width: var(--content-width);
  margin: -20px auto 45px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(41, 54, 77, 0.68);
  font-size: 15px;
}

.episodes__lead a {
  color: var(--ink);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.episode-grid {
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 44px 18px;
  align-items: start;
}

.episode-card {
  min-width: 0;
  padding: 10px 10px 18px;
  background: rgba(255, 254, 249, 0.88);
  border: 1px solid rgba(41, 54, 77, 0.08);
  box-shadow: 7px 8px 0 rgba(41, 54, 77, 0.07);
}

.episode-card__image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-deep);
}


.episode-card__image::after {
  content: "▶";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 46px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.9);
  color: white;
  font-size: 10px;
  opacity: 0.92;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.episode-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), filter 0.3s ease;
}

.episode-card:hover .episode-card__image img,
.episode-card:focus-within .episode-card__image img {
  transform: scale(1.06);
  filter: brightness(0.72);
}

.episode-card:hover .episode-card__image::after,
.episode-card:focus-within .episode-card__image::after {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.episode-card--featured {
  border-top: 3px solid var(--accent);
  box-shadow: 7px 8px 0 rgba(var(--accent-rgb), 0.18);
}

.episode-toggle {
  /* スマホ専用の開閉ボタン。600px以下のメディアクエリでのみ表示する */
  display: none;
}

/* 「最新話」はサムネイルに被せず、EPISODE番号の行に置く */
.episode-card__latest {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px 4px;
  vertical-align: middle;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  clip-path: polygon(5px 0, 100% 0, calc(100% - 5px) 100%, 0 100%);
}

.episode-card__number {
  margin: 14px 0 6px;
  color: var(--accent);
  font-family: var(--font-english);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.episode-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.55;
}

.characters {
  overflow: hidden;
  background:
    linear-gradient(145deg, transparent 0 82%, rgba(var(--accent-rgb), 0.06) 82% 100%),
    var(--paper);
}

.character-stage {
  width: var(--content-width);
  /* 上段（コピー/全身図）656px ＋ 下段（顔窓タブ）を確保 */
  min-height: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(460px, 1.2fr);
  grid-template-rows: 1fr auto;
  overflow: hidden;
  background: var(--paper-deep);
  border-top: 3px solid var(--ink);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
  box-shadow: 18px 18px 0 rgba(var(--accent-rgb), 0.09);
}

.character-stage__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 72px 30px 62px 68px;
  transition: opacity 0.2s ease, transform 0.25s ease;
}

.character-stage.is-changing .character-stage__copy {
  opacity: 0.42;
  transform: translateX(-8px);
}

.character-stage__quote {
  position: relative;
  margin: 0 0 35px;
  font-family: var(--font-display);
  font-size: min(clamp(30px, 3.8vw, 56px), var(--quote-fit, 999px));
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.55;
  word-break: auto-phrase;
  overflow-wrap: anywhere;
}

.character-stage__quote::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -26px;
  top: 10%;
  width: 8px;
  height: 80%;
  background: var(--accent);
  transform: rotate(3deg);
}

.temporary-badge {
  display: none;
}

.character-stage h3 {
  margin: 0 0 18px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.08em;
}

.character-stage h3 rt {
  /* 名前の上の読み仮名（app.jsのreadingプロパティ）。
     line-height:1 を外すと本文の行間(1.8)を引き継いで、名前との間が空きすぎる */
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1;
  color: rgba(11, 13, 15, 0.55);
  padding-bottom: 2px;
}

.character-stage h3 small {
  margin-left: 10px;
  color: rgba(11, 13, 15, 0.45);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.25em;
}

.character-stage__description {
  max-width: 340px;
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
  line-height: 2;
}

.character-arrow {
  position: absolute;
  z-index: 5;
  top: 50%;
  width: 48px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(11, 13, 15, 0.32);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transform: translateY(-50%);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.character-arrow--prev {
  left: 14px;
}

.character-arrow--next {
  right: 14px;
}

.character-arrow:hover,
.character-arrow:focus-visible {
  background: var(--ink);
  color: white;
  transform: translateY(-50%) scale(1.06);
}

.character-stage__visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(rgba(13, 15, 16, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 16, 0.035) 1px, transparent 1px),
    #f8f3e9;
  background-size: 42px 42px;
}

.character-stage__visual::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(90deg, var(--paper-deep) 0%, rgba(240, 223, 201, 0.28) 16%, transparent 34%),
    linear-gradient(0deg, rgba(13, 15, 16, 0.06), transparent 18%);
  pointer-events: none;
}

.character-carousel {
  position: absolute;
  z-index: 2;
  inset: 0;
}

.character-figure {
  position: absolute;
  top: auto;
  bottom: 12px;
  height: 620px;
  left: 50%;
  width: 46%;
  padding: 0 0 28px;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) scale(0.56);
  transition:
    left 0.55s cubic-bezier(0.22, 0.75, 0.18, 1),
    width 0.55s cubic-bezier(0.22, 0.75, 0.18, 1),
    opacity 0.35s ease,
    transform 0.55s cubic-bezier(0.22, 0.75, 0.18, 1);
}

.character-figure img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 18px 18px rgba(13, 15, 16, 0.16));
  transform: scale(var(--figure-scale, 1));
  transform-origin: center bottom;
}

.character-figure.is-active {
  z-index: 3;
  left: 50%;
  width: 92%;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) scale(1);
}

.character-figure.is-previous,
.character-figure.is-next {
  z-index: 2;
  width: 64%;
  opacity: 0.38;
  pointer-events: auto;
  cursor: pointer;
  filter: saturate(0.68);
  transform: translateX(-50%) scale(0.82);
}

.character-figure.is-previous {
  left: 9%;
}

.character-figure.is-next {
  left: 91%;
}

.character-figure.is-previous:hover,
.character-figure.is-previous:focus-visible,
.character-figure.is-next:hover,
.character-figure.is-next:focus-visible {
  opacity: 0.7;
}

.character-figure.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.character-stage__brush {
  position: absolute;
  z-index: 1;
  top: auto;
  bottom: 12px;
  left: 50%;
  width: min(46%, 380px);
  height: 632px;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.06), rgba(var(--accent-soft-rgb), 0.3)),
    rgba(255, 253, 248, 0.5);
  border: 1px solid rgba(13, 15, 16, 0.14);
  box-shadow: 8px 8px 0 rgba(var(--accent-soft-rgb), 0.3);
  opacity: 1;
  transform: translateX(-50%) rotate(-1.2deg);
}

.character-selectors {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  gap: 34px;
  padding: 16px 22px 18px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
  /* スクロールシャドウ: 続きがある側の端にだけ、うっすら影が出る */
  background-color: rgba(255, 253, 248, 0.7);
  background-image:
    linear-gradient(90deg, #fffdf8 40%, rgba(255, 253, 248, 0)),
    linear-gradient(270deg, #fffdf8 40%, rgba(255, 253, 248, 0)),
    linear-gradient(90deg, rgba(13, 15, 16, 0.18), rgba(13, 15, 16, 0)),
    linear-gradient(270deg, rgba(13, 15, 16, 0.18), rgba(13, 15, 16, 0));
  background-position: left center, right center, left center, right center;
  background-repeat: no-repeat;
  background-size: 40px 100%, 40px 100%, 16px 100%, 16px 100%;
  background-attachment: local, local, scroll, scroll;
}

.character-selector-group > p {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-english);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.character-tabs {
  display: flex;
  gap: 8px;
}

.character-tab {
  position: relative;
  width: 82px;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-deep);
  color: rgba(11, 13, 15, 0.5);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.character-tab img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-width: none;
  object-fit: cover;
  object-position: center top;
  filter: saturate(0.68);
  opacity: 0.42;
  transition: filter 0.2s ease, opacity 0.2s ease, transform 0.35s ease;
}

.character-tab span {
  min-height: 20px;
  display: grid;
  place-items: center;
  padding: 2px 4px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.9);
  color: var(--ink);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.character-tab:hover,
.character-tab:focus-visible,
.character-tab.is-active {
  border-color: var(--accent);
  transform: translateY(-3px);
}

.character-tab:hover img,
.character-tab:focus-visible img,
.character-tab.is-active img {
  filter: saturate(1) contrast(1.04);
  opacity: 1;
  transform: scale(1.04);
}

.character-tab.is-active span {
  background: var(--accent);
  color: white;
}

.section--music {
  /* clip なら sticky（スマホのミニプレーヤー固定）が効く */
  overflow: hidden;
  overflow: clip;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), 0.07) 0 17%, transparent 17% 100%),
    linear-gradient(rgba(13, 15, 16, 0.024) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 16, 0.02) 1px, transparent 1px),
    var(--white);
  background-size: auto, 48px 48px, 48px 48px, auto;
  color: var(--ink);
}

.section--music::before {
  content: "MUSIC";
  position: absolute;
  right: -30px;
  bottom: -85px;
  color: rgba(41, 54, 77, 0.035);
  font-size: 260px;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.music__layout {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 84px;
  align-items: start;
}

.music-credit {
  padding: 0 0 32px;
  border-bottom: 1px solid rgba(41, 54, 77, 0.16);
}

.music-credit + .music-credit {
  margin-top: 32px;
}

.music-credit p {
  margin: 0 0 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  color: var(--accent);
  font-family: var(--font-english);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.2em;
}

.music-credit p .music-credit__jp {
  color: rgba(11, 13, 15, 0.55);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
}

.music-credit h3 {
  margin: 0 0 9px;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 800;
  letter-spacing: 0.06em;
}

.music-credit h3 a {
  display: inline-flex;
  align-items: baseline;
  gap: 9px;
  transition: color 0.2s ease;
}

.music-credit h3 a span {
  color: var(--accent);
  font-size: 0.48em;
}

.music-credit h3 a:hover,
.music-credit h3 a:focus-visible {
  color: var(--accent);
}

.music-credit span {
  color: rgba(41, 54, 77, 0.68);
  font-size: 15px;
  line-height: 1.8;
}

.music-tracklist {
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  list-style: none;
  border-top: 1px solid rgba(41, 54, 77, 0.14);
}

.music-tracklist li {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid rgba(41, 54, 77, 0.1);
}

.music-tracklist li > span {
  color: var(--accent);
  font-family: var(--font-english);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.12em;
}

.music-tracklist a {
  min-width: 0;
  overflow: hidden;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: rgba(41, 54, 77, 0.92);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.music-tracklist a i {
  color: var(--accent);
  font-size: 10px;
  font-style: normal;
}

.music-tracklist a:hover,
.music-tracklist a:focus-visible {
  color: var(--accent);
}

.music__player {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.music__player-caption {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.music__player-caption p {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-english);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.24em;
}

.music__player-caption h4 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.5;
  color: var(--ink);
}

.music__player-caption h4 span {
  font-size: inherit;
  color: var(--accent);
  line-height: inherit;
}

.music__player-caption span {
  color: rgba(41, 54, 77, 0.7);
  font-size: 13px;
  line-height: 1.7;
}

.music__player iframe {
  display: block;
  width: 100%;
  height: 352px;
  border: 0;
  border-radius: 0;
  box-shadow: 18px 18px 0 rgba(var(--accent-rgb), 0.18);
}

.music__artist-link {
  align-self: start;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid currentColor;
  color: rgba(41, 54, 77, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: color 0.2s ease;
}

.music__artist-link i {
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
}

.music__artist-link:hover,
.music__artist-link:focus-visible {
  color: var(--accent);
}

.music-tracklist li.is-playing > span,
.music-tracklist li.is-playing a {
  color: var(--accent);
  font-weight: 800;
}

.music-credit h3 a.is-playing {
  color: var(--accent);
}

.goods {
  overflow: hidden;
  background:
    linear-gradient(135deg, transparent 0 73%, rgba(var(--accent-soft-rgb), 0.22) 73% 100%),
    var(--paper);
}

.goods::before {
  content: "GOODS";
  position: absolute;
  right: -28px;
  bottom: -75px;
  color: rgba(11, 13, 15, 0.035);
  font-size: 230px;
  font-weight: 900;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.goods__lead {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: -28px auto 44px;
}

.goods__lead p {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: rgba(11, 13, 15, 0.68);
}

.goods-grid {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: 42px;
}

.goods-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border-top: 3px solid var(--accent);
  box-shadow: 10px 12px 0 rgba(var(--accent-soft-rgb), 0.45);
  padding: 14px 14px 22px;
}

.goods-card__image {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-deep);
}

.goods-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.goods-card:hover .goods-card__image img,
.goods-card:focus-within .goods-card__image img {
  transform: scale(1.05);
}

.goods-card__name {
  margin: 18px 6px 0;
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.goods-card__copy {
  margin: 8px 6px 0;
  color: rgba(11, 13, 15, 0.68);
  font-size: 14px;
  line-height: 1.9;
}

.goods-card__link {
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 18px 6px 0;
}

.goods-card__link span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.goods-card__link:hover span,
.goods-card__link:focus-visible span {
  background: var(--ink);
  color: white;
  transform: translate(-2px, -2px);
}

.goods-card__link i {
  font-style: normal;
}

.goods-card__link small {
  margin-left: 2px;
  color: rgba(11, 13, 15, 0.5);
  font-size: 11px;
  letter-spacing: 0.06em;
}

.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 38px max(48px, 7vw) 30px;
  background:
    linear-gradient(rgba(13, 15, 16, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 15, 16, 0.02) 1px, transparent 1px),
    #efe1cf;
  background-size: 42px 42px;
  color: rgba(13, 15, 16, 0.72);
}

.site-footer__brand {
  display: grid;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

/* トリミング済みロゴを使用。幅168px ＝ 旧・余白込みロゴの190px時と同じ絵柄サイズ */
.site-footer__logo {
  width: min(168px, 56vw);
  transition: transform 0.2s ease;
}

.site-footer__logo:hover,
.site-footer__logo:focus-visible {
  transform: translateY(-3px);
}

.site-footer__logo img {
  width: 100%;
  height: auto;
}

.site-footer__studio {
  display: inline-block;
  width: min(160px, 40vw);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-footer__studio img {
  width: 100%;
  height: auto;
}

.site-footer__studio:hover,
.site-footer__studio:focus-visible {
  transform: translateY(-2px);
  opacity: 0.82;
}

.page-top {
  position: fixed;
  z-index: 90;
  left: 24px;
  bottom: 24px;
  width: 62px;
  aspect-ratio: 1;
  display: grid;
  place-content: center;
  gap: 1px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: rgba(255, 254, 249, 0.94);
  color: var(--ink);
  box-shadow: 5px 5px 0 var(--accent);
  font-family: var(--font-english);
  font-size: 9px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) rotate(-5deg);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.page-top span {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1;
}

.page-top strong {
  font-size: 12px;
  font-weight: 400;
}

.page-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) rotate(-5deg);
}

.page-top:hover,
.page-top:focus-visible {
  box-shadow: 2px 2px 0 var(--accent);
  transform: translate(3px, 3px) rotate(0);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* iframe埋め込み時（プレビュー画面など）は演出なしで即表示 */
.in-frame .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (max-width: 980px) {
  :root {
    --content-width: min(100% - 48px, 760px);
  }

  .site-header {
    height: 68px;
    padding: 0 20px;
  }

  .header-logo,
  .site-header.is-scrolled .header-logo {
    width: 63px;
  }

  .menu-button {
    position: relative;
    z-index: 3;
    width: 44px;
    height: 44px;
    display: grid;
    place-content: center;
    gap: 7px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-button span {
    width: 24px;
    height: 1px;
    background: var(--ink);
    transition: transform 0.3s ease;
  }

  .menu-button[aria-expanded="true"] span:first-child {
    transform: translateY(4px) rotate(45deg);
  }

  .menu-button[aria-expanded="true"] span:last-child {
    transform: translateY(-4px) rotate(-45deg);
  }

  .global-nav {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 25px;
    padding: 70px 12vw;
    background:
      radial-gradient(circle at 80% 18%, rgba(var(--accent-rgb), 0.18), transparent 26%),
      rgba(255, 249, 232, 0.98);
    color: var(--ink);
    font-size: 18px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  }

  .global-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }


  /* スマホ/タブレット: キービジュアルを丸ごと見せて、ロゴ以下はその下に積む（YAIBA式） */
  .hero {
    height: auto;
    min-height: 0;
    display: block;
    padding: 0 0 44px;
  }

  .hero__backdrop,
  .hero__shade {
    display: none;
  }

  .hero__art {
    position: relative;
    width: 100%;
    height: auto;
    aspect-ratio: 1493 / 2000;
    border-left: 0;
  }

  .hero__art img {
    width: 100%;
    object-fit: cover;
    object-position: center top;
    filter: contrast(1.04) saturate(1.03);
  }

  .hero__shade {
    background: linear-gradient(0deg, rgba(255, 248, 236, 0.98) 0%, rgba(255, 248, 236, 0.78) 36%, rgba(255, 248, 236, 0.02) 72%, rgba(255, 248, 236, 0.12) 100%);
  }

  .hero__content {
    position: static;
    width: min(calc(100% - 56px), 480px);
    margin: 30px auto 0;
    padding: 0;
    gap: 16px;
    transform: none;
  }

  .title-logo {
    width: min(255px, 72vw);
  }

  .hero-news {
    width: 100%;
  }

  .hero-news__item {
    padding: 10px 12px;
  }

  .hero__scroll {
    display: none;
  }

  .section {
    padding: 68px 0;
  }

  /* スマホ・タブレットではTOPボタンを出さない（コンテンツやミニプレーヤーに被るため） */
  .page-top {
    display: none;
  }

  .cta-banner {
    position: relative;
    left: auto;
    bottom: auto;
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: center;
    margin: 14px auto 0;
    width: 100%;
    padding: 22px 24px 26px;
    box-shadow: 6px 6px 0 rgba(var(--accent-rgb), 0.65);
    transform: none;
  }

  .cta-banner:hover,
  .cta-banner:focus-visible {
    transform: translate(-3px, -3px);
  }

  .cta-banner__cta {
    justify-self: center;
  }

  .section-heading {
    margin-bottom: 46px;
    gap: 12px;
  }

  .section-heading::before {
    width: 7px;
    height: 42px;
  }

  .section-heading p {
    font-size: 42px;
  }

  .section-heading h2 {
    font-size: 14px;
  }

  .intro {
    /* スマホ/タブレットは中身に合わせる（PC用のmin-height 700pxだと下に空きが出る） */
    min-height: 0;
  }

  .intro__kanji {
    /* 縦に見切れると事故っぽいので、小さくして下端に収め、右にだけ少し流す */
    right: -5vw;
    bottom: -0.06em;
    font-size: clamp(170px, 46vw, 300px);
  }

  .intro__body {
    width: var(--content-width);
    grid-template-columns: 1fr;
    gap: 35px;
  }

  .intro__lead {
    font-size: clamp(34px, 9.6vw, 42px);
    white-space: normal;
  }

  .intro__copy {
    font-size: 16px;
  }

  .episode-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .character-stage {
    grid-template-columns: 1fr;
  }

  .character-stage {
    /* スマホ/タブレットは中身に合わせた高さ（800px固定だと立ち姿の上に空きが出る） */
    min-height: 0;
    grid-template-rows: 1fr auto;
  }

  .character-stage__copy {
    /* 台詞・名前・説明を立ち姿の下部に重ねるオーバーレイ（bocchi.rocks参照）。
       立ち姿と同じグリッドセルに重ねて下端に揃える。文章が長くても枠の高さは揺れない */
    grid-row: 1;
    grid-column: 1;
    align-self: end;
    z-index: 3;
    min-height: 0;
    padding: 64px 30px 26px;
    justify-content: flex-end;
    background: linear-gradient(
      0deg,
      rgba(248, 243, 233, 0.96) 0%,
      rgba(248, 243, 233, 0.9) 55%,
      rgba(248, 243, 233, 0.55) 80%,
      rgba(248, 243, 233, 0) 100%
    );
  }

  .character-stage__quote {
    margin-bottom: 14px;
  }

  .character-stage h3 {
    margin-bottom: 8px;
  }

  .character-stage__description {
    max-width: none;
    line-height: 1.9;
  }

  .character-stage__visual {
    /* オーバーレイ（台詞・名前・説明）のぶん下に余裕を持たせた高さ */
    min-height: 640px;
    grid-row: 1;
  }

  .character-figure {
    /* 頭上の空きを最小に。下部はオーバーレイ（台詞・名前・説明）が重なる */
    top: 1.5%;
    bottom: 8%;
    height: auto;
  }

  .character-arrow {
    /* 上下中央だと、台詞が長いキャラでオーバーレイの文字に被るため上寄り（胴のあたり）に */
    top: 30%;
  }

  .character-figure img {
    /* --figure-lift: 小柄なキャラ（久遠など）を下部の文字オーバーレイより上に持ち上げる（app.jsのliftプロパティ） */
    transform: translateY(var(--figure-lift, 0%)) scale(var(--figure-scale, 1));
  }

  .character-stage__brush {
    top: 1.5%;
    bottom: 8%;
    height: auto;
  }

  .character-figure.is-active {
    width: 94%;
  }

  .character-figure.is-previous,
  .character-figure.is-next {
    width: 68%;
  }

  .character-stage__visual::after {
    background: linear-gradient(0deg, var(--paper-deep) 0%, transparent 35%);
  }

  /* スマホ/タブレットの並び：立ち姿(1・台詞等をオーバーレイ) → 顔窓タブ(2) */
  .character-selectors {
    grid-row: 2;
  }

  .character-stage__visual {
    grid-row: 1;
    grid-column: 1;
  }

  .music__layout {
    grid-template-columns: 1fr;
    gap: 42px;
  }

  /* スマホではプレーヤーを画面下にピン留め（ミニプレーヤー化）。
     曲名をタップした瞬間に切り替わるのが見える */
  .music__player {
    position: sticky;
    bottom: 0;
    z-index: 5;
    gap: 8px;
    padding: 10px 14px 12px;
    background: var(--white);
    border-top: 3px solid var(--accent);
    box-shadow: 0 -12px 32px rgba(13, 15, 16, 0.14);
  }

  /* ミニプレーヤーは縦幅を最小限に：SPOTIFYラベルと説明文を隠し、埋め込みはコンパクト版(80px)に */
  .music__player-caption > span,
  .music__player-caption p {
    display: none;
  }

  .music__player-caption h4 {
    font-size: 15px;
  }

  .music__player iframe {
    height: 80px;
    box-shadow: none;
  }

  .music__artist-link {
    margin-top: 0;
    font-size: 12px;
  }

  .music-tracklist a {
    white-space: normal;
  }

}

@media (max-width: 600px) {
  :root {
    --content-width: calc(100vw - 36px);
  }

  .hero__content {
    width: calc(100% - 40px);
  }

  .title-logo {
    width: min(220px, 64vw);
  }

  .hero__tagline {
    padding: 10px 16px 11px 20px;
    font-size: 15px;
  }

  .hero-news__item {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 8px;
  }

  .hero-news__item p {
    font-size: 12px;
  }

  .section-heading {
    align-items: center;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .section-heading p {
    font-size: 34px;
  }

  .section-heading h2 {
    font-size: 14px;
  }

  .section-heading::before {
    height: 36px;
  }

  .episodes__lead {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .episode-grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .episode-card__image {
    aspect-ratio: 16 / 9;
  }

  /* スマホでは最新話＋2話だけ表示し、残りは「もっと見る」で開閉
     （表示件数を変えるときはapp.jsのEPISODE_VISIBLE_COUNTも合わせる） */
  .episode-grid.is-collapsed .episode-card:nth-child(n + 4) {
    display: none;
  }

  .episode-toggle:not([hidden]) {
    width: var(--content-width);
    min-height: 44px;
    margin: 26px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    background: rgba(255, 254, 249, 0.85);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition: background 0.2s ease;
  }

  .episode-toggle:hover,
  .episode-toggle:focus-visible {
    background: rgba(var(--accent-rgb), 0.1);
  }

  .episode-toggle i {
    color: var(--accent);
    font-size: 13px;
    font-style: normal;
    transition: transform 0.3s ease;
  }

  .episode-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
  }

  .character-stage__visual {
    /* 高さは幅に比例させる（固定pxだと、画面幅が狭い機種ほど絵が縮んで頭上に空きが出る）。
       比率は「全身図(1344:1730)を幅98%で置き、上下1%+7%の余白を足した値」から算出 */
    min-height: 0;
    aspect-ratio: 1344 / 1845;
  }

  .character-figure {
    /* 頭上の空きを最小に（下部はオーバーレイの文字が重なる） */
    top: 1%;
    bottom: 7%;
  }

  .character-figure.is-active {
    width: 98%;
  }

  .character-figure.is-previous,
  .character-figure.is-next {
    width: 72%;
  }

  .character-stage__copy {
    padding: 56px 20px 20px;
  }

  .character-stage__quote {
    margin-bottom: 12px;
    font-size: min(30px, var(--quote-fit, 999px));
  }

  .character-stage__description {
    font-size: 15px;
  }

  .character-stage__quote::before {
    left: -14px;
    width: 5px;
  }

  .character-selectors {
    gap: 20px;
    padding: 12px 12px 14px;
  }

  .character-tabs {
    gap: 6px;
  }

  .character-tab {
    width: 64px;
  }

  .music__player {
    box-shadow: 0 -12px 32px rgba(13, 15, 16, 0.14);
  }

  .music-tracklist {
    grid-template-columns: 1fr;
  }

  .site-footer {
    align-items: center;
    padding: 34px 24px 28px;
  }

  .site-footer__logo {
    width: min(150px, 52vw);
  }

  .page-top {
    left: 14px;
    bottom: 14px;
    width: 54px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ============================================================
   UI磨き込み（2026-07-03追加）
   このブロックを丸ごと削除すれば追加前の見た目に戻せる
   ============================================================ */

/* 1) キーボードフォーカス・タップの見た目を全サイトで統一 */
html {
  -webkit-tap-highlight-color: rgba(var(--accent-rgb), 0.18);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* 2) MUSIC: 選択中の曲名の横で揺れるイコライザーバー */
.music-eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 12px;
  margin-left: 8px;
}

.music-eq i {
  width: 3px;
  height: 100%;
  background: var(--accent);
  transform-origin: bottom;
  animation: music-eq-bounce 0.9s ease-in-out infinite;
}

.music-eq i:nth-child(2) {
  animation-delay: 0.22s;
}

.music-eq i:nth-child(3) {
  animation-delay: 0.44s;
}

@keyframes music-eq-bounce {
  0%,
  100% {
    transform: scaleY(0.3);
  }

  45% {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .music-eq i {
    animation: none;
    transform: scaleY(0.7);
  }
}

/* 3) NAV: いま見ているセクションのハイライト（JSが .is-current を付与） */
.global-nav a.is-current {
  color: var(--accent);
}

.global-nav a.is-current span {
  color: inherit;
}
