/* ══════════════════════════════════════════════════════════════
   The Alloy Keepers — site stylesheet
   Design: Claude Design handoff; implementation: .NET 10 Blazor
   ══════════════════════════════════════════════════════════════ */

:root {
    --bg: #0a0e13;
    --bg-soft: #121822;
    --bg-soft-2: #1a212c;
    --bg-warm: #1c1612;
    --ink: #ece4d3;
    --ink-dim: rgba(236, 228, 211, 0.62);
    --ink-faint: rgba(236, 228, 211, 0.32);
    --rule: rgba(236, 228, 211, 0.12);
    --rule-strong: rgba(236, 228, 211, 0.22);
    --amber: #d9a672;
    --amber-warm: #e8b87f;
    --amber-soft: rgba(217, 166, 114, 0.16);
    --ember: #c47a4a;
    --frost: #7a98ac;
    --monitor: #c8503a;
    --serif: "Spectral", "Iowan Old Style", Georgia, serif;
    --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    --max: 1240px;
    --col: 720px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--serif);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

::selection { background: var(--amber-soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ─── monospace utility ─── */
.mono {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    font-weight: 400;
}
.mono-amber { color: var(--amber); }
.hair { height: 1px; background: var(--rule); border: 0; }

/* ─── nav ─── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 32px;
    background: linear-gradient(to bottom, rgba(10,14,19,0.92), rgba(10,14,19,0));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.nav-mark {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.22em;
    color: var(--ink);
}
.nav-mark .dot {
    display: inline-block; width: 6px; height: 6px; border-radius: 50%;
    background: var(--amber); margin-right: 10px; vertical-align: 2px;
    box-shadow: 0 0 8px var(--amber);
    animation: pulse 2.4s ease-in-out infinite;
}
.nav-links { display: flex; gap: 28px; }
.nav-links a {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--ink-dim);
    transition: color 0.2s ease;
}
.nav-links a:hover { color: var(--amber); }
@media (max-width: 700px) {
    .nav-links { display: none; }
    .nav { padding: 16px 20px; }
}

/* ─── hero ─── */
.hero {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 120px 40px 80px;
}
#starfield {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background:
        radial-gradient(ellipse at 70% 30%, rgba(217,166,114,0.08), transparent 40%),
        radial-gradient(ellipse at 20% 80%, rgba(122,152,172,0.06), transparent 50%),
        linear-gradient(to bottom, #0a0e13 0%, #0d1320 60%, #161a22 100%);
}
.ridge {
    position: absolute; left: 0; right: 0; bottom: 0;
    z-index: 1;
    pointer-events: none;
}
.ridge svg { width: 100%; height: auto; display: block; }
.lamp {
    position: absolute;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #f4d8a8;
    box-shadow:
        0 0 8px 2px rgba(244, 216, 168, 0.9),
        0 0 24px 8px rgba(217, 166, 114, 0.6),
        0 0 64px 24px rgba(217, 166, 114, 0.25),
        0 0 140px 60px rgba(217, 166, 114, 0.08);
    z-index: 2;
    animation: lamp-flicker 5s ease-in-out infinite;
}
@keyframes lamp-flicker {
    0%, 100% { opacity: 1; transform: scale(1); }
    47% { opacity: 0.92; transform: scale(0.98); }
    52% { opacity: 1; transform: scale(1); }
    71% { opacity: 0.88; transform: scale(0.97); }
    73% { opacity: 1; transform: scale(1); }
}
.hero-inner {
    position: relative; z-index: 3;
    max-width: var(--max); margin: 0 auto; width: 100%;
    display: grid; grid-template-columns: 1.2fr 0.8fr;
    gap: 80px; align-items: center;
}
@media (max-width: 960px) {
    .hero-inner { grid-template-columns: 1fr; gap: 56px; }
    .hero { padding: 110px 24px 60px; }
}
.hero-title {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(54px, 9vw, 124px);
    line-height: 0.95;
    letter-spacing: -0.015em;
    margin: 24px 0 0;
    color: var(--ink);
}
.hero-title em {
    font-style: normal;
    color: var(--amber);
}
.hero-eyebrow {
    display: flex; align-items: center; gap: 14px;
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.22em;
    color: var(--amber);
    text-transform: uppercase;
}
.hero-eyebrow::before {
    content: ""; width: 36px; height: 1px; background: var(--amber);
}
.hero-sub {
    margin: 36px 0 0;
    max-width: 540px;
    font-size: 19px;
    line-height: 1.6;
    color: var(--ink-dim);
    font-weight: 300;
}
.hero-sub em { color: var(--ink); font-style: italic; }
.hero-meta {
    margin-top: 48px;
    display: flex; gap: 28px; flex-wrap: wrap;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--ink-faint);
    text-transform: uppercase;
}
.hero-meta span strong { color: var(--ink); font-weight: 500; }
.hero-cta {
    margin-top: 36px;
    display: flex; gap: 18px; flex-wrap: wrap;
}

/* ─── buttons ─── */
.btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 22px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    border: 1px solid var(--rule-strong);
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn:hover { border-color: var(--amber); color: var(--amber); }
.btn-primary {
    background: var(--amber);
    color: #1a1208;
    border-color: var(--amber);
}
.btn-primary:hover { background: var(--amber-warm); border-color: var(--amber-warm); color: #1a1208; }
.btn .arrow { display: inline-block; transition: transform 0.2s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* ─── cover ─── */
.cover-wrap {
    position: relative;
    perspective: 1400px;
    display: flex; justify-content: center;
}
.cover {
    position: relative;
    width: 320px; aspect-ratio: 2 / 3;
    transform: rotateY(-9deg) rotateX(2deg);
    transform-style: preserve-3d;
    box-shadow:
        -20px 30px 60px rgba(0,0,0,0.6),
        -2px 2px 0 rgba(0,0,0,0.4);
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cover:hover { transform: rotateY(-4deg) rotateX(1deg); }
.cover::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(105deg, rgba(255,255,255,0.06) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.15) 100%);
    pointer-events: none;
}
.cover-spine {
    position: absolute; left: -8px; top: 0; bottom: 0;
    width: 8px;
    background: linear-gradient(to right, #050608, #0d1119);
    transform: rotateY(-90deg); transform-origin: right center;
}

/* ─── coordinate strip ─── */
.coord-strip {
    position: relative;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
    padding: 14px 32px;
    display: flex; gap: 40px; flex-wrap: wrap; justify-content: space-between;
    font-family: var(--mono);
    font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-faint);
    background: rgba(10, 14, 19, 0.6);
}
.coord-strip .pulse {
    display: inline-block; width: 5px; height: 5px; border-radius: 50%;
    background: var(--amber); margin-right: 8px; vertical-align: 1px;
    animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(217,166,114,0.6); }
    50% { opacity: 0.5; box-shadow: 0 0 0 6px rgba(217,166,114,0); }
}

/* ─── sections ─── */
section {
    position: relative;
    padding: 120px 40px;
}
@media (max-width: 700px) { section { padding: 80px 24px; } }
.container {
    max-width: var(--max); margin: 0 auto; width: 100%;
}
.section-head {
    display: grid; grid-template-columns: 200px 1fr; gap: 60px;
    align-items: baseline;
    margin-bottom: 64px;
}
@media (max-width: 800px) {
    .section-head { grid-template-columns: 1fr; gap: 16px; margin-bottom: 40px; }
}
.section-tag {
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--amber);
}
.section-tag::before {
    content: ""; display: inline-block;
    width: 32px; height: 1px; background: var(--amber); vertical-align: 4px;
    margin-right: 14px;
}
.section-title {
    font-family: var(--serif);
    font-weight: 300;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    margin: 0;
}
.section-title em { color: var(--amber); font-style: italic; font-weight: 300; }

