/* maljosim.com — redaction-room reading desk
   Palette (calligrapher's box):
     #1B1612  desk-stain umber  — true page background
     #F2EBDA  kozo paper        — vellum slip
     #E6DCC4  aged margin       — marginalia rails (recessed shelf)
     #3B3127  iron-gall ink     — primary body type (warm black)
     #2A211A  shadow under lamp — lamp pool mid-stop
     #6B5145  brewed walnut     — secondary text, hairline rules, brushstrokes
     #9E2A1F  cinnabar seal     — verification stamp impression
     #C8A55B  brass lamp        — lamp stem, embossed corner stamp
     #7A8A6B  jade scholar      — pass stamp + calm caret

   Typography (Google Fonts):
     Cormorant Garamond  — primary editorial body, italic 300 + 500
     Noto Serif KR       — all 한글 (Korean)
     JetBrains Mono      — line numbers + verification hash only
*/

:root {
    --umber:        #1B1612;
    --shadow:       #2A211A;
    --kozo:         #F2EBDA;
    --margin-bg:    #E6DCC4;
    --iron-gall:    #3B3127;
    --walnut:       #6B5145;
    --cinnabar:     #9E2A1F;
    --brass:        #C8A55B;
    --jade:         #7A8A6B;

    /* Lamp intensity drives radial-gradient stop alpha (0–1) */
    --lamp-intensity: 1;

    --slip-rotate: -2.4deg;
    --sheet-2-rotate: 1.8deg;
    --sheet-3-rotate: -0.6deg;

    --rail-width: 110px;
    --side-rail-width: 96px;
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    min-height: 100svh;
    background: var(--umber);
    color: var(--iron-gall);
    font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    position: relative;
}

/* ===========================
   The desk surface
   =========================== */
.desk {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    width: 100%;
    background:
        radial-gradient(circle at 18% 32%, rgba(60, 46, 36, 0.18) 0%, transparent 42%),
        linear-gradient(180deg, #1B1612 0%, #1B1612 100%);
    /* unify warm tone */
    filter: contrast(1.04) sepia(0.06);
    overflow: hidden;
}

/* Desk leather grain, very subtle */
.desk::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            93deg,
            transparent 0,
            transparent 3px,
            rgba(107, 81, 69, 0.03) 3px,
            rgba(107, 81, 69, 0.03) 4px
        ),
        repeating-linear-gradient(
            172deg,
            transparent 0,
            transparent 5px,
            rgba(60, 46, 36, 0.04) 5px,
            rgba(60, 46, 36, 0.04) 6px
        );
    pointer-events: none;
    z-index: 0;
}

/* The lamp pool: only "lit" zone of the page */
.lamp-pool {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 920px 660px at 22% 38%,
        rgba(242, 235, 218, calc(0.32 * var(--lamp-intensity))) 0%,
        rgba(242, 235, 218, calc(0.16 * var(--lamp-intensity))) 18%,
        rgba(42, 33, 26, 0.0) 60%,
        rgba(27, 22, 18, 0.0) 100%
    );
    pointer-events: none;
    z-index: 1;
    transition: opacity 480ms cubic-bezier(.4, 0, .6, 1);
}

/* ===========================
   Left rail — brass lamp
   =========================== */
.rail {
    position: fixed;
    top: 0;
    height: 100vh;
    height: 100svh;
    width: var(--rail-width);
    z-index: 4;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0 28px;
}

.rail-left {
    left: 0;
    background: linear-gradient(90deg, rgba(11, 8, 6, 0.45) 0%, transparent 100%);
}

.rail-right {
    right: 0;
    background: linear-gradient(270deg, rgba(11, 8, 6, 0.45) 0%, transparent 100%);
    pointer-events: auto;
}

