/* =========================================================
   The Biotech Social Contract — Visual Identity (Light Theme)
   Matches Image 1: Warm ivory/cream desk, NPLB brand header,
   white HUD monitor, Sage-Green Affordability (terracotta accents),
   Slate-Blue Blueprint Investment (navy/gold accents),
   Deep Navy "Enact Policies" button, and slate-grey shredder.
   ========================================================= */

:root {
    /* Desk background - warm light ivory / cream */
    --desk-bg: #f9f5ee;
    --desk-center: #fdfbf7;
    --desk-edge: #ede5d5;
    --ink: #1e293b;
    --ink-muted: #64748b;

    /* Primary Navy */
    --navy: #153765;
    --navy-light: #204c86;
    --navy-dark: #0e274b;

    /* Patient Affordability (Sage Green + Terracotta) */
    --aff-bg: #b5cca9;
    --aff-border: #99b38d;
    --aff-title: #1c321b;
    --aff-badge-bg: #e3ece0;
    --aff-badge-border: #859f79;
    --aff-terracotta: #cf7560;
    --aff-terracotta-dark: #b85f4b;

    /* Biotech Investment (Slate Blueprint Blue + Navy/Gold) */
    --inv-bg: #3d6594;
    --inv-border: #2e5178;
    --inv-title: #0f243c;
    --inv-badge-bg: #d2e2f2;
    --inv-badge-border: #8ea7c3;
    --inv-footer: #152c4a;
    --inv-footer-gold: #e8c665;
    --inv-card-head: #265596;

    /* Center Docket & Tray */
    --tray-bg: #c3dcbc;
    --tray-border: #a4c49c;

    /* Shredder */
    --shredder-bg: #576d80;
    --shredder-dark: #455767;
    --shredder-slot: #172129;

    /* Hearts */
    --heart-active: #df6262;
    --heart-lost: #3c3232;

    /* Typography */
    --radius: 20px;
    --font-h: 'DM Serif Display', Georgia, serif;
    --font-sans: 'Nunito', system-ui, sans-serif;
    --font-b: 'Inter', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font-b);
    color: var(--ink);
    background: radial-gradient(ellipse 95% 85% at 50% 35%, var(--desk-center), var(--desk-bg) 65%, var(--desk-edge));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* subtle warm paper/desk grain */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .04;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    z-index: 0;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); border: 0;
}

