/* ============================================================
   まんが（/manga/）専用スタイル
   css/style.css のトークン（--teal / --coral / --radius-* 等）を前提にする
   ============================================================ */

:root {
  --ink:        #1B2A33;
  --ink-soft:   #2E4450;
  --paper:      #FBF9F4;
  --paper-line: #E7E0D2;
}

/* ---------- 共通: 紙の質感 ---------- */
.manga-body { background: var(--paper); }

/* ============================================================
   HERO（一覧ページ）
   ============================================================ */
.manga-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #12333F 0%, #1C5566 45%, var(--teal-dark) 100%);
  color: var(--white);
  padding: clamp(5.5rem, 12vw, 8rem) 0 clamp(3rem, 8vw, 4.5rem);
}
/* 網点（スクリーントーン） */
.manga-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.16) 1.2px, transparent 1.3px);
  background-size: 10px 10px;
  opacity: .7;
  pointer-events: none;
}
/* 集中線がわりの淡い光 */
.manga-hero::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -30%;
  width: 70%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(78,205,196,.35), transparent 62%);
  pointer-events: none;
}
.manga-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
}
.manga-hero__label {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: .72rem;
  letter-spacing: .18em;
  font-weight: 700;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 999px;
  padding: .3rem .95rem;
  margin-bottom: 1rem;
}
.manga-hero h1 {
  font-size: clamp(1.6rem, 5.2vw, 2.7rem);
  font-weight: 900;
  line-height: 1.45;
  color: var(--white);
  margin-bottom: .9rem;
}
.manga-hero h1 .hl {
  color: var(--yellow);
  border-bottom: 4px solid rgba(255,230,109,.35);
  padding-bottom: .08em;
}
.manga-hero__lead {
  font-size: clamp(.88rem, 2.6vw, .98rem);
  line-height: 2;
  color: rgba(255,255,255,.9);
  margin-bottom: 1.4rem;
}
.manga-hero__stats {
  display: flex;
  gap: 1.6rem;
  flex-wrap: wrap;
}
.manga-hero__stat b {
  display: block;
  font-family: var(--ff-accent);
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--yellow);
}
.manga-hero__stat span {
  font-size: .74rem;
  color: rgba(255,255,255,.75);
}

/* 表紙を3枚ならべた扇 */
.manga-fan {
  position: relative;
  height: clamp(200px, 44vw, 310px);
}
.manga-fan img {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(120px, 26vw, 178px);
  aspect-ratio: 896 / 1200;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 34px rgba(0,0,0,.34);
  border: 3px solid var(--white);
  transition: transform var(--ease);
}
.manga-fan img:nth-child(1) { transform: translate(-96%, -50%) rotate(-9deg); z-index: 1; }
.manga-fan img:nth-child(2) { transform: translate(-50%, -54%) rotate(0deg);  z-index: 3; }
.manga-fan img:nth-child(3) { transform: translate(-4%,  -50%) rotate(9deg);  z-index: 2; }

@media (max-width: 820px) {
  .manga-hero__inner { grid-template-columns: 1fr; text-align: center; }
  .manga-hero__stats { justify-content: center; }
  .manga-fan { order: -1; margin-bottom: .5rem; }
}

/* ============================================================
   作品カード（一覧）
   ============================================================ */
.manga-list {
  display: grid;
  gap: clamp(1.2rem, 3vw, 1.8rem);
  max-width: 880px;
  margin: 0 auto;
}
.manga-card {
  display: grid;
  grid-template-columns: clamp(120px, 22vw, 190px) 1fr;
  gap: clamp(1rem, 3vw, 1.8rem);
  align-items: start;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.1rem, 3vw, 1.7rem);
  text-decoration: none;
  color: inherit;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}
