/* The interactive garage: the vehicle remains visible while its notes scroll. */
.jimny-page {
    width: min(1280px, calc(100% - 64px));
    padding: 120px 0 64px;
}
.jimny-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 36px;
}
.jimny-hero .page-kicker, .jimny-intro .page-kicker {
    color: var(--accent-warm);
    font-size: .875rem;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.jimny-hero h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 4.8vw, 4.2rem);
    line-height: 1.04;
    letter-spacing: -.05em;
}
.jimny-hero h1 span { color: var(--fg-soft); }
.jimny-hero > p {
    flex: 0 1 310px;
    margin: 0 0 5px;
    color: var(--fg-soft);
    font-size: 1rem;
    line-height: 1.75;
}
.jimny-explorer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    border: 1px solid #33343c;
    border-radius: 22px;
    background: #10121a;
    box-shadow: 0 24px 80px #0004;
    overflow: hidden;
}
.jimny-map-stage, .jimny-dialog-map {
    min-width: 0;
    background:
        radial-gradient(ellipse at 48% 42%, #33404d45, transparent 63%),
        linear-gradient(#ffffff03 1px, transparent 1px),
        linear-gradient(90deg, #ffffff03 1px, transparent 1px),
        #12151e;
    background-size: auto, 32px 32px, 32px 32px, auto;
}
.jimny-map-stage { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; isolation: isolate; }
.jimny-map-stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 90% 58%, #ffb36b12, transparent 52%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.jimny-map-stage.lights-on::before { opacity: 1; }
.jimny-stage-watermark { position: absolute; top: 21%; left: 50%; transform: translateX(-50%); color: #d6dce807; font: 600 clamp(4.4rem, 11vw, 9rem)/1 var(--font-display); letter-spacing: -.06em; pointer-events: none; white-space: nowrap; z-index: -1; }
.jimny-stage-label {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-family: var(--font-mono);
    font-size: .875rem;
    color: #b0b7c0;
    align-items: center;
}
.jimny-light-switch { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 0 13px; border: 1px solid #434550; border-radius: 22px; background: #141821; color: #afb7c4; font: 400 .8125rem/1.4 var(--font-mono); white-space: nowrap; cursor: pointer; transition: color .2s, background .2s, border-color .2s; }
.jimny-light-switch[aria-pressed="true"] { border-color: #a17b4d; background: #ffc47310; color: #ffdaa6; }
.jimny-light-switch:hover { border-color: #e8b783; }
.jimny-stage-label > span:first-child, .jimny-dialog-bar > span { display: flex; align-items: center; gap: 10px; }
.jimny-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-warm); flex: 0 0 auto; box-shadow: 0 0 13px #ffb48a66; }
.jimny-map { position: relative; width: 100%; aspect-ratio: 2; margin: 14px auto 0; isolation: isolate; }
.jimny-illustration { display: block; width: 100%; height: 100%; overflow: visible; }
.jimny-map-effects { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jimny-headlight-beam { opacity: 0; transition: opacity .35s; }
.jimny-headlight-beam ellipse { filter: drop-shadow(0 0 9px #ffd391); }
.jimny-map[data-lights="on"] .jimny-headlight-beam { opacity: 1; }
.jimny-system-glow { fill: #ffc08929; stroke: #ffd0a3; stroke-width: 2; opacity: 0; filter: drop-shadow(0 0 8px #ffb48a66); transition: opacity .2s; }
.jimny-map[data-system="engine"] .glow-engine,
.jimny-map[data-system="carplay"] .glow-carplay,
.jimny-map[data-system="keys"] .glow-keys,
.jimny-map[data-system="sensor"] .glow-sensor,
.jimny-map[data-system="lighting"] .glow-lighting { opacity: 1; }
.jimny-body-shell { transition: stroke .2s, filter .2s; }
.jimny-map[data-system="platform"] .jimny-body-shell { stroke: #ffd0a3; filter: drop-shadow(0 0 7px #ffb48a44); }
.jimny-callouts { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.jimny-callouts path { fill: none; stroke: #ffb48a88; stroke-width: 1.5; stroke-dasharray: 4 4; }
.jimny-pin {
    position: absolute;
    left: var(--pin-x);
    top: var(--pin-y);
    transform: translate(-50%, -50%);
    z-index: 1;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #e5ac896e;
    border-radius: 50%;
    color: #ffd0b1;
    background: #151a23f5;
    box-shadow: 0 0 0 5px #ffb48a09, 0 6px 18px #0008;
    font-size: 1rem;
    cursor: pointer;
    transition: background .18s, color .18s, box-shadow .18s;
    touch-action: manipulation;
}
.jimny-pin:hover, .jimny-pin:focus-visible, .jimny-pin.is-selected, .jimny-pin.is-preview { color: #17130f; background: #ffb48a; box-shadow: 0 0 0 6px #ffb48a1f, 0 4px 24px #0005; z-index: 3; }
.jimny-pin-viewed { display: grid; place-items: center; position: absolute; bottom: -3px; right: -2px; width: 15px; height: 15px; border-radius: 50%; border: 2px solid #151922; color: #c7dccb; background: #354f40; font-size: 7px; pointer-events: none; }
.jimny-pin-label {
    position: absolute;
    bottom: calc(100% + 11px);
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 170px;
    padding: 6px 10px;
    border: 1px solid #51433d;
    border-radius: 6px;
    background: #1a1d25;
    color: #fff0e6;
    font: 500 .875rem/1.4 var(--font-body);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s;
}
.jimny-pin:hover .jimny-pin-label, .jimny-pin:focus-visible .jimny-pin-label { opacity: 1; }
.jimny-pin:nth-of-type(2) .jimny-pin-label { left: auto; right: 0; transform: none; }
.jimny-map-status { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin-top: 22px; }
.jimny-map-hint { margin: 0; display: flex; gap: 10px; color: #adb4bf; font-size: .875rem; }
.jimny-map-hint i { color: var(--accent-warm); align-self: center; }
.jimny-explored-count { color: #9ca6b6; font: .75rem/1.5 var(--font-mono); white-space: nowrap; }
.jimny-explored-count > span { color: #e9bea1; }
.jimny-intro { padding: 28px; border-left: 1px solid #33343c; background: #0e1119; }
.jimny-intro h2 { margin: 0 0 14px; font: 500 1.75rem/1.15 var(--font-display); letter-spacing: -.035em; }
.jimny-intro > p:not(.page-kicker) { margin: 0; color: var(--fg-soft); line-height: 1.7; }
.jimny-intro figure { margin: 24px 0 14px; }
.jimny-gallery { margin: 0 0 26px; }
.jimny-gallery-frame { position: relative; display: grid; place-items: center; height: clamp(240px, 38dvh, 420px); overflow: hidden; border: 1px solid #3b424d; border-radius: 10px; background: #080b11; }
.jimny-gallery-frame img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; animation: jimnyPhotoEnter .2s ease-out; }
.jimny-gallery.is-compact .jimny-gallery-frame { aspect-ratio: 5/4; height: auto; }
.jimny-photo-index { position: absolute; bottom: 10px; left: 10px; padding: 4px 7px; border: 1px solid #ffffff26; border-radius: 4px; background: #10141de8; color: #f0d7c5; font: .6875rem/1.4 var(--font-mono); pointer-events: none; }
.jimny-photo-index > span { color: #b5bdc8; }
.jimny-photo-tabs { display: flex; gap: 4px; margin-top: 8px; padding: 3px; border: 1px solid #353b47; border-radius: 9px; background: #11151f; }
.jimny-photo-tabs button { display: flex; align-items: center; justify-content: center; gap: 10px; flex: 1 1 0; min-width: 0; min-height: 44px; padding: 8px; border: 1px solid transparent; border-radius: 6px; color: #aab4c3; background: transparent; font: 500 .875rem/1.4 var(--font-body); cursor: pointer; }
.jimny-photo-tabs button > span { color: #959ead; font: .75rem/1.4 var(--font-mono); }
.jimny-photo-tabs button:hover { color: #ffdac3; background: #202530; }
.jimny-photo-tabs button[aria-pressed="true"] { color: #ffcfb0; border-color: #745746; background: #ffb48a12; }
.jimny-gallery.is-compact .jimny-photo-tabs button { padding-inline: 3px; font-size: .8125rem; }
.jimny-gallery.is-compact .jimny-photo-tabs button > span { display: none; }
.jimny-gallery figcaption { margin: 10px 0 0; color: #a6aeba; font-size: .875rem; line-height: 1.6; }
.jimny-gallery.is-compact figcaption { min-height: 4.8em; }
.jimny-photo-error { display: grid; justify-items: center; align-content: center; padding: 24px; text-align: center; color: #bac4d1; }
@keyframes jimnyPhotoEnter { from { opacity: .2; } to { opacity: 1; } }
.jimny-text-button { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 6px 0; border: 0; background: transparent; color: var(--accent-warm); font: 500 1rem/1.5 var(--font-body); text-align: left; cursor: pointer; }
.jimny-text-button:hover { color: #ffe4d4; }
.jimny-area-list { grid-column: 1/-1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; padding: 1px 0 0; background: #33343c; }
.jimny-area-list button { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 62px; padding: 14px 22px; color: #e2e5ec; background: #161922; border: 0; text-align: left; font: 500 1rem/1.35 var(--font-display); cursor: pointer; }
.jimny-area-list button > i:first-child { color: var(--accent-warm); width: 22px; text-align: center; }
.jimny-area-list .jimny-open-icon { margin-left: auto; color: #8993a2; font-size: .875rem; }
.jimny-area-label { display: grid; gap: 4px; }
.jimny-area-label small { color: #99a4b5; font: 400 .75rem/1.4 var(--font-body); }
.jimny-viewed-mark { display: grid; place-items: center; width: 21px; height: 21px; flex: 0 0 auto; margin-left: auto; border: 1px solid #52695b; border-radius: 50%; color: #b9cfbf; font-size: .625rem; }
.jimny-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.jimny-area-list button:hover { background: #242731; }
.jimny-page-note { margin: 20px 0 0; color: #9ca4b1; font-size: .875rem; }
.jimny-page button:focus-visible, .jimny-dialog :is(button, a, summary, [tabindex]):focus-visible { outline: 2px solid #ffd0af; outline-offset: 4px; }
.jimny-area-list button:focus-visible { outline-offset: -4px; }

.jimny-dialog {
    width: min(1320px, calc(100vw - 48px));
    height: min(860px, calc(100dvh - 48px));
    max-width: none;
    max-height: none;
    padding: 0;
    margin: auto;
    border: 1px solid #55505a;
    border-radius: 20px;
    background: #10131b;
    color: var(--fg);
    overflow: hidden;
    box-shadow: 0 40px 150px #000b;
}
.jimny-dialog::backdrop { background: #05070ce0; backdrop-filter: blur(5px); }
.jimny-dialog[open] { animation: jimnyDialogEnter .22s var(--ease-out-quart); }
@keyframes jimnyDialogEnter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.jimny-dialog-layout { height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.jimny-dialog-bar { grid-column: 1/-1; display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 16px; padding: 8px 18px 8px 24px; border-bottom: 1px solid #343742; font: 500 1rem/1.4 var(--font-display); }
.jimny-dialog-model { color: #9da6b4; }
.jimny-close { display: flex; justify-content: center; align-items: center; gap: 12px; min-width: 44px; min-height: 44px; padding: 0 14px; border: 1px solid #444954; border-radius: 8px; background: #1d212c; color: #f2f2f4; font: 500 .875rem/1.4 var(--font-body); cursor: pointer; }
.jimny-close:hover { background: #313542; }
.jimny-dialog-map { display: flex; flex-direction: column; justify-content: safe center; padding: 24px; border-right: 1px solid #343742; min-height: 0; overflow-y: auto; }
.jimny-dialog-map-label { margin: 0 0 10px; font-size: .875rem; color: #aab3bf; }
.jimny-dialog-map .jimny-map { flex: 0 0 auto; }
.jimny-section-stepper { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 24px; padding: 12px 0; border-block: 1px solid #343742; }
.jimny-section-stepper > span { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 14px; font: 500 1rem/1.4 var(--font-display); }
.jimny-step-number { color: #a8b0bc; font: 400 .875rem/1.4 var(--font-mono); }
.jimny-section-stepper button { width: 44px; height: 44px; flex: 0 0 auto; padding: 0; border: 1px solid #4a4d58; border-radius: 50%; background: #1a1e28; color: #ffd0b1; cursor: pointer; }
.jimny-section-stepper button:hover { background: #39313a; }
.jimny-dialog-areas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.jimny-dialog-areas button { min-height: 44px; padding: 8px 12px; border: 1px solid #3e4450; border-radius: 6px; background: transparent; color: #c0c7d1; font: 500 .875rem/1.4 var(--font-body); cursor: pointer; }
.jimny-dialog-areas button:hover, .jimny-dialog-areas button[aria-pressed="true"] { border-color: #ad7e61; background: #ffb48a10; color: #ffd1b5; }
.jimny-detail-scroll { min-width: 0; min-height: 0; padding: 32px; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #675646 #131620; scroll-behavior: auto; }
.jimny-entry-status { display: inline-block; padding: 4px 9px; border: 1px solid #80604b; border-radius: 5px; color: #ffc6a0; font-size: .875rem; }
.jimny-detail-heading h2 { margin: 18px 0 12px; font: 500 clamp(1.8rem, 2.8vw, 2.7rem)/1.1 var(--font-display); letter-spacing: -.04em; }
.jimny-dialog #jimny-detail-title:focus { outline: none; }
.jimny-detail-summary { margin: 0 0 26px; color: #c0c7d1; line-height: 1.7; }
.jimny-detail-copy p { margin: 0 0 20px; color: #c0c7d1; line-height: 1.8; }
.jimny-full-note { margin-top: 34px; padding-top: 24px; border-top: 1px solid #454047; }
.jimny-note-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 24px; color: #ffc6a0; font: 500 1rem/1.5 var(--font-display); }
.jimny-dialog .prose { padding: 0; font-size: 1rem; overflow-wrap: anywhere; }
.jimny-dialog .prose h2 { font-size: 1.65rem; }
.jimny-dialog .prose a { display: inline-block; max-width: 100%; vertical-align: bottom; color: #ffc6a0; text-decoration: underline; text-underline-offset: 3px; }
.jimny-dialog .prose th, .jimny-dialog .prose td, .jimny-dialog .prose img + p { font-size: .875rem; }
.jimny-dialog .prose table { max-width: 100%; }
.jimny-detail-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 36px; padding-top: 20px; border-top: 1px solid #343742; color: #a8b1bf; font-size: .875rem; }

@media (max-width: 1050px) {
    .jimny-explorer { grid-template-columns: minmax(0, 1fr) 250px; }
    .jimny-intro { padding: 22px; }
    .jimny-map-stage { padding: 20px 12px; }
    .jimny-dialog-map { padding: 20px 12px; }
    .jimny-detail-scroll { padding: 24px; }
}
@media (max-width: 760px) {
    .jimny-page { width: calc(100% - 32px); padding-top: 104px; }
    .jimny-hero { display: block; margin-bottom: 26px; }
    .jimny-hero > p { margin: 18px 0 0; max-width: 460px; }
    .jimny-hero h1 { font-size: clamp(2.35rem, 8vw, 3.5rem); }
    .jimny-explorer { grid-template-columns: minmax(0,1fr); }
    .jimny-map-stage { padding: 20px 10px; }
    .jimny-stage-label { padding: 0 6px; }
    .jimny-map { margin-top: 20px; }
    .jimny-intro { border: 0; border-top: 1px solid #33343c; }
    .jimny-intro figure { max-width: 460px; }
    .jimny-area-list { grid-row: 2; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .jimny-area-list button { padding: 12px 14px; gap: 9px; font-size: .875rem; }
    .jimny-page-note { padding: 0 2px; }
    .jimny-dialog { width: 100%; height: 100dvh; margin: 0; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); border: 0; border-radius: 0; }
    .jimny-dialog-layout { grid-template-columns: minmax(0,1fr); grid-template-rows: auto auto minmax(0,1fr); }
    .jimny-dialog-bar { grid-column: 1; padding: max(6px,env(safe-area-inset-top)) 12px 6px 18px; min-height: 56px; }
    .jimny-dialog-map { border-right: 0; border-bottom: 1px solid #45404a; padding: 0 12px; overflow: visible; }
    .jimny-dialog-map-label, .jimny-dialog-areas { display: none; }
    .jimny-dialog-map .jimny-map { width: min(100%, 480px, max(280px, 48dvh)); margin: 0 auto; }
    .jimny-section-stepper { padding: 4px 0; margin: 0; border: 0; }
    .jimny-section-stepper > span { font-size: .875rem; }
    .jimny-detail-scroll { padding: 24px 20px max(28px,env(safe-area-inset-bottom)); }
    .jimny-detail-heading h2 { font-size: 2rem; }
    .jimny-stage-label { gap: 8px; font-size: .75rem; }
    .jimny-light-switch { gap: 7px; padding-inline: 10px; font-size: .75rem; }
    .jimny-map-status { justify-content: center; gap: 8px 16px; }
    .jimny-area-list button > i:first-child { width: 18px; flex: 0 0 auto; }
    .jimny-area-label small { font-size: .6875rem; }
    .jimny-area-list .jimny-open-icon, .jimny-viewed-mark { display: none; }
    .jimny-area-list button.is-viewed { box-shadow: inset 3px 0 #778e7c; }
    .jimny-area-list .jimny-viewed-mark { position: absolute; display: block; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); border: 0; }
    .jimny-gallery-frame { height: 280px; }
    .jimny-pin-label { display: none; }
}
@media (max-height: 520px) and (min-width: 560px) and (max-width: 950px) and (orientation: landscape) {
    .jimny-dialog { width: 100%; height: 100dvh; margin: 0; padding-inline: env(safe-area-inset-left) env(safe-area-inset-right); border: 0; border-radius: 0; }
    .jimny-dialog-layout { grid-template-columns: minmax(280px,.9fr) minmax(0,1.1fr); grid-template-rows: auto minmax(0,1fr); }
    .jimny-dialog-bar { grid-column: 1/-1; min-height: 50px; padding-block: 3px; }
    .jimny-dialog-map { grid-row: 2; padding: 10px; overflow-y: auto; border-right: 1px solid #343742; }
    .jimny-dialog-map .jimny-map { width: 100%; margin: 0; }
    .jimny-dialog-map-label, .jimny-dialog-areas { display: none; }
    .jimny-section-stepper { padding: 4px 0; margin: 0; }
    .jimny-detail-scroll { grid-column: 2; grid-row: 2; padding: 20px; }
    .jimny-pin-label { display: none; }
}
@media (max-height: 520px) and (max-width: 559px) and (orientation: landscape) {
    /* Keep room for the notes at high zoom; the section stepper stays available. */
    .jimny-dialog-map .jimny-map { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .jimny-dialog[open], .jimny-gallery-frame img { animation: none; }
    .jimny-pin, .jimny-pin-label, .jimny-light-switch, .jimny-map-stage::before, .jimny-headlight-beam, .jimny-system-glow, .jimny-body-shell { transition: none; }
}