.lamp {
    width: 78px;
    height: auto;
    margin-top: 6px;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.lamp-label, .tray-label, .tray-footnote {
    margin-top: 14px;
    text-align: center;
    line-height: 1.35;
    color: var(--margin-bg);
}

.lamp-label .ko, .tray-label .ko, .tray-footnote .ko {
    display: block;
    font-family: "Noto Serif KR", serif;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.04em;
    color: var(--brass);
}

.lamp-label .en, .tray-label .en, .tray-footnote .en {
    display: block;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: var(--walnut);
    margin-top: 3px;
}

.state-indicator {
    margin-top: auto;
    margin-bottom: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px 6px;
}

.state-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--jade);
    box-shadow: 0 0 12px rgba(122, 138, 107, 0.55);
    transition: background 360ms ease, box-shadow 360ms ease;
}

.state-dot.active {
    background: var(--cinnabar);
    box-shadow: 0 0 16px rgba(158, 42, 31, 0.65);
}

.state-text {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 11px;
    color: var(--margin-bg);
    letter-spacing: 0.05em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    white-space: nowrap;
}

/* ===========================
   Right rail — stamp tray
   =========================== */
.tray-label {
    margin-bottom: 18px;
    margin-top: 6px;
}

.stamp-tray {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 0;
}

.stamp {
    position: relative;
    width: 76px;
    height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: default;
    transition: transform 240ms cubic-bezier(.4, 0, .2, 1);
    transform-origin: center bottom;
}

/* Each stamp leans slightly to convey hand-placement */
.stamp:nth-child(1) { transform: rotate(-2.4deg); }
.stamp:nth-child(2) { transform: rotate(1.6deg); }
.stamp:nth-child(3) { transform: rotate(-1deg); }
.stamp:nth-child(4) { transform: rotate(2.2deg); }
.stamp:nth-child(5) { transform: rotate(-1.8deg); }
.stamp:nth-child(6) { transform: rotate(0.8deg); }

.stamp-handle {
    width: 22px;
    height: 30px;
    border-radius: 6px 6px 4px 4px;
    background:
        linear-gradient(180deg, #6B5145 0%, #3B3127 65%, #2A1B14 100%);
    box-shadow:
        inset 0 1px 0 rgba(200, 165, 91, 0.18),
        0 2px 4px rgba(0, 0, 0, 0.45);
    margin-bottom: 3px;
    position: relative;
}

.stamp-handle::after {
    content: "";
    position: absolute;
    inset: 4px 4px auto 4px;
    height: 1px;
    background: rgba(200, 165, 91, 0.25);
}

.stamp-face {
    width: 38px;
    height: 38px;
    background: rgba(242, 235, 218, 0.04);
    border-radius: 4px;
    padding: 1px;
}

.stamp-name {
    margin-top: 2px;
    font-family: "Noto Serif KR", serif;
    font-weight: 600;
    font-size: 9px;
    letter-spacing: 0.06em;
    color: var(--margin-bg);
    opacity: 0.74;
}

.stamp.lifted {
    transform: translateY(-6px) rotate(0deg) scale(1.02);
}

.stamp.spent {
    opacity: 0.42;
    filter: grayscale(0.4);
}

/* ===========================
   Marginalia rails
   =========================== */
.margin {
    position: fixed;
    top: 0;
    height: 100vh;
    height: 100svh;
    width: var(--side-rail-width);
    background: var(--margin-bg);
    z-index: 2;
    overflow: hidden;
    border-left: 1px solid rgba(60, 46, 36, 0.12);
    border-right: 1px solid rgba(60, 46, 36, 0.12);
    box-shadow:
        inset 0 0 24px rgba(60, 46, 36, 0.10),
        0 0 30px rgba(0, 0, 0, 0.5);
}

.margin-left {
    left: var(--rail-width);
}

.margin-right {
    right: var(--rail-width);
}

/* paper noise on margin rails */
.margin::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.32  0 0 0 0 0.22  0 0 0 0 0.14  0 0 0 0.07 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
    background-size: 240px 240px;
    opacity: 0.55;
    pointer-events: none;
    mix-blend-mode: multiply;
}

