/* The frame both scenes share (RTP-17): the capability notice's box, the
   scene's chrome (title card, control bar, clock, slider, caption, help,
   toast), the loading screen and the opening's letterbox, the point-of-interest
   UI, and the phone layout. frame.mjs builds the chrome's markup; loader.mjs
   the loading screen; poi-ui.mjs the point-of-interest UI.

   These were the farm page's inline rules until RTP-17, and the Blasket page
   kept an older copy of the point-of-interest half and a bar of its own. Both
   pages now link this file, so the two scenes are dressed by one sheet. The
   rules are linked rather than fetched later because all of this is on screen
   before anything else could arrive.

   Provenance: moved from src/scenes/ireland/conamara-1910/index.html by
   Claude (claude-code), RTP-17; the rules themselves are the farm shell's. */

/* A control the site's manifest switches off (frame.mjs applyShellFeatures), and one a scene hides
   (no sound under ?mute): `#bar button{display:grid}` would otherwise outrank the hidden attribute. */
[data-shell-off]{display:none!important}
#bar [hidden]{display:none}

/* ---------------------------------------------------------------- the shell */
[data-capability-notice]{position:fixed;left:50%;bottom:calc(var(--bar-clear) + 8px);transform:translateX(-50%);
  z-index:10;max-width:min(92vw,34rem);display:grid;gap:.5rem;justify-items:start;text-align:left;
  background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--panel-shadow);padding:1.1rem 1.25rem;font-size:var(--t-base);line-height:1.6}
/* RTP-11: one notice at a time. While the capability notice is up the evidence chip and the travel
   hint wait, and the notice has a close button (core/capability/boot.mjs). */
html:has([data-capability-notice]:not([hidden])) [data-evidence-chip],html:has([data-capability-notice]:not([hidden])) [data-ftravel-hint]{visibility:hidden}
[data-capability-notice]{padding-right:3rem}
[data-capability-notice-close]{position:absolute;top:2px;right:2px;width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:3px;
  background:transparent;color:inherit;font:1.3rem/1 system-ui,sans-serif;cursor:pointer}
[data-capability-notice-close]:hover,[data-capability-notice-close]:focus-visible{background:rgba(236,232,222,.12);outline:none}
/* RTP-11: on a wide screen the notice stands to the right, clear of the stop's words down the left */
@media (min-width:960px) and (min-height:501px){[data-capability-notice]{left:auto;right:max(16px,var(--safe-r));transform:none;max-width:min(46vw,30rem)}}