.manga-card:hover,
.manga-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--teal-light);
}
.manga-card__cover {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  background: var(--white);
  box-shadow: 0 6px 18px rgba(27,42,51,.12);
}
.manga-card__cover img {
  display: block;
  width: 100%;
  aspect-ratio: 896 / 1080;
  object-fit: cover;
  object-position: top center;
}
.manga-card__no {
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--ff-accent);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--white);
  background: var(--ink);
  padding: .22rem .6rem;
  border-bottom-right-radius: 8px;
}
.manga-card__body { min-width: 0; }
.manga-card__tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  color: var(--teal-dark);
  background: var(--bg-soft);
  border-radius: 999px;
  padding: .22rem .8rem;
  margin-bottom: .6rem;
}
.manga-card__tag--coral { color: #D6407A; background: #FFF0F5; }
.manga-card__tag--sky   { color: #2E7FA0; background: #EAF6FA; }
.manga-card h3 {
  font-size: clamp(1.05rem, 3.4vw, 1.32rem);
  font-weight: 900;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: .5rem;
}
.manga-card__msg {
  font-size: .86rem;
  line-height: 1.9;
  color: var(--text-sub);
  margin-bottom: .8rem;
}
.manga-card__for {
  font-size: .78rem;
  line-height: 1.8;
  color: var(--text-sub);
  background: var(--bg-cream);
  border-left: 3px solid var(--teal-light);
  border-radius: 0 8px 8px 0;
  padding: .55rem .8rem;
  margin-bottom: .9rem;
}
.manga-card__for b { color: var(--ink-soft); font-weight: 700; }
.manga-card__meta {
  display: flex;
  gap: .9rem;
  flex-wrap: wrap;
  font-size: .74rem;
  color: var(--text-light);
  margin-bottom: .9rem;
}
.manga-card__go {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 700;
  color: var(--coral);
}
.manga-card:hover .manga-card__go .arrow { transform: translateX(4px); }
.manga-card__go .arrow { transition: transform var(--ease); }

@media (max-width: 480px) {
  .manga-card { grid-template-columns: 108px 1fr; gap: .9rem; }
  .manga-card__for { display: none; }
}

/* ---------- クララ紹介 ---------- */
.clara-box {
  max-width: 880px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: clamp(1rem, 3vw, 1.6rem);
  align-items: center;
  background: linear-gradient(135deg, var(--bg-soft), var(--white));
  border: 1px dashed var(--teal-light);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 3vw, 1.6rem);
}
.clara-box img {
  width: 100%;
  border-radius: 12px;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-sm);
  background: var(--white);
}
.clara-box h3 { font-size: 1rem; font-weight: 900; color: var(--ink); margin-bottom: .4rem; }
.clara-box p { font-size: .82rem; line-height: 1.95; color: var(--text-sub); }
@media (max-width: 480px) {
  .clara-box { grid-template-columns: 92px 1fr; }
}

/* ============================================================
   READER（作品ページ）
   ============================================================ */
.mr-head {
  background: linear-gradient(135deg, #12333F, var(--teal-dark));
  color: var(--white);
  padding: clamp(5.5rem, 11vw, 7rem) 0 clamp(2rem, 5vw, 3rem);
  position: relative;
  overflow: hidden;
}
.mr-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1.1px, transparent 1.2px);
  background-size: 9px 9px;
  pointer-events: none;
}
.mr-head__inner { position: relative; z-index: 2; max-width: 840px; margin: 0 auto; text-align: center; }
.mr-head__no {
  display: inline-block;
  font-family: var(--ff-accent);
  font-size: .7rem;
  letter-spacing: .16em;
  font-weight: 700;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.38);
  border-radius: 999px;
  padding: .28rem .9rem;
  margin-bottom: .9rem;
}
.mr-head h1 {
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  font-weight: 900;
  line-height: 1.5;
  color: var(--white);
  margin-bottom: .8rem;
}
.mr-head__msg {
  font-size: clamp(.85rem, 2.5vw, .95rem);
  line-height: 2;
  color: rgba(255,255,255,.92);
}
.mr-meta {
  display: flex;
  justify-content: center;
  gap: 1.4rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  font-size: .75rem;
  color: rgba(255,255,255,.8);
}
.mr-meta span { display: inline-flex; align-items: center; gap: .35rem; }

/* あらすじ */
.mr-summary {
  max-width: 760px;
  margin: 0 auto clamp(1.5rem, 4vw, 2.4rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: clamp(1.1rem, 3vw, 1.6rem);
}
.mr-summary h2 {
  font-size: .95rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: .7rem;
  display: flex;
  align-items: center;
  gap: .45rem;
}
.mr-summary p { font-size: .86rem; line-height: 2; color: var(--text-sub); }
.mr-summary ul { margin: .8rem 0 0; padding: 0; list-style: none; }
.mr-summary li {
  position: relative;
  padding-left: 1.3rem;
  font-size: .84rem;
  line-height: 1.9;
  color: var(--text-sub);
  margin-bottom: .3rem;
}
.mr-summary li::before {
  content: "";
  position: absolute;
  left: .3rem;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

.mr-hint {
  max-width: 840px;
  margin: 0 auto 1.2rem;
  text-align: center;
  font-size: .76rem;
  color: var(--text-light);
}

/* ページ本体 */
.mr-pages {
  max-width: 840px;
  margin: 0 auto;
  display: grid;
  gap: clamp(.9rem, 2.5vw, 1.4rem);
}
.mr-page {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--white);
  border-radius: 10px;
  box-shadow: 0 6px 22px rgba(27,42,51,.12);
  overflow: hidden;
  cursor: zoom-in;
  line-height: 0;
}
.mr-page img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 896 / 1200;
}
.mr-page__no {
  position: absolute;
  right: .55rem;
  bottom: .55rem;
  font-family: var(--ff-accent);
  font-size: .68rem;
  font-weight: 700;
  color: var(--white);
  background: rgba(27,42,51,.62);
  border-radius: 999px;
  padding: .16rem .62rem;
  line-height: 1.6;
  backdrop-filter: blur(2px);
}
@media (max-width: 700px) {
  /* スマホは端まで使って少しでも大きく読ませる */
  .mr-pages { gap: .55rem; }
  .mr-page { border-radius: 0; box-shadow: none; }
  .mr-pages--bleed {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    max-width: 100vw;
  }
}

