/* skin-observer.css: "古い観測器" の「測量シート」 — the PS1 skin's image-built UI (html[data-skin="ps1"] only; GB, Studio and the title screen are untouched).
   Loaded unlayered after elvi-cards.css and before studio-live.css, so it wins over the layered skin rules and over skin-nocturne.css by order and specificity.
   Art: assets/ui/observer-2026-10-21 readingPane (obs2-*.webp; manifest.json "readingPane".themes.<liz|elvi>.parts is the contract: every image below is one cropped part with its measured slice).
   The menu is a survey sheet on smoked glass: no window around the list or the detail. One survey line runs down the list and every entry is a ring-shaped survey point on it.
   Selection is never a frame: the selected entry's point is lit (ring + dot) and its name turns full ink and bold. Keyboard focus is the corner-bracket part, so it never reads as the selection.
   Keys are the thin cut-corner plate at half scale (about a 1px line); the primary key carries the marked plate; 戻る is a chevron and a word.
   Liz = warm white line + dull brass accent; Elvi = pale green line + green accent. The device shell keys (obs-key-*, the portrait chassis, the landscape guide caps) keep their previous parts.
   CSS only places, stretches and switches states; it never draws a material, a ring or a symbol. No important-flags are used here.
   The menu rules start with :root:root:root:root: it raises specificity over skin-nocturne.css without touching the shared selectors. */

/* ============================== 1. image variables (Liz) and geometry ============================== */
html[data-skin="ps1"] {
  --ob-backplate: url("../../../assets/ui/observer-2026-10-21/obs2-bg.webp");
  /* every window (settings, call, dialogue, pop-ups, field cards, the hand tray) is one part: a single near-invisible gray hairline on plain glass, no brackets, no double line
     (manifest readingPane.appearances.shared.darkWindow; the light theme swaps in appearances.light.window). Both protagonists share it; their difference is the ink. */
  --ob-pane: url("../../../assets/ui/observer-2026-10-21/obs3-window-gray-dark.webp");
  --ob-window: var(--ob-pane);
  --ob-window-sm: var(--ob-pane);
  --ob-inset: var(--ob-pane);
  --ob-tag: url("../../../assets/ui/observer-2026-10-21/obs2-btn-idle-liz.webp");   /* a level-3 tag is the thin cut-corner key at a small width */
  --ob-row-selected: url("../../../assets/ui/observer-2026-10-21/obs2-row-selected-liz.webp");
  --ob-row-hover: url("../../../assets/ui/observer-2026-10-21/obs2-row-hover-liz.webp");
  --ob-row-locked: url("../../../assets/ui/observer-2026-10-21/obs2-row-locked-liz.webp");
  --ob-nameplate: url("../../../assets/ui/observer-2026-10-21/obs2-heading-liz.webp");
  --ob-rule: url("../../../assets/ui/observer-2026-10-21/obs2-rule-liz.webp");
  --ob-hairline: url("../../../assets/ui/observer-2026-10-21/obs3-hairline-h-liz.webp");   /* a plain 1px line, no knob (manifest readingPane hairline-h) */
  --ob-sweep: url("../../../assets/ui/observer-2026-10-21/menu-sweep-liz-2026-10-22.webp");   /* UI17 console open / tab sweep band (delivered 2172x724 RGBA, band centred at mid-height; manifest menuSweep) */
  --ob-log-strip: url("../../../assets/ui/observer-2026-10-21/obs2-log-rail-liz.webp");
  --ob-dialog: var(--ob-pane);
  --ob-call: var(--ob-pane);
  --ob-focus: url("../../../assets/ui/observer-2026-10-21/obs2-focus-liz.webp");
  --ob-btn-idle: url("../../../assets/ui/observer-2026-10-21/obs2-btn-idle-liz.webp");
  --ob-btn-hover: url("../../../assets/ui/observer-2026-10-21/obs2-btn-hover-liz.webp");
  --ob-btn-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-btn-pressed-liz.webp");
  --ob-btn-selected: url("../../../assets/ui/observer-2026-10-21/obs2-btn-selected-liz.webp");
  --ob-btn-disabled: url("../../../assets/ui/observer-2026-10-21/obs2-btn-disabled-liz.webp");
  --ob-toggle-off: url("../../../assets/ui/observer-2026-10-21/obs2-toggle-off-liz.webp");
  --ob-toggle-on: url("../../../assets/ui/observer-2026-10-21/obs2-toggle-on-liz.webp");
  --ob-lamp-off: url("../../../assets/ui/observer-2026-10-21/obs2-sub-idle-liz.webp");        /* a lamp is a small survey point: solid ring off, ring + dot on, dashed ring locked */
  --ob-lamp-on: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-liz.webp");
  --ob-lamp-locked: url("../../../assets/ui/observer-2026-10-21/obs2-sub-locked-liz.webp");
  --ob-check-off: url("../../../assets/ui/observer-2026-10-21/obs2-check-off-liz.webp");
  --ob-check-on: url("../../../assets/ui/observer-2026-10-21/obs2-check-on-liz.webp");
  --ob-radio-off: url("../../../assets/ui/observer-2026-10-21/obs2-radio-off-liz.webp");
  --ob-radio-on: url("../../../assets/ui/observer-2026-10-21/obs2-radio-on-liz.webp");
  --ob-close: url("../../../assets/ui/observer-2026-10-21/obs2-close-liz.webp");
  --ob-next: url("../../../assets/ui/observer-2026-10-21/obs2-next-liz.webp");
  --ob-chev-l: url("../../../assets/ui/observer-2026-10-21/obs2-chev-l-liz.webp");
  --ob-chev-r: url("../../../assets/ui/observer-2026-10-21/obs2-chev-r-liz.webp");
  --ob-badge: url("../../../assets/ui/observer-2026-10-21/obs2-badge-liz.webp");
  --ob-knob: url("../../../assets/ui/observer-2026-10-21/obs2-knob-liz.webp");
  --ob-knob-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-knob-liz.webp");
  --ob-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-liz.webp");
  --ob-thumb-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-liz.webp");
  --ob-scroll-track: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-track-liz.webp");
  --ob-scroll-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-thumb-liz.webp");
  --ob-signal-off: url("../../../assets/ui/observer-2026-10-21/obs2-signal-off-liz.webp");
  --ob-signal-on: url("../../../assets/ui/observer-2026-10-21/obs2-signal-on-liz.webp");

  /* the primary tabs: a thin rail with ring-shaped survey points, one symbol per tab, a drop line from the selected point; the same drop line is the list's survey line */
  --ob-rail: url("../../../assets/ui/observer-2026-10-21/obs2-rail-h-liz.webp");
  --ob-drop-v: url("../../../assets/ui/observer-2026-10-21/obs2-drop-v-liz.webp");
  --ob-node-idle: url("../../../assets/ui/observer-2026-10-21/obs2-node-idle-liz.webp");
  --ob-node-hover: url("../../../assets/ui/observer-2026-10-21/obs2-node-hover-liz.webp");
  --ob-node-selected: url("../../../assets/ui/observer-2026-10-21/obs2-node-selected-liz.webp");
  --ob-node-locked: url("../../../assets/ui/observer-2026-10-21/obs2-node-locked-liz.webp");
  --ob-node-focus: url("../../../assets/ui/observer-2026-10-21/obs2-node-focus-liz.webp");
  --ob-node-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-liz.webp");
  --ob-nav-item: url("../../../assets/ui/observer-2026-10-21/obs2-nav-item-liz.webp");
  --ob-nav-spell: url("../../../assets/ui/observer-2026-10-21/obs2-nav-spell-liz.webp");
  --ob-nav-summon: url("../../../assets/ui/observer-2026-10-21/obs2-nav-summon-liz.webp");
  --ob-nav-log: url("../../../assets/ui/observer-2026-10-21/obs2-nav-log-liz.webp");
  --ob-nav-system: url("../../../assets/ui/observer-2026-10-21/obs2-nav-system-liz.webp");

  /* text on the smoked glass (contrast on rgb(12 13 16 / 0.9) is 5.5:1 or more for the second colour); the accent is only ever inside the images.
     --ob-void is the glass colour itself: it only fills a survey point's ring, so the survey line does not run through its centre */
  --ob-ink: #e8e2d4; --ob-ink-2: #958f83; --ob-hi: #a88a55; --ob-glass: rgb(12 13 16 / 0.9); --ob-void: #0c0d10;
  --ob-ink-r: color-mix(in srgb, var(--ob-ink) 72%, var(--ob-ink-2));   /* reading text of an idle entry: clearly below the selected ink, never as faint as a label */

  /* the device shell keys keep their parts (shell layer, not window) */
  --ob-key-kbd-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-kbd-idle-liz.webp");
  --ob-key-kbd-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-kbd-pressed-liz.webp");
  --ob-key-ul-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-ul-idle-liz.webp");
  --ob-key-u-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-u-idle-liz.webp");
  --ob-key-ur-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-ur-idle-liz.webp");
  --ob-key-l-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-l-idle-liz.webp");
  --ob-key-c-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-c-idle-liz.webp");
  --ob-key-r-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-r-idle-liz.webp");
  --ob-key-dl-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-dl-idle-liz.webp");
  --ob-key-d-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-d-idle-liz.webp");
  --ob-key-dr-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-dr-idle-liz.webp");
  --ob-key-ul-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-ul-pressed-liz.webp");
  --ob-key-u-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-u-pressed-liz.webp");
  --ob-key-ur-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-ur-pressed-liz.webp");
  --ob-key-l-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-l-pressed-liz.webp");
  --ob-key-c-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-c-pressed-liz.webp");
  --ob-key-r-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-r-pressed-liz.webp");
  --ob-key-dl-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-dl-pressed-liz.webp");
  --ob-key-d-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-d-pressed-liz.webp");
  --ob-key-dr-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-dr-pressed-liz.webp");
  --ob-key-interact-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-interact-idle-liz.webp");
  --ob-key-spell-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-spell-idle-liz.webp");
  --ob-key-menu-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-menu-idle-liz.webp");
  --ob-key-item-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-item-idle-liz.webp");
  --ob-key-phone-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-phone-idle-liz.webp");
  --ob-key-inspect-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-inspect-idle-liz.webp");
  --ob-key-map-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-map-idle-liz.webp");
  --ob-key-interact-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-interact-pressed-liz.webp");
  --ob-key-spell-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-spell-pressed-liz.webp");
  --ob-key-menu-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-menu-pressed-liz.webp");
  --ob-key-item-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-item-pressed-liz.webp");
  --ob-key-phone-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-phone-pressed-liz.webp");
  --ob-key-inspect-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-inspect-pressed-liz.webp");
  --ob-key-map-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-map-pressed-liz.webp");
  --ob-key-wide-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-wide-idle-liz.webp");
  --ob-key-wide-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-wide-pressed-liz.webp");
  --ob-key-square-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-square-idle-liz.webp");
  --ob-key-square-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-square-pressed-liz.webp");

  /* slices: manifest.json readingPane "slice" ([top, right, bottom, left] in source pixels); the shell keys keep the old manifest's */
  --ob-sl-window: 28; --ob-sl-tag: 8 22; --ob-sl-row: 8 18 8 45; --ob-sl-nameplate: 8 18 8 30;
  --ob-sl-btn: 8 22; --ob-sl-log: 8 18 8 30; --ob-sl-focus: 28; --ob-sl-kbd: 36; --ob-sl-key-wide: 40 48;

  /* displayed frame widths: window 14px (phone 10px, popup 10px), inset 8px, tag 5px. Keys show their plate at half its source size, so the line is about 1px */
  --ob-bw-window: 14px; --ob-bw-popup: 10px; --ob-bw-inset: 8px; --ob-bw-tag: 5px;
  --ob-bw-nameplate: 6px 14px 6px 22px; --ob-bw-btn: 4px 11px; --ob-bw-chip: 4px; --ob-bw-row: 6px 10px 6px 28px;
  --ob-bw-log: 8px 14px 6px 20px; --ob-bw-focus: 12px; --ob-bw-kbd: 6px 8px; --ob-bw-key-wide: 12px 16px;

  /* recipes: source + slice + width in one value (state rules switch only border-image-source) */
  --ob-frame-window: var(--ob-window) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-popup: var(--ob-window-sm) var(--ob-sl-window) fill / var(--ob-bw-popup) stretch;
  --ob-frame-dialog: var(--ob-dialog) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-call: var(--ob-call) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-inset: var(--ob-inset) var(--ob-sl-window) fill / var(--ob-bw-inset) stretch;   /* the inset is the same gray pane (slice 28), only narrower */
  --ob-frame-tag: var(--ob-tag) var(--ob-sl-tag) fill / var(--ob-bw-tag) stretch;
  --ob-frame-nameplate: var(--ob-nameplate) var(--ob-sl-nameplate) fill / var(--ob-bw-nameplate) stretch;
  --ob-frame-btn: var(--ob-btn-idle) var(--ob-sl-btn) fill / var(--ob-bw-btn) stretch;
  --ob-frame-row: var(--ob-row-selected) var(--ob-sl-row) fill / var(--ob-bw-row) stretch;
  --ob-frame-log: var(--ob-log-strip) var(--ob-sl-log) fill / var(--ob-bw-log) round;   /* the tick marks of the top edge repeat, they are never stretched */
  --ob-frame-focus: var(--ob-focus) var(--ob-sl-focus) / var(--ob-bw-focus) stretch;
  --ob-frame-kbd: var(--ob-key-kbd-idle) var(--ob-sl-kbd) fill / var(--ob-bw-kbd) stretch;
  --ob-frame-key-wide: var(--ob-key-wide-idle) var(--ob-sl-key-wide) fill / var(--ob-bw-key-wide) stretch;

  /* dials (quick wheel hub, ring pad base) and their pointer: the pointer image points up and turns about the manifest pivot (42x191, pivot 21/176 -> 0.9215 down the part);
     --ob-ptr-h / -w / -py are the pointer's height and width as a share of the hub, and the pivot's share of the pointer's own height; the tip stays 0.36 of the hub from the centre */
  --ob-dial-ring: url("../../../assets/ui/observer-2026-10-21/obs2-dial-ring-liz.webp");
  --ob-dial-pointer: url("../../../assets/ui/observer-2026-10-21/obs2-dial-pointer-liz.webp");
  --ob-ptr-h: 0.3907; --ob-ptr-w: 0.0859; --ob-ptr-py: 0.9215;

  --ob-lamp: 16px; --ob-lamp-s: 12px;   /* a lamp is never stretched: it keeps these fixed sizes (14px on a phone) */
  --ob-line-x: 14px;   /* the survey line's centre, from the left edge of a list row: every survey point of the menu sits on it */
  --ob-bw-window-hand: 8px;
  --ob-shutter: 120ms;
  /* motion (section 17): a point lights / content settles / a ring turns in / a line draws, one easing, a short stagger. Reduced motion sets every one of them to 0ms. */
  --ob-ease: cubic-bezier(0.2, 0.7, 0.2, 1); --ob-t-s: 120ms; --ob-t-m: 200ms; --ob-t-l: 280ms; --ob-t-draw: 420ms; --ob-stagger: 16ms;
  --ob-tab-h: 64px;   /* the primary tab band (a phone in portrait: 72px) */
  --field-key-w: 84px;   /* the landscape search / map keys (inspect-wheel.css reads it for their width and spacing) */
}
@media (max-width: 599px), (max-height: 520px) {
  html[data-skin="ps1"] { --ob-bw-window: 10px; --ob-lamp: 14px; }
}
@media (orientation: portrait) and (max-width: 599px) {
  html[data-skin="ps1"] { --ob-tab-h: 72px; }
}

/* ---- Elvi: the same shapes, pale green line on black glass ---- */
html[data-skin="ps1"][data-protagonist="elvi"] {
  /* her windows are the shared gray pane (section 1) */
  --ob-tag: url("../../../assets/ui/observer-2026-10-21/obs2-btn-idle-elvi.webp");
  --ob-row-selected: url("../../../assets/ui/observer-2026-10-21/obs2-row-selected-elvi.webp");
  --ob-row-hover: url("../../../assets/ui/observer-2026-10-21/obs2-row-hover-elvi.webp");
  --ob-row-locked: url("../../../assets/ui/observer-2026-10-21/obs2-row-locked-elvi.webp");
  --ob-nameplate: url("../../../assets/ui/observer-2026-10-21/obs2-heading-elvi.webp");
  --ob-rule: url("../../../assets/ui/observer-2026-10-21/obs2-rule-elvi.webp");
  --ob-hairline: url("../../../assets/ui/observer-2026-10-21/obs3-hairline-h-elvi.webp");
  --ob-sweep: url("../../../assets/ui/observer-2026-10-21/menu-sweep-elvi-2026-10-22.webp");
  --ob-log-strip: url("../../../assets/ui/observer-2026-10-21/obs2-log-rail-elvi.webp");
  --ob-focus: url("../../../assets/ui/observer-2026-10-21/obs2-focus-elvi.webp");
  --ob-btn-idle: url("../../../assets/ui/observer-2026-10-21/obs2-btn-idle-elvi.webp");
  --ob-btn-hover: url("../../../assets/ui/observer-2026-10-21/obs2-btn-hover-elvi.webp");
  --ob-btn-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-btn-pressed-elvi.webp");
  --ob-btn-selected: url("../../../assets/ui/observer-2026-10-21/obs2-btn-selected-elvi.webp");
  --ob-btn-disabled: url("../../../assets/ui/observer-2026-10-21/obs2-btn-disabled-elvi.webp");
  --ob-toggle-off: url("../../../assets/ui/observer-2026-10-21/obs2-toggle-off-elvi.webp");
  --ob-toggle-on: url("../../../assets/ui/observer-2026-10-21/obs2-toggle-on-elvi.webp");
  --ob-lamp-off: url("../../../assets/ui/observer-2026-10-21/obs2-sub-idle-elvi.webp");
  --ob-lamp-on: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-elvi.webp");
  --ob-lamp-locked: url("../../../assets/ui/observer-2026-10-21/obs2-sub-locked-elvi.webp");
  --ob-check-off: url("../../../assets/ui/observer-2026-10-21/obs2-check-off-elvi.webp");
  --ob-check-on: url("../../../assets/ui/observer-2026-10-21/obs2-check-on-elvi.webp");
  --ob-radio-off: url("../../../assets/ui/observer-2026-10-21/obs2-radio-off-elvi.webp");
  --ob-radio-on: url("../../../assets/ui/observer-2026-10-21/obs2-radio-on-elvi.webp");
  --ob-close: url("../../../assets/ui/observer-2026-10-21/obs2-close-elvi.webp");
  --ob-next: url("../../../assets/ui/observer-2026-10-21/obs2-next-elvi.webp");
  --ob-chev-l: url("../../../assets/ui/observer-2026-10-21/obs2-chev-l-elvi.webp");
  --ob-chev-r: url("../../../assets/ui/observer-2026-10-21/obs2-chev-r-elvi.webp");
  --ob-badge: url("../../../assets/ui/observer-2026-10-21/obs2-badge-elvi.webp");
  --ob-knob: url("../../../assets/ui/observer-2026-10-21/obs2-knob-elvi.webp");
  --ob-knob-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-knob-elvi.webp");
  --ob-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-elvi.webp");
  --ob-thumb-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-elvi.webp");
  --ob-scroll-track: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-track-elvi.webp");
  --ob-scroll-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-thumb-elvi.webp");
  --ob-signal-off: url("../../../assets/ui/observer-2026-10-21/obs2-signal-off-elvi.webp");
  --ob-signal-on: url("../../../assets/ui/observer-2026-10-21/obs2-signal-on-elvi.webp");

  --ob-rail: url("../../../assets/ui/observer-2026-10-21/obs2-rail-h-elvi.webp");
  --ob-drop-v: url("../../../assets/ui/observer-2026-10-21/obs2-drop-v-elvi.webp");
  --ob-node-idle: url("../../../assets/ui/observer-2026-10-21/obs2-node-idle-elvi.webp");
  --ob-node-hover: url("../../../assets/ui/observer-2026-10-21/obs2-node-hover-elvi.webp");
  --ob-node-selected: url("../../../assets/ui/observer-2026-10-21/obs2-node-selected-elvi.webp");
  --ob-node-locked: url("../../../assets/ui/observer-2026-10-21/obs2-node-locked-elvi.webp");
  --ob-node-focus: url("../../../assets/ui/observer-2026-10-21/obs2-node-focus-elvi.webp");
  --ob-node-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-elvi.webp");
  --ob-nav-item: url("../../../assets/ui/observer-2026-10-21/obs2-nav-item-elvi.webp");
  --ob-nav-spell: url("../../../assets/ui/observer-2026-10-21/obs2-nav-spell-elvi.webp");
  --ob-nav-summon: url("../../../assets/ui/observer-2026-10-21/obs2-nav-summon-elvi.webp");
  --ob-nav-log: url("../../../assets/ui/observer-2026-10-21/obs2-nav-log-elvi.webp");
  --ob-nav-system: url("../../../assets/ui/observer-2026-10-21/obs2-nav-system-elvi.webp");

  --ob-ink: #bff5d6; --ob-ink-2: #5f9a78; --ob-hi: #27d97a; --ob-glass: rgb(3 11 7 / 0.92); --ob-void: #030b07;

  --ob-key-kbd-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-kbd-idle-elvi.webp");
  --ob-key-kbd-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-kbd-pressed-elvi.webp");
  --ob-key-ul-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-ul-idle-elvi.webp");
  --ob-key-u-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-u-idle-elvi.webp");
  --ob-key-ur-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-ur-idle-elvi.webp");
  --ob-key-l-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-l-idle-elvi.webp");
  --ob-key-c-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-c-idle-elvi.webp");
  --ob-key-r-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-r-idle-elvi.webp");
  --ob-key-dl-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-dl-idle-elvi.webp");
  --ob-key-d-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-d-idle-elvi.webp");
  --ob-key-dr-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-dr-idle-elvi.webp");
  --ob-key-ul-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-ul-pressed-elvi.webp");
  --ob-key-u-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-u-pressed-elvi.webp");
  --ob-key-ur-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-ur-pressed-elvi.webp");
  --ob-key-l-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-l-pressed-elvi.webp");
  --ob-key-c-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-c-pressed-elvi.webp");
  --ob-key-r-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-r-pressed-elvi.webp");
  --ob-key-dl-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-dl-pressed-elvi.webp");
  --ob-key-d-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-d-pressed-elvi.webp");
  --ob-key-dr-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-dr-pressed-elvi.webp");
  --ob-key-interact-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-interact-idle-elvi.webp");
  --ob-key-spell-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-hand-idle-elvi.webp");   /* the spell key is her hand of cards */
  --ob-key-menu-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-menu-idle-elvi.webp");
  --ob-key-item-idle: none;     /* no inventory key for Elvi */
  --ob-key-phone-idle: none;    /* no handset key for Elvi */
  --ob-key-inspect-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-inspect-idle-elvi.webp");
  --ob-key-map-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-map-idle-elvi.webp");
  --ob-key-interact-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-interact-pressed-elvi.webp");
  --ob-key-spell-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-hand-pressed-elvi.webp");
  --ob-key-menu-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-menu-pressed-elvi.webp");
  --ob-key-item-pressed: none;
  --ob-key-phone-pressed: none;
  --ob-key-inspect-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-inspect-pressed-elvi.webp");
  --ob-key-map-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-map-pressed-elvi.webp");
  --ob-key-wide-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-wide-idle-elvi.webp");
  --ob-key-wide-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-wide-pressed-elvi.webp");
  --ob-key-square-idle: url("../../../assets/ui/observer-2026-10-21/obs-key-square-idle-elvi.webp");
  --ob-key-square-pressed: url("../../../assets/ui/observer-2026-10-21/obs-key-square-pressed-elvi.webp");

  --ob-dial-ring: url("../../../assets/ui/observer-2026-10-21/obs2-dial-ring-elvi.webp");
  --ob-dial-pointer: url("../../../assets/ui/observer-2026-10-21/obs2-dial-pointer-elvi.webp");
  --ob-ptr-h: 0.3907; --ob-ptr-w: 0.0859; --ob-ptr-py: 0.9215;
}

