/* 「耳もとで、好きって言って」紹介サイト */
:root {
  --bg: #fff7fa;
  --bg2: #fdeef4;
  --ink: #3b2a35;
  --sub: #8a6c7c;
  --pink: #ff7aa8;
  --pink2: #ffb3cd;
  --lav: #b89cf0;
  --deep: #2a1c2b;
  --line: rgba(255, 122, 168, .25);
  --accent: #ff7aa8;          /* 選んでいるヒロインの色（main.js が変える） */
  --round: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Yu Gothic UI", sans-serif;
  --mincho: "Shippori Mincho", "Yu Mincho", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--round); font-weight: 500; line-height: 1.9; letter-spacing: .03em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---- ボタン・小物 ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  padding: .85em 2.2em; border-radius: 999px; font: inherit; font-weight: 700; letter-spacing: .1em;
  text-decoration: none; cursor: pointer; border: 0; transition: transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-main { color: #fff; background: linear-gradient(135deg, #ff8fb6, #c78bf2); box-shadow: 0 8px 24px rgba(255, 122, 168, .35); }
.btn-sub { color: var(--sub); background: #fff; border: 1px solid var(--line); }
.badge {
  display: inline-block; padding: .2em .9em; border-radius: 999px; font-size: 13px;
  background: rgba(255, 255, 255, .85); color: var(--ink); border: 1px solid rgba(255, 255, 255, .9);
}
.badge-r18 { background: #e2335f; color: #fff; border-color: #e2335f; font-weight: 700; }

/* ---- 年齢確認 ---- */
.agegate {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: radial-gradient(ellipse at center, rgba(60, 30, 50, .85), rgba(20, 10, 20, .96));
  backdrop-filter: blur(6px);
}
.agegate-box {
  width: min(460px, 100%); text-align: center; padding: 36px 28px; border-radius: 24px;
  background: rgba(255, 247, 250, .97); box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}
.agegate-logo { width: 82%; margin: 0 auto 18px; }
.agegate-lead { margin: 0 0 14px; color: var(--sub); font-size: 14px; }
.agegate-q { margin: 0 0 18px; font-size: 18px; font-weight: 700; }
.agegate-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.agegate-note { margin: 18px 0 0; font-size: 12px; color: var(--sub); }

/* ---- ナビ ---- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 60px; padding: 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(255, 247, 250, 0); transition: background .3s, box-shadow .3s;
}
.nav.solid { background: rgba(255, 247, 250, .92); box-shadow: 0 2px 16px rgba(255, 122, 168, .15); backdrop-filter: blur(8px); }
.nav-logo img { height: 40px; width: auto; opacity: 0; transition: opacity .3s; }
.nav.solid .nav-logo img { opacity: 1; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  padding: 6px 14px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .12em;
  color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); transition: background .2s, color .2s;
}
.nav.solid .nav-links a { color: var(--ink); text-shadow: none; }
.nav-links a:hover { background: var(--pink); color: #fff; text-shadow: none; }
.nav-toggle { display: none; font-size: 22px; background: none; border: 0; color: #fff; cursor: pointer; }
.nav.solid .nav-toggle { color: var(--ink); }

/* ---- トップ ---- */
.hero { position: relative; height: 100vh; min-height: 620px; overflow: hidden; background: #1c1220; }
.hero-strips { position: absolute; inset: 0; display: flex; }
.hero-strips > div { flex: 1; position: relative; overflow: hidden; border-left: 1px solid rgba(255, 255, 255, .12); }
.hero-strips > div:first-child { border-left: 0; }
.hero-strips img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 46% 0;
  transform: scale(1.06); opacity: 0; transition: opacity 1.2s ease, transform 6s ease;
}
.hero-strips img.on { opacity: 1; transform: scale(1); }
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(28, 18, 32, .25) 0%, rgba(28, 18, 32, 0) 30%, rgba(28, 18, 32, .55) 58%, rgba(28, 18, 32, .92) 100%);
}
.hero-inner {
  position: absolute; left: 0; right: 0; bottom: 6vh; padding: 0 16px; text-align: center; color: #fff;
}
.hero-copy { margin: 0 0 6px; font-family: var(--mincho); font-size: clamp(18px, 2.6vw, 28px); letter-spacing: .25em; text-shadow: 0 2px 12px rgba(0, 0, 0, .6); }
.hero-copy em { font-style: normal; color: var(--pink2); }
.hero-logo { margin: 0 auto; width: min(560px, 86vw); filter: drop-shadow(0 4px 24px rgba(0, 0, 0, .5)); }
.hero-sub { margin: 6px 0 14px; font-size: 14px; letter-spacing: .3em; color: #f3dbe6; }
.hero-badges { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.hero-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .7); backdrop-filter: blur(4px); }
.spec-link { color: var(--pink); font-weight: 700; }
.hero-scroll {
  position: absolute; right: 24px; bottom: 24px; color: #fff; font-size: 11px; letter-spacing: .3em; text-decoration: none;
  writing-mode: vertical-rl; opacity: .8;
}
.hero-scroll::after { content: ""; display: block; width: 1px; height: 60px; margin: 10px auto 0; background: #fff; animation: scroll 2s infinite; }
@keyframes scroll { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

/* ---- 見出し ---- */
section { padding: 96px 16px; }
.sec-title { margin: 0 0 40px; text-align: center; font-size: 15px; letter-spacing: .3em; color: var(--sub); font-weight: 700; }
.sec-title span {
  display: block; font-family: var(--mincho); font-size: clamp(36px, 6vw, 56px); letter-spacing: .12em; line-height: 1.2;
  background: linear-gradient(135deg, #ff7aa8, #b48cf0); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.sec-title.light { color: #f3dbe6; }
.sec-title.light span { background: linear-gradient(135deg, #ffd1e1, #fff); -webkit-background-clip: text; background-clip: text; }

/* ---- お知らせ ---- */
.news { background: var(--bg); }
.news-list { list-style: none; margin: 0 auto; padding: 0; max-width: 820px; }
.news-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 16px 8px; border-bottom: 1px dashed var(--line); }
.news-list time { color: var(--sub); font-size: 14px; font-variant-numeric: tabular-nums; }
.tag { font-size: 12px; padding: 1px 10px; border-radius: 999px; background: var(--bg2); color: var(--pink); font-weight: 700; }
.tag-new { background: var(--pink); color: #fff; }

/* ---- ストーリー ---- */
.story { position: relative; overflow: hidden; color: #fff; padding: 120px 16px; }
.story-bg { position: absolute; inset: -20px; background: url(img/bg/sunset_class.webp) center/cover; filter: blur(3px) brightness(.55); }
.story-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(60, 20, 50, .35), rgba(30, 10, 30, .55)); }
.story-inner { position: relative; max-width: 760px; margin: 0 auto; text-align: center; }
.story-text p { margin: 0 0 28px; font-family: var(--mincho); font-size: clamp(15px, 2vw, 18px); line-height: 2.3; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.story-last { font-size: clamp(17px, 2.4vw, 22px) !important; color: #ffd1e1; }

/* ---- キャラクター ---- */
.chara { background: linear-gradient(180deg, var(--bg), var(--bg2)); }
/* 5人を1列に並べる（スマホでも折り返さない） */
.chara-tabs { display: grid; grid-template-columns: repeat(5, 120px); justify-content: center; gap: 12px; margin: 0 auto 36px; }
.chara-tab {
  position: relative; width: 100%; min-width: 0; padding: 0; border: 3px solid transparent; border-radius: 18px; overflow: hidden; cursor: pointer;
  background: #fff; box-shadow: 0 6px 18px rgba(120, 60, 90, .12); transition: transform .2s, border-color .2s; font: inherit;
}
.chara-tab img { width: 100%; height: 150px; object-fit: cover; object-position: 50% 0; }
.chara-tab span { display: block; padding: 6px 2px; font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: clip; }
.chara-tab:hover { transform: translateY(-4px); }
.chara-tab.on { border-color: var(--c); }
.chara-tab.on span { background: var(--c); color: #fff; }
.chara-tab .new { position: absolute; top: 6px; left: 6px; padding: 0 8px; border-radius: 999px; background: #e2335f; color: #fff; font-size: 11px; font-weight: 700; }
.chara-panel {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 32px; align-items: start;
  max-width: 1100px; margin: 0 auto;
}
.chara-stand { position: relative; display: flex; justify-content: center; }
.chara-stand-glow {
  position: absolute; left: 10%; right: 10%; top: 8%; bottom: 0; border-radius: 50% 50% 0 0;
  background: radial-gradient(ellipse at 50% 35%, color-mix(in srgb, var(--accent) 45%, white), transparent 70%); opacity: .7;
}
.chara-stand img { position: relative; max-height: 78vh; width: auto; filter: drop-shadow(0 10px 24px rgba(80, 40, 60, .25)); animation: fadein .5s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.chara-emos { position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.chara-emos button {
  padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .85);
  font: inherit; font-size: 12px; cursor: pointer; color: var(--ink);
}
.chara-emos button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.chara-info { padding-top: 20px; }
.chara-reading { margin: 0; color: var(--sub); letter-spacing: .3em; font-size: 14px; }
.chara-name { margin: 0 0 12px; font-family: var(--mincho); font-size: clamp(34px, 5vw, 52px); letter-spacing: .12em; line-height: 1.3; color: var(--accent); }
.chara-tags { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0 0 18px; padding: 0; }
.chara-tags li { padding: 2px 12px; border-radius: 999px; font-size: 13px; background: #fff; border: 1px solid color-mix(in srgb, var(--accent) 50%, white); }
.chara-catch {
  margin: 0 0 16px; padding: 14px 18px; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, .8); font-family: var(--mincho); font-size: clamp(16px, 2vw, 20px); font-weight: 600; line-height: 1.8;
}
.chara-intro { margin: 0 0 22px; font-size: 15px; line-height: 2.05; }
.chara-cg { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.chara-cg button { padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #000; aspect-ratio: 1216/832; }
.chara-cg img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s, opacity .3s; }
.chara-cg button:hover img { transform: scale(1.06); opacity: .9; }
.chara-cg .soon { grid-column: 1 / -1; padding: 18px; text-align: center; border-radius: 12px; background: rgba(255, 255, 255, .7); color: var(--sub); }

/* ---- システム ---- */
.system { background: var(--bg); }
.screen {
  position: relative; max-width: 900px; margin: 0 auto 48px; aspect-ratio: 16/10; border-radius: 18px; overflow: hidden;
  box-shadow: 0 20px 50px rgba(80, 40, 60, .25); border: 6px solid #fff; background: #000;
}
.screen-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.screen-chara { position: absolute; left: 50%; bottom: -18%; height: 112%; width: auto; max-width: none; transform: translateX(-50%); }
.screen-ui { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 2.2%; }
.screen-top { display: flex; justify-content: space-between; font-size: clamp(9px, 1.4vw, 13px); }
.screen-top span { padding: .3em 1em; border-radius: 999px; background: rgba(30, 20, 35, .7); color: #fff; }
.screen-heart { color: #ffb3cd !important; }
.screen-box { margin-top: auto; padding: 1.8% 2.6%; border-radius: 14px; background: rgba(30, 20, 40, .82); color: #fff; min-height: 24%; }
.screen-name { margin: 0 0 .3em; font-size: clamp(10px, 1.5vw, 14px); color: #ff9ac0; font-weight: 700; }
.screen-line { margin: 0; font-size: clamp(11px, 1.8vw, 17px); line-height: 1.7; min-height: 3.4em; }
.screen-line::after { content: "▍"; animation: blink 1s infinite; color: #ff9ac0; }
@keyframes blink { 50% { opacity: 0; } }
.screen-input { display: flex; gap: 1.5%; margin-top: 1.5%; font-size: clamp(9px, 1.4vw, 13px); }
.screen-input span { flex: 1; padding: .7em 1.2em; border-radius: 12px; background: rgba(30, 20, 40, .82); color: rgba(255, 255, 255, .5); }
.screen-input b { padding: .7em 1.6em; border-radius: 12px; background: linear-gradient(135deg, #c86bd8, #ff7aa8); color: #fff; }
.feat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1100px; margin: 0 auto; }
.feat-card { padding: 26px 24px; border-radius: 20px; background: #fff; box-shadow: 0 8px 24px rgba(120, 60, 90, .08); border: 1px solid var(--line); }
.feat-no { margin: 0; font-family: var(--mincho); font-size: 34px; line-height: 1; color: var(--pink2); }
.feat-card h3 { margin: 10px 0 8px; font-size: 18px; }
.feat-card p { margin: 0; font-size: 14px; color: #5d4652; }
/* 7枚目（エンディング後のアフター）は横幅いっぱいの特別枠 */
.feat-after { grid-column: 1 / -1; background: linear-gradient(120deg, #fff0f5, #fde3ee 60%, #f5e3fb); border-color: #f3c3d6; }
.feat-after h3 { display: flex; align-items: center; gap: 10px; font-size: 20px; }
.feat-after p { font-size: 15px; line-height: 1.8; }

/* ---- ギャラリー ---- */
.gallery { background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.gallery-lead { text-align: center; margin: -20px 0 28px; color: var(--sub); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; max-width: 1200px; margin: 0 auto; }
.gallery-grid button { position: relative; padding: 0; border: 0; border-radius: 12px; overflow: hidden; cursor: zoom-in; aspect-ratio: 1216/832; background: #000; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.gallery-grid button:hover img { transform: scale(1.05); }
.gallery-grid .cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 6px; font-size: 12px; text-align: left; color: #fff;
  background: linear-gradient(transparent, rgba(0, 0, 0, .65));
}

.gallery-adult { max-width: 1200px; margin: 56px auto 0; }
#gallery-adult { grid-template-columns: repeat(5, 1fr); }   /* ヒロイン1人に1枚なので、5人を1列に */
.gallery-sub { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 0 30px; font-size: 22px; letter-spacing: .15em; }
.r18-mark {
  position: absolute; top: 8px; left: 8px; padding: 1px 9px; border-radius: 999px;
  background: #e2335f; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .05em;
}
.chara-cg button { position: relative; }
.chara-cg button.r18 { outline: 2px solid #e2335f; outline-offset: -2px; }

/* ---- 作品情報 ---- */
.spec { background: var(--bg); }
.spec-table { margin: 0 auto; border-collapse: collapse; width: min(760px, 100%); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(120, 60, 90, .08); }
.spec-table th, .spec-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 30%; background: var(--bg2); color: var(--pink); font-weight: 700; white-space: nowrap; }

/* ---- フッター ---- */
.footer { padding: 48px 16px 36px; text-align: center; background: var(--deep); color: #d9c3cf; font-size: 13px; }
.footer-logo { width: min(300px, 70vw); margin: 0 auto 16px; opacity: .9; }
.footer p { margin: 4px 0; }
.footer-copy { color: #8f7684; }

/* ---- 絵の拡大 ---- */
.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 16px; background: rgba(15, 8, 15, .92); }
.lightbox img { max-width: min(1216px, 96vw); max-height: 82vh; border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox p { color: #f3dbe6; margin: 12px 0 0; }
.lightbox-close { position: absolute; top: 12px; right: 18px; font-size: 34px; background: none; border: 0; color: #fff; cursor: pointer; }

/* ---- 出てくるときの動き ---- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---- スマホ ---- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 60px; right: 12px; flex-direction: column; padding: 10px; border-radius: 16px; background: rgba(255, 247, 250, .97); box-shadow: 0 10px 30px rgba(0, 0, 0, .15); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--ink); text-shadow: none; }
  .chara-panel { grid-template-columns: 1fr; gap: 8px; }
  .chara-stand img { max-height: 62vh; }
  .chara-info { padding-top: 0; }
  .feat { grid-template-columns: 1fr; }
  .gallery-grid, #gallery-adult { grid-template-columns: repeat(2, 1fr); }
  /* 2列で奇数枚のときは、最後の1枚を真ん中に */
  #gallery-adult button:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 5px); }
  .chara-tabs { grid-template-columns: repeat(5, minmax(0, 96px)); gap: 8px; }
  .chara-tab { border-width: 2px; border-radius: 14px; }
  .chara-tab img { height: auto; aspect-ratio: 4 / 5; }
  .chara-tab span { font-size: clamp(9px, 2.6vw, 12px); letter-spacing: -.02em; padding: 5px 1px; }
  section { padding: 72px 16px; }
}
.sp { display: none; }
@media (max-width: 520px) {
  .sp { display: inline; }
  .chara-tabs { gap: 5px; }
  .hero-copy { letter-spacing: .12em; line-height: 1.6; }
  .hero-sub { letter-spacing: .15em; }
  .chara-cg { grid-template-columns: repeat(3, 1fr); }
}
/* 幅の狭いスマホでは名前が入りきらないので、姓と名の間で2行に折る（5枠の高さはそろえる） */
@media (max-width: 359px) {
  .chara-tab span { white-space: normal; word-break: keep-all; line-height: 1.25; font-size: 10px; min-height: calc(2.5em + 8px); display: flex; align-items: center; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
