:root {
  color-scheme: dark;
  --ink: #091019;
  --panel: #111c28;
  --panel-raised: #172535;
  --line: #2b3c4f;
  --text: #edf5fb;
  --muted: #9aafc0;
  --signal: #71d7f7;
  --warning: #f5bd62;
  --danger: #ff8178;
  --stopped: #8594a2;
  --focus: #b5eaff;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--ink);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 12% 0%, #15283a 0, transparent 34rem), var(--ink); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { min-height: 44px; border: 1px solid var(--signal); border-radius: 7px; padding: .65rem 1rem; background: var(--signal); color: #061018; font-weight: 750; cursor: pointer; }
button:hover { filter: brightness(1.08); }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input, select { min-height: 44px; width: 100%; border: 1px solid var(--line); border-radius: 7px; padding: .7rem .8rem; background: #0b1520; color: var(--text); }
input::placeholder { color: #6e8395; }
label { display: block; margin-bottom: .45rem; color: var(--muted); font-size: .82rem; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .55rem; font-size: clamp(2rem, 5vw, 4rem); line-height: .98; letter-spacing: -.045em; }
h2 { margin-bottom: 0; font-size: 1rem; letter-spacing: .02em; }
.eyebrow { margin-bottom: .75rem; color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.lede { max-width: 40rem; color: var(--muted); line-height: 1.65; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: .9rem; font-weight: 800; letter-spacing: .02em; }
.wordmark span { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid var(--signal); border-radius: 50%; color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; }
.topbar { display: flex; min-height: 70px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: .8rem clamp(1rem, 4vw, 3rem); background: rgba(9, 16, 25, .84); backdrop-filter: blur(12px); }
.topbar-actions, .button-row, .field-action { display: flex; align-items: center; gap: .75rem; }
.account-label { color: var(--muted); font-size: .78rem; }
.live-key { color: var(--muted); font-size: .78rem; }
.live-key i { display: inline-block; width: 7px; height: 7px; margin-right: .35rem; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px rgba(113, 215, 247, .1); }
.button-quiet, .button-secondary { border-color: var(--line); background: transparent; color: var(--text); }
.button-danger { border-color: var(--danger); background: rgba(255, 129, 120, .1); color: #ffc2bd; }
.back-link { min-height: 44px; display: inline-flex; align-items: center; color: var(--muted); font-size: .84rem; text-decoration: none; }
.page-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2.5rem, 7vw, 5.5rem) 0; }
.page-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 390px); gap: 4rem; align-items: end; margin-bottom: 4rem; }
.add-room-form { border-left: 1px solid var(--line); padding-left: 2rem; }
.add-room-form > div:not(.field-action) { margin-bottom: .85rem; }
.field-action input { min-width: 0; }
.form-message { min-height: 1.3em; margin: .55rem 0 0; color: var(--muted); font-size: .8rem; }
.form-message.error, .danger-text { color: var(--danger); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; }
.section-heading > span, .count-label { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }
.room-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin-top: 1rem; background: var(--line); border: 1px solid var(--line); }
.room-card { position: relative; min-width: 0; padding: 1.4rem 1.5rem 1.25rem 1.8rem; overflow: hidden; background: var(--panel); }
.signal-rail { position: absolute; inset: 0 auto 0 0; width: 5px; background: repeating-linear-gradient(180deg, var(--stopped) 0 5px, transparent 5px 9px); }
.room-card[data-status="connected"] .signal-rail { background: var(--signal); box-shadow: 0 0 18px rgba(113, 215, 247, .45); }
.room-card[data-status="connecting"] .signal-rail, .room-card[data-status="reconnecting"] .signal-rail { background: repeating-linear-gradient(180deg, var(--warning) 0 7px, transparent 7px 12px); }
.room-card-header, .room-card-footer { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.room-card-title { margin-bottom: .2rem; font-size: 1.05rem; }
.vj-label { margin: 0 0 .35rem; color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 800; letter-spacing: .15em; }
.room-handle { margin-bottom: 0; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .75rem; }
.status-badge { display: inline-flex; min-height: 25px; align-items: center; border: 1px solid var(--line); border-radius: 999px; padding: .2rem .55rem; color: var(--muted); font-size: .68rem; font-weight: 750; }
.status-badge[data-status="connected"] { border-color: rgba(113, 215, 247, .4); color: var(--signal); }
.status-badge[data-status="connecting"], .status-badge[data-status="reconnecting"] { border-style: dashed; border-color: rgba(245, 189, 98, .5); color: var(--warning); }
.room-total { display: flex; align-items: baseline; gap: .75rem; margin: 2.4rem 0 2rem; text-decoration: none; }
.room-total strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(2.7rem, 7vw, 5rem); font-weight: 500; letter-spacing: -.08em; line-height: .8; font-variant-numeric: tabular-nums; }
.room-total span { color: var(--muted); font-size: .72rem; }
.room-card-footer { align-items: center; border-top: 1px solid var(--line); padding-top: 1rem; }
.card-goal { margin: -1rem 0 1.25rem; }
.card-goal-heading { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--muted); font-size: .72rem; }
.card-goal-heading strong { color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 650; }
.goal-track { height: 8px; overflow: hidden; border: 1px solid #385064; border-radius: 999px; background: #0a141e; }
.goal-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #38bde8, var(--signal)); box-shadow: 0 0 14px rgba(113, 215, 247, .45); transition: width .45s ease; }
.card-activity { min-width: 0; }
.top-giver { margin: 0 0 .3rem; overflow: hidden; color: var(--text); font-size: .76rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.latest-tip { margin: 0; overflow: hidden; color: var(--muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.room-card-footer button { min-height: 36px; padding: .4rem .7rem; font-size: .72rem; }
.empty-state { margin-top: 1rem; border: 1px dashed var(--line); padding: 3rem; text-align: center; }
.empty-state p { margin-bottom: .35rem; }
.empty-state span { color: var(--muted); font-size: .85rem; }
.login-page { display: grid; place-items: center; padding: 1rem; }
.login-shell { display: grid; width: min(920px, 100%); min-height: 580px; grid-template-columns: 1.1fr .9fr; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 30px 90px rgba(0, 0, 0, .35); }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: clamp(2rem, 7vw, 5rem); }
.login-card .wordmark { margin-bottom: 4rem; }
.stack-form { margin-top: 1.5rem; }
.stack-form label:not(:first-child) { margin-top: 1rem; }
.stack-form button { width: 100%; margin-top: 1rem; }
.signal-panel { position: relative; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; border-left: 1px solid var(--line); padding: 2rem; background: #0c1722; }
.signal-panel p { max-width: 17rem; color: var(--muted); line-height: 1.6; }
.signal-panel .signal-label { margin-bottom: .4rem; color: var(--text); font-weight: 700; }
.signal-orbit { position: absolute; top: 12%; left: 50%; width: 250px; height: 250px; transform: translateX(-50%); border: 1px solid #294052; border-radius: 50%; }
.signal-orbit::before, .signal-orbit::after { content: ""; position: absolute; border: 1px solid #213545; border-radius: 50%; inset: 18%; }
.signal-orbit::after { inset: 36%; }
.signal-orbit span { position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--signal); box-shadow: 0 0 30px 8px rgba(113, 215, 247, .25); }
.admin-heading { grid-template-columns: 1fr; margin-bottom: 1.5rem; }
.admin-grid { display: grid; grid-template-columns: minmax(260px, .72fr) minmax(480px, 1.28fr); gap: 1rem; align-items: start; }
.admin-room-access { grid-column: 1 / -1; }
.lede.compact { margin: -.25rem 0 1rem; font-size: .82rem; }
.room-access-row { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(160px, 1fr) minmax(220px, 1.4fr) auto; gap: .75rem; align-items: end; }
.room-access-row label { display: grid; gap: .35rem; }
.room-access-row select[multiple] { min-height: 88px; }
.admin-panel { border: 1px solid var(--line); padding: 1.25rem; background: var(--panel); }
.admin-create-form { margin: 1.25rem 0; }
.admin-list { display: grid; gap: .65rem; }
.admin-row, .admin-user-row { display: grid; gap: .65rem; border: 1px solid var(--line); padding: .75rem; background: var(--panel-raised); }
.admin-row { grid-template-columns: minmax(0, 1fr) auto; }
.admin-row button, .admin-user-row button { min-height: 40px; padding: .5rem .7rem; font-size: .72rem; }
.admin-user-form { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: end; margin: 1.25rem 0 1.75rem; }
.admin-password-field { grid-column: 1 / -1; }
.admin-user-form > button { grid-column: 1 / -1; }
.admin-user-row { grid-template-columns: minmax(120px, .8fr) minmax(150px, 1fr) auto auto; align-items: center; }
.admin-user-identity { display: grid; gap: .25rem; min-width: 0; }
.admin-user-identity strong { overflow: hidden; text-overflow: ellipsis; }
.admin-user-identity span { color: var(--muted); font-size: .7rem; }
.admin-enabled { display: flex; align-items: center; gap: .35rem; margin: 0; white-space: nowrap; }
.admin-enabled input { width: 18px; min-height: 18px; }
.detail-hero { display: grid; grid-template-columns: 1fr auto; gap: 3rem; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 2.5rem; }
.detail-identity h1 { margin-bottom: .7rem; }
.detail-identity .status-badge { margin-top: 1rem; }
.total-panel { display: grid; min-width: 230px; justify-items: end; }
.total-panel span, .total-panel small { color: var(--muted); font-size: .72rem; }
.total-panel strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(4rem, 10vw, 7.5rem); font-weight: 500; letter-spacing: -.1em; line-height: .86; font-variant-numeric: tabular-nums; }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 1.25rem 0 3.5rem; }
.detail-actions p { margin-bottom: 0; color: var(--muted); font-size: .78rem; }
.performance-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 1rem; margin-bottom: 1rem; }
.goal-panel, .giver-panel { border: 1px solid var(--line); padding: 1.25rem; background: var(--panel); }
.goal-panel .section-heading, .giver-panel .section-heading { align-items: flex-end; }
.goal-panel .eyebrow, .giver-panel .eyebrow { margin-bottom: .35rem; }
.goal-numbers { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; font-variant-numeric: tabular-nums; }
.goal-panel > .goal-track { height: 12px; margin-top: 1.35rem; }
.goal-remaining { margin: .65rem 0 1.5rem; color: var(--muted); font-size: .78rem; }
.live-topic { margin: .65rem 0 0; overflow: hidden; color: var(--muted); font-size: .72rem; line-height: 1.45; text-overflow: ellipsis; }
.card-vjs { margin: .7rem 0 0; overflow: hidden; color: var(--signal); font-size: .72rem; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.giver-list { margin: .8rem 0 0; padding: 0; list-style: none; }
.giver-list li { display: grid; grid-template-columns: 2rem minmax(0, 1fr) auto; align-items: center; gap: .65rem; border-bottom: 1px solid var(--line); padding: .75rem .15rem; }
.giver-rank { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; }
.giver-name { overflow: hidden; font-size: .82rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.giver-total { color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; }
.giver-view-all { display: block; width: 100%; margin-top: .85rem; min-height: 38px; padding: .5rem .75rem; font-size: .74rem; text-align: center; }
.givers-dialog { width: min(440px, calc(100% - 2rem)); border-color: var(--line); }
.givers-dialog > div { padding: 1.75rem; }
.givers-dialog > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; font-size: .84rem; }
.givers-dialog-list { max-height: min(55vh, 26rem); margin: 1rem 0 0; overflow-y: auto; }
.vj-panel { margin-bottom: 1rem; border: 1px solid var(--line); padding: 1.25rem; background: var(--panel); }
.vj-panel .eyebrow { margin-bottom: .35rem; }
.vj-form { display: grid; grid-template-columns: minmax(0, 1fr) 110px auto; gap: .75rem; align-items: end; margin-top: 1rem; }
.manual-token-fields { display: grid; gap: .85rem; margin: 1.25rem 0; }
.vj-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: 1rem 0 0; padding: 1px; background: var(--line); list-style: none; }
.vj-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .85rem; background: var(--panel-raised); }
.vj-list li[data-presence="absent"] { opacity: .62; }
.vj-list li > div:first-child { display: grid; gap: .2rem; }
.vj-list strong { overflow: hidden; font-size: 1.1rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.vj-list small { color: var(--muted); font-size: .65rem; text-transform: uppercase; }
.vj-list span { color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; }
.vj-list .vj-total { display: grid; justify-items: end; gap: 0; line-height: 1; }
.vj-list .vj-total strong { overflow: visible; white-space: nowrap; font-size: 2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.vj-list .vj-total small { color: var(--muted); font-size: .62rem; letter-spacing: .05em; }
.vj-controls { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: .5rem; }
.vj-controls button { min-height: 34px; padding: .35rem .65rem; font-size: .68rem; }
.button-remove { border-color: rgba(255, 129, 120, .45); background: transparent; color: var(--danger); }
.button-danger.is-armed, .button-remove.is-armed { border-color: var(--danger); background: var(--danger); color: #2a0a08; }
@media (prefers-reduced-motion: no-preference) {
  .is-armed { animation: arm-pulse 1s ease-in-out infinite; }
  @keyframes arm-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 129, 120, .5); } 50% { box-shadow: 0 0 0 7px rgba(255, 129, 120, 0); } }
}
.vj-list li[data-performing="true"] { border-left: 3px solid var(--signal); box-shadow: inset 0 0 24px rgba(113, 215, 247, .18), 0 0 20px rgba(113, 215, 247, .3); }
.vj-name-toggle { cursor: pointer; text-decoration: underline dotted rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.vj-name-toggle:hover { color: var(--signal); }
li[data-performing="true"] .vj-name-toggle { color: var(--signal); text-decoration: none; }
.mc-rule { margin: 1rem 0 0; color: var(--muted); font-size: .74rem; }
.mc-rule strong { color: var(--signal); }
.tip-vj { color: var(--signal); font-weight: 700; }
.tip-vj.unassigned { color: var(--muted); font-weight: 400; }
.tip-review { white-space: nowrap; }
.tip-menu-toggle { min-height: 32px; min-width: 32px; padding: .25rem .5rem; font-size: 1rem; line-height: 1; }
.tip-actions { display: inline-flex; gap: .4rem; }
.tip-actions[hidden] { display: none; }
.tip-edit { min-height: 32px; padding: .25rem .6rem; font-size: .68rem; }
.tip-section { border: 1px solid var(--line); padding: 1.25rem; background: var(--panel); }
.tip-tabs { display: flex; gap: .5rem; margin-top: 1rem; }
.tip-tab { min-height: 34px; border-color: var(--line); padding: .4rem .85rem; background: transparent; color: var(--muted); font-size: .72rem; font-weight: 700; }
.tip-tab[aria-selected="true"] { border-color: var(--signal); background: rgba(113, 215, 247, .1); color: var(--signal); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin-top: .5rem; }
th, td { border-bottom: 1px solid var(--line); padding: 1rem .6rem; text-align: left; font-size: .8rem; }
th { color: var(--muted); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.token-cell { color: var(--signal); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; }
.tip-note { max-width: 26rem; color: var(--muted); }
.empty-inline { margin: 1.5rem .6rem .5rem; color: var(--muted); font-size: .82rem; }
dialog {
  opacity: 0;
  transform: scale(.94) translateY(14px);
  transition: opacity .2s ease, transform .2s ease, overlay .2s ease allow-discard, display .2s ease allow-discard;
}
dialog[open] { opacity: 1; transform: none; }
@starting-style {
  dialog[open] { opacity: 0; transform: scale(.94) translateY(14px); }
}
dialog::backdrop {
  opacity: 1;
  transition: opacity .2s ease, overlay .2s ease allow-discard, display .2s ease allow-discard;
}
@starting-style {
  dialog[open]::backdrop { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  dialog, dialog::backdrop, .assignment-timer-bar { transition: none !important; }
}

.reset-dialog { width: min(480px, calc(100% - 2rem)); border: 1px solid #704440; border-radius: 9px; padding: 0; background: var(--panel-raised); color: var(--text); }
.reset-dialog::backdrop { background: rgba(3, 8, 13, .78); backdrop-filter: blur(4px); }
.reset-dialog form { padding: 2rem; }
.reset-dialog h2 { margin-bottom: .7rem; font-size: 1.5rem; }
.reset-dialog > form > p:not(.eyebrow) { color: var(--muted); line-height: 1.55; }
.reset-dialog dl { margin: 1.5rem 0; border-block: 1px solid var(--line); }
.reset-dialog dl div { display: flex; justify-content: space-between; gap: 2rem; padding: .8rem 0; }
.reset-dialog dt { color: var(--muted); }
.reset-dialog dd { margin: 0; font-weight: 700; }
.reset-dialog .button-row { justify-content: flex-end; }
#tipper-defaults-dialog { width: min(480px, calc(100% - 2rem)); }
#tipper-defaults-dialog > div { padding: 2rem; }
#tipper-defaults-dialog > div > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; font-size: .84rem; }
#tipper-defaults-dialog .button-row { justify-content: flex-end; margin-top: 1.25rem; }
.tipper-defaults-list { display: grid; gap: .5rem; margin: 1.25rem 0; padding: 0; list-style: none; }
.tipper-defaults-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: 7px; padding: .6rem .75rem; }
.tipper-defaults-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.tipper-defaults-list select { min-height: 34px; padding: .3rem .5rem; }
.tipper-defaults-list button { min-height: 34px; padding: .35rem .65rem; font-size: .68rem; }
.tipper-defaults-form { display: grid; grid-template-columns: minmax(0, 1fr) 130px auto; gap: .6rem; align-items: center; margin-top: 1rem; }
.tipper-name-button { min-height: 0; border: 0; padding: 0; background: none; color: var(--text); font: inherit; font-weight: 500; text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: pointer; }
.tipper-name-button:hover { color: var(--signal); }
.assignment-dialog { width: min(620px, calc(100% - 1.5rem)); max-height: calc(100vh - 1.5rem); overflow: auto; border: 1px solid rgba(113, 215, 247, .55); border-radius: 12px; padding: 0; background: var(--panel-raised); color: var(--text); box-shadow: 0 24px 100px rgba(0, 0, 0, .65), 0 0 50px rgba(113, 215, 247, .08); }
.assignment-dialog::backdrop { background: rgba(3, 8, 13, .82); backdrop-filter: blur(8px); }
.assignment-card { position: relative; padding: clamp(1rem, 4vw, 1.5rem) clamp(1.1rem, 4vw, 1.6rem) 0; }
.assignment-dismiss { position: absolute; top: 1rem; right: 1rem; min-height: 32px; min-width: 32px; border-color: var(--line); padding: 0; background: transparent; color: var(--muted); font-size: .9rem; line-height: 1; }
.assignment-dismiss:hover { border-color: var(--danger); color: var(--danger); }
.assignment-kicker, .assignment-gift, .assignment-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.assignment-kicker { align-items: center; padding-right: 2.25rem; }
.assignment-kicker .eyebrow { margin: 0; }
.assignment-kicker > span { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; }
.assignment-gift { margin: .85rem 0; border-block: 1px solid var(--line); padding: .7rem 0; }
.assignment-gift > div { display: grid; gap: .25rem; }
.assignment-gift > div:last-child { text-align: right; }
.assignment-gift span { color: var(--muted); font-size: .7rem; }
.assignment-gift strong { font-size: 1.05rem; }
.assignment-gift strong span { color: var(--signal); font: inherit; }
.assignment-amount-input { width: 7rem; min-height: 2.2rem; margin-right: .25rem; padding: .35rem .5rem; color: var(--signal); font: inherit; text-align: right; }
.assignment-option[data-role="mc"] { border-color: rgba(255, 190, 92, .45); }
.assignment-option[data-role="mc"]:has(input:checked) { border-color: var(--warning); background: rgba(255, 190, 92, .08); }
.assignment-note { min-height: 2.4rem; margin-bottom: .9rem; border-left: 3px solid var(--signal); padding: .55rem .85rem; background: #0c1722; color: var(--text); font-size: .8rem; line-height: 1.4; }
.assignment-heading { align-items: baseline; }
.assignment-heading h2 { font-size: 1.1rem; }
.assignment-heading p { margin: 0; color: var(--warning); font-size: .72rem; text-align: right; }
.assignment-timer-track { height: 5px; overflow: hidden; margin-top: .5rem; border-radius: 999px; background: #0a141e; }
.assignment-timer-bar { display: block; width: 100%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--signal), var(--warning)); }
.assignment-options { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; margin-top: .75rem; }
.assignment-mc-section { margin-top: .75rem; border: 1px dashed rgba(255, 190, 92, .4); border-radius: 9px; padding: .65rem; background: rgba(255, 190, 92, .05); }
.assignment-mc-label { margin: 0 0 .45rem; color: var(--warning); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.assignment-mc-options { margin-top: 0; }
.assignment-option { display: grid; min-width: 0; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .6rem; margin: 0; border: 1px solid var(--line); border-radius: 7px; padding: .55rem .65rem; background: #0c1722; cursor: pointer; }
.assignment-option:has(input:checked) { border-color: var(--signal); background: rgba(113, 215, 247, .08); }
.assignment-option input { width: 18px; min-height: 18px; accent-color: var(--signal); }
.assignment-option > span { display: grid; min-width: 0; gap: .18rem; }
.assignment-option strong { overflow: hidden; color: var(--text); font-size: .82rem; text-overflow: ellipsis; white-space: nowrap; }
.assignment-option small { color: var(--muted); font-size: .65rem; font-weight: 500; }
.assignment-remember { min-height: 34px; margin-top: .65rem; padding: .4rem .75rem; font-size: .7rem; }
.assignment-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  justify-content: flex-end;
  margin: .9rem calc(-1 * clamp(1.1rem, 4vw, 1.6rem)) 0;
  padding: .75rem clamp(1.1rem, 4vw, 1.6rem) clamp(1rem, 4vw, 1.5rem);
  background: linear-gradient(180deg, transparent, var(--panel-raised) 28%);
  border-top: 1px solid var(--line);
}

@media (max-width: 760px) {
  .live-key { display: none; }
  .page-heading, .login-shell, .detail-hero, .performance-grid { grid-template-columns: 1fr; }
  .page-heading { gap: 2rem; margin-bottom: 3rem; }
  .add-room-form { border-left: 0; border-top: 1px solid var(--line); padding: 1.5rem 0 0; }
  .room-grid { grid-template-columns: 1fr; }
  .signal-panel { display: none; }
  .total-panel { justify-items: start; }
  .detail-actions { align-items: stretch; flex-direction: column; }
  .detail-actions .button-row { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-actions button { width: 100%; }
  .vj-list { grid-template-columns: 1fr 1fr; }
  .admin-grid, .admin-user-form { grid-template-columns: 1fr; }
  .admin-password-field, .admin-user-form > button { grid-column: auto; }
  .admin-user-row { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .field-action, .button-row { align-items: stretch; flex-direction: column; }
  .field-action button, .button-row button { width: 100%; }
  .room-card-header { align-items: flex-start; }
  .room-card-footer { align-items: stretch; flex-direction: column; }
  .room-card-footer button { width: 100%; }
  .tip-section { padding: .8rem; }
  .vj-form, .vj-list { grid-template-columns: 1fr; }
  .vj-form button { width: 100%; }
  .tipper-defaults-form, .tipper-defaults-list li { grid-template-columns: 1fr; }
  .tipper-defaults-form button { width: 100%; }
  .assignment-options { grid-template-columns: 1fr; }
  .assignment-heading { display: grid; }
  .assignment-heading p { text-align: left; }
}

@media (prefers-reduced-motion: no-preference) {
  .live-key i { animation: signal-pulse 2.4s ease-out infinite; }
  @keyframes signal-pulse { 0%, 45% { box-shadow: 0 0 0 0 rgba(113, 215, 247, .3); } 100% { box-shadow: 0 0 0 8px rgba(113, 215, 247, 0); } }
}