/* Elvi's text tokens: the menu element and the pop-ups re-declare the whole Nocturne set (skin-nocturne.css), so they need their own override. */
html[data-skin="ps1"][data-protagonist="elvi"],
:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar.ui-menu:not([data-hand="1"]),
:root[data-skin="ps1"][data-protagonist="elvi"] body > :is(#tapInspectPanel, .ui-record-popup) {
  --nx-ivory: var(--ec-ink); --nx-ivory-2: rgb(159 216 184); --nx-ivory-3: rgb(127 191 157);
  --nx-line: rgb(39 217 122 / 0.20); --nx-line-2: rgb(39 217 122 / 0.38); --nx-line-3: rgb(39 217 122 / 0.72);
  --nx-lantern: var(--ec-hi); --nx-lantern-soft: rgb(39 217 122 / 0.16);
  --nx-lantern-glow: 0 0 0 1px rgb(141 255 189 / 0.55), 0 0 14px rgb(39 217 122 / 0.22);
  --nx-hp: var(--ec-ink);
  --nb-lamp: var(--ec-ink);
}

/* Type (assets/fonts/observer-2026-10-22): the same three targets skin-nocturne.css re-declares its --ff-* set on, so the observer values reach the whole PS1 skin,
   the full menu and the inspector / record pop-ups. GB and Studio never see these. Fallback after the new faces: the previous "SW JP", then the system sans.
   Japanese text with Latin letters in it stays in Zen (its own Latin); Barlow is only for the English labels and key names, Plex Mono only for number-only fields. */
:root[data-skin="ps1"],
:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]),
:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup) {
  --ff-ui: "Zen Kaku Gothic Antique", "SW JP", sans-serif;
  --ff-mincho: "Zen Kaku Gothic Antique", "SW JP", sans-serif;
  --ff-type: "Zen Kaku Gothic Antique", "SW JP", sans-serif;
  --ff-latin: "Barlow Condensed", "SW JP", sans-serif;
  --ff-num: "IBM Plex Mono", "SW JP", monospace;
  --ls-heading: 0.06em;
}
/* reading sizes: body 13-14px / 1.7, meta never under 12px / 1.5, headings 700 with 0.06em tracking, labels 600 with 0.08em, numbers tabular */
html[data-skin="ps1"] body :is(.ui-detail__text, .ui-desc__text, .ui-spell-prose, .ui-effects, .ic-line p, .ic-flavor, .radio__text, .adv__text, .product-flow-panel p) { font-size: 14px; line-height: 1.7; }
html[data-skin="ps1"] body :is(.ui-row__meta, .ui-row__tag, .ui-title__meta, .ui-detail__hint, .ui-detail__en, .ic-meta, .ic-stat__label, .radio__sig, .ui-gauge__label) { font-size: 12px; line-height: 1.5; }
html[data-skin="ps1"] body :is(h1, h2, h3, .ui-title__ja, .ui-detail__name, .ui-row__group, .ic-name, .ui-spell-name, .adv__name, .radio__name) { font-weight: 700; letter-spacing: var(--ls-heading); }
html[data-skin="ps1"] body :is(kbd, .ui-chipbtn__all, .ui-tab__en, .radio__tag, .radio__chbox, .radio__freq-unit, .ui-hud .ui-title__meta) { font-family: var(--ff-latin); font-weight: 600; letter-spacing: 0.08em; }
html[data-skin="ps1"] body :is(.ui-row__meta, .ui-stats dd, .ui-spell-stat dd, .ic-stat__value, .ui-gauge__num, .sp-badge, .radio__ch, .radio__freq-num, .ui-inventory-summary) { font-family: var(--ff-num); font-weight: 500; font-variant-numeric: tabular-nums; }
/* The title screen keeps its earlier face: the Shippori Mincho of the serif logo (skin-ps1.css styles .title-logo__mark and .title-menu with var(--ff-mincho)).
   Only the title overlay gets it back; every reading surface, the HUD and the menus keep the Zen gothic above. Weight 600 is the one Mincho file. */
:root[data-skin="ps1"] body #productFlowOverlay[data-flow-mode="title"] { --ff-mincho: "SW Mincho", "SW JP", serif; }
:root[data-skin="ps1"] body #productFlowOverlay[data-flow-mode="title"] :is(h1.title-logo__mark, .title-menu > button) { font-family: var(--ff-mincho); font-weight: 600; }
:root[data-skin="ps1"] body #productFlowOverlay[data-flow-mode="title"] h1.title-logo__mark { letter-spacing: 0.1em; }

