/* The Radix viewer's layout and sizes (site/app-radix). Colours, fonts and corner shapes are the series theme's custom
   properties (app/themes/<theme>.css), as in app/style.css: no colour of its own (tests/unit/series.test.mjs). */
html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  font: 14px/1.6 var(--font-sans);
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.scene-mark {
  position: fixed;
  left: 18px;
  top: 14px;
  pointer-events: none;
  text-shadow: 0 1px 6px rgb(var(--shade-rgb) / .85);
}

/* A soft shade behind the title, so it reads over bright foliage */
.scene-mark::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: -18px;
  top: -14px;
  width: 26rem;
  height: 9rem;
  background: radial-gradient(ellipse at 0 0, rgb(var(--shade-rgb) / .6), rgb(var(--shade-rgb) / 0) 70%);
}

/* The hour beside the title (scene/digital-clock.js, its box named as the waterside viewer's dial): right of the name */
.sky-dial { position: absolute; pointer-events: auto; }

.scene-home {
  /* (a box, not inline: the clock is placed right of it by its offsetWidth, and kept there by a ResizeObserver, which
     WebKit measured wrong and does not run on an inline box holding blocks: the clock over the title on an iPad, 2026-11-15) */
  display: inline-block;
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
}

.scene-mark h1 {
  margin: 0;
  font: 500 1.35rem/1.3 var(--serif-ja);
  color: var(--title-ink);
}

.scene-title-en {
  margin: 0;
  font: .85rem/1.3 var(--serif-en);
  color: var(--muted);
}

.scene-series {
  margin: .35rem 0 0;
  font-size: .75rem;
  color: var(--dim);
}

.scene-series span + span {
  margin-left: .6em;
}

.progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  pointer-events: none;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  transition: width .15s linear;
}

body:not([data-load-state="loading"]) .progress {
  display: none;
}

.notice {
  position: fixed;
  left: 50%;
  top: 50%;
  width: min(34rem, calc(100% - 32px));
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  padding: 1.4rem 1.6rem;
  border: 1px solid var(--line);
  border-radius: var(--corner-panel);
  background: rgb(var(--ink-rgb) / .92);
  box-shadow: 0 10px 40px rgb(var(--shadow-rgb) / .6);
}

.notice[hidden] {
  display: none;
}

.notice h2 {
  margin: 0 0 .6rem;
  font: 500 1.1rem/1.5 var(--serif-ja);
}

.notice p {
  margin: .4rem 0;
  color: var(--muted);
}

.notice a {
  color: var(--accent);
}

.notice a:hover {
  color: var(--accent-hover);
}

.copyright {
  position: fixed;
  right: 12px;
  bottom: 8px;
  font-size: .7rem;
  color: var(--dim);
  pointer-events: none;
  text-shadow: 0 1px 4px rgb(var(--shade-rgb) / .9);
}

/* The settings (scene/settings-panel.js): closed, the frame rate and a round button at the top right; open, a panel of
   big switches down the right; the details a wider panel of sliders. */
.settings {
  position: fixed;
  top: 14px;
  right: 16px;
  bottom: 14px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  pointer-events: none;
  font-family: var(--font-sans);
  color: var(--paper);
}

.settings > * { pointer-events: auto; }
.settings[data-view="closed"] .set-panel,
.settings:not([data-view="closed"]) .set-bar,
.settings[data-view="list"] .set-detail,
.settings[data-view="detail"] .set-list { display: none; }

.set-icon { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.settings :where(button) { font: inherit; color: inherit; cursor: pointer; }
.settings button:focus-visible, .settings input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.set-bar { display: flex; align-items: center; gap: 10px; }

.set-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 14px 0 16px;
  box-sizing: border-box;
  border: 1px solid rgb(var(--accent-rgb) / .32);
  border-radius: var(--corner-bar);
  background: rgb(var(--ink-rgb) / .72);
  backdrop-filter: blur(8px);
}

