/* OMG in Velvonte's identity. Layout lineage: Velvet Signal Ledger (Apache-2.0, see NOTICE.txt). */
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--panel); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); background: var(--panel);
  font: 400 1rem/1.5 var(--font-ui); font-optical-sizing: auto; text-rendering: optimizeLegibility;
}
button, input, select { font: inherit; color: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.mono { font-family: var(--font-data); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 20; top: -6rem; left: 1rem; padding: .75rem 1rem; border-radius: var(--radius-control); background: var(--surface); color: var(--cobalt); font-weight: 600; }
.skip-link:focus { top: 1rem; }

/* Header: the cabinet's bakelite rail. */
.sl-header { background: var(--ink); color: var(--surface); border-bottom: 3px solid var(--brass); }
.sl-header__inner { display: flex; min-height: 4.25rem; max-width: calc(var(--content) + 3rem); margin: auto; padding: .625rem 1.5rem; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: inherit; text-decoration: none; }
.brand img { width: 2.5rem; height: auto; }
.brand-copy { display: flex; align-items: baseline; gap: .625rem; line-height: 1; }
.brand-name { font: 700 1.625rem/1 var(--font-stamp); letter-spacing: .04em; color: var(--brass-light); }
.brand-tagline { color: color-mix(in srgb, var(--surface) 62%, transparent); font-size: .75rem; letter-spacing: .02em; }
nav { align-self: stretch; display: flex; align-items: center; }
.nav-link { position: relative; color: var(--surface); font-size: .875rem; font-weight: 600; text-decoration: none; padding: .75rem 0; }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: .35rem; height: 2px; background: var(--brass); }
.sl-header__inner > .status { margin-left: auto; border-color: transparent; }

/* Lamps */
.status { display: inline-flex; min-height: 1.875rem; align-items: center; padding: .2rem .7rem .2rem .55rem; border: 1px solid transparent; border-radius: 999px; gap: .5rem; white-space: nowrap; font-size: .75rem; font-weight: 600; }
.status-dot { width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent), 0 0 8px color-mix(in srgb, currentColor 55%, transparent); }
.tone-live { color: var(--lamp-live); background: var(--lamp-live-soft); }
.tone-ban { color: var(--lamp-ban); background: var(--lamp-ban-soft); }
.tone-amber { color: var(--lamp-amber); background: var(--lamp-amber-soft); }
.tone-teal { color: var(--lamp-teal); background: var(--lamp-teal-soft); }
.tone-blue { color: var(--lamp-blue); background: var(--lamp-blue-soft); }
.tone-off { color: var(--lamp-off); background: var(--lamp-off-soft); }
.tone-off .status-dot { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent); }
.dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.live { color: var(--lamp-live); } .teal { color: var(--lamp-teal); } .blue { color: var(--lamp-blue); }
.ban { color: var(--lamp-ban); } .amber { color: var(--lamp-amber); } .off { color: var(--lamp-off); }

/* Page frame */
.main { width: min(calc(100% - 3rem), var(--content)); margin: auto; padding: 2.75rem 0 2rem; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; padding: 0 0 2rem; }
.eyebrow { margin: 0 0 .5rem; color: var(--ink-soft); font: .75rem/1.4 var(--font-data); letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 0; font: 700 clamp(2.75rem, 7vw, 5rem)/.9 var(--font-stamp); letter-spacing: .01em; text-transform: uppercase; }
.page-copy { max-width: 34rem; margin: .875rem 0 0; color: var(--ink-soft); font-size: 1rem; }
.refresh-block { flex-shrink: 0; text-align: right; }
.refresh-caption { color: var(--ink-soft); font-size: .75rem; margin: .5rem 0 0; }