/* ============================== 2. full menu (#actionSidebar, not the hand drawer): the survey sheet ============================== */
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) {
  color: var(--ob-ink);

  /* keys: no plate. A key is a survey point and its word, like every other choice on the sheet: a plain ring (idle), the lit ring + full ink + bold for the key the
     keyboard / pad confirm runs, the pressed ring while held, the dashed ring when unavailable. The 48px cell is the hit area; nothing draws its outline.
     Keyboard focus is never an outline box: it is the corner-bracket part, laid over the key (the transparent outline only serves forced-colours mode). */
  & :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary) {
    position: relative; box-sizing: border-box; color: var(--ob-ink-2); box-shadow: none; border-radius: 0; text-shadow: none; border: 0; border-image: none;
    background: var(--ob-lamp-off) left 10px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat; padding: 0 8px 0 30px;
    transition: color var(--ob-t-s) linear, transform calc(var(--ob-t-s) / 2) linear;
  }
  & :where(.ui-subtabs__step) { background: none; padding: 0; }
  & .ui-detail__actions .ui-btn, & .ui-spell-actions .ui-btn { padding: 0 8px 0 30px; justify-content: flex-start; text-align: left; }
  & :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary):hover { color: var(--ob-ink); box-shadow: none; }
  & :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary):is([aria-pressed="true"], [aria-selected="true"], [aria-checked="true"], [data-on="1"], .controller-selected) {
    background-image: var(--ob-lamp-on); background-size: var(--ob-lamp) var(--ob-lamp); background-position: left calc(16px - var(--ob-lamp) / 2) center; color: var(--ob-ink); font-weight: 700; box-shadow: none; outline: 0;
  }
  & :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary):is(:active, .is-pressed):not(:disabled) { background-image: var(--ob-node-pressed); color: var(--ob-ink); transform: translateY(1px); }
  & :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary):is(:disabled, [aria-disabled="true"]) { background-image: var(--ob-lamp-locked); color: var(--ob-ink-2); transform: none; }
  & :where(button:not(.ui-tab), .ui-key--act, summary):focus-visible { outline: 2px solid transparent; outline-offset: 2px; box-shadow: none; }
  & :where(button:not(.ui-tab, .ui-chipbtn), .ui-key--act, summary):focus-visible::before {
    content: ""; display: block; position: absolute; inset: -3px; z-index: 2; pointer-events: none;
    border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus); background: none; box-shadow: none;
  }
  & kbd { border: 0; border-image: none; border-radius: 0; background: none; box-shadow: none; transform: none; padding: 0; margin: 0; color: var(--ob-ink-2); font-size: 12px; }

  /* primary tabs: no rail and no rings. Each tab is its symbol and a real-text label; the selected one goes to full ink with a lit survey point under its label
     (the same lit point as a selected row), the others stay dim. ::before is the ring of a held / unavailable tab only. */
  & .ui-tabs { position: relative; gap: 0; padding: 0; border: 0; height: var(--ob-tab-h); min-height: var(--ob-tab-h); align-items: stretch; background: none; box-shadow: none; }
  & .ui-tabs::before { content: none; display: none; }
  & .ui-tab {
    position: relative; isolation: isolate; z-index: 1; display: block; flex: 1 1 0; min-width: 48px; min-height: 48px; height: var(--ob-tab-h); margin: 0; padding: 0; overflow: visible;
    color: var(--ob-ink-2); font-weight: 400; background: none; border: 0; border-image: none; border-radius: 0; box-shadow: none; transform: none; transition: none; outline: 0;
  }
  & .ui-tab::before {
    content: ""; display: block; position: absolute; left: 50%; top: 22px; width: 44px; height: 44px; margin: -22px 0 0 -22px; z-index: 0; pointer-events: none;
    background: var(--ob-node-idle) center / 30px 30px no-repeat; border: 0; border-image: none; box-shadow: none; opacity: 0; transform: none;
  }
  & .ui-tab__ico {
    display: block; position: absolute; left: 50%; top: 20px; width: 24px; height: 24px; margin: -12px 0 0 -12px; z-index: 1; pointer-events: none;
    fill: transparent; background: center / contain no-repeat; opacity: 0.42;
  }
  & .ui-tab__ico > use { display: none; }
  & .ui-tab[data-sidebar-tab="ITEM"] .ui-tab__ico { background-image: var(--ob-nav-item); }
  & .ui-tab[data-sidebar-tab="SPELL"] .ui-tab__ico { background-image: var(--ob-nav-spell); }
  & .ui-tab[data-sidebar-tab="SUMMON"] .ui-tab__ico { background-image: var(--ob-nav-summon); }
  & .ui-tab[data-sidebar-tab="LOG"] .ui-tab__ico { background-image: var(--ob-nav-log); }
  & .ui-tab[data-sidebar-tab="SYSTEM"] .ui-tab__ico { background-image: var(--ob-nav-system); }
  & .ui-tab .ui-tab__en { display: none; }
  & .ui-tab .ui-tab__ja {
    display: block; position: absolute; left: 0; right: 0; top: 38px; z-index: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: clip;
    font-size: 12px; line-height: 16px; letter-spacing: 0.08em; font-weight: 400; color: var(--ob-ink-2); pointer-events: none;
  }
  & .ui-tab:hover { color: var(--ob-ink); }
  & .ui-tab:hover :is(.ui-tab__ico, .ui-tab__ja) { opacity: 0.8; color: var(--ob-ink); }
  & .ui-tab:is(:focus-visible, .controller-selected) { background: none; outline: 2px solid transparent; outline-offset: -2px; }
  & .ui-tab:is(:focus-visible, .controller-selected)::before {
    opacity: 1; inset: 2px 4px; width: auto; height: auto; margin: 0; background: none; border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus);
  }
  /* the chosen tab is its brighter, glowing mark and bold label; no added point under it */
  & .ui-tab[aria-selected="true"] .ui-tab__ico { opacity: 1; filter: brightness(1.45) drop-shadow(0 0 3px var(--ob-ink)); }
  & .ui-tab[aria-selected="true"] .ui-tab__ja { font-weight: 700; color: var(--ob-ink); text-shadow: 0 0 4px var(--ob-ink); }
  & .ui-tab:is(:active, .is-pressed) .ui-tab__ico { scale: 0.92; }
  & .ui-tab:is(:active, .is-pressed)::before { opacity: 0.8; background-image: var(--ob-node-pressed); background-size: 36px 36px; }
  & .ui-tab:is(:disabled, [aria-disabled="true"])::before { opacity: 0.6; background-image: var(--ob-node-locked); background-size: 30px 30px; }
  & .ui-tab:is(:disabled, [aria-disabled="true"]) :is(.ui-tab__ico, .ui-tab__ja) { opacity: 0.4; }
  /* the [ ] keys at the rail's ends: two key names, no plate */
  & .ui-tabs__hint { border: 0; border-image: none; background: none; padding: 0 8px; flex: 0 0 auto; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; align-self: flex-start; height: 44px; color: var(--ob-ink-2); }
  & .ui-tabs__hint:is(:hover, :active, :disabled) { border: 0; border-image: none; transform: none; background: none; }
  & .ui-tabs__hint:focus-visible { outline: 2px solid transparent; background: var(--ob-node-focus) center / 32px 32px no-repeat; }

  /* the head, the list and the detail lie straight on the backplate: no window */
  & .ui-menu__head { padding: 0 4px; background: none; border: 0; border-image: none; }
  & .ui-menu__head :is(.ui-title__ja, .ui-title__meta, .ui-title__en) { color: var(--ob-ink); }
  & .ui-menu__body > .ui-list {
    position: relative; padding: 0; background: none; border: 0; border-image: none; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
  /* no drawn survey line: the drop-v part repeats a ring every few pixels, a ruler running through the list. The points alone line up on --ob-line-x. */
  & .ui-menu__body > .ui-list::before { content: none; display: none; }
  & .ui-list__rows { position: relative; z-index: 1; padding-inline: 2px; }
  & .ui-inventory-summary { position: relative; z-index: 1; margin: 0; padding: 0 4px 4px calc(var(--ob-line-x) + 16px); color: var(--ob-ink-2); font-size: 12px; line-height: 1.5; letter-spacing: 0.06em; white-space: pre-line; }
  & .ui-inventory-summary[data-inventory-overflow="1"] { color: var(--nx-danger, var(--ob-ink)); }
  & .ui-subtabs:not([data-kind="spell"]) { position: relative; z-index: 1; padding-left: calc(var(--ob-line-x) + 14px); }
  /* the detail is parted from the list by space, not a rule (the rule part has a knob at its centre) */
  & .ui-detail {
    padding: 20px 2px 0; gap: 10px; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    border: 0; border-image: none; background: none;
  }

  /* rows: one fixed 48px line, the name takes the room (1fr); the tag and meta never wrap, they are cut with an ellipsis.
     An idle row is dim with a plain ring on the survey line; the selected row lights its ring (ring + dot) and its name goes to full ink and bold. No band, no frame. */
  & .ui-row:not([data-ec-card], [data-ec-pile]) {
    position: relative; isolation: isolate; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--ob-ink-2);
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; column-gap: 10px; align-items: center; align-content: center;
    height: 48px; min-height: 48px; padding: 0 6px 0 calc(var(--ob-line-x) + 14px); padding-block: 0; scroll-margin-block: 48px;
  }
  & .ui-row[data-info="1"]:not([data-ec-card], [data-ec-pile]) { height: auto; min-height: 48px; padding-block: 4px; }
  & .ui-row > .ui-chip { grid-column: 1; width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none; opacity: 0.7; }
  & .ui-row .ic-art { border: 0; background: none; box-shadow: none; }
  & .ui-row > .ui-row__name { grid-column: 2; min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; white-space: normal; overflow-wrap: anywhere; font-size: 15px; line-height: 1.3; }
  & .ui-row > .ui-row__tag { grid-column: 3; max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ob-ink-2); }
  & .ui-row > .ui-row__tag i { font-style: normal; }
  & .ui-row > .ui-row__meta { grid-column: 4; max-width: 6em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ob-ink-2); }
  & .ui-row > .ui-row__check { display: none; }   /* the equipped tick repeats the row's 装備中 tag */
  & .ui-row > .ui-row__info { grid-column: 1 / -1; color: var(--ob-ink-2); font-size: 12px; }
  & .ui-row > :is(.ui-row__gutter, .ui-row__bullet) { display: none; }
  & .ui-list__rows { scroll-padding-block: 48px; }
  & .ui-row:not([data-ec-card], [data-ec-pile])::before {
    content: ""; display: block; position: absolute; left: calc(var(--ob-line-x) - var(--ob-lamp-s) / 2); top: 50%; z-index: 0; pointer-events: none;
    width: var(--ob-lamp-s); height: var(--ob-lamp-s); margin: calc(var(--ob-lamp-s) / -2) 0 0; transform: none; opacity: 0.55; transition: opacity var(--ob-t-s) linear;
    border: 0; border-image: none; box-shadow: none; background: var(--ob-lamp-off) center / contain no-repeat;
  }
  & .ui-row:not([data-ec-card], [data-ec-pile]):hover { color: var(--ob-ink); }
  & .ui-row:not([data-ec-card], [data-ec-pile]):hover::before { opacity: 1; }
  & .ui-row:not([data-ec-card], [data-ec-pile]):is([aria-selected="true"], .controller-selected) { color: var(--ob-ink); }
  & .ui-row:not([data-ec-card], [data-ec-pile]):is([aria-selected="true"], .controller-selected)::before {
    left: calc(var(--ob-line-x) - var(--ob-lamp) / 2); width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2); opacity: 1;
    background: var(--ob-lamp-on) center / contain no-repeat;
  }
  & .ui-row:is([aria-selected="true"], .controller-selected) > .ui-row__name { font-weight: 700; }
  & .ui-row:is([aria-selected="true"], .controller-selected) > :is(.ui-chip, .ui-row__tag, .ui-row__meta) { opacity: 1; color: var(--ob-ink); }
  & .ui-row:not([data-ec-card], [data-ec-pile])[aria-disabled="true"] { color: var(--ob-ink-2); }
  & .ui-row:not([data-ec-card], [data-ec-pile])[aria-disabled="true"]::before { background-image: var(--ob-lamp-locked); }
  & .ui-row:is(:hover, :focus-visible, [aria-selected="true"], .controller-selected) { background: none; box-shadow: none; outline: 0; }
  & .ui-row:focus-visible { outline: 2px solid transparent; outline-offset: -2px; }
  & .ui-row:not([data-ec-card], [data-ec-pile]):focus-visible::after {
    content: ""; display: block; position: absolute; inset: -2px 0 -2px calc(var(--ob-line-x) + 6px); z-index: 2; pointer-events: none;
    border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus); background: none; box-shadow: none;
  }
  & .ui-row__group { min-height: 0; padding: 14px 4px 4px calc(var(--ob-line-x) + 14px); background: none; border: 0; color: var(--ob-ink-2); font-size: 12px; letter-spacing: 0.12em; }
  & .ui-row__group .ui-chip { width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none; }

  /* the detail: a large name, one quiet line under it, then the facts. Facts are label + value pairs, never boxes; a group of lines is held by spacing alone */
  & .ui-detail__head { padding: 0 0 2px; gap: 2px 12px; border: 0; background: none; }
  & .ui-detail__head .ui-chip { width: auto; height: auto; padding: 0; border: 0; background: none; box-shadow: none; }
  & .ui-detail__head .ic-art { border: 0; background: none; box-shadow: none; }
  & .ui-detail__name { font-size: 20px; line-height: 1.35; color: var(--ob-ink); }
  & .ui-detail__en { color: var(--ob-ink-2); font-family: var(--ff-ui); letter-spacing: 0.08em; }
  /* section headings print "EFFECT / 効果": only the Japanese word is shown (font-size 0 hides the English text node and the slash; the <i> brings its own size back) */
  & .ui-detail__sub { font-size: 0; letter-spacing: 0; color: var(--ob-ink-2); margin: 4px 0 0; }
  & .ui-detail__sub > i { font-size: 12px; font-style: normal; letter-spacing: 0.12em; }
  & :is(.ic-stat, .ic-spell, .ic-mods, .ic-trait, .ic-compare, .ui-effects, .ui-stats, .ui-tags) {
    background: none; border: 0; border-image: none; border-radius: 0; box-shadow: none;
  }
  & .ic-stats { gap: 4px 20px; }
  & .ic-stat { padding: 0; }
  & .ic-stat__value { font-size: 18px; }
  & .ic-spell { padding: 0; }
  & .ic-mods { padding: 0; }
  & .ic-trait { padding: 2px 0; margin: 0; }
  & .ic-trait > .ic-mods { border: 0; border-image: none; padding: 0; background: none; }
  & .ic-compare { padding: 0; color: var(--ob-ink-2); }
  & :is(.ic-line, .ic-risks > li, .ic-mods > li, .ui-effects > li, .ic-trait) { border: 0; background: none; padding-block: 4px; }
  & :is(.ic-line__tag, .ic-throw > span) { border: 0; border-image: none; border-radius: 0; background: none; padding: 0; margin-right: 10px; color: var(--ob-ink-2); font-size: 12px; letter-spacing: 0.04em; }
  & .ic-throw { color: var(--ob-ink); }
  & .ic-flavor { border: 0; background: none; padding-top: 2px; color: var(--ob-ink-2); font-family: var(--ff-ui); }
  & :is(.ui-tag, .ic-el, .ui-spell-stat, .ui-spell-traits > li, .route-tags > li, .ui-spell-tags li) {
    padding: 0; background: none; border: 0; border-image: none; border-radius: 0; box-shadow: none;
  }
  & .ui-tags { gap: 4px 16px; }
  & .ui-stats { padding: 6px 0 12px; background: none; }
  & .ui-stats dt { color: var(--ob-ink-2); }
  & .ui-stats dd { font-size: 18px; }
  & .ui-detail__hint { border: 0; background: none; padding-top: 2px; color: var(--ob-ink-2); }
  & :is(.ui-detail__actions, .ui-desc) { border: 0; background: none; padding-top: 6px; }
  & .ui-desc { padding-inline: 4px; }
  & .ui-desc__text { color: var(--ob-ink-2); }
  & :is(.ui-effects, .ic-lines, .ic-risks, .ic-mods, .ic-stats, .ui-tags, .ui-detail__hint, .ui-spell-prose, .ic-flavor, .ui-detail__extra, .ui-detail__react):empty { display: none; }
  /* the key legend ("[ ] タブ" and the like, keyboard / pad only) wraps inside the footer row instead of running past the right edge */
  & .ui-desc .ui-guide:not([data-kind="item"]) { flex-wrap: wrap; justify-content: flex-start; row-gap: 2px; min-width: 0; max-width: 100%; }
  & .ui-desc .ui-guide:not([data-kind="item"]) .ui-key { flex: 0 1 auto; min-width: 0; white-space: nowrap; }
  & .ui-guide kbd { margin-right: 6px; }
  & .ui-guide span.ui-key { color: var(--ob-ink-2); }

  /* 戻る: a chevron and the word, no plate (the chevron is the obs2 part; keyboard / pad keep their key name instead) */
  & .ui-desc .ui-guide .ui-key[data-guide="cancel"] { border-width: 0; border-image: none; background: none; color: var(--ob-ink-2); gap: 8px; }
  & .ui-desc .ui-guide .ui-key[data-guide="cancel"]:is(:hover, :active, .is-pressed) { color: var(--ob-ink); transform: none; }

  /* spell book cards: no card frame. Each card is a stretch of the survey line with its point at the name: plain ring (learned), dashed ring (not yet learned / unknown),
     lit ring at --ob-lamp when selected. Cards are parted by one rule; the selected card's text goes to full ink. */
  /* cards are parted by space alone. An idle card's text stays readable for browsing (--ob-ink-r, between the two inks); selection is the lit point and the bold name. */
  & .ui-spell-row {
    position: relative; margin: 0; padding: 14px 4px 18px calc(var(--ob-line-x) + 14px); color: var(--ob-ink-r); outline: 0;
    border: 0; border-image: none; border-radius: 0; box-shadow: none; background: none;
  }
  & .ui-spell-row::before {
    content: ""; position: absolute; left: calc(var(--ob-line-x) - var(--ob-lamp-s) / 2); top: 26px; width: var(--ob-lamp-s); height: var(--ob-lamp-s); margin-top: calc(var(--ob-lamp-s) / -2); pointer-events: none;
    opacity: 0.6; background: var(--ob-lamp-off) center / contain no-repeat;
  }
  & .ui-spell-row .ui-spell-name { color: var(--ob-ink); }
  & .ui-spell-row[data-selected="true"] { outline: 0; background-color: transparent; color: var(--ob-ink); }
  & .ui-spell-row[data-selected="true"]::before {
    left: calc(var(--ob-line-x) - var(--ob-lamp) / 2); width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2); opacity: 1;
    background: var(--ob-lamp-on) center / contain no-repeat;
  }
  & .ui-spell-row[data-spell-state="unlearned"], & .ui-spell-row[data-spell-state="unknown"] { color: var(--ob-ink-2); border-style: none; }
  & .ui-spell-row[data-spell-state="unlearned"]::before, & .ui-spell-row[data-spell-state="unknown"]::before { background-image: var(--ob-lamp-locked); }
  & .ui-spell-row:hover::before { opacity: 1; }
  & .ui-spell-row:focus-visible { outline: 2px solid transparent; }
  & .ui-spell-row:focus-visible::after {
    content: ""; position: absolute; inset: 2px 0 2px calc(var(--ob-line-x) + 6px); z-index: 2; pointer-events: none;
    border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus); background: none; box-shadow: none;
  }
  /* learned is the normal state of a spell in the book: only the exceptions (未解析) carry a word */
  & .ui-spell-row[data-spell-state="learned"] .ui-spell-state { display: none; }
  & .ui-spell-state { border: 0; background: none; padding: 0; color: var(--ob-ink-2); font-weight: 400; font-size: 12px; }
  & .ui-spell-stats { gap: 2px 16px; }
  & .ui-spell-stat { gap: 6px; }
  & .ui-spell-stat dt { color: var(--ob-ink-2); }
  & .ui-spell-stat dd { color: var(--ob-ink); font-weight: 500; }
  & .ui-spell-row:not([data-selected="true"]) .ui-spell-stat dd { color: var(--ob-ink-r); }
  & .ui-spell-row:not([data-selected="true"]) .ui-spell-name { font-weight: 400; }
  & :is(.ui-spell-traits, .ui-spell-tags) { gap: 0; color: var(--ob-ink-2); font-size: 12px; }
  & :is(.ui-spell-traits > li, .ui-spell-tags li) + li::before { content: "·"; margin: 0 8px; }
  & .ui-featuretag { border: 0; background: none; padding: 0; min-height: 0; color: inherit; }
  & .ui-spell-range .ui-range__grid { border: 0; }
  & .ui-spell-range figcaption { color: var(--ob-ink-2); font-size: 12px; }
  /* the last card scrolls fully clear of the fixed cast bar (its height + 8px) */
  & .ui-spell-options { padding: 8px; scroll-padding-bottom: 56px; scroll-snap-type: y proximity; background: none; border: 0; border-image: none; }
  & .ui-spell-row { scroll-snap-align: start; }

  /* second level: the element filters are their marks alone, dim; the chosen one goes to full strength with the lit point under it (the same mark of choice as the tabs).
     No branch line, no rings around the marks. They scroll sideways and snap, so a cut-off mark never rests half hidden. */
  & .ui-chips { scroll-snap-type: x proximity; scroll-padding-inline: 8px; background: none; }
  & .ui-chips > .ui-chipbtn { scroll-snap-align: start; }
  & .ui-chipbtn {
    position: relative; box-sizing: border-box; min-width: 44px; min-height: 44px; padding: 0 9px; border: 0; border-image: none; border-radius: 0; box-shadow: none; text-shadow: none; outline: 0;
    color: var(--ob-ink-2); font-weight: 400; background: none; transition: color var(--ob-t-s) linear;
  }
  & .ui-chipbtn > :is(.ui-spell-icon, .ui-chipbtn__all) { opacity: 0.7; transition: opacity var(--ob-t-s) linear; }
  & .ui-chipbtn:hover { color: var(--ob-ink); background-color: transparent; }
  & .ui-chipbtn:hover > :is(.ui-spell-icon, .ui-chipbtn__all) { opacity: 0.8; }
  & .ui-chipbtn:is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"]) { color: var(--ob-ink); font-weight: 700; background: none; border: 0; box-shadow: none; }
  & .ui-chipbtn:is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"]) > :is(.ui-spell-icon, .ui-chipbtn__all) { opacity: 1; filter: brightness(1.45) drop-shadow(0 0 3px var(--ob-ink)); }
  & .ui-chipbtn:is(:active, .is-pressed):not(:disabled) > :is(.ui-spell-icon, .ui-chipbtn__all) { scale: 0.92; }
  & .ui-chipbtn:is(:disabled, [aria-disabled="true"]) { color: var(--ob-ink-2); background: var(--ob-lamp-locked) center bottom 1px / 8px 8px no-repeat; }
  & .ui-chipbtn:focus-visible { outline: 2px solid transparent; }
  /* the earlier layer (density.css) outlines and underlines these controls for focus and for the cursor class a tap also leaves: the choice is the brightness and the point
     under the mark, keyboard / pad focus the corner brackets. The transparent outline only serves forced-colours mode. */
  & :is(.ui-chipbtn, .ui-segbtn, .ui-featuretag, .ui-spell-tools summary):is(:focus-visible, .controller-selected) { outline: 2px solid transparent; text-decoration: none; }
  & .ui-chipbtn:is(:focus-visible, .controller-selected)::after {
    content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    border: 8px solid transparent; border-image: var(--ob-focus) var(--ob-sl-focus) / 8px stretch;
  }
  /* 詳細 / コンパクト: two words with a survey point each (lit = the current one) */
  & .ui-spell-display { gap: 0 12px; }
  & .ui-spell-display-btn {
    min-height: 44px; padding: 0 2px 0 18px; border: 0; border-image: none; border-radius: 0; box-shadow: none; outline: 0;
    color: var(--ob-ink-2); font: 400 13px/1.4 var(--ff-ui); background: var(--ob-lamp-off) left center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat;
  }
  & .ui-spell-display-btn[aria-pressed="true"] { color: var(--ob-ink); font-weight: 700; background-image: var(--ob-lamp-on); border: 0; }
  & .ui-spell-display-btn[aria-pressed="true"]::before { content: none; }
  & .ui-spell-display-btn { position: relative; }
  & .ui-spell-display-btn:focus-visible { outline: 2px solid transparent; }
  & .ui-spell-display-btn:is(:focus-visible, .controller-selected)::after {
    content: ""; position: absolute; inset: 2px -4px; z-index: 2; pointer-events: none;
    border: 8px solid transparent; border-image: var(--ob-focus) var(--ob-sl-focus) / 8px stretch;
  }
  /* the one toggle names the view in use, so its point is always lit; the main-type dropdown is a key plate (the observer button bitmap) with real text */
  & .ui-spell-display-toggle { color: var(--ob-ink); font-weight: 700; background-image: var(--ob-lamp-on); }
  & .ui-spell-type {
    appearance: none; box-sizing: border-box; min-height: 44px; max-width: 11em; padding: 0 22px 0 10px; border: solid transparent; border-width: var(--ob-bw-btn); border-radius: 0;
    border-image: var(--ob-frame-btn); background: var(--ob-chev-r) right 6px center / 10px 10px no-repeat; color: var(--ob-ink); font: 400 13px/1.4 var(--ff-ui); box-shadow: none; outline: 0;
  }
  & .ui-spell-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
  & .ui-spell-type:focus-visible { outline: 2px solid transparent; }
  & .ui-spell-type[aria-expanded="true"] { background-image: var(--ob-chev-r); filter: brightness(1.2); }
  /* the opened list: the observer popup pane (same slice as the other pop-ups), fixed against the visible viewport by renderer.placeSpellTypePopup; rows are 48px survey-point
     rows (lamp = the type in use, the row plate = the one the keyboard / pad / pointer is on). It scrolls inside when the screen is short. */
  & .ui-spell-type-wrap { position: relative; display: inline-flex; flex: none; min-width: 0; }
  & .ui-spell-type-pop {
    position: fixed; z-index: 60; box-sizing: border-box; display: flex; flex-direction: column; gap: 2px; min-width: 11em; max-width: calc(100vw - 16px); margin: 0; padding: 2px;
    overflow: hidden auto; overscroll-behavior: contain; touch-action: pan-y; scrollbar-width: thin;
    border: solid transparent; border-width: var(--ob-bw-popup); border-image: var(--ob-frame-popup); background: none; color: var(--ob-ink); font: 400 13px/1.4 var(--ff-ui);
  }
  & .ui-spell-type-opt {
    flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-sizing: border-box; width: 100%; min-height: 48px; margin: 0; padding: 0 10px 0 30px;
    text-align: left; white-space: nowrap; color: var(--ob-ink-2); border: solid transparent; border-width: 0; border-radius: 0; background: var(--ob-lamp-off) left 10px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat;
  }
  & .ui-spell-type-opt[aria-selected="true"] { color: var(--ob-ink); font-weight: 700; background-image: var(--ob-lamp-on); background-size: var(--ob-lamp) var(--ob-lamp); background-position: left calc(16px - var(--ob-lamp) / 2) center; }
  & .ui-spell-type-opt:is(.is-active, :hover) { color: var(--ob-ink); border-width: var(--ob-bw-row); border-image: var(--ob-frame-row); padding-left: 2px; background-image: none; }
  & .ui-spell-type-opt:is(.is-active, :hover)[aria-selected="true"] { font-weight: 700; }
  & .ui-spell-type-opt__n { color: var(--ob-ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
  & .ui-spell-type-opt::before, & .ui-spell-type-opt::after { content: none; }

  /* the action bar: a 48px grid, two columns, 戻る at its end; the footer's own keys (items, spells) use the same 48px cells */
  & .ui-detail__actions { display: grid; grid-template-columns: repeat(var(--nx-action-cols, 2), minmax(0, 1fr)); grid-auto-rows: 48px; gap: 8px; align-items: stretch; height: auto; max-height: none; }
  & .ui-detail__actions .ui-btn { box-sizing: border-box; width: 100%; height: 48px; min-height: 48px; max-height: 48px; margin: 0; padding: 0 8px 0 30px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; justify-content: flex-start; }
  & .ui-detail__actions .ui-btn__meta { display: none; }
  & .ui-desc .ui-guide[data-kind="item"] { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 48px; gap: 8px; align-items: stretch; }
  & .ui-desc .ui-guide[data-kind="item"] > :is(.ui-guide__acts, .ui-guide__keys) { display: contents; }
  & .ui-desc .ui-guide[data-kind="item"] .ui-key { box-sizing: border-box; flex: none; width: 100%; height: 48px; min-height: 48px; max-height: 48px; margin: 0; display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
  & .ui-desc .ui-guide[data-kind="item"] .ui-key small { color: var(--ob-ink-2); font-family: var(--ff-num); font-size: 12px; }
  & .ui-desc .ui-guide[data-kind="item"] .ui-guide__keys > [data-guide="confirm"] { display: none; }
  /* 戻る is not a survey point: its chevron (touch) or key name (keyboard) leads the word */
  & .ui-desc .ui-guide .ui-key[data-guide="cancel"] { padding: 0 8px; justify-content: center; }
  /* UI17: 戻る has one place on every tab: the right end of the bottom bar (the last cell of the item grid's right column, the far right of the key row),
     whatever commands come before it and whatever key hints come after it */
  & .ui-desc .ui-guide .ui-key[data-guide="cancel"] { order: 99; flex: 0 0 auto; min-width: 96px; margin-inline-start: auto; }
  & .ui-desc .ui-guide[data-kind="item"] .ui-key[data-guide="cancel"] { grid-column: -2 / -1; margin-inline-start: 0; }
}
/* a wide screen: the keys keep a hand-sized width and gather at the right, under the detail, instead of running edge to edge */
@media (min-width: 600px) and (min-height: 521px) {
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-desc .ui-guide[data-kind="item"] { grid-template-columns: repeat(auto-fit, minmax(120px, 176px)); justify-content: end; }
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-detail__actions { grid-template-columns: repeat(var(--nx-action-cols, 2), minmax(0, 176px)); }
}
/* touch: the [ ] tab keys and the key-name hints are keyboard / pad help, never shown on a touch screen (renderer.js does not even draw the key-only hints there) */
:root:root:root:root[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-tabs__hint { display: none; }   /* above the 4x :root block's display: inline-flex */
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu .ui-desc .ui-guide[data-kind="item"] .ui-guide__keys > [data-touch="off"] { display: none; }
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-desc .ui-guide .ui-key[data-guide="cancel"] > kbd { display: none; }
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-desc .ui-guide .ui-key[data-guide="cancel"]::after {
  content: ""; order: -1; flex: none; width: 10px; height: 18px; background: var(--ob-chev-l) center / contain no-repeat; opacity: 0.8;
}
/* the spell book's chosen element filter: components.css draws a 2px box and a 3px inset bar on it through two ids (#actionSidebar … #sidebarSubtabs), which outranks the menu
   block's one-id chip rule. The same scope with both ids clears them: the choice stays the brightness and the point under the mark. */
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-tab="SPELL"][data-spellbook="1"]:not([data-hand="1"]) #sidebarSubtabs .ui-spell-navigation .ui-chipbtn:is([aria-pressed="true"], [aria-selected="true"], [aria-current="true"]) { border: 0; box-shadow: none; }
/* touch: the corner brackets are keyboard / pad focus only. A tap leaves focus (and the pad cursor class) on what it touched, which must never read as a frame around the choice:
   on a touch screen the choice is only ever the lit point. */
:root:root:root:root[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) :is(
  .ui-row:not([data-ec-card], [data-ec-pile]):focus-visible, .ui-spell-row:focus-visible, .ui-chipbtn, .ui-spell-display-btn
)::after { content: none; }
:root:root:root:root[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) :where(button:not(.ui-tab, .ui-chipbtn), .ui-key--act, summary):focus-visible::before { content: none; }
:root:root:root:root[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-tab:is(:focus-visible, .controller-selected):not(:active, .is-pressed, :disabled, [aria-disabled="true"])::before { opacity: 0; }
/* a command the detail already offers as its own key (設定 → 開く) is not repeated in the footer on a touch screen */
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]):has(.ui-detail__actions > .ui-btn) .ui-desc .ui-guide .ui-key[data-guide="confirm"] { display: none; }
/* an item command's note ("R5・消費", "空きマスへ") stays in its accessible name and title; the key itself shows the verb only. The cast key keeps its cost. */
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-tab="ITEM"]:not([data-hand="1"]) .ui-desc .ui-guide .ui-key--act small { display: none; }

/* The primary tab band is taller than the 44px / 48px first track the earlier layers reserve: the first track follows --ob-tab-h in every layout of the full menu
   (one rule per layout, each as specific as the layer rule it replaces plus the :root chain). */
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr) 44px; }
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-item-footer="1"]:not([data-hand="1"]) { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr) auto; }
@media (orientation: portrait) {
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]),
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"])[data-sheet="min"] { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr) auto 44px; }
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-item-footer="1"]:not([data-hand="1"]),
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-item-footer="1"]:not([data-hand="1"])[data-sheet="min"] { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr) auto auto; }
}
@media (orientation: landscape) and (max-height: 520px) {
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr); }
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-item-footer="1"]:not([data-hand="1"]) { grid-template-rows: var(--ob-tab-h) minmax(0, 1fr) auto; }
}
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-tab="SPELL"][data-spellbook="1"]:not([data-hand="1"]) { grid-template-rows: var(--ob-tab-h) auto minmax(0, 1fr) auto; }

/* the spell book's notice (a number on a real text node) is the badge ring, set at the upper right of its tab's survey point */
html[data-skin="ps1"] body .sp-badge {
  top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 3px; border: 0; border-radius: 50%; box-shadow: none; box-sizing: border-box; text-align: center;
  background: var(--ob-badge) center / 100% 100% no-repeat, var(--ob-glass); font: 700 12px/20px var(--ff-ui); color: var(--ob-ink); text-shadow: none;
}
html[data-skin="ps1"] body .ui-tab > .sp-badge { top: 0; right: auto; left: calc(50% + 9px); z-index: 2; }   /* on its own tab's symbol, at the upper right */

/* phone landscape and portrait: tighter detail spacing */
@media (max-width: 599px), (max-height: 520px) {
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-detail { padding: 12px 0 0; gap: 8px; }
  /* the compact layout reserves the action bar's height: the keys are 48px here (one row, or two rows and the gap) */
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]):has(.ui-detail__actions[data-compact-rows="1"]) { --nx-action-budget: 48px; }
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]):has(.ui-detail__actions[data-compact-rows="2"]) { --nx-action-budget: 104px; }
}
@media (min-width: 600px) and (min-height: 521px) {
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-tab .ui-tab__ja { font-size: 13px; }
  :root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-detail__name { font-size: 24px; }
}

/* Elvi: a disabled key is dimmed by the layer, not only by the (similar-looking) image */
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar.ui-menu:not([data-hand="1"]) :where(button:not(.ui-tab, .ui-chipbtn, .ui-tabs__hint, .ui-spell-display-btn), .ui-key--act, summary):is(:disabled, [aria-disabled="true"]) { opacity: 0.55; color: var(--ob-ink-2); }

/* ============================== 3. field HUD (title plate, minimap frame, gauge grooves) ============================== */
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-title {
  padding: 0; color: var(--ob-ink); text-shadow: none; transform: none; box-shadow: none; background: none;
  border: solid transparent; border-width: var(--ob-bw-nameplate); border-image: var(--ob-frame-nameplate);
}
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-title::before { content: none; display: none; }
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-title__meta { color: var(--ob-ink-2); }
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-title__main { color: var(--ob-ink); }
html[data-skin="ps1"]:not([data-native-frame]) body .ui-rail > .ui-minimap {
  -webkit-mask-image: none; mask-image: none; border: 1px solid transparent; border-image: var(--ob-inset) var(--ob-sl-window) fill / var(--ob-bw-inset) stretch;
}
html[data-skin="ps1"]:not([data-native-frame]) body .ui-rail > .ui-minimap::before { content: none; display: none; }
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-gauge__bar {
  background: none; box-shadow: none; border: 1px solid transparent; border-radius: 0;
  border-image: var(--ob-inset) var(--ob-sl-window) fill / var(--ob-bw-tag) / 3px stretch;
}
html[data-skin="ps1"]:not([data-native-frame]) body .ui-hud .ui-gauge__fill { border-radius: 0; }

