:root {
    --bg-primary: #0A0A0A;
    --text-primary: #FAF8F2;
    --text-secondary: #A1A1AA;
    --text-tertiary: #6B6B74;
    --accent: #3B82F6;
    --accent-dim: rgba(59, 130, 246, 0.12);
    --border: rgba(255, 255, 255, 0.08);
    --danger: #DC2626;
    --paper: #F6F1E7;
    --paper-ink: #2A241C;
    --paper-ink-dim: #746B5B;
    --font-sans: 'General Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Newsreader', Georgia, serif;
    --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--bg-primary); color: var(--text-primary); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font-family: inherit; }

header { position: fixed; top: 20px; left: 0; right: 0; z-index: 100; display: flex; justify-content: center; }
.header-inner {
    display: flex; align-items: center; gap: 28px;
    background: rgba(0, 0, 0, 0.34);
    backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 0 10px 40px -15px rgba(0, 0, 0, 0.6); border-radius: 999px; padding: 10px 14px 10px 10px;
}
.logo { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, 0.1); color: var(--text-primary); display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 15px; transition: transform .15s ease; }
.logo:hover { transform: scale(1.08); }
nav { display: flex; gap: 22px; align-items: center; }
nav a { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--text-secondary); transition: color .15s ease, transform .15s ease; white-space: nowrap; display: inline-block; }
nav a:hover { color: var(--text-primary); transform: translateY(-1px); }
nav a.active { color: var(--text-primary); }
nav .nav-contact { background: var(--text-primary); color: var(--bg-primary); padding: 8px 16px; border-radius: 999px; font: inherit; font-weight: 600; border: none; cursor: pointer; transition: transform .15s ease; }
nav .nav-contact:hover { transform: scale(1.05); }
.nav-contact-group { position: relative; }
.nav-contact-panel { position: absolute; top: 100%; right: 0; margin-top: 10px; min-width: 150px; display: flex; flex-direction: column; gap: 2px; padding: 8px; background: rgba(22, 23, 26, 0.95); border: 1px solid var(--border); border-radius: 16px; opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-4px); transition: opacity .15s ease, transform .15s ease, visibility .15s; }
.nav-contact-group:hover .nav-contact-panel, .nav-contact-group:focus-within .nav-contact-panel { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.nav-contact-panel a { padding: 8px 10px; border-radius: 10px; }
.nav-contact-panel a:hover { background: rgba(255,255,255,0.06); transform: none; }

.lf-wrap { max-width: 1040px; margin: 0 auto; padding: 128px 24px 0; }
.lf-back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 28px; transition: color .2s; }
.lf-back:hover { color: var(--text-primary); }
.lf-back svg { width: 16px; height: 16px; }

.lf-hero { text-align: center; margin-bottom: 32px; }
.lf-eyebrow { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--accent); margin-bottom: 14px; display: inline-block; }
.lf-hero h1 { font-weight: 500; letter-spacing: -0.03em; font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 16px; }
.lf-lede { font-size: 16px; line-height: 1.7; color: var(--text-secondary); max-width: 520px; margin: 0 auto; }

.lf-tabs { display: flex; justify-content: center; gap: 8px; margin-bottom: 28px; }
.lf-tab { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-secondary); background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); padding: 10px 22px; border-radius: 999px; cursor: pointer; transition: all .2s ease; }
.lf-tab:hover { color: var(--text-primary); border-color: rgba(255,255,255,0.2); }
.lf-tab.is-active { background: var(--text-primary); color: var(--bg-primary); border-color: var(--text-primary); }