.set-fps { display: flex; flex-direction: column; align-items: flex-end; line-height: 1; }
.set-fps-line { display: flex; align-items: baseline; gap: 4px; }
.set-fps-num { min-width: 2ch; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.set-fps-unit { font-size: 11px; color: var(--muted); letter-spacing: .08em; }
.set-fps-ms { margin-top: 3px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }

.set-spark { display: block; }
.set-spark polyline { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
.set-spark-budget { stroke: rgb(var(--paper-rgb) / .3); stroke-dasharray: 2 3; }

.set-open {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgb(var(--accent-rgb) / .8);
  border-radius: 50%;
  background: rgb(var(--glass-rgb) / .55);
  backdrop-filter: blur(8px);
}

.set-open:hover { background: rgb(var(--glass-rgb) / .85); }


.set-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100%;
  max-height: 760px;
  box-sizing: border-box;
  padding: 14px 16px 16px;
  border: 1px solid rgb(var(--accent-rgb) / .32);
  border-radius: var(--corner-panel);
  background: rgb(var(--ink-rgb) / .94);
  box-shadow: 0 12px 40px rgb(var(--shadow-rgb) / .35);
}

.set-list { width: min(440px, calc(100vw - 32px)); }
.set-detail { width: min(780px, calc(100vw - 32px)); gap: 0; padding: 0; overflow: hidden; }

.set-head { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.set-detail .set-head { gap: 14px; min-height: 72px; padding: 0 16px 0 10px; border-bottom: 1px solid rgb(var(--paper-rgb) / .1); }
.set-head h2 { margin: 0; font: 500 20px/1.3 var(--serif-ja); letter-spacing: .12em; white-space: nowrap; }
.set-gap { flex: 1 1 auto; }
.set-fps-head { flex-direction: row; align-items: baseline; gap: 8px; padding: 6px 10px; border-radius: 10px; background: rgb(var(--accent-rgb) / .1); }
.set-fps-head .set-fps-num { font-size: 18px; }
.set-fps-head .set-fps-ms { margin: 0; }

.set-round {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
}

.set-round:hover { background: rgb(var(--paper-rgb) / .08); }

.set-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: rgb(var(--shadow-rgb) / .35);
}

.set-preset { height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--label); font-size: 14px; font-weight: 600; }
.set-preset:hover { background: rgb(var(--paper-rgb) / .06); }
.set-preset[aria-checked="true"] { background: var(--accent); color: var(--ink); }

.set-features { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-height: 0; margin: 0; padding: 0; list-style: none; overflow-y: auto; }
.set-feature { display: flex; align-items: center; gap: 12px; padding: 5px 8px; border-radius: 14px; cursor: pointer; }
.set-feature:hover { background: rgb(var(--paper-rgb) / .05); }
.set-feature[data-disabled="true"] { opacity: .45; cursor: default; }

.set-feature-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1.5px solid rgb(var(--accent-rgb) / .55);
  border-radius: 12px;
  background: rgb(var(--accent-rgb) / .1);
  color: var(--accent);
  transition: color .15s, background .15s, border-color .15s;
}

.set-feature[data-on="false"] .set-feature-icon { border-color: rgb(var(--paper-rgb) / .14); background: rgb(var(--shadow-rgb) / .3); color: var(--dim); }
.set-feature-text { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; min-width: 0; }
.set-feature-name { display: flex; align-items: baseline; gap: 8px; font-size: 15px; font-weight: 700; letter-spacing: .04em; }
.set-load { font-size: 10.5px; font-weight: 400; color: var(--dim); letter-spacing: .02em; }
/* an experiment's tag by its name (scene/settings-panel.js FEATURES experimental) */
.set-tag { padding: 1px 7px; border: 1px solid rgb(var(--paper-rgb) / .35); border-radius: 999px; font-size: 10.5px; font-weight: 400; color: var(--muted); letter-spacing: .04em; }
.set-feature-desc { font-size: 12px; line-height: 1.4; color: var(--muted); }
.set-feature[data-on="false"] .set-feature-desc { color: var(--dim); }

/* a feature's details (2026-11-02, the user): beside its switch, opening its tab at its items, which light a moment */
.set-link {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgb(var(--paper-rgb) / .16);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.set-link:hover { border-color: rgb(var(--accent-rgb) / .6); background: rgb(var(--accent-rgb) / .14); color: var(--accent); }
.set-flash { animation: set-flash 1.8s ease-out; }
@keyframes set-flash { 0%, 35% { background: rgb(var(--accent-rgb) / .16); } 100% { background: transparent; } }

.set-switch {
  position: relative;
  flex: 0 0 auto;
  width: 64px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: var(--track);
  transition: background .15s;
}

.set-switch[aria-checked="true"] { background: var(--accent); }
.set-switch:disabled { cursor: default; }

.set-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 3px rgb(var(--shadow-rgb) / .5);
  transition: left .15s;
}