/* ============================== 4. action log ============================== */
/* UI17: the two-line strip is back. Collapsed it is part of the glass: the same black, a plain hairline part above it, ink text, the newest line full ink and the one before
   it dimmer; it never fades away (the notebook skin's 9 s fade is not used: the strip has to stay readable). Opened, it is the gray hairline pane growing upward from the
   same bottom edge, scrolling inside, with the full-record button as its last row. Selected by class only (the sheet never styles #messagePanel). */
html[data-skin="ps1"] body .ui-rail > .ui-log {
  animation: none; opacity: 1; color: var(--ob-ink); background: #000 var(--ob-hairline) top center / 100% 8px no-repeat; border: 0; border-image: none; box-shadow: none; border-radius: 0;
  font-family: var(--ff-ui); font-size: 12px; line-height: 1.5;
}
/* the side paddings of the phone-landscape strip (they keep the words clear of the pads, skin-ps1.css) stay; inside a portrait LCD the strip is the glass width */
html[data-skin="ps1"][data-native-frame] body .ui-rail > .ui-log:not(.expanded) { padding: 6px 8px 2px; }
html[data-skin="ps1"] body .ui-rail > .ui-log .ui-log__line { color: var(--ob-ink-2); font-size: inherit; font-weight: 400; padding-left: 0; animation: none; }
html[data-skin="ps1"] body .ui-rail > .ui-log .ui-log__line::before { content: none; display: none; }
html[data-skin="ps1"] body .ui-rail > .ui-log .ui-log__line:last-child { color: var(--ob-ink); font-weight: 700; }
html[data-skin="ps1"] body .ui-rail > .ui-log.expanded {
  background: var(--ob-glass); border: var(--ob-bw-inset) solid transparent; border-image: var(--ob-frame-inset); padding: 4px 6px;
}
html[data-skin="ps1"] body .ui-rail > .ui-log.expanded .ui-log__line { color: var(--ob-ink-2); }
html[data-skin="ps1"] body .ui-rail > .ui-log.expanded .ui-log__line:last-child { color: var(--ob-ink); }

/* UI17 landscape exterior rails (landscapeRails.js sets data-board-rails / --hud-rail-x / --hud-rail-w / --rail-log-top / --rail-log-bottom / --board-x0 / --board-x1
   from the fitted board, 2D-rich and 3D alike). The HUD and the collapsed two-line log leave the board: they sit in the band on the side without the minimap,
   the log under the HUD and above the first control of that band, both on the inset glass plate (generated frame art). Opened, the log grows upward from
   the board's bottom edge across the board column only, so no pad / key in a band is ever covered. Bands under 112px keep the earlier overlay. */
@media (orientation: landscape) {
  /* Compact rail HUD (~80px at 844x390, so HUD + cue + the 44px log fit above the ~167px pad and the 44px bottom keys): the floor nameplate and the inset frame keep
     their bitmaps at a smaller border-image width (no CSS-only plate), label and value share one 14px line, the bar is its own thin 6px row. */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud {
    position: fixed !important; left: var(--hud-rail-x) !important; right: auto !important; top: calc(var(--safe-t, 0px) + 4px) !important; bottom: auto !important;
    width: var(--hud-rail-w) !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; box-sizing: border-box; padding: 2px 6px !important;
    --hud-cols: minmax(0, 1fr) auto; --hud-areas: "title sp" "hp hp" "mp mp" "status status";
    grid-template-columns: minmax(0, 1fr) auto !important; grid-template-areas: "title sp" "hp hp" "mp mp" "status status" !important; gap: 2px 6px !important; align-content: start !important;
    background: var(--ob-glass); border: 4px solid transparent; border-image: var(--ob-frame-inset); border-image-width: 4px;
  }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-title {
    display: flex !important; flex-direction: row !important; align-items: baseline; gap: 6px; min-width: 0; min-height: 0 !important; max-height: 22px; overflow: hidden; white-space: nowrap;
    padding: 0 4px !important; margin: 0 !important; transform: none !important; border-width: 3px 8px 3px 12px !important; border-image-width: 3px 8px 3px 12px !important;
  }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-title::before { content: none !important; display: none !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-title :is(.ui-title__main, .ui-title__meta) { display: inline !important; font-size: 12px !important; line-height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-title__meta { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud > .ui-gauge {
    min-width: 0; min-height: 0 !important; margin: 0 !important; padding: 0 !important; display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important; grid-template-areas: "label value" "bar bar" !important; gap: 2px 4px !important; align-items: center !important; --gauge-h: 6px;
  }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-gauge__label { display: inline-flex !important; align-items: center; gap: 3px; width: auto !important; min-width: 0 !important; min-height: 0 !important; font-size: 11px; line-height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-gauge__label::before { width: 14px !important; height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-gauge__value { justify-self: end; white-space: nowrap; font-size: 11px !important; line-height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-gauge__value b { font-size: 12px !important; line-height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-gauge__bar { height: 6px !important; min-height: 0 !important; margin: 0 !important; border-image-width: 2px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud .ui-status { flex-wrap: nowrap; min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; touch-action: pan-x; }
  /* the depth / section cue under the plate: one 14px line per entry (ellipsis), so it adds ~18px, not a wrapped paragraph */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud > .ui-depth-cue { width: 100% !important; max-width: 100% !important; box-sizing: border-box; padding: 2px 4px !important; font-size: 11px !important; line-height: 14px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud > .ui-depth-cue > * { font-size: 11px !important; line-height: 14px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud > .ui-depth-cue > :is(.ui-depth-cue__warn, .ui-section-cue__line) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  /* the section line keeps only its actionable hint in the narrow rail (the repeated place heading would push the instruction into the ellipsis); other lines stay whole */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-hud > .ui-depth-cue > .ui-section-cue__line[data-line="section"] > .ui-section-cue__place { display: none; }
  /* the aim readout: the whole rail width (the overlay layout subtracts a minimap that is not in this band) */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body #fieldHud > #spellTargetHud { width: auto !important; margin-inline-start: 0 !important; }
  /* Collapsed log: a fixed 44px box (2 x 16px lines + 2px padding + the 4px inset frame; renderer.syncLogHeight writes the same height) in the slot landscapeRails.js
     measured: under the HUD + cue and clear of every control in that band, else the band on the minimap side, else (narrow screens only) the board's bottom edge. */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-log:not(.expanded) {
    position: fixed !important; left: var(--rail-log-x, var(--hud-rail-x)) !important; right: auto !important; width: var(--rail-log-w, var(--hud-rail-w)) !important;
    top: var(--rail-log-top, 96px) !important; bottom: auto !important; height: 44px !important; min-height: 0 !important; max-height: 44px !important;
    margin: 0 !important; padding: 2px 8px !important; box-sizing: border-box; overflow: hidden; font-size: 12px !important; line-height: 16px !important;
    background: var(--ob-glass); border: 4px solid transparent; border-image: var(--ob-frame-inset); border-image-width: 4px;
  }
  /* the touch tile notebook shares the HUD band: it starts under the HUD plate and its cue */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"][data-hud-rail="left"][data-input="touch"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-field > .ui-inspect:not([hidden]) { top: var(--rail-hud-bottom, 96px) !important; }
  /* collapsed: the newest two lines, one line each (ellipsis), so the newest is never pushed out by wrapping */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-log .ui-log__line { line-height: 16px !important; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-log:not(.expanded) .ui-log__line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-log:not(.expanded) .ui-log__line:nth-last-child(n + 3) { display: none; }
  /* Opened: the same column and the same LOWER EDGE as the collapsed strip (--rail-log-bottom); it grows upward only, at most to the nearest control above it or the
     safe top (--rail-log-room), and scrolls inside. renderer.anchorExpandedLog pins the same edge inline. */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-native-frame]):not([data-inspect="1"]) body .ui-rail > .ui-log.expanded {
    position: fixed !important; left: var(--rail-log-x, var(--hud-rail-x)) !important; right: auto !important; width: var(--rail-log-w, var(--hud-rail-w)) !important;
    top: auto !important; bottom: var(--rail-log-bottom, 8px) !important; height: auto !important; max-height: var(--rail-log-room, 44px) !important; overflow-y: auto !important; margin: 0 !important; box-sizing: border-box;
    font-size: 12px !important; line-height: 16px !important; border: 4px solid transparent; border-image: var(--ob-frame-inset); border-image-width: 4px; padding: 2px 8px !important;
  }
  /* Keyboard / mouse play (no pad): the guide keys leave the board for a strip at the foot of the band on the minimap side, wrapping into rows, their key-cap bitmaps
     unchanged and at least 44px tall. Touch keeps its own placements. */
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-input="touch"]):not([data-native-frame]):not([data-inspect="1"]) body .ui-field > .ui-guide--field {
    position: fixed !important; top: auto !important; bottom: calc(var(--safe-b, 0px) + 8px) !important; left: calc(var(--board-x1) + 8px) !important; right: calc(var(--safe-r, 0px) + 8px) !important;
    width: auto !important; max-width: none !important; margin: 0 !important; box-sizing: border-box; flex-wrap: wrap !important; align-items: stretch !important; justify-content: stretch !important; gap: 6px !important; transform: none !important;
  }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"][data-hud-rail="right"]:not([data-input="touch"]):not([data-native-frame]):not([data-inspect="1"]) body .ui-field > .ui-guide--field {
    left: calc(var(--safe-l, 0px) + 8px) !important; right: calc(100vw - var(--board-x0) + 8px) !important;
  }
  :root:root:root:root:root[data-skin="ps1"][data-board-rails="1"]:not([data-input="touch"]):not([data-native-frame]):not([data-inspect="1"]) body .ui-field > .ui-guide--field .ui-key {
    flex: 1 1 auto !important; min-height: 44px !important; box-sizing: border-box; justify-content: center; white-space: nowrap;
  }
}

/* UI17 the spell purchase question: the same gray hairline pane as every window (its bitmap frame), ink text, the two commands are the menu's own key plates.
   The pane is fully opaque (the theme's own void colour, not the 90% glass), so no spell-list text shows through behind the question. */
html[data-skin="ps1"] body #actionSidebar > .ui-learn-confirm > .ui-learn-confirm__win {
  background: var(--ob-void); color: var(--ob-ink); border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-window); box-shadow: none; font-family: var(--ff-ui);
}
html[data-skin="ps1"] body .ui-learn-confirm__cost { color: var(--ob-ink-2); font-size: 12px; }
html[data-skin="ps1"] body .ui-learn-confirm__cost b { color: var(--ob-ink); font-family: var(--ff-num); }
html[data-skin="ps1"] body .ui-learn-confirm__why { color: var(--nx-danger, #e86a5a); font-size: 12px; }
html[data-skin="ps1"] body .ui-learn-confirm__acts > button { color: var(--ob-ink); background: none; border: var(--ob-bw-tag) solid transparent; border-image: var(--ob-tag) var(--ob-sl-tag) fill / var(--ob-bw-tag) stretch; font: inherit; font-weight: 700; }
html[data-skin="ps1"] body .ui-learn-confirm__acts > button:disabled { color: var(--ob-ink-2); opacity: 0.55; }
html[data-skin="ps1"] body .ui-learn-confirm__acts > button:is(:focus-visible, .controller-selected) { outline: 2px solid var(--ob-hi); outline-offset: 1px; }
@keyframes ob-ask-in { from { opacity: 0; scale: calc(1 - 0.04 * var(--menu-fx-k, 1)); } }
html[data-skin="ps1"]:not([data-menu-fx="0"]) body #actionSidebar > .ui-learn-confirm > .ui-learn-confirm__win { animation: ob-ask-in var(--ob-t-m) var(--ob-ease) backwards; }

/* ============================== 5. field overlays: threat line, aim / gate / action choice cards ============================== */
html[data-skin="ps1"] body .ui-rail > .ui-threat {
  background: none; box-shadow: none; transform: none; color: var(--nx-danger);
  border: var(--ob-bw-inset) solid transparent; border-image: var(--ob-frame-inset);
}
html[data-skin="ps1"] body .ui-field :is(.ui-aim, .ui-gate, .ui-choice) {
  background: none; box-shadow: none; color: var(--ob-ink);
  border: var(--ob-bw-inset) solid transparent; border-image: var(--ob-frame-inset);
}

/* ============================== 6. ADV: one dialogue window; the portraits are viewfinders (corner brackets only), the speaker's name is plain bold text ============================== */
html[data-skin="ps1"] body .adv__card {
  padding: 4px; color: var(--ob-ink); box-shadow: none; background: none;
  border: var(--ob-bw-popup) solid transparent; border-image: var(--ob-frame-popup);
}
html[data-skin="ps1"] body .adv__card::before { content: none; display: none; }
html[data-skin="ps1"] body .adv__plate { border: 0; box-shadow: none; padding: 0 4px; }
html[data-skin="ps1"] body .adv__role { color: var(--ob-ink-2); }
html[data-skin="ps1"] body .adv__who { color: var(--ob-ink); }
html[data-skin="ps1"] body .adv__frame { position: relative; background: none; box-shadow: none; border: 0; border-image: none; }
html[data-skin="ps1"] body .adv__box {
  background: none; color: var(--ob-ink); box-shadow: 0 22px 40px -18px rgb(0 0 0 / 0.7);
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-dialog);
}
html[data-skin="ps1"] body .adv__name { display: inline-block; color: var(--ob-ink); background: none; padding: 0 2px; border: 0; border-image: none; }
html[data-skin="ps1"] body .adv__text { color: var(--ob-ink); }
html[data-skin="ps1"] body .adv__box[data-side="none"] .adv__text { color: var(--ob-ink-2); }
html[data-skin="ps1"] body .adv__next { clip-path: none; background: var(--ob-next) center / contain no-repeat; width: 1.8em; height: 1.8em; color: var(--ob-ink); }
html[data-skin="ps1"] body .adv__hint { color: var(--ob-ink-2); }

/* ============================== 7. radio call: one receiver window; inside it, viewfinders and plain text (no inner boxes) ============================== */
html[data-skin="ps1"] .radio {
  --rc-panel: transparent; --rc-box: transparent; --rc-face-bg: transparent; --rc-shadow: none;
  --rc-ink: var(--ob-ink); --rc-dim: var(--ob-ink-2); --rc-hot: var(--ob-ink); --rc-edge: var(--nx-line-3); --rc-edge-dim: var(--nx-line-2);
  --rc-tag-fg: var(--ob-ink);
}
/* the receiver is one opaque window over the field: nothing under it (keys, the log) may show through the reply text */
html[data-skin="ps1"] body .radio__crt {
  padding: 2px 4px; gap: 6px; background: var(--ob-void) padding-box; box-shadow: 0 18px 36px -16px rgb(0 0 0 / 0.75);
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-call);
}
html[data-skin="ps1"] body .radio__crt::before, html[data-skin="ps1"] body .radio__crt::after { content: none; display: none; }
html[data-skin="ps1"] body .radio__tag { background: none; color: var(--ob-ink-2); padding: 0; border: 0; border-image: none; }
/* the channel is printed large in the middle: the head does not repeat it, and the reception points need no caption */
html[data-skin="ps1"] body :is(.radio__chbox, .radio__sig) { display: none; }
html[data-skin="ps1"] body .radio__link::before { width: 12px; height: 12px; background: var(--ob-lamp-on) center / contain no-repeat; }
html[data-skin="ps1"] body .radio__pic { background: none; box-shadow: none; border: 0; border-image: none; }
html[data-skin="ps1"] body .radio__pic::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0.4;
  border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus);
}
html[data-skin="ps1"] body .radio__face[data-on="1"] .radio__pic { box-shadow: none; }
html[data-skin="ps1"] body .radio__face[data-on="1"] .radio__pic::after { opacity: 1; }
html[data-skin="ps1"] body .radio__dir i { width: 1.8em; height: 1.8em; clip-path: none; background: var(--ob-chev-l) center / contain no-repeat; opacity: 0.4; }
html[data-skin="ps1"] body .radio__dir i[data-s="right"] { background-image: var(--ob-chev-r); }
html[data-skin="ps1"] body .radio[data-speaker="left"] .radio__dir i[data-s="left"],
html[data-skin="ps1"] body .radio[data-speaker="right"] .radio__dir i[data-s="right"] { background-color: transparent; opacity: 1; }
/* reception strength: the eight bars the radio already drives (--lv per bar) are eight survey points; a bar whose level passes 0.45 is lit. The signal icon is not used here. */
html[data-skin="ps1"] body .radio__bars {
  display: flex; align-items: center; justify-content: center; gap: 4px; width: auto; max-width: none; height: 22px; min-height: 0; padding: 0; border: 0; box-sizing: border-box; background: none;
}
html[data-skin="ps1"] body .radio__bars i {
  position: relative; flex: none; display: block; width: 12px; height: 12px; margin: 0; transition: none;
  -webkit-mask: none; mask: none; background: var(--ob-lamp-off) center / contain no-repeat;
}
html[data-skin="ps1"] body .radio__bars i::after {
  content: ""; position: absolute; inset: 0; background: var(--ob-lamp-on) center / contain no-repeat;
  opacity: clamp(0, calc((var(--lv, 0.2) - 0.45) * 100), 1);
}
html[data-skin="ps1"] body .radio__box { background: none; padding: 12px 8px 6px; border: 0; border-image: none; }
html[data-skin="ps1"] body .radio__name { color: var(--ob-ink); }
html[data-skin="ps1"] body .radio__text { color: var(--ob-ink); text-shadow: none; }
html[data-skin="ps1"] body .radio__next { clip-path: none; background: var(--ob-next) center / contain no-repeat; width: 1.8em; height: 1.8em; }
/* the choices: one line each, a survey point at the left (ring 12px; the chosen one lit at --ob-lamp) and the words; no plate, no band. Keyboard focus is the corner brackets. */
html[data-skin="ps1"] body :is(.radio__choices, .radio__text) { border: 0; border-image: none; background: none; padding: 2px; box-sizing: border-box; }
html[data-skin="ps1"] body .radio__choice {
  position: relative; isolation: isolate; display: block; width: 100%; min-height: 44px; padding: 0 8px 0 calc(var(--ob-lamp) + 14px); border: 0; border-image: none; border-radius: 0; color: var(--ob-ink-2); text-align: left;
  background: none; box-shadow: none; outline: 0;
}
html[data-skin="ps1"] body .radio__choice::before {
  content: ""; position: absolute; left: 12px; top: 50%; width: var(--ob-lamp-s); height: var(--ob-lamp-s); margin-top: calc(var(--ob-lamp-s) / -2);
  background: var(--ob-lamp-off) center / contain no-repeat;
}
html[data-skin="ps1"] body .radio__choice:is(:hover, :focus-visible, [aria-selected="true"]) { color: var(--ob-ink); font-weight: 700; border: 0; border-image: none; background: none; }
html[data-skin="ps1"] body .radio__choice:is(:hover, :focus-visible, [aria-selected="true"])::before {
  content: ""; left: 10px; width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2); background-image: var(--ob-lamp-on);
}
html[data-skin="ps1"] body .radio__choice:disabled { color: var(--ob-ink-2); }
html[data-skin="ps1"] body .radio__choice:disabled::before { background-image: var(--ob-lamp-locked); }
html[data-skin="ps1"] body .radio__choice:focus-visible { outline: 2px solid transparent; }
html[data-skin="ps1"] body .radio__choice:focus-visible::after {
  content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus);
}
/* 次へ / とばす: words, no plate (the 44px hit area stays); a held one dims */
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) .hint-btn {
  min-height: 44px; color: var(--ob-ink-2); background: none; border-radius: 0; box-shadow: none; border: 0; border-image: none; padding: 0 10px;
}
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) .hint-btn[data-hint="next"] { color: var(--ob-ink); }   /* the step forward reads in the first ink, とばす stays the second */
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) .hint-btn:hover { color: var(--ob-ink); }
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) .hint-btn:is(:active, .is-pressed) { color: var(--ob-ink); opacity: 0.7; }
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) .hint-btn:focus-visible { outline: 1px solid var(--ob-ink-2); outline-offset: 2px; }
html[data-skin="ps1"] body :is(.radio__hint, .adv__hint) kbd { border: 0; border-image: none; border-radius: 0; background: none; color: var(--ob-ink-2); padding: 0; margin-right: 6px; }
html[data-skin="ps1"][data-input="touch"] body :is(.radio__hint, .adv__hint) kbd { display: none; }
/* a coarse pointer that has not used a pad is a touch screen too (the same test renderer.js uses for its key hints) */
@media (pointer: coarse) {
  html[data-skin="ps1"]:not([data-input="pad"]) body :is(.radio__hint, .adv__hint) kbd { display: none; }
}

