:root {
  --ink: #f0eadf;
  --muted: #9d968c;
  --dim: #6f6a63;
  --paper: #171719;
  --panel: #1e1e20;
  --panel-2: #242426;
  --line: rgba(238, 229, 213, 0.13);
  --gold: #d9b76e;
  --gold-soft: #8d7241;
  --red: #c74a48;
  --green: #7fa485;
  --survivor: #d9bf75;
  --killer: #c34b48;
  --perk-accent: #8b5cf6;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: #0b0b0c; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 0%, rgba(102, 94, 76, 0.16), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(115, 30, 30, 0.12), transparent 38rem),
    #0b0b0c;
  color: var(--ink);
  font-family: "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.app-shell { min-height: 100vh; overflow: hidden; }

.site-header {
  width: min(1320px, calc(100% - 48px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; }
.brand > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.brand small, .eyebrow { color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .19em; text-transform: uppercase; }
.brand strong { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 17px; letter-spacing: .04em; }
.brand-mark { position: relative; display: flex; width: 33px; height: 38px; transform: skew(-7deg); }
.brand-mark i { position: absolute; bottom: 3px; width: 3px; height: 31px; background: var(--ink); transform: rotate(7deg); box-shadow: 0 0 10px rgba(255,255,255,.08); }
.brand-mark i::after { content: ""; position: absolute; left: -2px; top: -2px; width: 7px; height: 7px; background: var(--ink); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.brand-mark i:nth-child(1) { left: 3px; height: 28px; }
.brand-mark i:nth-child(2) { left: 11px; height: 34px; }
.brand-mark i:nth-child(3) { left: 19px; height: 31px; }
.brand-mark i:nth-child(4) { left: 27px; height: 25px; }
.progress-summary { display: flex; align-items: center; gap: 14px; }
.progress-copy { text-align: right; display: flex; flex-direction: column; line-height: 1.05; }
.progress-copy span { color: var(--muted); font-size: 10px; letter-spacing: .1em; }
.progress-copy strong { margin-top: 4px; font-size: 19px; }
.progress-copy small { color: var(--dim); font-size: 11px; font-weight: 600; }
.progress-ring { --progress: 0deg; width: 51px; height: 51px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--gold) var(--progress), #29292b 0); position: relative; }
.progress-ring::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: #111113; }
.progress-ring span { z-index: 1; font-size: 10px; font-weight: 800; }

.hero {
  width: min(1320px, calc(100% - 48px));
  min-height: 380px;
  margin: 0 auto;
  padding: 74px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 80px;
  align-items: end;
}
.hero h1 { margin: 16px 0 18px; max-width: 760px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-weight: 600; font-size: clamp(40px, 5.3vw, 76px); line-height: 1.12; letter-spacing: -.04em; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero-copy { max-width: 650px; color: var(--muted); font-size: 15px; line-height: 1.9; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 112px); border: 1px solid var(--line); border-bottom-color: var(--gold-soft); background: rgba(17,17,19,.66); backdrop-filter: blur(12px); }
.hero-stats > div { min-height: 148px; padding: 21px 18px; display: flex; flex-direction: column; justify-content: flex-end; border-right: 1px solid var(--line); }
.hero-stats > div:last-child { border: 0; }
.hero-stats span { color: var(--muted); font-size: 10px; }
.hero-stats strong { margin: 7px 0 2px; font-family: Georgia, serif; font-size: 37px; font-weight: 500; }
.hero-stats small { color: var(--dim); font-size: 8px; letter-spacing: .15em; }

.mode-nav { position: sticky; z-index: 20; top: 0; display: flex; justify-content: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(13,13,15,.91); backdrop-filter: blur(15px); }
.mode-nav button { width: 190px; height: 64px; border: 0; border-right: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; font-weight: 700; letter-spacing: .06em; transition: .2s ease; display: flex; align-items: center; justify-content: center; gap: 10px; }
.mode-nav button:first-child { border-left: 1px solid var(--line); }
.mode-nav__icon { --mode-icon: none; flex: 0 0 auto; width: 27px; height: 27px; display: block; background: currentColor; color: #837e76; opacity: .72; -webkit-mask: var(--mode-icon) center / contain no-repeat; mask: var(--mode-icon) center / contain no-repeat; filter: drop-shadow(0 2px 5px rgba(0,0,0,.5)); transition: color .2s ease,opacity .2s ease,filter .2s ease,transform .2s ease; }
.mode-nav__icon--characters { width: 29px; height: 29px; background: none; -webkit-mask: none; mask: none; opacity: .9; }
.mode-nav__icon--characters svg { width: 100%; height: 100%; display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mode-nav__label { display: block; white-space: nowrap; }
.mode-nav button:hover { background: rgba(255,255,255,.025); color: var(--ink); }
.mode-nav button.is-active { color: var(--ink); background: #1c1c1e; box-shadow: inset 0 -2px var(--gold); }
.mode-nav button.is-active .mode-nav__icon { color: var(--gold); opacity: 1; filter: drop-shadow(0 0 7px rgba(217,183,110,.24)); transform: translateY(-1px); }

.workspace { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 58px 0 100px; min-height: 760px; }
.workspace-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 28px; }
.workspace-head h2 { margin: 6px 0 0; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 32px; font-weight: 600; }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); background: #121214; }
.segmented button { min-width: 86px; height: 35px; padding: 0 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.segmented button.is-active { background: #2b2b2e; color: var(--ink); }
.catalog-tools { display: flex; align-items: center; gap: 18px; }
.search-box { flex: 1; min-height: 49px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border: 1px solid var(--line); background: #151517; }
.search-box > span { color: var(--gold); font-size: 25px; transform: rotate(-20deg); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }
.search-box input::placeholder { color: #706c66; }
.search-box kbd { padding: 4px 7px; border: 1px solid var(--line); color: var(--dim); font-size: 9px; }
.result-count { min-width: 100px; color: var(--muted); font-size: 11px; text-align: right; }
.result-count strong { margin-right: 4px; color: var(--ink); font-size: 18px; }
.category-scroll { display: flex; gap: 7px; padding: 15px 0 22px; overflow-x: auto; scrollbar-width: thin; }
.category-scroll button { flex: 0 0 auto; min-height: 31px; padding: 0 12px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; }
.category-scroll button:hover, .category-scroll button.is-active { border-color: var(--gold-soft); background: rgba(217,183,110,.08); color: var(--gold); }

.perk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.perk-card { position: relative; min-height: 134px; padding: 16px 12px 14px 15px; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 12px; border: 1px solid var(--line); border-left: 2px solid transparent; background: linear-gradient(125deg, #1c1c1f, #171719); text-align: left; cursor: pointer; overflow: hidden; transition: border-color .2s ease, transform .2s ease, background .2s ease; }
.perk-card::after { content: ""; position: absolute; right: -50px; bottom: -65px; width: 120px; height: 120px; border: 1px solid var(--line); transform: rotate(45deg); }
.perk-card:hover { z-index: 2; border-color: rgba(217,183,110,.46); transform: translateY(-2px); background: linear-gradient(125deg, #242426, #19191b); }
.perk-card--survivor:hover { border-left-color: var(--survivor); }
.perk-card--killer:hover { border-left-color: var(--killer); }
.perk-card.is-learned::before { content: ""; position: absolute; inset: 0; background: rgba(127,164,133,.04); pointer-events: none; }
.perk-card__copy { min-width: 0; display: flex; flex-direction: column; padding-top: 3px; }
.perk-card__copy small { color: var(--dim); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perk-card__copy strong { margin: 5px 0 1px; font-size: 13px; line-height: 1.35; }
.perk-card__copy em { color: var(--muted); font-family: Georgia, serif; font-size: 9px; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perk-card__summary { margin-top: 8px; color: #a49e94; font-size: 9px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.perk-card__meta { position: absolute; left: 14px; right: 11px; bottom: 9px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.perk-card__meta i { color: var(--dim); font-size: 8px; font-style: normal; }
.perk-card__meta b { color: var(--gold); font-size: 9px; }
.perk-card.is-learned .perk-card__meta b { color: var(--green); font-size: 13px; }

.perk-icon { position: relative; flex: 0 0 auto; display: grid; place-items: center; transform: rotate(45deg); border: 1px solid var(--perk-accent); background: radial-gradient(circle at 30% 30%, var(--perk-accent), #211a2a 68%); box-shadow: inset 0 0 0 4px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.08), 0 8px 18px rgba(0,0,0,.28); overflow: hidden; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.perk-icon::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(255,255,255,.17); }
.perk-icon img { z-index: 1; width: 108%; height: 108%; max-width: none; object-fit: contain; transform: rotate(-45deg); filter: drop-shadow(0 2px 2px rgba(0,0,0,.55)); }
.perk-icon__fallback { z-index: 1; transform: rotate(-45deg); color: rgba(255,255,255,.75); font-family: Georgia, serif; font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.perk-icon--small { width: 47px; height: 47px; }
.perk-icon--normal { width: 65px; height: 65px; margin: 8px 6px; }
.perk-icon--large { width: 104px; height: 104px; margin: 20px; }
.perk-icon--hero { width: 164px; height: 164px; margin: 26px; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 24px; background: rgba(2,2,3,.82); backdrop-filter: blur(8px); animation: fade-in .18s ease; }
.detail-modal { position: relative; width: min(760px, 100%); max-height: calc(100vh - 48px); padding: 42px; overflow-y: auto; border: 1px solid var(--line); border-top: 2px solid var(--survivor); background: linear-gradient(150deg, #242426, #171719 60%); box-shadow: 0 30px 90px rgba(0,0,0,.6); }
.detail-modal--killer { border-top-color: var(--killer); }
.modal-close { position: absolute; top: 15px; right: 17px; width: 36px; height: 36px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; font-size: 22px; }
.detail-head { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 15px; align-items: center; }
.detail-head h2 { margin: 8px 0 2px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 30px; line-height: 1.3; }
.english-name { color: var(--muted); font-family: Georgia, serif; font-size: 12px; }
.badge-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.badge-row span { padding: 5px 8px; border: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.detail-sections { margin: 30px 0 24px; border-top: 1px solid var(--line); }
.detail-sections article { display: grid; grid-template-columns: 44px 1fr; gap: 15px; padding: 22px 8px; border-bottom: 1px solid var(--line); }
.detail-sections article.plain-language { margin: 0 -14px; padding-left: 22px; padding-right: 22px; background: rgba(217,183,110,.06); border-left: 2px solid var(--gold); }
.section-number { color: var(--dim); font-family: Georgia, serif; font-size: 11px; }
.detail-sections h3 { margin: 0 0 7px; color: var(--gold); font-size: 11px; letter-spacing: .05em; }
.detail-sections p { margin: 0; color: #c8c1b6; font-size: 13px; line-height: 1.8; }
.plain-language p { color: var(--ink); font-size: 15px; font-weight: 700; }
.learn-button { width: 100%; min-height: 49px; border: 1px solid var(--gold-soft); background: var(--gold); color: #16130f; cursor: pointer; font-size: 12px; font-weight: 800; }
.learn-button.is-learned { border-color: rgba(127,164,133,.55); background: rgba(127,164,133,.16); color: #a9c8ae; }

.study-layout, .quiz-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 42px; align-items: start; }
.study-sidebar, .quiz-stats { padding: 18px; border: 1px solid var(--line); background: #151517; }
.study-sidebar > div { display: flex; flex-direction: column; }
.study-sidebar > div span, .quiz-stats span { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.study-sidebar > div strong { margin-top: 5px; font-family: Georgia, serif; font-size: 28px; }
.study-sidebar small { color: var(--dim); font-size: 12px; }
.toggle-row { margin: 18px 0; padding: 14px 0; display: flex; align-items: center; gap: 9px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; cursor: pointer; }
.toggle-row input { accent-color: var(--gold); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--gold); cursor: pointer; font-size: 10px; text-align: left; }
.study-sidebar > p { margin: 20px 0 0; color: var(--dim); font-size: 9px; line-height: 1.8; }
.study-stage { max-width: 720px; width: 100%; justify-self: center; perspective: 1400px; }
.flash-card { position: relative; width: 100%; height: 540px; display: block; padding: 0; border: 0; background: transparent; cursor: pointer; transform-style: preserve-3d; transition: transform .55s cubic-bezier(.2,.7,.2,1); }
.flash-card.is-revealed { transform: rotateY(180deg); }
.flash-card__face { position: absolute; inset: 0; padding: 38px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--line); background: radial-gradient(circle at 50% 25%, #292829, #171719 65%); backface-visibility: hidden; overflow: hidden; box-shadow: 0 25px 65px rgba(0,0,0,.3); }
.flash-card__face::before, .flash-card__face::after { content: ""; position: absolute; width: 220px; height: 220px; border: 1px solid rgba(255,255,255,.04); transform: rotate(45deg); }
.flash-card__face::before { left: -150px; top: -100px; }
.flash-card__face::after { right: -150px; bottom: -100px; }
.flash-card--survivor .flash-card__face { border-top: 2px solid var(--survivor); }
.flash-card--killer .flash-card__face { border-top: 2px solid var(--killer); }
.flash-card__back { align-items: stretch; transform: rotateY(180deg); background: linear-gradient(140deg, #272629, #171719); }
.flash-card__front h3 { margin: 14px 0 4px; max-width: 520px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 29px; line-height: 1.35; text-align: center; }
.card-counter { position: absolute; left: 27px; top: 24px; color: var(--dim); font-family: Georgia, serif; font-size: 10px; letter-spacing: .12em; }
.tap-hint { position: absolute; bottom: 22px; color: var(--dim); font-size: 9px; }
.flash-card__back > h3 { max-width: 600px; margin: 9px 0 26px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(19px, 3vw, 27px); line-height: 1.65; }
.flash-effect, .flash-tip { display: grid; grid-template-columns: 54px 1fr; gap: 15px; padding: 15px 0; border-top: 1px solid var(--line); }
.flash-effect span, .flash-tip span { color: var(--gold); font-size: 9px; font-weight: 800; }
.flash-effect p, .flash-tip p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.study-actions { margin-top: 16px; display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; }
.study-actions button { min-height: 48px; border: 1px solid var(--line); background: #1d1d1f; cursor: pointer; font-size: 12px; font-weight: 700; }
.study-actions button:nth-child(2) { border-color: var(--gold-soft); color: var(--gold); }
.study-actions button.learned-action { border-color: rgba(127,164,133,.45); background: rgba(127,164,133,.12); color: #a7c7ac; }

.quiz-layout { grid-template-columns: 180px minmax(0, 1fr); }
.quiz-stats { display: grid; gap: 20px; }
.quiz-stats > div { display: flex; flex-direction: column; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.quiz-stats strong { margin: 5px 0; font-family: Georgia, serif; font-size: 29px; }
.quiz-stats small { color: var(--dim); font-size: 8px; letter-spacing: .08em; }
.quiz-stats .text-button { margin-top: 10px; color: var(--dim); }
.quiz-filter { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; }
.quiz-filter select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 4px; background: #111113; color: var(--text); padding: 0 10px; font: inherit; letter-spacing: 0; }
.quiz-card { max-width: 820px; width: 100%; justify-self: center; padding: 32px; border: 1px solid var(--line); background: linear-gradient(145deg, #202023, #161618); }
.quiz-type { display: inline-block; padding: 5px 8px; border: 1px solid var(--gold-soft); color: var(--gold); font-size: 9px; letter-spacing: .07em; }
.quiz-prompt { min-height: 240px; padding: 25px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.quiz-prompt h3 { max-width: 620px; margin: 12px 0 7px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 22px; line-height: 1.65; }
.quiz-prompt > p:last-child { color: var(--muted); font-size: 11px; }
.quiz-prompt .quote-mark { height: 25px; margin: 0; color: var(--gold); font-family: Georgia, serif; font-size: 52px; line-height: 1; }
.quiz-prompt h3.quiz-name { margin: 18px 0 5px; font-size: 36px; }
.quiz-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.quiz-choices button { min-height: 59px; padding: 11px 14px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); background: #242426; color: #d8d1c6; cursor: pointer; text-align: left; font-size: 12px; line-height: 1.55; transition: .15s ease; }
.quiz-choices button:hover:not(:disabled) { border-color: var(--gold-soft); background: #2d2c2d; }
.quiz-choices button > span { flex: 0 0 auto; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); color: var(--dim); font-family: Georgia, serif; font-size: 10px; }
.quiz-choices--effects button { min-height: 96px; font-size: 10px; }
.quiz-choices button.is-correct { border-color: rgba(127,164,133,.65); background: rgba(127,164,133,.15); color: #d6e3d8; }
.quiz-choices button.is-wrong { border-color: rgba(199,74,72,.7); background: rgba(199,74,72,.13); }
.quiz-choices button.is-muted { opacity: .38; }
.quiz-feedback { margin-top: 10px; padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 2px solid var(--green); background: rgba(127,164,133,.09); }
.quiz-feedback.is-wrong { border-left-color: var(--red); background: rgba(199,74,72,.08); }
.quiz-feedback strong { color: #aac8af; font-size: 13px; }
.quiz-feedback.is-wrong strong { color: #dd8785; }
.quiz-feedback p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.quiz-feedback button { flex: 0 0 auto; padding: 10px 13px; border: 1px solid var(--line); background: #2a2a2c; cursor: pointer; font-size: 10px; }
.quiz-feedback button span { margin-left: 6px; color: var(--gold); }

.empty-state { min-height: 300px; display: grid; place-content: center; text-align: center; border: 1px dashed var(--line); color: var(--muted); }
.empty-state strong { color: var(--ink); font-family: "Yu Mincho", serif; font-size: 20px; }
.empty-state p { font-size: 11px; }
.empty-state--success strong { color: #a7c7ac; }
.site-footer { width: min(1320px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 48px; display: grid; grid-template-columns: 1fr auto; gap: 18px 40px; border-top: 1px solid var(--line); color: var(--dim); font-size: 9px; }
.site-footer strong { color: var(--muted); font-family: "Yu Mincho", serif; font-size: 12px; }
.site-footer p { margin: 5px 0 0; }
.site-footer > div:nth-child(2) { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 16px; }
.site-footer > p { grid-column: 1 / -1; }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1120px) {
  .perk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { gap: 35px; }
  .hero-stats { grid-template-columns: repeat(3, 92px); }
  .hero-stats > div { min-height: 130px; padding: 17px 13px; }
}

@media (max-width: 820px) {
  .site-header, .hero, .workspace, .site-footer { width: min(100% - 30px, 680px); }
  .site-header { min-height: 72px; }
  .progress-copy { display: none; }
  .hero { min-height: 0; padding: 50px 0; grid-template-columns: 1fr; gap: 35px; }
  .hero-stats { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .hero-stats > div { min-height: 105px; }
  .hero-stats strong { font-size: 29px; }
  .mode-nav button { width: 33.33%; height: 56px; }
  .workspace { padding-top: 40px; }
  .perk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .study-layout, .quiz-layout { grid-template-columns: 1fr; gap: 18px; }
  .study-sidebar { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; }
  .study-sidebar > div strong { font-size: 21px; }
  .toggle-row { margin: 0; padding: 0; border: 0; justify-self: center; }
  .study-sidebar > p { display: none; }
  .quiz-stats { grid-template-columns: 1fr 1fr auto; align-items: center; }
  .quiz-stats > div { padding: 0; border: 0; }
  .quiz-stats strong { font-size: 21px; }
  .quiz-card { padding: 24px; }
  .detail-modal { padding: 34px 25px; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > div:nth-child(2) { justify-content: flex-start; }
}

@media (max-width: 560px) {
  .site-header, .hero, .workspace, .site-footer { width: calc(100% - 24px); }
  .brand small { display: none; }
  .brand strong { font-size: 14px; }
  .brand-mark { transform: scale(.82) skew(-7deg); transform-origin: left center; margin-right: -4px; }
  .progress-ring { width: 44px; height: 44px; }
  .hero { padding: 38px 0 42px; }
  .hero h1 { font-size: clamp(34px, 12vw, 51px); }
  .hero-copy { font-size: 13px; }
  .hero-stats span { font-size: 9px; }
  .hero-stats small { display: none; }
  .hero-stats > div { min-height: 88px; }
  .mode-nav button { height: 53px; font-size: 11px; }
  .mode-nav__icon { display: block; width: 24px; height: 24px; }
  .workspace-head { align-items: flex-start; flex-direction: column; gap: 17px; }
  .segmented { width: 100%; }
  .segmented button { min-width: 0; flex: 1; }
  .catalog-tools { align-items: stretch; flex-direction: column; gap: 7px; }
  .search-box kbd { display: none; }
  .result-count { align-self: flex-end; }
  .perk-grid { grid-template-columns: 1fr; }
  .perk-card { min-height: 126px; }
  .perk-card__copy strong { font-size: 14px; }
  .study-sidebar { grid-template-columns: 1fr 1fr; }
  .study-sidebar .text-button { grid-column: 1 / -1; }
  .flash-card { height: 530px; }
  .flash-card__face { padding: 29px 24px; }
  .perk-icon--hero { width: 138px; height: 138px; }
  .flash-card__front h3 { font-size: 24px; }
  .flash-card__back > h3 { font-size: 19px; line-height: 1.55; }
  .flash-effect, .flash-tip { grid-template-columns: 42px 1fr; }
  .quiz-stats { grid-template-columns: 1fr 1fr; }
  .quiz-stats .text-button { grid-column: 1 / -1; }
  .quiz-card { padding: 18px 14px; }
  .quiz-prompt { min-height: 230px; padding-left: 6px; padding-right: 6px; }
  .quiz-prompt h3 { font-size: 19px; }
  .quiz-prompt h3.quiz-name { font-size: 29px; }
  .quiz-choices { grid-template-columns: 1fr; }
  .quiz-choices--effects button { min-height: 82px; }
  .quiz-feedback { align-items: stretch; flex-direction: column; }
  .quiz-feedback button { min-height: 42px; }
  .detail-modal { max-height: calc(100vh - 18px); padding: 35px 18px 20px; }
  .detail-head { grid-template-columns: 1fr; text-align: center; }
  .detail-head .perk-icon { justify-self: center; }
  .detail-head h2 { font-size: 24px; }
  .badge-row { justify-content: center; }
  .detail-sections article { grid-template-columns: 32px 1fr; padding-left: 0; padding-right: 0; }
  .detail-sections article.plain-language { margin: 0 -6px; padding-left: 10px; padding-right: 10px; }
  .site-footer > div:nth-child(2) { gap: 8px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* v3: 陣営選択とモバイル最適化 */
html { min-width: 320px; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-width: 320px; }
button { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100vh; min-height: 100dvh; overflow: clip; }
.header-note { color: var(--dim); font-size: 11px; }
.header-actions { display: flex; align-items: center; gap: 18px; }
.current-side { min-height: 42px; padding: 0 14px; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #141416; color: var(--muted); cursor: pointer; font-size: 11px; font-weight: 700; }
.current-side span, .side-label::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--survivor); box-shadow: 0 0 12px rgba(217,191,117,.5); }
.current-side--killer span, .side-label--killer::before { background: var(--killer); box-shadow: 0 0 12px rgba(195,75,72,.55); }
.current-side:hover { border-color: rgba(217,183,110,.45); color: var(--ink); }

.entrance-shell { display: grid; grid-template-rows: auto 1fr auto; }
.side-entrance { width: min(1240px, calc(100% - 48px)); margin: 0 auto; padding: 64px 0; display: grid; grid-template-columns: minmax(320px,.72fr) minmax(560px,1.28fr); gap: clamp(46px,7vw,100px); align-items: center; }
.entrance-copy h1 { max-width: 540px; margin: 14px 0 22px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(42px,5.5vw,72px); font-weight: 600; line-height: 1.2; letter-spacing: -.045em; }
.entrance-description { max-width: 500px; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.side-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.side-choice { position: relative; min-width: 0; min-height: 410px; padding: 23px; display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 2px solid var(--survivor); background: linear-gradient(150deg,rgba(54,51,43,.93),#18181a 62%); text-align: left; cursor: pointer; overflow: hidden; transition: transform .2s ease,border-color .2s ease,background .2s ease; }
.side-choice::after { content: ""; position: absolute; right: -90px; bottom: -120px; width: 250px; height: 250px; border: 1px solid rgba(255,255,255,.05); transform: rotate(45deg); }
.side-choice--killer { border-top-color: var(--killer); background: linear-gradient(150deg,rgba(65,35,35,.93),#18181a 62%); }
.side-choice:hover { z-index: 1; transform: translateY(-4px); border-color: rgba(217,191,117,.56); }
.side-choice--killer:hover { border-color: rgba(195,75,72,.66); }
.side-choice__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dim); font-size: 9px; letter-spacing: .12em; }
.side-choice__top b { color: var(--muted); font-weight: 700; }
.side-choice__icons { min-height: 130px; margin: 30px 0 23px; display: flex; justify-content: center; align-items: center; }
.side-choice__icons .perk-icon { margin: 0 -5px; }
.side-choice__icons .perk-icon:nth-child(2) { z-index: 2; width: 66px; height: 66px; }
.side-choice__copy { display: flex; flex-direction: column; gap: 9px; }
.side-choice__copy strong { font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: 23px; }
.side-choice__copy > span { color: var(--muted); font-size: 11px; line-height: 1.75; }
.side-choice__action { z-index: 1; margin-top: auto; padding-top: 24px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: var(--gold); font-size: 11px; font-weight: 800; }
.side-choice--killer .side-choice__action { color: #e2817f; }
.side-choice__action b { font-size: 16px; }
.entrance-footer { width: min(1240px,calc(100% - 48px)); margin: 0 auto; padding: 24px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--dim); font-size: 9px; }

.role-hero { width: min(1320px,calc(100% - 48px)); min-height: 258px; margin: 0 auto; padding: 55px 0 48px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 64px; align-items: end; }
.role-hero h1 { margin: 12px 0 14px; font-family: "Yu Mincho", "Hiragino Mincho ProN", serif; font-size: clamp(35px,4.4vw,58px); font-weight: 600; line-height: 1.2; letter-spacing: -.04em; }
.role-hero--killer h1 { text-shadow: 0 0 36px rgba(195,75,72,.15); }
.role-hero .hero-copy { margin: 0; font-size: 13px; line-height: 1.85; }
.role-stats { display: grid; grid-template-columns: repeat(2,112px); border: 1px solid var(--line); border-bottom-color: var(--gold-soft); background: rgba(17,17,19,.7); backdrop-filter: blur(12px); }
.role-hero--killer .role-stats { border-bottom-color: rgba(195,75,72,.7); }
.role-stats > div { min-height: 112px; padding: 18px; display: flex; flex-direction: column; justify-content: flex-end; border-right: 1px solid var(--line); }
.role-stats > div:last-child { border-right: 0; }
.role-stats span { color: var(--muted); font-size: 9px; }
.role-stats strong { margin: 5px 0 1px; font-family: Georgia,serif; font-size: 32px; font-weight: 500; }
.role-stats small { color: var(--dim); font-size: 9px; }
.side-label { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.search-box input[type="search"]::-webkit-search-cancel-button { filter: invert(1); opacity: .55; }
.detail-modal { max-height: calc(100dvh - 48px); overscroll-behavior: contain; }
.modal-close { width: 44px; height: 44px; background: rgba(23,23,25,.88); }
.toggle-row input { width: 18px; height: 18px; }
.category-scroll { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.learn-button, .study-actions button, .quiz-feedback button { min-height: 48px; }

@media (max-width: 1120px) {
  .side-entrance { grid-template-columns: 1fr; gap: 34px; padding: 50px 0; }
  .entrance-copy { max-width: 760px; }
  .side-choice-grid { max-width: 820px; width: 100%; }
  .side-choice { min-height: 345px; }
  .side-choice__icons { min-height: 100px; margin: 20px 0; }
}

@media (max-width: 820px) {
  .site-header, .role-hero, .workspace, .site-footer, .side-entrance, .entrance-footer { width: min(100% - 30px,680px); }
  .header-actions { gap: 8px; }
  .role-hero { min-height: 0; padding: 40px 0; grid-template-columns: 1fr; gap: 27px; }
  .role-stats { width: 100%; grid-template-columns: 1fr 1fr; }
  .role-stats > div { min-height: 85px; }
  .mode-nav { position: fixed; top: auto; bottom: 0; left: 0; right: 0; z-index: 80; padding-bottom: env(safe-area-inset-bottom); background: rgba(13,13,15,.97); box-shadow: 0 -12px 30px rgba(0,0,0,.32); }
  .mode-nav button { width: 33.333%; min-height: 58px; }
  .workspace { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  .modal-backdrop { align-items: end; padding: 0; }
  .detail-modal { width: 100%; max-height: min(92dvh,820px); padding: 38px 25px calc(22px + env(safe-area-inset-bottom)); border-left: 0; border-right: 0; border-bottom: 0; border-radius: 18px 18px 0 0; }
  .site-footer { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
}

@media (max-width: 560px) {
  .site-header, .role-hero, .workspace, .site-footer, .side-entrance, .entrance-footer { width: auto; margin-left: max(12px,env(safe-area-inset-left)); margin-right: max(12px,env(safe-area-inset-right)); }
  .entrance-header .brand small, .header-note { display: none; }
  .current-side { min-height: 40px; padding: 0 10px; font-size: 10px; }
  .side-entrance { padding: 34px 0 30px; align-items: start; }
  .entrance-copy h1 { margin: 10px 0 14px; font-size: clamp(34px,11vw,48px); }
  .entrance-description { font-size: 12px; line-height: 1.75; }
  .side-choice-grid { grid-template-columns: 1fr; gap: 10px; }
  .side-choice { min-height: 244px; padding: 18px; }
  .side-choice__icons { min-height: 70px; margin: 14px 0 10px; }
  .side-choice__icons .perk-icon:nth-child(2) { width: 58px; height: 58px; }
  .side-choice__copy strong { font-size: 20px; }
  .side-choice__copy > span { font-size: 10px; }
  .side-choice__action { padding-top: 15px; }
  .entrance-footer { padding-top: 17px; }
  .role-hero { padding: 29px 0 30px; gap: 20px; }
  .role-hero h1 { margin: 8px 0 10px; font-size: 29px; }
  .role-hero .hero-copy { font-size: 11px; line-height: 1.7; }
  .role-stats > div { min-height: 72px; padding: 12px 14px; }
  .role-stats strong { font-size: 25px; }
  .workspace-head { margin-bottom: 20px; }
  .workspace-head h2 { font-size: 26px; }
  .side-label { margin-top: 3px; padding: 7px 8px; font-size: 9px; }
  .category-scroll { margin-right: -12px; padding-right: 12px; }
  .flash-card { height: min(530px,calc(100dvh - 245px)); min-height: 455px; }
  .detail-modal { max-height: 94dvh; padding: 34px 18px calc(18px + env(safe-area-inset-bottom)); }
}

@media (max-width: 370px) {
  .current-side { padding: 0 8px; }
  .current-side span, .progress-summary, .side-label { display: none; }
}

@media (hover: none) {
  .perk-card:hover, .side-choice:hover { transform: none; }
}

/* v4: ゲーム内説明とキャラクタービジュアル */
.entrance-shell { position: relative; isolation: isolate; background: #0c0c0e; }
.entrance-shell::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 18% 46%, rgba(111,116,131,.12), transparent 31%), radial-gradient(circle at 82% 48%, rgba(132,33,35,.13), transparent 34%), linear-gradient(115deg, #0b0c0e, #111113 50%, #0b0b0d); }
.entrance-shell::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .24; pointer-events: none; background-image: repeating-linear-gradient(115deg, transparent 0 57px, rgba(255,255,255,.018) 58px, transparent 59px); }

.side-choice > span { position: relative; z-index: 2; }
.side-choice__character { position: absolute; z-index: 0; right: -42px; bottom: -118px; width: 88%; height: 108%; object-fit: contain; object-position: right bottom; opacity: .48; filter: saturate(.72) contrast(1.08) drop-shadow(0 18px 28px rgba(0,0,0,.58)); pointer-events: none; transform-origin: 65% 75%; transition: opacity .35s ease, transform .45s cubic-bezier(.2,.7,.2,1); -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 18%, #000 46%); mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.42) 18%, #000 46%); }
.side-choice--killer .side-choice__character { right: -55px; bottom: -105px; width: 96%; opacity: .5; filter: saturate(.64) contrast(1.15) drop-shadow(0 18px 30px rgba(0,0,0,.65)); }
.side-choice:hover .side-choice__character { opacity: .68; transform: scale(1.035) translateY(-4px); }
.side-choice__top, .side-choice__copy, .side-choice__action { text-shadow: 0 2px 12px rgba(0,0,0,.9); }
.side-choice__icons { width: 62%; justify-content: flex-start; }
.side-choice__copy { max-width: 78%; }
.side-choice::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(20,20,21,.96) 0%, rgba(20,20,21,.74) 45%, rgba(20,20,21,.06) 82%); }
.side-choice--survivor::before { background: linear-gradient(90deg, rgba(32,31,28,.96) 0%, rgba(27,26,24,.72) 46%, rgba(27,26,24,.04) 84%); }
.side-choice--killer::before { background: linear-gradient(90deg, rgba(35,22,23,.97) 0%, rgba(31,21,22,.72) 46%, rgba(31,21,22,.04) 84%); }

.role-hero { position: relative; isolation: isolate; overflow: hidden; border-bottom: 1px solid var(--line); }
.role-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(circle at 73% 54%, rgba(206,179,105,.11), transparent 24%); }
.role-hero--killer::before { background: radial-gradient(circle at 73% 54%, rgba(190,61,59,.14), transparent 26%); }
.role-hero__character { position: absolute; z-index: -1; top: -68px; right: 175px; width: 270px; height: 440px; object-fit: contain; object-position: top center; opacity: .18; filter: grayscale(.28) contrast(1.14); pointer-events: none; -webkit-mask-image: linear-gradient(#000 20%, rgba(0,0,0,.72) 64%, transparent 95%); mask-image: linear-gradient(#000 20%, rgba(0,0,0,.72) 64%, transparent 95%); }
.role-hero--killer .role-hero__character { width: 310px; right: 155px; opacity: .2; filter: saturate(.55) contrast(1.2); }
.role-hero > div, .role-hero .role-stats { position: relative; z-index: 1; }

.workspace-settings { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.perk-color-picker { min-height: 40px; padding: 5px 7px 5px 10px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(18,18,20,.82); }
.perk-color-picker__copy { min-width: 57px; display: flex; flex-direction: column; gap: 1px; }
.perk-color-picker__copy b { color: var(--ink); font-size: 9px; white-space: nowrap; }
.perk-color-picker__copy small { color: var(--dim); font-size: 8px; }
.perk-color-picker__swatches { display: inline-flex; align-items: center; gap: 2px; }
.perk-color-swatch, .perk-color-custom { position: relative; width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border: 0; background: transparent; cursor: pointer; }
.perk-color-swatch::before, .perk-color-custom i { content: ""; width: 15px; height: 15px; display: block; transform: rotate(45deg); border: 1px solid rgba(255,255,255,.52); background: var(--swatch-color); box-shadow: 0 3px 7px rgba(0,0,0,.42); transition: transform .16s ease, box-shadow .16s ease; }
.perk-color-swatch:hover::before { transform: rotate(45deg) scale(1.12); }
.perk-color-swatch.is-active { background: rgba(255,255,255,.055); }
.perk-color-swatch.is-active::before { box-shadow: 0 0 0 2px #161618, 0 0 0 3px var(--swatch-color), 0 3px 7px rgba(0,0,0,.42); }
.perk-color-swatch.is-active::after { content: "✓"; position: absolute; color: #fff; font-size: 8px; font-weight: 900; text-shadow: 0 1px 3px #000; }
.perk-color-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.perk-color-custom i { background: conic-gradient(#d85a58,#dbb55f,#5a9b78,#4f82c4,#8b5cf6,#d85a58); }
.perk-color-custom > span { position: absolute; color: #fff; font-size: 11px; font-weight: 900; line-height: 1; text-shadow: 0 1px 3px #000; pointer-events: none; }
.perk-color-custom:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }
.official-toggle { min-height: 40px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(18,18,20,.82); color: var(--muted); cursor: pointer; user-select: none; transition: border-color .18s ease, background .18s ease; }
.official-toggle:hover { border-color: rgba(217,191,117,.44); background: #1a1a1c; }
.official-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.official-toggle__track { position: relative; flex: 0 0 auto; width: 38px; height: 21px; border: 1px solid #444247; border-radius: 99px; background: #29282b; transition: .2s ease; }
.official-toggle__track i { position: absolute; top: 3px; left: 3px; width: 13px; height: 13px; border-radius: 50%; background: #7d7972; box-shadow: 0 2px 7px rgba(0,0,0,.35); transition: transform .22s ease, background .22s ease; }
.official-toggle input:checked + .official-toggle__track { border-color: rgba(217,191,117,.62); background: rgba(168,132,66,.35); }
.official-toggle input:checked + .official-toggle__track i { transform: translateX(17px); background: #e4c77d; }
.official-toggle input:focus-visible + .official-toggle__track { outline: 2px solid #e7ce91; outline-offset: 3px; }
.official-toggle__copy { display: flex; align-items: baseline; gap: 6px; }
.official-toggle__copy b { color: var(--ink); font-size: 10px; font-weight: 800; white-space: nowrap; }
.official-toggle__copy small { color: var(--dim); font-size: 8px; white-space: nowrap; }
.official-toggle--compact { min-height: 36px; padding: 5px 8px; background: rgba(10,10,12,.46); }
.official-toggle--compact .official-toggle__copy b { font-size: 9px; }

.detail-display-row { margin: 24px 0 2px; padding: 10px 0; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--dim); font-size: 9px; letter-spacing: .02em; }
.detail-sections article.official-language { margin: 0 -14px; padding: 22px 14px; border-top: 0; border-left: 2px solid var(--gold); background: linear-gradient(100deg, rgba(188,149,68,.12), rgba(188,149,68,.025) 72%); }
.detail-modal--killer .detail-sections article.official-language { border-left-color: var(--killer); background: linear-gradient(100deg, rgba(195,75,72,.13), rgba(195,75,72,.025) 72%); }
.detail-sections article.official-language h3 { color: #e6d5a7; }
.detail-modal--killer .detail-sections article.official-language h3 { color: #e7a19f; }
.detail-sections article.official-language p { color: #ddd7cc; white-space: pre-line; font-size: 12px; line-height: 1.9; }

@media (max-width: 1120px) {
  .side-choice__character { right: 2%; bottom: -110px; width: 64%; }
  .side-choice--killer .side-choice__character { right: 0; width: 68%; }
  .role-hero__character { right: 120px; }
  .role-hero--killer .role-hero__character { right: 105px; }
}

@media (max-width: 820px) {
  .role-hero__character { top: -25px; right: -10px; width: 220px; height: 330px; opacity: .13; }
  .role-hero--killer .role-hero__character { right: -15px; width: 245px; opacity: .14; }
  .role-hero > div:first-of-type { max-width: calc(100% - 90px); }
  .role-stats { z-index: 2; }
}

@media (max-width: 560px) {
  .side-choice { min-height: 272px; }
  .side-choice__character { right: -18px; bottom: -82px; width: 66%; height: 118%; opacity: .45; }
  .side-choice--killer .side-choice__character { right: -26px; bottom: -78px; width: 72%; opacity: .46; }
  .side-choice__icons { width: 52%; margin-top: 18px; }
  .side-choice__copy { max-width: 72%; }
  .side-choice__copy > span { display: none; }
  .role-hero__character { right: -42px; top: -5px; width: 190px; height: 250px; opacity: .11; }
  .role-hero--killer .role-hero__character { right: -49px; width: 210px; opacity: .12; }
  .role-hero > div:first-of-type { max-width: calc(100% - 56px); }
  .workspace-settings { width: 100%; justify-content: space-between; }
  .workspace-settings { display: grid; grid-template-columns: auto 1fr; align-items: center; }
  .workspace-settings .side-label { grid-column: 1; grid-row: 1; }
  .workspace-settings > .official-toggle { grid-column: 2; grid-row: 1; justify-self: end; }
  .perk-color-picker { grid-column: 1 / -1; grid-row: 2; width: 100%; justify-content: space-between; }
  .official-toggle { min-height: 38px; padding: 6px 8px; }
  .official-toggle__copy small { display: none; }
  .detail-display-row { margin-top: 20px; align-items: flex-start; flex-direction: column; gap: 8px; }
  .detail-display-row .official-toggle { width: 100%; justify-content: space-between; }
  .detail-display-row .official-toggle__track { order: 2; }
  .detail-sections article.official-language { margin: 0 -8px; padding-left: 8px; padding-right: 8px; }
  .detail-sections article.official-language p { font-size: 11px; line-height: 1.85; }
}

@media (hover: none) {
  .side-choice:hover .side-choice__character { opacity: .48; transform: none; }
  .side-choice--killer:hover .side-choice__character { opacity: .5; }
}

/* v5: キャラクター別パークページ */
.character-directory-intro { margin-bottom: 18px; padding: 22px 24px; display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; border: 1px solid var(--line); background: linear-gradient(120deg,rgba(38,36,32,.78),rgba(18,18,20,.82)); }
.character-directory-intro h3 { margin: 6px 0 7px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 23px; font-weight: 600; }
.character-directory-intro p:last-child { max-width: 650px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.character-directory-intro > span { flex: 0 0 auto; display: flex; align-items: baseline; gap: 7px; color: var(--dim); font-family: Georgia,serif; font-size: 10px; letter-spacing: .08em; }
.character-directory-intro > span strong { color: var(--ink); font-size: 29px; font-weight: 500; }

.shared-perks-card { position: relative; width: 100%; min-height: 225px; margin-bottom: 12px; padding: 34px 36px 31px 45%; display: grid; grid-template-columns: minmax(0,1fr) auto; grid-template-rows: 1fr auto; gap: 18px 28px; border: 1px solid var(--line); border-top: 2px solid var(--survivor); background: radial-gradient(circle at 18% 15%,rgba(217,191,117,.15),transparent 32%),linear-gradient(112deg,#29271f,#171719 68%); text-align: left; cursor: pointer; overflow: hidden; transition: transform .2s ease,border-color .2s ease; }
.shared-perks-card--killer { border-top-color: var(--killer); background: radial-gradient(circle at 18% 15%,rgba(195,75,72,.18),transparent 33%),linear-gradient(112deg,#302020,#171719 68%); }
.shared-perks-card::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg,transparent 0 34%,rgba(18,18,20,.54) 47%,rgba(18,18,20,.98) 72%); }
.shared-perks-card > span:not(.shared-character-art) { position: relative; z-index: 2; }
.shared-perks-card:hover { transform: translateY(-2px); border-color: rgba(217,191,117,.55); }
.shared-perks-card--killer:hover { border-color: rgba(195,75,72,.65); }
.shared-perks-card__copy { align-self: center; display: flex; flex-direction: column; }
.shared-perks-card__copy small { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.shared-perks-card--killer .shared-perks-card__copy small { color: #df7775; }
.shared-perks-card__copy strong { margin: 8px 0 7px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 27px; font-weight: 600; }
.shared-perks-card__copy > span { max-width: 580px; color: var(--muted); font-size: 11px; line-height: 1.7; }
.shared-perks-card__count { align-self: center; display: flex; flex-direction: column; align-items: flex-end; }
.shared-perks-card__count b { font-family: Georgia,serif; font-size: 38px; font-weight: 500; }
.shared-perks-card__count small { color: var(--dim); font-size: 8px; letter-spacing: .16em; }
.shared-perks-card__action { grid-column: 1 / -1; padding-top: 15px; border-top: 1px solid var(--line); color: var(--gold); font-size: 10px; font-weight: 800; }
.shared-perks-card--killer .shared-perks-card__action { color: #df7775; }

.shared-character-art { position: absolute; inset: 0 auto 0 0; z-index: 0; width: 46%; overflow: hidden; pointer-events: none; }
.shared-character-art img { --art-index: 0; position: absolute; left: calc(-3% + var(--art-index) * 25%); bottom: -13%; width: 60%; height: 118%; object-fit: contain; object-position: bottom center; opacity: calc(.58 + var(--art-index) * .1); filter: saturate(.72) contrast(1.08) drop-shadow(0 12px 20px rgba(0,0,0,.55)); }
.shared-character-art img:nth-child(2) { z-index: 2; }
.shared-character-art img:nth-child(3) { z-index: 1; }

.character-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.character-card { position: relative; min-width: 0; height: 296px; padding: 0; display: block; border: 1px solid var(--line); border-top: 2px solid var(--survivor); background: radial-gradient(circle at 55% 18%,rgba(217,191,117,.14),transparent 37%),linear-gradient(145deg,#25241f,#161618 72%); text-align: left; cursor: pointer; overflow: hidden; transition: transform .22s ease,border-color .22s ease,background .22s ease; }
.character-card--killer { border-top-color: var(--killer); background: radial-gradient(circle at 55% 18%,rgba(195,75,72,.17),transparent 38%),linear-gradient(145deg,#2b2020,#161618 72%); }
.character-card:hover { z-index: 2; transform: translateY(-4px); border-color: rgba(217,191,117,.58); background-color: #272629; }
.character-card--killer:hover { border-color: rgba(195,75,72,.68); }
.character-card__portrait { position: absolute; inset: 0; width: 100%; height: 92%; object-fit: contain; object-position: center 8%; opacity: .85; filter: saturate(.72) contrast(1.08) drop-shadow(0 15px 20px rgba(0,0,0,.5)); transition: transform .35s cubic-bezier(.2,.7,.2,1),opacity .25s ease; }
.character-card--killer .character-card__portrait { filter: saturate(.65) contrast(1.15) drop-shadow(0 15px 20px rgba(0,0,0,.58)); }
.character-card:hover .character-card__portrait { opacity: 1; transform: scale(1.035) translateY(-3px); }
.character-portrait-placeholder { position: absolute; inset: 24px 0 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: rgba(217,191,117,.34); font-style: normal; pointer-events: none; }
.character-card--killer .character-portrait-placeholder { color: rgba(218,104,101,.34); }
.character-portrait-placeholder::before { content: ""; position: absolute; width: 112px; height: 112px; border: 1px solid currentColor; transform: rotate(45deg); opacity: .5; }
.character-portrait-placeholder small,.character-portrait-placeholder em { position: relative; z-index: 1; font-family: Georgia,serif; font-size: 7px; font-style: normal; letter-spacing: .18em; }
.character-portrait-placeholder b { position: relative; z-index: 1; margin: 5px 0 2px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 68px; font-weight: 400; line-height: 1; }
.character-portrait-placeholder em { font-size: 6px; opacity: .72; }
.character-card__shade { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg,rgba(12,12,14,.02) 23%,rgba(14,14,16,.35) 51%,rgba(14,14,16,.97) 80%); }
.character-card__count { position: absolute; z-index: 3; top: 13px; right: 13px; padding: 5px 7px; border: 1px solid rgba(255,255,255,.11); background: rgba(12,12,14,.62); color: var(--ink); font-family: Georgia,serif; font-size: 14px; backdrop-filter: blur(8px); }
.character-card__count small { color: var(--dim); font-size: 7px; letter-spacing: .08em; }
.character-card__copy { position: absolute; z-index: 3; left: 16px; right: 14px; bottom: 38px; display: flex; flex-direction: column; text-shadow: 0 2px 12px #000; }
.character-card__copy small { color: var(--gold); font-family: Georgia,serif; font-size: 8px; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.character-card--killer .character-card__copy small { color: #df7775; }
.character-card__copy strong { margin: 5px 0 3px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 17px; line-height: 1.35; }
.character-card__copy > span { color: var(--muted); font-size: 8px; }
.character-card__perk-icons { position: absolute; z-index: 2; top: 18px; left: 19px; display: flex; align-items: center; }
.character-card__perk-icons .perk-icon { width: 36px; height: 36px; margin-right: -9px; opacity: .74; }
.character-card__progress { position: absolute; z-index: 3; right: 14px; bottom: 13px; color: var(--dim); font-size: 8px; }
.character-card__progress.is-complete { color: #9ec4a5; }

.character-back { min-height: 42px; margin-bottom: 14px; padding: 0 14px; border: 1px solid var(--line); background: #151517; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 700; }
.character-back:hover { border-color: var(--gold-soft); color: var(--ink); }
.character-detail-hero { position: relative; min-height: 330px; padding: 53px 54px; display: flex; align-items: center; border: 1px solid var(--line); border-top: 2px solid var(--survivor); background: radial-gradient(circle at 78% 18%,rgba(217,191,117,.16),transparent 33%),linear-gradient(125deg,#29271f,#171719 67%); overflow: hidden; isolation: isolate; }
.character-detail-hero--killer { border-top-color: var(--killer); background: radial-gradient(circle at 78% 18%,rgba(195,75,72,.2),transparent 35%),linear-gradient(125deg,#302020,#171719 67%); }
.character-detail-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,rgba(18,18,20,.98) 0 43%,rgba(18,18,20,.67) 60%,rgba(18,18,20,.08) 83%); }
.character-detail-hero__portrait { position: absolute; z-index: -2; top: -10%; right: -2%; width: 58%; height: 125%; object-fit: contain; object-position: center top; opacity: .9; filter: saturate(.78) contrast(1.1) drop-shadow(0 18px 32px rgba(0,0,0,.62)); -webkit-mask-image: linear-gradient(90deg,transparent 0,#000 27%); mask-image: linear-gradient(90deg,transparent 0,#000 27%); }
.character-detail-hero--killer .character-detail-hero__portrait { filter: saturate(.68) contrast(1.16) drop-shadow(0 18px 32px rgba(0,0,0,.68)); }
.character-portrait-placeholder--detail { z-index: -2; inset: 0 2% 0 auto; width: 52%; height: 100%; opacity: .7; }
.character-portrait-placeholder--detail::before { width: 190px; height: 190px; }
.character-portrait-placeholder--detail b { font-size: 110px; }
.character-detail-hero__copy { z-index: 2; max-width: 58%; }
.character-detail-hero__copy h3 { margin: 9px 0 5px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: clamp(29px,4vw,47px); font-weight: 600; line-height: 1.2; letter-spacing: -.035em; }
.character-detail-hero__copy > p:last-child { max-width: 620px; margin: 19px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.character-detail-hero__stats { position: absolute; z-index: 3; top: 30px; right: 30px; min-width: 94px; padding: 12px 14px; display: flex; flex-direction: column; align-items: flex-end; border: 1px solid var(--line); background: rgba(13,13,15,.64); backdrop-filter: blur(12px); }
.character-detail-hero__stats span { color: var(--muted); font-size: 8px; }
.character-detail-hero__stats strong { margin: 2px 0; font-family: Georgia,serif; font-size: 28px; font-weight: 500; }
.character-detail-hero__stats small { color: var(--dim); font-size: 7px; letter-spacing: .13em; }
.character-detail-hero.is-shared .shared-character-art { inset: 0 0 0 auto; z-index: -2; width: 59%; }
.character-detail-hero.is-shared .shared-character-art img { bottom: -16%; height: 124%; opacity: .72; }
.character-perk-page__head { margin: 26px 0 14px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.character-perk-page__head > div { display: flex; flex-direction: column; gap: 3px; }
.character-perk-page__head span { color: var(--muted); font-size: 9px; letter-spacing: .08em; }
.character-perk-page__head strong { font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 23px; }
.character-perk-page__head p { margin: 0; color: var(--dim); font-size: 9px; }

@media (max-width: 1120px) {
  .character-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .shared-perks-card { padding-left: 42%; }
}

@media (max-width: 820px) {
  .mode-nav button { width: 25%; }
  .character-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .shared-perks-card { min-height: 246px; padding-left: 43%; }
  .shared-perks-card__copy strong { font-size: 22px; }
  .character-detail-hero { min-height: 360px; padding: 42px 36px; }
  .character-detail-hero__portrait { right: -8%; width: 70%; opacity: .72; }
  .character-detail-hero__copy { max-width: 68%; }
}

@media (max-width: 560px) {
  .mode-nav button { min-width: 0; padding: 5px 3px 4px; flex-direction: column; gap: 2px; font-size: 9px; letter-spacing: 0; }
  .mode-nav__icon { width: 26px; height: 26px; }
  .character-directory-intro { padding: 17px 16px; align-items: flex-start; }
  .character-directory-intro h3 { font-size: 18px; }
  .character-directory-intro p:last-child { font-size: 10px; }
  .character-directory-intro > span { display: none; }
  .shared-perks-card { min-height: 286px; padding: 29px 20px 23px; grid-template-columns: 1fr auto; align-content: end; }
  .shared-perks-card::after { background: linear-gradient(180deg,rgba(18,18,20,.05) 0 25%,rgba(18,18,20,.68) 54%,rgba(18,18,20,.98) 77%); }
  .shared-perks-card .shared-character-art { width: 100%; height: 68%; }
  .shared-perks-card__copy { align-self: end; }
  .shared-perks-card__copy strong { margin-top: 5px; font-size: 19px; }
  .shared-perks-card__copy > span { display: none; }
  .shared-perks-card__count b { font-size: 29px; }
  .character-grid { gap: 8px; }
  .character-card { height: 244px; }
  .character-card__count { top: 9px; right: 9px; }
  .character-card__perk-icons { top: 13px; left: 13px; }
  .character-card__perk-icons .perk-icon { width: 29px; height: 29px; margin-right: -9px; }
  .character-card__copy { left: 12px; right: 10px; bottom: 35px; }
  .character-card__copy strong { font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .character-card__copy > span { display: none; }
  .character-card__progress { right: 10px; bottom: 10px; }
  .character-back { width: 100%; }
  .character-detail-hero { min-height: 390px; padding: 31px 22px 34px; align-items: flex-start; }
  .character-detail-hero::after { background: linear-gradient(180deg,rgba(18,18,20,.97) 0 35%,rgba(18,18,20,.68) 58%,rgba(18,18,20,.16) 86%); }
  .character-detail-hero__portrait { top: 28%; right: -12%; width: 112%; height: 80%; opacity: .57; -webkit-mask-image: linear-gradient(180deg,transparent 0,#000 24%); mask-image: linear-gradient(180deg,transparent 0,#000 24%); }
  .character-detail-hero__copy { max-width: 100%; }
  .character-detail-hero__copy h3 { max-width: 84%; font-size: 27px; }
  .character-detail-hero__copy > p:last-child { max-width: 92%; margin-top: 13px; font-size: 10px; line-height: 1.7; }
  .character-detail-hero__stats { top: 18px; right: 15px; min-width: 69px; padding: 8px 10px; }
  .character-detail-hero__stats strong { font-size: 23px; }
  .character-detail-hero.is-shared .shared-character-art { top: 30%; width: 112%; height: 72%; }
  .character-perk-page__head { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (hover: none) {
  .shared-perks-card:hover,.character-card:hover { transform: none; }
  .character-card:hover .character-card__portrait { transform: none; opacity: .85; }
}

/* v7: 端末へのインストールとオフライン利用 */
.entrance-header-actions { display: flex; align-items: center; gap: 16px; }
.install-trigger { min-height: 44px; padding: 6px 12px 6px 7px; display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(217,183,110,.4); background: linear-gradient(135deg,rgba(217,183,110,.12),rgba(23,23,25,.92)); color: var(--ink); cursor: pointer; text-align: left; transition: border-color .18s ease,background .18s ease,transform .18s ease; }
.install-trigger:hover { border-color: rgba(231,202,132,.72); background: linear-gradient(135deg,rgba(217,183,110,.19),#1b1a1b); transform: translateY(-1px); }
.install-trigger__glyph { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid rgba(217,183,110,.36); background: #111113; color: var(--gold); font-family: Georgia,serif; font-size: 18px; line-height: 1; }
.install-trigger__copy { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.install-trigger__copy b { font-size: 10px; font-weight: 800; white-space: nowrap; }
.install-trigger__copy small { color: var(--dim); font-size: 8px; white-space: nowrap; }
.install-trigger--hero { width: min(100%,390px); min-height: 64px; padding: 9px 16px 9px 9px; gap: 12px; }
.install-trigger--hero .install-trigger__glyph { width: 44px; height: 44px; font-size: 24px; }
.install-trigger--hero .install-trigger__copy { gap: 3px; }
.install-trigger--hero .install-trigger__copy b { color: #f2e8d5; font-size: 12px; }
.install-trigger--hero .install-trigger__copy small { font-size: 9px; }
.entrance-install { max-width: 390px; min-height: 64px; margin-top: 27px; }
.entrance-install.is-installed { padding: 10px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid rgba(127,164,133,.35); background: rgba(127,164,133,.08); }
.entrance-install.is-installed > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.entrance-install.is-installed strong { color: #c3dcc8; font-size: 11px; }
.entrance-install.is-installed small { color: var(--dim); font-size: 9px; }
.entrance-install__check { flex: 0 0 auto; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: rgba(127,164,133,.2); color: #afd1b5; font-size: 18px; }

.install-backdrop { z-index: 130; }
.install-sheet { position: relative; width: min(570px,100%); max-height: calc(100dvh - 48px); padding: 38px; overflow-y: auto; border: 1px solid var(--line); border-top: 2px solid var(--gold); background: radial-gradient(circle at 5% 0,rgba(217,183,110,.14),transparent 38%),linear-gradient(150deg,#242426,#151517 64%); box-shadow: 0 32px 100px rgba(0,0,0,.7); overscroll-behavior: contain; }
.install-sheet__head { padding-right: 24px; display: grid; grid-template-columns: 82px minmax(0,1fr); gap: 19px; align-items: center; }
.install-sheet__head img { width: 82px; height: 82px; border-radius: 19px; box-shadow: 0 12px 28px rgba(0,0,0,.42); }
.install-sheet__head h2 { margin: 6px 0 5px; font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: 27px; font-weight: 600; line-height: 1.3; }
.install-sheet__head div > p:last-child { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.install-benefits { margin: 27px 0 15px; display: grid; grid-template-columns: repeat(3,1fr); border: 1px solid var(--line); background: rgba(12,12,14,.38); }
.install-benefits span { min-height: 66px; padding: 11px 9px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border-right: 1px solid var(--line); color: var(--muted); font-size: 9px; text-align: center; }
.install-benefits span:last-child { border-right: 0; }
.install-benefits b { color: #a7c7ac; font-size: 12px; }
.install-steps { padding: 19px 20px; border: 1px solid var(--line); background: #171719; }
.install-steps > p { margin: 0 0 12px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.install-steps ol { margin: 0; padding: 0; display: grid; gap: 9px; list-style: none; counter-reset: install-step; }
.install-steps li { display: grid; grid-template-columns: 27px 1fr; gap: 10px; align-items: center; color: #cbc4b9; font-size: 11px; line-height: 1.55; counter-increment: install-step; }
.install-steps li::before { content: counter(install-step); width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid var(--gold-soft); color: var(--gold); font-family: Georgia,serif; font-size: 10px; }
.install-connectivity { margin: 13px 0; display: flex; align-items: flex-start; gap: 8px; color: var(--dim); font-size: 9px; line-height: 1.6; }
.install-connectivity > span { flex: 0 0 auto; width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(127,164,133,.5); }
.install-connectivity.is-offline { color: #d78886; }
.install-connectivity.is-offline > span { background: var(--red); box-shadow: 0 0 10px rgba(199,74,72,.5); }
.install-sheet__done { width: 100%; min-height: 48px; border: 1px solid var(--gold-soft); background: var(--gold); color: #17130e; cursor: pointer; font-size: 11px; font-weight: 800; }

@media (max-width: 820px) {
  .header-actions .install-trigger--header .install-trigger__copy small { display: none; }
  .install-sheet { width: 100%; max-height: min(92dvh,760px); padding: 36px 25px calc(23px + env(safe-area-inset-bottom)); border-left: 0; border-right: 0; border-bottom: 0; border-radius: 18px 18px 0 0; }
}

@media (max-width: 560px) {
  .entrance-header-actions { gap: 8px; }
  .entrance-header-actions .install-trigger--header { padding-right: 9px; }
  .entrance-header-actions .install-trigger--header .install-trigger__copy small { display: none; }
  .header-actions > .install-trigger--header { width: 40px; min-height: 40px; padding: 0; justify-content: center; }
  .header-actions > .install-trigger--header .install-trigger__glyph { width: 30px; height: 30px; }
  .header-actions > .install-trigger--header .install-trigger__copy { display: none; }
  .header-actions .progress-summary { display: none; }
  .entrance-install { margin-top: 20px; }
  .install-trigger--hero { min-height: 60px; }
  .install-sheet { padding: 34px 17px calc(18px + env(safe-area-inset-bottom)); }
  .install-sheet__head { grid-template-columns: 65px minmax(0,1fr); gap: 13px; }
  .install-sheet__head img { width: 65px; height: 65px; border-radius: 15px; }
  .install-sheet__head h2 { font-size: 21px; }
  .install-sheet__head div > p:last-child { font-size: 9px; }
  .install-benefits { grid-template-columns: 1fr; }
  .install-benefits span { min-height: 42px; padding: 8px 12px; flex-direction: row; justify-content: flex-start; border-right: 0; border-bottom: 1px solid var(--line); text-align: left; }
  .install-benefits span:last-child { border-bottom: 0; }
  .install-steps { padding: 16px 14px; }
  .install-steps li { font-size: 10px; }
}

@media (max-width: 370px) {
  .entrance-header-actions .install-trigger--header { width: 40px; padding: 0; justify-content: center; }
  .entrance-header-actions .install-trigger--header .install-trigger__copy { display: none; }
  .header-actions > .install-trigger--header { display: none; }
}

@media (display-mode: standalone) {
  .install-trigger { display: none; }
}

@media (hover: none) {
  .install-trigger:hover { transform: none; }
}

/* v16: 収録範囲・監査状況・参照元を明示 */
.catalog-status { max-width: 500px; margin-top: 22px; padding: 14px 15px 13px; border: 1px solid rgba(217,183,110,.23); background: linear-gradient(135deg,rgba(217,183,110,.07),rgba(15,15,17,.84)); }
.catalog-status__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--gold); font-size: 8px; font-weight: 800; letter-spacing: .15em; }
.catalog-status__head b { padding: 4px 7px; border: 1px solid rgba(127,164,133,.34); background: rgba(127,164,133,.08); color: #a9c8ae; font-size: 8px; letter-spacing: .08em; }
.catalog-status__coverage { margin-top: 10px; display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.catalog-status__coverage strong { font-family: Georgia,serif; font-size: 26px; font-weight: 500; }
.catalog-status__coverage strong small { color: var(--dim); font-size: 14px; }
.catalog-status__coverage > span { color: var(--muted); font-size: 9px; }
.catalog-status__bar { height: 3px; margin: 7px 0 10px; overflow: hidden; background: #2a292c; }
.catalog-status__bar i { height: 100%; display: block; background: linear-gradient(90deg,var(--gold-soft),var(--gold)); }
.catalog-status p { margin: 0; color: #989188; font-size: 9px; line-height: 1.65; }
.catalog-status__links { margin-top: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--dim); font-size: 8px; }
.catalog-status__links a, .site-footer a, .detail-source-row a { color: #c7ad70; text-decoration: none; }
.catalog-status__links a:hover, .site-footer a:hover, .detail-source-row a:hover { color: #ead49d; text-decoration: underline; text-underline-offset: 3px; }

.detail-display-row > span { display: inline-flex; align-items: center; gap: 7px; }
.detail-display-row > span::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.detail-display-row > span.is-audited { color: #a9c8ae; }
.detail-display-row > span.is-audited::before { background: var(--green); box-shadow: 0 0 9px rgba(127,164,133,.48); }
.detail-display-row > span.is-reviewing { color: #c2a963; }
.detail-display-row > span.is-reviewing::before { background: #b8994e; box-shadow: 0 0 9px rgba(184,153,78,.42); }
.detail-source-row { margin: 8px 0 20px; padding: 12px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 8px; line-height: 1.55; }
.detail-source-row a { flex: 0 0 auto; font-weight: 700; }

.site-footer__sources { grid-column: 1 / -1; display: flex; gap: 16px; flex-wrap: wrap; }
.site-footer__sources a { color: #a9905e; }
.site-footer__sources + p { grid-column: 1 / -1; }

@media (max-width: 560px) {
  .catalog-status { margin-top: 17px; padding: 12px; }
  .catalog-status__coverage strong { font-size: 23px; }
  .catalog-status__links { gap: 9px; }
  .detail-source-row { align-items: flex-start; flex-direction: column; }
  .detail-source-row a { min-height: 32px; display: inline-flex; align-items: center; }
}


/* r6 static migration helpers */
[hidden]{display:none!important}.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.app-loading{min-height:100vh;display:grid;place-items:center;color:var(--muted);letter-spacing:.08em}
.header-actions{display:flex;align-items:center;gap:14px}.current-side{min-height:40px;padding:0 12px;display:inline-flex;align-items:center;gap:8px;border:1px solid var(--line);background:#151517;color:var(--muted);cursor:pointer;font-size:10px}.current-side span{width:8px;height:8px;border-radius:50%}.current-side--survivor span{background:var(--survivor)}.current-side--killer span{background:var(--killer)}
.mode-nav__icon.icon-catalog{--mode-icon:url('./ui/iconHelpLoading_lore.png')}.mode-nav__icon.icon-study{--mode-icon:url('./ui/iconHelpLoading_addons.png')}.mode-nav__icon.icon-quiz{--mode-icon:url('./ui/iconHelpLoading_skillCheck.png')}
.modal-backdrop{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:24px;background:rgba(0,0,0,.78);backdrop-filter:blur(8px);animation:fade-in .18s ease}.detail-modal{position:relative;width:min(760px,100%);padding:36px;overflow-y:auto;border:1px solid var(--line);border-top:2px solid var(--gold);background:linear-gradient(145deg,#242426,#151517);box-shadow:0 32px 100px rgba(0,0,0,.72)}.detail-modal--killer{border-top-color:var(--killer)}.modal-close{position:absolute;right:12px;top:12px;border:1px solid var(--line);color:var(--muted);cursor:pointer;font-size:22px}.detail-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:28px;align-items:center;padding-right:40px}.detail-head h2{margin:7px 0 4px;font-family:"Yu Mincho",serif;font-size:32px}.english-name{color:var(--muted);font-family:Georgia,serif;font-size:11px}.badge-row{margin-top:14px;display:flex;flex-wrap:wrap;gap:7px}.badge-row span{padding:5px 8px;border:1px solid var(--line);color:var(--muted);font-size:9px}.detail-display-row{margin:24px 0 4px;display:flex;justify-content:space-between;align-items:center;gap:14px;color:var(--dim);font-size:9px}.detail-sections article{display:grid;grid-template-columns:42px 1fr;gap:16px;padding:19px 0;border-top:1px solid var(--line)}.section-number{color:var(--dim);font-family:Georgia,serif;font-size:11px}.detail-sections h3{margin:0 0 7px;color:var(--gold);font-size:11px}.detail-sections p{margin:0;color:#c8c1b6;font-size:13px;line-height:1.8;white-space:pre-line}.plain-language p{color:var(--ink);font-size:15px;font-weight:700}
.install-sheet .modal-close{position:absolute}.install-trigger[hidden]{display:none!important}
.toast{position:fixed;z-index:200;left:50%;bottom:24px;transform:translateX(-50%);padding:11px 15px;border:1px solid rgba(127,164,133,.5);background:#171a18;color:#c9dfcd;font-size:11px;box-shadow:0 14px 40px rgba(0,0,0,.45)}
@media(max-width:820px){.header-actions{gap:7px}.current-side{padding:0 9px}.detail-modal{width:100%;max-height:92dvh;padding:30px 20px;border-left:0;border-right:0;border-bottom:0;border-radius:18px 18px 0 0;align-self:end}.modal-backdrop{padding:0}.detail-head{grid-template-columns:82px 1fr;gap:18px}.detail-head h2{font-size:24px}.detail-display-row{align-items:flex-start;flex-direction:column}.site-footer{padding-bottom:calc(82px + env(safe-area-inset-bottom))}}
@media(max-width:560px){.site-header{gap:8px}.brand strong{font-size:13px}.brand small{font-size:8px}.current-side{font-size:0;width:40px;padding:0;justify-content:center}.current-side span{width:10px;height:10px}.detail-head{grid-template-columns:66px 1fr}.detail-head h2{font-size:20px}.detail-sections article{grid-template-columns:30px 1fr}.workspace-settings{justify-content:flex-start}.perk-color-picker__copy{display:none}.role-hero__character{right:4px}.role-stats{grid-template-columns:repeat(2,88px)}}

/* ============================================================================
   10.0.3-r7 — 実測ベースの質感と構造（案C）
   色は公式パークアイコン素材からの実測値。r6のルールは書き換えず末尾で上書きする。
   ============================================================================ */
:root{
  --frame:#0d0510;
  --glow:#3f1213;
  --glow-hi:#5e0f11;
  --grain:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
}

/* --- 背景：赤グロー（背後）→ ビネット → 粒子 --- */
html{background:#0f0b0c;}
body::before,body::after{content:"";position:fixed;inset:0;z-index:0;pointer-events:none;}
body::before{background:
  radial-gradient(104% 80% at 50% 38%,rgba(94,15,17,.30) 0%,rgba(63,18,19,.13) 38%,transparent 64%),
  radial-gradient(120% 96% at 50% 46%,transparent 70%,rgba(0,0,0,.66) 100%);}
body::after{background-image:var(--grain);opacity:.5;mix-blend-mode:overlay;}
#app{position:relative;z-index:1;}

/* --- ひし形：太い黒枠 + ほぼ平坦な塗り（r6は細い色枠 + 暗い中心だった） --- */
.perk-icon{
  border:0;
  background:var(--frame);
  box-shadow:0 6px 16px rgba(0,0,0,.5),0 0 18px rgba(94,15,17,.34);
}
.perk-icon::after{
  inset:9%;
  z-index:0;
  border:0;
  background:radial-gradient(circle at 50% 46%,#5c3d68 0%,#5c3d68 44%,#40214b 100%);
}
@supports (color:color-mix(in srgb,red,blue)){
  .perk-icon::after{
    background:radial-gradient(circle at 50% 46%,
      color-mix(in srgb,var(--perk-accent) 70%,#241228) 0%,
      color-mix(in srgb,var(--perk-accent) 70%,#241228) 44%,
      color-mix(in srgb,var(--perk-accent) 44%,#170c1c) 100%);
  }
}
.perk-icon img{filter:drop-shadow(0 1px 2px rgba(0,0,0,.7));}

/* --- 図鑑：ひし形グリッド表示（カード表示と切替、既定はカード） --- */
.layout-toggle{display:inline-flex;border:1px solid var(--line);background:rgba(18,18,20,.82);}
.layout-toggle button{min-height:40px;padding:0 15px;border:0;background:transparent;cursor:pointer;
  color:var(--muted);font-family:inherit;font-size:12px;letter-spacing:.04em;transition:color .16s,background .16s;}
.layout-toggle button:hover{color:var(--ink);}
.layout-toggle button.is-active{color:var(--ink);background:rgba(255,255,255,.06);}
.layout-toggle button + button{border-left:1px solid var(--line);}

.perk-diamond-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));
  gap:26px 14px;padding:14px 0 4px;}
.perk-tile{position:relative;display:flex;flex-direction:column;align-items:center;gap:2px;
  padding:6px 4px 12px;border:0;background:transparent;cursor:pointer;color:var(--ink);
  font-family:inherit;text-align:center;transition:transform .18s ease;}
.perk-tile .perk-icon{margin:6px 0 12px;width:88px;height:88px;}
.perk-tile:hover{transform:translateY(-3px);}
.perk-tile:hover .perk-icon{box-shadow:0 10px 22px rgba(0,0,0,.55),0 0 26px rgba(94,15,17,.6);}
.perk-tile__name{font-family:"Yu Mincho","Hiragino Mincho ProN",serif;font-size:12.5px;
  line-height:1.45;letter-spacing:.02em;word-break:break-word;}
.perk-tile__own{color:var(--dim);font-size:10px;}
.perk-tile.is-learned .perk-tile__name{color:var(--green);}
.perk-tile.is-learned::after{content:"✓";position:absolute;top:2px;right:14px;
  color:var(--green);font-size:12px;}
.perk-tile:focus-visible{outline:1px solid var(--gold);outline-offset:2px;}

/* --- キャラクター詳細：固有パークの習得状況 --- */
.perk-web{margin:18px 0 4px;padding:20px 16px 14px;border:1px solid var(--line);
  background:linear-gradient(160deg,rgba(33,23,25,.72),rgba(19,16,17,.72));}
.perk-web__head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:6px;}
.perk-web__head span{color:var(--dim);font-size:10px;letter-spacing:.18em;text-transform:uppercase;}
.perk-web__head b{font-family:Georgia,serif;font-size:13px;font-weight:500;color:var(--muted);}
.perk-web svg{display:block;width:100%;max-width:440px;height:auto;margin:0 auto;}
.perk-web figcaption{margin-top:6px;color:var(--muted);font-size:11px;line-height:1.7;text-align:center;}

@media (max-width:560px){
  .perk-diamond-grid{grid-template-columns:repeat(auto-fill,minmax(104px,1fr));gap:20px 10px;}
  .perk-tile .perk-icon{width:72px;height:72px;margin:5px 0 10px;}
  .perk-tile__name{font-size:11.5px;}
}
@media (prefers-reduced-motion:reduce){
  .perk-tile{transition:none;}
}


/* ============================================================================
   10.0.3-r8 — 横スクロール抑制
   図鑑カテゴリは横送りではなく折り返し表示。画面全体も横方向へはみ出させない。
   ============================================================================ */
html,body{overflow-x:hidden;}
@supports (overflow:clip){html,body{overflow-x:clip;}}
.sister-link{
  min-height:40px;
  padding:0 11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  color:var(--muted);
  font-size:9px;
  font-weight:800;
  letter-spacing:.08em;
  text-decoration:none;
  white-space:nowrap;
}
.sister-link:hover,.sister-link:focus-visible{border-color:var(--gold-soft);color:var(--gold);}
.sister-link b{display:none;font:800 9px/1 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;letter-spacing:.12em;}
.category-scroll{
  flex-wrap:wrap;
  align-items:center;
  overflow-x:visible;
  overscroll-behavior-x:auto;
  -webkit-overflow-scrolling:auto;
  scrollbar-width:none;
}
.category-scroll::-webkit-scrollbar{display:none;}
.category-scroll button{min-width:0;white-space:nowrap;}
@media (max-width:560px){
  .sister-link{width:40px;padding:0;}
  .sister-link span{display:none;}
  .sister-link b{display:block;}
  .category-scroll{margin-right:0;padding-right:0;gap:6px;}
  .category-scroll button{min-height:34px;padding:0 9px;font-size:9.5px;}
}

/* r13 categories */
.category-scroll{scrollbar-width:thin}.perk-category-links{display:flex;flex-wrap:wrap;gap:7px;margin-top:8px}.perk-category-links a{color:inherit;text-decoration:none;border:1px solid rgba(255,255,255,.13);padding:6px 9px;border-radius:999px;font-size:12px}.perk-category-links a:hover{border-color:var(--perk-accent);color:#fff}.r13-category-directory{max-width:1180px;margin:0 auto 48px;padding:0 24px}.r13-category-directory h2{font-size:22px;margin:0 0 8px}.r13-category-directory>p{color:#aaa;margin:0 0 16px}.r13-category-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.r13-category-grid a{display:flex;justify-content:space-between;gap:10px;padding:14px 15px;border:1px solid rgba(255,255,255,.10);background:#141116;text-decoration:none;color:#eee}.r13-category-grid a span{color:#8f8990;font-size:12px}.r13-category-grid a:hover{border-color:var(--perk-accent)}@media(max-width:760px){.r13-category-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.r13-category-directory{padding:0 16px}}


/* r15.3 iOS search-focus zoom fix */
@media (max-width: 760px) {
  .search-box input[type="search"], .search-box input {
    font-size: 16px;
    line-height: 1.4;
  }
}