.set-switch[aria-checked="true"] .set-knob { left: 31px; }

.set-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  height: 52px;
  padding: 0 18px;
  border: 1px solid rgb(var(--accent-rgb) / .55);
  border-radius: var(--corner-bar);
  background: rgb(var(--accent-rgb) / .12);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .08em;
}

.set-more:hover { background: rgb(var(--accent-rgb) / .2); }
.set-more-note { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: .02em; }
.set-more-note .set-icon { color: var(--accent); stroke-width: 2; }

.set-columns { display: flex; flex: 1 1 auto; min-height: 0; }

.set-tabs {
  display: flex;
  flex-direction: column;
  flex: 0 0 168px;
  gap: 4px;
  box-sizing: border-box;
  padding: 14px 10px;
  border-right: 1px solid rgb(var(--paper-rgb) / .1);
}

.set-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--label);
  font-size: 14px;
  text-align: left;
}

.set-tab:hover { background: rgb(var(--paper-rgb) / .06); }
.set-tab[aria-current="page"] { background: rgb(var(--accent-rgb) / .16); color: var(--accent); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.set-tabs-note { margin: 0; padding: 0 8px; font-size: 11px; color: var(--dim); }

.set-main { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; padding: 16px 22px 14px; }
.set-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.set-body-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.set-body-head h3 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.set-body-head span { font-size: 12px; color: var(--dim); }
.set-rows { margin: 0; padding: 0; list-style: none; }
.set-row { display: flex; flex-direction: column; gap: 8px; padding: 14px 0 16px; border-bottom: 1px solid rgb(var(--paper-rgb) / .08); }
.set-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.set-row-name { font-size: 14.5px; font-weight: 600; }
.set-row-hint { font-size: 11.5px; color: var(--dim); text-align: right; }
.set-row-switch .set-row-head { align-items: center; }
.set-row[data-disabled="true"] { opacity: .45; }
.set-row[data-disabled="true"] input, .set-row[data-disabled="true"] button { cursor: default; }
.set-row-text { display: flex; flex-direction: column; gap: 2px; }
.set-row-text .set-row-hint { text-align: left; }
.set-row-controls { display: flex; align-items: center; gap: 10px; }

.set-slider { position: relative; flex: 1 1 auto; height: 40px; }

.set-slider input {
  --fill: 0%;
  position: absolute;
  top: 7px;
  left: 0;
  width: 100%;
  height: 22px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.set-slider input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--accent) var(--fill), var(--track) var(--fill));
}

.set-slider input::-moz-range-track { height: 6px; border-radius: 3px; background: var(--track); }
.set-slider input::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }

.set-slider input::-webkit-slider-thumb {
  width: 22px;
  height: 22px;
  margin-top: -8px;
  box-sizing: border-box;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 1px 4px rgb(var(--shadow-rgb) / .5);
  -webkit-appearance: none;
}

.set-slider input::-moz-range-thumb {
  width: 22px;
  height: 22px;
  box-sizing: border-box;
  border: 3px solid var(--accent);
  border-radius: 50%;
  background: var(--paper);
}

.set-default { position: absolute; top: 0; font-size: 9px; line-height: 1; color: var(--dim); transform: translateX(-50%); pointer-events: none; }
.set-min, .set-max { position: absolute; top: 28px; font-size: 10px; color: var(--dim); }
.set-min { left: 0; }
.set-max { right: 0; }

.set-step {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid rgb(var(--paper-rgb) / .18);
  border-radius: 10px;
  background: transparent;
  font-size: 18px;
}

.set-step:hover { background: rgb(var(--paper-rgb) / .08); }

.set-field {
  display: flex;
  align-items: baseline;
  flex: 0 0 auto;
  gap: 4px;
  width: 96px;
  height: 36px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid var(--field-line);
  border-radius: 10px;
  background: var(--field);
}

.set-field:focus-within { border-color: var(--accent); }

.set-value {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--paper);
  font: 600 16px/34px var(--font-sans);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.settings .set-value:focus-visible { outline: none; }
.set-unit { font-size: 11px; color: var(--muted); }