/* ================= LAYOUT ================= */
.game {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1520px;
    margin: 0 auto;
    padding: 0 28px 8px;
    display: grid;
    grid-template-columns: minmax(270px, 1fr) minmax(300px, 1.05fr) minmax(270px, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "top top top"
        "aff center inv"
        "lives trash credits";
    gap: 18px 34px;
}

@media (min-width: 900px) and (min-height: 520px) {
    body { height: 100vh; height: 100dvh; overflow: hidden; }
    .game { min-height: 0; }
}

/* ================= TOP BAR ================= */
.g-top {
    grid-area: top;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

/* NPLB Brand Header on Top-Left */
.brand-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 14px;
    flex: 0 1 300px;
    min-width: 0;
}

.nplb-link {
    display: inline-block;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.nplb-link:hover {
    transform: scale(1.03);
    opacity: 0.95;
}

.game-brand-title {
    font-family: var(--font-sans);
    font-size: 13.5px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.01em;
    line-height: 1.2;
    margin-top: -2px;
}

.nplb-logo-img {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(16, 59, 112, 0.08));
}



/* Sleek White Monitor HUD */
.monitor {
    flex: 0 1 820px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.monitor-screen {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 14px 26px 12px;
    background: #ffffff;
    border: 2px solid #2b323c;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, .07), 0 2px 6px rgba(0, 0, 0, .04);
}



.hud-stat {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hud-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}

.hud-icon svg { width: 20px; height: 20px; }
.hud-icon-gold { background: #163b6d; color: #ffffff; border: 2px solid #102d55; }
.hud-icon-grey { background: #163b6d; color: #ffffff; border: 2px solid #102d55; }
.hud-icon-cal { background: #c96853; color: #ffffff; border: 2px solid #ad5440; }

.hud-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }

.hud-label {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hud-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hud-value {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 13px;
    color: #1e293b;
    white-space: nowrap;
}

.hud-bar.progress {
    height: 8px;
    width: 100%;
    background: #e2e8f0;
    border-radius: 99px;
    flex: 1;
}

.hud-bar-gold { color: #163b6d; }
.hud-bar-green { color: #163b6d; }
.hud-bar-red { color: #c96853; }

/* Header Tools */
.harmony {
    flex: 0 1 300px;
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 14px;
}

.harmony-tools { display: flex; gap: 6px; }

.tool-btn {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.tool-btn:hover { background: #f1f5f9; color: #0f172a; }
.tool-btn svg { width: 17px; height: 17px; }

.tool-btn-mobile {
    background: #eef5fe;
    border-color: #bad3f5;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.tool-btn-mobile:hover {
    background: #dbe9fc;
    color: #0d2648;
}

/* ================= ZONES ================= */
.zone {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-radius: var(--radius);
    transition: transform .25s ease, box-shadow .25s ease;
    margin-top: 14px;
}

/* Zone Left: Patient Affordability (Sage Green) */
.zone-aff {
    grid-area: aff;
    background: var(--aff-bg);
    border: 2px solid var(--aff-border);
    box-shadow: 0 6px 22px rgba(60, 85, 55, .15);
}

/* Zone Right: Biotech Investment (Clean Slate Biotech Blue) */
.zone-inv {
    grid-area: inv;
    background: linear-gradient(180deg, #416b9e, var(--inv-bg));
    border: 2px solid var(--inv-border);
    box-shadow: 0 6px 22px rgba(25, 45, 75, .18);
}

.zone.is-over { transform: scale(1.018); }
.zone-aff.is-over { box-shadow: 0 0 0 3px #ffffff, 0 0 30px rgba(181, 204, 169, .8), 0 12px 28px rgba(60, 85, 55, .25); }
.zone-inv.is-over { box-shadow: 0 0 0 3px #ffffff, 0 0 30px rgba(61, 101, 148, .8), 0 12px 28px rgba(25, 45, 75, .25); }

.zone-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 12px 16px 10px 100px;
}

.zone-emblem {
    position: absolute;
    left: -16px;
    top: -18px;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    padding: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, .14);
    z-index: 2;
}

.zone-emblem > span {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.zone-emblem svg { width: 44px; height: 44px; }

.zone-aff .zone-emblem { background: var(--aff-badge-border); }
.zone-aff .zone-emblem > span { background: var(--aff-badge-bg); color: #213920; }
.zone-inv .zone-emblem { background: var(--inv-badge-border); }
.zone-inv .zone-emblem > span { background: var(--inv-badge-bg); color: #142b47; }

.zone-head h2 {
    margin: 0;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.08;
    color: var(--aff-title);
    letter-spacing: -0.3px;
}

.zone-inv .zone-head h2 { color: #ffffff; }

.zone-crest { margin-left: auto; }
.zone-crest svg {
    width: 30px; height: 30px;
    color: #ffffff; fill: #2c3e2b; stroke-width: 1.5;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .15));
}
.zone-inv .zone-crest svg { fill: #172e4c; }

.zone-body {
    position: relative;
    flex: 1;
    min-height: 0;
    margin: 4px 14px 0;
    border-radius: 14px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 34px 16px 14px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .35) transparent;
}

.zone-aff .zone-body {
    background: transparent;
    border: 1.5px dashed rgba(255, 255, 255, .6);
}

.zone-inv .zone-body {
    background: rgba(16, 36, 62, .18);
    border: 1.5px dashed rgba(255, 255, 255, .35);
}

.zone-watermark {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 48%;
    height: 48%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    opacity: .18;
    pointer-events: none;
}
.zone-inv .zone-watermark { opacity: .26; }

.zone-empty {
    position: absolute;
    inset: auto 18px 18px;
    margin: 0;
    text-align: center;
    color: rgba(25, 45, 20, .75);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    pointer-events: none;
}
.zone-inv .zone-empty { color: rgba(255, 255, 255, .85); }

.zone.has-cards .zone-empty { display: none; }

.zone-stack { position: relative; display: flex; flex-direction: column; }

.zone-foot {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 14px;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 19px;
    border-radius: 0 0 17px 17px;
}

.zone-aff .zone-foot {
    background: var(--aff-terracotta);
    color: #ffffff;
    border-top: 2px solid #e28c77;
}

.zone-inv .zone-foot {
    background: var(--inv-footer);
    color: var(--inv-footer-gold);
    border-top: 2px solid #284772;
}

.zone-count {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 800;
    padding: 2px 9px;
    border-radius: 99px;
    background: rgba(0, 0, 0, .2);
    color: #ffffff;
}


/* ================= POLICY CARDS ================= */
.policy-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #faf8f3;
    border: 2px solid #e2ddd0;
    border-radius: 14px;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    box-shadow: 0 2px 0 #d9d2c3, 0 8px 20px rgba(0, 0, 0, .08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .3s, opacity .2s;
}

.policy-card[data-draggable="1"] { cursor: grab; }
.policy-card:focus-visible { outline: 3px solid #163b6d; outline-offset: 3px; }

.pc-head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #f1ece0;
    border-bottom: 2px solid #dfd8c7;
}

.pc-head h3 {
    flex: 1;
    margin: 0;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.15;
    color: #1e293b;
}

.pc-seal {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .9);
}

.pc-seal svg { width: 14px; height: 14px; }

.pc-art {
    position: relative;
    display: grid;
    place-items: center;
    padding: 16px 0;
    background: linear-gradient(180deg, #faf7f0, #f2ece0);
    color: #1e293b;
}

.pc-art::before {
    content: '';
    position: absolute;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(207, 117, 96, .14), transparent 70%);
}

.pc-art svg { position: relative; width: 56px; height: 56px; stroke-width: 1.6; }

.pc-desc {
    flex: 1;
    margin: 0;
    padding: 10px 14px;
    font-size: 13px;
    line-height: 1.42;
    font-weight: 500;
    color: #334155;
    text-align: center;
}

.pc-foot {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-top: 1px dashed #dcd4c3;
    color: #64748b;
}


.pc-corner {
    margin-left: auto;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #1e293b;
    color: #ffffff;
}

.pc-corner svg { width: 14px; height: 14px; }

/* Active Card on the Docket */
.pc-active {
    position: absolute;
    inset: 0;
    transform: translate(14px, 4px) rotate(2.5deg);
    z-index: 10;
    animation: dealIn .45s cubic-bezier(.2, .9, .3, 1.2);
}

.pc-active:hover {
    transform: translate(14px, -4px) rotate(1deg) scale(1.02);
    box-shadow: 0 2px 0 #d9d2c3, 0 16px 30px rgba(0, 0, 0, .14);
}

.pc-active .pc-head { padding: 12px 14px; }
.pc-active .pc-head h3 { font-size: 17.5px; }

@keyframes dealIn {
    from { transform: translate(-30px, -40px) rotate(-10deg); opacity: 0; }
}

/* Cards Stacked in Pillars (Cascade) */
.pc-stack {
    height: 145px;
    flex-shrink: 0;
    --overlap: 88px;
}

.pc-stack + .pc-stack { margin-top: calc(var(--overlap) * -1); }
.pc-stack:nth-child(odd) { transform: translateX(-2px) rotate(-0.8deg); }
.pc-stack:nth-child(even) { transform: translateX(3px) rotate(0.8deg); }
.pc-stack:hover { transform: translateX(-4px) scale(1.03); z-index: 40; }

.pc-stack .pc-head { padding: 8px 10px; }
.pc-stack .pc-head h3 {
    font-size: 13.5px;
    display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}

.pc-row { display: flex; align-items: stretch; flex: 1; min-height: 0; }
.pc-stack .pc-art { padding: 0 10px; flex-shrink: 0; }
.pc-stack .pc-art::before { width: 50px; height: 50px; }
.pc-stack .pc-art svg { width: 32px; height: 32px; }
.pc-stack .pc-desc {
    font-size: 11.5px; text-align: left; padding: 6px 10px;
    display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4;
    -webkit-box-orient: vertical; overflow: hidden;
}
.pc-stack .pc-foot { padding: 4px 8px; }
.pc-stack .pc-corner { width: 19px; height: 19px; border-radius: 5px; }

/* Pending (not yet enacted) */
.policy-card.is-pending.pc-stack,
.policy-card.is-pending.pc-slip {
    border: 2px dashed #94a3b8;
}

.policy-card.is-pending::after {
    content: 'PENDING';
    position: absolute;
    right: -26px;
    top: 10px;
    transform: rotate(35deg);
    background: #fed7aa;
    color: #7c2d12;
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 9px;
    letter-spacing: 1px;
    padding: 2px 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

.pc-active.is-pending::after { display: none; }

/* Affordability cards in Zone B have Terracotta header */
#stack-B .policy-card .pc-head {
    background: var(--aff-terracotta);
    border-bottom-color: var(--aff-terracotta-dark);
}
#stack-B .policy-card .pc-head h3 { color: #ffffff; }
#stack-B .policy-card .pc-seal { color: var(--aff-terracotta); }
#stack-B .policy-card .pc-corner { background: var(--aff-terracotta); }

/* Investment cards in Zone A have Slate Blue header */
#stack-A .policy-card .pc-head {
    background: var(--inv-card-head);
    border-bottom-color: #173e72;
}
#stack-A .policy-card .pc-head h3 { color: #ffffff; }
#stack-A .policy-card .pc-seal { color: var(--inv-card-head); }
#stack-A .policy-card .pc-corner { background: var(--inv-card-head); }
#stack-A .policy-card .pc-art::before {
    background: radial-gradient(circle, rgba(38, 85, 150, .18), transparent 70%);
}

/* Locked (Correct) */
.policy-card.is-locked {
    border-color: #16a34a;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, .3), 0 6px 18px rgba(0, 0, 0, .08);
}

.policy-card.is-locked.pc-aff .pc-head {
    background: var(--aff-terracotta);
    border-bottom-color: var(--aff-terracotta-dark);
}
.policy-card.is-locked.pc-aff .pc-head h3 { color: #ffffff; }
.policy-card.is-locked.pc-aff .pc-seal { color: var(--aff-terracotta); }
.policy-card.is-locked.pc-aff .pc-corner { background: var(--aff-terracotta); }

.policy-card.is-locked.pc-inv .pc-head {
    background: var(--inv-card-head);
    border-bottom-color: #173e72;
}
.policy-card.is-locked.pc-inv .pc-head h3 { color: #ffffff; }
.policy-card.is-locked.pc-inv .pc-seal { color: var(--inv-card-head); }
.policy-card.is-locked.pc-inv .pc-corner { background: var(--inv-card-head); }
.policy-card.is-locked.pc-inv .pc-art::before {
    background: radial-gradient(circle, rgba(38, 85, 150, .18), transparent 70%);
}


/* Feedback states */
.policy-card.is-approving { animation: approve .7s ease forwards; }
.policy-card.is-wrong {
    animation: wrong .55s ease;
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .4), 0 6px 20px rgba(220, 38, 38, .2) !important;
}
.policy-card.is-wrong .pc-head { background: #fee2e2; }
.policy-card.is-shredding { animation: shredIn .7s ease-in forwards; }

@keyframes approve {
    0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, .8); }
    50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0), 0 0 20px rgba(22, 163, 74, .6); border-color: #16a34a; }
    100% { border-color: #16a34a; }
}

@keyframes wrong {
    0%, 100% { translate: 0; }
    20% { translate: -10px; }
    40% { translate: 10px; }
    60% { translate: -7px; }
    80% { translate: 5px; }
}

@keyframes shredIn {
    to { transform: translateY(70px) scaleY(.3); opacity: 0; }
}

.just-locked { animation: lockIn .5s cubic-bezier(.2, .9, .3, 1.3); }

@keyframes lockIn {
    from { scale: .85; opacity: .4; }
}

/* Drag Ghost (Fluid, GPU accelerated, top-left bug fixed) */
.card-ghost {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    box-shadow: 0 25px 45px rgba(0, 0, 0, .25) !important;
    animation: none !important;
    opacity: .96 !important;
    transition: none !important;
    will-change: transform !important;
}

.is-drag-source { opacity: .25; }

/* ================= CENTER DOCKET ================= */
.center {
    grid-area: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 0;
}

.deck {
    position: relative;
    width: min(270px, 78%);
    aspect-ratio: 27 / 35;
    max-height: calc(100% - 110px);
    margin-right: 18px;
}

/* Soft Mint / Sage Green Mat under Docket */
.deck-tray {
    position: absolute;
    inset: 14px -22px -16px -36px;
    border-radius: 18px;
    background: var(--tray-bg);
    border: 2px solid var(--tray-border);
    box-shadow: 0 8px 24px rgba(70, 95, 65, .14);
}

.deck.is-over .deck-tray {
    box-shadow: 0 0 0 3px #ffffff, 0 0 30px rgba(195, 220, 188, .8);
}

.card-back {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: #faf8f3;
    border: 2px solid #e2ddd0;
    box-shadow: 0 2px 0 #d9d2c3, 0 8px 18px rgba(0, 0, 0, .1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-back .cb-head {
    background: #334155;
    color: #ffffff;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 15px;
    padding: 10px 14px;
    text-align: center;
}

.card-back .cb-body {
    flex: 1;
    display: grid;
    place-items: center;
    background: linear-gradient(180deg, #f8f6f0, #eae4d6);
    color: #64748b;
}

.card-back .cb-body svg { width: 68px; height: 68px; opacity: .45; }

.deck-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 24px;
    color: #475569;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 17px;
    border: 2px dashed #94a3b8;
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
}

.deck-empty svg { width: 40px; height: 40px; margin: 0 auto 8px; display: block; color: var(--navy); }

.deck-meta {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13.5px;
    font-weight: 600;
}

.deck-meta b { color: #1e293b; font-family: var(--font-sans); font-size: 15px; }

/* Deep Navy Enact Policies Button */
.enact-btn {
    height: auto;
    min-height: 0;
    padding: 12px 28px;
    border-radius: 99px;
    border: 0;
    gap: 10px;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 18px;
    color: #ffffff;
    background: var(--navy);
    box-shadow: 0 4px 0 var(--navy-dark), 0 8px 18px rgba(21, 55, 101, .25);
    transition: transform .15s, box-shadow .15s, filter .2s;
}

.enact-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--navy-light);
    filter: brightness(1.05);
}

.enact-btn:active:not(:disabled) {
    transform: translateY(2px);
    box-shadow: 0 2px 0 var(--navy-dark), 0 4px 10px rgba(21, 55, 101, .2);
}

.enact-btn svg { width: 20px; height: 20px; }

.enact-btn:disabled {
    background: #94a3b8;
    color: #f1f5f9;
    box-shadow: 0 4px 0 #64748b;
}

.enact-btn.is-urgent { animation: urgent 1.4s ease-in-out infinite; }

@keyframes urgent {
    50% { box-shadow: 0 4px 0 var(--navy-dark), 0 0 0 6px rgba(21, 55, 101, .25), 0 8px 18px rgba(21, 55, 101, .3); }
}

.enact-count {
    min-width: 26px;
    height: 26px;
    padding: 0 7px;
    border-radius: 99px;
    background: #ffffff;
    color: var(--navy);
    font-size: 14px;
    display: grid;
    place-items: center;
}

.enact-btn:disabled .enact-count { background: #cbd5e1; color: #64748b; }

/* ================= SHREDDER / TRASH CAN ================= */
.shredder {
    grid-area: trash;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    min-height: 190px;
}

.shred-paper {
    position: absolute;
    bottom: 96px;
    width: 175px;
    height: 92px;
    background: #ffffff;
    border-radius: 4px 4px 0 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .14);
    display: grid;
    place-items: center;
    transition: transform .3s, opacity .3s;
    z-index: 1;
}

.shredder.has-pending .shred-paper { opacity: 0; transform: translateY(30px); }
.shredder.is-over .shred-paper { animation: paperWiggle .4s ease infinite; }

@keyframes paperWiggle {
    50% { transform: translateY(6px) rotate(1deg); }
}

.stamp {
    font-family: var(--font-sans);
    font-weight: 900;
    font-size: 24px;
    letter-spacing: 2px;
    color: #d03838;
    border: 3.5px solid #d03838;
    border-radius: 6px;
    padding: 0 10px;
    transform: rotate(-8deg);
    opacity: .95;
}

.shred-tray {
    position: absolute;
    bottom: 95px;
    left: 50%;
    width: 0;
    height: 0;
    z-index: 2;
}

.pc-slip {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 155px;
    transform-origin: bottom center;
}

.pc-slip .pc-head { padding: 8px 10px; }
.pc-slip .pc-head h3 { font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc-slip .pc-art { padding: 8px 0 16px; }
.pc-slip .pc-art::before { width: 48px; height: 48px; }
.pc-slip .pc-art svg { width: 28px; height: 28px; }
.pc-slip:hover { z-index: 30; }

.shred-body {
    position: relative;
    z-index: 3;
    width: 275px;
    padding: 14px 18px 12px;
    border-radius: 16px 16px 8px 8px;
    background: linear-gradient(180deg, #5d7488, #4d6274);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 10px 24px rgba(0, 0, 0, .2);
    transition: box-shadow .25s;
}

.shredder.is-over .shred-body {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 0 0 3px #ffffff, 0 0 30px rgba(87, 109, 128, .6);
}

.shred-slot {
    height: 11px;
    margin: 0 12px;
    border-radius: 6px;
    background: var(--shredder-slot);
    box-shadow: inset 0 2px 3px rgba(0, 0, 0, .8), 0 1px 0 rgba(255, 255, 255, .15);
}

.shred-leds {
    position: absolute;
    right: 18px;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.shred-leds i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3be37a;
    box-shadow: 0 0 6px #3be37a;
}

.shredder.is-working .shred-leds i { animation: blink .18s steps(2) infinite; background: #eab308; box-shadow: 0 0 6px #eab308; }

@keyframes blink { 50% { opacity: .2; } }

.shred-label {
    margin-top: 14px;
    text-align: center;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 19px;
    color: #ffffff;
}

.shred-log {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px auto 0;
    padding: 3px 12px;
    border-radius: 99px;
    border: 1px solid rgba(255, 255, 255, .2);
    background: rgba(255, 255, 255, .1);
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.shred-log:hover { background: rgba(255, 255, 255, .22); color: #ffffff; }
.shred-log svg { width: 13px; height: 13px; }

.shred-strips {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 190px;
    height: 0;
    transform: translateX(-50%);
    z-index: 4;
}

.strip {
    position: absolute;
    top: -90px;
    width: 5px;
    height: 30px;
    background: #ffffff;
    border-radius: 2px;
    animation: stripFall 1.1s ease-in forwards;
}

@keyframes stripFall {
    to { transform: translate(var(--dx), 130px) rotate(var(--rot)); opacity: 0; }
}

.scrap {
    position: absolute;
    width: 12px;
    height: 8px;
    background: #2b3540;
    border-radius: 2px;
    opacity: .85;
}

.scrap.s1 { left: calc(50% - 165px); top: 30px; transform: rotate(25deg); }
.scrap.s2 { left: calc(50% - 125px); top: 70px; transform: rotate(-40deg); width: 16px; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.scrap.s3 { left: calc(50% + 145px); top: 40px; transform: rotate(60deg); }
.scrap.s4 { left: calc(50% + 170px); top: 95px; transform: rotate(-15deg); width: 10px; background: #ffffff; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.scrap.s5 { left: calc(50% - 180px); top: 120px; transform: rotate(80deg); width: 12px; }
.scrap.s6 { left: calc(50% + 115px); top: 8px; transform: rotate(-70deg); }

/* ================= LIVES ================= */
.lives-panel {
    grid-area: lives;
    align-self: end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-bottom: 8px;
}

.lives-label {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 14.5px;
    color: #334155;
}

.lives { display: flex; gap: 6px; }

.heart { width: 50px; height: 50px; overflow: visible; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .14)); }
.heart .h-fill { fill: url(#grad-heart); stroke: #a33838; stroke-width: .8; }
.heart .h-shine { fill: #ffffff; opacity: .45; }
.heart.is-lost .h-fill { fill: url(#grad-heart-lost); stroke: #201a1a; }
.heart.is-lost .h-left { transform: translate(-1px, .6px) rotate(-7deg); transform-origin: 12px 21px; }
.heart.is-lost .h-right { transform: translate(1px, .6px) rotate(7deg); transform-origin: 12px 21px; }
.heart.is-lost { opacity: .8; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .18)); }
.heart.just-lost { animation: heartBreak .8s ease; }

@keyframes heartBreak {
    0% { transform: scale(1.3); filter: drop-shadow(0 0 12px rgba(220, 38, 38, .8)); }
    30% { transform: scale(1.3) rotate(-8deg); }
    60% { transform: scale(1.1) rotate(6deg); }
    100% { transform: scale(1); }
}

/* ================= CREDITS & FOOTER ================= */
.credits {
    grid-area: credits;
    align-self: end;
    justify-self: end;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    padding-bottom: 10px;
    color: #64748b;
    font-size: 13px;
}

.credits b { color: #1e293b; }

.credits a:not(.credits-nplb) {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
    transition: color .2s, text-decoration-color .2s;
}

.credits a:not(.credits-nplb):hover {
    color: var(--navy);
    text-decoration-color: var(--navy);
}

.credits-nplb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    background: #f1ede2;
    border: 1px solid #ded5c4;
    color: #1e293b;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, border-color .2s;
}

.credits-nplb:hover { background: #e8e2d4; border-color: #cbd5e1; }
.credits-nplb svg { width: 14px; height: 14px; }

.disclaimer {
    position: relative;
    z-index: 1;
    padding: 8px 24px 10px;
    text-align: center;
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, .06);
}

.disclaimer a {
    color: #334155;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color .2s;
}

.disclaimer a:hover {
    color: var(--navy);
}

/* ================= TOASTS ================= */
.g-toasts {
    position: fixed;
    z-index: 950;
    top: 96px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    translate: none;
    padding: 0;
    margin: 0;
    width: max-content;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    box-sizing: border-box;
}

.g-toast {
    box-sizing: border-box;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    width: 360px;
    max-width: calc(100vw - 32px);
    padding: 12px 16px;
    border-radius: 14px;
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 12px 30px rgba(15, 36, 60, .18), 0 2px 6px rgba(0, 0, 0, .06);
    border: 1px solid #e2e8f0;
    border-left: 6px solid #64748b;
    animation: toastIn .35s cubic-bezier(.16, 1, .3, 1.15);
    cursor: pointer;
    white-space: normal;
    pointer-events: auto;
}

.g-toast.is-leaving { animation: toastOut .25s ease forwards; }
.g-toast .t-icon { flex-shrink: 0; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #ffffff; }
.g-toast .t-icon svg { width: 19px; height: 19px; }
.g-toast h4 { margin: 0 0 3px; font-family: var(--font-h); font-weight: 700; font-size: 15px; line-height: 1.2; }
.g-toast p { margin: 0; font-size: 12.5px; line-height: 1.4; color: #475569; }

.g-toast.t-trash { border-left-color: #576d80; }
.g-toast.t-trash .t-icon { background: #576d80; }
.g-toast.t-error { border-left-color: #dc2626; }
.g-toast.t-error .t-icon { background: #dc2626; }
.g-toast.t-ok { border-left-color: #16a34a; }
.g-toast.t-ok .t-icon { background: #16a34a; }

@keyframes toastIn {
    from { transform: translateY(-24px) scale(0.96); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes toastOut {
    to { transform: translateY(-16px) scale(0.96); opacity: 0; }
}

/* ================= MODALS ================= */
.g-modal {
    border-radius: 24px;
    padding: 26px 26px 20px;
    max-width: 560px;
    width: min(560px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    max-height: calc(100vh - 32px);
    background: #ffffff;
    color: #1e293b;
    box-shadow: 0 25px 60px rgba(15, 36, 60, .22);
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.modal::backdrop, .modal { background-color: rgba(30, 41, 59, .55); }

.g-modal-ribbon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    padding: 6px 18px;
    border-radius: 99px;
    background: var(--navy);
    color: #ffffff;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 11.5px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(21, 55, 101, .25);
}

.ribbon-red {
    background: #dc2626;
    box-shadow: 0 2px 6px rgba(220, 38, 38, .25);
}
.ribbon-gold {
    background: #ca8a04;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(202, 138, 4, .25);
}

.g-modal-title {
    margin: 0 0 12px;
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 24px;
    line-height: 1.2;
    color: #0f243c;
}

.g-modal-text {
    margin: 0 0 14px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #475569;
    text-align: left;
}

.intro-cat-heading {
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--navy);
    text-align: left;
    margin: 0 0 8px;
}

.intro-list {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.intro-list li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 9px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-size: 13px;
    line-height: 1.4;
}

.intro-list li b { color: #0f243c; }

.dot { flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #ffffff; margin-top: 1px; }
.dot svg { width: 15px; height: 15px; }
.dot-inv { background: var(--inv-bg); }
.dot-aff { background: var(--aff-terracotta); }
.dot-trash { background: var(--shredder-bg); }

.intro-tips {
    text-align: left;
    font-size: 12.5px;
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
}

.intro-tip-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    line-height: 1.4;
}

.intro-tip-item svg {
    width: 15px;
    height: 15px;
    color: var(--navy);
    flex-shrink: 0;
    margin-top: 2px;
}

.intro-tip-item span { flex: 1; }
.intro-tip-item b { color: #0f243c; }

.intro-note {
    font-size: 12px;
    line-height: 1.45;
    color: #334155;
    background: #f0f5fc;
    border: 1px solid #d0e0f5;
    border-radius: 12px;
    padding: 8px 12px;
    margin: 0 0 12px;
    text-align: left;
}

.intro-note b { color: var(--navy); }

.modal-action {
    position: sticky;
    bottom: -20px;
    margin-top: 12px;
    padding-top: 10px;
    padding-bottom: 2px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, #ffffff 40%);
    backdrop-filter: blur(4px);
    z-index: 10;
}

.g-btn-primary {
    height: auto;
    padding: 12px 20px;
    border: 0;
    border-radius: 99px;
    background: var(--navy);
    color: #ffffff;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 15.5px;
    box-shadow: 0 4px 0 var(--navy-dark);
}

.g-btn-primary:hover { background: var(--navy-light); }

.g-btn-danger {
    height: auto;
    padding: 12px 20px;
    border: 0;
    border-radius: 99px;
    background: #dc2626;
    color: #ffffff;
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 15.5px;
    box-shadow: 0 4px 0 #991b1b;
}

.end-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 4px solid #ffffff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .16);
}

.end-icon svg { width: 36px; height: 36px; }
.end-icon-lose { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.end-icon-win { background: linear-gradient(135deg, #eab308, #ca8a04); }

.g-modal-lose { border-top: 6px solid #dc2626; }
.g-modal-win { border-top: 6px solid var(--navy); }

.win-stats { font-family: var(--font-sans); font-weight: 800; color: #16a34a; margin: 0 0 16px; }

/* Responsive adjustments for modals on compact viewports (Tablets & Notebooks) */
@media (max-height: 820px) {
    .g-modal {
        padding: 18px 20px 14px;
        border-radius: 20px;
    }
    .g-modal-ribbon {
        margin-bottom: 6px;
        padding: 4px 14px;
        font-size: 10.5px;
        letter-spacing: 0.8px;
    }
    .g-modal-title {
        margin: 0 0 6px;
        font-size: 20px;
    }
    .g-modal-text {
        margin: 0 0 8px;
        font-size: 12.5px;
        line-height: 1.4;
    }
    .intro-cat-heading {
        font-size: 11px;
        margin: 0 0 5px;
    }
    .intro-list {
        margin: 0 0 8px;
        gap: 5px;
    }
    .intro-list li {
        padding: 6px 10px;
        border-radius: 10px;
        font-size: 11.5px;
        line-height: 1.35;
        gap: 8px;
    }
    .dot {
        width: 26px;
        height: 26px;
    }
    .dot svg {
        width: 13px;
        height: 13px;
    }
    .intro-tips {
        padding: 6px 10px;
        gap: 4px;
        margin-bottom: 6px;
        font-size: 11.5px;
        border-radius: 10px;
    }
    .intro-tip-item {
        gap: 6px;
        line-height: 1.35;
    }
    .intro-tip-item svg {
        width: 13px;
        height: 13px;
    }
    .intro-note {
        font-size: 11px;
        line-height: 1.35;
        padding: 6px 10px;
        border-radius: 10px;
        margin: 0 0 8px;
    }
    .modal-action {
        bottom: -14px;
        margin-top: 8px;
        padding-top: 6px;
    }
    .g-btn-primary, .g-btn-danger {
        padding: 10px 18px;
        font-size: 14.5px;
    }
    .end-icon {
        width: 58px;
        height: 58px;
        margin-bottom: 8px;
    }
    .end-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* Card detail modal */
.g-modal-card { text-align: left; padding: 0; overflow: hidden; max-width: 460px; }
.cd-head { padding: 18px 22px; background: #f1ece0; display: flex; gap: 14px; align-items: center; border-bottom: 2px solid #e2ddd0; }
.cd-head.cd-aff { background: var(--aff-terracotta); color: #ffffff; border-bottom-color: var(--aff-terracotta-dark); }
.cd-head.cd-inv { background: var(--inv-card-head); color: #ffffff; border-bottom-color: #173e72; }
.cd-head.cd-trash { background: var(--shredder-bg); color: #ffffff; border-bottom-color: var(--shredder-dark); }
.cd-head h3 { margin: 0; font-family: var(--font-h); font-weight: 700; font-size: 20px; line-height: 1.15; }
.cd-art { flex-shrink: 0; width: 54px; height: 54px; border-radius: 14px; background: rgba(255, 255, 255, .9); color: #1e293b; display: grid; place-items: center; }
.cd-art svg { width: 30px; height: 30px; }
.cd-body { padding: 18px 22px 22px; }
.cd-body p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.55; color: #334155; }
.cd-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 99px; font-size: 12px; font-weight: 700; margin-bottom: 12px; }
.cd-tag svg { width: 14px; height: 14px; }
.cd-tag.ok { background: #dcfce7; color: #15803d; }
.cd-tag.pending { background: #fef3c7; color: #92400e; }
.cd-why { background: #fef2f2; border-left: 4px solid #ef4444; padding: 10px 12px; border-radius: 8px; font-size: 13.5px !important; }
.cd-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cd-actions .btn { height: auto; padding: 10px 6px; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; border: 0; color: #ffffff; line-height: 1.15; white-space: normal; }
.cd-actions .btn svg { width: 18px; height: 18px; }
.cd-actions .go-B { background: var(--aff-terracotta); }
.cd-actions .go-A { background: var(--inv-card-head); }
.cd-actions .go-C { background: var(--shredder-bg); }
.cd-actions .go-deck { grid-column: 1 / -1; background: #e2e8f0; color: #334155; }

.log-body { text-align: left; display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; }
.log-item { padding: 12px 14px; border-radius: 12px; background: #f8fafc; border-left: 4px solid #dc2626; border: 1px solid #e2e8f0; border-left-width: 4px; }
.log-item h4 { margin: 0 0 4px; font-family: var(--font-h); font-weight: 700; font-size: 15px; }
.log-item p { margin: 0; font-size: 13px; line-height: 1.45; color: #475569; }
.log-empty { text-align: center; color: #64748b; padding: 20px; }

/* ================= CONFETTI ================= */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 2000; overflow: hidden; }
.confetti i {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 16px;
    border-radius: 2px;
    animation: confettiFall var(--d) linear forwards;
}

@keyframes confettiFall {
    to { transform: translate(var(--dx), 110vh) rotate(var(--r)); }
}

/* ================= RESPONSIVE ================= */
@media (max-width: 1380px) {
    .game { gap: 14px 24px; padding: 0 20px 6px; }
    .hud-label { font-size: 13px; }
    .monitor-screen { padding: 10px 18px 8px; gap: 14px; }
}

@media (max-width: 1150px) {
    .game {
        grid-template-columns: minmax(220px, 1fr) minmax(240px, 1fr) minmax(220px, 1fr);
        gap: 8px 16px;
        padding: 0 14px 4px;
    }
    .brand-header { flex: 0 1 210px; }
    .nplb-logo-img { width: 190px; }
    .harmony { flex: 0 1 120px; }
}

/* Notebooks & Landscape Tablets (viewport height <= 820px) */
@media (max-height: 820px) {
    .game {
        gap: 10px 22px;
        padding: 0 18px 4px;
    }
    .brand-header {
        padding-top: 6px;
        gap: 4px;
    }
    .nplb-logo-img {
        width: 195px;
    }
    .monitor-screen {
        padding: 8px 16px 6px;
        gap: 12px;
    }
    .hud-icon {
        width: 32px;
        height: 32px;
    }
    .hud-icon svg {
        width: 16px;
        height: 16px;
    }
    .hud-label {
        font-size: 12px;
    }
    .hud-value {
        font-size: 11.5px;
    }
    .hud-bar.progress {
        height: 6px;
    }
    .harmony {
        padding-top: 6px;
    }
    .zone {
        margin-top: 8px;
    }
    .zone-head {
        min-height: 54px;
        padding: 8px 12px 6px 72px;
    }
    .zone-emblem {
        width: 72px;
        height: 72px;
        left: -10px;
        top: -10px;
        padding: 4px;
    }
    .zone-emblem svg {
        width: 30px;
        height: 30px;
    }
    .zone-head h2 {
        font-size: 18px;
        line-height: 1.1;
    }
    .zone-crest svg {
        width: 24px;
        height: 24px;
    }
    .zone-body {
        padding: 8px 14px 10px;
        margin: 2px 10px 0;
    }
    .zone-empty {
        font-size: 11.5px;
        inset: auto 10px 10px;
    }
    .zone-foot {
        margin-top: 6px;
        padding: 6px 10px;
        font-size: 15px;
    }
    .center {
        gap: 6px;
    }
    .deck {
        width: min(220px, 75%, 38vh);
        aspect-ratio: 27 / 35;
        max-height: calc(100% - 75px);
        margin-right: 8px;
    }
    .deck-tray {
        inset: 10px -16px -12px -24px;
        border-radius: 14px;
    }
    .deck-meta {
        margin: 2px 0 0;
        font-size: 12px;
    }
    .enact-btn {
        padding: 8px 22px;
        font-size: 15px;
        gap: 8px;
    }
    .enact-btn svg {
        width: 16px;
        height: 16px;
    }
    .enact-count {
        min-width: 22px;
        height: 22px;
        font-size: 12px;
    }
    .shredder {
        min-height: 130px;
    }
    .shred-paper {
        bottom: 72px;
        width: 140px;
        height: 70px;
    }
    .stamp {
        font-size: 18px;
        border-width: 2.5px;
        padding: 0 8px;
    }
    .shred-tray {
        bottom: 70px;
    }
    .pc-slip {
        width: 120px;
    }
    .shred-body {
        width: 220px;
        padding: 9px 14px 7px;
    }
    .shred-slot {
        height: 8px;
        margin: 0 8px;
    }
    .shred-leds {
        right: 14px;
        top: 20px;
        gap: 3px;
    }
    .shred-leds i {
        width: 6px;
        height: 6px;
    }
    .shred-label {
        margin-top: 6px;
        font-size: 15px;
    }
    .shred-log {
        margin: 3px auto 0;
        font-size: 11px;
        padding: 2px 10px;
    }
    .lives-panel {
        padding-bottom: 2px;
        gap: 3px;
    }
    .lives-label {
        font-size: 12px;
    }
    .heart {
        width: 36px;
        height: 36px;
    }
    .credits {
        gap: 3px;
        font-size: 11px;
        padding-bottom: 2px;
    }
    .credits-nplb {
        padding: 2px 8px;
        font-size: 11px;
    }
    .disclaimer {
        padding: 3px 18px 5px;
        font-size: 10px;
        line-height: 1.35;
    }
    .pc-active .pc-head { padding: 8px 10px; }
    .pc-active .pc-head h3 { font-size: 13.5px; }
    .pc-active .pc-art { padding: 8px 0; }
    .pc-active .pc-art svg { width: 38px; height: 38px; }
    .pc-active .pc-art::before { width: 60px; height: 60px; }
    .pc-active .pc-desc { padding: 6px 10px; font-size: 11.5px; line-height: 1.35; }
    .pc-active .pc-foot { padding: 4px 8px; font-size: 10.5px; }
    .pc-active .pc-corner { width: 18px; height: 18px; }
    .pc-stack { height: 125px; --overlap: 76px; }
}

/* Compact Notebooks & Scaled Displays (viewport height <= 670px) */
@media (max-height: 670px) {
    .game {
        gap: 6px 16px;
        padding: 0 16px 2px;
    }
    .brand-header {
        padding-top: 4px;
    }
    .nplb-logo-img {
        width: 175px;
    }
    .monitor-screen {
        padding: 5px 12px 5px;
        gap: 8px;
    }
    .hud-icon {
        width: 26px;
        height: 26px;
    }
    .hud-icon svg {
        width: 13px;
        height: 13px;
    }
    .hud-label {
        font-size: 11px;
    }
    .hud-value {
        font-size: 10.5px;
    }
    .harmony {
        padding-top: 4px;
    }
    .zone-head {
        min-height: 44px;
        padding: 4px 8px 4px 54px;
    }
    .zone-emblem {
        width: 54px;
        height: 54px;
        left: -8px;
        top: -8px;
    }
    .zone-emblem svg {
        width: 22px;
        height: 22px;
    }
    .zone-head h2 {
        font-size: 14.5px;
    }
    .zone-foot {
        font-size: 13px;
        padding: 4px 8px;
    }
    .deck {
        width: min(185px, 68%, 33vh);
    }
    .enact-btn {
        padding: 6px 16px;
        font-size: 13.5px;
    }
    .shredder {
        min-height: 110px;
    }
    .shred-paper {
        bottom: 58px;
        width: 115px;
        height: 56px;
    }
    .stamp {
        font-size: 15px;
        padding: 0 6px;
    }
    .shred-tray {
        bottom: 56px;
    }
    .shred-body {
        width: 190px;
        padding: 6px 10px 5px;
    }
    .shred-label {
        font-size: 13px;
        margin-top: 4px;
    }
    .heart {
        width: 28px;
        height: 28px;
    }
    .disclaimer {
        padding: 2px 10px 3px;
        font-size: 9px;
    }
    .pc-active .pc-head { padding: 5px 6px; }
    .pc-active .pc-head h3 { font-size: 12px; }
    .pc-active .pc-art { padding: 4px 0; }
    .pc-active .pc-art svg { width: 26px; height: 26px; }
    .pc-active .pc-art::before { width: 42px; height: 42px; }
    .pc-active .pc-desc { padding: 4px 6px; font-size: 10px; line-height: 1.25; }
    .pc-active .pc-foot { padding: 3px 6px; font-size: 9px; }
    .pc-stack { height: 110px; --overlap: 68px; }
}

/* ================= DEVICE & ORIENTATION BLOCKER ================= */
.device-blocker {
    display: none;
}

@media (orientation: portrait), (max-width: 768px), (max-height: 460px) {
    .device-blocker {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        z-index: 100000;
        align-items: center;
        justify-content: flex-start;
        padding: 20px 14px 28px;
        background: radial-gradient(ellipse 95% 85% at 50% 35%, var(--desk-center, #fdfbf7), var(--desk-bg, #f9f5ee) 65%, var(--desk-edge, #ede5d5));
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
        touch-action: pan-y;
        box-sizing: border-box;
    }

    .device-blocker::before,
    .device-blocker::after {
        content: '';
        margin: auto;
    }

    .blocker-card {
        margin: 0 auto;
        flex-shrink: 0;
    }

    .game,
    .disclaimer,
    .g-toasts,
    dialog.modal {
        display: none !important;
    }

    html, body {
        overflow: hidden !important;
        height: 100% !important;
    }
}

@media (max-height: 620px) and ((orientation: portrait) or (max-width: 768px) or (max-height: 460px)) {
    .device-blocker {
        padding: 12px 10px 20px;
    }
    .blocker-card {
        padding: 18px 14px 14px;
        border-radius: 18px;
    }
    .blocker-logo {
        width: 160px;
        margin-bottom: 8px;
    }
    .blocker-title {
        font-size: 18px;
        margin-bottom: 4px;
    }
    .blocker-desc {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .blocker-cta-box {
        margin-bottom: 9px;
    }
    .blocker-hero-btn {
        min-height: 48px;
        padding: 10px 14px;
    }
    .hero-btn-title {
        font-size: 15px;
    }
    .hero-btn-sub {
        font-size: 11px;
    }
    .blocker-alt-notes {
        padding: 8px 10px;
        gap: 5px;
        margin-bottom: 8px;
    }
    .blocker-alt-note {
        font-size: 10.5px;
    }
    .blocker-action {
        margin-bottom: 8px;
    }
    .blocker-disclaimer {
        margin-top: 8px;
        padding-top: 6px;
        font-size: 10px;
        line-height: 1.3;
    }
}

.blocker-card {
    width: 100%;
    max-width: 450px;
    background: #ffffff;
    border: 2px solid #2b323c;
    border-radius: 22px;
    padding: 24px 20px 18px;
    text-align: center;
    box-shadow: 0 20px 45px rgba(15, 36, 60, 0.16), 0 4px 12px rgba(0, 0, 0, 0.04);
    animation: blockerPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1.15);
    margin: 0 auto;
    box-sizing: border-box;
}

@keyframes blockerPopIn {
    from {
        opacity: 0;
        transform: scale(0.94) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.blocker-logo {
    display: block;
    width: 185px;
    max-width: 80%;
    height: auto;
    margin: 0 auto 12px;
    filter: drop-shadow(0 2px 4px rgba(16, 59, 112, 0.08));
}

.blocker-title {
    font-family: var(--font-h);
    font-weight: 700;
    font-size: 21px;
    line-height: 1.25;
    color: #0f243c;
    margin: 0 0 6px;
}

.blocker-desc {
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
    margin: 0 0 16px;
}

/* ================= HERO MOBILE CTA (TERRACOTTA ACCENT) ================= */
.blocker-cta-box {
    margin: 0 0 14px;
    width: 100%;
}

.blocker-hero-btn {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 100%;
    min-height: 52px;
    padding: 12px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #d3593f 0%, #be462d 100%);
    border: 1px solid #aa3b23;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(190, 70, 45, 0.32), 0 2px 4px rgba(0, 0, 0, 0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    cursor: pointer;
    box-sizing: border-box;
    text-align: center;
    animation: heroTerracottaPulse 3.5s ease-in-out infinite;
    -webkit-tap-highlight-color: transparent;
}

@keyframes heroTerracottaPulse {
    0%, 100% {
        box-shadow: 0 6px 18px rgba(190, 70, 45, 0.32), 0 0 0 0 rgba(211, 89, 63, 0.4);
    }
    50% {
        box-shadow: 0 8px 22px rgba(190, 70, 45, 0.42), 0 0 0 5px rgba(211, 89, 63, 0);
    }
}

.blocker-hero-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 10px 24px rgba(190, 70, 45, 0.42);
}

.blocker-hero-btn:active {
    transform: scale(0.975) translateY(1px);
    filter: brightness(0.92);
    box-shadow: 0 2px 8px rgba(190, 70, 45, 0.3);
}

.hero-btn-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    color: #ffffff;
    letter-spacing: 0.2px;
}

.hero-btn-sub {
    font-size: 11.5px;
    font-weight: 500;
    color: #ffe6e0;
    line-height: 1.3;
}

/* ================= DISCREET SECONDARY OPTIONS ================= */
.blocker-alt-notes {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0 0 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
    border-radius: 12px;
    text-align: left;
}

.blocker-alt-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 11.5px;
    line-height: 1.35;
    color: #64748b;
}

.blocker-alt-note svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.blocker-alt-note strong {
    color: #334155;
    font-weight: 600;
}

.blocker-action {
    margin-bottom: 10px;
}

.blocker-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.blocker-btn:hover {
    color: var(--navy);
}

.blocker-btn svg {
    width: 13px;
    height: 13px;
}

.blocker-disclaimer {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #e2e8f0;
    font-size: 10.5px;
    line-height: 1.4;
    color: #64748b;
    text-align: center;
}

.blocker-disclaimer a {
    color: var(--navy);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