/* Controls */
.button { display: inline-flex; min-height: 2.75rem; padding: .5rem 1rem; align-items: center; justify-content: center; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); gap: .5rem; background: var(--surface); color: var(--ink); font-size: .875rem; font-weight: 600; box-shadow: 0 1px 0 rgba(27, 33, 31, .06); transition: background-color var(--motion-control) var(--ease), border-color var(--motion-control) var(--ease), transform var(--motion-fast) var(--ease); }
.button:not(:disabled):hover { border-color: var(--ink-faint); background: var(--surface-sunk); }
.button:not(:disabled):active { transform: translateY(1px); box-shadow: none; }
.button-primary { color: #fff; background: var(--cobalt); border-color: var(--cobalt); }
.button-primary:not(:disabled):hover { background: color-mix(in srgb, var(--cobalt) 86%, var(--ink)); border-color: color-mix(in srgb, var(--cobalt) 86%, var(--ink)); }
.button-icon { min-width: 2.75rem; padding: .5rem; font-size: 1.25rem; line-height: 1; }
.button[aria-busy="true"], .button[aria-busy="true"]:disabled { cursor: progress; opacity: 1; }
.icon { width: 1.125rem; height: 1.125rem; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
input, select { min-height: 2.75rem; border: 1px solid var(--rule-strong); border-radius: var(--radius-control); background: var(--surface); color: var(--ink); font-size: .875rem; }
input { width: 100%; padding: .625rem .875rem .625rem 2.5rem; }
input::placeholder { color: var(--ink-faint); }
select { padding: .5rem 2rem .5rem .75rem; max-width: 100%; }
.text-button { background: none; border: none; color: var(--cobalt); font-size: .8125rem; font-weight: 600; padding: .625rem 0; min-height: 2.75rem; text-decoration: underline; text-underline-offset: .2em; }

/* Cards */
.card { position: relative; min-width: 0; border: 1px solid var(--rule); border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow-card); }
h2 { margin: 0; font-size: 1.25rem; font-weight: 700; letter-spacing: -.01em; }
.inventory-heading { display: flex; justify-content: space-between; align-items: flex-end; padding: 1.25rem 1.5rem 1rem; gap: 1rem; }
.inventory-heading .eyebrow { margin-bottom: .25rem; }
.count-chip { display: inline-block; vertical-align: .15em; margin-left: .5rem; border-radius: .25rem; padding: .1rem .4rem; background: var(--surface-sunk); color: var(--ink-soft); font-size: .75rem; font-weight: 400; }
.record-note { display: flex; align-items: center; gap: .5rem; margin: 0; color: var(--ink-soft); font-size: .8125rem; }

/* Summary: a row of switch keys. Pressed keys sit down into the panel. */
.summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; margin-bottom: 1.5rem; padding: .5rem; background: var(--panel-deep); border-color: var(--rule-strong); box-shadow: inset 0 1px 2px rgba(27, 33, 31, .08); }
.summary-item { display: flex; flex-direction: column; align-items: flex-start; gap: .25rem; min-width: 0; border: 1px solid var(--rule); border-radius: calc(var(--radius-card) - .25rem); padding: .875rem 1rem; color: var(--ink); background: var(--surface); text-align: left; box-shadow: 0 2px 0 var(--rule-strong); transition: transform var(--motion-fast) var(--ease), box-shadow var(--motion-fast) var(--ease), background-color var(--motion-control) var(--ease); }
.summary-item:hover { background: #fff; }
.summary-item[aria-pressed="true"] { transform: translateY(2px); box-shadow: 0 0 0 var(--rule-strong), inset 0 0 0 2px var(--cobalt); background: var(--cobalt-soft); }
.summary-label { display: flex; align-items: center; gap: .45rem; font-size: .8125rem; font-weight: 600; }
.summary-value { font: 700 2.25rem/1 var(--font-stamp); letter-spacing: .02em; }
.summary-hint { color: var(--ink-soft); font-size: .75rem; }

/* Inventory table */
.inventory { overflow: hidden; }
.toolbar { display: flex; flex-wrap: wrap; gap: .625rem; padding: 0 1.5rem; }
.search-field { position: relative; flex: 1 1 18rem; }
.search-field .icon { position: absolute; top: .8125rem; left: .875rem; color: var(--ink-soft); }
.filter-caption { display: flex; min-height: 3rem; align-items: center; gap: 1rem; padding: 0 1.5rem; }
.filter-caption p { margin: 0; color: var(--ink-soft); font-size: .8125rem; }
.table-scroll { overflow: auto; min-height: 14rem; max-height: 38rem; border-top: 1px solid var(--rule); }
table { border-collapse: separate; border-spacing: 0; text-align: left; width: 100%; min-width: 900px; }
th { position: sticky; top: 0; z-index: 1; padding: .625rem 1rem; border-bottom: 1px solid var(--rule); color: var(--ink-soft); background: var(--surface-sunk); font: .6875rem/1.4 var(--font-data); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
th:first-child, td:first-child { padding-left: 1.5rem; }
th:last-child, td:last-child { padding-right: 1.5rem; }
td { padding: .75rem 1rem; border-bottom: 1px solid var(--rule); font-size: .875rem; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background-color var(--motion-fast) var(--ease); }
tbody tr:hover { background: color-mix(in srgb, var(--brass-light) 14%, var(--surface)); }
.number-column { width: 6.5rem; }
.column-sort { font: inherit; color: inherit; background: none; border: 0; padding: .25rem 0; letter-spacing: inherit; text-transform: inherit; text-align: left; white-space: nowrap; }
.column-sort:hover { color: var(--ink); }
th[aria-sort="ascending"], th[aria-sort="descending"], th[aria-sort="other"] { color: var(--cobalt); }
.sort-arrow { display: inline-block; min-width: 1.5em; margin-left: .25rem; }
.token-name { display: block; color: var(--ink); font-size: .9375rem; font-weight: 600; max-width: 19rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.token-id { display: block; margin-top: .125rem; color: var(--ink-faint); font-size: .6875rem; white-space: nowrap; }
.recorded-state { display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
.gateway-cell { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; }
.probe-note { color: var(--ink-faint); font-size: .6875rem; white-space: nowrap; }
.availability { display: flex; align-items: center; gap: .4rem; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.unavailable { color: var(--ink-faint); font-weight: 400; }
.date { color: var(--ink-soft); font-size: .75rem; white-space: nowrap; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: .25rem; }
.row-probe { min-height: 2.25rem; min-width: 5.75rem; padding: .25rem .75rem; font-size: .8125rem; }
.row-probe[aria-busy="true"], .row-probe[aria-busy="true"]:disabled { opacity: 1; cursor: progress; border-color: var(--lamp-amber); background: var(--lamp-amber-soft); color: var(--lamp-amber); }
.probe-note.is-running { color: var(--lamp-amber); font-weight: 600; }
.probe-note.is-error { color: var(--lamp-ban); font-weight: 600; }
.probe-note.is-changed { color: var(--lamp-live); font-weight: 600; }
.row-detail { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.75rem; padding: 0; background: none; border: 1px solid transparent; border-radius: var(--radius-control); color: var(--ink-soft); font-size: 1.125rem; }
.row-detail:hover { background: var(--cobalt-soft); color: var(--cobalt); border-color: color-mix(in srgb, var(--cobalt) 25%, transparent); }

/* Token number in a Velvonte frame: a 1px taupe rule around Saol numerals. */
.tag {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 4.25rem; height: 2rem; padding: 0 .625rem; border: 1px solid var(--brass); border-radius: 0;
  background: transparent; color: var(--ink); font: 300 1.25rem/1 var(--font-stamp); font-variant-numeric: tabular-nums;
}
.tag-empty { color: var(--ink-faint); border-color: var(--rule); }
.tag-banned { border-color: var(--rule); color: var(--ink-faint); text-decoration: line-through 1px var(--lamp-ban); }
.tag-large { min-width: 7.5rem; height: 4.25rem; padding: 0 1rem; font-size: 2.5rem; }

/* Empty, error, footer */
.empty { padding: 3.5rem 1.5rem; text-align: center; }
.empty-symbol { display: inline-flex; color: var(--ink-faint); font-size: 1.5rem; }
.empty h3 { margin: .75rem 0 .375rem; font-size: 1.125rem; font-weight: 700; }
.empty p { color: var(--ink-soft); margin: 0; font-size: .875rem; }
.alert { border: 1px solid color-mix(in srgb, var(--lamp-ban) 30%, var(--rule)); border-left: 4px solid var(--lamp-ban); border-radius: var(--radius-control); background: var(--lamp-ban-soft); color: color-mix(in srgb, var(--lamp-ban) 80%, var(--ink)); padding: .875rem 1.125rem; margin: 0 0 1.5rem; font-size: .875rem; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .75rem 1.5rem; border-top: 1px solid var(--rule); color: var(--ink-soft); font-size: .8125rem; background: var(--surface-sunk); }
.page-size, .page-controls { display: flex; align-items: center; gap: .625rem; }
.page-controls > span { margin-right: .5rem; }
.footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; padding: 1.5rem .25rem 0; color: var(--ink-soft); font-size: .75rem; }
.footer-brand { font: 700 1rem/1 var(--font-stamp); letter-spacing: .05em; color: var(--ink); }
.footer-brand span { margin-left: .5rem; font: 400 .75rem var(--font-ui); letter-spacing: 0; color: var(--ink-soft); }
.footer > span:last-child { display: flex; gap: .75rem; }

/* Videotheque */
.videotheque { margin-bottom: 1.5rem; overflow: hidden; }
.video-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding: 0 1.5rem; }
.video-card { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: stretch; border: 1px solid var(--rule); border-radius: calc(var(--radius-card) - .25rem); overflow: hidden; min-width: 0; background: var(--surface); }
.video-card:has([aria-pressed="true"]) { border-color: var(--cobalt); box-shadow: inset 0 0 0 1px var(--cobalt); }
.video-card video { width: 100%; height: 100%; min-height: 10rem; background: var(--stage); object-fit: contain; }
.video-card-copy { display: flex; flex-direction: column; align-items: flex-start; padding: .875rem 1rem; min-width: 0; }
.video-card h3 { margin: 0; font: 600 .9375rem/1.3 var(--font-ui); overflow-wrap: anywhere; }
.video-metadata { margin: .375rem 0 0; color: var(--ink-soft); font-size: .6875rem; }
.video-card .refresh-caption { margin-top: .375rem; }
.video-card .button { margin-top: auto; font-size: .8125rem; min-height: 2.5rem; }
.video-card .refresh-caption + .button { margin-top: .75rem; }
.video-card [aria-pressed="true"] { color: var(--cobalt); border-color: var(--cobalt); background: var(--cobalt-soft); }
.videotheque > .detail-note { margin: 1rem 1.5rem 1.25rem; }

/* Token dialog */
dialog { width: min(33rem, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); padding: 0 1.5rem 1.5rem; border: 0; border-radius: var(--radius-sheet); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-float); overflow-y: auto; }
dialog[open] { animation: lift var(--motion-control) var(--ease); }
@keyframes lift { from { opacity: 0; transform: translateY(.75rem); } }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(3px); }
#token-detail { width: min(68rem, calc(100% - 2rem)); }
.dialog-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0 -1.5rem; padding: .75rem 1.5rem; background: var(--surface); border-bottom: 1px solid var(--rule); }
.dialog-top .eyebrow { margin: 0; }
.detail-head { display: flex; align-items: center; gap: 1.25rem; margin: 1.25rem 0 1.25rem; min-width: 0; }
.detail-heading { min-width: 0; }
dialog h2 { font-size: clamp(1.375rem, 3vw, 1.875rem); line-height: 1.15; overflow-wrap: anywhere; }
.detail-subtitle { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: .5rem 0 0; color: var(--ink-soft); font-size: .875rem; }

