/* 夜ふかしガイド｜人物紹介 — 同人側と同じ配色・メニュー・カードに合わせたデザイン */
:root {
  --bg: #12141f; --panel: #1a1d2c; --panel2: #242839; --line: #333852;
  --text: #f2f3f9; --mut: #b0b6cd; --lamp: #f6cf85; --lamp-ink: #2a1f06; --lamp-soft: rgba(246, 207, 133, .16);
  --shadow: 0 8px 24px rgba(0, 0, 0, .28); --radius: 14px; --side: 232px;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Noto Sans JP", system-ui, sans-serif;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f1f3f8; --panel: #ffffff; --panel2: #e9ecf4; --line: #d6dbe8;
  --text: #1b1e2b; --mut: #566078; --lamp: #9a5a06; --lamp-ink: #ffffff; --lamp-soft: rgba(154, 90, 6, .10);
  --shadow: 0 6px 20px rgba(40, 48, 80, .10);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.85 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lamp); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--mut); }

/* ---------- レイアウト(同人側と共通) ---------- */
.app { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); gap: 20px; padding: 16px; max-width: 1400px; margin: 0 auto; }
.side { position: sticky; top: 16px; align-self: start; height: calc(100vh - 32px); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px 12px 12px; display: flex; flex-direction: column; overflow: hidden; }
.side-scroll { overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px 8px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 16px; font-weight: 700; letter-spacing: .02em; }
.brand-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--lamp); box-shadow: inset -9px -3px 0 0 var(--panel), 0 0 18px var(--lamp-soft); flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--mut); letter-spacing: .06em; line-height: 1.3; }
.nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px; border-radius: 10px; color: var(--mut); font-size: 15px; line-height: 1.4; }
.nav a:hover { background: var(--panel2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--lamp-soft); color: var(--lamp); font-weight: 700; }
.nav-title { margin: 18px 10px 6px; font-size: 13px; color: var(--mut); font-weight: 700; }
.side-x { display: block; margin: 0 2px; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--mut); }
.side-x:hover { border-color: var(--lamp); color: var(--text); }
.side-x strong { display: block; color: var(--text); font-size: 14px; }
.side-x b { color: var(--lamp); font-weight: 700; }
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.side-foot a { font-size: 12px; color: var(--mut); padding: 6px 8px; border-radius: 8px; }
.side-foot a:hover { color: var(--text); background: var(--panel2); }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; display: inline-grid; place-items: center; color: var(--mut); border: 1px solid var(--line); background: var(--panel); }
.icon-btn:hover { color: var(--text); background: var(--panel2); }
.icon-btn svg { width: 18px; height: 18px; }
.main { min-width: 0; }
.scrim { display: none; }
.topbar { display: flex; gap: 10px; align-items: center; position: sticky; top: 16px; z-index: 20; margin-bottom: 18px; }
.search { flex: 1; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.search:focus-within { border-color: var(--lamp); }
.search svg { width: 18px; height: 18px; color: var(--mut); flex: none; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--mut); }
#menu { display: none; }

