/* bookboyfriend.app：深酒红夜色、金色、玫瑰粉（颜色和 App 的 UI/Theme.swift 一样）。
   标题、他的台词用 Cormorant Garamond（和 App 打包的同一份，OFL，fonts/）；中日韩用系统自带的宋体 / 明朝 / 명조。正文用系统字。 */
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond.ttf) format("truetype"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url(/fonts/CormorantGaramond-Italic.ttf) format("truetype"); font-weight: 300 700; font-style: italic; font-display: swap; }
:root {
  --bg: #120c10;
  --bg-2: #1a1216;
  --panel: #1e151a;
  --panel-2: #241a20;
  --line: #33252d;
  --line-2: rgba(255, 255, 255, 0.12);
  --fg: #f4ecef;
  --soft: #e9dfe3;
  --muted: #b3a3ab;
  --faint: #8a7a82;
  --gold: #d4af7a;
  --gold-soft: #ead2ab;
  --wine: #8c2238;
  --wine-2: #a12a45;
  --rose: #e58c9c;
  --dante: #e58c9c;
  --ronan: #9cc4a6;
  --cassius: #bba6e6;
  --serif: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --radius: 20px;
  color-scheme: dark;
}
html.zh { --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif; --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
html.zht { --serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", "PMingLiU", serif; --sans: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", "Noto Sans CJK TC", sans-serif; }
html.ja { --serif: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", "Noto Serif CJK JP", serif; --sans: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans CJK JP", sans-serif; }
html.ko { --serif: "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", "Noto Serif CJK KR", "Batang", serif; --sans: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans CJK KR", sans-serif; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html.zh body, html.zht body, html.ja body, html.ko body { line-height: 1.75; }
html.zh :is(h1, h2, h3), html.zht :is(h1, h2, h3), html.ja :is(h1, h2, h3) { line-break: strict; }
html.ja :is(h1, h2, h3) { word-break: auto-phrase; }
html.ko :is(h1, h2, h3, blockquote) { word-break: keep-all; overflow-wrap: anywhere; }
img { max-width: 100%; display: block; }
a { color: var(--rose); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-soft); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
b, strong { color: var(--fg); font-weight: 650; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--panel); padding: 8px 14px; border-radius: 10px; }

/* ── 页头：名字和语言 ── */
.nav { position: relative; z-index: 20; }
.nav .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: 0.01em; white-space: nowrap; }
.brand:hover { color: var(--fg); }
.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px var(--line-2); }

.lang-menu { position: relative; margin-left: auto; font-size: 14px; color: var(--muted); }
.lang-menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-2); }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu summary:hover, .lang-menu[open] summary { color: var(--fg); background: rgba(255, 255, 255, 0.05); }
.lang-menu summary svg { width: 16px; height: 16px; flex: none; }
.lang-menu ul {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  margin: 0; padding: 6px; list-style: none; min-width: 180px;
  background: var(--panel-2); border-radius: 16px;
  box-shadow: 0 24px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-2);
}
.lang-menu li a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--fg); font-size: 15px; }
.lang-menu li a:hover { background: rgba(255, 255, 255, 0.06); color: var(--fg); }
.lang-menu li a[aria-current]::after { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }

/* ── 按钮和商店徽章 ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  background: var(--wine); color: #fff3f6; text-decoration: none;
  font-weight: 600; font-size: 16px; white-space: nowrap; transition: transform 0.15s, background 0.2s;
}
.btn:hover { color: #fff; background: var(--wine-2); transform: translateY(-1px); }
.btn.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold-soft); }
.btn.ghost:hover { background: rgba(212, 175, 122, 0.1); }
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--fg); color: var(--bg); text-decoration: none;
  font-weight: 650; font-size: 16px; white-space: nowrap;
}
.store:hover { color: var(--bg); background: #fff; }
.store svg { width: 20px; height: 20px; flex: none; }
.store.soon { background: rgba(212, 175, 122, 0.1); color: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(212, 175, 122, 0.45); cursor: default; }
.store.soon svg { color: var(--gold); }
.requires { margin: 12px 0 0; font-size: 14px; color: var(--faint); }
.requires span { white-space: nowrap; }

/* ── 首页 ── */
body.home { isolation: isolate; }
body.home::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 900px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 55% at 18% 10%, rgba(140, 34, 56, 0.42), transparent 70%),
    radial-gradient(45% 40% at 85% 0%, rgba(212, 175, 122, 0.12), transparent 70%);
}
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; gap: 40px; padding-top: 48px; padding-bottom: 24px; }
.kicker { margin: 0 0 18px; font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
html:not(.latin) .kicker { letter-spacing: 0.08em; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 5.6vw, 72px); line-height: 1.04; letter-spacing: -0.01em; margin: 0; max-width: 14ch; text-wrap: balance; }
html:not(.latin) .hero h1 { line-height: 1.25; max-width: 16ch; font-size: clamp(32px, 4.4vw, 56px); }
.hero .line { max-width: 34em; margin: 22px 0 0; font-size: 19px; color: var(--muted); text-wrap: pretty; }
.hero .get { margin-top: 32px; }
/* 三张定妆照扇形叠着，Dante 在前 */
.fan { position: relative; aspect-ratio: 1 / 0.92; }
.fan img {
  position: absolute; top: 6%; left: 30%; width: 44%; aspect-ratio: 2 / 3; height: auto; object-fit: cover;
  border-radius: 18px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.fan .ronan { transform: translate(-58%, 6%) rotate(-9deg); filter: brightness(0.82); }
.fan .cassius { transform: translate(58%, 6%) rotate(9deg); filter: brightness(0.82); }
.fan .dante { transform: translateY(-2%); z-index: 2; }
.head { text-align: center; max-width: 720px; margin: 0 auto 32px; }
.head h2 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 4vw, 46px); line-height: 1.15; margin: 0; text-wrap: balance; }
html:not(.latin) .head h2 { line-height: 1.35; font-size: clamp(26px, 3.4vw, 38px); }
.head .sub { margin: 10px 0 0; color: var(--muted); }

.leads-band { padding-top: 40px; }
.leads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.lead {
  --acc: var(--rose);
  display: flex; flex-direction: column; background: var(--panel); border-radius: var(--radius); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
}
.lead.ronan { --acc: var(--ronan); }
.lead.cassius { --acc: var(--cassius); }
.portrait { position: relative; aspect-ratio: 2 / 2.3; overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--panel)); }
.lead-text { position: relative; flex: 1; display: flex; flex-direction: column; padding: 0 24px 24px; margin-top: -34px; }
.role { margin: 0; font-size: 12px; font-weight: 650; letter-spacing: 0.18em; color: var(--acc); text-transform: uppercase; }
html:not(.latin) .role { letter-spacing: 0.06em; }
.lead h3 { font-family: var(--serif); font-weight: 600; font-size: 34px; line-height: 1.1; margin: 6px 0 8px; }
html:not(.latin) .lead h3 { font-size: 28px; line-height: 1.3; }
.hook { margin: 0 0 14px; color: var(--soft); font-weight: 550; }
.lead blockquote { margin: 0 0 18px; padding: 0 0 0 14px; border-left: 2px solid var(--acc); }
.lead blockquote p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.4; color: var(--muted); }
html:not(.latin) .lead blockquote p { font-style: normal; font-size: 16px; line-height: 1.7; }
.hear {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 18px 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: transparent; color: var(--acc); font: 600 15px var(--sans);
  box-shadow: inset 0 0 0 1px var(--acc); transition: background 0.2s;
}
.hear:hover { background: rgba(255, 255, 255, 0.05); }
.hear svg { width: 18px; height: 18px; }
.hear .i-stop { display: none; }
.hear.playing { background: var(--acc); color: var(--bg); }
.hear.playing .i-play { display: none; }
.hear.playing .i-stop { display: block; }

