/* The top-right HUD and the Settings menu (Dodd, 2026-10-25: "the UI in the top right is a big mess... a weird
   rainbow ball"). One dark plate up top: sent today with a thin progress bar, the reply rate (opens Replied), who's
   here (live.js fills .who-am-i), music and a gear. Settings is a fixed-size game-style panel: its tabs down the
   side (Look and Sound, plus Testing on a test copy; #163 Dodd 10-26: three tabs only, Leads and Help moved to
   Profile > Account) with one lit plate that slides between them, pages laid out like Dodd's Mainframe settings
   (round 5), Done at the bottom.
   Loaded after mvp.css; live.css comes after this, so presence rules here carry an extra class. */

/* ---------- the HUD plate ---------- */
.top { align-items: flex-start; position: relative; z-index: 6; } /* above the stage, so Home's drop-downs (#85, home.css) open over it */
.hud-col { position: relative; min-width: 0; }
.hud { display: flex; align-items: stretch; height: 58px; padding: 0 7px 0 2px; border-radius: var(--r-lg); text-shadow: none;
  background: var(--grain) 0 0 / 160px, var(--surface);
  box-shadow: var(--edge-hi), var(--shadow-1);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hud > * + * { border-left: 1px solid var(--line); }
.hud :focus-visible { outline-offset: -3px; }

.hud-stat { position: relative; display: grid; align-content: center; gap: 4px; min-width: 96px; padding: 0 18px; border: 0; background: none; text-align: left; color: var(--bone); }
.hud-num { font: 400 21px/1 var(--display, var(--serif)); color: #fff; font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.hud-num small { font: 500 13px/1 var(--sans); color: var(--bone-3); }
.hud-label { font: 500 12px/1 var(--sans); letter-spacing: .02em; color: var(--bone-2); white-space: nowrap; }
.hud-meter { position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0; background: rgba(236, 228, 216, .12); overflow: hidden; }
.hud-meter i { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: var(--red-hi); box-shadow: 0 0 8px var(--red-hi); transition: transform .5s var(--ease); }
.hud-link { cursor: pointer; transition: background-color .15s ease; }
.hud-link:active { background-color: rgba(236, 228, 216, .1); }
@media (hover: hover) and (pointer: fine) { .hud-link:hover { background-color: rgba(236, 228, 216, .06); } .hud-link:hover .hud-label { color: #fff; } }

/* presence: just a dot and a word, inside the plate (the pill styling from style.css / live.css is undone here) */
.hud .who-am-i { display: flex; align-items: center; padding: 0 16px; gap: 0; color: var(--bone-2); }
.hud .who-am-i:empty { display: none; }
.hud .who-am-i .jl-status { display: inline-flex; align-items: center; max-width: 170px; margin: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none;
  font: 500 13px/1.2 var(--sans); letter-spacing: .01em; text-transform: none; color: var(--bone-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hud .who-am-i .jl-status::before { flex: none; width: 8px; height: 8px; margin-right: 9px; vertical-align: 0; }

/* music and settings: 44px icon buttons */
.hud-acts { display: flex; align-items: center; gap: 2px; padding-left: 6px; }
.hud-btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--r-md); background: transparent; color: var(--bone-2);
  transition: color .15s ease, background-color .15s ease, transform .16s var(--ease); }
.hud-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.hud-btn:active { transform: scale(.94); }
@media (hover: hover) and (pointer: fine) {
  .hud-btn:hover { color: #fff; background-color: rgba(236, 228, 216, .08); }
  #settingsBtn:hover svg { transform: rotate(45deg); }
}
#musicBtn .hud-off { stroke-width: 1.9; }
#musicBtn[aria-pressed="false"] { color: var(--bone-3); }
#musicBtn[aria-pressed="true"] { color: var(--bone); }
#musicBtn[aria-pressed="true"] .hud-off { display: none; }
#settingsBtn[aria-expanded="true"] { color: #fff; background-color: rgba(236, 228, 216, .1); }

body[data-theme="holo"] .hud-meter i { background: linear-gradient(90deg, #cfd8ff, #f2dcff); box-shadow: 0 0 8px rgba(190, 210, 255, .6); }

@media (max-width: 1100px) { .hud .who-am-i .jl-status { max-width: 140px; } }
@media (max-width: 860px) {
  .top { justify-content: stretch; }
  .hud-col { width: 100%; }
  .hud { width: 100%; }
  .hud-stat { flex: 1 1 0; min-width: 0; padding: 0 14px; }
}
@media (max-width: 600px) {
  .hud .who-am-i { padding: 0 14px; }
  .hud .who-am-i .jl-status { display: inline-flex !important; width: 8px; font-size: 0; } /* the dot only; the words are its tooltip */
  .hud .who-am-i .jl-status::before { margin: 0; }
  .hud-num { font-size: 19px; }
}

/* ---------- the Settings panel ----------
   Round 5 (after Dodd's Mainframe settings, mission-control ui/prefs.*): tabs down the left, and each page a Caslon
   title, one line, then sections: an h4, a hint, and either tiles (Themes, Scenes) or a plate of rows (name + what it
   does on the left, the control on the right). In IRIS's look: dark grained plates, bone ink, the tier colours. */
.set-sheet { padding: 16px; }
.set-panel { width: min(1280px, 100%); height: min(840px, calc(100vh - 32px)); height: min(840px, calc(100dvh - 32px)); padding: 0; gap: 0; overflow: hidden;
  display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; grid-template-areas: "head head" "tabs body" "foot foot";
  border-radius: var(--r-lg); background: var(--grain) 0 0 / 160px, var(--surface-solid);
  box-shadow: var(--edge-hi), var(--shadow-3); } /* its moves in and out: transitions.css */
.set-panel :focus-visible { outline-offset: 2px; }

.set-head { grid-area: head; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 22px 20px 36px; border-bottom: 1px solid var(--line); }
.set-head h2 { margin: 0; font-size: 38px; line-height: 1.1; color: #fff; }

.set-tabs { grid-area: tabs; position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 14px 22px 0; border-right: 1px solid var(--line); background: rgba(0, 0, 0, .2); }
.set-tabs [role=tab] { position: relative; z-index: 1; min-height: 60px; padding: 0 18px 0 34px; border: 0; border-radius: 0 10px 10px 0; background: none; text-align: left;
  font: var(--display-weight, 400) 26px/1.1 var(--display, var(--serif)); letter-spacing: var(--display-track, 0); color: var(--bone-2); transition: color .15s ease; }
.set-tabs [role=tab]:focus-visible { outline: 1.5px solid rgba(236, 228, 216, .45); outline-offset: -4px; }
.set-tabs [role=tab][aria-selected="true"] { color: #fff; }
@media (hover: hover) and (pointer: fine) { .set-tabs [role=tab]:hover { color: #fff; } }
/* the lit plate (app.js moves it): the same red wash and bar as the desk's main menu */
.set-lit { position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; pointer-events: none; border-radius: 0 8px 8px 0;
  background: linear-gradient(90deg, rgba(120, 30, 36, .55), rgba(40, 16, 19, .15)); transition: transform .18s var(--ease); }
.set-lit::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--red-hi); box-shadow: 0 0 10px var(--red-hi); }
html[data-skin] .set-lit { background: linear-gradient(90deg, color-mix(in oklab, var(--skin) 34%, transparent), transparent); }
body[data-theme="holo"] .set-lit { background: linear-gradient(90deg, rgba(150, 165, 210, .22), rgba(20, 20, 28, .05)); }
body[data-theme="holo"] .set-lit::before { background: linear-gradient(180deg, #ffc7e6, #c9f3ff 50%, #e2d4ff); box-shadow: 0 0 10px rgba(170, 200, 255, .6); }

.set-body { grid-area: body; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 44px 40px; scrollbar-width: thin; scrollbar-color: var(--line-hi) transparent; }

/* a page: title, line, sections */
.set-h { margin: 22px 0 4px; font: 400 36px/1.1 var(--serif); letter-spacing: -.01em; color: #fff; }
.set-panel .set-sub { margin: 0 0 4px; font: 400 18px/1.55 var(--sans); color: var(--bone-3); max-width: 66ch; } /* (.set-panel: style.css's .sheet-box p would win) */
.set-sec { margin-top: 36px; }
.set-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.set-sec-head h4 { margin: 0; font: 400 26px/1.2 var(--serif); color: var(--bone); }
.set-sec-sub { margin-top: 24px; }
.set-sec-sub h4 { font-size: 21px; color: var(--bone-2); }
.set-count { font: 600 16px/1 var(--sans); color: var(--bone-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.set-panel .set-hint { margin: 8px 0 20px; font: 400 16px/1.55 var(--sans); color: var(--bone-3); max-width: 68ch; }

/* a plate of rows */
.set-rows { margin-top: 22px; padding: 0 28px; border-radius: var(--r-lg); background: rgba(0, 0, 0, .24); box-shadow: var(--edge); }
.set-sec .set-rows { margin-top: 14px; }
.set-panel .set-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px; min-height: 92px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.set-panel .set-row:last-child { border-bottom: 0; }
.set-panel .set-row > span:first-child { font: 600 19px/1.3 var(--sans); color: var(--bone); flex: 1 1 280px; text-align: left; } /* QA: a long label no longer pushes its switch onto a line of its own */
.set-panel .set-row > span small { display: block; margin-top: 5px; font-size: 16px; font-weight: 500; line-height: 1.45; color: var(--bone-3); }

/* segmented pickers */
.set-panel .seg { display: inline-flex; }
.set-panel .seg button { min-height: 48px; padding: 0 20px; font-size: 17px; }
.set-panel .seg button[aria-pressed="true"] { background: var(--bone); color: var(--black); box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 2px 8px rgba(0, 0, 0, .4); }
.set-panel .seg button:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .set-panel .seg button:not([aria-pressed="true"]):hover { color: #fff; background: rgba(236, 228, 216, .07); } }

/* on/off switches (app.js still writes On / Off into them) */
.set-panel .toggle { position: relative; display: inline-flex; align-items: center; min-width: 116px; min-height: 52px; padding: 0 20px 0 72px; border-radius: 999px;
  background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px var(--line-hi); color: var(--bone-2); font: 600 17px/1 var(--sans); transition: color .15s ease; }
.set-panel .toggle::before { content: ""; position: absolute; left: 12px; top: 50%; width: 46px; height: 26px; margin-top: -13px; border-radius: 13px; background: rgba(236, 228, 216, .14); transition: background-color .18s ease; }
.set-panel .toggle::after { content: ""; position: absolute; left: 16px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--bone-3); transition: transform .18s var(--ease), background-color .18s ease; }
.set-panel .toggle[aria-pressed="true"] { background: rgba(0, 0, 0, .4); color: #fff; }
.set-panel .toggle[aria-pressed="true"]::before { background: var(--red-hi); }
.set-panel .toggle[aria-pressed="true"]::after { transform: translateX(20px); background: #fff; }
body[data-theme="holo"] .set-panel .toggle[aria-pressed="true"]::before { background: #aab4d6; }
.set-panel .toggle:active { transform: scale(.97); }

.set-panel .set-acts { gap: 8px; }
.set-panel .textlink { min-height: 52px; padding: 0 18px; border-radius: var(--r-md); font: 600 17px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--bone-2); }
@media (hover: hover) and (pointer: fine) { .set-panel .textlink:hover { background: rgba(236, 228, 216, .07); } }
.set-panel .set-row .btn { min-height: 52px; padding: 0 24px; font-size: 17px; }

/* ---------- Look > Themes: a collection of tiles ---------- */
.th-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; }
.th-tile { position: relative; display: grid; grid-template-rows: auto 1fr; padding: 0; border: 0; border-radius: var(--r-lg); overflow: hidden; text-align: left; color: var(--bone); cursor: pointer;
  background: rgba(0, 0, 0, .3); box-shadow: var(--edge), 0 10px 24px -14px rgba(0, 0, 0, .8);
  transition: transform .18s var(--ease), box-shadow .18s ease; }
.th-tile:focus-visible { outline: 2px solid var(--bone); outline-offset: 3px; }
.th-tile:active { transform: scale(.98); }
@media (hover: hover) and (pointer: fine) {
  .th-tile:hover { transform: translateY(-2px); box-shadow: var(--edge-hi), 0 16px 30px -14px rgba(0, 0, 0, .9); }
  .th-tile:hover .th-art img { transform: scale(1.06); }
}
.th-tile[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--sw) 55%, #fff), 0 0 0 1px rgba(0, 0, 0, .6), 0 14px 34px -14px color-mix(in oklab, var(--sw) 70%, transparent); }
/* the picture: a little desk in that theme, over Atlas's hall: the menu with its light, the main button */
.th-art { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0809; }
.th-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; filter: grayscale(1) brightness(.62) contrast(1.15); transition: transform .5s var(--ease); }
.th-wash { position: absolute; inset: 0; background: var(--sw); mix-blend-mode: color; opacity: .85; }
.th-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5, 3, 4, .78), rgba(5, 3, 4, .1) 46%), linear-gradient(0deg, rgba(5, 3, 4, .55), transparent 45%); }
.th-art.is-holo .th-wash { background: linear-gradient(115deg, #e8a9b4, #d8b56c 25%, #86b399 50%, #7fa6d3 75%, #ab8fd8); mix-blend-mode: soft-light; opacity: 1; }
.th-art.is-holo img { filter: grayscale(1) brightness(.42) contrast(1.25); }
.th-menu { position: absolute; z-index: 1; left: 9%; top: 24%; display: grid; gap: 7px; }
.th-menu b { display: block; width: 30px; height: 4px; border-radius: 2px; background: rgba(236, 228, 216, .3); }
.th-menu b:first-child { width: 36px; background: var(--sw); box-shadow: 0 0 8px var(--sw); }
.th-art.is-holo .th-menu b:first-child { background: linear-gradient(90deg, #ffc7e6, #c9f3ff 50%, #e2d4ff); box-shadow: 0 0 8px rgba(190, 210, 255, .7); }
.th-key { position: absolute; z-index: 1; right: 9%; bottom: 13%; width: 34%; height: 15%; border-radius: 4px; background: var(--sw);
  box-shadow: inset 0 1px 0 rgba(255, 240, 225, .35), 0 4px 14px -2px color-mix(in oklab, var(--sw) 70%, transparent); }
.th-art.is-holo .th-key { background: linear-gradient(115deg, #e8a9b4, #d8b56c 25%, #86b399 50%, #7fa6d3 75%, #ab8fd8); }
.th-info { display: grid; align-content: start; gap: 3px; padding: 12px 14px 16px; }
.th-rar { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 2px; font: 600 15px/1 var(--sans); letter-spacing: .02em; color: var(--rc); }
.th-rar i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--rc); box-shadow: 0 0 6px color-mix(in oklab, var(--rc) 70%, transparent); }
.th-name { font: 400 21px/1.2 var(--serif); color: #fff; }
.th-where { font-size: 15px; line-height: 1.35; color: var(--bone-2); }
.th-when { font-size: 15px; line-height: 1.35; color: var(--bone-3); }
.th-on { position: absolute; z-index: 2; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px 5px 7px; border-radius: 999px;
  font: 600 15px/1 var(--sans); color: #fff; background: rgba(8, 6, 7, .8); box-shadow: inset 0 0 0 1px var(--line-hi); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.th-on svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
/* still to collect: greyed, a lock, how to get it */
.th-tile.is-locked { cursor: default; background: rgba(0, 0, 0, .2); }
.th-tile.is-locked .th-art img { filter: grayscale(1) brightness(.3) contrast(1.1); }
.th-tile.is-locked .th-wash { opacity: .5; } /* (enough colour to see what you're collecting) */
.th-tile.is-locked :is(.th-menu, .th-key) { opacity: .6; filter: saturate(.75); }
.th-tile.is-locked .th-name { color: var(--bone-2); }
.th-tile.is-locked .th-rar { opacity: .75; }
.th-lock { position: absolute; z-index: 2; left: 50%; top: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  color: var(--bone-2); background: rgba(8, 6, 7, .72); box-shadow: inset 0 0 0 1px var(--line-hi); }
.th-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) and (pointer: fine) { .th-tile.is-locked:hover { transform: none; box-shadow: var(--edge-hi); } .th-tile.is-locked:hover .th-art img { transform: none; } }
.th-tile.th-deny { animation: th-deny .26s ease-out; }
@keyframes th-deny { 20% { translate: -4px 0; } 45% { translate: 4px 0; } 70% { translate: -2px 0; } }
.set-more { margin-top: 14px; min-height: 50px; padding: 0 20px; border: 0; border-radius: var(--r-md); font: 600 17px/1 var(--sans); color: var(--bone-2);
  background: rgba(236, 228, 216, .05); box-shadow: inset 0 0 0 1px var(--line); transition: background-color .15s ease, color .15s ease; }
.set-more:active { transform: scale(.97); }
@media (hover: hover) and (pointer: fine) { .set-more:hover { color: #fff; background: rgba(236, 228, 216, .09); } }

/* ---------- Look > Scenes: the sets ---------- */
.sc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.sc-set { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; border-radius: var(--r-lg); overflow: hidden; background: rgba(0, 0, 0, .3); box-shadow: var(--edge); }
button.sc-set { font: inherit; color: inherit; text-align: left; border: 0; padding: 0; width: 100%; cursor: pointer; transition: box-shadow .2s var(--ease-out, ease), transform .2s var(--ease-out, ease); }
button.sc-set:hover:not(.is-on) { box-shadow: inset 0 0 0 1px rgba(236, 228, 216, .3), var(--edge); transform: translateY(-1px); }
button.sc-set:focus-visible { outline: 2px solid var(--bone, #ece4d8); outline-offset: 2px; }
.sc-set.is-on { box-shadow: inset 0 0 0 1.5px rgba(236, 228, 216, .55), 0 0 0 1px rgba(0, 0, 0, .6), 0 14px 34px -16px rgba(0, 0, 0, .9); }
.sc-strip { display: flex; gap: 2px; height: 130px; background: #050304; }
.sc-strip img { flex: 1 1 0; min-width: 0; height: 100%; object-fit: cover; filter: brightness(.82) contrast(1.05); }
.sc-set.is-coming .sc-strip { align-items: center; justify-content: center; background: radial-gradient(80% 120% at 50% 0%, rgba(236, 228, 216, .07), transparent 70%), #0a0708; }
.sc-soon { display: inline-flex; align-items: center; gap: 8px; font: 600 16px/1 var(--sans); font-style: normal; color: var(--bone-3); }
.sc-soon svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* scoped to .sc-set: showcase.css has its own .sc-info (56px top padding, flex) that was leaking in and spacing the tiles out */
.sc-set .sc-info { display: grid; align-content: start; justify-content: stretch; gap: 4px; padding: 14px 16px 18px; min-height: 0; overflow: visible; }
.sc-set .sc-info b { font: 400 21px/1.2 var(--serif); color: #fff; }
.sc-set .sc-info span { font-size: 16px; line-height: 1.45; color: var(--bone-2); }
.sc-set .sc-info .sc-names { font-size: 15px; color: var(--bone-3); }
.sc-set.is-coming .sc-info b { color: var(--bone-2); }
.sc-set.is-coming .sc-info span { color: var(--bone-3); }

/* ---------- Sound: three sliders ---------- */
.vol { display: inline-flex; align-items: center; gap: 18px; }
.vol output { min-width: 56px; text-align: right; font: 600 17px/1 var(--sans); color: var(--bone-2); font-variant-numeric: tabular-nums; }
.vol input[type=range] { --v: 60%; --fill: var(--red-hi); width: min(380px, 46vw); height: 52px; margin: 0; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
html[data-skin] .vol input[type=range] { --fill: var(--red-hi); }
body[data-theme="holo"] .vol input[type=range] { --fill: #c8d2f2; }
.vol input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--fill) var(--v), rgba(236, 228, 216, .16) var(--v)); }
.vol input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(236, 228, 216, .16); }
.vol input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--fill); }
.vol input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--bone);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .55); transition: transform .12s var(--ease); }
.vol input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5), 0 2px 8px rgba(0, 0, 0, .55); }
.vol input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.vol input[type=range]:focus-visible { outline: none; }
.vol input[type=range]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(236, 228, 216, .35), 0 2px 8px rgba(0, 0, 0, .55); }
.vol input[type=range]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px rgba(236, 228, 216, .35); }

.set-foot { grid-area: foot; display: flex; justify-content: flex-end; padding: 18px 28px; border-top: 1px solid var(--line); background: rgba(0, 0, 0, .18); }
.set-foot .btn { min-height: 52px; min-width: 150px; font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  .th-tile, .th-art img { transition: none; }
  .th-tile.th-deny { animation: none; }
}

/* phones: tabs across the top, controls under their names */
@media (max-width: 640px) {
  .set-sheet { padding: 10px; }
  .set-panel { height: calc(100vh - 20px); height: calc(100dvh - 20px); grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr) auto;
    grid-template-areas: "head" "tabs" "body" "foot"; }
  .set-head { padding: 12px 10px 12px 20px; }
  .set-head h2 { font-size: 28px; }
  .set-tabs { flex-direction: row; gap: 0; padding: 0 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .set-tabs [role=tab] { flex: 1 1 0; min-width: 0; padding: 0 4px; border-radius: 0; text-align: center; font-size: 19px; min-height: 54px; }
  .set-lit { border-radius: 0; background: linear-gradient(0deg, rgba(120, 30, 36, .5), rgba(40, 16, 19, 0)); }
  body[data-theme="holo"] .set-lit { background: linear-gradient(0deg, rgba(150, 165, 210, .24), rgba(20, 20, 28, 0)); }
  .set-lit::before { top: auto; bottom: 0; left: 10px; right: 10px; width: auto; height: 2px; }
  body[data-theme="holo"] .set-lit::before { background: linear-gradient(90deg, #ffc7e6, #c9f3ff 50%, #e2d4ff); }
  .set-body { padding: 0 16px 26px; }
  .set-h { margin-top: 18px; font-size: 28px; }
  .set-rows { padding: 0 16px; }
  .set-panel .set-row { min-height: 72px; padding: 16px 0; }
  .set-panel .set-row .seg { display: flex; width: 100%; }
  .set-panel .set-row .seg button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .set-panel .set-row .btn { width: 100%; }
  .th-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .th-info { padding: 9px 10px 11px; }
  .th-name { font-size: 18px; }
  .sc-grid { grid-template-columns: minmax(0, 1fr); }
  .vol { width: 100%; }
  .vol input[type=range] { flex: 1 1 auto; width: auto; }
  .set-foot { padding: 10px 12px; }
  .set-foot .btn { width: 100%; }
}

/* Settings > Testing (board #150): every test tool in one tab, on a test copy only (IRISTest.tools). A green status line
   says where you are now; buttons sit in a row on the right of their name; the risky ones are outlined red, and "Start
   over" asks inside its own row first. */
.set-panel .tst-now { margin: 14px 0 0; padding: 14px 18px; border-radius: var(--r-md); font: 600 16px/1.5 var(--sans); color: #b9e8cb;
  background: rgba(14, 34, 24, .55); box-shadow: inset 0 0 0 1px rgba(143, 220, 174, .26); font-variant-numeric: tabular-nums; }
.set-panel .tst-now:empty { display: none; }
.tst-acts { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.tst-num input { width: 110px; height: 52px; padding: 0 14px; font-size: 17px; border: 0; border-radius: var(--r-md); background: rgba(0, 0, 0, .4); box-shadow: inset 0 0 0 1px var(--line-hi);
  color: var(--bone); font: 600 17px/1 var(--sans); font-variant-numeric: tabular-nums; }
.tst-select select { min-width: 260px; height: 52px; padding: 0 40px 0 16px; font-size: 17px; border: 0; border-radius: var(--r-md); appearance: none; cursor: pointer;
  background: rgba(0, 0, 0, .4) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d8cfc1' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
  box-shadow: inset 0 0 0 1px var(--line-hi); color: var(--bone); font: 600 17px/1 var(--sans); }
.tst-select select option { background: #141011; color: var(--bone); }
.tst-num input:focus-visible, .tst-select select:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }
.set-panel .tst-danger { color: #ffb4ab; box-shadow: inset 0 0 0 1px rgba(214, 40, 50, .55); }
@media (hover: hover) and (pointer: fine) { .set-panel .tst-danger:hover { background: rgba(120, 14, 22, .35); color: #fff; } }
.tst-confirm { flex: 1 1 100%; display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--r-md); background: rgba(70, 8, 14, .38); box-shadow: inset 0 0 0 1px rgba(214, 40, 50, .4); }
.tst-confirm:not([hidden]) { animation: t-rise 220ms var(--ease) both; }
.set-panel .tst-confirm p { margin: 0; font: 400 16px/1.55 var(--sans); color: var(--bone-2); max-width: 70ch; }
.set-panel .tst-confirm b { color: var(--bone); }
.tst-confirm .tst-acts { justify-content: flex-start; }
@media (max-width: 640px) {
  /* two to a line, not one tall button each (the phone's .set-row .btn is full width) */
  .tst-acts { width: 100%; justify-content: stretch; }
  .set-panel .tst-acts > .btn { flex: 1 1 calc(50% - 4px); width: auto; min-width: 0; padding: 0 10px; }
  .tst-num { flex: 1 1 calc(50% - 4px); min-width: 0; }
  .tst-num input { width: 100%; }
  .tst-select, .tst-select select { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tst-confirm:not([hidden]) { animation: none; } }
/* a scene set that isn't yours (only when themes.js SCENES_ALL_FREE is off) */
.sc-set.is-locked { opacity: .55; filter: saturate(.5); cursor: not-allowed; }
/* #157 Testing, simpler: the rarely needed tools fold away under "More test tools"; Give packs is a type, a count, Give */
.tst-more > summary { list-style: none; cursor: pointer; align-items: center; padding: 6px 0; border-radius: var(--r-md); }
.tst-more > summary::-webkit-details-marker { display: none; }
.tst-more > summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-right: 8px; border-right: 2px solid var(--bone-2); border-bottom: 2px solid var(--bone-2);
  rotate: 45deg; translate: 0 -3px; transition: rotate .2s var(--ease), translate .2s var(--ease); }
.tst-more[open] > summary::after { rotate: 225deg; translate: 0 2px; }
@media (hover: hover) and (pointer: fine) { .tst-more > summary:hover h4 { color: #fff; } }
.tst-more > summary:focus-visible { outline: 2px solid var(--bone); outline-offset: 4px; }
.tst-more[open] > .set-rows { animation: t-rise 220ms var(--ease) both; }
.tst-give .tst-select select { min-width: 180px; }
.tst-give .tst-num input { width: 90px; }
.set-row.tst-screens { flex-wrap: wrap; row-gap: 10px; }
.set-row.tst-screens > .tst-acts { flex: 1 1 100%; justify-content: flex-start; }
@media (max-width: 640px) { .tst-give .tst-select { flex: 1 1 100%; } .tst-give .tst-num { flex: 1 1 calc(50% - 4px); } }
@media (prefers-reduced-motion: reduce) { .tst-more > summary::after { transition: none; } .tst-more[open] > .set-rows { animation: none; } }

/* the "Manage in your Locker" tile is styled in inventory.css; bring it up to the bigger Settings sizes (board #217) */
.set-panel .th-manage-in b { font-size: 23px; }
.set-panel .th-manage-in span { font-size: 15px; }

.music-controls{display:flex;align-items:center;gap:8px;max-width:100%;}.music-controls select{min-width:0;width:220px;max-width:100%;padding:12px;background:var(--ink,#121012);color:var(--bone);border:1px solid #655948;border-radius:7px;font:inherit;}.music-controls .btn{min-width:42px;padding:8px;font-size:25px;}@media(max-width:640px){.music-picker{flex-wrap:wrap}.music-controls{width:100%}.music-controls select{flex:1;width:0}}

.set-panel .music-controls{display:grid;grid-template-columns:44px minmax(150px,220px) 44px;align-items:center;gap:8px}.set-panel .music-controls .btn{width:44px;min-width:44px;padding:0;min-height:48px}.set-panel .music-controls select{width:100%;min-width:0;height:48px}@media(max-width:640px){.set-panel .music-controls{width:100%;grid-template-columns:44px minmax(0,1fr) 44px}}