/* Individual gloss tile */
.gloss {
    position: absolute;
    width: calc(var(--side-rail-width) - 22px);
    left: 11px;
    padding: 9px 9px 10px;
    background: rgba(242, 235, 218, 0.42);
    color: var(--iron-gall);
    transform: rotate(-0.8deg);
    opacity: 0;
    transition: opacity 540ms ease, transform 540ms ease;
    z-index: 2;
}

.gloss.visible {
    opacity: 1;
}

/* Hand-drawn mitered corners via four lines (using ::before / ::after pairs) */
.gloss::before, .gloss::after,
.gloss > .gloss-corner-tl, .gloss > .gloss-corner-br {
    content: "";
    position: absolute;
    background: var(--walnut);
}
.gloss::before {
    /* top edge */
    top: 0; left: 2px; right: 6px; height: 1px;
    transform: skewX(-1deg);
}
.gloss::after {
    /* bottom edge */
    bottom: 1px; left: 6px; right: 2px; height: 1px;
    transform: skewX(1.2deg);
}
.gloss-corner-tl {
    top: 1px; left: 0; bottom: 5px; width: 1px;
    transform: skewY(-0.6deg);
}
.gloss-corner-br {
    top: 5px; right: 0; bottom: 1px; width: 1px;
    transform: skewY(0.8deg);
}

.gloss-ko {
    font-family: "Noto Serif KR", serif;
    font-weight: 400;
    font-size: 12.5px;
    color: var(--iron-gall);
    line-height: 1.55;
    letter-spacing: -0.005em;
}

.gloss-en {
    margin-top: 5px;
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 12px;
    color: var(--walnut);
    line-height: 1.5;
    letter-spacing: 0.005em;
}

.gloss-cite {
    display: block;
    margin-top: 6px;
    font-family: "JetBrains Mono", monospace;
    font-weight: 400;
    font-size: 9.5px;
    color: var(--walnut);
    opacity: 0.82;
    letter-spacing: 0.02em;
}

/* Right rail glosses lean the other way */
.margin-right .gloss {
    transform: rotate(0.6deg);
}

/* ===========================
   The slip stack
   =========================== */
.slip {
    position: relative;
    z-index: 3;
    margin: 0 auto;
    width: clamp(420px, 56vw, 760px);
    padding: 64px 0 200px;
    transform: rotate(var(--slip-rotate));
    transform-origin: 50% 8%;
}

/* Wordmark */
.wordmark {
    position: absolute;
    top: 18px;
    left: -18px;
    transform: rotate(-3.4deg);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wordmark-ko {
    font-family: "Noto Serif KR", serif;
    font-weight: 600;
    font-size: 22px;
    color: var(--brass);
    letter-spacing: 0.02em;
}

.wordmark-divider {
    display: inline-block;
    width: 14px;
    height: 1px;
    background: var(--walnut);
    opacity: 0.7;
}

.wordmark-en {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: 12.5px;
    color: var(--margin-bg);
    letter-spacing: 0.08em;
    text-transform: lowercase;
}

/* Coffee ring honesty */
.coffee-ring {
    position: absolute;
    top: -42px;
    right: -78px;
    width: 196px;
    height: 196px;
    pointer-events: none;
    z-index: 2;
    transform: rotate(11deg);
}

/* ----- a single sheet ----- */
.sheet {
    position: relative;
    background: var(--kozo);
    color: var(--iron-gall);
    padding: 38px 46px 56px;
    margin-bottom: -22px;
    box-shadow:
        0 1px 0 rgba(60, 46, 36, 0.06),
        0 18px 36px rgba(0, 0, 0, 0.45),
        0 6px 16px rgba(0, 0, 0, 0.35);
    /* deckle right edge via clip-path (fixed imperfection) */
    clip-path: polygon(
        0% 0%,
        99.4% 0.6%,
        99.0% 5%, 99.6% 9%,
        98.8% 14%, 99.5% 19%,
        99.0% 24%, 99.7% 29%,
        98.6% 34%, 99.4% 39%,
        99.0% 44%, 99.6% 49%,
        98.8% 54%, 99.5% 59%,
        99.0% 64%, 99.7% 69%,
        98.6% 74%, 99.4% 79%,
        99.0% 84%, 99.6% 89%,
        98.8% 94%, 99.5% 99%,
        0% 100%
    );
}

/* Subtle paper noise overlay (turbulence at 0.04) */
.sheet::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='320' height='320'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.86' numOctaves='2' seed='9'/><feColorMatrix values='0 0 0 0 0.18  0 0 0 0 0.13  0 0 0 0 0.08  0 0 0 0.06 0'/></filter><rect width='320' height='320' filter='url(%23n)'/></svg>");
    background-size: 320px 320px;
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: 0.7;
}

