:root {
  color-scheme: dark;
  --night: #05060a;
  --ink: #090b12;
  --ink-raised: #0e111a;
  --snow: #f1f5f9;
  --mist: #98a2b3;
  --faint: rgba(241, 245, 249, .08);
  --line: rgba(241, 245, 249, .12);
  --crimson: #c93855;
  --crimson-bright: #ea4165;
  --rose: #c78491;
  --ember: #f0a868;
  --ice: #a7d8f5;
  --serif: "Cormorant Garamond", "Fraunces", Georgia, serif;
  --display: "Fraunces", "Cormorant Garamond", Georgia, serif;
  --sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--night); overflow-x: hidden; }
body { min-height: 100%; margin: 0; background: var(--night); color: var(--snow); font-family: var(--sans); overflow-x: hidden; }
button, input, textarea { color: inherit; font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
button, input, textarea { letter-spacing: 0; }
[hidden] { display: none !important; }

.grain { position: fixed; inset: 0; z-index: 200; pointer-events: none; opacity: .035; background-image: url("/assets/yuki_design_handoff/components/paper-texture.svg"); mix-blend-mode: screen; }
.snow { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .15; background-image: url("/assets/brand/a3-ambient-snow-bg.svg"); background-size: cover; animation: drift 20s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(0, -14px, 0); opacity: .22; } }

.screen { position: relative; z-index: 2; min-height: 100dvh; }
.screen:not(.is-active) { display: none; }
.eyebrow { margin: 0; color: var(--rose); font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.text-action { border: 0; padding: 8px 0; background: transparent; color: rgba(241,245,249,.62); font-size: 13px; }
.quiet-head { position: relative; z-index: 20; display: grid; grid-template-columns: 44px 1fr 80px; align-items: center; height: calc(62px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 18px 0; border-bottom: 1px solid rgba(241,245,249,.06); background: rgba(5,6,10,.82); backdrop-filter: blur(18px); }
.quiet-head .text-action { text-align: right; }
.quiet-brand { text-align: center; color: rgba(241,245,249,.74); font-family: var(--serif); font-size: 18px; }
.icon-back, .circle-back { width: 38px; height: 38px; border: 0; background: transparent; color: rgba(241,245,249,.7); font-size: 18px; }

/* Landing */
.landing { display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; background: radial-gradient(circle at 70% 45%, rgba(72,90,120,.19), transparent 35%), var(--night); }
.landing-head { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; padding: calc(20px + env(safe-area-inset-top)) 24px 16px; }
.wordmark { width: 82px; filter: brightness(1.45); }
.landing-scene { display: grid; min-height: 0; }
.landing-copy { position: relative; z-index: 3; align-self: center; padding: 36px 24px 70px; }
.landing-copy h1 { max-width: 700px; margin: 16px 0 18px; font-family: var(--display); font-size: clamp(54px, 8vw, 104px); font-weight: 400; line-height: .96; }
.landing-copy h1 em { color: var(--rose); font-family: var(--serif); font-weight: 400; }
.landing-promise { max-width: 590px; margin: 0 0 34px; color: rgba(241,245,249,.6); font-size: 16px; line-height: 1.65; }
.landing-doors { display: grid; width: min(100%, 620px); gap: 10px; }
.door-action { display: grid; grid-template-columns: 42px 1fr 24px; gap: 12px; align-items: center; width: 100%; min-height: 74px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; background: rgba(241,245,249,.025); text-align: left; transition: .25s ease; }
.door-action:hover { border-color: rgba(241,245,249,.28); transform: translateX(4px); background: rgba(241,245,249,.045); }
.door-action--primary { border-color: rgba(201,56,85,.55); background: linear-gradient(90deg, rgba(201,56,85,.2), rgba(201,56,85,.05)); }
.door-action b { display: block; font-family: var(--serif); font-size: 22px; font-weight: 500; }
.door-action small { display: block; margin-top: 3px; color: rgba(241,245,249,.45); font-size: 12px; }
.door-glyph { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid rgba(201,56,85,.3); border-radius: 50%; color: var(--rose); }
.returning-link { margin-top: 15px; border: 0; background: transparent; color: rgba(241,245,249,.42); font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.landing-visual { position: absolute; inset: 60px 0 40px 45%; overflow: hidden; }
.landing-visual img { position: absolute; right: -4%; bottom: 0; width: min(64vw, 900px); height: 100%; object-fit: cover; object-position: center; opacity: .62; filter: saturate(.65) contrast(1.1); -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 24%, #000 76%, transparent 100%); }
.landing-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--night), transparent 24%, transparent 76%, var(--night)); }
.moon-halo { position: absolute; right: 10%; top: 9%; width: min(31vw, 470px); aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(235,239,244,.35), rgba(155,174,199,.12) 38%, transparent 69%); box-shadow: 0 0 90px rgba(156,183,218,.12); }
.vertical-law { position: absolute; z-index: 3; right: 4%; top: 16%; margin: 0; color: rgba(241,245,249,.25); font-family: var(--serif); font-size: 20px; letter-spacing: .18em; writing-mode: vertical-rl; }
.landing-seal { position: absolute; z-index: 3; right: 16%; bottom: 10%; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid rgba(201,56,85,.55); color: rgba(234,65,101,.72); font-family: var(--serif); }
.landing-foot { position: relative; z-index: 5; display: flex; align-items: center; gap: 14px; padding: 14px 24px 20px; color: rgba(241,245,249,.32); font-size: 11px; }
.landing-foot i { width: 3px; height: 3px; border-radius: 50%; background: rgba(241,245,249,.22); }

