/* ==========================================================================================================
   The chassis: where things stand and when they show — nothing about how they look (2026-10-01)
   ==========================================================================================================
   The owner: 可以把旧的class都先删了吗 — the old rooms' stylesheets went (39 files). These few rules were the
   only parts of them the folio's rooms stood on: the menu drawer kept off the screen until opened, the trip's
   Contents drawer and its scrim. Taken out of 17b and 17zc as they were, without their dress (the trip page's
   own frame, once here too, is css/66-folio-trip.css since 2026-10-01). A
   room still in the old world now shows unstyled; that is the owner's call for the test address. */

/* The menu drawer, from the left. */
.sidebar { position: fixed; top: 0; left: -300px; width: 300px; height: 100vh; height: 100dvh; z-index: 2000; overflow-y: auto; display: flex; flex-direction: column; background: var(--fo-paper, #F7F6F3); transition: left .3s ease; }
.sidebar.active { left: 0; }
.sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 1999; background: rgba(26,22,20,0.42); }
.sidebar-overlay.active { display: block; }

/* The trip's Contents drawer, from the right, over its scrim. */
#tripDetailsBackdrop { position: fixed; inset: 0; z-index: 40; background: rgba(26,22,20,0.42); opacity: 0; pointer-events: none; transition: opacity .3s; }
#tripDetailsBackdrop.open { opacity: 1; pointer-events: auto; }
#tripDetailsDrawer { position: fixed; top: 0; right: 0; bottom: 0; width: calc(100% - 60px); max-width: 360px; z-index: 41; display: flex; flex-direction: column; overflow: hidden; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s linear .3s; }
#tripDetailsDrawer.open { visibility: visible; transform: translateX(0); transition: transform .3s ease; }

/* The loading layer (showLoading, 01-core.js). Its dress went with 17zd-leftovers.css and it stood unstyled at the foot
   of every page, "Loading..." on a phone (owner, 2026-10-01). Hidden until asked for; then the words in the mono over
   the paper, with the running stroke of §46 G. */
.loading-overlay { display: none; }
.loading-overlay.active { position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center; background: rgba(247,246,243,0.78); }
.loading-overlay .loading-spinner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.loading-overlay .loading-spinner-ring { position: relative; width: 120px; height: 2px; overflow: hidden; background: var(--fo-rule, #E3E3DE); }
.loading-overlay .loading-spinner-ring::after { content: ''; position: absolute; top: 0; bottom: 0; width: 30%; background: var(--fo-ink, #1A1614); animation: fo-run2 1.3s ease-in-out infinite; }
.loading-overlay .loading-spinner-text { font-family: var(--fo-mono, monospace); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite, #66635F); }

/* The upload's progress (showUploadProgress, 01-core.js), unstyled since 17zd went: a card at the foot, the file
   and its count, a thin line filling. Shown by its own display; nothing else here. */
#uploadProgressOverlay { position: fixed; left: 16px; right: 16px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 9400; display: none; justify-content: center; pointer-events: none; }
#uploadProgressOverlay .upload-progress-card { width: 100%; max-width: 400px; box-sizing: border-box; padding: 12px 16px; background: var(--fo-ink, #1A1614); color: var(--fo-card, #FDFCFA); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px 10px; }
#uploadProgressOverlay .upload-progress-count, #uploadProgressOverlay .upload-progress-pct { font-family: var(--fo-mono, monospace); font-size: 10px; letter-spacing: 0.12em; }
#uploadProgressOverlay .upload-progress-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
#uploadProgressOverlay .upload-progress-track { grid-column: 1 / -1; grid-row: 2; height: 2px; background: rgba(253,252,250,0.25); }
#uploadProgressOverlay .upload-progress-fill { height: 100%; background: var(--fo-card, #FDFCFA); transition: width .2s; }

/* A photograph's place on the map (openPhotoPlaceCard, 03-map-plan.js): a sheet from the foot while it is open, and
   nothing at all when it is not — without its old dress it stayed on the page after Close. */
.ppc { display: none; }
.ppc.is-open { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9001; max-height: 60vh; overflow-y: auto; box-sizing: border-box; padding: 14px 24px calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--fo-paper, #F7F6F3); border-radius: 20px 20px 0 0; box-shadow: 0 -6px 18px rgba(26,22,20,0.10); display: flex; flex-direction: column; gap: 8px; }
.ppc-head { display: flex; justify-content: space-between; align-items: center; }
.ppc-title { font-family: var(--fo-serif, Georgia, serif); font-size: 16px; }
.ppc-close { min-height: 44px; padding: 0; border: none; background: transparent; font: inherit; font-size: 14px; color: var(--fo-ink, #1A1614); cursor: pointer; }
.ppc-also, .ppc-count { font-family: var(--fo-mono, monospace); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite, #66635F); }
.ppc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ppc-tile { position: relative; aspect-ratio: 1; padding: 0; border: none; background: var(--fo-bone, #E6E4DE); overflow: hidden; cursor: pointer; }
.ppc-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ppc-fav { position: absolute; right: 4px; top: 4px; color: var(--fo-card, #FDFCFA); }

/* The maintenance panel (#admin, 18-diagnostics.js), back 2026-10-07: its rules went with the old sheets on 2026-10-01
   (9e46d5f0) and the panel has opened since as an unstyled block at the foot of the page, under the app, where nobody
   could see it. Taken back as they were. */
        .admin-panel {
            position: fixed;
            inset: 0;
            z-index: 99998;
            display: flex;
            flex-direction: column;
            background: #1B1B1B;
            color: #E8E8E3;
            font: 12px/1.5 ui-monospace, Menlo, monospace;
            padding-top: env(safe-area-inset-top, 0px);
            padding-bottom: env(safe-area-inset-bottom, 0px);
        }

        .admin-head {
            flex: none;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 8px 12px;
            border-bottom: 1px solid #3A3A3A;
            letter-spacing: 2px;
            text-transform: uppercase;
        }

        .admin-close {
            border: none;
            background: transparent;
            color: #E8E8E3;
            min-height: 44px;
            padding: 0;
            font-size: 14px;   /* Close, a bar word on the dark (2026-10-21; it was a 21px ×) */
            line-height: 1;
            cursor: pointer;
        }

        .admin-body {
            flex: 1;
            min-height: 0;
            overflow-y: auto;
            padding: 12px;
        }

        .admin-job {
            border: 1px solid #3A3A3A;
            padding: 8px;
            margin-bottom: 12px;
        }

        .admin-job-name { color: #E0B45C; margin-bottom: 4px; }
        .admin-job-desc { color: #9A9A94; margin-bottom: 12px; }

        .admin-actions { display: flex; gap: 8px; }

        .admin-actions button {
            flex: 1;
            padding: 8px;
            border: 1px solid #6A6A64;
            background: transparent;
            color: #E8E8E3;
            font: inherit;
            letter-spacing: 1px;
            text-transform: uppercase;
            cursor: pointer;
        }

        /* The write button is disabled until a dry run has found something. A destructive
           action should not be reachable before the report that justifies it. */
        .admin-actions button:disabled {
            border-color: #3A3A3A;
            color: #5A5A55;
            cursor: default;
        }

        .admin-out {
            margin: 0;
            padding: 8px;
            border: 1px solid #3A3A3A;
            background: #111;
            color: #C8C8C2;
            white-space: pre-wrap;
            word-break: break-word;
            font: inherit;
        }

        .admin-input {
            width: 100%;
            margin-top: 8px;
            padding: 8px;
            border: 1px solid #3A3A3A;
            background: #111;
            color: #E8E8E3;
            font: inherit;
        }

        .admin-input::placeholder { color: #6A6A64; }