/* ============================== 8. inspector and record pop-ups: small windows, 10px frame ============================== */
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel.ui-inspect, .ui-record-popup):not([hidden]):not(.nx-paper) {
  background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; border-radius: 0; color: var(--ob-ink);
  border: var(--ob-bw-popup) solid transparent; border-image: var(--ob-frame-popup);
  animation: ob-shutter var(--ob-shutter) ease-out 1 backwards;
}
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) .tap-inspect-head {
  border-bottom: 0; background: none; padding-bottom: 6px;
}
/* the close key is its word / mark alone; the pop-up's commands are survey points and words like the menu keys (no plates) */
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) .ui-popup-x {
  min-width: 44px; min-height: 44px; color: var(--ob-ink-2); background: none; border-radius: 0; box-shadow: none; padding: 0 6px; border: 0; border-image: none; text-decoration: none;
}
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) .ui-popup-x:hover { color: var(--ob-ink); }
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) .ui-popup-x:is(:active, .is-pressed) { color: var(--ob-ink); transform: translateY(1px); }
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) .ui-popup-x:focus-visible { outline: 1px solid var(--ob-ink-2); outline-offset: 1px; }
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) :is(.ui-btn, button.inspect-survey) {
  border-radius: 0; color: var(--ob-ink-2); border: 0; border-image: none; padding: 0 10px 0 28px;
  background: var(--ob-lamp-off) left 8px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat;
}
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) :is(.ui-btn, button.inspect-survey):is(:hover, :focus-visible) { color: var(--ob-ink); background-image: var(--ob-lamp-on); }
:root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup):not(.nx-paper) :is(.ui-btn, button.inspect-survey):is(:active, .is-pressed) { background-image: var(--ob-node-pressed); }
/* the in-field tile page (landscape touch) is the same window */
html[data-skin="ps1"] body .ui-field > #tapInspectPanel.ui-inspect:not([hidden]) {
  background: none; box-shadow: none; color: var(--ob-ink);
  border: var(--ob-bw-popup) solid transparent; border-image: var(--ob-frame-popup);
}
html[data-skin="ps1"] body .ui-inspect:not([hidden]) .tap-inspect-head { background: none; color: var(--ob-ink); border-bottom: 0; box-shadow: none; }
html[data-skin="ps1"] body .ui-inspect:not([hidden]) .tap-inspect-head span { color: var(--ob-ink-2); }

/* ============================== 9. product flows (settings, choice dialogs, quick select), not the title ============================== */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-panel {
  background: none; box-shadow: none; border-radius: 0; color: var(--ob-ink);
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-window);
  animation: ob-shutter var(--ob-shutter) ease-out 1 backwards;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(h1, h2, h3) { color: var(--ob-ink); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.product-flow-kicker, .result-section-title, small) { color: var(--ob-ink-2); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(small, figcaption)[hidden] { display: none; }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button,
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-dev-panel a {
  position: relative; color: var(--ob-ink-2); border-radius: 0; box-shadow: none; border: 0; border-image: none;
  background: var(--ob-lamp-off) left 8px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat; padding: 0 10px 0 28px;
  transition: color var(--ob-t-s) linear, transform calc(var(--ob-t-s) / 2) linear;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt { padding: 0 6px 0 26px; }
/* 画面効果 beside its preview is a narrow column: a choice row stacks its name over its choices there (the shared two-column row gave the choices all the width and folded
   the name and its note one character per line). The strength slider row keeps its own layout. */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-fx-controls .set-item:not(.set-range) { grid-template-columns: minmax(0, 1fr); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-fx-controls .set-item:not(.set-range) > * { grid-column: 1 / -1; min-width: 0; }/* the English "SYSTEM" kicker above the settings title is a decoration: hidden on the phone, where the title alone is enough */
@media (max-width: 599px) {
  html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-settings-panel .product-flow-kicker { display: none; }
}
/* the settings categories scroll sideways: they snap, so no category rests half cut */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-toc { scroll-snap-type: x proximity; scroll-padding-inline: 8px; }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-toc > * { scroll-snap-align: start; }
/* UI17: on a narrow screen a sideways rail hid its last categories behind the right edge (a half ring at 390px). The rail wraps into three
   columns instead, so every category is on screen at once; it stays pinned at the top while the page scrolls. Each one keeps a 44px target. */
@media (max-width: 719px) {
  :root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-toc {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 4px; row-gap: 0; overflow: visible; scroll-snap-type: none;
  }
  :root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item {
    min-width: 0; min-height: 44px; padding: 0 4px 0 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
}
/* flow keys: the same survey point and word as the menu keys (no plate); the chosen / on one is lit, a held one shows the pressed ring, an unavailable one the dashed ring */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:not(:disabled):hover { color: var(--ob-ink); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:is([data-on="1"], [aria-checked="true"], [aria-pressed="true"], .controller-selected):not(:disabled) {
  background-image: var(--ob-lamp-on); color: var(--ob-ink); font-weight: 700;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:is(:active, .is-pressed):not(:disabled) { background-image: var(--ob-node-pressed); transform: translateY(1px); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:disabled { background-image: var(--ob-lamp-locked); color: var(--ob-ink-2); }
/* the pad / keyboard cursor (.controller-selected, which a tap also leaves behind) and focus never draw the earlier layers' red outline box (skin-ps1.css / surfaces.css
   .settings-page .set-opt): the choice is the lit point and bold word. The transparent outline only serves forced-colours mode. */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:is(:focus-visible, .controller-selected) { outline: 2px solid transparent; outline-offset: 2px; }
/* a setting's choice under the cursor (a radio is not lit by the cursor, only by being chosen) shows it in full ink, never with a box; real keyboard focus keeps its corner brackets */
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"].controller-selected { color: var(--ob-ink); }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:focus-visible::after {
  content: ""; position: absolute; inset: -3px; z-index: 2; pointer-events: none; border: var(--ob-bw-focus) solid transparent; border-image: var(--ob-frame-focus);
}
/* a choice of a setting (role radio) is a ring and its word, no plate: the chosen one has the lit ring and full ink. The ring is the obs2 radio part. */
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"] {
  min-height: 44px; padding: 0 8px 0 2px; border: 0; border-image: none; color: var(--ob-ink-2); font-weight: 400; display: inline-flex; align-items: center; justify-content: flex-start; background: none;
}
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"]:is([data-on="1"], [aria-checked="true"], .controller-selected, :active, .is-pressed, :disabled) { background: none; }
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"]:is([data-on="1"], [aria-checked="true"]) { color: var(--ob-ink); font-weight: 700; border: 0; border-image: none; }
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"]:not(:disabled):hover { color: var(--ob-ink); border-image: none; }
:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"]:is(:active, .is-pressed) { border-image: none; }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"]::before {
  content: ""; display: inline-block; flex: none; width: 16px; height: 16px; margin-right: 6px; vertical-align: middle;
  background: var(--ob-radio-off) center / contain no-repeat;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"][aria-checked="true"]::before { background-image: var(--ob-radio-on); }
/* the setting categories are survey points like the menu rows: a small ring at the left of each name, the current one lit (full ink, bold). No branch line, no frame;
   the name is real text. */
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-toc { position: relative; background: none; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item {
  min-height: 48px; padding: 0 10px 0 30px; border: 0; border-image: none; text-align: left; color: var(--ob-ink-2); font-weight: 400;
  background: var(--ob-lamp-off) left 9px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat;
}
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item:not(:disabled):hover { color: var(--ob-ink); background: var(--ob-lamp-off) left 9px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item:is([data-on="1"], [aria-current="true"], .controller-selected):not(:disabled) {
  color: var(--ob-ink); font-weight: 700; background: var(--ob-lamp-on) left calc(15px - var(--ob-lamp) / 2) center / var(--ob-lamp) var(--ob-lamp) no-repeat;
}
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item:is(:active, .is-pressed):not(:disabled) { background: var(--ob-node-pressed) left 9px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat; transform: none; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .set-toc::before { content: none; display: none; }
/* 戻る at the foot of a flow page: a chevron and the word, no plate. UI17: it sits at the bottom right like the menu's 戻る (one place to reach for
   back on every screen), the chevron next to the word instead of at the far left of a full-width bar. */
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.product-flow-back {
  min-height: 48px; padding: 0 12px 0 26px; border: 0; border-image: none; color: var(--ob-ink-2);
  background: var(--ob-chev-l) left 6px center / 10px 18px no-repeat;
  display: block; width: auto; min-width: 88px; align-self: flex-end; margin-left: auto; margin-right: 0; text-align: left;
}
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.product-flow-back:is(:hover, :active, .is-pressed, .controller-selected) { color: var(--ob-ink); border: 0; border-image: none; background: var(--ob-chev-l) left 6px center / 10px 18px no-repeat; }
/* rows: parted by space; no rule (its centre knob), no band. The pad / keyboard cursor row shows the small lit point at its left edge, nothing more. */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.product-setting-row, .cx-row) {
  position: relative; isolation: isolate; border: 0; border-image: none; padding-inline: 12px; background: none;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.product-setting-row, .cx-row)::before {
  content: ""; display: block; position: absolute; left: 0; top: 50%; width: 8px; height: 8px; margin-top: -4px; pointer-events: none; opacity: 0;
  background: var(--ob-lamp-on) center / contain no-repeat; border: 0;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.product-setting-row, .cx-row):is(.controller-selected, :focus-visible)::before { opacity: 1; }
/* A row's chosen mark is its ::before survey point, not the button plate. The generic flow-key rule above only replaces
   background-image, so the row must keep a background of none in every lit / pressed / unavailable state; otherwise the
   98px lamp image is drawn at its natural size and tiles the row with half rings. */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.cx-row:is([data-on="1"], [aria-checked="true"], [aria-pressed="true"], .controller-selected, :active, .is-pressed, :disabled, [aria-disabled="true"]),
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .product-setting-row:is([data-on="1"], [aria-checked="true"], [aria-pressed="true"], .controller-selected, :active, :disabled, [aria-disabled="true"]) {
  background: none;
}
/* 試練の塔の面一覧: the row selection point is its ::before survey mark, never the
   full-size lamp image. The two-id flow rule above would otherwise win and tile a
   wide row with the 98px lamp, so this list keeps the row plate empty in every
   selected / focused state. */
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel .trial-floor-list .product-setting-row:is([data-on="1"], [aria-checked="true"], [aria-pressed="true"], .controller-selected, :focus-visible, :active, :disabled, [aria-disabled="true"]) {
  background: none;
}
html[data-skin="ps1"] body #productFlowOverlay[data-flow-mode="codex"] #productFlowPanel .cx-row::before { content: none; }
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.set-item, .set-sec > h3) {
  border-bottom: 0; background: none; padding-bottom: 14px;
}
html[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel :is(.product-flow-back) { background: none; }
html[data-skin="ps1"] body .contact-topics__card {
  --ct-bg: transparent; --ct-fg: var(--ob-ink); background: none; border-radius: 0;
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-window);
}
html[data-skin="ps1"] body .contact-topics :is(.contact-topics__btn, .contact-topics__cancel) {
  color: var(--ob-ink-2); border-radius: 0; border: 0; border-image: none; text-align: left; padding: 0 10px 0 28px;
  background: var(--ob-lamp-off) left 8px center / var(--ob-lamp-s) var(--ob-lamp-s) no-repeat;
}
html[data-skin="ps1"] body .contact-topics :is(button):is(:hover, :focus-visible) { color: var(--ob-ink); background-image: var(--ob-lamp-on); }
html[data-skin="ps1"] body .contact-topics :is(button):is(:active, .is-pressed) { background-image: var(--ob-node-pressed); }
html[data-skin="ps1"] body .contact-topics :is(button):disabled { background-image: var(--ob-lamp-locked); color: var(--ob-ink-2); }

/* range inputs keep the real <input>; the track is the hairline part (one plain line fading out at both ends, no knob that could pass for a second thumb), the thumb a lit survey point.
   The line is shown at the part's own strength: at 1px it is already quiet, and the 26px thumb stays the one clear mark on it. */
html[data-skin="ps1"] input[type="range"] { -webkit-appearance: none; appearance: none; height: 28px; background: transparent; cursor: pointer; accent-color: var(--ob-ink); }
html[data-skin="ps1"] input[type="range"]::-webkit-slider-runnable-track {
  height: 16px; background: var(--ob-hairline) center / 100% 8px no-repeat; border: 0;
}
html[data-skin="ps1"] input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 26px; height: 26px; margin-top: -5px; border: 0; border-radius: 0; background: var(--ob-thumb) center / contain no-repeat;
}
html[data-skin="ps1"] input[type="range"]:active::-webkit-slider-thumb { background-image: var(--ob-thumb-pressed); }
html[data-skin="ps1"] input[type="range"]::-moz-range-track { height: 16px; background: var(--ob-hairline) center / 100% 8px no-repeat; border: 0; }
html[data-skin="ps1"] input[type="range"]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 0; background: var(--ob-thumb) center / contain no-repeat; }
html[data-skin="ps1"] input[type="range"]:active::-moz-range-thumb { background-image: var(--ob-thumb-pressed); }
html[data-skin="ps1"] input[type="range"]:focus-visible { outline: 2px solid var(--ob-ink); outline-offset: 2px; }

/* ============================== 10. keys: touch deck, landscape guide, search / map (the device shell: unchanged parts) ============================== */
/* The portrait chassis (data-native-frame) already has its keys drawn on the faceplate: nothing here may paint over it. */
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five, #inspectKey, #mapKey) {
  background: var(--ob-k, none) center / 100% 100% no-repeat; border: 0; border-radius: 0; box-shadow: none; filter: none; color: transparent; font-size: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none; transition: none;
}
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-actions[data-five] > .ui-five, #inspectKey, #mapKey) { background-size: contain; }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five, #inspectKey, #mapKey):is(:active, .is-pressed):not(:disabled) {
  background-image: var(--ob-kp, none); filter: none;
}
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five, #inspectKey, #mapKey) > :is(svg, span:not(.ui-aim-cancel)) { display: none; }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five, #inspectKey, #mapKey)::before { content: none; display: none; }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five, #inspectKey, #mapKey):focus-visible { outline: 2px solid var(--ob-ink); outline-offset: 1px; }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck :is(.ui-dpad__btn, .ui-actions[data-five] > .ui-five):disabled { opacity: 0.45; }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="up-left"] { --ob-k: var(--ob-key-ul-idle); --ob-kp: var(--ob-key-ul-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="up"] { --ob-k: var(--ob-key-u-idle); --ob-kp: var(--ob-key-u-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="up-right"] { --ob-k: var(--ob-key-ur-idle); --ob-kp: var(--ob-key-ur-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="left"] { --ob-k: var(--ob-key-l-idle); --ob-kp: var(--ob-key-l-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="wait"] { --ob-k: var(--ob-key-c-idle); --ob-kp: var(--ob-key-c-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="right"] { --ob-k: var(--ob-key-r-idle); --ob-kp: var(--ob-key-r-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="down-left"] { --ob-k: var(--ob-key-dl-idle); --ob-kp: var(--ob-key-dl-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="down"] { --ob-k: var(--ob-key-d-idle); --ob-kp: var(--ob-key-d-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-dpad__btn[data-action="down-right"] { --ob-k: var(--ob-key-dr-idle); --ob-kp: var(--ob-key-dr-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-actions > [data-action="interact"] { --ob-k: var(--ob-key-interact-idle); --ob-kp: var(--ob-key-interact-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-actions > [data-action="item-list"] { --ob-k: var(--ob-key-item-idle); --ob-kp: var(--ob-key-item-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-actions > [data-action="spell-list"] { --ob-k: var(--ob-key-spell-idle); --ob-kp: var(--ob-key-spell-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-actions > [data-action="menu"] { --ob-k: var(--ob-key-menu-idle); --ob-kp: var(--ob-key-menu-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck .ui-actions > [data-action="contact-elvi"] { --ob-k: var(--ob-key-phone-idle); --ob-kp: var(--ob-key-phone-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck #inspectKey { --ob-k: var(--ob-key-inspect-idle); --ob-kp: var(--ob-key-inspect-pressed); }
html[data-skin="ps1"][data-ctl-ps1]:not([data-native-frame]) body .ui-deck #mapKey { --ob-k: var(--ob-key-map-idle); --ob-kp: var(--ob-key-map-pressed); }
/* the search and map keys are wide keys in landscape (their 44px height, position and !important size live in inspect-wheel.css) */
/* They wear the observer search / map keys (idle and pressed images) like the portrait ones do. Only the native portrait chassis (data-native-frame) keeps its keys transparent over the raster;
   the landscape keys are real caps, so the old transparent reset must not reach them. */
@media (orientation: landscape) {
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey) {
    padding: 0; background: var(--ob-k, none) center / contain no-repeat; border: 0; border-radius: 0; box-shadow: none; filter: none; color: transparent; font-size: 0;
    -webkit-backdrop-filter: none; backdrop-filter: none; transition: none;
  }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey):is(:active, .is-pressed):not(:disabled) { background-image: var(--ob-kp, none); }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey) > :is(svg, span:not(.ui-aim-cancel)) { display: none; }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey)::before,
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey)::after { content: none; display: none; }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > :is(#inspectKey, #mapKey):focus-visible { outline: 2px solid var(--ob-ink); outline-offset: 1px; }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > #inspectKey { --ob-k: var(--ob-key-inspect-idle); --ob-kp: var(--ob-key-inspect-pressed); }
  html[data-skin="ps1"][data-ctl-ps1]:not([data-inspect="1"]) body #controls > #mapKey { --ob-k: var(--ob-key-map-idle); --ob-kp: var(--ob-key-map-pressed); }
}

/* landscape touch: the five guide caps are the action keys */
@media (orientation: landscape) {
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] { --gk-art-h: calc(var(--gk-w) * 112 / 261); }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1]:root .ui-field > .ui-guide--field .ui-key:is([data-guide="item"], [data-guide="confirm"], [data-guide="spell"], [data-guide="menu"], [data-guide="contact"])::before {
    background: var(--ob-k, none) center / 100% 100% no-repeat; border-radius: 0; box-shadow: none; mask: none; -webkit-mask: none;
  }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1]:root .ui-field > .ui-guide--field .ui-key:is([data-guide="item"], [data-guide="confirm"], [data-guide="spell"], [data-guide="menu"], [data-guide="contact"]):is(:active, .is-pressed)::before {
    background-image: var(--ob-kp, none); filter: none;
  }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1]:root .ui-field > .ui-guide--field .ui-key:is([data-guide="item"], [data-guide="confirm"], [data-guide="spell"], [data-guide="menu"], [data-guide="contact"]):is(:active, .is-pressed) { filter: none; transform: none; }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1]:root .ui-field > .ui-guide--field .ui-key:is([data-guide="item"], [data-guide="confirm"], [data-guide="spell"], [data-guide="menu"], [data-guide="contact"]) > :is(.ui-key__ico, .ui-phone__ico) { display: none; }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] .ui-field > .ui-guide--field .ui-key[data-guide="confirm"] { --ob-k: var(--ob-key-interact-idle); --ob-kp: var(--ob-key-interact-pressed); }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] .ui-field > .ui-guide--field .ui-key[data-guide="item"] { --ob-k: var(--ob-key-item-idle); --ob-kp: var(--ob-key-item-pressed); }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] .ui-field > .ui-guide--field .ui-key[data-guide="spell"] { --ob-k: var(--ob-key-spell-idle); --ob-kp: var(--ob-key-spell-pressed); }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] .ui-field > .ui-guide--field .ui-key[data-guide="menu"] { --ob-k: var(--ob-key-menu-idle); --ob-kp: var(--ob-key-menu-pressed); }
  html[data-skin="ps1"][data-input="touch"][data-ctl-ps1] .ui-field > .ui-guide--field .ui-key[data-guide="contact"] { --ob-k: var(--ob-key-phone-idle); --ob-kp: var(--ob-key-phone-pressed); }
}

/* keyboard / pad play: wide keys with the real hint text, key-cap images for the key names */
html[data-skin="ps1"]:not([data-input="touch"]):not([data-native-frame]) body .ui-field > .ui-guide--field .ui-key {
  color: var(--ob-ink); background: none; text-shadow: none; border-radius: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
  border: solid transparent; border-width: var(--ob-bw-key-wide); border-image: var(--ob-frame-key-wide); padding: 0 6px;
}
html[data-skin="ps1"]:not([data-input="touch"]):not([data-native-frame]) body .ui-field > .ui-guide--field .ui-key:is(:active, .is-pressed) { border-image-source: var(--ob-key-wide-pressed); }
html[data-skin="ps1"]:not([data-input="touch"]):not([data-native-frame]) body .ui-field > .ui-guide--field .ui-key kbd {
  color: var(--ob-ink); background: none; box-shadow: none; transform: none; border-radius: 0; padding: 0 2px;
  border: solid transparent; border-width: var(--ob-bw-kbd); border-image: var(--ob-frame-kbd);
}
html[data-skin="ps1"] body .ui-field > .ui-guide--field .ui-key:focus-visible { outline: 2px solid var(--ob-ink); outline-offset: 1px; }