/* RTP-11: in walk mode the travel hint goes, and the evidence chip moves to the right, out of the joystick's corner. */
html:has([data-walking]) [data-ftravel-hint]{visibility:hidden}
html:has([data-walking]) [data-evidence-chip]{left:auto;right:max(12px,var(--safe-r))}
/* the controls help takes the bottom left: the chip and the joystick wait while it is open */
html:has(#help:not([hidden])) [data-evidence-chip],html:has(#help:not([hidden])) [data-walk-stick]{visibility:hidden}
@media (max-width:640px) and (min-height:501px){
  /* the notice is at the top on a phone, over the stop's words: they wait until it is put away, as on the Blasket */
  html:has([data-capability-notice]:not([hidden])) [data-ftravel-stop]{visibility:hidden}
}

[data-capability-notice] strong{font-weight:500;letter-spacing:.04em}
/* 4.5:1 against the panel, and underlined, so the link is not colour-only. */
[data-capability-notice] a{color:var(--fg);text-decoration:underline;text-underline-offset:.2em;
  min-height:44px;display:inline-flex;align-items:center}
[data-capability-notice] a:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
noscript{display:block;padding:2rem 1rem;text-align:center}

/* --------------------------------------------- the scene, carried over as-is */
/* Layout: full-bleed 3D canvas; one compact monochrome control strip bottom-left; captions low-centre. Deliberately single dark look. */
:root{
  --ink:#0c0d0b;          /* ground behind canvas */
  --glass:rgba(14,15,13,.78);
  --line:rgba(236,232,222,.18);
  --fg:#ece8de;           /* bone white */
  --fg-dim:rgba(236,232,222,.82);
  /* The two faces are self-hosted (assets/shared/fonts/, linked in the
     head); the proof-of-concept page fetched them per visitor from a webfont
     host, which commitments 4 and 5 forbid. The local fallbacks stay in the
     stacks for the moment before they arrive. */
  --display:"IM Fell English", "Iowan Old Style", Georgia, serif;
  --sc:"IM Fell English SC", "IM Fell English", "Iowan Old Style", Georgia, serif;
  --ui:"IBM Plex Sans Condensed", "Arial Narrow", system-ui, sans-serif;
  /* The type scale, and the publication's finish: one accent (straw), one
     panel ground, one hairline. Every panel on the farm is set from these. */
  --t-xs:.875rem;--t-sm:.9rem;--t-base:.9375rem;--t-md:1.0625rem;--t-lg:1.375rem;--t-xl:1.75rem;
  --lead:1.62;--measure:34em;
  --accent:#c9a96a;
  --panel:linear-gradient(180deg,rgba(22,22,19,.8),rgba(12,13,11,.72));
  --panel-shadow:0 1px 0 rgba(255,250,235,.05) inset,0 24px 60px -28px rgba(0,0,0,.7);
  --radius:2px;
  --ease:cubic-bezier(.2,.7,.2,1);
  color-scheme:dark;
  /* The Blasket shell's names (src/scenes/ireland/blasket/index.html). Anything fixed
     near the bottom stands on --bar-clear, the bar's height plus its gap and
     the home-indicator inset, so nothing has to know how tall the bar is. */
  --safe-t:env(safe-area-inset-top,0px);--safe-r:env(safe-area-inset-right,0px);
  --safe-b:env(safe-area-inset-bottom,0px);--safe-l:env(safe-area-inset-left,0px);
  --bar-h:38px;--bar-gap:12px;--bar-clear:calc(var(--bar-h) + var(--bar-gap) + var(--safe-b));
}
html,body{height:100%;margin:0;overflow:hidden;background:var(--ink);color:var(--fg);font-family:var(--ui);
  overscroll-behavior:none;-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* The scene keeps every touch for itself: no page scroll, no pull-to-refresh, no
   double-tap zoom and so no tap delay. A sheet that scrolls opts back in below. */
[data-capability-region="scene"]{touch-action:none;-webkit-tap-highlight-color:transparent}
#bar,#intro,canvas#c{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
canvas#c{position:fixed;inset:0;width:100%;height:100%;display:block;touch-action:none;cursor:grab}
canvas#c.drag{cursor:grabbing}
#grain{position:fixed;inset:-64px;pointer-events:none;opacity:.07;mix-blend-mode:overlay;animation:grain .5s steps(4) infinite}
@keyframes grain{0%{transform:translate(0,0)}25%{transform:translate(-23px,17px)}50%{transform:translate(31px,-9px)}75%{transform:translate(-11px,-29px)}100%{transform:translate(0,0)}}
#vign{position:fixed;inset:0;pointer-events:none;background:radial-gradient(ellipse at 50% 45%,rgba(0,0,0,0) 55%,rgba(0,0,0,.28) 100%)}
#intro{position:fixed;inset:0;display:grid;place-items:center;background:rgba(8,9,8,.42);transition:opacity 1.6s ease;z-index:5;
  padding:var(--safe-t) max(16px,var(--safe-r)) var(--safe-b) max(16px,var(--safe-l))}
#intro.gone{opacity:0;pointer-events:none}
#intro .card{max-width:30rem;text-align:center;display:grid;gap:.9rem;justify-items:center}
#intro h1{font-family:var(--display);font-weight:400;font-size:clamp(2.8rem,8vw,4.8rem);line-height:1;margin:0;letter-spacing:.03em;text-wrap:balance;text-shadow:0 2px 30px rgba(0,0,0,.45)}
#intro h1::after{content:"";display:block;width:3rem;height:1px;margin:1.1rem auto 0;background:var(--accent)}
#intro .sub{font-family:var(--display);font-style:italic;font-size:clamp(1.05rem,2.4vw,1.25rem);line-height:1.45;margin:0;color:rgba(236,232,222,.8);max-width:26em;text-wrap:balance}
#intro .statement{margin:.9rem 0 0;font-size:.92rem;line-height:1.45;color:rgba(236,232,222,.78);max-width:30em;text-wrap:balance}
#intro .statement[hidden]{display:none}
#intro button{margin-top:.6rem;font:600 var(--t-xs)/1 var(--ui);letter-spacing:.22em;text-transform:uppercase;color:var(--fg);background:rgba(12,13,11,.35);border:1px solid rgba(236,232,222,.5);padding:1rem 1.8rem;min-height:48px;border-radius:var(--radius);cursor:pointer;touch-action:manipulation;
  transition:background .3s,color .3s,border-color .3s}