/* Sheet 1 sits flat at the slip's rotation */
.sheet-1 {
    transform: rotate(0deg);
    z-index: 3;
}

/* Sheet 2 fans +1.8° */
.sheet-2 {
    transform: rotate(var(--sheet-2-rotate));
    z-index: 2;
    margin-top: 32px;
    opacity: 0;
    transition: opacity 540ms ease, transform 540ms cubic-bezier(.3, .8, .3, 1);
    pointer-events: none;
}

.sheet-2.revealed {
    opacity: 1;
    transform: rotate(var(--sheet-2-rotate)) translateY(0);
    pointer-events: auto;
}

/* Sheet 3 fans -0.6° */
.sheet-3 {
    transform: rotate(var(--sheet-3-rotate));
    z-index: 1;
    margin-top: 28px;
    opacity: 0;
    transition: opacity 720ms ease 180ms, transform 720ms cubic-bezier(.3, .8, .3, 1) 180ms;
    pointer-events: none;
}

.sheet-3.revealed {
    opacity: 1;
    pointer-events: auto;
}

/* Sheet header */
.sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(107, 81, 69, 0.32);
}

.sheet-id {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--walnut);
    letter-spacing: 0.06em;
}

.sheet-num {
    color: var(--iron-gall);
    font-weight: 400;
}

.sheet-rule {
    display: inline-block;
    width: 38px;
    height: 1px;
    background: var(--walnut);
    opacity: 0.6;
}

.sheet-meta {
    color: var(--walnut);
    font-style: normal;
    text-transform: lowercase;
}

.corner-stamp {
    width: 44px;
    height: 44px;
    opacity: 0.78;
    transform: rotate(4deg);
}

/* Prompt text */
.sheet-prompt {
    margin-bottom: 22px;
}

.cormorant-italic {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 300;
    color: var(--iron-gall);
    line-height: 1.62;
    letter-spacing: -0.005em;
}

.prompt-line {
    font-size: clamp(18px, 1.4vw + 14px, 22px);
    margin-bottom: 4px;
}

.prompt-line.dim {
    font-family: "Noto Serif KR", serif;
    font-style: normal;
    font-weight: 400;
    color: var(--walnut);
    font-size: clamp(15px, 1vw + 11px, 18px);
}

/* Comment frame */
.comment-frame {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 14px 0 6px;
    border-top: 1px dashed rgba(107, 81, 69, 0.45);
    border-bottom: 1px dashed rgba(107, 81, 69, 0.45);
    position: relative;
}

.line-numbers {
    flex: 0 0 auto;
    width: 34px;
    padding-top: 4px;
    text-align: right;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--walnut);
    line-height: 1.62;
    letter-spacing: 0.02em;
    opacity: 0.7;
    user-select: none;
    border-right: 1px solid rgba(107, 81, 69, 0.18);
    padding-right: 8px;
}

.line-numbers span {
    display: block;
    min-height: calc(1em * 1.62);
}

