/* ============================================================
   renai.bar — styles
   street-style field-guide × tech-tutorial
   muted candlelit Golden-gai love-bar onboarding document
   ============================================================ */

:root {
    --c-asphalt: #1a1715;
    --c-concrete: #2a2522;
    --c-cream: #d8cfc1;
    --c-tape: #a89a86;
    --c-amber: #c87a4a;
    --c-sage: #5b6e6a;
    --c-walnut: #3d2a25;
    --max-w: 640px;
    --rail-w: 56px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--c-asphalt);
    color: var(--c-cream);
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-weight: 400;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
}

::selection {
    background: var(--c-amber);
    color: var(--c-asphalt);
}

/* ---------- grain overlay ---------- */
.grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    opacity: 0.07;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
    background-size: 200px 200px;
}

/* ---------- candle ---------- */
.candle {
    position: fixed;
    right: 28px;
    bottom: 24px;
    z-index: 90;
    pointer-events: none;
    filter: drop-shadow(0 0 6px var(--c-amber)) drop-shadow(0 0 14px rgba(200, 122, 74, 0.4));
    animation: flicker 1.7s infinite ease-in-out;
}

.candle svg {
    overflow: visible;
}

.flame-outer { fill: rgba(200, 122, 74, 0.5); }
.flame-inner { fill: rgba(216, 207, 193, 0.85); }
.flame-core  { fill: #fff7e8; }

@keyframes flicker {
    0%   { transform: scale(1, 1)       translateY(0)     rotate(-1deg);  opacity: 1; }
    8%   { transform: scale(0.96, 1.04) translateY(-0.5px) rotate(0.5deg);  opacity: 0.85; }
    19%  { transform: scale(1.03, 0.98) translateY(0)      rotate(-0.8deg); opacity: 1; }
    33%  { transform: scale(0.98, 1.02) translateY(0.5px)  rotate(1.2deg);  opacity: 0.92; }
    47%  { transform: scale(1.02, 0.99) translateY(0)      rotate(-0.4deg); opacity: 1; }
    61%  { transform: scale(0.95, 1.05) translateY(-0.4px) rotate(0.7deg);  opacity: 0.78; }
    78%  { transform: scale(1.04, 0.97) translateY(0)      rotate(-1.1deg); opacity: 1; }
    92%  { transform: scale(0.99, 1.01) translateY(0.3px)  rotate(0.2deg);  opacity: 0.95; }
    100% { transform: scale(1, 1)       translateY(0)      rotate(-1deg);   opacity: 1; }
}

/* ---------- rail nav (step progress dots) ---------- */
.rail {
    position: fixed;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.rail-dot {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    text-decoration: none;
    color: var(--c-tape);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    position: relative;
    transition: color 0.4s ease;
}

.rail-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(168, 154, 134, 0.35);
    position: absolute;
    transition: all 0.4s ease;
}

.rail-dot span {
    position: absolute;
    left: 28px;
    opacity: 0;
    white-space: nowrap;
    transition: opacity 0.4s ease;
    font-size: 0.62rem;
    color: var(--c-tape);
}

.rail-dot:hover::before,
.rail-dot.active::before {
    background: var(--c-amber);
    width: 10px;
    height: 10px;
    box-shadow: 0 0 8px rgba(200, 122, 74, 0.7);
}

.rail-dot.active span,
.rail-dot:hover span {
    opacity: 1;
}

/* ---------- wordmark ---------- */
.wordmark {
    text-align: center;
    padding: 14vh 1.5rem 6vh;
    position: relative;
    z-index: 5;
}

.wm-prefix,
.wm-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--c-tape);
    letter-spacing: 0.08em;
    display: block;
}

.wm-prefix { opacity: 0.7; }
.wm-sub    { opacity: 0.5; margin-top: 1.6rem; }

.wm-title {
    font-family: 'Big Shoulders Stencil Display', 'Impact', sans-serif;
    font-weight: 900;
    font-size: clamp(4.5rem, 14vw, 9rem);
    letter-spacing: 0.02em;
    line-height: 0.95;
    color: var(--c-cream);
    margin: 0.6rem 0;
    text-shadow: 0 0 22px rgba(200, 122, 74, 0.18);
    animation: kinetic-breathe 6s ease-in-out infinite,
               kinetic-spacing 6s ease-in-out 3s infinite;
}

@keyframes kinetic-breathe {
    0%, 100% { font-variation-settings: 'wght' 300, 'wdth' 75; }
    50%      { font-variation-settings: 'wght' 900, 'wdth' 100; }
}