/* ============================== 11. scrollbars (Chromium: images; Firefox: colours only, it cannot take images) ============================== */
html[data-skin="ps1"] :is(.ui-list__rows, .ui-list, .ui-detail, .ui-detail__content, .ui-spell-options, .ui-spell-rows, .inspect-body, .radio__text, .radio__choices, .adv__text, .product-flow-panel)::-webkit-scrollbar { width: 10px; height: 10px; background: transparent; }
html[data-skin="ps1"] :is(.ui-list__rows, .ui-list, .ui-detail, .ui-detail__content, .ui-spell-options, .ui-spell-rows, .inspect-body, .radio__text, .radio__choices, .adv__text, .product-flow-panel)::-webkit-scrollbar-track {
  background: none; border: 0 solid transparent; border-width: 10px 3px; border-image: var(--ob-scroll-track) 10 4 fill / 10px 3px stretch;
}
html[data-skin="ps1"] :is(.ui-list__rows, .ui-list, .ui-detail, .ui-detail__content, .ui-spell-options, .ui-spell-rows, .inspect-body, .radio__text, .radio__choices, .adv__text, .product-flow-panel)::-webkit-scrollbar-thumb {
  min-height: 28px; background: none; border: 0 solid transparent; border-width: 10px 3px; border-image: var(--ob-scroll-thumb) 10 4 fill / 10px 3px stretch;
}
@supports not (-moz-appearance: none) {
  :root:root[data-skin="ps1"] body > :is(#tapInspectPanel, .ui-record-popup) > .inspect-body { scrollbar-color: auto; scrollbar-width: auto; }
}
@supports (-moz-appearance: none) {
  html[data-skin="ps1"] :is(.ui-list__rows, .ui-list, .ui-detail, .ui-detail__content, .ui-spell-options, .ui-spell-rows, .inspect-body, .radio__text, .radio__choices, .adv__text, .product-flow-panel) {
    scrollbar-width: thin; scrollbar-color: var(--ob-ink-2) rgb(10 12 16);
  }
}

/* ============================== 12. motion ============================== */
/* The window shutter plays once, when a window is shown (the panels are persistent elements, so a re-render inside an open window never restarts it). It opens from a half-open
   slit, so even its first frame has a body and hit area, and fill-mode "backwards" leaves nothing behind: after the last frame clip-path is the element's own value (none). */
@keyframes ob-shutter { from { clip-path: inset(0 0 55% 0); } to { clip-path: inset(0 0 0 0); } }
/* reduced motion: the off switches are at least as specific as the rules that start the shutter (the pop-up chain and the flow panel chain above), and come later */
@media (prefers-reduced-motion: reduce) {
  html[data-skin="ps1"] *, html[data-skin="ps1"] *::before, html[data-skin="ps1"] *::after { transition-duration: 0ms; }
  :root:root:root[data-skin="ps1"] body > :is(#tapInspectPanel.ui-inspect, .ui-record-popup):not([hidden]):not(.nx-paper),
  :root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-panel { animation: none; clip-path: none; }
}
html[data-skin="ps1"][data-reduced-motion="1"] *,
html[data-skin="ps1"][data-reduced-motion="1"] *::before,
html[data-skin="ps1"][data-reduced-motion="1"] *::after { transition-duration: 0ms; }
:root:root:root[data-skin="ps1"][data-reduced-motion="1"] body > :is(#tapInspectPanel.ui-inspect, .ui-record-popup):not([hidden]):not(.nx-paper),
:root:root:root[data-skin="ps1"][data-reduced-motion="1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-panel { animation: none; clip-path: none; }

/* ============================== 13. quick wheel (long press on the spell key / trackball): a dial with a pointer ============================== */
/* The ring and its slots keep the geometry the wheel script computes; only the surfaces change. The hub is the dial (obs2 dial-ring), the pointer turns to the highlighted
   slot (--wheel-pointer, set with data-pointer by SpellWheelView.highlight), a slot is a tag, the highlighted slot is the selected key with its survey point, and the guidance is a heading.
   The scrim is light (0.18; 0.25 for the sticky ring) so the field stays readable behind the dial. */
html[data-skin="ps1"] .spell-wheel { background: rgb(4 3 8 / 0.18); }
html[data-skin="ps1"] .spell-wheel[data-mode="sticky"] { background: rgb(4 3 8 / 0.25); }
html[data-skin="ps1"] .spell-wheel__hub {
  --hub: var(--wheel-hub, calc(var(--wheel-r, 110px) * 1.1));
  padding: 0; border: 0; border-radius: 0; color: var(--ob-ink); background: var(--ob-dial-ring) center / contain no-repeat;
}
html[data-skin="ps1"] .spell-wheel__hub::after {
  content: ""; position: absolute; left: 50%; top: 50%; pointer-events: none; opacity: 0;
  width: calc(var(--hub) * var(--ob-ptr-w)); height: calc(var(--hub) * var(--ob-ptr-h));
  margin-left: calc(var(--hub) * var(--ob-ptr-w) / -2); margin-top: calc(var(--hub) * var(--ob-ptr-h) * var(--ob-ptr-py) * -1);
  transform-origin: 50% calc(var(--ob-ptr-py) * 100%); transform: rotate(var(--wheel-pointer, 0deg));
  background: var(--ob-dial-pointer) center / 100% 100% no-repeat;
}
html[data-skin="ps1"] .spell-wheel[data-pointer="1"] .spell-wheel__hub::after { opacity: 1; }
html[data-skin="ps1"] .spell-wheel__hub > [data-wheel-page]:not(:empty) {
  background: none; color: var(--ob-ink); padding: 0 6px; border: var(--ob-bw-tag) solid transparent; border-image: var(--ob-frame-tag);
}
/* a slot is a small glass window (the window part's corner brackets at 6px) so its name reads over the field; the highlighted slot lights its survey point and goes bold.
   No plate, and never the marked key plate (its left-cap dot stretched into a white bar on the narrow slots). */
html[data-skin="ps1"] .spell-wheel__slot {
  position: absolute; color: var(--ob-ink-r); background: var(--ob-glass) padding-box; border-radius: 0; box-shadow: none; padding: 2px 6px; font-family: var(--ff-ui);
  border: 6px solid transparent; border-image: var(--ob-window-sm) var(--ob-sl-window) fill / 6px stretch;
}
html[data-skin="ps1"] .spell-wheel__slot:is([data-source="scroll"], [data-source="book"], [data-source="page"]) { border-style: solid; border-color: transparent; }
html[data-skin="ps1"] .spell-wheel__slot:is(.is-active, :focus-visible) {
  color: var(--ob-ink); font-weight: 700; outline: 0; padding-left: calc(var(--ob-lamp) + 6px);
}
html[data-skin="ps1"] .spell-wheel__slot:is(.is-active, :focus-visible)::before {
  content: ""; position: absolute; left: 2px; top: 50%; width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2); pointer-events: none;
  background: var(--ob-lamp-on) center / contain no-repeat;
  animation: ob-lamp-in var(--ob-t-s) var(--ob-ease) backwards;
}
html[data-skin="ps1"] .spell-wheel__tag { border: 0; border-radius: 0; margin-right: 0.3em; padding: 0; }
/* the concentric spell ring: a button gives its width to the name (the element mark sits on the cost line); the selected key's lamp sits on the window's
   top-left corner instead of pushing the name aside. The circles in use are traced by the dial ring art, scaled so the middle of its band runs through
   the button centres (band middle = 0.83 of the art's half width), kept very faint; the jog band's dial turns with the list and glows while turned. */
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__slot { padding: 1px 2px; }
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__slot:is(.is-active, :focus-visible) { padding-left: 2px; }
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__slot:is(.is-active, :focus-visible)::before { left: -6px; top: -6px; margin-top: 0; width: var(--ob-lamp-s); height: var(--ob-lamp-s); }
html[data-skin="ps1"] .spell-wheel__meta > .ui-el-raster { display: inline-block; width: 12px; height: 12px; margin-right: 2px; vertical-align: -2px; }
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__track {
  display: block; position: absolute; left: 0; top: 0; width: calc(var(--track-r, 88px) * 2.41); height: calc(var(--track-r, 88px) * 2.41);
  transform: translate(-50%, -50%); background: var(--ob-dial-ring) center / contain no-repeat; opacity: 0.16;
  /* Crop the existing dial raster to a thin orbit; its glass disc and long
     crosshairs must not cover the map when the material is enlarged. */
  mask-image: radial-gradient(circle closest-side, transparent calc(83% - 1px), #000 calc(83% - .5px), #000 calc(83% + .5px), transparent calc(83% + 1px));
}
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__track--jog {
  opacity: 0.22; transform: translate(-50%, -50%) rotate(var(--jog-turn, 0deg)); transition: opacity 600ms ease-out, transform 120ms linear;
}
html[data-skin="ps1"] .spell-wheel[data-layout="concentric"][data-jog="1"] .spell-wheel__track--jog { opacity: 0.5; transition: opacity 90ms ease-out, transform 120ms linear; }
@media (prefers-reduced-motion: reduce) { html[data-skin="ps1"] .spell-wheel[data-layout="concentric"] .spell-wheel__track--jog { transition: none; } }
html[data-skin="ps1"] .spell-wheel__caption {
  color: var(--ob-ink); background: none; border-radius: 0; box-sizing: border-box; padding: 0 6px;
  border: solid transparent; border-width: var(--ob-bw-nameplate); border-image: var(--ob-frame-nameplate);
}

/* ============================== 14. Elvi's hand drawer: her window, heading, keys and inset (the card plates, their art and the tray size are untouched) ============================== */
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] {
  box-sizing: border-box; padding: 0; background: none; box-shadow: none; border-radius: 0; color: var(--ob-ink);
  border: solid transparent; border-width: var(--ob-bw-window-hand); border-image: var(--ob-window) var(--ob-sl-window) fill / var(--ob-bw-window-hand) stretch;
}
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] > .ui-menu__head {
  padding: 0 4px; background: none; border: solid transparent; border-width: 5px 10px; border-image: var(--ob-nameplate) var(--ob-sl-nameplate) fill / 5px 10px stretch;
}
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] :is(.hand-drawer__close, .ui-detail__actions .ui-btn) {
  box-sizing: border-box; color: var(--ob-ink); background: none; border-radius: 0; box-shadow: none; text-shadow: none;
  border: solid transparent; border-width: 6px 10px; border-image: var(--ob-btn-idle) var(--ob-sl-btn) fill / 6px 10px stretch;
}
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .hand-drawer__close { min-height: 36px; height: auto; padding: 0 4px; }
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-detail__actions .ui-btn { min-height: 44px; max-height: none; padding: 0 4px; }
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] :is(.hand-drawer__close, .ui-detail__actions .ui-btn):is(:hover, :focus-visible):not(:disabled) {
  color: var(--ob-ink); background: none; outline: 0; border-image-source: var(--ob-btn-hover);
}
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] :is(.hand-drawer__close, .ui-detail__actions .ui-btn):is(:active, .is-pressed):not(:disabled) { color: var(--ob-ink); background: none; border-image-source: var(--ob-btn-pressed); }
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-detail__actions .ui-btn:disabled { color: var(--ob-ink-2); border-style: solid; border-image-source: var(--ob-btn-disabled); opacity: 0.6; }
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-menu__body > .ui-detail {
  background: none; color: var(--ob-ink); border-radius: 0; box-shadow: none; border: var(--ob-bw-inset) solid transparent; border-image: var(--ob-frame-inset);
}
/* a slice of every card shows at least 60% of its width (name band and element mark stay readable); a longer hand scrolls, with a chevron at the controls' edge */
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] #sidebarList .ui-row[data-ec-card] {
  --ec-step: clamp(calc(var(--ec-w) * 0.6), calc((100cqw - var(--ec-aux, 150px) - 2 * var(--ec-w) - 6px) / max(var(--d, 1) - 1, 1)), calc(var(--ec-w) * 0.72));
}
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-menu__body > .ui-list { position: relative; }
:root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-menu__body > .ui-list:has(#sidebarList > .ui-row[data-ec-card]:nth-child(n+4))::after {
  content: ""; position: absolute; right: 160px; top: 50%; width: 18px; height: 18px; margin-top: -9px; z-index: 8; pointer-events: none;
  background: var(--ob-chev-r) center / contain no-repeat;
}

/* ============================== 15. ring and float pads: the dial is the base, the knob is the knob (the old control sheet is not read) ============================== */
/* The transparent landscape deck must not intercept the guide keys beside its actual controls. */
@media (orientation: landscape) {
  html[data-skin="ps1"] body #controls { pointer-events: none; }
  html[data-skin="ps1"] body #controls > :is(button, .ui-dpad, .ui-actions) { pointer-events: auto; }
}
/* Keep the portrait tray below the map. A smaller rail leaves the card, its description and the three commands readable together:
   the cards are 58px wide, the rail's own padding is trimmed, and the description is 13px / 1.45 (it was a 37px, two-line box at 12px). */
@media (orientation: portrait) {
  :root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] { --card-w: 58px; }
  :root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] #sidebarList.ui-list__rows:has(> .ui-row[data-ec-pile]) { padding-top: 6px; padding-bottom: 4px; }
  :root:root:root[data-skin="ps1"][data-protagonist="elvi"] body #actionSidebar[data-hand="1"] .ui-detail__content { font-size: 13px; line-height: 1.45; }
}
html[data-skin="ps1"][data-ctl-ps1][data-pad-layout="ring"]:not([data-native-frame]) body .ui-deck > .ui-dpad { background: var(--ob-dial-ring) center / contain no-repeat; }
html[data-skin="ps1"][data-ctl-ps1][data-pad-layout="float"]:not([data-native-frame]) body .ui-deck > .ui-dpad::before { background: var(--ob-dial-ring) center / contain no-repeat; }
html[data-skin="ps1"][data-ctl-ps1][data-pad-layout="float"]:not([data-native-frame]) body .ui-deck > .ui-dpad::after { background: var(--ob-knob) center / contain no-repeat; }
html[data-skin="ps1"][data-ctl-ps1][data-pad-layout="float"]:not([data-native-frame]) body .ui-deck > .ui-dpad[data-active-dir]:not([data-active-dir=""])::after { background-image: var(--ob-knob-pressed); }