.set-reset {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
}

.set-reset:disabled { color: rgb(var(--paper-rgb) / .2); cursor: default; }

.set-choices { display: flex; flex-wrap: wrap; gap: 6px; }
.set-choice { height: 38px; padding: 0 14px; border: 1px solid rgb(var(--paper-rgb) / .18); border-radius: 10px; background: transparent; font-size: 13px; }
.set-choice[aria-checked="true"] { border-color: var(--accent); background: var(--accent); color: var(--ink); font-weight: 600; }

.set-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; font-size: 12px; color: var(--dim); }
.set-reset-all { height: 40px; padding: 0 16px; border: 1px solid rgb(var(--paper-rgb) / .25); border-radius: 12px; background: transparent; font-size: 13px; }
.set-reset-all:hover { background: rgb(var(--paper-rgb) / .08); }

/* The walk's touch stick, jump and 「戻る」 (app/core/walk/touch-controls.js, shared with the waterside viewer: its rules
   from app/style.css, the screen edge 16 px). On a PC 「戻る」 alone, at the lower right. */
.touch-walk[hidden] { display: none; }
.touch-stick { position: fixed; z-index: 3; left: calc(max(16px, env(safe-area-inset-left)) + 4px); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 50px); width: 132px; height: 132px; border: 1.5px solid rgb(var(--paper-rgb) / .55); border-radius: 50%; background: rgb(var(--ink-rgb) / .22); opacity: .35; pointer-events: none; transition: opacity .18s ease; }
.touch-walk.first .touch-stick { opacity: .6; }
.touch-stick.placed { left: 0; top: 0; bottom: auto; }
.touch-stick.held { opacity: .9; transition: none; }
.touch-stick.fading { opacity: 0; }
.touch-stick-knob { position: absolute; left: 38px; top: 38px; width: 56px; height: 56px; border-radius: 50%; background: rgb(var(--paper-rgb) / .78); box-shadow: 0 2px 10px rgb(var(--shadow-rgb) / .35); }
.touch-stick.pushed .touch-stick-knob { background: var(--accent); }
.touch-walk-button { position: fixed; z-index: 3; display: grid; place-items: center; padding: 0; border: 1px solid rgb(var(--accent-rgb) / .3); border-radius: 50%; color: var(--paper); background: rgb(var(--ink-rgb) / .6); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); filter: drop-shadow(0 1px 3px rgb(var(--shadow-rgb) / .5)); touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: transform .08s ease, border-color .15s, box-shadow .15s, color .15s; }
.touch-walk-button svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.touch-jump { right: max(16px, env(safe-area-inset-right)); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 46px); width: 66px; height: 66px; grid-template-rows: auto auto; align-content: center; gap: 0; border: 1.5px solid rgb(var(--accent-rgb) / .55); background: radial-gradient(circle at 50% 35%, rgb(var(--paper-rgb) / .14), transparent 62%), rgb(var(--ink-rgb) / .62); box-shadow: inset 0 0 0 4px rgb(var(--ink-rgb) / .28), inset 0 0 0 5px rgb(var(--accent-rgb) / .16); color: var(--accent); }
.touch-jump svg { width: 26px; height: 26px; margin-top: 2px; stroke-width: 2.4; }
.touch-jump-label { margin-top: -3px; color: rgb(var(--paper-rgb) / .82); font-family: var(--serif-en); font-size: 8.5px; font-weight: 600; letter-spacing: .22em; padding-left: .22em; line-height: 1; }
.touch-jump:active { transform: scale(.93); border-color: var(--accent); box-shadow: inset 0 0 0 4px rgb(var(--ink-rgb) / .28), 0 0 0 4px rgb(var(--accent-rgb) / .25); }
.touch-back { right: calc(max(16px, env(safe-area-inset-right)) + 11px); bottom: calc(max(18px, env(safe-area-inset-bottom)) + 124px); width: 44px; height: 44px; transition: box-shadow .3s, color .3s, transform .08s ease; }
.touch-back svg { width: 20px; height: 20px; }
.touch-back:active, .touch-back.holding { color: var(--accent); transform: scale(.94); }
.touch-back.holding { box-shadow: 0 0 0 3px rgb(var(--accent-rgb) / .35); transition: box-shadow .8s linear, transform .08s ease; }
.touch-back.nudge { color: var(--accent); animation: touch-nudge 1.1s ease-in-out infinite; }
@keyframes touch-nudge { 50% { box-shadow: 0 0 0 7px rgb(var(--accent-rgb) / .3); } }
.touch-walk-fade { position: fixed; inset: 0; z-index: 2; background: rgb(var(--ink-rgb)); opacity: 0; pointer-events: none; transition: opacity .15s ease; }
.touch-walk-fade.on { opacity: .75; }
/* No touch screen (a computer): 「戻る」 alone, lower down where the jump button would be (core/walk/touch-controls.js). */
.touch-walk.pointer .touch-stick, .touch-walk.pointer .touch-jump { display: none; }
.touch-walk.buttons-off .touch-jump, .touch-walk.buttons-off .touch-back { display: none; }
.touch-walk.pointer .touch-back { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 52px); cursor: pointer; }
.touch-walk.pointer .touch-back:hover { color: var(--accent); }