@keyframes kinetic-spacing {
    0%, 100% { letter-spacing: -0.02em; }
    50%      { letter-spacing: 0.06em; }
}

/* ---------- document layout ---------- */
.document {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem 8rem;
    position: relative;
    z-index: 2;
}

/* ---------- step section ---------- */
.step {
    position: relative;
    padding: 9rem 0 4rem;
    min-height: 92vh;
    isolation: isolate;
}

.step.closing {
    padding-bottom: 14rem;
    min-height: 70vh;
}

.step-inner {
    position: relative;
    z-index: 3;
}

/* ---------- mesh background per-step ---------- */
.mesh {
    position: absolute;
    inset: -10vh -50vw -10vh -50vw;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.mesh-layer {
    position: absolute;
    inset: 0;
    mix-blend-mode: soft-light;
    transition: transform 1.2s ease-out, filter 1.2s ease-out;
    will-change: transform, filter;
    filter: hue-rotate(0deg);
}

.mesh-layer.amber {
    background: radial-gradient(circle at calc(25% + var(--mesh-x, 0%) * 0.1) calc(30% + var(--mesh-y, 0%) * 0.1),
                rgba(200, 122, 74, 0.22),
                transparent 45%);
}

.mesh-layer.sage {
    background: radial-gradient(circle at calc(78% + var(--mesh-x, 0%) * -0.08) calc(70% + var(--mesh-y, 0%) * 0.06),
                rgba(91, 110, 106, 0.18),
                transparent 50%);
}

.mesh-layer.walnut {
    background: radial-gradient(circle at calc(50% + var(--mesh-x, 0%) * 0.04) calc(90% + var(--mesh-y, 0%) * -0.05),
                rgba(61, 42, 37, 0.6),
                transparent 60%);
}

.step.in-view .mesh-layer.amber { filter: hue-rotate(-8deg); }
.step.in-view .mesh-layer.sage  { filter: hue-rotate(8deg); }

/* ---------- step header ---------- */
.step-header {
    margin-bottom: 2.4rem;
}

.step-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--c-tape);
    letter-spacing: 0.12em;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.6rem;
    text-transform: uppercase;
}

.step-tag .rule {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, var(--c-tape), transparent);
    opacity: 0.45;
}

.step-kanji {
    font-family: 'Big Shoulders Stencil Display', 'Impact', sans-serif;
    font-weight: 700;
    font-size: clamp(3.2rem, 9vw, 5.4rem);
    line-height: 0.95;
    color: var(--c-cream);
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
    text-shadow: 0 0 18px rgba(200, 122, 74, 0.15);
    animation: kinetic-breathe 6s ease-in-out infinite,
               kinetic-spacing 6s ease-in-out 3s infinite;
    transition: text-shadow 0.6s ease;
}

.step.in-view .step-kanji {
    text-shadow: 0 0 26px rgba(200, 122, 74, 0.42);
}

.step-en {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--c-amber);
    letter-spacing: 0.04em;
    opacity: 0.85;
}

/* ---------- prose ---------- */
.lede {
    font-family: 'IBM Plex Sans', sans-serif;
    font-size: 1.04rem;
    color: var(--c-cream);
    line-height: 1.75;
    margin-bottom: 1.8rem;
    border-left: 1px solid rgba(168, 154, 134, 0.25);
    padding-left: 1.1rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.1s, transform 1s ease 0.1s;
}

.prose {
    margin-bottom: 1.4rem;
    color: var(--c-cream);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease, transform 1s ease;
}

.step.in-view .lede,
.step.in-view .prose,
.step.in-view .checklist,
.step.in-view .callout,
.step.in-view .pull-quote,
.step.in-view .aside,
.step.in-view .plate {
    opacity: 1;
    transform: translateY(0);
}

.step.in-view .prose:nth-of-type(2) { transition-delay: 0.25s; }
.step.in-view .prose:nth-of-type(3) { transition-delay: 0.4s; }
.step.in-view .prose:nth-of-type(4) { transition-delay: 0.55s; }

.prose code,
.lede code,
.checklist code,
.aside code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84em;
    background: rgba(200, 122, 74, 0.1);
    padding: 0.05em 0.4em;
    border-radius: 2px;
    color: var(--c-amber);
}

em {
    font-style: italic;
    color: var(--c-amber);
    opacity: 0.92;
}

.ja {
    font-family: 'Shippori Mincho', 'Yu Mincho', serif;
    font-weight: 600;
    color: var(--c-cream);
    margin: 0 0.1em;
}