/* Threshold */
.threshold { background: radial-gradient(circle at 74% 30%, rgba(201,56,85,.11), transparent 35%), var(--night); }
.threshold-layout { display: grid; gap: 54px; align-items: center; width: min(1180px, calc(100% - 40px)); min-height: calc(100dvh - 64px); margin: 0 auto; padding: 50px 0 80px; }
.threshold-story h2 { max-width: 680px; margin: 14px 0 20px; font-family: var(--serif); font-size: clamp(42px, 5vw, 76px); font-weight: 400; line-height: 1.02; }
.threshold-story > p:not(.eyebrow) { max-width: 540px; color: rgba(241,245,249,.5); line-height: 1.65; }
.threshold-story ol { display: grid; gap: 15px; margin: 32px 0 0; padding: 0; list-style: none; }
.threshold-story li { display: flex; gap: 14px; color: rgba(241,245,249,.64); }
.threshold-story li span { color: var(--rose); font-family: var(--mono); font-size: 11px; }
.threshold-card { width: min(100%, 470px); justify-self: center; padding: 34px; border: 1px solid rgba(241,245,249,.13); border-radius: 6px; background: linear-gradient(160deg, rgba(241,245,249,.05), rgba(241,245,249,.015)); box-shadow: 0 30px 100px rgba(0,0,0,.35); }
.threshold-sigil { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 24px; border: 1px solid rgba(201,56,85,.4); border-radius: 50%; }
.threshold-sigil img { width: 38px; height: 38px; }
.threshold-card h2 { margin: 8px 0 4px; font-family: var(--serif); font-size: 38px; font-weight: 500; }
.threshold-meta, .threshold-note { color: rgba(241,245,249,.4); font-size: 12px; }
.threshold-card label { display: grid; gap: 9px; margin: 34px 0 22px; color: rgba(241,245,249,.52); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.threshold-card input { width: 100%; min-height: 50px; border: 0; border-bottom: 1px solid rgba(241,245,249,.24); background: transparent; font-family: var(--serif); font-size: 21px; outline: 0; }
.threshold-enter, .sanctuary-circle { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 62px; padding: 0 20px; border: 1px solid rgba(201,56,85,.65); border-radius: 3px; background: var(--crimson); color: white; font-weight: 600; }
.threshold-note { line-height: 1.5; }
.create-instead { width: 100%; margin-top: 16px; border: 0; background: transparent; color: rgba(241,245,249,.48); font-size: 12px; }

/* Sanctuary */
.sanctuary { background: radial-gradient(circle at 50% 0, rgba(201,56,85,.13), transparent 32%), var(--night); }
.sanctuary-shell { width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 70px 0 100px; }
.sanctuary-hero { max-width: 760px; margin-bottom: 44px; }
.sanctuary-hero h1 { margin: 12px 0 18px; font-family: var(--serif); font-size: clamp(48px, 6vw, 86px); font-weight: 400; line-height: .96; }
.sanctuary-hero h1 em { color: var(--rose); }
.sanctuary-intro { max-width: 650px; color: rgba(241,245,249,.52); line-height: 1.65; }
.trace-summary { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; max-width: 590px; color: rgba(241,245,249,.54); font-size: 12px; }
.trace-summary strong { color: var(--rose); font-family: var(--serif); font-size: 20px; text-align: center; }
.trace-summary i { grid-column: 1 / -1; height: 3px; background: rgba(241,245,249,.1); }
.trace-summary i b { display: block; width: 68%; height: 100%; background: linear-gradient(90deg, var(--ice), var(--crimson)); }
.sanctuary-circle { max-width: 100%; min-height: 76px; margin-bottom: 16px; text-align: left; }
.sanctuary-circle small, .sanctuary-circle b { display: block; }
.sanctuary-circle small { margin-bottom: 4px; color: rgba(255,255,255,.64); font-size: 10px; letter-spacing: .15em; text-transform: uppercase; }
.sanctuary-circle b { font-family: var(--serif); font-size: 23px; font-weight: 500; }
.sanctuary-grid { display: grid; gap: 14px; }
.sanctuary-feature { position: relative; min-height: 290px; overflow: hidden; border: 1px solid var(--line); border-radius: 4px; background: rgba(241,245,249,.025); padding: 28px; }
.sanctuary-feature h2 { margin: 13px 0; font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1.04; }
.sanctuary-feature p:not(.eyebrow) { max-width: 480px; color: rgba(241,245,249,.48); line-height: 1.55; }
.sanctuary-feature button { position: absolute; left: 28px; bottom: 27px; border: 0; background: transparent; color: var(--rose); font-weight: 600; }
.card-index { position: absolute; right: 22px; top: 16px; color: rgba(241,245,249,.14); font-family: var(--serif); font-size: 48px; }
.season-feature { background: linear-gradient(145deg, rgba(201,56,85,.1), rgba(241,245,249,.02)); }
.manga-feature { padding: 0; }
.manga-feature img { position: absolute; inset: 0; width: 48%; height: 100%; object-fit: cover; filter: grayscale(.75) brightness(.58); }
.manga-feature::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 20%, var(--ink) 52%); }
.manga-feature div { position: relative; z-index: 2; width: 58%; margin-left: auto; padding: 28px; }
.manga-feature button { left: 42%; }
.relic-row { display: flex; gap: 12px; }
.relic-row img { width: 54px; height: 54px; padding: 8px; border: 1px solid rgba(240,168,104,.22); border-radius: 50%; background: rgba(240,168,104,.04); }
.sanctuary[data-mode="guest"] .member-only { display: none !important; }
.sanctuary[data-mode="member"] .guest-only { display: none !important; }