/* ─── synopsis ─── */
.synopsis-pull {
    font-family: var(--serif);
    font-style: italic;
    font-weight: 300;
    font-size: clamp(26px, 3.4vw, 38px);
    line-height: 1.3;
    color: var(--ink);
    margin: 0 0 56px;
    max-width: 920px;
}
.synopsis-pull span { color: var(--amber); font-style: normal; }
.synopsis-body {
    max-width: var(--col);
    font-size: 18px; line-height: 1.75;
    color: var(--ink-dim);
}
.synopsis-body p { margin: 0 0 1.4em; }
.synopsis-body p:last-child { margin-bottom: 0; }
.synopsis-body em { color: var(--ink); }

/* ─── excerpt ─── */
.excerpt-section {
    background: var(--bg-soft);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.excerpt-paper {
    max-width: 760px; margin: 0 auto;
    position: relative;
}
.excerpt-chapter {
    text-align: center;
    margin-bottom: 56px;
}
.excerpt-chapter .chno {
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase;
    color: var(--ink-faint);
    display: block; margin-bottom: 18px;
}
.excerpt-chapter .chtitle {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 32px;
    color: var(--ink);
}
.excerpt-chapter .orn {
    display: block; margin: 18px auto;
    width: 80px; height: 1px;
    background: linear-gradient(to right, transparent, var(--amber), transparent);
}
.excerpt-body {
    font-size: 19px;
    line-height: 1.78;
    color: var(--ink);
    font-weight: 300;
}
.excerpt-body p { margin: 0 0 1.3em; }
.excerpt-body p:first-child::first-letter {
    font-family: var(--serif);
    font-style: italic;
    font-size: 5.6em;
    line-height: 0.88;
    float: left;
    padding: 6px 14px 0 0;
    color: var(--amber);
    font-weight: 300;
}
.excerpt-fade {
    position: relative;
    max-height: 720px;
    overflow: hidden;
    transition: max-height 0.6s ease;
}
.excerpt-fade.open { max-height: 9000px; }
.excerpt-fade:not(.open)::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 220px;
    background: linear-gradient(to bottom, transparent, var(--bg-soft) 90%);
    pointer-events: none;
}
.excerpt-toggle {
    display: flex; justify-content: center; margin-top: 36px;
}

