/* Where's Ian? - rebuilt on A Very British Day's viewport/header/stage layout. */
:root{--beige:#eee5d6;--paper:#fffaf0;--ink:#342b22;--muted:#796b5a;--edge:#d8c7ae}
body{background:#e9dfcc;color:var(--ink)}
.pub-page{padding:8px clamp(10px,1.2vw,24px) 10px;gap:8px}
.pub-header .back-link{color:#5d4333}.pub-header .project-label{color:#342b22}.pub-header .phase{color:#806d56}
.experience{min-height:0;flex:1;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:8px;overflow-x:auto;overflow-y:hidden}
/* British Day stage sizing and positioning - one stage, one viewport */
.scene-frame{position:relative;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:calc(min(100%,(100svh - 115px)*1672/941)*1.5);flex:0 0 auto;margin-inline:auto;height:100%;aspect-ratio:auto;max-width:none;max-height:100%;border:1px solid #b7a58d;border-radius:10px;overflow:hidden;background:var(--beige);box-shadow:0 12px 28px #57483124}
.ian-map-slot,.ian-panel-slot,.ian-third-slot{min-width:0;min-height:0;height:100%;overflow:hidden}.ian-map-slot,.ian-panel-slot{border-right:1px solid #d6c4ac}.ian-third-slot{background:var(--paper)}
.map-frame{width:100%;height:100%;min-height:0;position:relative}
.map-area,#map{width:100%;height:100%;min-height:0;position:relative}.map-area{background:#e7e3d7}
/* Map engine owns all marker positions and transforms. Never override them. */
.maplibregl-map{font-family:system-ui,Arial,sans-serif}.maplibregl-ctrl-attrib{font-size:9px!important}
/* Place names are the only clickable markers; MapLibre owns their positioning. */
.place-pin{appearance:none;display:block;box-sizing:border-box;max-width:112px;min-width:53px;padding:7px 9px;border:1px solid #aa9271;border-radius:7px;background:#fffaf0f2;color:#47392b;font:700 11px/1.2 Arial,Helvetica,sans-serif;white-space:normal;text-align:center;box-shadow:0 2px 6px #342b222b;cursor:pointer}
.place-pin:hover,.place-pin:focus-visible{background:#f1e4ca;border-color:#725338;outline:2px solid #a8885c;outline-offset:1px}

.place-pin.guessed{opacity:.52}
.place-pin.correct{border:2px solid #528359;background:#e4f1dc;opacity:1}
.maplibregl-marker{z-index:2}.maplibregl-marker:hover,.maplibregl-marker:focus-within{z-index:9}
.detective{box-sizing:border-box;height:100%;padding:clamp(10px,1.3vw,18px);display:flex;flex-direction:column;gap:10px;background:var(--paper);color:var(--ink);font-family:Arial,Helvetica,sans-serif;overflow:hidden}
.controls{display:grid;grid-template-columns:1fr 1fr;gap:9px;flex:0 0 auto}.field{display:flex;flex-direction:column;gap:5px;min-width:0}.field label,.micro{color:#826c53;font:700 10px/1.4 Arial,Helvetica,sans-serif;letter-spacing:.1em}.field select{height:35px;width:100%;padding:0 7px;min-width:0;border:1px solid var(--edge);border-radius:5px;background:#fffdf8;color:var(--ink);font:11px Arial,Helvetica,sans-serif}
.primary,.secondary{cursor:pointer;padding:8px 11px;min-height:34px;border-radius:5px;font:700 11px Arial,Helvetica,sans-serif}.primary{grid-column:1/-1;border:1px solid #70513a;background:#70513a;color:white}.primary:hover{background:#513a2c}.secondary{border:1px solid #a68b70;background:#fffdf7;color:#594633;width:100%}.secondary:hover{background:#f2e7d9}
.status{display:flex;justify-content:space-between;align-items:center;gap:9px;flex:0 0 auto}.status>div{display:flex;flex-direction:column;gap:3px;min-width:0}.status strong{font:normal 17px/1.2 Georgia,serif}.status small{color:var(--muted);font:11px/1.4 Arial,Helvetica,sans-serif}.attempts{flex:0 0 auto;border:1px solid var(--edge);border-radius:20px;padding:5px 8px;white-space:nowrap;font:11px Arial,Helvetica,sans-serif}
.side-title{flex:0 0 auto}.side-title h2{margin:3px 0 0;font:normal 18px/1.2 Georgia,serif}
.reply{flex:0 0 auto;border:1px solid #dfc9a8;border-radius:6px;padding:11px;background:#f7eddd}.reply-tag{color:#885f38;font:700 10px Arial,Helvetica,sans-serif;letter-spacing:.09em}.reply p{margin:5px 0 0;font:12px/1.5 Arial,Helvetica,sans-serif}.reply.win{background:#e7f0df;border-color:#9dba8a}
.history{display:flex;flex-direction:column;flex:1;min-height:0}.history-heading{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e3d7c6;padding-bottom:8px}.history-heading h3{font:normal 16px/1.2 Georgia,serif;margin:0}.history-heading span{color:var(--muted);font:11px Arial,Helvetica,sans-serif}.history-list{flex:1;min-height:0;overflow:auto;padding-top:7px}.history-item{display:flex;gap:9px;padding:6px 0;border-bottom:1px solid #eee5d9}.history-item>span{font:700 15px Arial,Helvetica,sans-serif;color:#8c7156}.history-item b{font:700 11px Arial,Helvetica,sans-serif}.history-item p,.empty{margin:3px 0;color:var(--muted);font:11px/1.45 Arial,Helvetica,sans-serif}
.finish{flex:0 0 auto}.finish[hidden],#timeline[hidden]{display:none!important}#timeline{max-height:150px;overflow:auto;margin-top:6px;padding:9px;border:1px solid var(--edge);border-radius:5px;background:#fffdf8}#timeline h3{font:normal 18px/1.2 Georgia,serif;margin:0 0 6px}.event{display:grid;grid-template-columns:50px 1fr;gap:7px;padding:4px 0;font:11px Arial,Helvetica,sans-serif}.event time{color:#7e603f;font-weight:700}

/* Only phones stack: desktop stage/viewport remain the British Day composition. */
@media(max-width:700px){.experience{overflow:visible;align-items:center}.pub-page{height:auto;min-height:100svh}.experience{justify-content:flex-start}.scene-frame{display:flex;flex-direction:column;aspect-ratio:auto;width:100%;max-height:none;height:auto}.ian-map-slot{height:360px;flex:none;border-right:0;border-bottom:1px solid var(--edge)}.ian-panel-slot{height:auto;min-height:430px;overflow:visible;border-right:0;border-bottom:1px solid var(--edge)}.ian-third-slot{height:430px;flex:none;min-height:430px}.detective{height:auto;min-height:430px}.history{min-height:95px}.history-list{max-height:210px}.controls{grid-template-columns:1fr}.primary{grid-column:auto}}
@media(max-height:500px) and (min-width:701px){.scene-frame{width:calc(min(100%,(100svh - 92px)*1672/941)*1.5);height:100%}.detective{gap:5px;padding:7px}.side-foot{display:none}}

/* v79: panel two holds case details and a scrollable location guide;
   panel three receives the existing notebook, unchanged IDs and controls. */
.location-guide{min-height:0;flex:1;display:flex;flex-direction:column;gap:9px;border-top:1px solid #e3d7c6;padding-top:11px}
.location-guide-heading{flex:none}
.location-guide-heading h2{margin:3px 0 4px;font:normal 17px/1.2 Georgia,serif}
.location-guide-heading p{margin:0;color:var(--muted);font:11px/1.45 Arial,Helvetica,sans-serif}
.location-guide-list{overflow-y:auto;min-height:0;flex:1;overscroll-behavior:contain;padding-right:5px;scrollbar-width:thin;scrollbar-color:#c9b49a transparent}
.location-entry{border-bottom:1px solid #e8ddce;padding:8px 0 9px}
.location-entry:first-child{padding-top:2px}
.location-entry:last-child{border-bottom:0}
.location-entry h3{margin:0 0 3px;color:#72533b;font:700 12px/1.3 Arial,Helvetica,sans-serif}
.location-entry p{margin:0;color:#766756;font:11px/1.45 Arial,Helvetica,sans-serif}
.detective-notebook{height:100%;min-height:0}
@media(max-width:700px){.location-guide{flex:auto;min-height:0}.location-guide-list{flex:none;max-height:none;overflow:visible}.ian-third-slot{height:auto;min-height:350px;overflow:visible}.detective-notebook{height:auto;min-height:350px}.detective:not(.detective-notebook){min-height:0}}

/* Keep the case summary compact when there is no secondary text. */
.status small:empty{display:none}

/* v86: compact case status, positioned above the geographic map without shifting the map. */
.ian-map-slot{position:relative}
.map-status{position:absolute;z-index:12;top:10px;left:10px;display:inline-flex;align-items:center;gap:7px;max-width:calc(100% - 20px);padding:7px 10px;border:1px solid #bda88a;border-radius:6px;background:#fffaf0ed;color:#664a32;box-shadow:0 2px 8px #342b2222;font:700 11px/1.2 Arial,Helvetica,sans-serif;pointer-events:none}
.map-status-dot{flex:0 0 7px;width:7px;height:7px;border-radius:50%;background:#bb8948}
.map-status[data-state="apprehended"]{background:#e6f1e0f2;border-color:#91b38b;color:#355b3d}
.map-status[data-state="apprehended"] .map-status-dot{background:#4c8858}
.map-status[data-state="escaped"],.map-status[data-state="exhausted"]{background:#f3e5d7f2;border-color:#c49b79;color:#795137}
.map-status[data-state="escaped"] .map-status-dot,.map-status[data-state="exhausted"] .map-status-dot{background:#a26544}

/* A solved case displays only the apprehended suspect's location. */
.place-pin[hidden]{display:none !important}

/* Arrested locations vanish without leaving clickable map targets. */
.place-pin[hidden],.place-pin[aria-hidden="true"]{display:none!important;pointer-events:none!important}
