/* =====================================================================
   "Paper cutout" style — the look of the instruction videos: construction
   paper cut out and laid on a sunburst, South Park fashion. Plain off-white
   paper (no texture: it made the page harder to read), navy ink, a coral dot, mustard for whatever is selected,
   Luckiest Guy for titles and Nunito for everything else.

   Active while <html data-theme="papercut"> (js/theme.js); style.css alone is
   the "Original" style. Every rule below sits inside @scope, whose root adds no
   specificity: each replaces exactly the style.css rule with the same selector
   and loses to the same rules that one loses to. That is load-bearing — the
   borderless icon buttons (.recalc-btn, .approve-badge, .line-edit-btn, ...)
   only stay borderless because one class outranks the bare `button` rule, and
   a heavier theme selector would put a paper button behind every table icon.

   Tilts use the `rotate` property rather than `transform`, so they compose
   with the transforms style.css already animates on hover.
   ===================================================================== */

html[data-theme="papercut"] {
    --ink: #1b2a41;
    --paper: #fbf7ee;
    --paper-2: #f4ecdb;
    --paper-3: #ebdfc6;
    --field: #fffdf8;
    --pc-blue: #2f74d0;
    --pc-blue-ink: #1f56a8;
    --pc-coral: #e8535d;
    --pc-mustard: #f6c343;
    --pc-green: #2e8b57;
    --pc-purple: #7a45c8;
    --tape: rgba(255, 246, 214, 0.62);

    --bg: var(--pc-blue);
    --text-dark: var(--ink);
    --text-secondary: #5d6577;
    --border: #d9ccb0;
    --divider: #ece3cf;
    --radius: 5px;
    --radius-sm: 4px;

    --gradient-dark: linear-gradient(var(--ink), var(--ink));
    --gradient-info: linear-gradient(var(--pc-blue), var(--pc-blue));
    --gradient-success: linear-gradient(var(--pc-green), var(--pc-green));
    --gradient-warning: linear-gradient(var(--pc-mustard), var(--pc-mustard));
    --gradient-danger: linear-gradient(var(--pc-coral), var(--pc-coral));
    --gradient-primary: linear-gradient(var(--pc-purple), var(--pc-purple));

    /* Paper lying on paper: a thin hard edge plus a soft drop underneath */
    --shadow-card: 1px 2px 0 rgba(27, 42, 65, 0.08), 3px 6px 14px rgba(15, 30, 70, 0.28);
    --shadow-header: 2px 3px 0 rgba(0, 0, 0, 0.18), 0 6px 12px rgba(0, 0, 0, 0.18);
    --shadow-header-info: var(--shadow-header);
    --shadow-header-success: var(--shadow-header);
    --shadow-header-warning: var(--shadow-header);
    --shadow-btn: 0 3px 0 rgba(0, 0, 0, 0.3);

}

/* The billing tables — invoice lines and fuel surcharge, their totals and notices —
   have to be as clear as they can be, so they keep the Original style: @scope stops
   at #billingTab .sidebar-main, and the rule below puts the Original variables and
   text back for everything in there. Billing's header bar and contractor list, like
   everything else, stay paper. */