/* 期間限定の注記 */
.mr-note {
  max-width: 840px;
  margin: 1.4rem auto 0;
  font-size: .76rem;
  line-height: 1.9;
  color: var(--text-sub);
  background: var(--yellow-light);
  border-radius: 12px;
  padding: .8rem 1rem;
}

/* 読了後のCTA */
.mr-end {
  max-width: 840px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  background: linear-gradient(135deg, var(--teal), var(--sky));
  color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.4rem, 4vw, 2.2rem);
  text-align: center;
}
.mr-end h2 {
  font-size: clamp(1.05rem, 3.6vw, 1.4rem);
  font-weight: 900;
  line-height: 1.6;
  color: var(--white);
  margin-bottom: .7rem;
}
.mr-end p { font-size: .86rem; line-height: 1.95; margin-bottom: 1.2rem; }
.mr-end__btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }
.mr-end__btns .btn { font-size: .85rem; }

/* 他のまんが */
.mr-more { max-width: 880px; margin: clamp(2.2rem, 6vw, 3.5rem) auto 0; }
.mr-more h2 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  text-align: center;
  margin-bottom: 1.2rem;
}
.mr-more__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; }
.mr-more__card {
  display: flex;
  gap: .9rem;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .8rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--ease), box-shadow var(--ease);
}
.mr-more__card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); }
.mr-more__card img {
  width: 62px;
  flex: 0 0 62px;
  aspect-ratio: 896 / 1080;
  object-fit: cover;
  object-position: top center;
  border-radius: 7px;
  border: 1px solid var(--paper-line);
}
.mr-more__card b { display: block; font-size: .85rem; font-weight: 800; color: var(--ink); line-height: 1.5; margin-bottom: .2rem; }
.mr-more__card span { font-size: .72rem; color: var(--text-light); }

/* ============================================================
   拡大ビューア
   ============================================================ */
.mv {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(13, 26, 33, .95);
  display: none;
  flex-direction: column;
  overscroll-behavior: contain;
}
.mv.is-open { display: flex; }
.mv__stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  touch-action: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mv__img {
  max-width: 100%;
  max-height: 100%;
  transform-origin: center center;
  transition: transform .22s cubic-bezier(.4,0,.2,1);
  user-select: none;
  -webkit-user-drag: none;
  cursor: zoom-in;
  background: var(--white);
}
.mv__img.is-zoomed { cursor: grab; transition: none; }
.mv__bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .7rem .8rem calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(13, 26, 33, .9);
}
.mv__btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.1);
  color: var(--white);
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease), opacity var(--ease);
}
.mv__btn:hover { background: rgba(255,255,255,.22); }
.mv__btn:disabled { opacity: .3; cursor: default; }
.mv__count {
  font-family: var(--ff-accent);
  font-size: .85rem;
  color: var(--white);
  min-width: 74px;
  text-align: center;
  letter-spacing: .04em;
}
.mv__close {
  position: absolute;
  top: calc(.7rem + env(safe-area-inset-top));
  right: .7rem;
  z-index: 3;
}
.mv__hint {
  position: absolute;
  top: calc(.9rem + env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  font-size: .72rem;
  color: rgba(255,255,255,.62);
  pointer-events: none;
  transition: opacity .4s;
}
.mv__hint.is-hidden { opacity: 0; }
body.mv-open { overflow: hidden; }

/* ============================================================
   動画版（各話ページ）
   ============================================================ */
.mr-video {
  max-width: 840px;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  text-align: center;
}
.mr-video h2 {
  font-size: 1rem;
  font-weight: 900;
  color: var(--ink);
  margin-bottom: .4rem;
}
.mr-video__lead {
  font-size: .82rem;
  line-height: 1.9;
  color: var(--text-sub);
  margin-bottom: 1rem;
}
.mr-video video {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto; /* width/height属性を上書きしないとaspect-ratioが効かない */
  margin: 0 auto;
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: #0d1a21;
  box-shadow: 0 10px 30px rgba(13, 26, 33, .25);
}
.mr-video__cap {
  font-size: .74rem;
  color: var(--text-light);
  margin-top: .7rem;
}