/* Looking round or walking (scene/walk-switch.js): a pair of buttons at the bottom middle. */
.walk-switch {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 5;
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgb(var(--accent-rgb) / .32);
  border-radius: var(--corner-bar);
  background: rgb(var(--ink-rgb) / .72);
  backdrop-filter: blur(8px);
  transform: translateX(-50%);
}

.walk-switch button {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 13px 4px 11px 4px;
  background: transparent;
  color: var(--label);
  font: 600 14px/1 var(--font-sans);
  letter-spacing: .06em;
  /* (one line: held at the middle, a narrow screen squeezed it and 「飛ぶ」 broke into two, 2026-11-05) */
  white-space: nowrap;
  cursor: pointer;
}

.walk-switch button:hover { background: rgb(var(--paper-rgb) / .08); }
.walk-switch button[aria-checked="true"] { background: var(--accent); color: var(--ink); }
.walk-switch button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.walk-switch svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.walk-switch[data-busy="true"] { opacity: .6; pointer-events: none; }

/* 音紋 (scene/ripples-switch.js): one button at the bottom left in the walk switch's glass, its corners the view bar's;
   lit and its ripples going out while on, dim while off. The English name longer: the button wider (the user: 多少大きさが
   変わってもいい); on a narrow screen its name under its icon, clear of the walk switch. */