/* Circle */
.circle { height: 100dvh; overflow: hidden; background: #05070e; }
.circle-head { position: relative; z-index: 60; display: grid; grid-template-columns: 46px 1fr 46px; align-items: center; height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; border-bottom: 1px solid rgba(241,245,249,.07); background: rgba(5,7,14,.92); backdrop-filter: blur(18px); }
.circle-title { min-width: 0; text-align: center; }
.circle-title strong { display: block; overflow: hidden; font-family: var(--serif); font-size: 20px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.circle-title span { display: block; margin-top: 2px; color: rgba(241,245,249,.4); font-size: 10px; }
.presence-dot { display: inline-block; width: 5px; height: 5px; margin-right: 4px; border-radius: 50%; background: #8cc8af; box-shadow: 0 0 8px #8cc8af; }
.play-trigger { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(201,56,85,.35); border-radius: 50%; background: transparent; }
.play-trigger img { width: 20px; height: 20px; }
.circle-grid { display: grid; height: calc(100dvh - 64px - env(safe-area-inset-top)); min-height: 0; }
.circle-rail { display: none; min-height: 0; overflow: auto; border-right: 1px solid rgba(241,245,249,.06); background: rgba(241,245,249,.012); padding: 22px 18px; }
.rail-section { padding: 4px 0 25px; border-bottom: 1px solid rgba(241,245,249,.06); }
.rail-section + .rail-section { padding-top: 22px; }
.rail-label, .playbook-label { margin: 0 0 10px; color: rgba(241,245,249,.3); font-size: 9px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
.rail-section h2 { margin: 0; font-family: var(--serif); font-size: 34px; font-weight: 400; }
.rail-section h3 { margin: 4px 0 8px; font-family: var(--serif); font-size: 22px; font-weight: 400; }
.rail-section p:not(.rail-label) { color: rgba(241,245,249,.4); font-size: 12px; line-height: 1.5; }
.candle-track { height: 2px; margin: 12px 0; background: rgba(241,245,249,.08); }
.candle-track i { display: block; width: 62%; height: 100%; background: linear-gradient(90deg, var(--ember), var(--crimson)); }
.traveler-list { display: grid; gap: 11px; }
.traveler-list span { display: grid; grid-template-columns: 29px 1fr auto; align-items: center; color: rgba(241,245,249,.65); font-size: 12px; }
.traveler-list i { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid rgba(241,245,249,.13); border-radius: 50%; color: var(--rose); font-style: normal; }
.traveler-list b { color: rgba(241,245,249,.3); font-size: 9px; font-weight: 500; text-transform: uppercase; }
.thread-column { position: relative; display: grid; grid-template-rows: 1fr auto; min-width: 0; min-height: 0; background: radial-gradient(circle at 50% 43%, rgba(201,56,85,.055), transparent 33%); }
.thread { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 22px 16px 38px; scroll-behavior: smooth; }
.thread-date { margin: 0 auto 22px; color: rgba(241,245,249,.28); font-family: var(--serif); font-size: 13px; font-style: italic; text-align: center; }
.murmur { width: fit-content; max-width: min(82%, 570px); margin: 9px 0; padding: 10px 13px 8px; border: 1px solid rgba(241,245,249,.08); border-radius: 5px 14px 14px 14px; background: rgba(241,245,249,.045); transition: transform .18s ease, border-color .18s ease, filter .18s ease; }
.murmur:hover, .murmur:focus { border-color: rgba(241,245,249,.2); transform: translateY(-1px); }
.murmur--me { margin-left: auto; border-color: rgba(201,56,85,.27); border-radius: 14px 5px 14px 14px; background: linear-gradient(145deg, rgba(154,40,66,.92), rgba(103,28,50,.96)); }
.murmur header { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; color: rgba(241,245,249,.44); font-size: 10px; }
.murmur header b { color: rgba(241,245,249,.62); font-weight: 500; }
.murmur time { margin-left: auto; }
.murmur p { margin: 0; font-size: 14px; line-height: 1.45; }
.murmur footer { min-height: 12px; margin-top: 5px; text-align: right; }
.receipt { color: rgba(241,245,249,.3); font-size: 9px; }
.avatar { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid rgba(241,245,249,.12); border-radius: 50%; }
.onna-line { width: min(94%, 620px); margin: 22px auto; padding: 13px 18px; border-left: 1px solid rgba(201,56,85,.6); background: linear-gradient(90deg, rgba(201,56,85,.08), transparent); font-family: var(--serif); font-style: italic; }
.onna-line span { color: rgba(201,56,85,.72); font-size: 9px; letter-spacing: .2em; }
.onna-line p { margin: 4px 0 0; color: rgba(241,245,249,.64); }
.composer { display: grid; grid-template-columns: 38px 1fr 38px; gap: 7px; align-items: end; padding: 9px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid rgba(241,245,249,.07); background: rgba(5,7,14,.95); }
.composer textarea { width: 100%; max-height: 110px; min-height: 42px; resize: none; border: 0; border-radius: 21px; background: rgba(241,245,249,.055); padding: 11px 15px; outline: 0; font-size: 16px; line-height: 1.3; }
.composer-power, .composer-send { width: 38px; height: 38px; border: 0; border-radius: 50%; background: rgba(241,245,249,.055); color: rgba(241,245,249,.55); }
.composer-send { background: var(--crimson); color: white; }
.new-murmur { position: absolute; left: 50%; bottom: 73px; z-index: 8; transform: translateX(-50%); border: 1px solid rgba(241,245,249,.13); border-radius: 999px; background: rgba(10,12,19,.94); color: rgba(241,245,249,.68); padding: 7px 13px; font-size: 11px; }
.playbook { position: fixed; z-index: 55; top: 0; right: 0; bottom: 0; width: min(90vw, 360px); overflow-y: auto; transform: translateX(100%); border-left: 1px solid rgba(241,245,249,.1); background: rgba(7,9,15,.99); padding: calc(18px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); box-shadow: -30px 0 90px rgba(0,0,0,.45); transition: transform .3s ease; }
.playbook[data-open="true"] { transform: translateX(0); }
.playbook > header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 12px; }
.playbook > header strong { font-family: var(--serif); font-size: 26px; }
.playbook > header button, .playbook button, .sheet button { border: 0; background: transparent; }
.playbook > header button { color: rgba(241,245,249,.45); font-size: 11px; }
.souffle-meter { height: 3px; margin-bottom: 26px; background: rgba(241,245,249,.08); }
.souffle-meter i { display: block; width: var(--value); height: 100%; background: linear-gradient(90deg, var(--ice), var(--crimson)); transition: width .3s ease; }
.playbook section { padding: 18px 0; border-top: 1px solid rgba(241,245,249,.07); }
.playbook section > button { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; width: 100%; padding: 10px 5px; text-align: left; }
.playbook section > button:hover { background: rgba(241,245,249,.035); }
.playbook b, .playbook small { display: block; }
.playbook b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.playbook small { margin-top: 2px; color: rgba(241,245,249,.38); font-size: 10px; line-height: 1.35; }
.playbook em { color: rgba(241,245,249,.3); font-size: 10px; font-style: normal; }
.rite-icon { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(201,56,85,.22); border-radius: 50%; color: var(--rose); font-family: var(--serif); }
.danger-action { color: rgba(234,65,101,.72) !important; }

/* Sheets and interactions */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,.62); backdrop-filter: blur(4px); }
.sheet { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; max-height: 82dvh; overflow-y: auto; border-top: 1px solid rgba(241,245,249,.15); background: #090b12; padding: 20px 18px calc(24px + env(safe-area-inset-bottom)); box-shadow: 0 -30px 100px rgba(0,0,0,.6); }
.sheet > header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.sheet h2 { margin: 6px 0 0; font-family: var(--serif); font-size: 30px; font-weight: 500; }
.sheet > header button { color: rgba(241,245,249,.45); font-size: 11px; }
.power-grid, .game-grid, .relic-grid { display: grid; gap: 8px; }
.power-card, .game-card, .relic-card { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; width: 100%; min-height: 74px; padding: 11px; border: 1px solid var(--line) !important; border-radius: 4px; background: rgba(241,245,249,.025) !important; text-align: left; }
.power-card:hover, .game-card:hover, .relic-card:hover { border-color: rgba(201,56,85,.4) !important; }
.power-symbol { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(201,56,85,.3); border-radius: 50%; color: var(--ice); font-family: var(--serif); font-size: 20px; }
.power-card b, .power-card small, .game-card b, .game-card small, .relic-card b, .relic-card small { display: block; }
.power-card b, .game-card b, .relic-card b { font-family: var(--serif); font-size: 18px; font-weight: 500; }
.power-card small, .game-card small, .relic-card small { margin-top: 2px; color: rgba(241,245,249,.42); font-size: 10px; line-height: 1.4; }
.power-cost { color: var(--ember); font-family: var(--mono); font-size: 10px; }
.power-card[disabled] { opacity: .35; cursor: not-allowed; }
.game-stage { border: 1px solid rgba(201,56,85,.25); background: linear-gradient(150deg, rgba(201,56,85,.08), rgba(241,245,249,.02)); padding: 18px; }
.game-stage h3 { margin: 7px 0 10px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.game-stage p { color: rgba(241,245,249,.58); line-height: 1.5; }
.game-stage .answers { display: grid; gap: 7px; margin-top: 15px; }
.game-stage .answers button { min-height: 44px; border: 1px solid var(--line); background: rgba(241,245,249,.03); text-align: left; }
.murmur.power-freeze { animation: freeze .7s ease both; border-color: rgba(167,216,245,.65); filter: saturate(.5); }
.murmur.power-ember { animation: ember .8s ease both; box-shadow: 0 0 30px rgba(240,168,104,.22); }
.murmur.power-seal::after { content: "Scelle"; display: block; margin-top: 7px; color: var(--ember); font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.murmur.power-echo + .echo-ghost { opacity: .24; transform: translate(12px, -4px); pointer-events: none; }
@keyframes freeze { 0% { filter: blur(6px); } 100% { filter: blur(0) saturate(.5); box-shadow: inset 0 0 26px rgba(167,216,245,.09); } }
@keyframes ember { 50% { transform: scale(1.02); } }
.toast-line { width: fit-content; margin: 10px auto; padding: 7px 12px; border: 1px solid rgba(240,168,104,.18); color: rgba(240,168,104,.72); font-family: var(--serif); font-size: 13px; font-style: italic; }
.inline-game { width: min(96%, 620px); margin: 24px auto; border: 1px solid rgba(201,56,85,.28); background: #09090c; padding: 18px; }
.inline-game h3 { margin: 6px 0 8px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.inline-game p { color: rgba(241,245,249,.55); line-height: 1.5; }
.inline-game .game-status { display: flex; justify-content: space-between; color: rgba(241,245,249,.34); font-size: 10px; }
.inline-game button { width: 100%; min-height: 44px; margin-top: 8px; border: 1px solid var(--line); background: rgba(241,245,249,.035); text-align: left; }
.inline-game button:hover { border-color: rgba(201,56,85,.4); }

/* Privacy veil */
.veil-trigger { position: fixed; z-index: 70; right: 12px; bottom: calc(84px + env(safe-area-inset-bottom)); display: none; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(241,245,249,.1); border-radius: 50%; background: rgba(5,7,14,.88); }
.circle.is-active ~ .veil-trigger { display: grid; }
.veil-trigger span { width: 13px; height: 9px; border: 1px solid rgba(241,245,249,.46); border-radius: 50%; }
.veil { position: fixed; inset: 0; z-index: 500; background: #f4f5f7; color: #20232a; }
.veil header { display: flex; justify-content: space-between; padding: calc(16px + env(safe-area-inset-top)) 22px 16px; border-bottom: 1px solid #dddfe4; background: white; }
.veil main { max-width: 760px; margin: 40px auto; padding: 0 24px; }
.veil h1 { font: 600 34px/1.2 var(--sans); }
.veil li { margin: 12px 0; }
.veil > small { position: fixed; right: 18px; bottom: 18px; color: #858b95; }

.lab-nav { position: fixed; z-index: 190; left: 50%; bottom: 8px; display: none; gap: 3px; transform: translateX(-50%); padding: 4px; border: 1px solid rgba(241,245,249,.09); border-radius: 999px; background: rgba(5,6,10,.88); backdrop-filter: blur(15px); }
.lab-nav.is-visible { display: flex; }
.lab-nav button { border: 0; border-radius: 999px; background: transparent; color: rgba(241,245,249,.42); padding: 7px 11px; font-size: 10px; }

.passage { position: fixed; inset: 0; z-index: 350; overflow: hidden; background: #03040a; }
.passage img { width: 100%; height: 100%; object-fit: cover; opacity: .42; animation: passageImage 5s ease both, passageDrift 5s ease-out both; }
.passage::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, transparent 0, rgba(3,4,10,.18) 30%, #03040a 82%); animation: passageSnow 5s ease both; }
.passage-copy { position: absolute; z-index: 2; left: 50%; top: 50%; width: min(88%, 620px); transform: translate(-50%, -50%); text-align: center; }
.passage-copy h2 { margin: 12px 0 9px; font-family: var(--serif); font-size: clamp(38px, 6vw, 72px); font-weight: 400; line-height: 1; }
.passage-copy p:last-child { color: rgba(241,245,249,.5); }
.passage > button { position: absolute; z-index: 3; left: 50%; bottom: calc(28px + env(safe-area-inset-bottom)); transform: translateX(-50%); border: 0; background: transparent; color: rgba(241,245,249,.38); font-size: 11px; }
@keyframes passageImage { 0% { transform: scale(1.12); filter: blur(9px); opacity: 0; } 28% { opacity: .42; } 100% { transform: scale(1); filter: blur(0); opacity: .28; } }
@keyframes passageCopy { 0%, 18% { opacity: 0; transform: translate(-50%, -45%); } 42%, 82% { opacity: 1; transform: translate(-50%, -50%); } 100% { opacity: 0; transform: translate(-50%, -53%); } }
@keyframes passageSnow { 0% { backdrop-filter: blur(14px); } 100% { backdrop-filter: blur(0); } }

@media (min-width: 760px) {
  .threshold-layout { grid-template-columns: 1.2fr .8fr; }
  .sanctuary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .season-feature { min-height: 360px; }
  .manga-feature { min-height: 360px; }
  .sheet { left: 50%; right: auto; width: min(680px, calc(100% - 40px)); transform: translateX(-50%); border: 1px solid rgba(241,245,249,.15); border-bottom: 0; }
  .power-grid, .game-grid, .relic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1040px) {
  .landing-head { padding-right: 48px; padding-left: 48px; }
  .landing-copy { padding-left: max(6vw, 70px); }
  .landing-foot { padding-right: 48px; padding-left: 48px; }
  .circle-grid { grid-template-columns: 230px minmax(0, 1fr) 310px; }
  .circle-rail { display: block; }
  .playbook { position: static; width: auto; transform: none; border-left: 1px solid rgba(241,245,249,.06); box-shadow: none; padding-top: 22px; }
  .playbook > header button { display: none; }
  .play-trigger { visibility: hidden; }
  .thread { padding: 28px 34px 52px; }
  .veil-trigger { right: 330px; }
}

@media (max-width: 759px) {
  .landing { background: linear-gradient(180deg, transparent 45%, var(--night) 72%), url("/assets/brand/landing-hero-yuki.png") 62% 11% / auto 54% no-repeat, var(--night); }
  .landing-scene { display: flex; align-items: flex-end; }
  .landing-copy { width: 100%; padding: 46vh 18px calc(68px + env(safe-area-inset-bottom)); }
  .landing-copy .eyebrow, .landing-promise { display: none; }
  .landing-copy h1 { margin: 0 0 24px; font-size: clamp(45px, 13vw, 62px); text-align: center; }
  .landing-visual { display: none; }
  .door-action { min-height: 65px; }
  .door-action small { display: none; }
  .landing-foot { display: none; }
  .returning-link { display: block; margin-right: auto; margin-left: auto; }
  .threshold-layout { width: 100%; padding: 18px 16px 80px; }
  .threshold-story { display: none; }
  .threshold-card { margin-top: 5vh; padding: 26px 20px; }
  .sanctuary-shell { width: 100%; padding: 48px 16px 90px; }
  .sanctuary-hero { text-align: center; }
  .sanctuary-hero h1 { font-size: 50px; }
  .sanctuary-intro { font-size: 14px; }
  .sanctuary-feature { min-height: 260px; padding: 22px; }
  .sanctuary-feature button { left: 22px; }
  .manga-feature { min-height: 360px; }
  .manga-feature img { width: 100%; filter: grayscale(.45) brightness(.44); }
  .manga-feature::after { background: linear-gradient(0deg, #080a11 0, transparent 78%); }
  .manga-feature div { width: 100%; margin: 180px 0 0; }
  .manga-feature button { left: 22px; }
  .circle-grid { grid-template-columns: 1fr; }
  .playbook { padding-top: calc(18px + env(safe-area-inset-top)); }
  .lab-nav { display: none; }
  .quiet-head { grid-template-columns: 44px 1fr 72px; padding-right: 12px; padding-left: 12px; }
}

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

/* ── Yuki x Love : le Fil rouge et le Degel ─────────────────────────────── */
.rail-love[hidden] { display: none; }
.rail-love h2 { margin: 0 0 .5rem; font-size: 1.35rem; }
.degel-track {
  height: 4px; border-radius: 4px; overflow: hidden;
  background: rgba(234, 243, 255, .08); margin-bottom: .6rem;
}
.degel-track i {
  display: block; height: 100%; width: var(--value, 0%);
  background: linear-gradient(90deg, #7fb3d5, #e23a5b);
  transition: width .8s cubic-bezier(.25, .8, .25, 1);
}
.inline-love textarea {
  width: 100%; margin: .6rem 0 .2rem; padding: .7rem .8rem;
  border: 1px solid rgba(234, 243, 255, .14); border-radius: 10px;
  background: rgba(3, 5, 12, .5); color: inherit; font: inherit; resize: vertical;
}
.love-rule { margin: .35rem 0 .7rem; font-size: .74rem; font-style: italic; color: rgba(234, 243, 255, .42); }
.love-reveal { display: grid; gap: .6rem; margin-top: .7rem; }
.love-reveal p {
  margin: 0; padding: .7rem .85rem; border-radius: 10px;
  border-left: 2px solid rgba(226, 58, 91, .45);
  background: linear-gradient(90deg, rgba(226, 58, 91, .09), rgba(234, 243, 255, .02));
}
.love-reveal b { display: block; margin-bottom: .2rem; font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: rgba(226, 58, 91, .7); }
.love-reveal span { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-style: italic; }

/* Le passage en trois temps : chaque beat respire puis s'efface */
.passage-copy.is-beat { animation: passageBeat 1.7s ease both; }
@keyframes passageBeat {
  0%   { opacity: 0; transform: translate(-50%, -46%); filter: blur(6px); }
  22%  { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); }
  76%  { opacity: 1; transform: translate(-50%, -50%); filter: blur(0); }
  100% { opacity: 0; transform: translate(-50%, -54%); filter: blur(4px); }
}
/* derive lente de l'image : on avance vers quelque chose */
@keyframes passageDrift { from { transform: scale(1.14); } to { transform: scale(1); } }
/* voile de neige qui balaie l'ecran une fois */
.passage-veil { position: absolute; inset: 0; z-index: 1; pointer-events: none; animation: passageVeil 5s ease-out both;
  background: linear-gradient(115deg, transparent 38%, rgba(234,243,255,.10) 50%, transparent 62%); }
@keyframes passageVeil { from { transform: translateX(-60%); } to { transform: translateX(60%); } }
@media (prefers-reduced-motion: reduce) {
  .passage img, .passage-veil, .passage-copy.is-beat { animation-duration: .01ms !important; }
}