/* ============================== 16. element icons: raster line icons on the PS1 skin only (GB keeps its SVG frames; terrain / status symbols are not touched) ============================== */
.ui-el-raster { display: none; }
html[data-skin="ps1"] .ui-el-raster { display: block; flex: none; background: center / contain no-repeat; }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="physical"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-physical.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="earth"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-earth.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="fire"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-fire.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="cold"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-cold.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="lightning"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-lightning.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="water"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-water.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="poison"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-poison.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="arcane"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-arcane.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="metal"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-metal.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="oil"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-oil.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="nature"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-nature.webp"); }
html[data-skin="ps1"] .ui-el-raster[data-el-icon="life"] { background-image: url("../../../assets/ui/observer-2026-10-21/obs-element-life.webp"); }
/* element tabs and chips: 22px mark in the 26px chip, the element colour only as a hairline under it */
html[data-skin="ps1"] .ui-spell-icon:has(> .ui-el-raster) > :is(.ui-spell-frame, .ui-spell-el) { display: none; }
html[data-skin="ps1"] .ui-spell-icon--chip { box-sizing: border-box; border-bottom: 1px solid color-mix(in srgb, var(--sp-el) 60%, transparent); }
html[data-skin="ps1"] .ui-spell-icon--chip > .ui-el-raster { position: absolute; inset: 1px 1px 2px; }
/* spell row icon: the element mark is the icon, the effect glyph (what the spell does) rides on its lower right corner */
html[data-skin="ps1"] .ui-spell-icon:not(.ui-spell-icon--chip) > .ui-el-raster { position: absolute; left: 0; top: 0; width: 34px; height: 34px; }
html[data-skin="ps1"] .ui-spell-icon:not(.ui-spell-icon--chip) > .ui-spell-glyph { inset: auto -2px 0 auto; width: 20px; height: 20px; filter: drop-shadow(0 0 1px #000) drop-shadow(0 0 1px #000); }
html[data-skin="ps1"] .ui-spell-icon:not(.ui-spell-icon--chip, .ui-spell-icon--unknown) { border-bottom: 1px solid color-mix(in srgb, var(--sp-el) 60%, transparent); box-sizing: border-box; }
/* explicit attribute fields: item card chips, the 属性 stat (spell, companion), weak / resistant lines, the quick wheel's known spells */
html[data-skin="ps1"] :is(.ic-el, .ui-stats dd, .resistance-group span, .spell-wheel__name) > .ui-el-raster { display: inline-block; width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
html[data-skin="ps1"] .ic-el:has(> .ui-el-raster) > svg.ui-sym { display: none; }
html[data-skin="ps1"] .inspect-swatch > .ui-el-raster { width: 24px; height: 24px; }
html[data-skin="ps1"] .inspect-swatch:has(> .ui-el-raster) > svg.ui-sym { display: none; }
html[data-skin="ps1"] .card-face__head > .ui-el-raster { width: 20px; height: 20px; }
html[data-skin="ps1"] .card-face__head:has(> .ui-el-raster) > svg.card-face__sym { display: none; }
html[data-skin="ps1"] .ui-stats dd:has(> .ui-el-raster) > svg.ui-sym { display: none; }
html[data-skin="ps1"] .spell-wheel__name > .ui-el-raster { width: 14px; height: 14px; }

/* Field actions belong to exploration, not the open menu behind them. */
html[data-skin="ps1"] body.focus-sidebar .ui-field > #fieldGuide { visibility: hidden; pointer-events: none; }

/* ============================== 17. motion: one quiet vocabulary for the survey sheet ============================== */
/* Points light, marks come up, content settles. Only opacity, translate, scale, rotate and clip-path move (never a size or a place in the layout), so nothing reflows.
   A row never moves its own hit area: its children slide, the row stays put. The detail and the closing menu move 4-6px at most, for 200ms.
   Every keyframe runs from a start state to the element's own resting state (fill: backwards), so with the durations at 0 (reduced motion) each element simply shows its resting
   state: nothing is left invisible or half open, and no input waits for a motion.
   What plays when:
   - opening the menu: the selected tab's symbol comes up from 86% and its point lights, the rows' contents slide in from the points in a 16ms stagger, the footer settles
     (data-ob-open, set by renderer.js for 420ms on an opening only)
   - switching tabs: the new tab's symbol comes up and its point lights, the rows settle again (data-turn, the renderer's existing 320ms page-turn flag)
   - choosing an element filter: its mark comes up and its point lights
   - selecting a row / a spell: its point lights (scale in) and a faint ring pings outward once; the detail fades in from 4px below when its subject changes (data-ob-enter a / b)
   - closing the menu: it fades and sinks 6px in 200ms with pointer-events off, then display turns none (transition-behavior allow-discrete; an older browser simply hides at once)
   - keyboard focus: the corner brackets lock on (close in from 108% and fade up, 120ms); a radio reply / a setting's choice lights its point the same way a row does
   The rows are rebuilt only when they change (renderer.js), so a redraw with the same rows replays nothing. */
@keyframes ob-settle-a { from { opacity: 0; translate: 0 4px; } }
@keyframes ob-settle-b { from { opacity: 0; translate: 0 4px; } }
@keyframes ob-slide { from { opacity: 0; translate: -8px 0; } }
@keyframes ob-lamp-in { from { opacity: 0; scale: 0.35; } }
@keyframes ob-pop { from { scale: 0.86; } }
@keyframes ob-ping { from { opacity: 0.7; scale: 1; } to { opacity: 0; scale: 2.8; } }

:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) {
  transition: opacity var(--ob-t-m) var(--ob-ease), translate var(--ob-t-m) var(--ob-ease), display var(--ob-t-m) allow-discrete;
  &[hidden] { display: none; opacity: 0; translate: 0 6px; pointer-events: none; }

  /* tabs: symbols and labels ease between dim and full; the newly selected symbol comes up from 86% and its point lights just after it */
  & .ui-tab::before { transition: opacity var(--ob-t-s) linear; }
  & :is(.ui-tab__ico, .ui-tab .ui-tab__ja) { transition: opacity var(--ob-t-s) linear, color var(--ob-t-s) linear, scale calc(var(--ob-t-s) / 2) linear; }
  & .ui-tab[aria-selected="true"] .ui-tab__ico { animation: ob-pop var(--ob-t-l) var(--ob-ease) backwards; }
  /* the chosen element filter: its mark comes up, its point lights */
  & .ui-chipbtn > :is(.ui-spell-icon, .ui-chipbtn__all) { transition: opacity var(--ob-t-s) linear, scale calc(var(--ob-t-s) / 2) linear; }

  /* rows: colour eases on hover; the selected point lights and pings once */
  & .ui-row:not([data-ec-card], [data-ec-pile]) { transition: color var(--ob-t-s) linear; }
  & .ui-row:not([data-ec-card], [data-ec-pile]):is([aria-selected="true"], .controller-selected)::before { animation: ob-lamp-in var(--ob-t-s) var(--ob-ease) backwards; }
  & .ui-row:not([data-ec-card], [data-ec-pile]):is([aria-selected="true"], .controller-selected):not(:focus-visible)::after {
    content: ""; display: block; position: absolute; left: calc(var(--ob-line-x) - var(--ob-lamp) / 2); top: 50%; width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2);
    z-index: 0; pointer-events: none; opacity: 0; background: var(--ob-lamp-off) center / contain no-repeat; animation: ob-ping var(--ob-t-draw) var(--ob-ease) 1 none;
  }
  & .ui-spell-row { transition: color var(--ob-t-m) linear; }
  & .ui-spell-row[data-selected="true"]::before { animation: ob-lamp-in var(--ob-t-s) var(--ob-ease) backwards; }
  & .ui-chipbtn:is([aria-pressed="true"], [aria-current="true"]) > :is(.ui-spell-icon, .ui-chipbtn__all) { animation: ob-pop var(--ob-t-m) var(--ob-ease) backwards; }

  /* the detail: a new subject settles in (the container keeps its place in the grid; it only fades and rises 4px) */
  & .ui-detail[data-ob-enter="a"] { animation: ob-settle-a var(--ob-t-m) var(--ob-ease) backwards; }
  & .ui-detail[data-ob-enter="b"] { animation: ob-settle-b var(--ob-t-m) var(--ob-ease) backwards; }
}
/* opening and tab switching: the rows' contents slide in from the survey line in a short stagger (the row itself, its hit area, never moves) */
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:is([data-ob-open], [data-turn]):not([data-hand="1"]) {
  & .ui-row:not([data-ec-card], [data-ec-pile]):nth-child(-n+10) > *, & .ui-spell-row:nth-child(-n+10) > * { animation: ob-slide var(--ob-t-m) var(--ob-ease) backwards; }
  & :is(.ui-row, .ui-spell-row):nth-child(2) > * { animation-delay: calc(var(--ob-stagger) * 1); }
  & :is(.ui-row, .ui-spell-row):nth-child(3) > * { animation-delay: calc(var(--ob-stagger) * 2); }
  & :is(.ui-row, .ui-spell-row):nth-child(4) > * { animation-delay: calc(var(--ob-stagger) * 3); }
  & :is(.ui-row, .ui-spell-row):nth-child(5) > * { animation-delay: calc(var(--ob-stagger) * 4); }
  & :is(.ui-row, .ui-spell-row):nth-child(6) > * { animation-delay: calc(var(--ob-stagger) * 5); }
  & :is(.ui-row, .ui-spell-row):nth-child(7) > * { animation-delay: calc(var(--ob-stagger) * 6); }
  & :is(.ui-row, .ui-spell-row):nth-child(n+8) > * { animation-delay: calc(var(--ob-stagger) * 7); }
}
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu[data-ob-open]:not([data-hand="1"]) .ui-desc { animation: ob-settle-a var(--ob-t-m) var(--ob-ease) var(--ob-t-s) backwards; }
/* 戻る: its chevron leans back a little when pressed */
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-desc .ui-guide .ui-key[data-guide="cancel"]::after { transition: translate var(--ob-t-s) var(--ob-ease); }
html[data-skin="ps1"][data-input="touch"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-desc .ui-guide .ui-key[data-guide="cancel"]:is(:hover, :active, .is-pressed)::after { translate: -3px 0; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.product-flow-back { transition: background-position var(--ob-t-s) var(--ob-ease), color var(--ob-t-s) linear; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.product-flow-back:is(:hover, :active, .is-pressed) { background-position: left 3px center; }
html[data-skin="ps1"] body .radio__choice { transition: color var(--ob-t-s) linear; }

/* keyboard focus locks on: the corner brackets close in from 8% wider and fade up (an instrument finding its target). Selection stays the lit point, so the two never look alike.
   The brackets are an absolutely placed pseudo-element with pointer-events off: scaling them moves no layout and no hit area. */
@keyframes ob-lock { from { opacity: 0; scale: 1.08; } }
:root:root:root:root[data-skin="ps1"] body #actionSidebar.ui-menu:not([data-hand="1"]) :is(
  .ui-row:not([data-ec-card], [data-ec-pile]):focus-visible, .ui-spell-row:focus-visible, .ui-chipbtn:is(:focus-visible, .controller-selected), .ui-spell-display-btn:is(:focus-visible, .controller-selected)
)::after { animation: ob-lock var(--ob-t-s) var(--ob-ease) backwards; }
:root:root:root[data-skin="ps1"] body :is(.radio__choice:focus-visible, #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:focus-visible)::after { animation: ob-lock var(--ob-t-s) var(--ob-ease) backwards; }

/* the same lit point, the same way, everywhere a choice is made: a radio reply, a setting's choice, a setting category */
:root:root:root[data-skin="ps1"] body .radio__choice:is(:hover, :focus-visible, [aria-selected="true"])::before { animation: ob-lamp-in var(--ob-t-s) var(--ob-ease) backwards; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-opt[role="radio"][aria-checked="true"]::before { animation: ob-lamp-in var(--ob-t-s) var(--ob-ease) backwards; }
:root:root:root[data-skin="ps1"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button.set-toc-item { transition: color var(--ob-t-s) linear, background-size var(--ob-t-s) var(--ob-ease), background-position var(--ob-t-s) var(--ob-ease); }

/* UI17 menu motion strength (settings menuFxStrength -> --menu-fx 0..1 on <html>, settings.js; 0 under either reduced-motion switch). 75 is the look above as designed:
   --menu-fx-k = strength / 75 multiplies every menu duration, delay and stagger and the travel of the slides, so 25 is a third of it, 100 a third more, 0 shows each
   resting state at once. It is the menu's own number: the game picture's postFX (fxLook / fxStrength) never reads it. The reduced-motion rules below still win. */
html[data-skin="ps1"] {
  --menu-fx-k: calc(var(--menu-fx, 0.75) / 0.75);
  --ob-t-s: calc(120ms * var(--menu-fx-motion-k)); --ob-t-m: calc(200ms * var(--menu-fx-motion-k)); --ob-t-l: calc(280ms * var(--menu-fx-motion-k)); --ob-t-draw: calc(420ms * var(--menu-fx-motion-k)); --ob-stagger: calc(16ms * var(--menu-fx-motion-k));
}
html[data-skin="ps1"][data-menu-fx-motion="0"] { --ob-t-s: 0ms; --ob-t-m: 0ms; --ob-t-l: 0ms; --ob-t-draw: 0ms; --ob-stagger: 0ms; }
@keyframes ob-slide { from { opacity: 0; translate: calc(-8px * var(--menu-fx-motion-k, 1)) 0; } }
@keyframes ob-settle-a { from { opacity: 0; translate: 0 calc(4px * var(--menu-fx-motion-k, 1)); } }
@keyframes ob-settle-b { from { opacity: 0; translate: 0 calc(4px * var(--menu-fx-motion-k, 1)); } }
/* opening: the window powers on from a thin line at its middle (clip only: the hit areas are already in place) */
@keyframes ob-power-on { from { clip-path: inset(49.5% 0 49.5% 0); opacity: 0.6; } 40% { clip-path: inset(49.5% 0 49.5% 0); opacity: 1; } to { clip-path: inset(0 0 0 0); } }
:root:root:root:root[data-skin="ps1"]:not([data-menu-fx="0"]) body #actionSidebar.ui-menu[data-ob-open]:not([data-hand="1"]) { animation: ob-power-on var(--ob-t-l) var(--ob-ease) backwards; }
/* tab switch: the new page's content enters from the side of the new tab (data-turn-dir = next / prev, renderer.js) */
@keyframes ob-turn-next { from { opacity: 0; translate: calc(10px * var(--menu-fx-motion-k, 1)) 0; } }
@keyframes ob-turn-prev { from { opacity: 0; translate: calc(-10px * var(--menu-fx-motion-k, 1)) 0; } }
:root:root:root:root[data-skin="ps1"]:not([data-menu-fx="0"]) body #actionSidebar.ui-menu[data-turn][data-turn-dir="next"]:not([data-hand="1"]) .ui-menu__body { animation: ob-turn-next var(--ob-t-m) var(--ob-ease) backwards; }
:root:root:root:root[data-skin="ps1"]:not([data-menu-fx="0"]) body #actionSidebar.ui-menu[data-turn][data-turn-dir="prev"]:not([data-hand="1"]) .ui-menu__body { animation: ob-turn-prev var(--ob-t-m) var(--ob-ease) backwards; }
/* confirm: the pressed command gives once under the finger and settles (no repeat, no blink; only scale moves, the hit area stays) */
@keyframes ob-confirm { from { scale: calc(1 - 0.04 * var(--menu-fx-motion-k, 1)); } }
:root:root:root:root[data-skin="ps1"]:not([data-menu-fx="0"]) body #actionSidebar.ui-menu:not([data-hand="1"]) :is(.ui-key, .ui-btn, .ui-key--act):is(:active, .is-pressed):not(:disabled) { animation: ob-confirm var(--ob-t-m) var(--ob-ease) 1 backwards; }
:root:root:root[data-skin="ps1"]:not([data-menu-fx="0"]) body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel button:is(:active, .is-pressed):not(:disabled) { animation: ob-confirm var(--ob-t-m) var(--ob-ease) 1 backwards; }

/* reduced motion: every duration, delay and stagger above is 0ms, so each element shows its resting state at once (the Nocturne opening uses --nx-dur, set to 0 here as well) */
@media (prefers-reduced-motion: reduce) {
  html[data-skin="ps1"] { --ob-t-s: 0ms; --ob-t-m: 0ms; --ob-t-l: 0ms; --ob-t-draw: 0ms; --ob-stagger: 0ms; }
}
html[data-skin="ps1"][data-reduced-motion="1"] { --ob-t-s: 0ms; --ob-t-m: 0ms; --ob-t-l: 0ms; --ob-t-draw: 0ms; --ob-stagger: 0ms; }
:root:root:root:root[data-skin="ps1"][data-reduced-motion="1"] body #actionSidebar.ui-menu:not([data-hand="1"]) { --nx-dur: 0ms; }

/* ============================== 17b. console appearance: one scan when a window opens, a phosphor residue on the chosen point ============================== */
/* Two motions and one still layer (the scan rows, below), console only, on the reading windows only. All are the console's own raster parts (the green hairline,
   the green lit point, the scan tile), never a drawn band.
   - scan: when the menu / hand tray opens (data-ob-open, 420ms) or a flow panel / inspector / record pop-up is shown, the hairline runs once from the top edge to the
     bottom edge in 378ms (linear), at full strength between 12% and 78% of the run, then fades. It is the window's ::after (unused, or switched off by the earlier sheets), under every word and part
     (z-index -1 in the window's own stacking context, isolation on the two windows that were not one), so no text is crossed, tinted or blurred. It only moves up
     from above the window (translate -100% -> 0), never past the bottom or right edge, so it adds no scroll length; the window clips it. A redraw never replays it.
   - residue: the chosen row / spell card's lit point leaves a ghost of itself, 1.9x and 50% at first, settling onto the point in 630ms (once per selection, in place
     of the dark appearance's outward ping). Only the point moves; the row, its words and its hit area do not.
   Off: under reduced motion (both switches) the durations are 0 and the scan is not generated; under high contrast and while the hand tray slides out there is no scan;
   another appearance has none of it. Pointer events never reach either layer. */
@keyframes ob-scan { from { opacity: 0; translate: 0 -100%; } 12% { opacity: var(--ob-scan-a, 1); } 78% { opacity: var(--ob-scan-a, 1); } to { opacity: 0; translate: 0 0; } }
@keyframes ob-residue { from { opacity: calc(.5 * var(--menu-fx-afterglow-k,1)); scale: 1.9; } to { opacity: 0; scale: 1; } }
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body #actionSidebar[data-hand="1"],
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-panel { isolation: isolate; }
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"]:not([data-high-contrast="1"], [data-menu-fx="0"]) body #actionSidebar:is([data-ob-open], [data-turn]):not([hidden], [data-hand-state="closing"], [data-motion="reduce"])::after,
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"]:not([data-high-contrast="1"], [data-menu-fx="0"]) body #productFlowOverlay:not([data-flow-mode="title"]) #productFlowPanel.product-flow-panel::after,
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"]:not([data-high-contrast="1"], [data-menu-fx="0"]) body > :is(#tapInspectPanel.ui-inspect, .ui-record-popup):not([hidden]):not(.nx-paper)::after {
  /* UI17: the generated sweep band rides on the hairline; its strength follows the menu effect setting (75 = full, 25 = a third).
     The delivered texture is 2172x724 (3:1) with the lens-shaped band in its middle third: drawn 100% x 132px, its centre line is put on the hairline
     (bottom -62px), so only the upper half of the glow trails the line and the transparent margins fall outside the window's box. */
  content: ""; display: block; position: absolute; inset: 0; z-index: -1; margin: 0; padding: 0; pointer-events: none; opacity: 0;
  background: var(--ob-sweep) left 0 bottom -62px / 100% 132px no-repeat, var(--ob-hairline) center bottom / 100% 8px no-repeat; border: 0; border-image: none; box-shadow: none; clip-path: none;
  --ob-scan-a: min(1, var(--menu-fx-roll-k, 1));
  animation: ob-scan calc(var(--ob-t-draw) * 0.9) linear backwards;
}
/* a tab switch replays the sweep: the renderer re-adds data-turn on every switch, and the pseudo-element is regenerated with it */
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-row:not([data-ec-card], [data-ec-pile]):is([aria-selected="true"], .controller-selected):not(:focus-visible)::after {
  background-image: var(--ob-lamp-on); animation: ob-residue calc(var(--ob-t-draw) * 1.5) var(--ob-ease) backwards;
}
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body #actionSidebar.ui-menu:not([data-hand="1"]) .ui-spell-row[data-selected="true"]:not(:focus-visible)::after {
  content: ""; display: block; position: absolute; left: calc(var(--ob-line-x) - var(--ob-lamp) / 2); top: 26px; width: var(--ob-lamp); height: var(--ob-lamp); margin-top: calc(var(--ob-lamp) / -2);
  z-index: 0; pointer-events: none; opacity: 0; background: var(--ob-lamp-on) center / contain no-repeat; border: 0; box-shadow: none;
  animation: ob-residue calc(var(--ob-t-draw) * 1.5) var(--ob-ease) backwards;
}
/* scan rows: the generated console scan tile (manifest readingPane.appearances.console.scan, opaque black with fine green rows) lies still under the words of the menu,
   the hand tray and the pop-ups, on the window's ::before (unused, or switched off by the earlier sheets). Screen blending drops its black, so the window's own ground
   (backplate, pane) is never covered; only the green rows add, at half strength. The layer sits first, under the opening scan. It does not move here, so reduced motion keeps
   it (its flutter, on while メニューの効果 is above 0, is instrument-ui.css section 7); high contrast drops it. The flow panel has none: it is itself the scroller, and a layer the size of its box would end where the first screen of settings ends. */
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"]:not([data-high-contrast="1"]) body #actionSidebar::before,
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"]:not([data-high-contrast="1"]) body > :is(#tapInspectPanel.ui-inspect, .ui-record-popup):not([hidden]):not(.nx-paper)::before {
  content: ""; display: block; position: absolute; inset: 0; z-index: -1; margin: 0; padding: 0; pointer-events: none; opacity: min(1,calc(.5 * var(--menu-fx-scanlines-k,1))); mix-blend-mode: screen;
  background: url("../../../assets/ui/observer-2026-10-21/obs3-console-scan.webp") 0 0 / 256px 256px repeat; border: 0; border-image: none; box-shadow: none;
}
/* reduced motion: the durations above are already 0 (section 17); the scan layer is not generated at all */
@media (prefers-reduced-motion: reduce) {
  :root:root:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body :is(#actionSidebar, #productFlowOverlay #productFlowPanel.product-flow-panel, #tapInspectPanel.ui-inspect, .ui-record-popup)::after { content: none; display: none; }
}
:root:root:root:root:root[data-skin="ps1"][data-ui-theme="console"][data-reduced-motion="1"] body :is(#actionSidebar, #productFlowOverlay #productFlowPanel.product-flow-panel, #tapInspectPanel.ui-inspect, .ui-record-popup)::after { content: none; display: none; }

/* ============================== 18. appearance: dark / light / console (settings uiTheme -> html[data-ui-theme]) ============================== */
/* One design in three appearances. Structure, spacing, the lit-point vocabulary, motion, reduced motion, hit areas and keyboard focus are shared; only colours, the reading
   backplate, the window pane and (console) the type change. They are declared on the reading surfaces only (menu and hand tray, settings and flows, call, dialogue,
   contact topics, inspector / record pop-ups, the quick wheel's slots, the field's aim / gate / choice cards), so the board, the HUD, the characters, the cards' art,
   the device shell and the title never change. A recipe (--ob-frame-*, --c-*, --ob-ink-r) is computed where it is declared, so each surface re-declares the ones it uses.
   Light: the line art (survey points, symbols, brackets, the hairline) is the same art darkened by one limited filter, only on the elements that carry it, never on a
   portrait, a card, an item sprite or the board. An element that carries both art and text (a key, a choice) takes the filter whole and states its inks before the filter
   (--ob-pre-ink*), so after it the words land on the light inks. Console: Elvi's black-and-green parts for both protagonists, the start-up console's phosphor green,
   IBM Plex Mono first (Japanese falls to Zen Kaku). No glow and no flicker on the words themselves; the console's two motions (an opening scan, a point's residue) are in
   section 17b, with the rest of the motion, and its live signal (speckles, rolling beam, flutter, sync tears, the scan rows' flutter; メニューの効果) is
   instrument-ui.css section 7, on its own layer. */
:root:root:root:root[data-skin="ps1"][data-ui-theme="light"] body :is(#actionSidebar, #productFlowOverlay:not([data-flow-mode="title"]), #tapInspectPanel, .ui-record-popup, .radio, .adv, .contact-topics, .spell-wheel__slot, .ui-field .ui-aim, .ui-field .ui-gate, .ui-field .ui-choice) {
  color-scheme: light;
  --ob-backplate: url("../../../assets/ui/observer-2026-10-21/obs3-bg-light-liz.webp");
  --ob-pane: url("../../../assets/ui/observer-2026-10-21/obs3-window-gray-light.webp");
  --ob-art-filter: brightness(0.4);
  --ob-ink: #24211c; --ob-ink-2: #5c564b; --ob-hi: #7a5a22; --ob-glass: rgb(246 242 233 / 0.95); --ob-void: #f4efe4;
  --ob-pre-ink: #5a5346; --ob-pre-ink-2: #e6d7bc;   /* = the inks / 0.4: under brightness(0.4) they come out as #24211c / #5c564b */
  --nx-ground: #ece6d8; --nx-ground-2: #e4dccb; --nx-glass: rgb(246 242 233 / 0.92); --nx-glass-2: rgb(238 232 220 / 0.95);
  --nx-ivory: #24211c; --nx-ivory-2: #4a453c; --nx-ivory-3: #5c564b;
  --nx-line: rgb(36 33 28 / 0.16); --nx-line-2: rgb(36 33 28 / 0.30); --nx-line-3: rgb(36 33 28 / 0.62);
  --nx-lantern: #7a5a22; --nx-lantern-soft: rgb(122 90 34 / 0.12); --nx-lantern-glow: 0 0 0 1px rgb(122 90 34 / 0.45);
  --nx-hp: #24211c; --nx-mp: #2a5aa8; --nx-danger: #a8341f; --nx-ok: #2f6b2a; --nb-lamp: #24211c;
  --nx-shadow: 0 18px 40px -22px rgb(60 50 30 / 0.35);
  --sym-physical: #4a463e; --sym-fire: #b2381e; --sym-cold: #1f6f86; --sym-lightning: #7d5f00; --sym-water: #2a5aa8; --sym-poison: #4f7a1e; --sym-arcane: #6a3fae;
  --sym-oil: #8a5a14; --sym-wet: #2a5aa8; --sym-ice: #1f6f86; --sym-metal: #4d5c6a; --sym-steam: #4f6474; --sym-grass: #3f7a2a; --sym-blood: #a3284d; --sym-spores: #66670f;
  --sym-rooted: #3f7a2a; --sym-weakened: #7d5f00; --sym-confused: #9a3a8e; --sym-mud: #8a5a14; --sym-ash: #5c564b; --sym-sand: #7d5f00; --sym-glass: #1f6f86; --sym-shards: #4d5c6a;
}
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="light"] body :is(#actionSidebar, #productFlowOverlay:not([data-flow-mode="title"]), #tapInspectPanel, .ui-record-popup, .radio, .adv, .contact-topics, .spell-wheel__slot, .ui-field .ui-aim, .ui-field .ui-gate, .ui-field .ui-choice) {
  --ob-backplate: url("../../../assets/ui/observer-2026-10-21/obs3-bg-light-elvi.webp");
  --ob-ink: #0f2519; --ob-ink-2: #44594c; --ob-hi: #0f6e45; --ob-glass: rgb(240 243 239 / 0.95); --ob-void: #eef1ed;
  --ob-pre-ink: #265d3f; --ob-pre-ink-2: #aadfbe;
  --nx-ground: #e6eae5; --nx-ground-2: #dde3dc; --nx-glass: rgb(240 243 239 / 0.92); --nx-glass-2: rgb(232 237 231 / 0.95);
  --nx-ivory: #0f2519; --nx-ivory-2: #2e4437; --nx-ivory-3: #44594c;
  --nx-line: rgb(15 37 25 / 0.16); --nx-line-2: rgb(15 37 25 / 0.30); --nx-line-3: rgb(15 37 25 / 0.62);
  --nx-lantern: #0f6e45; --nx-lantern-soft: rgb(15 110 69 / 0.12); --nx-lantern-glow: 0 0 0 1px rgb(15 110 69 / 0.45);
  --nx-hp: #0f2519; --nb-lamp: #0f2519;
}
:root:root:root:root[data-skin="ps1"][data-ui-theme="console"] body :is(#actionSidebar, #productFlowOverlay:not([data-flow-mode="title"]), #tapInspectPanel, .ui-record-popup, .radio, .adv, .contact-topics, .spell-wheel__slot, .ui-field .ui-aim, .ui-field .ui-gate, .ui-field .ui-choice) {
  color-scheme: dark;
  --ob-backplate: url("../../../assets/ui/observer-2026-10-21/obs3-bg-console.webp");
  --ob-pane: url("../../../assets/ui/observer-2026-10-21/obs3-window-gray-dark.webp");
  --ob-art-filter: none;
  --ob-ink: #9cf5b6; --ob-ink-2: #3fae66; --ob-hi: #46f27a; --ob-glass: rgb(2 6 3 / 0.95); --ob-void: #020503;
  --nx-ground: #020503; --nx-ground-2: #06100a; --nx-glass: rgb(2 6 3 / 0.92); --nx-glass-2: rgb(6 14 9 / 0.95);
  --nx-ivory: #9cf5b6; --nx-ivory-2: #6fd08f; --nx-ivory-3: #3fae66;
  --nx-line: rgb(70 242 122 / 0.18); --nx-line-2: rgb(70 242 122 / 0.34); --nx-line-3: rgb(70 242 122 / 0.66);
  --nx-lantern: #46f27a; --nx-lantern-soft: rgb(70 242 122 / 0.14); --nx-lantern-glow: 0 0 0 1px rgb(70 242 122 / 0.5);
  --nx-hp: #9cf5b6; --nx-mp: #7fd0e6; --nx-ok: #46f27a; --nb-lamp: #9cf5b6;
  --ff-ui: "IBM Plex Mono", "Zen Kaku Gothic Antique", "SW JP", monospace;
  --ff-mincho: "IBM Plex Mono", "Zen Kaku Gothic Antique", "SW JP", monospace;
  --ff-type: "IBM Plex Mono", "Zen Kaku Gothic Antique", "SW JP", monospace;
  --ff-latin: "IBM Plex Mono", "Zen Kaku Gothic Antique", "SW JP", monospace;
  --ff-num: "IBM Plex Mono", "Zen Kaku Gothic Antique", "SW JP", monospace;
  /* Elvi's green parts, for both protagonists */
  --ob-focus: url("../../../assets/ui/observer-2026-10-21/obs2-focus-elvi.webp");
  --ob-btn-idle: url("../../../assets/ui/observer-2026-10-21/obs2-btn-idle-elvi.webp");
  --ob-btn-hover: url("../../../assets/ui/observer-2026-10-21/obs2-btn-hover-elvi.webp");
  --ob-btn-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-btn-pressed-elvi.webp");
  --ob-btn-disabled: url("../../../assets/ui/observer-2026-10-21/obs2-btn-disabled-elvi.webp");
  --ob-nameplate: url("../../../assets/ui/observer-2026-10-21/obs2-heading-elvi.webp");
  --ob-hairline: url("../../../assets/ui/observer-2026-10-21/obs3-hairline-h-elvi.webp");
  --ob-sweep: url("../../../assets/ui/observer-2026-10-21/menu-sweep-elvi-2026-10-22.webp");
  --ob-lamp-off: url("../../../assets/ui/observer-2026-10-21/obs2-sub-idle-elvi.webp");
  --ob-lamp-on: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-elvi.webp");
  --ob-lamp-locked: url("../../../assets/ui/observer-2026-10-21/obs2-sub-locked-elvi.webp");
  --ob-radio-off: url("../../../assets/ui/observer-2026-10-21/obs2-radio-off-elvi.webp");
  --ob-radio-on: url("../../../assets/ui/observer-2026-10-21/obs2-radio-on-elvi.webp");
  --ob-next: url("../../../assets/ui/observer-2026-10-21/obs2-next-elvi.webp");
  --ob-chev-l: url("../../../assets/ui/observer-2026-10-21/obs2-chev-l-elvi.webp");
  --ob-chev-r: url("../../../assets/ui/observer-2026-10-21/obs2-chev-r-elvi.webp");
  --ob-badge: url("../../../assets/ui/observer-2026-10-21/obs2-badge-elvi.webp");
  --ob-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-sub-selected-elvi.webp");
  --ob-thumb-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-elvi.webp");
  --ob-scroll-track: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-track-elvi.webp");
  --ob-scroll-thumb: url("../../../assets/ui/observer-2026-10-21/obs2-scroll-thumb-elvi.webp");
  --ob-node-idle: url("../../../assets/ui/observer-2026-10-21/obs2-node-idle-elvi.webp");
  --ob-node-locked: url("../../../assets/ui/observer-2026-10-21/obs2-node-locked-elvi.webp");
  --ob-node-focus: url("../../../assets/ui/observer-2026-10-21/obs2-node-focus-elvi.webp");
  --ob-node-pressed: url("../../../assets/ui/observer-2026-10-21/obs2-node-pressed-elvi.webp");
  --ob-nav-item: url("../../../assets/ui/observer-2026-10-21/obs2-nav-item-elvi.webp");
  --ob-nav-spell: url("../../../assets/ui/observer-2026-10-21/obs2-nav-spell-elvi.webp");
  --ob-nav-summon: url("../../../assets/ui/observer-2026-10-21/obs2-nav-summon-elvi.webp");
  --ob-nav-log: url("../../../assets/ui/observer-2026-10-21/obs2-nav-log-elvi.webp");
  --ob-nav-system: url("../../../assets/ui/observer-2026-10-21/obs2-nav-system-elvi.webp");
}
/* light and console: the recipes and semantic colours re-computed on each surface from its own values (dark keeps the ones of sections 1 and skin-nocturne.css) */
:root:root:root:root[data-skin="ps1"]:is([data-ui-theme="light"], [data-ui-theme="console"]) body :is(#actionSidebar, #productFlowOverlay:not([data-flow-mode="title"]), #tapInspectPanel, .ui-record-popup, .radio, .adv, .contact-topics, .spell-wheel__slot, .ui-field .ui-aim, .ui-field .ui-gate, .ui-field .ui-choice) {
  --ob-window: var(--ob-pane); --ob-window-sm: var(--ob-pane); --ob-inset: var(--ob-pane); --ob-dialog: var(--ob-pane); --ob-call: var(--ob-pane);
  --ob-ink-r: color-mix(in srgb, var(--ob-ink) 72%, var(--ob-ink-2));
  --ob-frame-window: var(--ob-window) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-popup: var(--ob-window-sm) var(--ob-sl-window) fill / var(--ob-bw-popup) stretch;
  --ob-frame-dialog: var(--ob-dialog) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-call: var(--ob-call) var(--ob-sl-window) fill / var(--ob-bw-window) stretch;
  --ob-frame-inset: var(--ob-inset) var(--ob-sl-window) fill / var(--ob-bw-inset) stretch;
  --ob-frame-nameplate: var(--ob-nameplate) var(--ob-sl-nameplate) fill / var(--ob-bw-nameplate) stretch;
  --ob-frame-btn: var(--ob-btn-idle) var(--ob-sl-btn) fill / var(--ob-bw-btn) stretch;
  --ob-frame-focus: var(--ob-focus) var(--ob-sl-focus) / var(--ob-bw-focus) stretch;
  --c-ground: var(--nx-ground); --c-surface: var(--nx-glass); --c-surface-2: var(--nx-glass-2); --c-plate: var(--nx-ground-2);
  --c-ink-1: var(--nx-ivory); --c-ink-2: var(--nx-ivory-2); --c-ink-3: var(--nx-ivory-3);
  --c-line: var(--nx-line-2); --c-line-strong: var(--nx-line-3); --c-line-soft: var(--nx-line);
  --c-focus-bg: var(--nx-lantern-soft); --c-focus-fg: var(--nx-ivory); --c-disabled-fg: var(--nx-ivory-3); --c-danger: var(--nx-danger);
  --c-title-fg: var(--nx-ivory); --c-title-sep: var(--nx-line-2); --c-inset-line: var(--nx-line); --shadow-panel: var(--nx-shadow);
  --fill-hp: var(--nx-hp); --fill-mp: var(--nx-mp); --fill-sp: var(--nx-lantern);
  --nb-paper: var(--nx-ground); --nb-paper-2: var(--nx-glass-2); --nb-paper-3: var(--nx-ground-2); --nb-sheet: var(--nx-glass-2);
  --nb-ink: var(--nx-ivory); --nb-ink-2: var(--nx-ivory-2); --nb-ink-3: var(--nx-ivory-3); --nb-pencil-line: var(--nx-line-2); --nb-red: var(--nx-danger); --nb-indigo: var(--nx-mp);
  --c-btn-bg: transparent; --c-btn-fg: var(--nx-ivory); --c-tab-fg: var(--nx-ivory-3); --c-tab-line: var(--nx-line);
  --c-row-fg: var(--nx-ivory); --c-row-meta: var(--nx-ivory-3); --c-row-focus-bg: var(--nx-lantern-soft); --c-row-focus-fg: var(--nx-ivory); --c-tag-line: var(--nx-line-2);
  --c-range-off: color-mix(in srgb, var(--nx-ivory) 4%, transparent); --c-range-off-line: var(--nx-line); --c-range-hit: color-mix(in srgb, var(--nx-lantern) 55%, transparent); --c-range-self: var(--nx-ivory);
  --c-desc-fg: var(--nx-ivory); --nx-caption: var(--nx-ivory-2);
  --nx-panel-solid: var(--nx-ground-2); --nx-menu-veil: color-mix(in srgb, var(--nx-ground) 45%, var(--nx-glass)); --nx-menu-wash: linear-gradient(var(--nx-menu-veil), var(--nx-menu-veil));
  --nx-focus-ring: 0 0 0 1px var(--nx-lantern);
  text-shadow: none;
}
/* light: the hand tray's keys and heading are the light pane too (their dark plates would carry dark words) */
:root:root:root:root[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar {
  --ob-btn-idle: var(--ob-pane); --ob-btn-hover: var(--ob-pane); --ob-btn-pressed: var(--ob-pane); --ob-btn-disabled: var(--ob-pane); --ob-nameplate: var(--ob-pane);
}
/* light: Elvi's hand heading sits on that light pane, so its words leave the console's bright green (elvi-console.css) for the light inks: the title in the first ink,
   the count line (手札 x/y・山・捨) in the second. Only the heading; the card plates and the pile keys stay dark with their own light words. */
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="light"] body #actionSidebar[data-hand="1"] > .ui-menu__head,
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="light"] body #actionSidebar[data-hand="1"] > .ui-menu__head :is(.ui-title, .ui-title__en, .ui-title__ja, .ui-title__main, span, b, i, small, strong) { color: var(--ob-ink); }
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="light"] body #actionSidebar[data-hand="1"] > .ui-menu__head :is(.ui-title__meta, .ui-menu__meta),
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="light"] body #actionSidebar[data-hand="1"] > .ui-menu__head :is(.ui-title__meta, .ui-menu__meta) * { color: var(--ob-ink-2); }
/* console: the mono face is wider and taller than the shared tray's one-line, 1.1 keys allow, so 使う / 捨てる / 破る cut their cost line (消耗 5/5・1T, 1T・捨て札へ) at the
   side and the glyphs at the bottom. The key grows with its words instead: the cost is its own line in a smaller size, it may break, nothing is elided. */
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="console"] body #actionSidebar[data-hand="1"] .ui-detail__actions .ui-btn {
  height: auto; max-height: none; padding-block: 2px; line-height: 1.25; white-space: normal; overflow: visible; text-overflow: clip;
}
:root:root:root:root[data-skin="ps1"][data-protagonist="elvi"][data-ui-theme="console"] body #actionSidebar[data-hand="1"] .ui-detail__actions .ui-btn__meta {
  display: block; max-width: 100%; font-size: 10px; line-height: 1.25; letter-spacing: 0; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere;
}
/* high contrast: the second ink becomes the first */
:root:root:root:root[data-skin="ps1"][data-high-contrast="1"]:is([data-ui-theme="light"], [data-ui-theme="console"]) body :is(#actionSidebar, #productFlowOverlay:not([data-flow-mode="title"]), #tapInspectPanel, .ui-record-popup, .radio, .adv, .contact-topics, .spell-wheel__slot, .ui-field .ui-aim, .ui-field .ui-gate, .ui-field .ui-choice) {
  --ob-ink-2: var(--ob-ink); --ob-pre-ink-2: var(--ob-pre-ink); --nx-ivory-2: var(--nx-ivory); --nx-ivory-3: var(--nx-ivory); --nx-line: var(--nx-line-3);
}

