body {
    background-color: #5f7161;
    color: #1a1a1a;
    font-family: "Times New Roman", Times, serif;
    margin: 0;
    padding: 20px 0;
}

a:link { color: #003366; }
a:visited { color: #4a2060; }
a:hover { color: #cc0000; text-decoration: underline; }

.page-wrapper {
    width: 780px;
    margin: 0 auto;
    background-color: #d2c6a5;
    border-left: 3px solid #e8dcc4;
    border-top: 3px solid #e8dcc4;
    border-right: 3px solid #8a7e65;
    border-bottom: 3px solid #8a7e65;
    box-shadow: 0 4px 0px #3a3a3a;
}

/* --- Header --- */

.header-banner {
    background-color: #2c3e50;
    color: #f0c040;
    text-align: center;
    padding: 14px 10px;
    border-bottom: 3px solid #1a2530;
}

.header-banner h1 {
    font-family: "Courier New", Courier, monospace;
    font-size: 26px;
    margin: 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.header-banner p {
    font-size: 13px;
    margin: 4px 0 0 0;
    color: #a0b8c0;
    font-style: italic;
    letter-spacing: 1px;
}

/* --- Nav --- */

.nav-bar {
    background-color: #3d5060;
    text-align: center;
    padding: 6px 0;
    border-bottom: 2px solid #1a2530;
    font-size: 13px;
    font-weight: bold;
    font-family: "Courier New", Courier, monospace;
}

.nav-bar a {
    color: #e0d8c0;
    text-decoration: none;
    padding: 0 8px;
}

.nav-bar a:hover { color: #f0c040; }

.nav-bar .sep { color: #607080; }

/* --- Content --- */

.content {
    padding: 20px 28px;
    font-size: 14px;
    line-height: 1.6;
}

.content h2 {
    font-family: "Courier New", Courier, monospace;
    color: #2c3e50;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 3px double #2c3e50;
    padding-bottom: 4px;
    margin-top: 28px;
}

.content h3 {
    color: #5a3010;
    font-size: 16px;
    margin-top: 20px;
}

hr {
    border: none;
    border-top: 1px solid #8a7e65;
    border-bottom: 1px solid #e8dcc4;
    margin: 16px 0;
}

/* --- Boxes --- */

.bevel-box {
    background-color: #c4b898;
    border-top: 2px solid #e8dcc4;
    border-left: 2px solid #e8dcc4;
    border-bottom: 2px solid #8a7e65;
    border-right: 2px solid #8a7e65;
    padding: 12px;
    margin: 12px 0;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
}

.sunken-box {
    background-color: #f5f0e0;
    border-top: 2px solid #8a7e65;
    border-left: 2px solid #8a7e65;
    border-bottom: 2px solid #e8dcc4;
    border-right: 2px solid #e8dcc4;
    padding: 12px;
    margin: 12px 0;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
}

/* --- Intro Section --- */

.intro-box {
    background-color: #f5f0e0;
    border: 2px solid #8a7e65;
    padding: 16px 20px;
    margin: 16px 0;
    position: relative;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
}

details.intro-box > summary {
    cursor: pointer;
    list-style: none;
    background-color: #2c3e50;
    color: #f0c040;
    font-family: "Courier New", Courier, monospace;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-top: 2px solid #4a6070;
    border-left: 2px solid #4a6070;
    border-bottom: 2px solid #0a1520;
    border-right: 2px solid #0a1520;
}

details.intro-box > summary::-webkit-details-marker {
    display: none;
}

details.intro-box > summary:hover {
    background-color: #3d5a70;
}

details.intro-box > summary:active {
    border-top: 2px solid #0a1520;
    border-left: 2px solid #0a1520;
    border-bottom: 2px solid #4a6070;
    border-right: 2px solid #4a6070;
}

details.intro-box[open] > summary b::before {
    content: "\25BC  ";
}

details.intro-box:not([open]) > summary b::before {
    content: "\25B6  ";
}

details.intro-box:not([open]) {
    background-color: transparent;
    border: none;
    padding: 0;
}

details.intro-box:not([open]) > summary {
    display: inline-block;
}

/* --- Letter --- */

.letter {
    background-color: #fffff0;
    border: 1px solid #c0b890;
    padding: 24px 30px;
    margin: 16px auto;
    max-width: 560px;
    font-family: "Georgia", "Times New Roman", serif;
    font-size: 14px;
    line-height: 1.7;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transform: rotate(-0.5deg);
}

.letter .salutation {
    font-style: italic;
    margin-bottom: 12px;
}

.letter .closing {
    margin-top: 16px;
    text-align: right;
    font-style: italic;
}

/* --- Case intro: sealed letter → Open Case → evidence --- */
/* US-style #10 envelope front: return top-left, stamp top-right, address centered */

.case-letter {
    position: relative;
    overflow: visible;
}

/* Letter + Open Case row: floor matches sealed letter + button slot so height stays stable */
.case-intro-stack {
    --case-sealed-letter-min: 280px;
    min-height: calc(var(--case-sealed-letter-min) + 18px + 64px + 8px);
}

/* No outer card while sealed — only .letter-sealed-rip layers show the envelope */
.letter.case-letter.is-sealed {
    min-height: var(--case-sealed-letter-min, 280px);
    background: transparent;
    border: none;
    box-shadow: none;
    transform: rotate(-0.45deg);
}

.letter-content {
    transform-origin: center center;
}

/* Hidden until envelope is gone (avoids flash between split end and reveal) */
.case-letter:not(.letter-cover-done) .letter-content {
    opacity: 0;
    transform: scale(0.88);
    user-select: none;
    pointer-events: none;
}

.case-letter.letter-cover-done .letter-content {
    opacity: 1;
    pointer-events: auto;
    user-select: auto;
    animation: letterRevealPop 0.52s cubic-bezier(0.34, 1.25, 0.32, 1) both;
}

@keyframes letterRevealPop {
    0% {
        opacity: 0;
        transform: scale(0.88);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/*
 * Envelope: gradient lives on two full-size .letter-sealed-rip layers (same paint, clip-path split).
 * Transforms move printed paper + ink together — not a static bg with sliding text.
 */
.letter-sealed-cover {
    --tear-x: 11%;
    position: absolute;
    inset: 0;
    margin: 0;
    padding: 0;
    border: none;
    cursor: pointer;
    font: inherit;
    display: block;
    text-align: left;
    background: transparent;
    overflow: visible;
    z-index: 2;
}

.letter-sealed-cover.letter-sealed-cover--gone {
    display: none !important;
}

.case-letter.is-sealed:not(.is-splitting) .letter-sealed-cover {
    animation: sealedEnvelopePulse 2.8s ease-in-out infinite;
}

@keyframes sealedEnvelopePulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.02); }
}

.letter-sealed-rip {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    pointer-events: none;
    background-image: linear-gradient(175deg, #f2ead8 0%, #e6dcc8 55%, #ddd2bc 100%);
    background-size: 100% 100%;
    opacity: 1;
    will-change: transform, opacity;
}

/*
 * Flap seam: duplicate on strip + body so each half is clip-path’d and moves with its rip
 * (same geometry — reads as one line across the tear).
 */
.letter-sealed-rip .letter-sealed-top-seam {
    position: absolute;
    top: 12px;
    left: 5.5%;
    right: 5.5%;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid rgba(88, 76, 58, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
    z-index: 3;
    pointer-events: none;
}

/* Left strip: full height so clips tile the cover with no gap */
.letter-sealed-rip--strip {
    z-index: 2;
    clip-path: polygon(0 0, var(--tear-x) 0, var(--tear-x) 100%, 0 100%);
    transform-origin: var(--tear-x) 50%;
}

.letter-sealed-rip--body {
    z-index: 1;
    clip-path: polygon(var(--tear-x) 0, 100% 0, 100% 100%, var(--tear-x) 100%);
    transform-origin: var(--tear-x) 50%;
}

.case-letter.is-splitting .letter-sealed-rip--strip {
    animation: sealedTearStripOff 0.82s cubic-bezier(0.36, 0, 0.2, 1) forwards;
}

.case-letter.is-splitting .letter-sealed-rip--body {
    animation: sealedMainPanelOff 0.82s cubic-bezier(0.36, 0, 0.2, 1) forwards;
}

/* Vertical rip: jolt at seam, then both chunks peel off-card (vw) so it reads as real tear */
@keyframes sealedTearStripOff {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    7% {
        transform: translate3d(0, 6px, 0) rotate(2.5deg);
        opacity: 1;
    }
    14% {
        transform: translate3d(0, -7px, 0) rotate(-2.5deg);
        opacity: 1;
    }
    22% {
        transform: translate3d(0, 3px, 0) rotate(1.2deg);
        opacity: 1;
    }
    40% {
        transform: translate3d(-18vw, 0, 0) rotate(-7deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(-105vw, -14px, 0) rotate(-17deg);
        opacity: 0;
    }
}

@keyframes sealedMainPanelOff {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 1;
    }
    7% {
        transform: translate3d(0, -5px, 0) rotate(-1.8deg);
        opacity: 1;
    }
    14% {
        transform: translate3d(0, 6px, 0) rotate(2deg);
        opacity: 1;
    }
    22% {
        transform: translate3d(0, -3px, 0) rotate(-1deg);
        opacity: 1;
    }
    40% {
        transform: translate3d(14vw, 4px, 0) rotate(5deg);
        opacity: 1;
    }
    100% {
        transform: translate3d(105vw, 12px, 0) rotate(11deg);
        opacity: 0;
    }
}

.letter-sealed-half-inner {
    position: relative;
    z-index: 1;
    display: block;
    height: 100%;
    box-sizing: border-box;
}

.letter-sealed-half-inner--main {
    display: flex;
    flex-direction: column;
    padding: 14px 22px 18px;
    min-height: 100%;
}

.letter-sealed-main-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: min-content;
}

/*
 * Opened: outer chrome uses the same timing as .letter-content letterRevealPop
 * so the border/paper do not pop in before the note text animates.
 */
.letter.case-letter.letter-cover-done {
    min-height: var(--case-sealed-letter-min, 280px);
    animation: letterChromeReveal 0.52s cubic-bezier(0.34, 1.25, 0.32, 1) both;
}

@keyframes letterChromeReveal {
    0% {
        background-color: transparent;
        border-color: transparent;
        box-shadow: none;
        transform: rotate(-0.45deg);
    }
    100% {
        background-color: #fffff0;
        border-color: #c0b890;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
        transform: rotate(-0.5deg);
    }
}

/* Return / routing — inset past tear so clip-path on .rip--body does not cut glyphs */
.letter-sealed-return {
    position: relative;
    z-index: 3;
    display: block;
    box-sizing: border-box;
    margin-top: 10px;
    padding: 6px 8px 4px 0;
    padding-left: calc(var(--tear-x) + 12px);
    max-width: calc(100% - 72px);
}

.letter-sealed-return-line {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 9px;
    line-height: 1.35;
    color: #4a4034;
    letter-spacing: 0.04em;
}

/* Postage — upper right corner */
.letter-sealed-stamp {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 4;
    width: 50px;
    padding: 5px 4px 6px;
    background: linear-gradient(155deg, #faf8f4, #e8e4dc);
    border: 2px solid #1a3a5c;
    color: #1a3a5c;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.letter-sealed-stamp-denom {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.letter-sealed-stamp-label {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 6px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-top: 2px;
}

/* Delivery address — centered in main panel */
.letter-sealed-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    max-width: 100%;
}

.letter-sealed-address {
    display: block;
    flex-shrink: 0;
    margin: 0 auto;
    max-width: 300px;
    text-align: left;
    padding: 14px 18px 16px;
    background: rgba(255, 252, 248, 0.85);
    border: 1px solid rgba(90, 80, 64, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.letter-sealed-address-line {
    display: block;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    line-height: 1.45;
    color: #222018;
    letter-spacing: 0.05em;
}

.letter-sealed-address-line--primary {
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 10px;
    margin-bottom: 3px;
}

.open-case-wrap {
    text-align: center;
    margin: 18px auto 8px;
    max-width: 560px;
    /* Reserve slot for .cert-button + its margin so layout does not jump when revealed */
    min-height: 64px;
    box-sizing: border-box;
    opacity: 0;
    transform: translateY(14px);
    transition:
        opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.open-case-wrap.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* After Open Case: keep the row’s space so the stack height does not drop */
.open-case-wrap.open-case-wrap--spent {
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
}

/* Keep row in document flow while [hidden] (UA uses display:none) — no height jump on reveal */
.open-case-wrap[hidden] {
    display: block !important;
    visibility: hidden;
    pointer-events: none;
}

.case-evidence-bundle {
    overflow: hidden;
}

.case-evidence-bundle[hidden] {
    display: none !important;
}

.case-evidence-bundle.is-revealing {
    display: block !important;
}

.case-evidence-bundle.is-revealing .case-evidence-inner > * {
    animation: casePieceIn 0.52s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(1) { animation-delay: 0.05s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(2) { animation-delay: 0.1s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(3) { animation-delay: 0.15s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(4) { animation-delay: 0.2s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(5) { animation-delay: 0.25s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(6) { animation-delay: 0.3s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(7) { animation-delay: 0.35s; }
.case-evidence-bundle.is-revealing .case-evidence-inner > *:nth-child(8) { animation-delay: 0.4s; }

@keyframes casePieceIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Evidence --- */

.evidence-board {
    background-color: #6b4226;
    border: 4px solid #4a2e18;
    padding: 20px;
    margin: 16px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.evidence-item {
    background-color: #f5f5f0;
    border: 3px solid #e0d8c0;
    padding: 8px;
    text-align: center;
    transform: rotate(-1deg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    max-width: 220px;
}

.evidence-item:nth-child(even) {
    transform: rotate(1.5deg);
}

.evidence-item .photo-placeholder {
    width: 180px;
    height: 140px;
    background-color: #d0d0c8;
    border: 2px inset #b0b0a8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #808080;
    font-style: italic;
    margin: 0 auto 6px auto;
}

.evidence-item .caption {
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #333;
    margin: 4px 0 0 0;
    font-weight: bold;
}

.evidence-item .detail {
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #666;
    margin: 2px 0 0 0;
}

.pushpin {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle at 4px 4px, #ff4444, #aa0000);
    border-radius: 50%;
    border: 1px solid #880000;
    margin-bottom: 4px;
}

/* --- Data Tables --- */

.table-container {
    margin: 12px 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border: 2px outset #c4b898;
    border-collapse: collapse;
    background-color: #fffff8;
    font-family: "Courier New", Courier, monospace;
    font-size: 13px;
}

.data-table th {
    background-color: #2c3e50;
    color: #f0c040;
    font-family: "Courier New", monospace;
    font-weight: bold;
    text-align: left;
    padding: 6px 10px;
    border: 1px solid #1a2530;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    font-size: 12px;
}

.data-table th:hover {
    background-color: #3d5a70;
}

.data-table th .sort-arrow {
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

.data-table th .sort-arrow.active {
    opacity: 1;
}

.data-table td {
    border: 1px solid #c4b898;
    padding: 4px 10px;
}

.data-table tr:nth-child(even) {
    background-color: #f0ead8;
}

.data-table tr:hover td {
    background-color: #e0d8b8;
}

.data-table tbody tr {
    cursor: pointer;
}

.data-table tbody tr.highlighted td {
    background-color: #f0c040;
    color: #1a1a1a;
    font-weight: bold;
}

.filter-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 2px 4px;
    font-size: 11px;
    font-family: "Courier New", monospace;
    border: 1px inset #c0b890;
    background-color: #fffff0;
}

/* --- Floor Plan --- */

.floor-plan {
    margin: 16px auto;
    max-width: 600px;
}

.floor-plan-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    margin: 8px 0;
}

.cubicle {
    background-color: #f5f0e0;
    border: 2px outset #c4b898;
    padding: 10px 6px;
    text-align: center;
    font-family: "Courier New", monospace;
    font-size: 12px;
    min-height: 45px;
}

.cubicle .cubicle-id {
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}

.cubicle .cubicle-desk {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.hallway {
    grid-column: 1 / -1;
    background-color: #b0a888;
    border-top: 2px solid #8a7e65;
    border-bottom: 2px solid #8a7e65;
    text-align: center;
    padding: 4px;
    font-family: "Courier New", monospace;
    font-size: 11px;
    color: #5a5040;
    letter-spacing: 4px;
    text-transform: uppercase;
}

/* --- Certificate --- */

.certificate {
    background-color: #fffff0;
    border: 4px double #8a7e65;
    padding: 24px 30px;
    margin: 20px auto;
    max-width: 520px;
    text-align: center;
}

.certificate h3 {
    font-family: "Georgia", serif;
    font-size: 22px;
    color: #2c3e50;
    margin: 0 0 4px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.certificate .subtitle {
    font-size: 12px;
    color: #8a7e65;
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.certificate .cert-line {
    font-size: 13px;
    margin: 8px 0;
}

.certificate input[type="text"] {
    font-family: "Georgia", serif;
    font-size: 18px;
    text-align: center;
    border: none;
    border-bottom: 2px solid #2c3e50;
    background: transparent;
    padding: 4px 8px;
    width: 300px;
    outline: none;
    color: #1a1a1a;
}

.certificate input[type="text"]:focus {
    border-bottom-color: #f0c040;
}

.cert-button {
    font-family: "Courier New", monospace;
    font-size: 14px;
    font-weight: bold;
    background-color: #2c3e50;
    color: #f0c040;
    border-top: 2px solid #4a6070;
    border-left: 2px solid #4a6070;
    border-bottom: 2px solid #0a1520;
    border-right: 2px solid #0a1520;
    padding: 8px 24px;
    cursor: pointer;
    letter-spacing: 1px;
    margin-top: 12px;
}

.cert-button:hover {
    background-color: #3d5a70;
}

.cert-button:active {
    border-top: 2px solid #0a1520;
    border-left: 2px solid #0a1520;
    border-bottom: 2px solid #4a6070;
    border-right: 2px solid #4a6070;
}

/* --- Result Messages --- */

.result-message {
    margin-top: 16px;
    padding: 12px;
    font-family: "Courier New", monospace;
    font-size: 14px;
    display: none;
}

.result-message.correct {
    background-color: #d4edda;
    border: 2px solid #5a9a68;
    color: #1a5028;
    display: block;
}

/* --- Certificate Mailing Animation --- */

#certificate-area.anim-active {
    position: relative;
    overflow: hidden;
}

.cert-envelope-stage {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cert-envelope {
    width: 200px;
    height: 130px;
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cert-envelope.visible {
    opacity: 1;
    transform: scale(1);
}

.cert-envelope.fly-away {
    animation: envelopeFly 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cert-envelope-body {
    width: 200px;
    height: 120px;
    background: #f5f0e0;
    border: 2px solid #8a7e65;
    border-radius: 0 0 4px 4px;
    position: relative;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.cert-envelope-flap {
    width: 0;
    height: 0;
    border-left: 102px solid transparent;
    border-right: 102px solid transparent;
    border-top: 65px solid #e8dcc4;
    position: absolute;
    top: 0;
    left: -2px;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.1));
}

.cert-envelope-flap::after {
    content: '';
    position: absolute;
    top: -67px;
    left: -102px;
    width: 0;
    height: 0;
    border-left: 102px solid transparent;
    border-right: 102px solid transparent;
    border-top: 65px solid #d9c99a;
}

.cert-envelope-seal {
    position: absolute;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 24px;
    z-index: 2;
    opacity: 0.8;
}

.cert-envelope-label {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-family: "Courier New", monospace;
    font-size: 9px;
    color: #8a7e65;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
}

@keyframes envelopeFly {
    0% { transform: scale(1) translateY(0) rotate(0deg); opacity: 1; }
    30% { transform: scale(1.08) translateY(8px) rotate(-1deg); opacity: 1; }
    100% { transform: scale(0.3) translateY(-400px) rotate(-8deg); opacity: 0; }
}

.cert-anticipation {
    margin-top: 18px;
    font-family: "Courier New", monospace;
    font-size: 13px;
    color: #5a5040;
    letter-spacing: 1px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cert-anticipation.visible {
    opacity: 1;
}

.result-message.cert-delivered {
    animation: deliverDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes deliverDrop {
    0% { transform: translateY(-30px) scale(0.95); opacity: 0; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

#next-case.cert-delivered {
    animation: deliverDrop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.result-message.incorrect {
    background-color: #f8d7da;
    border: 2px solid #c07080;
    color: #721c24;
    display: block;
}

/* --- Stamp --- */

.stamp {
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 11px;
    color: #cc0000;
    border: 3px solid #cc0000;
    padding: 4px 12px;
    display: inline-block;
    transform: rotate(-5deg);
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.7;
}

.result-message .stamp {
    opacity: 0;
    animation: stampSlam 0.35s cubic-bezier(0.2, 0, 0.2, 1) 1s both;
}

.result-message.correct .stamp {
    color: #2a7a30;
    border-color: #2a7a30;
}

.result-message .shame-stamp {
    color: #cc0000;
    border-color: #cc0000;
}

@keyframes stampSlam {
    0% {
        transform: scale(2.5) rotate(8deg);
        opacity: 0;
    }
    50% {
        transform: scale(0.92) rotate(-6deg);
        opacity: 0.85;
    }
    100% {
        transform: scale(1) rotate(-5deg);
        opacity: 0.7;
    }
}

/* --- Footer --- */

.footer {
    background-color: #2c3e50;
    text-align: center;
    padding: 10px;
    font-size: 11px;
    color: #a0b0b8;
    border-top: 2px solid #1a2530;
    font-family: "Courier New", monospace;
}

.footer a { color: #f0c040; }

/* --- Section Dividers --- */

.section-label {
    background-color: #2c3e50;
    color: #f0c040;
    font-family: "Courier New", Courier, monospace;
    font-size: 11px;
    font-weight: bold;
    padding: 3px 12px;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.folder {
    margin: 16px 0;
}

.file-tab {
    background-color: #d9c99a;
    border-top: 2px solid #e8dcc4;
    border-left: 2px solid #e8dcc4;
    border-right: 2px solid #a09070;
    border-bottom: none;
    padding: 5px 18px;
    font-family: "Courier New", monospace;
    font-size: 12px;
    font-weight: bold;
    color: #2c3e50;
    display: inline-block;
    position: relative;
    top: 2px;
    z-index: 1;
    border-radius: 4px 4px 0 0;
}

.folder-body {
    background-color: #d9c99a;
    border: 2px solid #a09070;
    border-top: 2px solid #e8dcc4;
    border-left: 2px solid #e8dcc4;
    padding: 12px;
    position: relative;
}

.folder-body .table-container {
    margin: 0;
}

/* --- Evidence Photo --- */

.evidence-item .photo {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border: 2px inset #b0b0a8;
    display: block;
    margin: 0 auto 6px auto;
    cursor: pointer;
}

/* --- Lightbox --- */

.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid #e8dcc4;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