.comment-body {
    flex: 1 1 auto;
    min-height: 120px;
    padding: 4px 6px;
    outline: none;
    background: transparent;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(18px, 1.4vw + 14px, 22px);
    color: var(--iron-gall);
    line-height: 1.62;
    letter-spacing: -0.005em;
    caret-color: var(--jade);
    cursor: text;
    /* fountain pen nib cursor over editable area */
    cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path d='M 4 20 L 14 8 L 18 4 L 20 6 L 16 10 L 6 22 Z' fill='%233B3127' stroke='%236B5145' stroke-width='0.6'/><line x1='10' y1='14' x2='14' y2='18' stroke='%23F2EBDA' stroke-width='0.6'/></svg>") 4 20, text;
}

.comment-body:empty::before {
    content: attr(data-placeholder);
    color: var(--walnut);
    opacity: 0.55;
    font-style: italic;
}

.comment-body:focus {
    outline: none;
}

/* Sheet footer */
.sheet-foot {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    color: var(--walnut);
    letter-spacing: 0.04em;
}

.hash {
    color: var(--iron-gall);
}

.hash-divider {
    flex: 0 0 auto;
    width: 26px;
    height: 1px;
    background: var(--walnut);
    opacity: 0.5;
}

.ledger {
    font-style: normal;
    text-transform: lowercase;
    letter-spacing: 0.06em;
    opacity: 0.84;
}

/* Deckle bottom edge */
.deckle {
    position: absolute;
    left: 0;
    right: 0;
    width: 100%;
    height: 14px;
    pointer-events: none;
}
.deckle-bottom {
    bottom: -10px;
}

/* Verdict body */
.verdict-body {
    position: relative;
    padding: 8px 0 12px;
}

.verdict-lead {
    font-size: clamp(20px, 1.6vw + 14px, 26px);
    margin-bottom: 8px;
}

.verdict-detail {
    font-family: "Noto Serif KR", serif;
    font-style: normal;
    font-weight: 400;
    font-size: clamp(15px, 1vw + 11px, 18px);
    color: var(--walnut);
    line-height: 1.6;
}

.dim {
    color: var(--walnut);
}

/* The struck stamp impression in the verdict sheet */
.stamp-landing {
    position: absolute;
    top: 0;
    right: 6%;
    width: 180px;
    height: 180px;
    pointer-events: none;
    opacity: 0;
    transform: rotate(-7deg) scale(0.94);
    transition: opacity 280ms ease;
}

.stamp-landing.visible {
    opacity: 1;
}

.stamp-landing svg {
    width: 100%;
    height: 100%;
    /* mix-blend so cinnabar "soaks" into paper */
    mix-blend-mode: multiply;
}

/* Reflection sheet body */
.reflection-body {
    padding: 22px 6px 8px;
    border-top: 1px solid rgba(107, 81, 69, 0.22);
}

.reflection-body p {
    font-family: "Cormorant Garamond", serif;
    font-style: italic;
    font-weight: 300;
    font-size: clamp(18px, 1.3vw + 14px, 22px);
    line-height: 1.62;
    letter-spacing: -0.005em;
    color: var(--iron-gall);
    margin-bottom: 10px;
}

.reflection-ko {
    font-family: "Noto Serif KR", serif !important;
    font-style: normal !important;
    font-weight: 400;
    color: var(--walnut) !important;
    font-size: clamp(15px, 1vw + 11px, 18px) !important;
}

/* ===========================
   Inkbrush connectors layer
   =========================== */