html[data-theme="papercut"] #billingTab .sidebar-main {
    --bg: #f0f2f5;
    --text-dark: #344767;
    --text-secondary: #7b809a;
    --border: #d2d6da;
    --divider: #f0f2f5;
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --gradient-dark: linear-gradient(195deg, #42424a, #191919);
    --gradient-info: linear-gradient(195deg, #49a3f1, #1A73E8);
    --gradient-success: linear-gradient(195deg, #66BB6A, #43A047);
    --gradient-warning: linear-gradient(195deg, #FFA726, #FB8C00);
    --gradient-danger: linear-gradient(195deg, #EF5350, #E53935);
    --gradient-primary: linear-gradient(195deg, #EC407A, #D81B60);
    --shadow-card: 0 0.25rem 0.375rem -0.0625rem rgba(0, 0, 0, 0.12),
                   0 0.125rem 0.25rem -0.0625rem rgba(0, 0, 0, 0.07);
    --shadow-header: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(64, 64, 64, 0.4);
    --shadow-header-info: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(73, 163, 241, 0.4);
    --shadow-header-success: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(76, 175, 80, 0.4);
    --shadow-header-warning: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(251, 140, 0, 0.4);
    --shadow-btn: 0 3px 3px 0 rgba(0, 0, 0, 0.15), 0 3px 1px -2px rgba(0, 0, 0, 0.2),
                  0 1px 5px 0 rgba(0, 0, 0, 0.12);
    font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-weight: 400;
    color: var(--text-dark);
}

@scope (html[data-theme="papercut"]) to (#billingTab .sidebar-main) {

    /* -----------------------------------------------------------------
       Base
       ----------------------------------------------------------------- */

    body {
        font-family: "Nunito", "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
        font-weight: 500;
        background-color: var(--pc-blue);
        /* The sunburst every title card in the videos sits on */
        background-image:
            radial-gradient(ellipse at 50% 35%, transparent 35%, rgba(12, 30, 75, 0.35)),
            repeating-conic-gradient(from -4deg at 50% 38%, #3479d6 0deg 9deg, #2c6bcb 9deg 18deg);
        background-attachment: fixed;
    }

    h1, h2, h3 {
        font-family: "Luckiest Guy", "Nunito", sans-serif;
        font-weight: 400;
        font-synthesis: none;
        letter-spacing: 0.03em;
        line-height: 1.15;
    }

    a { color: var(--pc-blue-ink); }

    ::selection { background: var(--pc-mustard); color: var(--ink); }

    /* -----------------------------------------------------------------
       Forms
       ----------------------------------------------------------------- */

    label { color: var(--ink); font-weight: 800; }

    input, select {
        font-weight: 600;
        background: var(--field);
        border: 2px solid var(--border);
        border-radius: 4px;
        accent-color: var(--pc-coral);
    }

    input:focus, select:focus {
        border-color: var(--ink);
        box-shadow: 0 0 0 3px rgba(246, 195, 67, 0.6);
    }

    .checkbox-label { font-weight: 600; }

    /* -----------------------------------------------------------------
       Buttons: navy card stock, tipping over a little when pointed at
       ----------------------------------------------------------------- */

    button {
        background-color: var(--ink);
        border-radius: 4px;
        font-weight: 800;
        letter-spacing: 0.03em;
        box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 5px 10px rgba(0, 0, 0, 0.15);
        transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
    }

    button:hover {
        transform: translateY(-1px) rotate(-1.5deg);
        box-shadow: 0 4px 0 rgba(0, 0, 0, 0.3), 0 8px 14px rgba(0, 0, 0, 0.2);
        opacity: 1;
    }

    button:disabled { opacity: 0.5; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.3); }

    .btn-info    { background-color: var(--pc-blue); }
    .btn-success { background-color: var(--pc-green); }
    .btn-danger  { background-color: var(--pc-coral); }

    .toggle-btn { background-color: var(--field); border: 2px solid var(--border); }
    .toggle-btn:hover { background-color: var(--paper-3); }

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

    .message { border-radius: 3px; font-weight: 600; }
    .message.success { background-color: #e1f0e4; color: #1d5e3a; border: 2px solid #b5d9c0; }
    .message.error   { background-color: #fbe4e2; color: #8e2430; border: 2px solid #f1b9b9; }
    .message.warning { background-color: #fdf0cc; color: #6f4b00; border: 2px solid #f0d27f; }
    .message.info    { background-color: var(--paper-2); border: 2px solid var(--border); }

    /* -----------------------------------------------------------------
       Auth pages: a paper card taped to the sunburst
       ----------------------------------------------------------------- */

    .login-container {
        position: relative;
        background-color: var(--paper);
        border-radius: 3px;
    }

    .login-container::before {
        content: "";
        position: absolute;
        z-index: 2;
        top: -2.2rem;
        left: 50%;
        width: 7rem;
        height: 1.7rem;
        margin-left: -3.5rem;
        background: var(--tape);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
        rotate: -4deg;
    }

    .login-container h1 {
        background-color: var(--ink);
        font-size: 1.7rem;
        font-weight: 400;
        letter-spacing: 0.04em;
        border-radius: 3px;
        rotate: -1.5deg;
    }

    /* -----------------------------------------------------------------
       Sidenav: a strip of navy card, the open tab a mustard tile
       ----------------------------------------------------------------- */

    .sidenav {
        background-color: var(--ink);
        border-radius: 4px;
        box-shadow: 3px 5px 0 rgba(0, 0, 0, 0.2), 0 10px 24px rgba(0, 0, 0, 0.25);
    }

    .sidenav-brand {
        font-family: "Luckiest Guy", "Nunito", sans-serif;
        font-weight: 400;
        font-size: 1.15rem;
        letter-spacing: 0.04em;
        line-height: 1.1;
    }

    /* The coral number circle of the videos' chapter titles */
    .sidenav-brand .material-symbols-rounded {
        flex: none;
        display: inline-grid;
        place-items: center;
        width: 2.5rem;
        height: 2.5rem;
        border-radius: 50%;
        background: var(--pc-coral);
        box-shadow: 1px 2px 0 rgba(0, 0, 0, 0.3);
        font-size: 1.35rem;
        rotate: -8deg;
    }

    .sidenav-divider {
        height: 0;
        background-image: none;
        border-top: 2px dashed rgba(255, 255, 255, 0.22);
    }

    .sidenav-link { font-weight: 700; border-radius: 3px; }

    .sidenav-link:hover { background-color: rgba(255, 255, 255, 0.1); rotate: -0.6deg; }

    /* The open tab is a mustard tile, cut by hand: every tab has its own
       shape and tilt, so the tile changes form as you move through the menu.
       The tile is ::before so clip-path can cut it without cutting the text;
       the drop shadow is a filter on the link, since a box-shadow would be
       clipped away along with the corners. */
    .sidenav-link.active {
        position: relative;
        z-index: 0;
        background: none;
        box-shadow: none;
        color: var(--ink);
        font-weight: 800;
        filter: drop-shadow(2px 3px 0 rgba(0, 0, 0, 0.3));
        rotate: var(--tile-tilt, -1.5deg);
    }

    .sidenav-link.active::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: -1;
        background: var(--pc-mustard);
        clip-path: var(--tile-shape, polygon(0 0, 100% 0, 100% 100%, 0 100%));
        animation: pc-tile-slap 0.18s ease-out;
    }

    .sidenav-link[data-tab="invoices"] { --tile-tilt: -1.5deg; --tile-shape: polygon(0 26%, 6% 0, 100% 5%, 98% 100%, 1% 94%); }
    .sidenav-link[data-tab="billing"]  { --tile-tilt: 1.2deg;  --tile-shape: polygon(2% 4%, 100% 0, 100% 66%, 93% 100%, 0 96%); }
    .sidenav-link[data-tab="account"]  { --tile-tilt: -0.8deg; --tile-shape: polygon(0 0, 92% 4%, 100% 34%, 99% 100%, 3% 95%); }
    .sidenav-link[data-tab="courses"]  { --tile-tilt: 1.8deg;  --tile-shape: polygon(1% 7%, 98% 0, 100% 96%, 8% 100%, 0 68%); }
    .sidenav-link[data-tab="settings"] { --tile-tilt: -2deg;   --tile-shape: polygon(3% 0, 100% 9%, 97% 90%, 52% 100%, 0 95%); }

    .sidenav-backdrop { background: rgba(15, 25, 50, 0.5); }

    /* -----------------------------------------------------------------
       Top bar: the page title on a paper banner, taped at both ends
       ----------------------------------------------------------------- */

    .topbar-left > div:last-child {
        position: relative;
        padding: 0.55rem 1.5rem 0.5rem;
        background-color: var(--paper);
        border-radius: 2px;
        box-shadow: var(--shadow-card);
        rotate: -1.2deg;
    }

    .topbar-left > div:last-child::before,
    .topbar-left > div:last-child::after {
        content: "";
        position: absolute;
        top: -0.55rem;
        width: 2.8rem;
        height: 1.1rem;
        background: var(--tape);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
    }

    .topbar-left > div:last-child::before { left: -0.9rem; rotate: -32deg; }
    .topbar-left > div:last-child::after { right: -0.9rem; rotate: 28deg; }

    .breadcrumb { font-weight: 700; }
    .topbar h1 { font-size: 1.75rem; margin-top: 0.1rem; }

    /* These sit straight on the sunburst */
    #userInfo, .company-switch {
        color: #fff;
        font-weight: 800;
        text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
    }

    /* Red on blue does not read; previewing becomes a coral sticker instead */
    #userInfo.previewing {
        padding: 0.3rem 0.8rem;
        color: #fff;
        border-radius: 3px;
        background: var(--pc-coral);
        box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
        text-shadow: none;
        rotate: 1.5deg;
    }

    .company-switch select { background: var(--field); text-shadow: none; }

    .lang-switch button.active { border-color: var(--pc-mustard); }

    .menu-toggle { background-color: var(--paper); }

    /* -----------------------------------------------------------------
       Cards
       ----------------------------------------------------------------- */

    .card { background-color: var(--paper); }

    .card-header-gradient {
        background-color: var(--ink);
        border-radius: 3px;
        rotate: -0.6deg;
    }

    .card-header-gradient h2, .card-header-gradient h3 {
        font-size: 1.2rem;
        font-weight: 400;
        letter-spacing: 0.04em;
    }

    .bg-gradient-info    { background-color: var(--pc-blue);    rotate: 0.5deg; }
    .bg-gradient-success { background-color: var(--pc-green);   rotate: 0.5deg; }
    .bg-gradient-warning { background-color: var(--pc-mustard); }
    .bg-gradient-warning h2, .bg-gradient-warning h3 { color: var(--ink); }

    /* Two-part switches: paper segments, the chosen one a mustard tile */
    .lines-customer-switch,
    .fuel-price-mode-switch {
        border: 2px solid var(--ink);
        border-radius: 4px;
        box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
    }

    .lines-customer-switch button,
    .lines-customer-switch button:hover,
    .fuel-price-mode-switch button {
        background: var(--paper);
        color: var(--ink);
        font-weight: 800;
        box-shadow: none;
        transform: none;
    }

    .lines-customer-switch button.active,
    .lines-customer-switch button.active:hover,
    .fuel-price-mode-switch button.active {
        background-color: var(--pc-mustard);
        color: var(--ink);
    }

    /* -----------------------------------------------------------------
       Tables: a dashed cut line under the headings, kraft-toned days
       ----------------------------------------------------------------- */

    .table-container { background: transparent; }

    th {
        background-color: var(--paper);
        color: var(--ink);
        font-size: 0.7rem;
        font-weight: 900;
        letter-spacing: 0.07em;
        border-bottom: 2px dashed var(--border);
    }

    #linesTable tbody tr.route-even td { background-color: #f4ecda; }
    #linesTable tbody tr.route-odd td  { background-color: #ebdfc4; }

    table.day-sections > tbody > tr > td { background-color: #f4ecda; }
    table.day-sections > tbody > tr.row-approved > td { background-color: #dcefe0; }
    table.day-sections > tbody > tr.row-pending-approval > td { background-color: #fbecc9; }
    #linesTable tbody tr.row-pending-approval td { background-color: #fbecc9; }
    tr.fuel-default-selected > td { background-color: #fbe8a6; }

    .line-details th { background-color: var(--paper-2); }
    .fuel-defaults-bulk-row th { background: var(--paper-2); }

    #linesTable td.day-total-label { color: var(--ink); font-weight: 900; }

    .approve-badge.approved,
    .approve-all-btn.approved { color: var(--pc-green); }

    .fuel-tables.bulk-armed td.desc-cell:hover { background: #fbe8a6; }

    .stub-container, .filters { background: var(--paper); }

    .billing-header-handle:hover { background: var(--paper-3); }

    /* -----------------------------------------------------------------
       Contractor sidebar
       ----------------------------------------------------------------- */

    .company-sidebar-header {
        color: var(--ink);
        font-weight: 900;
        border-bottom: 2px dashed var(--border);
    }

    .company-item:hover { background: var(--paper-3); }

    .company-item.active {
        background-color: var(--pc-mustard);
        color: var(--ink);
        box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.22);
        rotate: -1deg;
    }

    .company-item.active .company-item-name { color: rgba(27, 42, 65, 0.75); }
    .company-item-count { background: var(--paper-3); color: var(--ink); }
    .company-item.active .company-item-count { background: rgba(27, 42, 65, 0.14); color: var(--ink); }
    .company-item-approved { color: var(--pc-green); }
    .company-item.active .company-item-approved { color: var(--pc-green); }
    .company-item.active .company-item-approved.partial { color: #b35c00; }

    /* -----------------------------------------------------------------
       Fuel surcharge view
       ----------------------------------------------------------------- */

    .fuel-week + .fuel-week { border-top: 2px dashed var(--border); }

    .total-item span {
        font-family: "Luckiest Guy", "Nunito", sans-serif;
        font-weight: 400;
        font-size: 1.55rem;
        letter-spacing: 0.03em;
    }

    .total-item.highlighted span { color: var(--pc-green); }

    .route-url-stop,
    .company-choice-option { background: var(--field); }

    .return-address-option:hover,
    .company-choice-option:hover { background: var(--paper-3); }

    /* -----------------------------------------------------------------
       Account / Settings
       ----------------------------------------------------------------- */

    .account-section h2 { font-size: 1.35rem; }

    .section-count { background: var(--pc-coral); }

    .theme-option { background: var(--field); transition: rotate 0.12s ease; }
    .theme-option:has(input:checked) { border-color: var(--pc-coral); rotate: -1.5deg; }
    .theme-option:has(input:focus-visible) { outline-color: var(--pc-coral); }

    /* -----------------------------------------------------------------
       Modals
       ----------------------------------------------------------------- */

    .modal-backdrop { background: rgba(15, 25, 50, 0.55); }

    /* -----------------------------------------------------------------
       Courses: the card tops are the videos' own title sunburst
       ----------------------------------------------------------------- */

    .course-card {
        background-color: var(--paper);
        border-radius: 4px;
        transition: transform 0.15s ease;
    }

    .course-card:hover { transform: translateY(-3px) rotate(-0.8deg); }

    .course-card-top {
        background:
            radial-gradient(circle at 50% 55%, transparent 30%, rgba(0, 0, 0, 0.2)),
            repeating-conic-gradient(from 0deg at 50% 55%,
                color-mix(in srgb, var(--badge-color) 80%, white) 0deg 10deg,
                var(--badge-color) 10deg 20deg);
    }

    .course-play { color: #fff; text-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25); }

    .course-badge {
        font-weight: 900;
        border: 2px solid #fff;
        box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.25);
        rotate: -4deg;
    }

    .course-badge.large { rotate: -8deg; }

    .course-qnum {
        background: var(--pc-coral);
        font-family: "Luckiest Guy", "Nunito", sans-serif;
        font-size: 0.9rem;
        padding-top: 0.12rem;
    }

    #courseVideo { background: var(--ink); border-radius: 4px; box-shadow: var(--shadow-card); }
    .course-watch-track { background: var(--paper-3); }
    .course-summary { background: #e6f2e8; border-left-color: var(--pc-green); }
    .course-locked { background: #fdf0cc; }
    .course-question { border: 2px solid var(--border); background: var(--field); }
    .course-link-btn { color: var(--pc-blue-ink); }
    .course-edit-modal textarea { border: 2px solid var(--border); background: var(--field); }

    /* -----------------------------------------------------------------
       The cast of the films (js/cast.js): cut-outs lying on the page
       ----------------------------------------------------------------- */

    /* Always a CSS width: without one a canvas is as wide as its backing store, which
       cast.js sizes to the CSS width times devicePixelRatio, so above a ratio of 1 it
       would grow every frame. The more specific rules below set the real sizes. */
    .cast { display: block; width: 100%; filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.2)); }
    .cast-only { display: block; }

    /* A speech bubble in the films' title font */
    .cast-bubble {
        position: relative;
        display: inline-block;
        padding: 0.5rem 0.85rem 0.35rem;
        border-radius: 14px;
        background: #fff;
        color: var(--ink);
        font-family: "Luckiest Guy", "Nunito", sans-serif;
        font-size: 1rem;
        letter-spacing: 0.03em;
        line-height: 1.2;
        box-shadow: 2px 3px 0 rgba(0, 0, 0, 0.18);
        rotate: 2deg;
    }

    .cast-bubble::after {
        content: "";
        position: absolute;
        left: -0.7rem;
        bottom: 0.6rem;
        border: 0.45rem solid transparent;
        border-right: 0.75rem solid #fff;
    }

    /* An empty list: Kevin looking for everybody, above the list's own message */
    .cast-empty { display: flex; flex-direction: column; align-items: center; gap: 0.25rem; padding: 0.5rem 0 0.75rem; text-align: center; }
    .cast-scene { display: flex; align-items: flex-start; gap: 0.9rem; }
    .cast-scene .cast { width: 130px; }
    .cast-scene .cast-bubble { margin-top: 1.4rem; }
    #invoicesTable tr.empty-row td { background: transparent; }

    /* The Courses tab: Ingrid explains */
    .cast-intro { display: flex; align-items: center; gap: 1rem; margin: 0.25rem 0 0.5rem; }
    .cast-intro .cast { width: 110px; flex: none; }

    /* After a quiz: Henk cheering or Kevin sweating, next to the result */
    .course-result .cast-result { float: right; width: 120px; margin: -0.5rem 0 0.5rem 1rem; }
    .course-result::after { content: ""; display: block; clear: both; }

    /* The top bar: the three at work, between the page title and the flags.
       Each canvas shrinks with the space (its height follows its aspect ratio) */
    .cast-top {
        display: flex;
        flex: 1 1 0;
        min-width: 0;
        justify-content: center;
        align-items: flex-end;
        gap: 1.25rem;
        align-self: stretch;
    }

    .cast-top .cast { min-width: 0; flex: 0 1 auto; }
    .cast-top-ingrid { width: 150px; }
    .cast-top-henk { width: 195px; }
    .cast-top-kevin { width: 162px; }

    @media (max-width: 1100px) { .cast-top { display: none; } }

    /* Henk in the menu, pulling a face that suits the open tab */
    .cast-portrait { width: 92px; margin: 0 auto 0.25rem; }

    /* The lunch break: a paper card that slides up after fifteen quiet seconds */
    .lunch-break {
        position: fixed;
        z-index: 900;
        right: 1.5rem;
        bottom: 1.5rem;
        width: min(420px, calc(100vw - 2rem));
        padding: 0.9rem 1rem 0.6rem;
        background-color: var(--paper);
        border-radius: 3px;
        box-shadow: var(--shadow-card);
        rotate: -1.5deg;
        pointer-events: none;
        translate: 0 calc(100% + 3rem);
        transition: translate 0.5s cubic-bezier(0.2, 1.3, 0.4, 1);
    }

    .lunch-break.show { translate: 0 0; }

    .lunch-break::before {
        content: "";
        position: absolute;
        top: -0.7rem;
        left: 50%;
        width: 5.5rem;
        height: 1.4rem;
        margin-left: -2.75rem;
        background: var(--tape);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
        rotate: 3deg;
    }

    .lunch-break h3 { margin: 0 0 0.3rem; text-align: center; color: var(--ink); font-size: 1.35rem; }

    /* The three walking between the top bar and the lunch break */
    .cast-overlay {
        position: fixed;
        inset: 0;
        z-index: 1000;
        width: 100vw;
        height: 100vh;
        pointer-events: none;
        filter: drop-shadow(3px 4px 0 rgba(0, 0, 0, 0.2));
    }

    /* The login page: Henk waves from beside the card */
    .login-container .cast-login {
        position: absolute;
        left: -215px;
        bottom: -12px;
        width: 210px;
    }

    @media (max-width: 760px) { .login-container .cast-login { display: none; } }
}

/* The tile lands with a little slap, like paper put down on the table */
@keyframes pc-tile-slap {
    from { transform: scale(1.12) rotate(-3deg); opacity: 0.4; }
    to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    :where(html[data-theme="papercut"]) .sidenav-link.active::before { animation: none; }
    :where(html[data-theme="papercut"]) .lunch-break { transition: none; }
}