#intro button:hover,#intro button:focus-visible{background:var(--fg);color:var(--ink);border-color:var(--fg);outline:none}
#intro button:focus-visible{outline:2px solid var(--accent);outline-offset:4px}
#intro .hint{font-size:var(--t-sm);letter-spacing:.04em;color:var(--fg-dim);margin:0}
.load{font-size:.875rem;letter-spacing:.12em;text-transform:uppercase;color:var(--fg-dim)}
#bar{position:fixed;left:max(14px,var(--safe-l));bottom:calc(var(--bar-gap) + var(--safe-b));box-sizing:border-box;height:var(--bar-h);display:flex;align-items:center;gap:2px;background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--panel-shadow);padding:3px;z-index:4;transition:opacity .6s,visibility .6s}
#bar.hide{opacity:0;pointer-events:none}
#bar [data-control-slot]{display:contents}
#bar button{width:30px;height:30px;display:grid;place-items:center;flex:none;background:transparent;border:0;border-radius:2px;color:var(--fg);cursor:pointer;padding:0;touch-action:manipulation}
#bar button[aria-expanded="true"]{background:rgba(236,232,222,.2)}
#bar button{transition:background .2s,color .2s}
#bar button:hover,#bar button:focus-visible{background:rgba(236,232,222,.1);color:var(--accent);outline:none}
#bar button:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}
#bar svg{width:15px;height:15px;flex:none;stroke:currentColor;fill:none;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
#bar .sep{width:1px;height:18px;background:var(--line);margin:0 4px}
#clock{font:500 .875rem/1 var(--ui);font-variant-numeric:tabular-nums;letter-spacing:.04em;width:3.1em;text-align:right;color:var(--fg)}
#time{width:min(34vw,150px);accent-color:var(--fg);margin:0 6px;height:18px;touch-action:none}
#time::-webkit-slider-runnable-track{height:1px;background:var(--fg-dim)}
#time::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:9px;height:9px;border-radius:50%;background:var(--fg);margin-top:-4px;box-shadow:0 0 0 3px rgba(201,169,106,.25)}
#time:focus-visible{outline:2px solid var(--fg);outline-offset:2px}
#time{-webkit-appearance:none;appearance:none;background:transparent}
#time::-moz-range-track{height:1px;background:var(--fg-dim)}
#time::-moz-range-thumb{width:9px;height:9px;border:0;border-radius:50%;background:var(--fg)}
#cap{position:fixed;left:50%;bottom:calc(var(--bar-clear) + 14px);transform:translateX(-50%);width:min(92vw,40rem);text-align:center;font-family:var(--display);font-style:italic;font-size:clamp(1rem,2.2vw,1.3rem);color:var(--fg);text-shadow:0 1px 12px rgba(0,0,0,.55),0 0 2px rgba(0,0,0,.4);opacity:0;transition:opacity 1.8s ease;pointer-events:none;z-index:3;text-wrap:balance}
#cap.on{opacity:1}
/* The caption shares the foot of the frame with the evidence chip (bottom left, up to 14rem wide)
   and the travel hint (centre, a line above the bar). At 1024 x 768 the three overprinted each
   other on Mizen Head, where every stop has a caption. Wide enough to read, never under the chip,
   and lifted a line while the hint is up. */