/* ─── characters ─── */
.characters { background: var(--bg); }
.char-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--rule);
    border: 1px solid var(--rule);
}
@media (max-width: 760px) { .char-grid { grid-template-columns: 1fr; } }
.char {
    background: var(--bg);
    padding: 40px 36px;
    position: relative;
    transition: background 0.3s ease;
}
.char:hover { background: var(--bg-soft); }
.char-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 18px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-faint);
}
.char-id { color: var(--amber); }
.char-name {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 36px; line-height: 1.05;
    margin: 0 0 4px;
    color: var(--ink);
}
.char-role {
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--ink-dim);
    margin-bottom: 22px;
}
.char-desc { font-size: 16px; line-height: 1.65; color: var(--ink-dim); margin: 0; }
.char-desc em { color: var(--ink); font-style: italic; }
.char-spec {
    margin-top: 22px;
    display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ink-faint);
    padding-top: 18px;
    border-top: 1px dashed var(--rule);
}
.char-spec b { color: var(--ink-dim); font-weight: 500; letter-spacing: 0.14em; }
.char.android { background: linear-gradient(155deg, var(--bg) 0%, rgba(122,152,172,0.04) 100%); }
.char.android:hover { background: linear-gradient(155deg, var(--bg-soft) 0%, rgba(122,152,172,0.07) 100%); }
.char.android .char-id { color: var(--frost); }

/* ─── world / 2041 ─── */
.world {
    background: var(--bg-soft);
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
}
.world-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-top: 32px;
}
@media (max-width: 900px) { .world-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .world-grid { grid-template-columns: 1fr; } }
.stat { border-top: 1px solid var(--rule-strong); padding-top: 20px; }
.stat-label {
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 14px;
}
.stat-value {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 34px; line-height: 1;
    color: var(--amber);
    margin-bottom: 10px;
}
.stat-desc { font-size: 14.5px; line-height: 1.55; color: var(--ink-dim); }
.world-quote {
    margin-top: 80px;
    max-width: 900px;
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: clamp(22px, 2.6vw, 30px);
    line-height: 1.45;
    color: var(--ink);
}
.world-quote-attr {
    margin-top: 18px;
    font-family: var(--mono);
    font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--amber);
}

