/* Ulavena visual identity, dashboard, navigation and responsive layouts. */

#apply {
  width: 100%;
  margin-top: 16px;
}

/* Ulavena interface. Self-contained: no fonts, assets or libraries to load. */
:root {
  color-scheme: dark;
  --bg: #0b0f0e;
  --surface: #131917;
  --card: #141b18;
  --line: #2a3530;
  --txt: #edf2ec;
  --dim: #a4b0a8;
  --mint: #b6dc94;
  --amber: #e5bd83;
  --muted: #8e9d93;
  --radius: 16px;
}
html {
  scroll-padding-top: 100px;
}
body {
  background: var(--bg);
  font-family: Inter, 'Segoe UI', system-ui, sans-serif;
  font-size: 13px;
  line-height: 1.5;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  background: #1b2420;
  border: 1px solid #354239;
  border-radius: 9px;
  padding: 10px 14px;
  color: #dce5de;
  transition:
    background 0.18s,
    border-color 0.18s,
    transform 0.18s;
  min-height: 40px;
  font-size: 12px;
  font-weight: 550;
}
button:hover {
  background: #26332b;
  border-color: #667a5d;
}
button:disabled {
  opacity: 0.45;
  cursor: wait;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--mint);
  outline-offset: 4px;
}
.icon {
  width: 18px;
  height: 18px;
  flex: none;
  vertical-align: middle;
}
a {
  color: inherit;
  text-decoration: none;
}
.skipLink {
  position: fixed;
  top: -80px;
  left: 16px;
  padding: 12px 18px;
  background: var(--mint);
  color: #162315;
  z-index: 100;
}
.skipLink:focus {
  top: 10px;
}
.top {
  padding: 0 clamp(20px, 3vw, 52px);
  min-height: 78px;
  background: #101612ed;
  border-bottom: 1px solid var(--line);
  flex-wrap: nowrap;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(20px);
}
.brand {
  gap: 11px;
  white-space: nowrap;
}
.mark {
  width: 38px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--mint);
}
.mark .icon {
  width: 31px;
  height: 31px;
}
.brandname {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -1px;
  line-height: 1.1;
}
.brandname span {
  font-weight: 400;
  color: var(--dim);
  font-size: 11px;
  margin-left: 7px;
  letter-spacing: 0.02em;
}
.brand .eyebrow {
  font-size: 8px;
  letter-spacing: 0.17em;
  margin-top: 5px;
  color: #929f92;
}
.topnav {
  display: flex;
  gap: 26px;
  align-self: stretch;
  align-items: stretch;
  margin-right: auto;
}
.topnav a {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #a4b0a8;
  white-space: nowrap;
}
.topnav a:hover,
.topnav a.active {
  color: var(--mint);
}
.topnav a.active:after {
  content: '';
  position: absolute;
  bottom: 0;
  height: 2px;
  background: var(--mint);
  left: 0;
  right: 0;
}
.topnav .icon {
  width: 15px;
  height: 15px;
}
.topright {
  flex-wrap: nowrap;
  gap: 14px;
}
.status {
  font:
    10px ui-monospace,
    monospace;
  color: #afbdaf;
  display: inline-flex;
  gap: 7px;
  align-items: center;
  max-width: 180px;
  white-space: nowrap;
}
.status:before {
  content: '';
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 9px #b6dc9430;
}
.status[data-busy='true']:before {
  background: var(--amber);
  animation: statusPulse 1.4s infinite;
}
.status[data-error='true']:before {
  background: var(--alert);
}
.topright #settingsOpen {
  background: #202b22;
  border-color: #43543b;
  color: #d0dfc4;
}
.layout {
  max-width: 1680px;
  padding: 0 clamp(20px, 3vw, 52px) 28px;
}
.pageHeading {
  padding: 38px 0 28px;
  display: flex;
  justify-content: space-between;
  gap: 28px;
  align-items: flex-end;
}
.eyebrow {
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--mint);
}
.pageHeading h1 {
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -1.8px;
  margin: 12px 0;
}
.pageHeading h1 em {
  font-style: normal;
  color: var(--mint);
}
.pageHeading p {
  margin: 0;
  max-width: 550px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--dim);
}
.headingMeta {
  text-align: right;
  flex: none;
}
.labLabel {
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 12px;
}
.stagepill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #1b241a;
  border-color: #3b4c32;
  color: #c8d9b8;
  font-size: 10px;
  padding: 7px 12px;
}
.stagepill:before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--mint);
  border-radius: 50%;
}
.viewbar {
  border-top: 1px solid var(--line);
  padding: 16px 0;
  gap: 12px;
}
.switches {
  background: #151d18;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  gap: 2px;
}
.switches button {
  min-height: 34px;
  border: 0;
  background: none;
  color: #a6b4a8;
  font-size: 11px;
  padding: 8px 14px;
}
.switches button.active {
  background: #2b3a27;
  color: #d9ebcd;
  box-shadow: inset 0 0 0 1px #536548;
  font-weight: 600;
}
.switches .icon {
  width: 15px;
  height: 15px;
}
.camActions {
  gap: 6px;
}
.camActions button {
  min-height: 36px;
  padding: 8px 10px;
  background: transparent;
  border-color: var(--line);
  color: #a8b7ac;
  font-size: 11px;
}
.camActions button:hover {
  background: #1f2a22;
  color: var(--txt);
}
.toolDivider {
  width: 1px;
  height: 22px;
  background: var(--line);
  margin: 0 4px;
}
.iconOnly {
  width: 37px;
  padding: 8px !important;
}
.textControl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.views {
  gap: 18px;
  isolation: isolate;
}
.scene {
  height: clamp(430px, 55vh, 680px);
  border: 1px solid #3c493d;
  border-radius: var(--radius);
  background: #0b120e;
  box-shadow: 0 8px 28px #0002;
  transition: border-color 0.2s;
}
.scene:nth-child(2) {
  border-color: #566848;
}
.scene:after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 55px #0002;
  border-radius: inherit;
}
.sceneTop {
  padding: 20px 22px 60px;
  background: linear-gradient(#0a130ff5, transparent);
}
.sceneTop strong {
  font-size: 16px;
  letter-spacing: -0.35px;
  font-weight: 550;
  display: flex;
  gap: 10px;
  align-items: center;
}
.sceneTop strong:before {
  content: '01';
  font:
    10px ui-monospace,
    monospace;
  color: var(--amber);
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  background: #30281e;
  border: 1px solid #65513a;
  border-radius: 7px;
}
.scene:nth-child(2) .sceneTop strong:before {
  content: '02';
  color: var(--mint);
  background: #26301f;
  border-color: #5e7049;
}
.sceneTop small {
  margin-left: 35px;
  font-size: 10px;
  color: #a8b7aa;
}
.sceneTop .tag {
  margin-left: 35px;
  padding: 3px 8px;
  margin-top: 9px;
  font-size: 9px;
  border: 1px solid #49544875;
  background: #111c14a8;
  color: #bdcbb9;
}
.cornerTools {
  right: 16px;
  top: 122px;
  gap: 6px;
}
.cornerTools button {
  height: 34px;
  width: 34px;
  min-height: 34px;
  background: #101a14d9;
  border-color: #4e5b4690;
  border-radius: 8px;
}
.cornerTools .icon {
  width: 15px;
  height: 15px;
}
.ledCount {
  bottom: 99px;
  left: 22px;
  font-size: 9px;
  padding: 5px 8px;
  border-radius: 5px;
  background: #0e1712b8;
  border-color: #4b5b4580;
  color: #c4d5bf;
  max-width: calc(100% - 44px);
}
.sceneBottom {
  padding: 36px 22px 20px;
  align-items: center;
  background: linear-gradient(transparent, #0c1510fa 48%);
}
.sceneBottom span {
  font-size: 9px;
  letter-spacing: 0.025em;
  color: #afbdac;
}
.sceneBottom strong {
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.8px;
  margin-top: 4px;
}
.sceneBottom .right {
  padding-left: 18px;
  border-left: 1px solid #7a8b722e;
}
.sceneHint {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #8f9f90;
  font-size: 10px;
  margin: 12px 2px 0;
}
.sceneHint span {
  display: inline-flex;
  gap: 7px;
  align-items: center;
}
.sceneHint .icon {
  width: 13px;
  height: 13px;
}
.sceneHint b {
  color: #b5c4b2;
  font-weight: 500;
}
.hintKey {
  border: 1px solid #3a463b;
  border-radius: 4px;
  font: 9px ui-monospace;
  padding: 1px 5px;
  background: #182019;
}
.startOverlay {
  top: auto;
  bottom: 128px;
  left: 50%;
  transform: translateX(-50%);
  width: min(380px, calc(100% - 40px));
  padding: 22px;
  background: #172218f7;
  border: 1px solid #7e9262;
  border-radius: 14px;
  box-shadow: 0 20px 60px #0009;
  backdrop-filter: blur(18px);
}
.startOverlay .eyebrow {
  font-size: 8px;
  letter-spacing: 0.2em;
}
.startOverlay h2 {
  font-size: 25px;
  letter-spacing: -1px;
  font-weight: 500;
  margin: 10px 0;
}
.startOverlay p {
  font-size: 11px;
  color: #acbda8;
  line-height: 1.75;
}
.startOverlay button {
  padding: 12px;
  min-height: 44px;
  background: var(--mint);
  color: #182613;
  font-size: 12px;
  border-color: #c6e9a8;
  font-weight: 650;
}
.startOverlay small {
  font-size: 9px;
  color: #b6c6ad;
  line-height: 1.6;
}
.progressTrack {
  height: 2px;
  overflow: hidden;
  background: #43503b;
  margin: 16px 0 0;
  border-radius: 4px;
}
.progressTrack span {
  height: 100%;
  display: block;
  width: 0;
  background: var(--mint);
  transition: width 0.25s;
}
.player {
  margin: 17px 0 12px;
  background: #161f19;
  border-color: #384732;
  padding: 12px 15px;
  gap: 12px;
  border-radius: 12px;
}
.primary {
  background: var(--mint);
  color: #172513;
  border-color: #c9e9b0;
  font-weight: 600;
}
.primary:hover {
  background: #c9ecae;
  color: #10210a;
}
.player button {
  min-height: 36px;
  padding: 8px 13px;
  font-size: 11px;
}
.player .date {
  font-size: 11px;
  min-width: 94px;
  color: #d4e3c9;
}
.player input {
  height: 24px;
  min-width: 80px;
  flex: 1;
  cursor: pointer;
}
.player select {
  width: 68px;
  padding: 7px;
  font-size: 11px;
  background: #1b261d;
  border-color: #3c4a36;
  min-height: 34px;
}
.player .muted {
  font-size: 10px;
}
.story {
  background: transparent;
  border: 0;
  border-left: 2px solid #667c51;
  border-radius: 0;
  padding: 6px 0 6px 13px;
  margin: 18px 0 30px;
  font-size: 11px;
  line-height: 1.8;
  color: #a8b7a5;
}
.story strong {
  color: #d5e3ca;
  font-weight: 550;
}
.story button {
  background: transparent;
  border: 1px solid var(--line);
  font-size: 10px;
  min-height: 33px;
  flex: none;
}
.sectionHeading {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  margin: 0 0 14px;
}
.sectionHeading h2 {
  font-size: 16px;
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.4px;
}
.sectionHeading span {
  font: 9px ui-monospace;
  color: #8f9f91;
  letter-spacing: 0.07em;
}
.sectionHeading .textControl {
  color: var(--mint);
  font:
    10px 'Segoe UI',
    sans-serif;
}
.kpis {
  gap: 12px;
}
.kpi {
  background: linear-gradient(140deg, #19221a, #131a15);
  border-color: var(--line);
  border-radius: 12px;
  padding: 17px 17px 16px;
  position: relative;
  overflow: hidden;
}
.kpi:before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: #48583e;
}
.kpi:nth-child(1):before {
  background: var(--amber);
}
.kpi:nth-child(2):before {
  background: var(--mint);
}
.kpi label {
  font-size: 10px;
  color: #acb8a8;
  padding-right: 25px;
}
.kpi > .icon {
  position: absolute;
  right: 16px;
  top: 16px;
  color: #75876a;
  width: 16px;
  height: 16px;
}
.kpi strong {
  font-size: clamp(18px, 1.7vw, 27px);
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: 14px 0 7px;
  white-space: nowrap;
}
.kpi small {
  color: #8d9e8b;
  font-size: 9px;
  display: block;
  line-height: 1.55;
  min-height: 28px;
}
.kpi:last-child strong {
  font-size: 18px;
  margin-top: 19px;
}
.analytics {
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.card {
  background: #131b15;
  border-color: var(--line);
  padding: 22px;
  border-radius: 12px;
}
.cardHeader h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.2px;
}
.cardHeader small {
  font-size: 9px;
  color: #93a18e;
}
.chart {
  height: 215px;
  margin: 12px 0;
}
.legend {
  font-size: 9px;
  gap: 16px;
}
.swatch {
  width: 6px;
  height: 6px;
}
.validity {
  font-size: 10px;
  background: #30281d;
  border-color: #65533a;
  color: #d7c5a5;
  line-height: 1.7;
  margin-top: 16px;
}
.validity.good {
  background: #1d2c1b;
  border-color: #415639;
  color: #c0d6b4;
}
.compactGrid {
  gap: 9px;
  margin-top: 20px;
}
.compactGrid > div {
  padding: 13px;
  background: #1b251b;
  border-color: #33432e;
  border-radius: 8px;
}
.compactGrid label {
  font-size: 9px;
  color: #9dae96;
}
.compactGrid strong {
  font-size: 23px;
  font-weight: 500;
  margin-top: 8px;
  letter-spacing: -0.6px;
  color: #d4e3c8;
}
.smalltext {
  font-size: 10px;
  line-height: 1.8;
  color: #a2b29a;
  margin-top: 18px;
}
.footer {
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding: 22px 0 6px;
  font-size: 10px;
  line-height: 1.9;
  color: #8e9f8d;
}
.footer summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  color: #c8d6bd;
  cursor: pointer;
}
.footer summary::-webkit-details-marker {
  display: none;
}
.footer summary .icon:last-child {
  margin-left: auto;
  transition: transform 0.2s;
}
.footer details[open] summary .icon:last-child {
  transform: rotate(90deg);
}
.footer details p {
  max-width: 1050px;
}
.footerBottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid #293429;
  margin-top: 20px;
  padding-top: 17px;
  color: #879783;
  font-size: 9px;
}
.footerBrand {
  font-size: 13px;
  letter-spacing: -0.4px;
  color: #b0c4a1;
}
.footerBottom button {
  min-height: 28px;
  padding: 4px 8px;
  background: none;
  border: 0;
  font-size: 9px;
  color: #a3b698;
}
.drawerCover {
  background: #050a07b8;
  backdrop-filter: blur(5px);
}
.drawer {
  width: min(500px, 100vw);
  background: #141e16;
  border-color: #4e6042;
  padding: 28px;
}
.drawerHeader {
  position: sticky;
  top: -28px;
  margin: -28px -28px 18px;
  padding: 24px 28px;
  background: #141e16f5;
  backdrop-filter: blur(12px);
  z-index: 2;
  border-bottom: 1px solid var(--line);
}
.drawerHeader h2 {
  font-size: 19px;
  font-weight: 500;
}
.drawer p {
  font-size: 11px;
  line-height: 1.8;
}
.drawer .setting {
  border-color: #303e2c;
  padding: 18px 0;
}
.drawer .setting label {
  font-size: 11px;
}
.drawer .setting small {
  font-size: 9px;
  line-height: 1.6;
  margin-top: 4px;
}
.drawer h3 {
  font-size: 13px;
  font-weight: 550;
  margin-top: 24px;
}
.drawer input,
.drawer select {
  background: #202b1f;
  border-color: #4b5c40;
  border-radius: 7px;
  font-size: 11px;
}
.drawer button {
  font-size: 11px;
}
.inspector {
  background: #182518ef;
  border-color: #657e50;
  border-radius: 12px;
}
.inspector h3 {
  font-weight: 500;
}
.inspector .detailRows > div {
  background: #253322;
}
.inspector button {
  width: 30px;
  height: 30px;
  min-height: 30px;
}
.helpDialog {
  color: var(--txt);
  background: #172219;
  border: 1px solid #556c46;
  border-radius: 16px;
  width: min(440px, calc(100% - 32px));
  padding: 25px;
  box-shadow: 0 32px 100px #000a;
}
.helpDialog::backdrop {
  background: #050a07b8;
  backdrop-filter: blur(6px);
}
.helpHeading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.helpHeading h2 {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.7px;
  margin: 0;
}
.helpHeading button {
  min-height: 32px;
  height: 32px;
  width: 32px;
  padding: 5px;
  background: none;
}
.helpDialog p {
  font-size: 11px;
  color: var(--dim);
  line-height: 1.8;
}
.shortcutRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid #35432e;
  font-size: 12px;
  color: #c3d3b9;
}
.shortcutRow kbd {
  border: 1px solid #526346;
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 3px 8px;
  font:
    10px ui-monospace,
    monospace;
  background: #253322;
  color: #d2e4c4;
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  padding: 12px 18px;
  background: #d3e8c0;
  color: #1c2e12;
  border: 1px solid #b5cd9e;
  border-radius: 10px;
  box-shadow: 0 10px 40px #0005;
  z-index: 60;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.views.focusMode {
  position: fixed;
  inset: 0;
  z-index: 40;
  padding: 24px 24px 82px;
  background: #0b100c;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  overflow: auto;
}
.views.focusMode .scene {
  height: 100%;
  min-height: 350px;
}
.focusClose {
  display: none;
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 41;
  background: #243220;
  border-color: #72865d;
  box-shadow: 0 6px 30px #0008;
}
.focusClose.visible {
  display: inline-flex;
}
body.panelOpen {
  overflow: hidden;
}
@keyframes statusPulse {
  50% {
    opacity: 0.35;
  }
}
@media (min-width: 1600px) {
  .pageHeading {
    padding-top: 44px;
    padding-bottom: 34px;
  }
  .scene {
    height: clamp(480px, 57vh, 720px);
  }
}
@media (max-width: 1180px) {
  .top {
    gap: 20px;
  }
  .topnav {
    gap: 18px;
  }
  .status {
    display: none;
  }
  .headingMeta {
    max-width: 245px;
  }
  .stagepill {
    white-space: normal;
    text-align: left;
  }
  .kpi {
    padding: 14px;
  }
  .kpi strong {
    font-size: 20px;
  }
  .sceneTop {
    padding: 16px;
  }
  .sceneTop small,
  .sceneTop .tag {
    margin-left: 0;
  }
  .sceneTop strong {
    font-size: 14px;
  }
  .sceneBottom {
    padding-left: 16px;
    padding-right: 16px;
  }
  .sceneBottom strong {
    font-size: 23px;
  }
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kpi:last-child {
    grid-column: span 2;
  }
  .kpi:last-child strong {
    margin-top: 14px;
  }
  .sceneTop .tag {
    max-width: 90%;
  }
  .cornerTools {
    top: 130px;
  }
  .analytics {
    grid-template-columns: 1.2fr 1fr;
  }
}
@media (max-width: 800px) {
  .top {
    padding: 12px 20px;
    gap: 15px;
    flex-wrap: wrap;
    min-height: 72px;
  }
  .topnav {
    order: 3;
    width: 100%;
    gap: 24px;
    height: 32px;
  }
  .topnav a {
    font-size: 11px;
  }
  .topright {
    margin-left: auto;
    gap: 7px;
  }
  .topright #resetCamera {
    width: 36px;
    padding: 7px;
  }
  .topright #resetCamera span {
    display: none;
  }
  .topright #settingsOpen {
    font-size: 10px;
    min-height: 36px;
  }
  .brandname {
    font-size: 19px;
  }
  .brandname span {
    display: none;
  }
  .pageHeading {
    padding-top: 28px;
    align-items: flex-start;
  }
  .pageHeading h1 {
    font-size: 32px;
  }
  .pageHeading p {
    font-size: 11px;
  }
  .headingMeta {
    max-width: 190px;
    padding-top: 5px;
  }
  .labLabel {
    font-size: 8px;
  }
  .stagepill {
    font-size: 9px;
  }
  .viewbar {
    padding: 12px 0;
  }
  .switches {
    width: 100%;
    justify-content: center;
  }
  .switches button {
    flex: 1;
    padding: 8px;
    font-size: 10px;
  }
  .camActions {
    width: 100%;
    justify-content: flex-end;
  }
  .camActions #flowerFocus {
    margin-right: auto;
  }
  .views {
    gap: 12px;
  }
  .scene {
    height: 440px;
  }
  .sceneTop strong {
    font-size: 13px;
    gap: 7px;
  }
  .sceneTop small {
    font-size: 9px;
  }
  .sceneBottom strong {
    font-size: 22px;
  }
  .sceneBottom span {
    font-size: 8px;
  }
  .sceneBottom .right {
    padding-left: 8px;
  }
  .sceneTop .tag {
    font-size: 8px;
  }
  .ledCount {
    left: 16px;
    font-size: 8px;
    max-width: calc(100% - 32px);
  }
  .analytics {
    grid-template-columns: 1fr;
  }
  .kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .kpi:last-child {
    grid-column: span 2;
  }
  .player {
    gap: 9px;
    padding: 11px;
  }
  .player .muted {
    display: none;
  }
  .player input {
    min-width: 90px;
  }
  .player button {
    padding: 8px 10px;
  }
  .player select {
    width: 58px;
  }
  .player #exportButton span {
    display: none;
  }
  .player #exportButton {
    width: 36px;
    padding: 7px;
  }
  .startOverlay {
    bottom: 122px;
    width: 330px;
    padding: 20px;
  }
  .startOverlay h2 {
    font-size: 23px;
  }
  .story {
    margin-bottom: 25px;
  }
  .sceneHint {
    font-size: 9px;
  }
  .footerBottom {
    align-items: flex-start;
  }
}
@media (max-width: 580px) {
  html {
    scroll-padding-top: 136px;
  }
  .layout {
    padding-left: 16px;
    padding-right: 16px;
  }
  .top {
    padding: 10px 16px;
    gap: 6px 12px;
  }
  .brand .eyebrow {
    font-size: 7px;
  }
  .mark {
    width: 28px;
  }
  .mark .icon {
    width: 27px;
    height: 27px;
  }
  .topnav {
    gap: 22px;
    margin-top: 6px;
  }
  .topnav a {
    font-size: 10px;
  }
  .topright #settingsOpen span {
    display: none;
  }
  .topright #settingsOpen {
    width: 36px;
    padding: 8px;
  }
  .pageHeading {
    padding: 26px 0 22px;
    display: block;
  }
  .pageHeading h1 {
    font-size: 33px;
    letter-spacing: -1.3px;
    margin: 10px 0;
  }
  .pageHeading p {
    font-size: 11px;
    max-width: 330px;
  }
  .headingMeta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: none;
    text-align: left;
    margin-top: 18px;
    gap: 10px;
  }
  .labLabel {
    margin: 0;
    font-size: 8px;
    white-space: nowrap;
  }
  .stagepill {
    font-size: 8px;
    max-width: 200px;
    padding: 5px 8px;
  }
  .switches button {
    font-size: 9px;
    gap: 5px;
    min-height: 36px;
  }
  .switches .icon {
    width: 13px;
    height: 13px;
  }
  .camActions {
    gap: 5px;
  }
  .camActions button {
    min-height: 36px;
  }
  .camActions #zoomIn,
  .camActions #zoomOut {
    width: 34px;
    padding: 7px;
  }
  .camActions #zoomIn span,
  .camActions #zoomOut span {
    display: none;
  }
  .camActions #flowerFocus {
    font-size: 10px;
    padding: 7px;
  }
  .toolDivider {
    margin: 0 2px;
  }
  .views {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .scene {
    height: 440px;
  }
  .sceneTop {
    padding: 18px;
  }
  .sceneTop strong {
    font-size: 16px;
    gap: 10px;
  }
  .sceneTop small,
  .sceneTop .tag {
    margin-left: 35px;
  }
  .sceneTop .tag {
    font-size: 8px;
  }
  .sceneBottom {
    padding: 36px 20px 20px;
  }
  .sceneBottom strong {
    font-size: 28px;
  }
  .sceneBottom span {
    font-size: 9px;
  }
  .ledCount {
    left: 20px;
    font-size: 9px;
  }
  .cornerTools {
    top: 120px;
  }
  .startOverlay {
    position: absolute;
    top: 148px;
    bottom: auto;
    left: 50%;
    width: calc(100% - 36px);
    max-width: 350px;
    padding: 20px;
  }
  .startOverlay p {
    margin-bottom: 14px;
  }
  .startOverlay small {
    font-size: 9px;
  }
  .sceneHint {
    display: none;
  }
  .player {
    display: grid;
    grid-template-columns: auto auto 1fr auto;
    gap: 10px;
  }
  .player #playButton {
    grid-column: 1;
  }
  .player #rewindButton {
    grid-column: 2;
  }
  .player .date {
    grid-column: 3;
    text-align: right;
    min-width: 0;
    font-size: 10px;
  }
  .player input {
    grid-row: 2;
    grid-column: 1 / 4;
    min-width: 0;
    width: 100%;
    margin: 0;
  }
  .player #speed {
    grid-row: 2;
    grid-column: 4;
    width: 53px;
  }
  .player #exportButton {
    grid-row: 1;
    grid-column: 4;
    width: 36px;
  }
  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi:last-child {
    grid-column: span 2;
  }
  .kpi strong {
    font-size: 22px;
    margin-top: 15px;
  }
  .kpi:last-child strong {
    font-size: 19px;
  }
  .kpi:last-child small {
    min-height: 0;
  }
  .kpi label {
    font-size: 9px;
  }
  .kpi small {
    font-size: 9px;
    min-height: 29px;
  }
  .kpi > .icon {
    right: 12px;
    width: 14px;
  }
  .sectionHeading h2 {
    font-size: 15px;
  }
  .sectionHeading > span {
    font-size: 8px;
  }
  .sectionHeading .textControl {
    display: none;
  }
  .story {
    font-size: 10px;
  }
  .story button {
    width: 100%;
    justify-content: space-between;
  }
  .card {
    padding: 17px;
  }
  .cardHeader h2 {
    font-size: 12px;
  }
  .cardHeader small {
    font-size: 9px;
  }
  .chart {
    height: 190px;
  }
  .legend .muted {
    width: 100%;
  }
  .compactGrid strong {
    font-size: 22px;
  }
  .footerBottom {
    flex-wrap: wrap;
    gap: 10px;
  }
  .footerBottom > span:nth-child(2) {
    width: 100%;
    order: 3;
  }
  .drawer {
    padding: 22px;
  }
  .drawerHeader {
    top: -22px;
    margin: -22px -22px 18px;
    padding: 20px 22px;
  }
  .drawerHeader h2 {
    font-size: 18px;
  }
  .drawer .setting {
    gap: 14px;
  }
  .setting select,
  .setting input {
    max-width: 130px;
  }
  .views.focusMode {
    grid-template-columns: 1fr;
    padding: 12px 12px 70px;
  }
  .views.focusMode .scene {
    height: 450px;
    min-height: 450px;
  }
  .views.focusMode .startOverlay {
    top: 125px;
  }
  .helpDialog {
    padding: 22px;
  }
  .helpHeading h2 {
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Warm instrument shell; scene viewports keep their own dark environment. */
:root {
  color-scheme: light;
  --bg: #eeeee7;
  --surface: #f7f7f1;
  --card: #f7f7f1;
  --line: #d2d5c9;
  --txt: #282d26;
  --dim: #646d60;
  --muted: #77806e;
}
body {
  background: #eeeee7;
  color: #282d26;
}
button {
  background: #f7f7f1;
  border-color: #cbd0c2;
  color: #424b3a;
}
button:hover {
  background: #e5e9dd;
  border-color: #8b9a7b;
}
.top {
  background: #f4f4edf5;
  border-bottom-color: #cdd2c3;
}
.mark {
  color: #4c603d;
}
.brandname {
  color: #2a3225;
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 25px;
  letter-spacing: -1.2px;
}
.brandname span {
  color: #747d6b;
  font-family: 'Segoe UI', sans-serif;
}
.brand .eyebrow {
  color: #75816b;
}
.topnav a {
  color: #727968;
}
.topnav a:hover,
.topnav a.active {
  color: #344b2b;
}
.topnav a.active:after {
  background: #536a40;
}
.status {
  color: #69775c;
}
.status:before {
  background: #789458;
  box-shadow: none;
}
.topright #settingsOpen {
  background: #323e2b;
  border-color: #323e2b;
  color: #eff3e9;
}
.topright #settingsOpen:hover {
  background: #46553c;
}
.pageHeading {
  padding-top: 30px;
  padding-bottom: 27px;
}
.pageHeading > .eyebrow,
.pageHeading .eyebrow {
  color: #6c795e;
  font:
    10px ui-monospace,
    monospace;
  letter-spacing: 0.09em;
}
.pageHeading h1 {
  font-size: 36px;
  letter-spacing: -1.5px;
  color: #2c3426;
  font-weight: 450;
  margin: 10px 0;
}
.pageHeading h1 em {
  color: inherit;
}
.pageHeading p {
  color: #6f7966;
  font-size: 12px;
  max-width: 600px;
}
.labLabel {
  color: #78856a;
}
.stagepill {
  background: #e2e7d9;
  border-color: #c1ccb3;
  color: #4e6540;
  border-radius: 5px;
}
.stagepill:before {
  background: #728e52;
}
.viewbar {
  border-color: #cfd5c4;
}
.switches {
  background: #e2e6da;
  border-color: #cbd3c0;
  border-radius: 6px;
}
.switches button {
  color: #748066;
}
.switches button.active {
  background: #fafcf5;
  color: #374d2c;
  box-shadow:
    0 1px 3px #273b1917,
    inset 0 0 0 1px #c9d3bc;
  border-radius: 4px;
}
.camActions button {
  color: #617151;
  border-color: #c8d1bd;
  border-radius: 6px;
}
.camActions button:hover {
  background: #e1e7d8;
  color: #34492b;
}
.toolDivider {
  background: #c4ceba;
}
.scene {
  color: #edf2ec;
  border-radius: 10px;
  border-color: #5b6950;
  box-shadow: 0 4px 16px #29341a12;
}
.scene:nth-child(2) {
  border-color: #879970;
}
.sceneTop,
.sceneBottom {
  color: #edf2ec;
}
.sceneHint {
  color: #77866a;
}
.sceneHint b {
  color: #546748;
}
.sceneHint .hintKey {
  background: #e0e7d7;
  border-color: #c1ceaf;
  color: #667c53;
}
.startOverlay {
  color: #edf2ec;
}
.startOverlay .eyebrow {
  color: #b7d79b;
}
.player {
  background: #f7f8f1;
  border-color: #c7d2bb;
  border-radius: 8px;
  box-shadow: 0 1px 3px #21390e08;
}
.player .date {
  color: #546548;
}
.player .muted {
  color: #78896a;
}
.player select {
  background: #edf1e5;
  color: #576c46;
  border-color: #cad5bd;
}
.primary {
  background: #34492b;
  color: #f0f5e9;
  border-color: #34492b;
}
.primary:hover {
  background: #50653e;
  color: #fff;
}
.player .primary {
  background: #34492b;
  color: #eff5e6;
  border-color: #34492b;
}
.story {
  color: #78876b;
  border-color: #9aaa83;
}
.story strong {
  color: #465d37;
}
.story button {
  border-color: #c8d3bb;
  color: #687e53;
}
.sectionHeading h2 {
  color: #34452c;
}
.sectionHeading span {
  color: #7b8d6b;
}
.kpis {
  gap: 0;
  border: 1px solid #cbd6bd;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f7ee;
}
.kpi {
  background: none;
  border: 0;
  border-radius: 0;
  border-right: 1px solid #d2dbc6;
  padding: 19px 20px;
}
.kpi:last-child {
  border-right: 0;
}
.kpi:before {
  display: none;
}
.kpi label {
  color: #748268;
}
.kpi > .icon {
  color: #91a57b;
}
.kpi strong {
  color: #3c4f30;
  font-weight: 450;
}
.kpi .accentAmber {
  color: #9a7546;
}
.kpi .accentMint {
  color: #587d3e;
}
.kpi small {
  color: #869577;
}
.kpi .warning {
  color: #9a6541;
}
.analytics .card {
  background: #1b221c;
  color: #e0e9d8;
  border-color: #394630;
  border-radius: 8px;
}
.analytics .card h2 {
  color: #d8e4cc;
}
.compactGrid strong {
  color: #d4e3c8;
}
.footer {
  border-color: #c5d1b5;
  color: #788b68;
}
.footer summary {
  color: #506740;
}
.footerBottom {
  border-color: #c5d1b5;
  color: #80936f;
}
.footerBrand {
  color: #516a40;
  font-family: Georgia, serif;
  font-size: 17px;
}
.footerBottom button {
  color: #6e8757;
}
.drawerCover,
.drawer,
.inspector,
.helpDialog {
  color: #edf2ec;
  color-scheme: dark;
}
.drawer button,
.inspector button,
.helpDialog button {
  color: #c4d5b8;
  background: #24341f;
  border-color: #4f633f;
}
.focusClose {
  color: #d4e6c6;
}
.skipLink {
  color: #fff;
  background: #405c30;
}
.toast {
  background: #34492b;
  border-color: #718c59;
  color: #f1f6e9;
}
@media (max-width: 1180px) {
  .kpis {
    gap: 0;
  }
  .kpi {
    padding: 17px;
    border-bottom: 1px solid #d2dbc6;
  }
  .kpi:nth-child(3) {
    border-right: 0;
  }
  .kpi:nth-child(4),
  .kpi:nth-child(5) {
    border-bottom: 0;
  }
}
@media (max-width: 580px) {
  .brandname {
    font-size: 23px;
  }
  .pageHeading h1 {
    font-size: 32px;
  }
  .pageHeading {
    padding-top: 25px;
  }
  .kpi {
    padding: 16px;
  }
  .kpi:nth-child(2n) {
    border-right: 0;
  }
  .kpi:nth-child(3) {
    border-right: 1px solid #d2dbc6;
  }
  .kpi:nth-child(4) {
    border-bottom: 1px solid #d2dbc6;
  }
  .kpi:last-child {
    border-right: 0;
  }
  .kpi:last-child small {
    min-height: 0;
  }
}