.ripples-switch {
  position: fixed;
  left: max(16px, env(safe-area-inset-left));
  bottom: 18px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  box-sizing: border-box;
  padding: 0 20px 0 13px;
  border: 1px solid rgb(var(--accent-rgb) / .32);
  border-radius: var(--corner-bar);
  background: rgb(var(--ink-rgb) / .72);
  backdrop-filter: blur(8px);
  color: rgb(var(--paper-rgb) / .62);
  font: 600 15px/1 var(--font-sans);
  letter-spacing: .28em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .25s ease, color .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.ripples-switch[data-lang="en"] { font-size: 14px; letter-spacing: .07em; }
.ripples-switch .ripples-name { margin-right: -.28em; }
.ripples-switch[data-lang="en"] .ripples-name { margin-right: 0; }
.ripples-switch:hover { color: var(--paper); border-color: rgb(var(--accent-rgb) / .6); }
.ripples-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ripples-switch[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--ink); box-shadow: 0 0 18px rgb(var(--accent-rgb) / .42); }
.ripples-switch svg { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; overflow: visible; }
.ripples-switch .ripples-dot { fill: currentColor; stroke: none; }
.ripples-switch[aria-pressed="false"] svg { opacity: .72; }
.ripples-switch .ripples-ring { transform-box: view-box; transform-origin: 12px 12px; }
.ripples-switch[aria-pressed="true"] .ripples-ring { animation: ripples-out 2.6s ease-out infinite; }
.ripples-switch .ripples-ring-2 { animation-delay: .22s; }
.ripples-switch .ripples-ring-3 { animation-delay: .44s; }
@keyframes ripples-out {
  0% { opacity: .3; transform: scale(.82); }
  28% { opacity: 1; transform: scale(1); }
  100% { opacity: .55; transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) { .ripples-switch .ripples-ring { animation: none !important; } }
@media (max-width: 560px) {
  .ripples-switch { flex-direction: column; justify-content: center; gap: 4px; height: auto; min-height: 50px; padding: 6px 11px; font-size: 11px; letter-spacing: .24em; }
  .ripples-switch svg { width: 22px; height: 22px; }
  .ripples-switch[data-lang="en"] { max-width: 70px; font-size: 9.5px; line-height: 1.15; letter-spacing: .04em; white-space: normal; text-align: center; }
  .ripples-switch .ripples-name { margin-right: -.24em; }
}

/* The splash while the scene loads (scene/splash/splash.js): its words and progress at the bottom, the map's credit in the
   bottom-left corner; the top's thin bar, the settings, the clock and the walk switch hidden until it is done. */
.splash-ui {
  position: fixed;
  left: 50%;
  bottom: max(30px, env(safe-area-inset-bottom));
  width: min(360px, calc(100% - 32px));
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.splash-line {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 0 0 9px;
  font-size: 13px;
  letter-spacing: .08em;
  color: var(--label);
  text-shadow: 0 1px 4px rgb(var(--shade-rgb) / .8);
}

.splash-amount { min-width: 3ch; font-variant-numeric: tabular-nums; color: var(--accent); text-align: left; }
.splash-bar { display: block; height: 2px; overflow: hidden; border-radius: 1px; background: rgb(var(--paper-rgb) / .14); }
.splash-bar-fill { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s linear; }

.splash-credit {
  position: fixed;
  left: 16px;
  bottom: 12px;
  max-width: calc(50% - 32px);
  margin: 0;
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--dim);
  pointer-events: none;
}

body[data-splash="on"] .progress,
body[data-splash="revealing"] .progress { display: none; }

body[data-splash="on"] :is(.settings, .sky-dial, .walk-switch, .ripples-switch),
body[data-splash="revealing"] :is(.settings, .sky-dial, .walk-switch, .ripples-switch) { visibility: hidden; }

/* the splats' kinds' legend while the settings paint them (scene/env-view.js kindsLegend) */
.kinds-legend {
  position: fixed;
  left: 14px;
  bottom: 84px;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 4px 14px;
  padding: 10px 12px;
  border: 1px solid rgb(var(--accent-rgb) / .32);
  border-radius: 10px;
  background: rgb(var(--ink-rgb) / .8);
  color: rgb(var(--paper-rgb));
  font-size: 12px;
  pointer-events: none;
}
.kinds-legend[hidden] { display: none; }
.kinds-legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.kinds-legend i { width: 12px; height: 12px; border-radius: 3px; }

/* The automatic camera (scene/autocam.js): while it films, bars above and below just covering the page's marks there
   (their heights measured and set on them: scene/autocam.js; 2026-11-03, the user). Any touch takes them away. */
.autocam-bar {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 30;
  height: 0;
  background: var(--ink);
  pointer-events: none;
  transition: height 1s ease;
}
.autocam-bar-top { top: 0; }
.autocam-bar-bottom { bottom: 0; }
/* (its held frame at a cut: over the scene's canvas, under the page's marks) */
.autocam-held { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.autocam-held[hidden] { display: none; }
.autocam-held-fade { transition: opacity 1.2s ease; }

/* Phone widths (2026-11-05, the user: スマホ幅の UI を全体として見直して、アイコンや UI が重なっている): at 375 px the clock
   lay under the frame rate's chip and the copyright under the walk switch. The frame rate its number only; the clock
   under the name (its place beside it set by scene/digital-clock.js, overridden here); the walk switch and 音紋 a little
   up, the copyright its own line centred under them; the walking stick clear over them (the English 音紋 two lines
   high: 76 px left 5 px over it). */
@media (max-width: 560px) {
  .set-chip .set-spark, .set-chip .set-fps-ms { display: none; }
  .set-chip { gap: 0; padding: 0 12px; }
  .sky-dial { left: 0 !important; top: calc(100% + 8px) !important; }
  .walk-switch, .ripples-switch { bottom: calc(max(4px, env(safe-area-inset-bottom)) + 20px); }
  .copyright { left: 0; right: 0; bottom: max(4px, env(safe-area-inset-bottom)); font-size: 9.5px; text-align: center; }
  .touch-stick { bottom: calc(max(4px, env(safe-area-inset-bottom)) + 88px); }
  /* (the settings open over the whole screen: the bottom buttons hidden under it, its rows' names kept whole, the load
     tag under a long one, the icons and gaps smaller: at 375 px 「時刻が進む」 broke in two) */
  body:has(.settings:not([data-view="closed"])) :is(.walk-switch, .ripples-switch) { visibility: hidden; }
  .set-feature { gap: 8px; padding: 5px 4px; }
  .set-feature-icon { width: 32px; height: 32px; border-radius: 10px; }
  .set-feature-icon svg { width: 20px; height: 20px; }
  .set-feature-name { flex-wrap: wrap; row-gap: 0; word-break: keep-all; }
  /* (the details: their sections a strip across the top, scrolled sideways (fading at its right end where more are), the
     open one underlined; each row the panel's width, its hint under its name, its slider, − value + and reset on one line
     a little smaller; the head's graph left out: at 375 px the column of sections left the rows 150 px, their names broken
     a character a line and the sliders gone) */
  .set-detail .set-head { gap: 8px; min-height: 60px; padding: 0 12px 0 6px; }
  .set-detail .set-head .set-spark { display: none; }
  /* (at 360 px the English 「More settings」 left the frame time's 「ms」 a line of its own) */
  .set-head h2 { font-size: 18px; letter-spacing: .08em; }
  .set-fps-head .set-fps-ms { white-space: nowrap; }
  .set-columns { flex-direction: column; }
  .set-tabs { flex: 0 0 auto; flex-direction: row; gap: 2px; padding: 6px 28px 6px 8px; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgb(var(--paper-rgb) / .1); scrollbar-width: none; -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
  .set-tabs::-webkit-scrollbar { display: none; }
  .set-tab { flex: 0 0 auto; gap: 6px; height: 40px; padding: 0 10px; font-size: 13px; white-space: nowrap; }
  .set-tab svg { width: 18px; height: 18px; }
  .set-tab[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--accent); }
  .set-tabs .set-gap { display: none; }
  .set-tabs-note { flex: 0 0 auto; align-self: center; padding: 0 4px; white-space: nowrap; }
  .set-main { min-height: 0; padding: 10px 14px 12px; }
  .set-row { padding: 12px 0 13px; }
  .set-row:not(.set-row-switch) .set-row-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .set-row-hint { text-align: left; }
  .set-row-controls { gap: 6px; }
  .set-slider { min-width: 0; }
  .set-step, .set-reset { width: 32px; height: 32px; }
  .set-field { width: 74px; padding: 0 8px; }
  .set-foot { padding-top: 10px; }
  .set-reset-all { flex: 0 0 auto; padding: 0 12px; white-space: nowrap; }
  /* (the walk switch's buttons narrower, kept at the middle: at 360 px the English 「Fly | Walk」 lay 4 px over the English
     音紋 (moved right, it would lie over the jump button while walking); under 340 px their icons left out) */
  .walk-switch button { padding: 0 12px; }
}
/* (under 340 px, as on the first iPhone SE's 320: the frame rate's chip left out (it lay over the scene's name), the
   details' frame time too (its head ran out of the panel), a slider a line of its own (beside − value + it was 65 px)) */
@media (max-width: 340px) {
  .walk-switch button { gap: 0; }
  .walk-switch button svg { display: none; }
  .set-chip { display: none; }
  .set-fps-head .set-fps-ms { display: none; }
  .set-row-controls { flex-wrap: wrap; row-gap: 2px; justify-content: flex-end; }
  .set-slider { flex: 1 0 100%; }
}

/* the settings by genre (2026-11-15): a group's name over its features, a line between the tabs' parts and a tab's kinds */
.set-group { display: flex; align-items: center; gap: 10px; margin: 10px 8px 2px; font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--dim); list-style: none; }
.set-group::after { content: ''; flex: 1 1 auto; height: 1px; background: rgb(var(--paper-rgb) / .14); }
.set-group:first-child { margin-top: 2px; }
.set-tab-sep { flex: 0 0 auto; height: 1px; margin: 4px 10px; background: rgb(var(--paper-rgb) / .14); }
.set-row-sep { height: 0; margin: 10px 0 0; border-top: 1px solid rgb(var(--paper-rgb) / .22); list-style: none; }
@media (max-width: 560px) {
  .set-group { margin: 8px 4px 2px; }
  .set-tab-sep { width: 1px; height: 24px; margin: 0 4px; align-self: center; }
}