.band { padding-top: 96px; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.feature h3 { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; font-size: 25px; line-height: 1.2; color: var(--gold-soft); }
html:not(.latin) .feature h3 { font-size: 21px; line-height: 1.4; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

.safe-band {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 32px 36px; border-radius: var(--radius);
  background: linear-gradient(120deg, rgba(140, 34, 56, 0.35), var(--panel) 65%); box-shadow: inset 0 0 0 1px rgba(212, 175, 122, 0.25);
}
.safe-band h2 { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: clamp(26px, 3vw, 34px); line-height: 1.2; }
.safe-band p { margin: 0; color: var(--muted); max-width: 52em; }

/* ── 页脚 ── */
.footer { margin-top: 96px; border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--faint); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.footer .links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.footer .links a { color: var(--muted); text-decoration: none; }
.footer .links a:hover { color: var(--fg); }
.footer p { margin: 0; }

/* ── 隐私政策、条款、安全、支持 ── */
.doc { max-width: 780px; margin: 0 auto; padding: 48px 20px 0; }
.doc h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(40px, 7vw, 60px); line-height: 1.1; margin: 0 0 10px; overflow-wrap: anywhere; }
html:not(.latin) .doc h1 { font-size: clamp(32px, 6vw, 46px); line-height: 1.3; }
.doc .meta { color: var(--faint); font-size: 15px; margin: 0 0 18px; }
.doc .note { font-size: 14px; color: var(--faint); background: rgba(255, 255, 255, 0.04); border-radius: 12px; padding: 10px 14px; margin: 0 0 18px; box-shadow: inset 0 0 0 1px var(--line); }
.doc .intro { font-size: 18px; color: var(--muted); margin: 0 0 24px; }
.toc { margin: 0 0 22px; }
.toc ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.toc a { display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 14px; color: var(--muted); text-decoration: none; box-shadow: inset 0 0 0 1px var(--line); }
.toc a:hover { color: var(--fg); box-shadow: inset 0 0 0 1px var(--gold); }
.block { background: var(--panel); border-radius: var(--radius); padding: 24px 26px; margin-bottom: 14px; box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 16px; }
.block.hl { background: linear-gradient(160deg, rgba(140, 34, 56, 0.32), var(--panel) 70%); box-shadow: inset 0 0 0 1px rgba(212, 175, 122, 0.3); }
.block h2 { font-family: var(--sans); font-size: 20px; font-weight: 650; line-height: 1.35; margin: 0 0 10px; }
.block p, .block li { color: var(--muted); margin: 0 0 10px; }
.block p:last-child, .block li:last-child { margin-bottom: 0; }
.block ul { margin: 0 0 10px; padding-left: 1.2em; }
.block ul:last-child { margin-bottom: 0; }
.block li::marker { color: var(--gold); }
.contact-card { text-align: center; }
.contact-card .btn { margin-top: 6px; }

.helplines { list-style: none; padding: 0 !important; margin: 14px 0 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.helplines li { margin: 0 !important; padding: 12px 14px; border-radius: 14px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); display: grid; gap: 2px; }
.helplines .region { font-size: 12px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); }
.helplines .line-name { color: var(--soft); font-size: 15px; }
.helplines .tel { font-size: 19px; font-weight: 650; color: var(--fg); text-decoration: none; }
.helplines .tel:hover { color: var(--rose); }
.helplines small { color: var(--faint); font-size: 13px; }

.faq { margin: 0 0 14px; display: grid; gap: 8px; }
.faq details { background: var(--panel); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); scroll-margin-top: 16px; }
.faq summary { list-style: none; cursor: pointer; padding: 16px 48px 16px 20px; position: relative; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: translateY(-70%) rotate(45deg); transition: transform 0.2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { margin: 0; padding: 0 20px 18px; color: var(--muted); }

/* 404 */
body.lost { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(60% 50% at 50% 30%, rgba(140, 34, 56, 0.32), transparent 70%), var(--bg); }
.doc.center { text-align: center; padding-bottom: 48px; }
.brand.big { font-size: 30px; flex-direction: column; gap: 14px; }
.brand.big img { width: 64px; height: 64px; border-radius: 16px; }
.lost h1 { font-size: 72px; margin: 24px 0 4px; }
.lost-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; }

@media (max-width: 960px) {
  .hero { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 8px; padding-top: 24px; }
  .hero .fan { order: -1; width: min(100%, 440px); margin: 0 auto; aspect-ratio: 1 / 0.8; }
  .hero h1, .hero .line { margin-left: auto; margin-right: auto; }
  .leads { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin: 0 auto; }
  .portrait { aspect-ratio: 4 / 3.6; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .hero .line { font-size: 17px; }
  .features { grid-template-columns: minmax(0, 1fr); }
  .band { padding-top: 72px; }
  .safe-band { flex-direction: column; align-items: flex-start; padding: 26px 22px; }
  .block { padding: 20px; }
  .helplines { grid-template-columns: minmax(0, 1fr); }
  .footer .wrap { justify-content: center; text-align: center; }
  .footer .links { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