.lf-write { display: flex; flex-direction: column; align-items: center; margin-bottom: 40px; }
.lf-textarea {
    width: 100%; max-width: 680px; min-height: 60vh;
    background: var(--paper); color: var(--paper-ink);
    border: none; border-radius: 4px; padding: 56px 48px;
    font-family: var(--font-serif); font-size: 18px; line-height: 1.85;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
    resize: vertical;
}
.lf-textarea:focus { outline: none; }
.lf-textarea::placeholder { color: var(--paper-ink-dim); }
.lf-write-foot { display: flex; justify-content: space-between; width: 100%; max-width: 680px; margin-top: 14px; font-size: 12px; color: var(--text-tertiary); }
.lf-saved { color: #34D399; }

.lf-book { display: flex; align-items: center; justify-content: center; gap: 16px; }
.lf-nav-btn { width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,0.06); border: 1px solid var(--border); color: var(--text-primary); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: all .15s ease; }
.lf-nav-btn:hover { background: rgba(255,255,255,0.12); }
.lf-nav-btn:disabled { opacity: 0.3; cursor: default; }
.lf-nav-btn:disabled:hover { background: rgba(255,255,255,0.06); }
.lf-nav-btn svg { width: 18px; height: 18px; }

.lf-page-stage { width: min(560px, 80vw); height: 680px; position: relative; perspective: 1400px; }
.lf-page {
    position: absolute; inset: 0;
    background: var(--paper); color: var(--paper-ink);
    padding: 48px 44px; overflow: hidden;
    font-family: var(--font-serif); font-size: 16px; line-height: 1.8;
    box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
    white-space: pre-wrap; word-wrap: break-word;
    transition: transform .4s var(--ease-out), opacity .4s var(--ease-out);
}
.lf-page.is-turning-next { transform: translateX(-36px); opacity: 0; }
.lf-page.is-turning-prev { transform: translateX(36px); opacity: 0; }
.lf-page-empty { color: var(--paper-ink-dim); font-style: italic; }

.lf-page-indicator { text-align: center; font-size: 12px; color: var(--text-tertiary); margin-top: 16px; }

.lf-margin { max-width: 560px; margin: 40px auto 0; border-top: 1px solid var(--border); padding-top: 28px; }
.lf-margin h2 { font-weight: 500; letter-spacing: -0.02em; font-size: 18px; margin-bottom: 6px; }
.lf-margin-hint { font-size: 12px; color: var(--text-tertiary); margin-bottom: 16px; }
.lf-notes { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.lf-note { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 13px; color: var(--text-secondary); }
.lf-note-remove { background: none; border: none; color: var(--text-tertiary); cursor: pointer; font-size: 15px; line-height: 1; flex-shrink: 0; }
.lf-note-remove:hover { color: var(--danger); }
.lf-note-form { display: flex; gap: 8px; }
.lf-note-form input { flex: 1; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; color: var(--text-primary); font-size: 13px; }
.lf-note-form input:focus { outline: none; border-color: var(--accent); }
.lf-note-form button { background: var(--text-primary); color: var(--bg-primary); border: none; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }

.lf-data { border-top: 1px solid var(--border); padding: 40px 0 80px; margin-top: 40px; }
.lf-data h2 { font-weight: 500; letter-spacing: -0.02em; font-size: 20px; margin-bottom: 12px; }
.lf-data p { font-size: 14px; line-height: 1.7; color: var(--text-secondary); max-width: 560px; margin-bottom: 20px; }
.lf-data-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.lf-data-btn { font-size: 13px; font-weight: 600; background: rgba(255,255,255,0.04); border: 1px solid var(--border); color: var(--text-primary); padding: 10px 18px; border-radius: 999px; cursor: pointer; transition: all .15s ease; }
.lf-data-btn:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); }
.lf-data-danger { color: #FCA5A5; }
.lf-data-danger:hover { border-color: var(--danger); background: rgba(220,38,38,0.1); }

footer { border-top: 1px solid var(--border); margin-top: 24px; }
.footer-inner { max-width: 1040px; margin: 0 auto; padding: 40px 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-name { font-weight: 700; font-size: 14px; }
.footer-status { font-size: 13px; color: var(--text-tertiary); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 13px; color: var(--text-secondary); }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 768px) {
    .header-inner { gap: 14px; padding: 8px 10px 8px 8px; }
    nav { gap: 12px; }
    .lf-wrap { padding: 108px 20px 0; }
    .lf-textarea { padding: 36px 28px; min-height: 50vh; }
    .lf-page-stage { width: 100%; height: 560px; }
    .lf-page { padding: 32px 26px; font-size: 15px; }
    .footer-inner { flex-direction: column; text-align: center; }
}