/* Login check: a test bench beside the tag, visually separate from playback. */
.login-check { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: .75rem 1.5rem; margin: 0 0 1.5rem; padding: 1rem 1.25rem; border: 1px dashed var(--rule-strong); border-radius: var(--radius-card); background: var(--surface-sunk); }
.login-check h3 { margin: 0; font-size: .9375rem; font-weight: 700; }
.probe-last { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .5rem; margin: .375rem 0 .5rem; font-size: .875rem; }
.probe-last .refresh-caption { margin: 0; }
.login-check .refresh-caption { max-width: 40rem; }
.login-check-action { display: flex; flex-direction: column; align-items: flex-end; gap: .5rem; max-width: 22rem; }
.probe-result { margin: 0; font-size: .8125rem; text-align: right; }
.probe-result:empty { display: none; }
.probe-result.is-error { color: var(--lamp-ban); }
.probe-result.is-changed { color: var(--lamp-live); font-weight: 600; }
.login-check[aria-busy="true"] { border-style: solid; border-color: var(--lamp-amber); background: var(--lamp-amber-soft); }
.login-check[aria-busy="true"] #probe-account::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--brass-light); animation: blink 1s steps(2, jump-none) infinite; }
@keyframes blink { 50% { opacity: .2; } }

dl { margin: 0; }
.detail-field { padding: .75rem 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; }
dt { color: var(--ink-soft); font-size: .8125rem; } dd { margin: 0; font-size: .8125rem; overflow-wrap: anywhere; }
.detail-note { border-radius: var(--radius-control); border-left: 3px solid var(--brass); background: color-mix(in srgb, var(--brass-light) 18%, var(--surface)); color: var(--ink); font-size: .8125rem; padding: .75rem 1rem; margin: 1rem 0 1.25rem; }