/* ---------- terminal callout ---------- */
.callout {
    background: var(--c-concrete);
    border-left: 2px solid var(--c-amber);
    padding: 1.1rem 1.2rem;
    margin: 1.8rem 0;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.84rem;
    line-height: 1.55;
    color: var(--c-cream);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02), 0 8px 24px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.3s, transform 1s ease 0.3s;
    word-break: break-word;
}

.callout .prompt {
    color: var(--c-sage);
    margin-right: 0.6rem;
    user-select: none;
}

.callout .cmd {
    color: var(--c-cream);
    display: inline;
}

.callout.error {
    border-left-color: #b65a3a;
    background: rgba(42, 37, 34, 0.85);
}

.callout .err {
    display: block;
    color: var(--c-tape);
    font-style: italic;
    margin-top: 0.5rem;
    padding-left: 1rem;
    border-left: 1px dashed rgba(168, 154, 134, 0.3);
    opacity: 0.8;
}

/* ---------- checklist ---------- */
.checklist {
    list-style: none;
    margin: 1.8rem 0;
    border-top: 1px dashed rgba(168, 154, 134, 0.2);
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.4s, transform 1s ease 0.4s;
}

.checklist li {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 0.8rem 1rem;
    padding: 1rem 0;
    border-bottom: 1px dashed rgba(168, 154, 134, 0.2);
    align-items: baseline;
}

.checklist li .ja {
    font-family: 'Shippori Mincho', serif;
    font-size: 1.1rem;
    color: var(--c-sage);
    grid-row: 1 / span 2;
    align-self: center;
    border-right: 1px solid rgba(91, 110, 106, 0.3);
    padding-right: 0.8rem;
}

.checklist li b {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--c-amber);
}

