/* Portrait art direction. The machine, access points and reading column have dedicated space. */
@media (max-width:600px) and (orientation:portrait) {
    body.home .hero {
        --machine-height: min(97vw, 49svh);
        --machine-bottom: clamp(105px, 14svh, 150px);
        min-height: max(610px, 100svh);
        align-items:flex-start;
        padding-top:clamp(85px, 11svh, 120px);
        background:radial-gradient(ellipse at 85% 44%,#103345 0%,#091b25 45%,#07151b 78%);
    }
    body.home .hero .plate {
        inset:auto 0 var(--machine-bottom);
        height:var(--machine-height);
        background-size:auto 100%;
        background-position:right center;
        background-repeat:no-repeat;
        background-color:transparent;
        mask-image:linear-gradient(to bottom,transparent,#000 14%,#000 81%,transparent);
    }
    body.home .hero-shade {background:linear-gradient(180deg,#06131b10 20%,transparent 53%,#04151b20 78%,#05151cd9)}
    .hero-copy {width:100%;max-width:32em}
    .hero .ey {font-size:clamp(9px,2.4vw,12px);letter-spacing:.09em}
    .hero .hero-copy h1 {
        font-size:clamp(42px,11.15vw,65px);
        letter-spacing:-.035em; line-height:.98;
        margin:clamp(11px,1.8svh,18px) 0 10px;
    }
    .hero-copy p {font-size:clamp(16px,4.45vw,21px);line-height:1.17;margin:0 0 14px}
    .hero-copy .action {min-height:46px; padding:11px 16px}
    body.home .hero .hangar-pin,
    body.home .hero .inspect {
        top:auto;bottom:79px;min-height:44px;
        display:flex;align-items:center;justify-content:center;
        width:calc((100% - var(--g)*2 - 8px)/2);
        margin:0; border:1px solid #5a858a;
        color:#e5f5f1;background:#0a2029ed;font:600 clamp(10px,2.8vw,13px)/1.2 system-ui;
        white-space:normal;text-align:center;
    }
    body.home .hero .inspect {left:var(--g);right:auto;padding:6px}
    body.home .hero .hangar-pin {left:auto;right:var(--g);gap:4px;padding:5px}
    body.home .hero .hangar-pin i {width:21px;height:21px;flex:none;font-size:12px;box-shadow:none}
    body.home .hero .hangar-pin span {padding:0;background:none;border:0}
    .hero .rail {
        bottom:10px;gap:8px;
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
    .hero .rail a {min-height:56px;padding-top:6px;font-size:clamp(11px,2.9vw,15px);line-height:1.15}
    .hero .rail small {font:10px/1.2 monospace;color:#a7d3c9;margin-bottom:3px}
    .facility.chapter {grid-template-columns:minmax(0,1fr)}
    .facility-copy,.facility-map,.facility-copy nav,.facility-copy nav a {min-width:0}
    .facility-copy nav {max-width:100%}
    .facility-copy nav a {overflow-wrap:anywhere}

    /* Keep the shot and all registered light, fan and door layers in their original frame. */
    .rooms>.scene-cover[data-section]:not([data-section="article"]) .scene-heading h1 {
        margin:9px 0 11px;line-height:.99;letter-spacing:-.035em;font-size:clamp(38px,10.9vw,64px);
    }
    .rooms>.scene-cover[data-section] .scene-heading p {line-height:1.38;max-width:34ch;margin-bottom:15px}
    .rooms>.scene-cover[data-section] .scene-heading .cover-path {font-size:10px;letter-spacing:.055em;gap:8px}
    .rooms>.scene-cover[data-section] .scene-heading .cover-path i {width:21px}
    .rooms>.scene-cover[data-section="article"] {
        min-height:max(590px,83svh);justify-content:stretch;align-content:end;
        gap:14px;padding:82px var(--g) 56px;
    }
    .rooms>.scene-cover[data-section="article"]>.archive-frame {
        justify-self:start;margin-left:4px;width:min(83%,320px);transform:rotate(-1.3deg);
    }
    .rooms>.scene-cover[data-section="article"]>.archive-frame img {max-height:24svh}
    .rooms>.scene-cover[data-section="model"] {min-height:max(570px,88svh)}
    .equipment-page .model-actions {gap:6px}
    .equipment-page .model-actions a {min-width:0;min-height:64px}
    .equipment-page .model-actions a b {font-size:clamp(18px,4.7vw,25px)}
    .equipment-page .sf-data-sheet .quiet {min-height:44px;white-space:normal}
    .story-guide .story-back,.story-sections summary,.jt-results a {display:inline-flex;align-items:center;min-height:44px}
    .journal-search .jt-input :is(input,button) {min-height:46px;font-size:16px}
    .stock-floor .sf-filter {display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
    .stock-floor .sf-filter label {min-width:0;padding:8px 10px}
    .stock-floor .sf-filter select {font-size:16px;min-height:44px}
    .stock-floor .sf-filter .sf-apply {min-height:46px}
    .request form :is(input:not([type=checkbox]),select,textarea) {min-height:46px;font-size:16px}
    .request form :is(input,select,textarea):focus-visible,.journal-search .jt-input input:focus-visible {
        outline:2px solid #a7edd6;outline-offset:1px;
    }
    .request .split {min-width:0}
    .request form {min-width:0;scroll-margin-top:88px}
    .request form .action {min-height:48px}

    /* The two rental controls share the clear strip below the mast.
       Let the actual door and its separate 3D entrance keep independent hits. */
    #main>.scene-cover[data-section="44"]>:is(.live-door-switch,.hangar-pin) {
        top:82px;bottom:auto;transform:none;box-sizing:border-box;
        width:calc((100% - var(--g) - var(--g) - 8px)/2);min-width:0;min-height:44px;
        justify-content:center;gap:5px;padding:5px;white-space:normal;text-align:center;
    }
    #main>.scene-cover[data-section="44"]>.live-door-switch {left:var(--g);right:auto}
    #main>.scene-cover[data-section="44"]>.hangar-pin {left:auto;right:var(--g);display:flex;align-items:center;background:#11272bea;color:#f2fbf7;border:1px solid #708c8b;border-radius:3px}
    #main>.scene-cover[data-section="44"]>.hangar-pin span {display:flex;align-items:center;gap:4px;padding:0;background:none;border:0;white-space:nowrap;font:600 11px/1.2 ui-monospace,monospace}
    #main>.scene-cover[data-section="44"]>.hangar-pin i {display:none}

    /* An archival photo in a short dossier deserves the same reading width
       as the text. Its original contents and the archive attribution remain visible. */
    #main>.record-summary .record-spine {grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}
    #main>.record-summary .record-spine>:is(.record-photo,.record-label,h2,.quiet) {grid-column:1;grid-row:auto}
    #main>.record-summary .record-label {order:1}
    #main>.record-summary .record-spine h2 {order:2}
    #main>.record-summary .record-photo {order:3;width:100%}
    #main>.record-summary .record-photo img {display:block;width:100%;height:auto;max-height:55svh;object-fit:contain;background:#08171b}
    #main>.record-summary .record-photo figcaption {display:flex;align-items:baseline;gap:8px;font:500 11px/1.4 system-ui;margin:5px 0}
    #main>.record-summary .quiet {order:4;justify-self:start;min-height:44px;display:inline-flex;align-items:center}

    /* The imported leading picture used to float in an 84px side column
       inside the narrow journal paper, leaving only a few words per line. */
    #read .story-prose>p:first-child:has(img) {float:none;width:100%;margin:.15em 0 1em}
    #read .story-prose>p:first-child img {width:100%;height:auto;max-height:min(40svh,245px);object-fit:contain}
}
