/* Navigation sits in the document flow over the first scene. */
.site-header { position: absolute; top: 0; left: 0; z-index: 20; width: 100%; height: 94px; display: flex; align-items: center; justify-content: space-between; padding-inline: var(--gutter); border-bottom: 1px solid #f0eae00e; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 700; letter-spacing: .12em; line-height: 1.3; }
.brand-second { display: block; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .3em; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 39px; border: 1px solid #d5927d55; border-radius: 18px 18px 5px 5px; color: var(--accent); }
.brand-mark svg { width: 20px; height: 20px; fill: currentColor; }
.desktop-nav { display: flex; gap: 34px; color: #adb5bf; font-size: 12px; }
.desktop-nav a, .portrait-link { transition: color .2s; }
.desktop-nav a:hover, .portrait-link:hover { color: var(--accent-light); }
.header-actions { display: flex; align-items: center; gap: 26px; }
.language-button { border: 0; padding: 10px 0; background: none; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.header-hug { display: flex; gap: 9px; align-items: center; padding: 10px 15px; border: 1px solid #d5927d55; color: #e6c8b9; border-radius: 3px; font-size: 11px; }
.header-hug .icon { width: 14px; height: 14px; }

/* The hero owns all decorative layers. Essential content remains in flow. */
.hero { position: relative; isolation: isolate; min-height: 800px; min-height: max(800px, 100svh); overflow: hidden; display: flex; align-items: center; background: #0c1119; padding-block: 166px 150px; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; z-index: -4; }
.hero-shade { position: absolute; inset: 0; z-index: -3; background: linear-gradient(90deg, #070b12ed 0%, #070b12b0 26%, #070b1220 57%, transparent 78%), linear-gradient(0deg, #080b10 0%, #080b1050 13%, transparent 32%, #080b1033 100%); }
.hero-warmth { position: absolute; inset: 0; z-index: -2; opacity: 0; background: radial-gradient(ellipse at 76% 35%, #f7b86340, transparent 60%); transition: opacity 2s; pointer-events: none; }
body.has-hope .hero-warmth { opacity: 1; }
#rain-canvas, #heart-particles { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: -1; }
#heart-particles { z-index: 7; overflow: hidden; }
.hero-content { position: relative; z-index: 5; }
.hero-eyebrow { color: #b0b6bd; margin-bottom: 28px; }
.status-dot, .red-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--red); display: inline-block; box-shadow: 0 0 9px #c66b6855; flex-shrink: 0; }
.hero h1 { font-size: clamp(65px, 7.1vw, 108px); line-height: .99; letter-spacing: -.055em; max-width: 750px; text-shadow: 0 2px 32px #06090e22; }
.hero h1 em { display: inline-block; color: #d5a18c; margin-top: 9px; font-size: .82em; font-weight: 400; }
.hero-description { color: #b4bdc7; font-size: 14px; line-height: 1.9; margin-top: 27px; }
.hero-buttons { display: flex; gap: 27px; align-items: center; margin-top: 30px; }
.hero-footnote { display: flex; gap: 8px; align-items: center; color: #828e9a; margin-top: 19px; font-size: 11px; }
.tiny-heart { font-size: 17px; color: var(--accent); }
.dog-caption { position: absolute; right: 9%; bottom: 18%; z-index: 4; display: flex; gap: 10px; align-items: center; color: #d2c0b4; font-family: var(--serif); font-style: italic; font-size: 14px; }
.caption-line { display: inline-block; width: 30px; height: 1px; background: #d2c0b477; }
.hero-bottom { position: absolute; bottom: 33px; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; z-index: 6; }
.scroll-cue { display: flex; gap: 13px; align-items: center; color: #8b98a4; font-size: 10px; font-family: var(--mono); letter-spacing: .06em; }
.scroll-line { width: 1px; height: 27px; background: linear-gradient(#d5927d, #d5927d22); position: relative; }
.scroll-line::after { content: ''; position: absolute; bottom: 0; left: -2px; width: 5px; height: 5px; border-right: 1px solid var(--accent); border-bottom: 1px solid var(--accent); transform: rotate(45deg); }
.scene-controls { display: flex; align-items: center; gap: 17px; }
.scene-control { display: flex; align-items: center; gap: 9px; border: 0; background: none; color: #9faab6; padding: 9px 0; font-size: 10px; }
.scene-control[aria-pressed="true"] { color: #d4c4bb; }
.scene-control .icon { width: 15px; height: 15px; }
.control-divider { height: 14px; width: 1px; background: var(--line); }

.mood-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #0b1016; }
.mood-strip-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 63px; font-size: 10px; font-family: var(--mono); color: #969fa8; }
.mood-strip-inner > span { display: flex; gap: 9px; align-items: center; white-space: nowrap; }
.mood-strip .icon { width: 13px; height: 13px; }
.strip-label { color: #5c6b78; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.strip-loyalty { color: #c2a18e; }
.strip-end { color: var(--accent); }

/* A restrained utility rail becomes sticky only after the opening scene. */
.token-toolbar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid #c1cbd810; background: #0a0e14ed; backdrop-filter: blur(16px); }
.token-toolbar-inner { min-height: 60px; display: flex; align-items: center; gap: 24px; }
.toolbar-label { color: #63717e; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; white-space: nowrap; }
.token-shortcuts { display: flex; align-items: center; gap: 8px; }
.token-shortcut { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 7px 11px; border: 1px solid #aab7c316; border-radius: 3px; background: transparent; color: #a7b0b8; font-family: var(--mono); font-size: 9px; line-height: 1; white-space: nowrap; transition: color .2s, border-color .2s, background .2s; }
.token-shortcut[href]:hover, .token-shortcut:not(:disabled)[type="button"]:hover { color: #dac4b7; border-color: #d5927d50; background: #d5927d09; }
.token-shortcut-buy { color: #c3a18e; border-color: #d5927d30; }
.token-shortcut[aria-disabled="true"], .token-shortcut:disabled { color: #707b85; border-color: #aab7c310; cursor: default; }
.token-shortcut-buy[aria-disabled="true"] { color: #9a8173; border-color: #d5927d20; }
.ca-address { color: inherit; font-size: 9px; max-width: 100px; overflow: hidden; text-overflow: ellipsis; }
.ca-address-full { max-width: 200px; overflow-wrap: anywhere; white-space: normal; user-select: all; line-height: 1.5; }
.token-shortcuts:has(.ca-address-full) { flex-wrap: wrap; }
.token-shortcut-ca:has(.ca-address-full) { flex-basis: 100%; order: 6; }
.copy-icon { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1; flex-shrink: 0; }
.token-status { margin-left: auto; font-family: var(--mono); color: #66717a; font-size: 8px; white-space: nowrap; }

.story-section { background: radial-gradient(ellipse at 0% 70%, #12202b35, transparent 55%); }
.story-layout { display: grid; grid-template-columns: .95fr 1.05fr; gap: 11%; }
.story-intro h2 { margin-top: 30px; }
.story-aside { margin-top: 26px; font-size: 13px; color: var(--muted); line-height: 1.9; }
.handwritten { font-family: var(--serif); font-style: italic; transform: rotate(-6deg); color: #a78272; font-size: 22px; margin-top: 40px; display: inline-block; border-bottom: 1px solid #a7827244; padding-bottom: 5px; }
.chapter { display: flex; gap: 22px; border-bottom: 1px solid var(--line); padding: 26px 0 30px; }
.chapter:first-child { padding-top: 0; }
.chapter-index { font-family: var(--mono); color: #647483; font-size: 10px; padding-top: 5px; }
.chapter h3 { font-weight: 500; font-size: 17px; margin-bottom: 11px; letter-spacing: -.02em; }
.chapter p { color: #929da9; line-height: 1.85; font-size: 13px; max-width: 350px; }
.chapter-symbol { color: #bd9681; margin-left: auto; font-size: 22px; line-height: 1.3; }
.chapter-symbol-red { color: var(--red); }
.story-quote { font-family: var(--serif); font-style: italic; font-size: 24px; color: #c6b7aa; line-height: 1.45; padding-top: 31px; padding-left: 35px; }

.diary-section { background: #0c1017; border-block: 1px solid var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 48px; }
.section-heading h2 { margin-top: 22px; font-size: clamp(40px, 4.3vw, 62px); }
.diary-mark { font-family: var(--mono); font-size: 9px; color: #62707c; letter-spacing: .1em; padding-bottom: 8px; }
.diary-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; }
.diary-tabs { display: flex; border-bottom: 1px solid var(--line); gap: 22px; margin-bottom: 28px; }
.diary-tabs button { display: flex; gap: 7px; padding: 0 0 13px; background: none; color: #7b8896; border: 0; border-bottom: 1px solid transparent; margin-bottom: -1px; font-size: 11px; }
.diary-tabs button > span:first-child { font-family: var(--mono); font-size: 9px; padding-top: 2px; opacity: .7; }
.diary-tabs button[aria-selected="true"] { color: var(--accent-light); border-color: var(--accent); }
.diary-date { font-family: var(--mono); color: #61717f; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.diary-salutation { font-family: var(--serif); font-style: italic; font-size: 23px; color: #c5b3a3; margin-top: 20px; }
.diary-entry { font-family: var(--serif); color: #c4c3c2; font-size: 21px; line-height: 1.7; margin-top: 10px; min-height: 143px; }
.diary-signature { font-family: var(--serif); font-style: italic; color: #9e8170; margin-top: 16px; font-size: 17px; }
.diary-signature span { padding-left: 13px; }
.feeling-chart { padding: 27px 29px 22px; border: 1px solid #c2cddb12; background: linear-gradient(160deg, #141b24, #0d1219); border-radius: 3px; align-self: start; }
.chart-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 11px; color: #a7b0ba; }
.chart-tag { padding: 3px 7px; border: 1px solid #c66b682e; color: #c58a7a; background: #b75c5110; font-family: var(--mono); font-size: 8px; white-space: nowrap; }
.chart-value { font-size: 35px; font-family: var(--serif); margin-top: 23px; line-height: 1.3; color: #d2a18d; letter-spacing: -.02em; }
.chart-subtitle { color: #717f8d; font-size: 10px; }
.chart-svg { display: block; width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.chart-grid { fill: none; stroke: #b5c1d010; stroke-width: 1; stroke-dasharray: 3 6; }
.chart-axis { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 8px; color: #627180; margin-top: 2px; }
.chart-note { color: #596773; font-size: 9px; margin-top: 23px; }

.stay-section { background: radial-gradient(ellipse at 10% 50%, #9c573d09, transparent 65%); }
.stay-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 10%; align-items: center; }
.stay-copy h2 { margin-top: 27px; }
.stay-copy > p:not(.eyebrow) { color: #929da8; font-size: 13px; line-height: 1.85; margin-top: 24px; }
.stay-copy > .button { margin-top: 27px; }
.hope-indicator { margin-top: 34px; max-width: 330px; }
.hope-top { display: flex; justify-content: space-between; gap: 10px; color: #a49d92; font-size: 10px; }
#hope-value { color: #d6a489; font-family: var(--mono); }
.hope-track { height: 3px; background: #dca78915; border-radius: 3px; margin-top: 11px; }
#hope-fill { display: block; width: 8%; height: 100%; background: var(--accent); border-radius: inherit; transition: width 1s; box-shadow: 0 0 12px #d5927d33; }
.hug-count { color: #64717c; font-size: 10px; margin-top: 11px; }
.note-card { padding: 31px; background: #11151b; border: 1px solid #dec7ad1c; border-radius: 4px; transform: rotate(1deg); box-shadow: 18px 25px 65px #0002; }
.note-card-top { display: flex; align-items: center; gap: 9px; color: #b29b89; font-family: var(--mono); font-size: 9px; border-bottom: 1px solid var(--line); padding-bottom: 19px; }
.note-card-top .icon { width: 13px; height: 13px; }
.note-card-top > span:last-child { margin-left: auto; color: #5e6b76; }
.note-card form { margin-top: 26px; }
.note-card label { display: block; font-family: var(--serif); color: #e0d4c7; font-size: 27px; letter-spacing: -.02em; margin-bottom: 17px; line-height: 1.3; }
.note-card textarea { display: block; width: 100%; resize: vertical; max-height: 240px; min-height: 130px; border: none; padding: 12px 0; border-bottom: 1px solid #ac927a30; color: #dfc7b3; background: transparent; border-radius: 0; font-family: var(--serif); font-size: 18px; line-height: 1.8; }
.note-card textarea::placeholder { color: #67717a; opacity: 1; }
.note-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 20px; }
#note-length { font-size: 9px; font-family: var(--mono); color: #586572; }
.note-submit { background: none; border: 0; display: flex; gap: 10px; align-items: center; color: var(--accent); font-size: 11px; padding: 8px 0; }
.note-submit .icon { width: 16px; }
.note-privacy { color: #64717d; font-size: 9px; margin-top: 18px; }
.saved-note { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 19px; }
.saved-note > span { font-family: var(--mono); text-transform: uppercase; font-size: 8px; letter-spacing: .1em; color: #897b6f; }
.saved-note blockquote { margin-top: 10px; font-family: var(--serif); font-size: 19px; color: #d1b8a2; overflow-wrap: anywhere; white-space: pre-wrap; }

.closing-section { padding: 86px 0 93px; text-align: center; border-block: 1px solid var(--line); background: radial-gradient(ellipse at 50% 100%, #61412d15, transparent 70%); }
.closing-star { color: var(--accent); font-size: 28px; line-height: 1; }
.closing-section p { font-size: 12px; color: #818b93; margin-top: 18px; }
.closing-section h2 { font-size: clamp(32px, 4vw, 55px); margin-top: 8px; }
.closing-link { display: inline-flex; align-items: center; gap: 13px; font-size: 11px; color: #beac9c; margin-top: 28px; border-bottom: 1px solid #beac9c30; padding-bottom: 8px; }
.closing-link .icon { width: 14px; height: 14px; }
.site-footer { display: flex; align-items: center; gap: 25px; padding-block: 35px; }
.footer-brand { font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.footer-brand span { display: block; font-family: var(--mono); font-size: 6px; letter-spacing: .09em; color: #67717b; margin-top: 4px; }
.site-footer > p { color: #64717d; font-size: 9px; margin-left: auto; }
.portrait-link, .footer-links a { font-size: 9px; color: #9b8d7f; }
.footer-links { display: flex; gap: 15px; }
.footer-links:empty { display: none; }
.toast { position: fixed; left: 50%; bottom: 27px; transform: translate(-50%, 25px); z-index: 100; padding: 14px 22px; background: #1d201fef; border: 1px solid #d5927d50; color: #eed7c4; backdrop-filter: blur(12px); font-size: 12px; border-radius: 5px; opacity: 0; pointer-events: none; transition: opacity .3s, transform .3s; max-width: calc(100vw - 40px); text-align: center; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.floating-heart { position: absolute; color: #f2bc96; font-family: var(--serif); font-size: 24px; animation: heart-rise 2.4s ease-out forwards; text-shadow: 0 0 20px #eaa57e55; }
@keyframes heart-rise { from { opacity: 0; transform: translateY(10px) rotate(-10deg) scale(.8); } 15% { opacity: .9; } to { opacity: 0; transform: translateY(-150px) rotate(14deg) scale(1.1); } }