/* light: line art darkened in place. Art-only elements take the filter alone ... */
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-row:not([data-ec-card], [data-ec-pile])::before,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-row:not([data-ec-card], [data-ec-pile])::after,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-spell-row::before,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-spell-row::after,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-tab::before,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-tab::after,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-tab__ico,
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-spell-icon:not(.ui-spell-icon--chip),
html[data-skin="ps1"][data-ui-theme="light"] body :is(#actionSidebar, #tapInspectPanel, .ui-record-popup) :is(.ic-el, .ui-stats dd, .resistance-group span) > .ui-el-raster,
html[data-skin="ps1"][data-ui-theme="light"] body #productFlowOverlay :is(.product-setting-row, .cx-row)::before,
html[data-skin="ps1"][data-ui-theme="light"] body #productFlowOverlay input[type="range"],
html[data-skin="ps1"][data-ui-theme="light"] body .radio__link::before,
html[data-skin="ps1"][data-ui-theme="light"] body .radio__bars i,
html[data-skin="ps1"][data-ui-theme="light"] body .radio__dir i,
html[data-skin="ps1"][data-ui-theme="light"] body .radio__next,
html[data-skin="ps1"][data-ui-theme="light"] body .radio__pic::after,
html[data-skin="ps1"][data-ui-theme="light"] body .adv__next,
html[data-skin="ps1"][data-ui-theme="light"] body .spell-wheel__slot::before { filter: var(--ob-art-filter); }
/* ... and elements that carry art and words take it whole, with their inks stated before it */
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar:not([data-hand="1"]) :where(button:not(.ui-tab, .ui-tabs__hint), .ui-key--act, summary),
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-tab > .sp-badge,
html[data-skin="ps1"][data-ui-theme="light"] body #productFlowOverlay:not([data-flow-mode="title"]) :is(.settings-page button, button.product-flow-back, .product-flow-actions button),
html[data-skin="ps1"][data-ui-theme="light"] body .radio__choice,
html[data-skin="ps1"][data-ui-theme="light"] body .contact-topics :is(.contact-topics__btn, .contact-topics__cancel),
html[data-skin="ps1"][data-ui-theme="light"] body :is(#tapInspectPanel, .ui-record-popup) :is(.ui-btn, button.inspect-survey) {
  filter: var(--ob-art-filter); --ob-ink: var(--ob-pre-ink); --ob-ink-2: var(--ob-pre-ink-2); --ob-ink-r: color-mix(in srgb, var(--ob-pre-ink) 72%, var(--ob-pre-ink-2));
}
/* the badge ring without the glass disc (the filter would darken the disc) */
html[data-skin="ps1"][data-ui-theme="light"] body #actionSidebar .ui-tab > .sp-badge { background: var(--ob-badge) center / 100% 100% no-repeat; }
/* light: the scroll bars are the system's thin bar in the second ink (the raster scroll parts are pale line art and cannot take a filter) */
html[data-skin="ps1"][data-ui-theme="light"] body :is(.ui-list__rows, .ui-list, .ui-detail, .ui-detail__content, .ui-spell-options, .ui-spell-rows, .inspect-body, .radio__text, .radio__choices, .adv__text, .product-flow-panel) {
  scrollbar-width: thin; scrollbar-color: var(--ob-ink-2) transparent;
}

/* UI17 v2: the pages that are read or set up at length (settings, the records, the dungeon entry and its carry-in, the warehouse, help, the result) are
   full-screen in every appearance: the window fills the viewport (inside the safe areas) and the ground around it is the appearance's own generated
   backplate (light: the cream survey paper, never black), so no game picture shows through and no appearance has a different frame. Short choice dialogs
   (start, abandon, gate, game menu) stay compact. */
:root:root:root:root[data-skin="ps1"] body #productFlowOverlay:is([data-flow-mode="settings"], [data-flow-mode="codex"], [data-flow-mode="enemy-codex"], [data-flow-mode="conducts"], [data-flow-mode="dungeon-select"], [data-flow-mode="expedition-select"], [data-flow-mode="test-start"], [data-flow-mode="carry-in"], [data-flow-mode="warehouse"], [data-flow-mode="howto"], [data-flow-mode="result"], [data-flow-mode="elvi-guide"], [data-flow-mode="dev"]) {
  place-items: stretch; padding: var(--safe-t, 0px) var(--safe-r, 0px) var(--safe-b, 0px) var(--safe-l, 0px);
  background: var(--ob-void) var(--ob-backplate) center / cover no-repeat; -webkit-backdrop-filter: none; backdrop-filter: none;
}
:root:root:root:root[data-skin="ps1"] body #productFlowOverlay:is([data-flow-mode="settings"], [data-flow-mode="codex"], [data-flow-mode="enemy-codex"], [data-flow-mode="conducts"], [data-flow-mode="dungeon-select"], [data-flow-mode="expedition-select"], [data-flow-mode="test-start"], [data-flow-mode="carry-in"], [data-flow-mode="warehouse"], [data-flow-mode="howto"], [data-flow-mode="result"], [data-flow-mode="elvi-guide"], [data-flow-mode="dev"]) #productFlowPanel.product-flow-panel {
  box-sizing: border-box; width: 100%; max-width: none; height: 100%; max-height: 100%; min-height: 0; margin: 0;
}
/* UI17 v2 (light, full-screen): the light window pane stretched over a whole viewport reads as grey-white with a dark vignette, and it painted over the cream
   ground entirely (the panel itself was transparent). Here the pane keeps only its frame edges (no fill) and the reading surface is the generated cream survey
   paper (obs3-bg-light-*) under a cream wash, so the survey lines stay faint and the words sit on cream. The wash is a colour over the bitmap, not a surface of its own. */
:root:root:root:root[data-skin="ps1"][data-ui-theme="light"] body #productFlowOverlay:is([data-flow-mode="settings"], [data-flow-mode="codex"], [data-flow-mode="enemy-codex"], [data-flow-mode="conducts"], [data-flow-mode="dungeon-select"], [data-flow-mode="expedition-select"], [data-flow-mode="test-start"], [data-flow-mode="carry-in"], [data-flow-mode="warehouse"], [data-flow-mode="howto"], [data-flow-mode="result"], [data-flow-mode="elvi-guide"], [data-flow-mode="dev"]) #productFlowPanel.product-flow-panel {
  border-image: var(--ob-pane) var(--ob-sl-window) / var(--ob-bw-window) stretch;
  --ob-cream-wash: color-mix(in srgb, var(--ob-void) 80%, transparent);
  background: linear-gradient(var(--ob-cream-wash), var(--ob-cream-wash)), var(--ob-backplate) center / cover no-repeat;
  background-color: var(--ob-void);
}

:root:root:root:root:root[data-skin="ps1"][data-menu-fx-scanlines="0"] body :is(#actionSidebar,#tapInspectPanel.ui-inspect,.ui-record-popup)::before { display: none; animation: none; }
:root:root:root:root:root[data-skin="ps1"][data-menu-fx-afterglow="0"] body #actionSidebar.ui-menu:not([data-hand="1"]) :is(.ui-row,.ui-spell-row)::after { animation: none; }
:root:root:root:root:root[data-skin="ps1"][data-menu-fx-roll="0"] body :is(#actionSidebar,#productFlowOverlay #productFlowPanel.product-flow-panel,#tapInspectPanel.ui-inspect,.ui-record-popup)::after { display: none; animation: none; }

/* Narrative ending uses the same measured image slices as the other PS1 panels. */
html[data-skin="ps1"] body .story-ending__panel {
  background: var(--ob-void); color: var(--ob-ink); box-shadow: none;
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-window);
}
html[data-skin="ps1"] body .story-ending__button {
  color: var(--ob-ink); background: none; box-shadow: none;
  border: var(--ob-bw-btn) solid transparent; border-image: var(--ob-frame-btn);
}
html[data-skin="ps1"] body .story-ending__button:hover { border-image-source: var(--ob-btn-hover); }
html[data-skin="ps1"] body .story-ending__button:active { border-image-source: var(--ob-btn-pressed); }

@media (orientation: portrait) {
  html[data-skin="ps1"][data-native-aperture="1"] body .story-ending {
    inset: auto; left: var(--native-screen-x); top: var(--native-screen-y);
    width: var(--native-screen-w); height: var(--native-screen-h);
    padding: 10px; border-radius: 20px; overflow: hidden;
  }
  html[data-skin="ps1"][data-native-aperture="1"] body .story-ending__panel {
    width: 100%; max-height: calc(var(--native-screen-h) - 20px);
    padding: 12px; gap: 10px;
  }
  html[data-skin="ps1"][data-native-aperture="1"] body .story-ending__credits {
    min-height: 0; max-height: calc(var(--native-screen-h) - 150px);
  }
}

@media (orientation: portrait) {
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] {
    inset: auto; left: var(--native-screen-x); top: var(--native-screen-y);
    width: var(--native-screen-w); height: var(--native-screen-h);
    border-radius: 20px; overflow: hidden;
    --adv-top: 10px; --adv-card-h: calc(var(--native-screen-h) * .54);
    --adv-card-w: min(72%, calc(var(--native-screen-h) * .39)); --adv-edge: 10px;
  }
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] .adv__card[data-state="speak"] { transform: none; }
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] .adv__box {
    left: 10px; right: 10px; bottom: 30px; min-height: 0; max-height: 40%;
    padding: 10px 12px 20px; overflow: auto; box-sizing: border-box;
  }
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] .adv__name { font-size: 15px; margin-bottom: 6px; }
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] .adv__text { font-size: 13px; line-height: 1.75; min-height: 3.5em; }
  html[data-skin="ps1"][data-native-aperture="1"] body .adv[data-scene-kind="resident"] .adv__hint { right: 10px; bottom: 7px; }
}

html[data-skin="ps1"] body .story-ending__credits.is-rolling { max-height: min(24vh, 180px); }
/* 3D field loading uses the same authored window and keys as the observer UI. */
html[data-skin="ps1"] body #sliceLoading .product-flow-panel {
  color: var(--ob-ink); background: var(--ob-void); box-shadow: none;
  border: var(--ob-bw-window) solid transparent; border-image: var(--ob-frame-window);
}
html[data-skin="ps1"] body #sliceLoading button {
  min-height: 44px; margin: 4px; padding: 4px 12px; color: var(--ob-ink);
  background: transparent; border: solid transparent; border-width: var(--ob-bw-btn); border-image: var(--ob-frame-btn);
}
html[data-skin="ps1"] body #sliceLoading button:is(:hover,:focus-visible) {
  border-image-source: var(--ob-btn-hover); outline: 2px solid var(--ob-hi); outline-offset: 2px;
}
html[data-skin="ps1"] body #sliceLoading button:active { border-image-source: var(--ob-btn-pressed); }