@media (min-width:641px) and (min-height:501px){
  #cap{width:clamp(16rem,100vw - 32rem,40rem)}
  html:has([data-ftravel].hint:not(.used)) #cap{bottom:calc(var(--bar-clear) + 62px)}
}
/* RTP-20: a soft dark wash behind words set straight over the scene */
#cap,#toast{background:radial-gradient(closest-side,rgba(8,9,7,.7),rgba(8,9,7,.62) 72%,rgba(8,9,7,0));padding:.7rem 2rem}
#help{position:fixed;left:max(14px,var(--safe-l));bottom:calc(var(--bar-clear) + 8px);background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--panel-shadow);padding:1rem 1.2rem;font-size:var(--t-sm);line-height:1.75;z-index:4;max-width:min(88vw,20rem);color:rgba(236,232,222,.86)}
#help b{font-weight:600;letter-spacing:.06em;color:var(--fg)}
#help p + p{border-top:1px solid rgba(236,232,222,.07);padding-top:.15rem;margin-top:.15rem}
#help p{margin:0}
/* RTP-10: on a touch device the lines and help rows that name keys give way to touch ones (look/input-words.mjs). */
html[data-input="touch"] [data-keys-line],html[data-input="touch"] #help [data-help-keys],html[data-input="mouse"] [data-touch-line],html[data-input="mouse"] #help [data-help-touch]{display:none}
@media (pointer:coarse){html:not([data-input]) [data-keys-line],html:not([data-input]) #help [data-help-keys]{display:none}}
#toast{position:fixed;top:calc(26px + var(--safe-t));left:50%;transform:translateX(-50%);font:400 var(--t-md)/1.2 var(--sc);letter-spacing:.12em;text-transform:lowercase;color:var(--fg);text-shadow:0 1px 10px rgba(0,0,0,.6),0 0 2px rgba(0,0,0,.5);opacity:0;transition:opacity .8s;pointer-events:none;z-index:3;text-align:center;padding:0 16px}
#toast.on{opacity:1}
@media (prefers-reduced-motion:reduce){#intro,#cap,#toast{transition:none}#grain{animation:none}}

/* ------------------------------------------------- the loading screen and the opening */
/* loader.mjs builds the loading screen over the guard's loading region, and
   opening.mjs the letterbox, the dip and the Skip button over the scene. The
   rules are here rather than fetched because both are on screen before
   anything else could arrive. Everything that moves, moves by transform or
   opacity, so the compositor keeps it going while the land is being built. */
[data-harvest-loader]{position:fixed;inset:0;z-index:30;display:grid;place-items:center;padding:0 16px;
  background:radial-gradient(ellipse 120% 90% at 50% 58%,#1d1c16 0%,#11120f 46%,#070807 100%);
  color:var(--fg);transition:opacity 1.6s cubic-bezier(.4,0,.2,1),visibility 0s linear 1.6s}
[data-harvest-loader].gone{opacity:0;visibility:hidden;pointer-events:none}
[data-harvest-loader] .card{display:grid;justify-items:center;gap:.85rem;text-align:center;max-width:32rem;
  transition:transform 1.8s cubic-bezier(.3,0,.2,1)}
[data-harvest-loader].gone .card{transform:scale(1.04)}
[data-harvest-loader] .title{margin:0;font-family:var(--display);font-weight:400;font-size:clamp(2.6rem,9vw,4.6rem);
  line-height:1;letter-spacing:.04em;animation:ld-in 2.4s cubic-bezier(.2,.6,.2,1) both}
[data-harvest-loader] .sub{margin:0;font-family:var(--display);font-style:italic;font-size:clamp(1rem,3.4vw,1.2rem);
  color:var(--fg-dim);text-wrap:balance;animation:ld-in 2.4s .35s cubic-bezier(.2,.6,.2,1) both}
[data-harvest-loader] .track{position:relative;width:min(62vw,15rem);height:1px;margin-top:1.4rem;overflow:hidden;
  background:rgba(236,232,222,.14);animation:ld-in 1.6s .6s ease both}
[data-harvest-loader] .bar{position:absolute;inset:0;background:var(--fg);transform-origin:0 50%;transform:scaleX(0);will-change:transform}
[data-harvest-loader] .glint{position:absolute;top:0;bottom:0;left:0;width:30%;
  background:linear-gradient(90deg,transparent,rgba(255,250,235,.85),transparent);animation:ld-glint 2.2s 1s ease-in-out infinite;will-change:transform}
@keyframes ld-in{from{opacity:0;transform:translateY(.5rem)}to{opacity:1;transform:none}}
@keyframes ld-glint{from{transform:translateX(-110%)}to{transform:translateX(370%)}}

[data-opening-bars]{position:fixed;inset:0;pointer-events:none;z-index:6}
[data-opening-bars]::before,[data-opening-bars]::after{content:"";position:absolute;left:0;right:0;height:max(7vh,36px);
  background:#060706;transition:transform 1.5s cubic-bezier(.6,0,.2,1)}
[data-opening-bars]::before{top:0}
[data-opening-bars]::after{bottom:0}
[data-opening-bars].out::before{transform:translateY(-101%)}
[data-opening-bars].out::after{transform:translateY(101%)}
[data-opening-dip]{position:fixed;inset:0;pointer-events:none;z-index:7;background:#060706;opacity:0;transition:opacity .65s ease}
[data-opening-dip].on{opacity:1;transition:opacity .22s ease-in}
[data-opening-skip]{position:fixed;right:max(16px,env(safe-area-inset-right,0px));
  bottom:calc(max(7vh,36px) + 14px + env(safe-area-inset-bottom,0px));z-index:8;
  width:44px;height:44px;display:grid;place-items:center;padding:0;border-radius:50%;
  color:var(--fg);background:var(--glass);border:1px solid var(--line);
  backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px);cursor:pointer;
  opacity:0;transform:translateY(6px);transition:opacity .9s ease,transform .9s ease,background .2s,border-color .2s}
[data-opening-skip].on{opacity:.82;transform:none}
[data-opening-skip]:hover,[data-opening-skip]:focus-visible{opacity:1;border-color:var(--fg);background:rgba(236,232,222,.14);outline:none}
[data-opening-skip]:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
[data-opening-skip] svg{width:16px;height:16px;fill:currentColor;stroke:currentColor;stroke-width:1.2;stroke-linejoin:round;stroke-linecap:round}
html[data-opening] #intro{opacity:0;pointer-events:none}
html[data-opening] #bar,html[data-opening] #cap,html[data-opening] #toast,html[data-opening] [data-poi-root],
html[data-opening] [data-capability-notice]{opacity:0!important;pointer-events:none!important}
html[data-opening] canvas#c{cursor:default}
/* The point-of-interest layer waits until the visitor has the camera. It is
   mounted after the title card, in the same region, so while the card is up
   (under the loading screen, through the opening, and until Begin) a marker
   could land on the Begin button and take its click. Hidden, not just faded:
   `visibility` keeps the markers out of the pointer's way and out of the tab
   order. Begin marks the card `.gone`, and the layer fades in as it leaves. */
#intro:not(.gone) ~ [data-poi-root]{opacity:0;visibility:hidden}
[data-poi-root]{transition:opacity 1.2s ease}
/* The control bar waits the same way. Its `hidden` attribute cannot do it,
   because #bar's display:flex outranks the attribute's display:none, so before
   this the bar (and the evidence-list button touch.mjs puts in it) showed
   through the title card. Begin marks the card `.gone` in the same handler that
   unhides the bar, so it fades in exactly then; visibility keeps it out of the
   tab order and the pointer's way until it does. */
#intro:not(.gone) ~ #bar{opacity:0;visibility:hidden;pointer-events:none}
@media (prefers-reduced-motion:reduce){
  [data-harvest-loader] .title,[data-harvest-loader] .sub,[data-harvest-loader] .track{animation:none}
  [data-harvest-loader] .glint{display:none}
  [data-harvest-loader] .card{transition:none}
  [data-opening-bars]::before,[data-opening-bars]::after,[data-opening-skip],[data-opening-dip]{transition:none}}

/* ------------------------------------------- the point-of-interest UI (IRI-41) */
/* Rich but restrained, and layered in HTML over the canvas rather than drawn in
   it, so that every string is selectable, translatable and reachable by a screen
   reader. src/core/shell/poi-ui.mjs builds the markup; nothing here knows
   what any of it says.

   Contrast: --fg (#ece8de) on --glass over --ink is 4.5:1 or better at every
   size used below, and the two focus styles are a 2px outline rather than a
   colour change, so none of this is colour-only. See
   docs/accessibility-checklist.md §1. */
[data-poi-root]{position:fixed;inset:0;pointer-events:none;z-index:6;font-family:var(--ui)}
[data-poi-root] *{pointer-events:auto}
[data-poi-live]{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}

/* the markers over the objects */
[data-poi-markers]{position:absolute;inset:0;pointer-events:none}
[data-poi-marker]{position:absolute;transform:translate(-50%,-50%);touch-action:none;width:28px;height:28px;min-width:28px;min-height:28px;
  border-radius:50%;border:1px solid var(--fg-dim);background:var(--glass);backdrop-filter:blur(4px);-webkit-backdrop-filter:blur(4px);
  color:var(--fg);cursor:pointer;padding:0;display:grid;place-items:center}
[data-poi-marker]::before{content:"";width:5px;height:5px;border-radius:50%;background:var(--fg)}
/* RTP-20: the 28px ring answers a 44px target round it, on every device */
[data-poi-marker]::after{content:"";position:absolute;inset:-8px;border-radius:50%}
[data-poi-marker]{transition:border-color .25s,transform .25s var(--ease),box-shadow .25s}
[data-poi-marker]:hover,[data-poi-marker]:focus-visible{border-color:var(--accent);outline:none;transform:translate(-50%,-50%) scale(1.12);box-shadow:0 0 0 4px rgba(201,169,106,.18)}
[data-poi-marker]:focus-visible{outline:2px solid var(--fg);outline-offset:3px}

/* the list: the keyboard route to the evidence, and one tab stop */
[data-poi-list-region]{position:absolute;right:max(14px,env(safe-area-inset-right,0px));
  top:calc(22px + env(safe-area-inset-top,0px));width:min(86vw,16.5rem);box-sizing:border-box;
  background:var(--panel);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--panel-shadow);
  padding:1.05rem 1rem .9rem;max-height:70vh;max-height:70dvh;overflow:auto;scrollbar-width:thin;scrollbar-color:rgba(236,232,222,.25) transparent}
[data-poi-list-region][data-collapsed]{display:none}
[data-poi-list-heading]{font:400 var(--t-sm)/1.3 var(--sc);letter-spacing:.12em;text-transform:lowercase;margin:0 0 .35rem;color:var(--accent)}
[data-poi-list-hint],[data-poi-list-position]{margin:.35rem 0 .5rem;font-size:var(--t-xs);line-height:1.55;color:var(--fg-dim);letter-spacing:.01em}
[data-poi-list-position]{margin:.6rem 0 0;font-variant-numeric:tabular-nums}
[data-poi-list]{list-style:none;margin:0 -.35rem;padding:0;display:grid;gap:0;border-top:1px solid rgba(236,232,222,.1)}
[data-poi-list] li{position:relative;font:400 var(--t-md)/1.25 var(--display);padding:.4rem .6rem .4rem .85rem;min-height:40px;display:flex;align-items:center;
  border-bottom:1px solid rgba(236,232,222,.07);cursor:pointer;color:rgba(236,232,222,.9);transition:background .2s,color .2s,padding .25s var(--ease)}
[data-poi-list] li::before{content:"";position:absolute;left:.3rem;top:50%;width:2px;height:0;background:var(--accent);transform:translateY(-50%);transition:height .25s var(--ease)}
[data-poi-list] li:hover{background:rgba(236,232,222,.06);color:var(--fg);padding-left:1rem}
[data-poi-list] li:hover::before{height:1rem}
[data-poi-list] li[aria-selected="true"]{background:rgba(201,169,106,.12);color:var(--fg)}
[data-poi-list] li[aria-selected="true"]::before{height:1.4rem}
@media (pointer:coarse){[data-poi-list] li{min-height:44px}}
[data-poi-list] li:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}

/* interaction one: the card, carrying the evidence level already */
/* `--poi-notice-h` is the height of the capability notice when one is up, set by
   poi-ui.mjs. The notice is position:fixed at the same bottom-centre and at
   z-index 10, so without this the card sits UNDER it and the sources control is
   covered by the notice's own link: a visitor who means to open the evidence
   switches to the stills instead. Raising the POI layer above the notice would
   be the wrong way round — the notice is telling them the scene is degraded —
   so the card moves up instead of over. Found by tools/engine/verify-poi.mjs. */
[data-poi-card],[data-poi-panel]{position:absolute;left:50%;transform:translateX(-50%);
  bottom:calc(var(--bar-clear) + 8px + var(--poi-notice-h,0px));width:min(92vw,30rem);
  background:var(--panel);backdrop-filter:blur(14px) saturate(1.1);-webkit-backdrop-filter:blur(14px) saturate(1.1);
  border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--panel-shadow);padding:1.3rem 1.5rem 1.2rem;color:var(--fg);
  display:grid;gap:.65rem;max-height:72vh;max-height:72dvh;overflow:auto;box-sizing:border-box;scrollbar-width:thin;scrollbar-color:rgba(236,232,222,.25) transparent}
[data-poi-card]::before,[data-poi-panel]::before{content:"";position:absolute;left:1.5rem;top:-1px;width:2.25rem;height:2px;background:var(--accent)}
[data-poi-card][hidden],[data-poi-panel][hidden]{display:none}
[data-poi-card]:focus-visible,[data-poi-panel]:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
[data-poi-card] h3,[data-poi-panel] h3{font-family:var(--display);font-weight:400;font-size:var(--t-xl);line-height:1.1;margin:0 2.2rem 0 0;letter-spacing:.005em;text-wrap:balance}
[data-poi-panel] h4{display:flex;align-items:center;gap:.7rem;font:400 var(--t-sm)/1.3 var(--sc);letter-spacing:.12em;text-transform:lowercase;margin:.7rem 0 0;color:var(--accent)}
[data-poi-panel] h4::after{content:"";flex:1 1 auto;height:1px;background:linear-gradient(90deg,rgba(201,169,106,.45),transparent)}
[data-poi-card] p,[data-poi-panel] p{margin:0;max-width:var(--measure);font-size:var(--t-base);line-height:var(--lead);color:rgba(236,232,222,.88);text-wrap:pretty}
[data-poi-card-level]{padding:.55rem .75rem;border-left:2px solid var(--accent);background:rgba(201,169,106,.07)}
[data-poi-card-level] strong{font-weight:600;letter-spacing:.06em;color:var(--fg)}
/* An unassigned level is not a level, and is not dressed as one. */
[data-poi-level-state="unassigned"],[data-poi-level-state="unknown"]{font-style:italic;color:var(--fg-dim)}
[data-poi-open-evidence]{justify-self:start;margin-top:.2rem;font:600 var(--t-xs)/1 var(--ui);letter-spacing:.18em;text-transform:uppercase;
  color:var(--fg);background:transparent;border:1px solid rgba(236,232,222,.45);border-radius:var(--radius);
  padding:0 1.3rem;min-height:44px;cursor:pointer;transition:background .25s,color .25s,border-color .25s}
[data-poi-open-evidence]:hover,[data-poi-open-evidence]:focus-visible{background:var(--fg);color:var(--ink);outline:none}
[data-poi-open-evidence]:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
[data-poi-card-close],[data-poi-panel-close]{position:absolute;top:.3rem;right:.3rem;width:44px;height:44px;
  background:transparent;border:0;border-radius:var(--radius);color:var(--fg-dim);cursor:pointer;font-size:1.35rem;line-height:1;transition:color .2s,background .2s}
[data-poi-card-close]:hover,[data-poi-panel-close]:hover{color:var(--fg);background:rgba(236,232,222,.08)}
[data-poi-card-close]::before,[data-poi-panel-close]::before{content:"\00d7"}
[data-poi-card-close]:focus-visible,[data-poi-panel-close]:focus-visible{outline:2px solid var(--fg);outline-offset:-2px}

/* interaction two: every citation, exactly as written */
[data-poi-sources]{list-style:none;margin:0;padding:0;display:grid;gap:.6rem;font-size:var(--t-sm);line-height:1.6;color:rgba(236,232,222,.86)}
[data-poi-sources] li{padding-left:.85rem;border-left:1px solid rgba(236,232,222,.14)}
[data-poi-sources] a{color:var(--fg);text-decoration:underline;text-decoration-color:rgba(201,169,106,.7);text-underline-offset:.22em;
  min-height:44px;display:inline-flex;align-items:center}
[data-poi-sources] a:focus-visible{outline:2px solid var(--fg);outline-offset:3px}
/* Flagged, never finished. STANDING-RULES.md rule 5 item 2. */
[data-poi-incomplete],[data-poi-missing-source]{font-style:italic;color:var(--fg-dim)}

/* ------------------------------------------------- phones and touch screens */
/* Matches the Blasket shell: the same breakpoint as COMPACT in
   src/scenes/ireland/blasket/controls.mjs, the same --bar-clear, and the same
   html[data-sheet] rule, which src/core/shell/touch.mjs wires through the
   Blasket's own attachControls(). */

/* A sheet scrolls inside itself, and a scroll that reaches its end stops there
   rather than moving anything behind it. */
[data-poi-list-region],[data-poi-card],[data-poi-panel]{touch-action:pan-y;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
/* Sheets rise into place. Transform and opacity only, so opening one never
   lays the page out again. */
@keyframes sheet-in{from{opacity:0;translate:0 14px}}
[data-poi-list-region],[data-poi-card],[data-poi-panel],#help{animation:sheet-in .26s cubic-bezier(.2,.8,.25,1)}
#cap{transition:opacity 1.8s ease,visibility 0s}
@media (prefers-reduced-motion:reduce){[data-poi-list-region],[data-poi-card],[data-poi-panel],#help{animation:none}}

/* A finger needs 44px targets; a mouse on a wide screen keeps the small strip.
   The phone breakpoint is in the list too, because a phone on its side is wider
   than some emulators count as a phone and must still get the finger sizes. */
@media (pointer:coarse),(max-width:640px),(max-height:500px){
  :root{--bar-h:50px}
  #bar{padding:2px;gap:0}
  #bar button{width:44px;height:44px}
  #bar svg{width:18px;height:18px}
  #time{height:44px;width:min(34vw,180px)}
  #time::-webkit-slider-thumb{width:18px;height:18px;margin-top:-8.5px;box-shadow:0 0 0 6px rgba(236,232,222,.12)}
  #time::-moz-range-thumb{width:18px;height:18px}
  /* The ring stays the size it is; the target round it grows. */
  [data-poi-marker]{width:44px;height:44px;border-color:transparent;background:transparent;backdrop-filter:none;-webkit-backdrop-filter:none}
  [data-poi-marker]::before{width:26px;height:26px;box-sizing:border-box;border:1px solid var(--fg-dim);background:var(--glass) radial-gradient(circle,var(--fg) 2.5px,transparent 3px)}
  [data-poi-marker]::after{inset:0}
}

@media (max-width:640px),(max-height:500px){
  :root{--bar-gap:6px}
  #bar{left:50%;transform:translateX(-50%);width:min(calc(100vw - 12px - var(--safe-l) - var(--safe-r)),34rem);justify-content:space-between}
  #time{flex:1 1 auto;width:auto;min-width:56px;margin:0 6px}
  /* The list is only up when its button says so, and not before touch.mjs wires it. */
  html:not([data-sheet="list"]) [data-poi-list-region]{display:none}
  /* While a sheet is up the caption would sit on it. */
  html[data-sheet="list"] #cap,html[data-sheet="card"] #cap,html:has(#help:not([hidden])) #cap{opacity:0;visibility:hidden;transition:none}
  /* The notice goes to the top, clear of the sheets, and the first tap puts it away. */
  [data-capability-notice]{top:calc(6px + var(--safe-t));bottom:auto;width:max-content;max-width:calc(100vw - 12px - var(--safe-l) - var(--safe-r));
    box-sizing:border-box;max-height:40vh;max-height:40dvh;overflow:auto;font-size:.875rem;padding:.7rem .9rem;gap:.3rem}
  #toast{font-size:.875rem;letter-spacing:.08em}
}
/* Portrait: one bottom sheet at a time, full width above the bar. The clock and
   the separators give their room to the time slider. */
@media (max-width:640px) and (min-height:501px){
  #bar .sep,#clock{display:none}
  [data-poi-list-region],[data-poi-card],[data-poi-panel],#help{position:fixed;top:auto;right:auto;left:50%;transform:translateX(-50%);
    bottom:calc(var(--bar-clear) + 6px);
    width:calc(100vw - 12px - var(--safe-l) - var(--safe-r));max-width:none;box-sizing:border-box;
    max-height:min(55vh,calc(100vh - var(--bar-clear) - var(--safe-t) - 24px));
    max-height:min(55dvh,calc(100dvh - var(--bar-clear) - var(--safe-t) - 24px))}
  [data-poi-list-region]{max-height:46vh;max-height:46dvh}
}
/* Landscape: the help on the left, the list and the card on the right, all
   between the top inset and the bar. */
@media (max-height:500px){
  [data-poi-list-region],[data-poi-card],[data-poi-panel]{position:fixed;left:auto;transform:none;
    right:calc(6px + var(--safe-r));top:calc(6px + var(--safe-t));bottom:auto;
    width:min(46vw,22rem);box-sizing:border-box;
    max-height:calc(100vh - var(--bar-clear) - var(--safe-t) - 18px);
    max-height:calc(100dvh - var(--bar-clear) - var(--safe-t) - 18px)}
  #help{left:calc(6px + var(--safe-l));bottom:calc(var(--bar-clear) + 6px);max-width:min(46vw,19rem);
    max-height:calc(100dvh - var(--bar-clear) - var(--safe-t) - 18px);overflow:auto;box-sizing:border-box}
}