/* Session stage */
.session-options { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.session-options label { display: grid; gap: .375rem; font-size: .8125rem; font-weight: 600; color: var(--ink-soft); min-width: 0; }
.session-options select { width: 100%; min-width: 0; }
.session-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.session-controls .status { margin-left: auto; }
.media-pair { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: .75rem; }
.media-tile { position: relative; min-width: 0; margin: 0; overflow: hidden; background: var(--stage); color: #eef1ed; border-radius: var(--radius-card); display: flex; flex-direction: column; }
.media-tile video { width: 100%; aspect-ratio: 16/9; flex: 1; min-height: 0; object-fit: contain; }
.media-tile figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; background: var(--stage-bar); padding: .625rem 1rem; font-size: .8125rem; font-weight: 600; }
.media-tile figcaption .mono { font-size: .6875rem; font-weight: 400; color: var(--brass-light); overflow-wrap: anywhere; }
.source-viewport, .peer-viewport { position: relative; width: 100%; aspect-ratio: 16/9; flex: none; min-height: 0; overflow: hidden; }
.source-viewport video, .peer-viewport video, #peer-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
#peer-preview { background: #000; pointer-events: none; }
.sound-controls { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; margin: .75rem 0 1.5rem; font-size: .8125rem; color: var(--ink-soft); }
.sound-controls label { display: flex; align-items: center; gap: .4rem; }
.sound-controls input[type="checkbox"] { width: 1rem; min-height: 1rem; accent-color: var(--cobalt); }
.sound-controls input[type="range"] { width: 7rem; padding: 0; border: 0; background: none; accent-color: var(--cobalt); }
.conversation { border-top: 1px solid var(--rule); padding-top: 1rem; }
.conversation h3 { font-size: .9375rem; margin: 0; }
#chat-messages { max-height: 14rem; overflow-y: auto; margin: .75rem 0; }
.chat-message { max-width: 85%; padding: .625rem .875rem; border-radius: .75rem .75rem .75rem .25rem; background: var(--surface-sunk); margin: .5rem 0; overflow-wrap: anywhere; white-space: pre-wrap; font-size: .875rem; }
.chat-message.outgoing { margin-left: auto; border-radius: .75rem .75rem .25rem .75rem; background: var(--cobalt-soft); }
.chat-meta { display: block; font-size: .6875rem; color: var(--ink-soft); margin-bottom: .25rem; }
#chat-form { display: flex; gap: .5rem; }
#chat-text { padding: .625rem .875rem; min-width: 0; }
.account-record { border-top: 1px solid var(--rule); margin-top: 1.5rem; padding-top: 1rem; }
.account-record summary { cursor: pointer; font-size: .875rem; font-weight: 600; margin-bottom: 1rem; }

@media (max-width: 950px) {
  .video-card { grid-template-columns: 1fr; }
  .video-card video { height: auto; min-height: 0; aspect-ratio: 16/9; }
  .summary-item { padding: .75rem .875rem; }
}
@media (max-width: 860px) {
  .summary { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .summary-item { grid-column: span 2; }
  .summary-item:nth-child(-n+2) { grid-column: span 3; }
  .login-check { grid-template-columns: 1fr; }
  .login-check-action { align-items: flex-start; max-width: none; }
  .probe-result { text-align: left; }
}
@media (max-width: 640px) {
  .main { width: calc(100% - 2rem); padding-top: 1.75rem; }
  .sl-header__inner { flex-wrap: wrap; gap: .25rem 1rem; padding: .75rem 1rem; }
  nav { order: 3; width: 100%; } .nav-link { padding: .25rem 0 .5rem; font-size: .8125rem; } .nav-link[aria-current="page"]::after { bottom: .125rem; }
  .brand-tagline { display: none; }
  .intro { flex-direction: column; align-items: stretch; gap: 1.25rem; padding-bottom: 1.5rem; }
  .refresh-block { display: flex; align-items: center; text-align: left; gap: 1rem; }
  .refresh-caption { margin: 0; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-item, .summary-item:nth-child(-n+2) { grid-column: auto; }
  .summary-item:first-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; }
  .summary-item:first-child .summary-value { grid-row: 1 / span 2; grid-column: 2; }
  .inventory-heading { flex-direction: column; align-items: flex-start; gap: .5rem; padding: 1.25rem 1rem 1rem; }
  .toolbar { padding: 0 1rem; gap: .5rem; } .search-field { flex-basis: 100%; }
  .toolbar select { flex: 1; min-width: 0; font-size: .8125rem; }
  .filter-caption { padding: 0 1rem; flex-wrap: wrap; gap: 0 .75rem; }
  /* Rows become cards: tag and name on top, the two states below. */
  table { min-width: 0; display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody { display: block; }
  tbody tr { display: grid; grid-template-columns: auto minmax(0, 1fr); position: relative; padding: .875rem 1rem; border-top: 1px solid var(--rule); gap: .75rem; }
  tbody tr:first-child { border-top: 0; }
  td, td:first-child, td:last-child { padding: 0; border: 0; min-width: 0; }
  td:nth-child(1) { grid-column: 1; grid-row: 1; align-self: center; }
  td:nth-child(2) { grid-column: 2; grid-row: 1; align-self: center; }
  td:nth-child(3) { grid-column: 1 / -1; grid-row: 2; }
  td:nth-child(4) { grid-column: 1 / -1; grid-row: 3; }
  td:nth-child(5) { grid-column: 1; grid-row: 4; }
  td:nth-child(6) { grid-column: 2; grid-row: 4; justify-self: end; align-self: center; }
  td:last-child { grid-column: 1 / -1; grid-row: 5; }
  .row-actions { justify-content: space-between; }
  td:nth-child(3)::before, td:nth-child(4)::before { display: inline-block; min-width: 7.5rem; color: var(--ink-soft); font: .6875rem/1.5 var(--font-data); text-transform: uppercase; letter-spacing: .04em; }
  td:nth-child(3) { display: flex; align-items: center; } td:nth-child(3)::before { content: "Recorded"; }
  td:nth-child(4) { display: flex; align-items: flex-start; } td:nth-child(4)::before { content: "Gateway"; padding-top: .3rem; }
  .token-name { max-width: 100%; }
  .pagination { flex-wrap: wrap; padding: .75rem 1rem; } .page-controls { margin-left: auto; }
  .video-cards { grid-template-columns: 1fr; padding: 0 1rem; }
  .videotheque > .detail-note { margin: 1rem; }
  dialog, #token-detail { padding: 0 1rem 1rem; }
  .dialog-top { margin: 0 -1rem; padding: .625rem 1rem; }
  .detail-head { flex-direction: column; gap: .75rem; align-items: flex-start; }
  dialog h2 { overflow-wrap: break-word; }
  .tag-large { min-width: 5.5rem; height: 3.25rem; padding: 0 .75rem 0 1.75rem; font-size: 2rem; }
  .login-check { padding: .875rem 1rem; }
  .session-options, .media-pair { grid-template-columns: 1fr; }
  .session-controls .status { margin-left: 0; }
  .media-tile video { flex: auto; }
  .sound-controls { gap: .5rem; }
  .detail-field { grid-template-columns: 7rem minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Velvonte identity: the same treatment as studio.velvonte.com. */
body { font-weight: 300; font-size: 1.0625rem; line-height: 1.6; }
.sl-header { background: var(--wine); color: var(--ink); border-bottom: 1px solid var(--rule); }
.sl-header__inner { min-height: 5.875rem; gap: 1.875rem; }
.brand-copy { align-items: center; gap: 1.875rem; }
.brand-name { font: 300 2.3125rem/1 var(--font-stamp); letter-spacing: -.055em; text-transform: uppercase; color: var(--ink); }
.brand-tagline { border-left: 1px solid var(--rule); padding-left: 1.875rem; color: var(--ink-faint); font: 300 .625rem/1.5 var(--font-data); letter-spacing: .08em; text-transform: uppercase; }
.nav-link { color: var(--ink); font: 300 .6875rem/1.45 var(--font-data); letter-spacing: .035em; }
.nav-link[aria-current="page"]::after { background: var(--ink); height: 1px; }
.status, .count-chip { border-radius: 0; font-family: var(--font-data); font-weight: 300; font-size: .625rem; letter-spacing: .05em; text-transform: uppercase; }
.status-dot { box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 10%, transparent); }
.eyebrow { color: var(--ink-faint); font: 300 .625rem/1.5 var(--font-data); letter-spacing: .08em; }
h1 { font: 300 clamp(3rem, 5vw, 4.375rem)/1.12 var(--font-stamp); letter-spacing: -.025em; text-transform: none; }
h1::after { content: "."; color: var(--ink-faint); }
h2, h3 { font-family: var(--font-data); font-weight: 300; font-size: .8125rem; letter-spacing: .065em; line-height: 1.5; }
.page-copy { color: var(--ink-faint); font-style: italic; font-size: 1.25rem; line-height: 1.4; }
.button { font: 300 .6875rem/1.45 var(--font-data); letter-spacing: .035em; background: transparent; color: var(--ink); border-color: var(--rule); min-height: 2.75rem; padding: .75rem 1.125rem; }
.button:not(:disabled):hover { background: transparent; border-color: var(--ink-faint); filter: brightness(1.13); }
.button-primary { color: var(--wine); background: var(--ink); border-color: var(--ink); }
.button-primary:not(:disabled):hover { background: var(--ink); border-color: var(--ink); }
.text-button { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--rule); }
input, select { background: rgba(255, 255, 255, .016); color: var(--ink); border-color: var(--rule); font-weight: 300; }
select option { background: var(--wine); color: var(--ink); }
input::placeholder { color: var(--ink-faint); }
.card { background: transparent; border-color: var(--rule); box-shadow: none; }
.summary { background: transparent; }
.summary-item { background: transparent; border-color: var(--rule); }
.summary-item:hover { background: var(--surface); }
.summary-item[aria-pressed="true"] { background: var(--ink); color: var(--wine); border-color: var(--ink); }
.summary-item[aria-pressed="true"] .summary-hint, .summary-item[aria-pressed="true"] .summary-label { color: var(--wine); }
.summary-label, th { font-family: var(--font-data); font-weight: 300; letter-spacing: .05em; }
.summary-value { font: 300 2.5rem/1 var(--font-stamp); letter-spacing: -.02em; }
th { background: var(--panel-deep); color: var(--ink-faint); }
tbody tr:hover { background: var(--surface); }
.alert { background: var(--lamp-ban-soft); color: var(--lamp-ban); border-color: var(--rule); border-left-color: var(--lamp-ban); }
.detail-note { background: var(--surface-sunk); border-left: 1px solid var(--brass); color: var(--ink-soft); }
.footer, .footer-brand span { color: var(--ink-faint); font-family: var(--font-data); font-size: .5625rem; letter-spacing: .04em; }
.footer { border-top: 1px solid var(--rule); }
.footer-brand { font: 300 1rem/1 var(--font-stamp); letter-spacing: -.055em; text-transform: uppercase; color: var(--ink); }
.video-card { border-color: var(--rule); background: transparent; }
.video-card h3 { font: 300 1.0625rem/1.3 var(--font-ui); letter-spacing: 0; }
dialog { background: var(--wine); color: var(--ink); border: 1px solid var(--ink-faint); }
dialog::backdrop { background: var(--scrim); }
.login-check { border: 1px solid var(--rule); background: transparent; }
.media-tile { color: var(--ink); }
#peer-preview { background: var(--stage); }
.chat-message { background: var(--surface); }
.chat-message.outgoing { background: var(--ink); color: var(--wine); }
.skip-link { background: var(--ink); color: var(--wine); }

/* Owner sign-in, as Studio's login page. */
.login-main { min-height: calc(100svh - 12rem); display: grid; grid-template-columns: 1.2fr 1fr; gap: 6rem; align-items: center; width: min(calc(100% - 3rem), 72rem); margin: auto; padding: 5rem 0; }
.login-intro h1 { font-size: clamp(3.5rem, 6.2vw, 5.375rem); }
.login-intro h1::after { content: none; }
.login-intro h1 em { font-style: italic; color: var(--ink-faint); }
.login-intro p:not(.eyebrow) { color: var(--ink-faint); margin-top: 1.625rem; font-size: 1.25rem; max-width: 20rem; }
.login-form { max-width: 22.5rem; width: 100%; border-top: 1px solid var(--rule); padding-top: 1.75rem; display: grid; gap: .5rem; }
.login-form label { margin-top: 1.5rem; color: var(--ink-soft); font: 300 .625rem/1.5 var(--font-data); letter-spacing: .05em; }
.login-form input { width: 100%; font-size: 1.125rem; padding: .8rem .95rem; }
.login-form .button-primary { width: 100%; justify-content: space-between; margin-top: 1.25rem; }
.login-error { color: var(--lamp-ban); min-height: 1.5em; margin: .5rem 0 0; font-size: .9375rem; }
@media (max-width: 700px) { .login-main { grid-template-columns: 1fr; gap: 3rem; padding: 3.5rem 0 4rem; } .login-form { max-width: none; } .brand-tagline { padding-left: 1rem; } .brand-name { font-size: 1.875rem; } }