/* ─── author ─── */
.author { background: var(--bg); }
.author-grid {
    display: grid; grid-template-columns: 260px 1fr;
    gap: 80px; align-items: start;
}
@media (max-width: 800px) { .author-grid { grid-template-columns: 1fr; gap: 40px; } }
.author-portrait {
    aspect-ratio: 4 / 5;
    background:
        radial-gradient(ellipse at 60% 30%, rgba(217,166,114,0.18), transparent 50%),
        linear-gradient(155deg, var(--bg-soft-2) 0%, var(--bg) 100%);
    border: 1px solid var(--rule);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.author-portrait::after {
    content: "C·G";
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 64px;
    color: var(--ink-faint);
}
.author-portrait .mono {
    position: absolute; bottom: 14px; left: 14px;
    font-size: 9.5px;
}
.author-body { font-size: 18px; line-height: 1.75; color: var(--ink-dim); max-width: 600px; }
.author-body p { margin: 0 0 1.3em; }
.author-body em { color: var(--ink); }

/* ─── signup ─── */
.signup {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(217,166,114,0.10), transparent 60%),
        var(--bg);
    border-top: 1px solid var(--rule);
    text-align: center;
}
.signup-inner { max-width: 640px; margin: 0 auto; }
.signup-title {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1; margin: 0 0 18px;
}
.signup-title em { color: var(--amber); font-style: italic; }
.signup-sub {
    font-size: 17px; line-height: 1.65;
    color: var(--ink-dim);
    margin: 0 auto 36px;
    max-width: 480px;
}
.signup-form {
    display: flex; gap: 0; max-width: 480px; margin: 0 auto;
    border: 1px solid var(--rule-strong);
    transition: border-color 0.2s ease;
}
.signup-form:focus-within { border-color: var(--amber); }
.signup-form input {
    flex: 1; padding: 16px 20px;
    background: transparent; border: 0; outline: none;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 16px;
}
.signup-form input::placeholder { color: var(--ink-faint); font-style: italic; }
.signup-form button {
    padding: 0 24px;
    background: var(--amber);
    border: 0;
    color: #1a1208;
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease;
}
.signup-form button:hover { background: var(--amber-warm); }
.signup-thanks {
    margin-top: 20px;
    font-family: var(--mono);
    font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--amber);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.signup-thanks.show { opacity: 1; }
.signup-mono {
    margin-top: 28px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--ink-faint);
}

/* ─── footer ─── */
footer {
    padding: 36px 40px;
    border-top: 1px solid var(--rule);
    display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 20px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-faint);
}

/* ─── monitoring HUD easter egg ─── */
.hud {
    position: fixed;
    bottom: 22px; left: 22px;
    z-index: 40;
    padding: 10px 14px;
    background: rgba(10, 14, 19, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(200, 80, 58, 0.4);
    border-radius: 2px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-dim);
    display: flex; align-items: center; gap: 10px;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
    max-width: 320px;
}
.hud.show { opacity: 1; transform: translateY(0); }
.hud-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--monitor);
    box-shadow: 0 0 8px var(--monitor);
    animation: pulse-red 1.8s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hud-line1 { color: var(--monitor); font-weight: 500; }
.hud-line2 { color: var(--ink-faint); font-size: 9px; margin-top: 2px; letter-spacing: 0.12em; }
@media (max-width: 700px) { .hud { display: none; } }

/* ─── scroll reveals ─── */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ─── glimpses ─── */
.glimpses {
    background: var(--bg);
    border-top: 1px solid var(--rule);
}
.cabinet-stage {
    margin: 24px auto 80px;
    max-width: 1080px;
    position: relative;
}
.cabinet-stage svg { width: 100%; height: auto; display: block; }
.cabinet-caption {
    display: flex; justify-content: space-between;
    margin-top: 16px;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-faint);
    gap: 20px; flex-wrap: wrap;
}
.cabinet-caption span:nth-child(2) { color: var(--amber); }
.glimpse-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 24px;
}
@media (max-width: 900px) { .glimpse-grid { grid-template-columns: 1fr; gap: 56px; } }
.glimpse {
    position: relative;
    border-top: 1px solid var(--rule-strong);
    padding-top: 24px;
}
.glimpse-meta {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--mono);
    font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 16px;
}
.glimpse-meta .num { color: var(--amber); }
.glimpse-title {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 30px; line-height: 1.1;
    margin: 0 0 16px;
    color: var(--ink);
}
.glimpse-quote {
    font-family: var(--serif);
    font-style: italic; font-weight: 300;
    font-size: 18px; line-height: 1.5;
    color: var(--amber);
    margin: 0 0 14px;
    padding-left: 14px;
    border-left: 1px solid var(--amber);
}
.glimpse-quote-attr {
    font-family: var(--mono);
    font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--ink-faint);
    margin-bottom: 18px;
    padding-left: 14px;
}
.glimpse-body { font-size: 15.5px; line-height: 1.7; color: var(--ink-dim); margin: 0; }
.glimpse-body em { color: var(--ink); }