.checklist li i {
    font-style: normal;
    color: var(--c-tape);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* ---------- pull quote (Shippori Mincho) ---------- */
.pull-quote {
    margin: 2.6rem 0;
    padding: 1.4rem 1.2rem 1.4rem 1.6rem;
    border-left: 2px solid var(--c-sage);
    font-family: 'Shippori Mincho', serif;
    font-weight: 600;
    font-size: 1.4rem;
    line-height: 1.6;
    color: var(--c-cream);
    position: relative;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.pull-quote::before {
    content: '「';
    position: absolute;
    left: -0.6rem;
    top: 0.6rem;
    color: var(--c-sage);
    font-size: 1.6rem;
    opacity: 0.55;
}

.pull-quote .ja {
    color: var(--c-cream);
    font-family: 'Shippori Mincho', serif;
}

.pull-quote cite {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: 0.74rem;
    color: var(--c-tape);
    letter-spacing: 0.04em;
    margin-top: 0.8rem;
    font-weight: 400;
}

/* ---------- aside (small stamped notes) ---------- */
.aside {
    margin: 2rem 0;
    padding: 1rem 1.2rem;
    background: rgba(42, 37, 34, 0.5);
    border: 1px dashed rgba(168, 154, 134, 0.2);
    font-size: 0.84rem;
    color: var(--c-tape);
    line-height: 1.6;
    font-style: italic;
    position: relative;
    transform: rotate(-0.4deg);
    opacity: 0;
    transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
}

.step.in-view .aside { transform: rotate(-0.4deg); opacity: 1; }

.stamp {
    display: inline-block;
    font-family: 'JetBrains Mono', monospace;
    font-style: normal;
    font-size: 0.7rem;
    color: var(--c-amber);
    border: 1px solid rgba(200, 122, 74, 0.4);
    padding: 0.1rem 0.5rem;
    margin-right: 0.6rem;
    letter-spacing: 0.06em;
    border-radius: 1px;
    transform: rotate(-1.2deg);
}

/* ---------- photographic plate w/ zoom-focus ---------- */
.plate {
    position: relative;
    margin: 2.8rem 0;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: var(--c-walnut);
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.55),
                inset 0 0 80px rgba(0, 0, 0, 0.6);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 1.2s ease 0.2s, transform 1.2s ease 0.2s;
}

.plate-img {
    position: absolute;
    inset: 0;
    transform-origin: center center;
    transform: scale(var(--zoom, 1));
    clip-path: inset(var(--clip, 0%) round 0);
    filter: contrast(0.92) saturate(0.7) sepia(0.08) brightness(0.95);
    transition: transform 0.8s ease-out, clip-path 0.8s ease-out;
    will-change: transform, clip-path;
}

/* === photograph plates: CSS-painted candlelit scenes === */
.plate-img-01 {
    background:
        radial-gradient(ellipse at 30% 40%, rgba(200,122,74,0.45), transparent 40%),
        radial-gradient(ellipse at 70% 65%, rgba(91,110,106,0.25), transparent 55%),
        radial-gradient(circle at 50% 50%, rgba(61,42,37,0.4), rgba(26,23,21,0.95) 70%),
        linear-gradient(135deg, #2a2522 0%, #1a1715 60%, #3d2a25 100%);
}
.plate-img-01::before {
    content: '';
    position: absolute;
    left: 30%;
    top: 35%;
    width: 30%;
    height: 14%;
    background: radial-gradient(ellipse, rgba(216,207,193,0.18), transparent 70%);
    filter: blur(8px);
}
.plate-img-01::after {
    content: '';
    position: absolute;
    left: 24%;
    top: 50%;
    width: 6px;
    height: 2px;
    background: var(--c-amber);
    box-shadow: 0 0 20px var(--c-amber), 14px 8px 12px rgba(168,154,134,0.4);
    border-radius: 50%;
}

.plate-img-02 {
    background:
        radial-gradient(circle at 50% 70%, rgba(200,122,74,0.6), transparent 30%),
        linear-gradient(0deg, rgba(61,42,37,0.6), transparent 50%),
        repeating-linear-gradient(180deg, rgba(168,154,134,0.04) 0 2px, transparent 2px 6px),
        linear-gradient(180deg, #1a1715 0%, #2a2522 80%, #3d2a25 100%);
}
.plate-img-02::before {
    content: '恋';
    position: absolute;
    left: 50%;
    top: 25%;
    transform: translateX(-50%);
    font-family: 'Shippori Mincho', serif;
    font-size: 5rem;
    font-weight: 800;
    color: rgba(216,207,193,0.18);
    text-shadow: 0 0 18px rgba(200,122,74,0.4);
    letter-spacing: 0;
}
.plate-img-02::after {
    content: '恋';
    position: absolute;
    left: 50%;
    bottom: 8%;
    transform: translateX(-50%) scaleY(-0.7);
    font-family: 'Shippori Mincho', serif;
    font-size: 4rem;
    font-weight: 800;
    color: rgba(200,122,74,0.25);
    filter: blur(2.5px);
}

.plate-img-03 {
    background:
        radial-gradient(circle at 50% 50%, rgba(200,122,74,0.18), transparent 60%),
        repeating-linear-gradient(45deg, rgba(168,154,134,0.05) 0 14px, transparent 14px 28px),
        repeating-linear-gradient(-45deg, rgba(91,110,106,0.04) 0 14px, transparent 14px 28px),
        linear-gradient(160deg, #2a2522 0%, #1a1715 100%);
}
.plate-img-03::before {
    content: '';
    position: absolute;
    inset: 30% 25% 25% 30%;
    background: radial-gradient(ellipse, rgba(61,42,37,0.7), transparent 70%);
    filter: blur(6px);
}
.plate-img-03::after {
    content: '';
    position: absolute;
    left: 38%;
    top: 60%;
    width: 38%;
    height: 8%;
    background: rgba(168,154,134,0.15);
    transform: rotate(-3deg);
    filter: blur(1.5px);
}

.plate-img-04 {
    background:
        radial-gradient(ellipse at 60% 50%, rgba(200,122,74,0.35), transparent 45%),
        radial-gradient(circle at 30% 30%, rgba(216,207,193,0.15), transparent 35%),
        linear-gradient(120deg, #3d2a25 0%, #1a1715 70%, #2a2522 100%);
}
.plate-img-04::before {
    content: '';
    position: absolute;
    left: 38%;
    top: 28%;
    width: 26%;
    height: 50%;
    background: linear-gradient(180deg, rgba(216,207,193,0.18), rgba(200,122,74,0.08));
    border-radius: 4% / 8%;
    box-shadow: 0 0 30px rgba(200,122,74,0.3);
    filter: blur(0.5px);
}
.plate-img-04::after {
    content: '';
    position: absolute;
    left: 42%;
    top: 40%;
    width: 4px;
    height: 28%;
    background: var(--c-cream);
    opacity: 0.6;
    filter: blur(1px);
}

.plate-img-05 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(91,110,106,0.18), transparent 60%),
        linear-gradient(180deg, #1a1715 0%, #2a2522 100%);
}
.plate-img-05::before {
    content: '';
    position: absolute;
    left: 35%;
    top: 20%;
    width: 30%;
    height: 60%;
    background: linear-gradient(180deg, rgba(216,207,193,0.05), rgba(216,207,193,0.18) 30%, rgba(200,122,74,0.12) 80%);
    border-radius: 10% / 6%;
    box-shadow: 0 0 40px rgba(216,207,193,0.08);
}
.plate-img-05::after {
    content: '';
    position: absolute;
    left: 44%;
    top: 32%;
    width: 6%;
    height: 40%;
    background:
        radial-gradient(circle at 50% 0%, rgba(216,207,193,0.85), transparent 60%),
        radial-gradient(circle at 50% 30%, rgba(216,207,193,0.5), transparent 70%),
        radial-gradient(circle at 50% 70%, rgba(216,207,193,0.6), transparent 60%);
    filter: blur(0.6px);
    opacity: 0.7;
}

.plate-img-06 {
    background:
        radial-gradient(circle at 35% 65%, rgba(200,122,74,0.42), transparent 30%),
        radial-gradient(circle at 70% 30%, rgba(168,154,134,0.1), transparent 40%),
        linear-gradient(120deg, #2a2522, #1a1715);
}
.plate-img-06::before {
    content: '';
    position: absolute;
    left: 28%;
    top: 55%;
    width: 18%;
    height: 28%;
    background: radial-gradient(ellipse, rgba(61,42,37,0.8), transparent 70%);
    border-radius: 50%;
    filter: blur(3px);
}
.plate-img-06::after {
    content: '';
    position: absolute;
    left: 36%;
    top: 62%;
    width: 4px;
    height: 4px;
    background: var(--c-amber);
    border-radius: 50%;
    box-shadow:
        0 0 12px var(--c-amber),
        8px 4px 0 -1px rgba(168,154,134,0.6);
}

.plate-img-07 {
    background:
        radial-gradient(ellipse at 50% 55%, rgba(216,207,193,0.18), transparent 45%),
        radial-gradient(circle at 70% 70%, rgba(91,110,106,0.15), transparent 50%),
        linear-gradient(180deg, #1a1715, #2a2522);
}
.plate-img-07::before {
    content: '';
    position: absolute;
    left: 32%;
    top: 28%;
    width: 36%;
    height: 56%;
    background: linear-gradient(180deg, rgba(216,207,193,0.22), rgba(216,207,193,0.08));
    border-radius: 50% / 6%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5), inset 0 0 24px rgba(255,255,255,0.05);
}
.plate-img-07::after {
    content: 'on the house';
    position: absolute;
    left: 50%;
    bottom: 14%;
    transform: translateX(-50%) rotate(-3deg);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--c-tape);
    opacity: 0.7;
    letter-spacing: 0.06em;
}

.plate-img-08 {
    background:
        radial-gradient(ellipse at 50% 50%, rgba(200,122,74,0.18), transparent 60%),
        linear-gradient(170deg, #3d2a25 0%, #2a2522 60%, #1a1715 100%),
        repeating-linear-gradient(90deg, rgba(168,154,134,0.04) 0 2px, transparent 2px 18px);
}
.plate-img-08::before {
    content: '';
    position: absolute;
    left: 35%;
    top: 38%;
    width: 30%;
    height: 24%;
    background: rgba(61,42,37,0.7);
    box-shadow: 0 4px 18px rgba(0,0,0,0.6);
    transform: rotate(-1deg);
}
.plate-img-08::after {
    content: '¥4,300';
    position: absolute;
    left: 40%;
    top: 45%;
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    color: var(--c-cream);
    opacity: 0.55;
    letter-spacing: 0.08em;
}

.plate-img-09 {
    background:
        radial-gradient(circle at 50% 60%, rgba(200,122,74,0.28), transparent 35%),
        radial-gradient(circle at 50% 65%, rgba(216,207,193,0.12), transparent 25%),
        linear-gradient(180deg, #1a1715, #2a2522);
}
.plate-img-09::before {
    content: '';
    position: absolute;
    left: 42%;
    top: 50%;
    width: 16%;
    height: 14%;
    background: radial-gradient(ellipse, rgba(216,207,193,0.25), transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
}
.plate-img-09::after {
    content: '';
    position: absolute;
    left: 48%;
    top: 55%;
    width: 6px;
    height: 6px;
    background: var(--c-amber);
    border-radius: 50%;
    opacity: 0.5;
    box-shadow: 0 0 10px var(--c-amber);
    animation: ember-fade 4s ease-in-out infinite;
}

@keyframes ember-fade {
    0%, 100% { opacity: 0.3; }
    50%      { opacity: 0.7; }
}

/* ---------- masking-tape label ---------- */
.tape {
    position: absolute;
    left: 8%;
    bottom: 7%;
    transform: rotate(var(--rot, -2deg));
    background: var(--c-tape);
    color: var(--c-asphalt);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.4rem 0.9rem;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.45),
        inset 0 0 0 1px rgba(216, 207, 193, 0.15);
    max-width: 78%;
    clip-path: polygon(
        2% 0%, 5% 12%, 12% 4%, 18% 18%, 25% 6%, 33% 14%, 42% 4%, 50% 16%,
        60% 6%, 70% 14%, 80% 4%, 90% 16%, 98% 6%, 100% 100%,
        92% 88%, 84% 100%, 75% 86%, 65% 100%, 55% 88%, 45% 100%, 36% 86%,
        25% 100%, 16% 88%, 8% 100%, 0% 92%
    );
    opacity: 0;
    transform: translateY(-6px) rotate(var(--rot, -2deg));
    transition: opacity 0.9s ease 0.6s, transform 0.9s ease 0.6s;
}

.step.in-view .tape {
    opacity: 1;
    transform: translateY(0) rotate(var(--rot, -2deg));
}

/* ---------- ASCII divider ---------- */
.ascii-divider {
    text-align: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    color: var(--c-sage);
    margin: 3.4rem 0 1.8rem;
    opacity: 0.6;
    letter-spacing: 0.4em;
}

.ascii-divider.end {
    color: var(--c-amber);
    opacity: 0.4;
    margin-top: 4rem;
}

/* ---------- seven flames divider ---------- */
.seven-flames {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 2rem;
    opacity: 0.4;
}

.seven-flames span {
    width: 6px;
    height: 10px;
    background: radial-gradient(ellipse at 50% 90%, var(--c-amber), transparent 70%);
    border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%;
    filter: blur(0.4px);
    animation: micro-flicker 2.3s infinite ease-in-out;
}

.seven-flames span:nth-child(1) { animation-delay: 0.0s; }
.seven-flames span:nth-child(2) { animation-delay: 0.3s; }
.seven-flames span:nth-child(3) { animation-delay: 0.6s; }
.seven-flames span:nth-child(4) { animation-delay: 0.9s; }
.seven-flames span:nth-child(5) { animation-delay: 1.2s; }
.seven-flames span:nth-child(6) { animation-delay: 1.5s; }
.seven-flames span:nth-child(7) { animation-delay: 1.8s; }

@keyframes micro-flicker {
    0%, 100% { transform: scaleY(1) translateY(0); opacity: 0.4; }
    50%      { transform: scaleY(1.18) translateY(-1px); opacity: 0.7; }
}

/* ---------- final whisper ---------- */
.final-whisper {
    text-align: center;
    margin-top: 4rem;
    color: var(--c-tape);
    line-height: 2;
}

.final-whisper .ja {
    font-family: 'Shippori Mincho', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: var(--c-cream);
    opacity: 0.8;
}

.final-whisper .mono {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.72rem;
    color: var(--c-sage);
    letter-spacing: 0.08em;
    opacity: 0.6;
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
    .rail { left: 12px; gap: 10px; }
    .rail-dot span { display: none; }
    .candle { right: 14px; bottom: 14px; }
    .document { padding: 0 1.2rem 6rem; }
    .step { padding: 6rem 0 3rem; min-height: 80vh; }
    .checklist li {
        grid-template-columns: 78px 1fr;
        gap: 0.6rem 0.8rem;
    }
    .pull-quote { font-size: 1.18rem; }
    .step-kanji { font-size: 3rem; }
    .wm-title { font-size: 5rem; }
}

@media (max-width: 480px) {
    body { font-size: 0.9rem; }
    .lede { font-size: 0.98rem; }
    .checklist li {
        grid-template-columns: 1fr;
    }
    .checklist li .ja {
        grid-row: auto;
        border-right: none;
        padding-right: 0;
        font-size: 1rem;
    }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .wm-title,
    .step-kanji,
    .candle,
    .seven-flames span,
    .plate-img-09::after {
        animation: none;
    }
    .plate-img {
        transition: none;
    }
    .lede, .prose, .checklist, .callout, .pull-quote, .aside, .plate, .tape {
        opacity: 1;
        transform: none;
    }
}