.connectors {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.connectors path {
    fill: none;
    stroke: var(--walnut);
    stroke-width: 1;
    stroke-linecap: round;
    stroke-dasharray: 0 1000;
    filter: url(#ink-soften);
}

.connectors path.drawing {
    animation: brush-draw 540ms ease-out forwards;
}

@keyframes brush-draw {
    from { stroke-dasharray: 0 1000; opacity: 0.2; }
    to   { stroke-dasharray: 1000 0; opacity: 0.78; }
}

/* ===========================
   Stamp flier (stamp animating from tray to slip)
   =========================== */
.stamp-flier {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 6;
}

.stamp-flier .flying-stamp {
    position: absolute;
    width: 120px;
    height: 120px;
    opacity: 0;
    transform: translate(0, 0) scale(0.5) rotate(-12deg);
    will-change: transform, opacity;
    mix-blend-mode: multiply;
}

.stamp-flier .flying-stamp.fired {
    animation: stamp-fall 480ms cubic-bezier(.7, -0.4, .3, 1.6) forwards;
}

@keyframes stamp-fall {
    0%   { opacity: 0;  transform: translate(var(--tx-from), var(--ty-from)) scale(0.5) rotate(-14deg); }
    35%  { opacity: 1;  transform: translate(var(--tx-mid),  var(--ty-mid))  scale(1.12) rotate(-2deg); }
    62%  { opacity: 1;  transform: translate(var(--tx-to),   var(--ty-to))   scale(1.04) rotate(-7deg); }
    78%  { opacity: 1;  transform: translate(var(--tx-to),   var(--ty-to))   scale(1.0)  rotate(-7deg); }
    100% { opacity: 1;  transform: translate(var(--tx-to),   var(--ty-to))   scale(1.0)  rotate(-7deg); }
}

/* ===========================
   Stamp impression SVG (used in flier and sheet)
   =========================== */
.impression {
    width: 120px;
    height: 120px;
}

.impression .border {
    fill: none;
    stroke-width: 4;
    stroke-linejoin: miter;
    stroke-linecap: square;
}

.impression .glyph {
    font-family: "Noto Serif KR", serif;
    font-weight: 600;
    font-size: 56px;
    text-anchor: middle;
}

/* Pigment variants */
.impression.cinnabar .border,
.impression.cinnabar .glyph { stroke: var(--cinnabar); fill: var(--cinnabar); }
.impression.jade .border,
.impression.jade .glyph     { stroke: var(--jade);     fill: var(--jade); }
.impression.iron-gall .border,
.impression.iron-gall .glyph { stroke: var(--iron-gall); fill: var(--iron-gall); }

.impression .border { fill: none !important; }

/* Missed-ink mask (subtractive patches) */
.impression .miss {
    fill: var(--kozo);
    opacity: 0.34;
}

/* ===========================
   Page-level safety: small viewports
   =========================== */
@media (max-width: 1180px) {
    :root { --rail-width: 84px; --side-rail-width: 72px; }
    .slip { width: clamp(380px, 64vw, 680px); }
    .stamp { width: 64px; height: 76px; }
    .stamp-face { width: 30px; height: 30px; }
    .lamp { width: 64px; }
}

@media (max-width: 880px) {
    :root { --rail-width: 70px; --side-rail-width: 56px; }
    .slip {
        width: clamp(320px, 78vw, 560px);
        padding: 48px 0 160px;
    }
    .sheet { padding: 28px 24px 44px; }
    .gloss { font-size: 11px; }
    .gloss-ko { font-size: 11px; }
    .gloss-en { font-size: 10.5px; }
    .stamp { width: 50px; height: 64px; }
    .stamp-face { width: 26px; height: 26px; }
    .stamp-handle { width: 18px; height: 24px; }
    .stamp-name { display: none; }
    .lamp-label .en, .tray-label .en, .tray-footnote .en { display: none; }
    .coffee-ring { right: -42px; width: 140px; height: 140px; }
    .wordmark-en { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .stamp-flier .flying-stamp.fired {
        animation-duration: 1ms;
    }
    .connectors path.drawing {
        animation-duration: 1ms;
    }
    .sheet-2, .sheet-3 {
        transition: opacity 200ms ease;
    }
    .lamp-pool {
        transition: none;
    }
}