/* ---------- 共通部品 ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--lamp-soft); color: var(--lamp); }
.eyebrow { color: var(--lamp); letter-spacing: .12em; font-size: 12px; font-weight: 700; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-weight: 700; font-size: 14px; }
.button:hover { border-color: var(--lamp); color: var(--lamp); }
.x-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: 14px; background: var(--lamp); color: var(--lamp-ink); font-weight: 900; box-shadow: 0 8px 24px var(--lamp-soft); }
.x-cta b { font-weight: 700; opacity: .85; }
.x-cta:hover { filter: brightness(1.06); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; margin: 18px 0; }
.panel h2 { margin: 0 0 10px; font-size: 20px; line-height: 1.4; font-weight: 900; }
.panel p { max-width: 46em; }
.panel a:not(.x-cta):not(.button):not(.wt):not(.wcover) { color: var(--lamp); text-decoration: underline; text-underline-offset: 4px; word-break: break-all; }
.panel li { margin: 10px 0; }
.empty { padding: 24px; border: 1px dashed var(--line); border-radius: 12px; color: var(--mut); }
.pr-note { margin: 0 0 12px; font-size: 12px; color: var(--mut); }

/* ---------- 一覧ページ ---------- */
.hero2 { background: radial-gradient(120% 140% at 0% 0%, var(--lamp-soft), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 28px 28px 26px; margin: 4px 0 8px; }
.hero2 h1 { margin: 8px 0 10px; font-size: clamp(26px, 4vw, 38px); line-height: 1.35; font-weight: 900; letter-spacing: .01em; }
.hero2 p { margin: 0 0 16px; max-width: 40em; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
h2#list, .sec-title { margin: 28px 0 4px; font-size: 22px; font-weight: 900; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 12px 0 16px; font-size: 14px; color: var(--mut); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.grid .ad-slot { grid-column: 1 / -1; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 18px; transition: border-color .15s; }
.card:hover { border-color: var(--lamp); }
.card .av { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 22px; color: #fff; margin-bottom: 4px; background: linear-gradient(150deg, hsl(var(--h) 50% 42%), hsl(calc(var(--h) + 40) 55% 26%)); }
.card h3 { margin: 0; font-size: 18px; line-height: 1.4; font-weight: 900; }
.card p { margin: 0; }
.card .muted { font-size: 14px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .stretch::after { content: ""; position: absolute; inset: 0; border-radius: 18px; }
.card .button { margin-top: auto; align-self: flex-start; }
.ad-slot { margin: 24px auto; text-align: center; max-width: 100%; overflow-x: auto; }
.ad-slot .ad-label { display: block; font-size: 11px; letter-spacing: .1em; opacity: .6; margin-bottom: 4px; }
.ad-slot ins, .ad-slot iframe, .ad-slot img { max-width: 100%; }

/* ---------- 人物ページ ---------- */
.crumb { font-size: 13px; color: var(--mut); margin: 0 0 14px; }
.crumb a:hover { color: var(--lamp); }
.profile-head { display: flex; gap: 22px; align-items: center; background: radial-gradient(120% 140% at 0% 0%, var(--lamp-soft), transparent 60%), var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 26px; }
.profile-head .av { width: 96px; height: 96px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 900; font-size: 40px; color: #fff; background: linear-gradient(150deg, hsl(var(--h) 50% 42%), hsl(calc(var(--h) + 40) 55% 26%)); }
.profile-head h1 { margin: 8px 0 4px; font-size: clamp(26px, 4vw, 36px); line-height: 1.3; font-weight: 900; }
.profile-head p { margin: 0 0 6px; }
.profile-head small { display: block; font-size: 12px; margin-bottom: 14px; }
.x-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.x-panel p { margin: 0; }
.to-doujin { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.to-doujin p { margin: 0; }

/* オススメ作品(18歳以上の確認後に表示) */
.works-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 12px; }
.wcard { background: var(--panel2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.wcover { display: block; aspect-ratio: 3 / 2; background: var(--panel); overflow: hidden; }
.wcover img { width: 100%; height: 100%; object-fit: cover; }
.wmeta { padding: 10px 12px 12px; display: grid; gap: 4px; }
.wt { font-size: 13px; line-height: 1.55; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.wt:hover { color: var(--lamp); }
.wp { font-size: 13px; font-weight: 900; color: var(--lamp); font-variant-numeric: tabular-nums; }
.works-gate { margin-top: 12px; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; display: grid; gap: 12px; justify-items: start; }
.works-gate p { margin: 0; color: var(--mut); font-size: 14px; }
.works-gate button { min-height: 44px; padding: 0 20px; border-radius: 12px; background: var(--lamp); color: var(--lamp-ink); font-weight: 900; }
#works[data-pending] { display: none; }
html.gate .works-list { display: none; }
html:not(.gate) .works-gate { display: none; }

footer { margin: 40px 0 8px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--mut); font-size: 12px; line-height: 1.9; }
footer .wrap { max-width: none; padding: 0; }

/* ---------- スマホ ---------- */
@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; padding: 12px; gap: 0; }
  .side { position: fixed; z-index: 60; left: 10px; top: 10px; bottom: 10px; width: min(300px, calc(100vw - 20px)); height: auto; transform: translateX(-110%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.drawer .side { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 50; background: rgba(5, 6, 12, .6); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.drawer .scrim { opacity: 1; pointer-events: auto; }
  #menu { display: inline-grid; }
  .topbar { top: 10px; }
  .hero2 { padding: 22px 18px; }
  .profile-head { flex-direction: column; align-items: flex-start; padding: 20px; }
  .profile-head .av { width: 72px; height: 72px; font-size: 30px; }
  .panel { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