/* ─── gear animations ─── */
@keyframes gear-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes gear-spin-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.gear { transform-box: fill-box; transform-origin: center; }
.gear-a { animation: gear-spin 18s linear infinite; }
.gear-b { animation: gear-spin-rev 13.5s linear infinite; }
.gear-c { animation: gear-spin 9s linear infinite; }
.gear-d { animation: gear-spin-rev 22s linear infinite; }
.gear-e { animation: gear-spin 11s linear infinite; }
@media (prefers-reduced-motion: reduce) {
    .gear-a, .gear-b, .gear-c, .gear-d, .gear-e { animation: none; }
}

/* ─── tweaks panel ─── */
.twk-fab {
    position: fixed; right: 16px; bottom: 16px; z-index: 1999;
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(20,24,30,.92); border: 1px solid rgba(236,228,211,0.18);
    color: var(--amber); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 20px rgba(0,0,0,.5);
    transition: all .2s ease; font-size: 18px;
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    font-family: var(--mono);
}
.twk-fab:hover { background: rgba(30,35,45,.95); border-color: var(--amber); }
.twk-panel {
    position: fixed; right: 16px; bottom: 70px; z-index: 2000;
    width: 280px; max-height: calc(100vh - 100px);
    display: flex; flex-direction: column;
    background: rgba(250,249,247,.92);
    color: #29261b;
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    backdrop-filter: blur(24px) saturate(160%);
    border: .5px solid rgba(255,255,255,.6);
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(255,255,255,.5) inset, 0 12px 40px rgba(0,0,0,.4);
    font: 11.5px/1.4 ui-sans-serif, system-ui, -apple-system, sans-serif;
    overflow: hidden;
    animation: twk-in .15s ease;
}
@keyframes twk-in {
    from { opacity: 0; transform: translateY(8px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.twk-hd {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 8px 10px 14px; border-bottom: .5px solid rgba(0,0,0,.08);
}
.twk-hd b { font-size: 12px; font-weight: 600; letter-spacing: .01em; }
.twk-x {
    appearance: none; border: 0; background: transparent;
    color: rgba(41,38,27,.55); width: 22px; height: 22px;
    border-radius: 6px; cursor: pointer; font-size: 13px; line-height: 22px;
    text-align: center; display: flex; align-items: center; justify-content: center;
}
.twk-x:hover { background: rgba(0,0,0,.06); color: #29261b; }
.twk-body {
    padding: 8px 14px 14px; display: flex; flex-direction: column; gap: 10px;
    overflow-y: auto; overflow-x: hidden; min-height: 0;
}
.twk-sect {
    font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: rgba(41,38,27,.45); padding-top: 8px; margin-top: 2px;
    border-top: .5px solid rgba(0,0,0,.08);
}
.twk-sect:first-child { border-top: none; padding-top: 0; }
.twk-row { display: flex; flex-direction: column; gap: 4px; }
.twk-row-h { flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
.twk-lbl { display: flex; justify-content: space-between; align-items: baseline; color: rgba(41,38,27,.72); font-weight: 500; }
.twk-slider {
    appearance: none; -webkit-appearance: none; width: 100%; height: 4px;
    border-radius: 999px; background: rgba(0,0,0,.12); outline: none; cursor: pointer;
}
.twk-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; border-radius: 50%; background: #fff;
    border: .5px solid rgba(0,0,0,.12); box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer;
}
.twk-slider::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%;
    background: #fff; border: none; box-shadow: 0 1px 3px rgba(0,0,0,.2); cursor: pointer;
}
.twk-toggle {
    position: relative; width: 32px; height: 18px;
    border: 0; border-radius: 999px;
    background: rgba(0,0,0,.15); transition: background .15s; cursor: pointer; padding: 0;
    flex-shrink: 0;
}
.twk-toggle.on { background: #34c759; }
.twk-toggle i {
    position: absolute; top: 2px; left: 2px; width: 14px; height: 14px;
    border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25);
    transition: transform .15s; display: block; font-style: normal; pointer-events: none;
}
.twk-toggle.on i { transform: translateX(14px); }
.twk-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.twk-chip {
    width: 24px; height: 24px; border-radius: 6px;
    border: 2px solid transparent; cursor: pointer;
    transition: all .12s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.twk-chip:hover { transform: scale(1.1); }
.twk-chip.active { border-color: rgba(0,0,0,.7); box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 2px 8px rgba(0,0,0,.3); }
.twk-val { color: rgba(41,38,27,.5); font-variant-numeric: tabular-nums; }
