    :root {
      color-scheme: dark;
      --bg: #080a0d;
      --panel: #111722;
      --panel2: #172030;
      --text: #e9edf5;
      --muted: #9aa7b7;
      --line: #2b3546;
      --accent: #72d7ff;
      --good: #78e29b;
      --warn: #f1c76b;
      --bad: #ff7272;
      --app-hero-image: url('/images/vinna-comfy-20260526-130519-27fc9542.png');
      --side-nav-width: 310px;
    }
    * { box-sizing: border-box; }
    body {
      margin: 0;
      font: 14px/1.45 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      background:
        linear-gradient(115deg, rgba(8,10,13,0.94), rgba(8,10,13,0.82)),
        var(--app-hero-image) center center / cover fixed no-repeat,
        var(--bg);
      color: var(--text);
    }
    body.logged-out header,
    body.logged-out #main-nav,
    body.logged-out #menu-backdrop { display: none; }
    body.logged-out main {
      max-width: none;
      padding: 0;
    }
    body.logged-out #status { display: none; }
    header {
      position: sticky;
      top: 0;
      z-index: 10;
      background: rgba(8, 10, 13, 0.96);
      border-bottom: 1px solid var(--line);
      padding: 14px 18px;
      display: grid;
      grid-template-columns: auto auto 1fr auto;
      gap: 14px;
      align-items: center;
      transition: margin-left 160ms ease-out;
    }
    h1 {
      margin: 0;
      font-size: 20px;
      letter-spacing: 0.08em;
      font-weight: 650;
    }
    .menu-toggle {
      width: 38px;
      min-height: 38px;
      padding: 8px;
      display: grid;
      align-content: center;
      gap: 4px;
    }
    .menu-toggle span {
      display: block;
      height: 2px;
      border-radius: 999px;
      background: var(--text);
    }
    .menu-backdrop {
      position: fixed;
      inset: 0;
      z-index: 39;
      background: rgba(0, 0, 0, 0.48);
    }
    .side-nav {
      position: fixed;
      inset: 0 auto 0 0;
      z-index: 40;
      width: min(var(--side-nav-width), 86vw);
      display: grid;
      grid-template-rows: auto 1fr;
      background: rgba(10, 14, 21, 0.98);
      border-right: 1px solid var(--line);
      box-shadow: 18px 0 48px rgba(0, 0, 0, 0.35);
      transform: translateX(-100%);
      transition: transform 160ms ease-out;
    }
    body.menu-open .side-nav {
      transform: translateX(0);
    }
    .side-nav-head {
      min-height: 64px;
      padding: 14px 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      border-bottom: 1px solid var(--line);
    }
    .side-nav-head strong {
      letter-spacing: 0.08em;
    }
    .menu-close {
      width: 34px;
      min-height: 34px;
      padding: 0;
      font-weight: 800;
    }
    .side-nav-body {
      overflow-y: auto;
      padding: 12px;
      display: grid;
      align-content: start;
      gap: 14px;
    }
    .nav-symbols {
      position: absolute;
      width: 0;
      height: 0;
      overflow: hidden;
      pointer-events: none;
    }
    .side-nav-section {
      display: grid;
      gap: 5px;
    }
    .side-nav-section > span {
      padding: 4px 8px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .side-nav .tab {
      display: flex;
      align-items: center;
      gap: 10px;
      width: 100%;
      text-align: left;
      min-height: 36px;
      border-color: transparent;
      background: transparent;
      text-decoration: none;
      color: var(--text);
    }
    .side-nav .tab:hover {
      border-color: var(--line);
      background: rgba(114, 215, 255, 0.08);
    }
    .side-nav .tab.active {
      border-color: rgba(114, 215, 255, 0.55);
      background: rgba(18, 56, 75, 0.8);
    }
    .side-nav .tab > span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .side-nav .nav-icon {
      width: 18px;
      height: 18px;
      flex: 0 0 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      color: #8bb4ca;
      opacity: 0.92;
    }
    .side-nav .tab:hover .nav-icon,
    .side-nav .tab.active .nav-icon {
      color: var(--accent);
      opacity: 1;
    }
    input, select, button, textarea, .button-link {
      border: 1px solid var(--line);
      background: #0d131d;
      color: var(--text);
      border-radius: 6px;
      min-height: 34px;
      padding: 7px 9px;
      font: inherit;
    }
    .button-link {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
      background: #172232;
      white-space: nowrap;
    }
    .button-link:hover {
      border-color: rgba(114, 215, 255, 0.45);
      background: #1a2b40;
    }
    textarea {
      min-height: 80px;
      resize: vertical;
    }
    button {
      cursor: pointer;
      background: #172232;
    }
    button.active, button.primary {
      border-color: #267aa0;
      background: #12384b;
    }
    button.danger {
      border-color: #7a2c35;
      background: #35161b;
    }
    main {
      padding: 18px;
      max-width: 1840px;
      margin: 0 auto;
      transition: margin-left 160ms ease-out, margin-right 160ms ease-out, max-width 160ms ease-out;
    }
    .toolbar {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .toolbar input[type="search"] { min-width: 260px; }
    .authbar {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .login {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .status {
      color: var(--muted);
      margin: 0 0 14px;
    }
    .public {
      --public-hero-image: var(--app-hero-image);
      min-height: 100vh;
      display: grid;
      align-items: center;
      padding: 28px;
      position: relative;
      overflow: hidden;
      background:
        linear-gradient(115deg, rgba(8,10,13,0.18), rgba(8,10,13,0.9) 76%),
        repeating-linear-gradient(90deg, rgba(114,215,255,0.08) 0 1px, transparent 1px 96px),
        repeating-linear-gradient(0deg, rgba(120,226,155,0.05) 0 1px, transparent 1px 78px),
        var(--public-hero-image) center center / cover no-repeat,
        #080a0d;
    }
    .public::before {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        linear-gradient(0deg, rgba(255,255,255,0.035) 0 1px, transparent 1px 4px),
        radial-gradient(circle at 24% 26%, rgba(241,199,107,0.12), transparent 24%);
      mix-blend-mode: screen;
      opacity: 0.42;
    }
    .public::after {
      content: "VINNA // PUBLIC NODE // ACCESS CONTROL ACTIVE";
      position: absolute;
      left: 28px;
      bottom: 20px;
      color: rgba(233,237,245,0.42);
      font-size: 11px;
      letter-spacing: 0.16em;
    }
    .public-shell {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
      gap: 28px;
      align-items: center;
      width: min(1120px, 100%);
      margin: 0 auto;
    }
    .public-intro {
      display: grid;
      align-content: center;
      justify-items: center;
      min-height: 380px;
      text-align: center;
    }
    .public-kicker {
      color: var(--good);
      font-size: 12px;
      letter-spacing: 0.16em;
      margin-bottom: 12px;
      text-transform: uppercase;
    }
    .public-intro h2 {
      margin: 0 0 12px;
      font-size: 74px;
      line-height: 1;
      letter-spacing: 0;
    }
    .public-intro p {
      color: var(--muted);
      max-width: 680px;
      margin: 0;
      font-size: 16px;
    }
    .public-signals {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      max-width: 660px;
      width: 100%;
      margin-top: 22px;
    }
    .public-signals span {
      border: 1px solid rgba(114,215,255,0.24);
      background: rgba(5,7,10,0.58);
      border-radius: 6px;
      color: #d5edf8;
      padding: 9px 10px;
      font-size: 12px;
    }
    .public-login {
      border: 1px solid var(--line);
      background: rgba(11, 16, 24, 0.88);
      border-radius: 8px;
      padding: 22px;
      display: grid;
      gap: 12px;
      align-content: center;
      box-shadow: 0 20px 80px rgba(0,0,0,0.34);
      backdrop-filter: blur(12px);
    }
    .public-login strong {
      color: var(--text);
      font-size: 16px;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .public-login form {
      display: grid;
      gap: 10px;
    }
    .public-login input,
    .public-login button {
      width: 100%;
    }
    .public-notes {
      color: var(--muted);
      display: grid;
      gap: 8px;
      margin-top: 6px;
    }
    .public-notes div {
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 6px;
      padding: 9px 10px;
    }
    .public-browse {
      grid-column: 1 / -1;
      display: grid;
      gap: 10px;
      border-top: 1px solid rgba(114,215,255,0.2);
      padding-top: 16px;
    }
    .public-browse-head {
      display: flex;
      gap: 10px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
    }
    .public-browse-head input {
      min-width: min(420px, 100%);
      background: rgba(5,7,10,0.72);
    }
    .public-gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 10px;
    }
    .public-gallery a {
      min-height: 160px;
      border: 1px solid rgba(114,215,255,0.22);
      border-radius: 8px;
      overflow: hidden;
      background: rgba(5,7,10,0.72);
      display: grid;
      grid-template-rows: 128px auto;
      color: var(--text);
      text-decoration: none;
      transition: border-color 0.16s ease, transform 0.16s ease;
    }
    .public-gallery a:hover {
      border-color: rgba(120,226,155,0.58);
      transform: translateY(-1px);
    }
    .public-gallery img {
      width: 100%;
      height: 128px;
      object-fit: cover;
      background: #05070a;
    }
    .public-gallery span {
      padding: 8px;
      color: var(--muted);
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .public-gallery .public-thumb {
      border: 1px solid rgba(114,215,255,0.22);
      border-radius: 8px;
      overflow: hidden;
      background: rgba(5,7,10,0.72);
      display: grid;
      gap: 6px;
      padding: 6px;
      white-space: normal;
    }
    .public-gallery .public-thumb img {
      height: 128px;
      border-radius: 4px;
    }
    .public-image-view {
      min-height: 100vh;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 340px;
      gap: 18px;
      padding: 18px;
    }
    .public-image-frame {
      display: grid;
      place-items: center;
      min-height: calc(100vh - 36px);
      background: #05070a;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
    }
    .public-image-frame img {
      max-width: 100%;
      max-height: calc(100vh - 56px);
      object-fit: contain;
    }
    .public-image-meta {
      align-self: start;
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      padding: 14px;
      display: grid;
      gap: 10px;
    }
    .public-image-meta .status { white-space: pre-wrap; }
    .panel {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      padding: 14px;
      margin-bottom: 14px;
    }
    .render-queue-card {
      border: 1px solid var(--line);
      background: rgba(13, 19, 29, 0.72);
      border-radius: 8px;
      padding: 10px 12px;
      margin: 10px 0 14px;
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto;
      gap: 10px;
      align-items: center;
    }
    .render-queue-card.active {
      border-color: rgba(241,199,107,0.5);
      background: rgba(45, 36, 18, 0.35);
    }
    .workbench-summary,
    .workbench-hosts,
    .workbench-tasks,
    .workbench-snapshots {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 12px;
    }
    .workbench-stat,
    .workbench-host,
    .workbench-task,
    .workbench-snapshot {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
      background: rgba(255, 255, 255, .03);
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }
    .workbench-stat strong {
      font-size: 1.6rem;
      line-height: 1;
    }
    .workbench-stat.good,
    .workbench-host.good {
      border-color: rgba(120, 226, 155, .45);
    }
    .workbench-stat.warn,
    .workbench-host.warn,
    .workbench-task.open {
      border-color: rgba(241, 199, 107, .55);
    }
    .workbench-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .workbench-search {
      display: grid;
      grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .8fr) auto;
      gap: 10px;
      align-items: end;
    }
    .workbench-search label {
      display: grid;
      gap: 5px;
      min-width: 0;
    }
    .workbench-search label span {
      color: var(--muted);
      font-size: .9rem;
    }
    .workbench-command-form {
      display: grid;
      grid-template-columns: minmax(160px, .7fr) minmax(220px, 1fr) minmax(180px, .8fr) auto;
      gap: 10px;
      align-items: end;
    }
    .workbench-log-form {
      display: grid;
      grid-template-columns: minmax(110px, .35fr) minmax(160px, .55fr) minmax(160px, .55fr) minmax(180px, .7fr) minmax(220px, 1fr) auto auto auto;
      gap: 10px;
      align-items: end;
    }
    .workbench-command-form label {
      display: grid;
      gap: 5px;
      min-width: 0;
    }
    .workbench-log-form label {
      display: grid;
      gap: 5px;
      min-width: 0;
    }
    .workbench-log-form .checkline {
      display: flex;
      align-items: center;
      gap: 6px;
      min-height: 38px;
      white-space: nowrap;
    }
    .workbench-command-form label span {
      color: var(--muted);
      font-size: .9rem;
    }
    .workbench-log-form label span {
      color: var(--muted);
      font-size: .9rem;
    }
    .workbench-command-output {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(2, 6, 12, .55);
      color: var(--text);
      margin: 10px 0 0;
      min-height: 70px;
      max-height: 420px;
      overflow: auto;
      padding: 10px;
      white-space: pre;
      font-size: .86rem;
      line-height: 1.45;
    }
    .workbench-code-layout {
      display: grid;
      grid-template-columns: minmax(260px, .8fr) minmax(340px, 1.2fr);
      gap: 12px;
      margin-top: 12px;
    }
    .workbench-search-results {
      display: grid;
      gap: 8px;
      max-height: 520px;
      overflow: auto;
    }
    .workbench-search-result {
      border: 1px solid var(--line);
      background: rgba(255, 255, 255, .03);
      border-radius: 8px;
      padding: 10px;
      display: grid;
      gap: 6px;
      text-align: left;
      color: inherit;
      cursor: pointer;
    }
    .workbench-search-result:hover,
    .workbench-search-result.active {
      border-color: rgba(120, 190, 255, .55);
      background: rgba(70, 130, 190, .12);
    }
    .workbench-search-result strong,
    .workbench-search-result code {
      overflow-wrap: anywhere;
    }
    .workbench-file-preview {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(2, 6, 12, .55);
      color: var(--text);
      margin: 0;
      padding: 10px;
      min-height: 240px;
      max-height: 520px;
      overflow: auto;
      white-space: pre;
      font-size: .86rem;
      line-height: 1.45;
    }
    .workbench-explain-bar {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto auto auto auto;
      gap: 8px;
      margin: 0 0 8px;
    }
    .workbench-explain-result {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, .03);
      margin-top: 8px;
      padding: 12px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      min-height: 44px;
      color: var(--text);
    }
    .workbench-diff-tools {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      margin-top: 8px;
    }
    .workbench-chat {
      margin-top: 10px;
      display: grid;
      gap: 8px;
    }
    .workbench-chat-log {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(2, 6, 12, .42);
      min-height: 120px;
      max-height: 360px;
      overflow: auto;
      padding: 10px;
      display: grid;
      gap: 8px;
    }
    .workbench-chat-message {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 9px 10px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      background: rgba(255, 255, 255, .03);
    }
    .workbench-chat-message.user {
      border-color: rgba(120, 190, 255, .4);
      background: rgba(70, 130, 190, .10);
    }
    .workbench-chat-message.assistant {
      border-color: rgba(120, 226, 155, .3);
    }
    .workbench-chat-message strong {
      display: block;
      margin-bottom: 4px;
    }
    .workbench-chat-form {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) auto;
      gap: 8px;
    }
    .workbench-log-summary {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-top: 10px;
      min-height: 26px;
      align-items: center;
    }
    .workbench-log-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      max-height: 520px;
      overflow: auto;
    }
    .workbench-log-card {
      border: 1px solid var(--line);
      border-left-width: 4px;
      border-radius: 8px;
      background: rgba(2, 6, 12, .45);
      padding: 10px;
      display: grid;
      gap: 7px;
    }
    .workbench-log-card.level-warning,
    .workbench-log-card.level-warn {
      border-left-color: var(--warn);
    }
    .workbench-log-card.level-error,
    .workbench-log-card.level-critical,
    .workbench-log-card.level-fatal {
      border-left-color: var(--bad);
    }
    .workbench-log-head,
    .workbench-log-foot {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-width: 0;
    }
    .workbench-log-meta,
    .workbench-log-actions {
      display: flex;
      align-items: center;
      gap: 8px;
      min-width: 0;
      flex-wrap: wrap;
    }
    .workbench-log-actions {
      flex: 0 0 auto;
      justify-content: flex-end;
    }
    .buttonlike {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      text-decoration: none;
    }
    .workbench-log-head span,
    .workbench-log-foot span,
    .workbench-log-foot code {
      color: var(--muted);
      overflow-wrap: anywhere;
      min-width: 0;
    }
    .workbench-log-card p {
      margin: 0;
      overflow-wrap: anywhere;
    }
    .workbench-log-card pre {
      max-height: 180px;
      overflow: auto;
      white-space: pre-wrap;
      margin: 0;
      color: var(--text);
    }
    .workbench-table-wrap {
      overflow-x: auto;
    }
    .workbench-table {
      width: 100%;
      border-collapse: collapse;
      min-width: 720px;
    }
    .workbench-table th,
    .workbench-table td {
      border-bottom: 1px solid var(--line);
      padding: 8px;
      text-align: left;
      vertical-align: top;
    }
    .workbench-table code,
    .workbench-snapshot code {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .workbench-task-question {
      margin: 0;
      color: var(--muted);
      overflow-wrap: anywhere;
    }
    .workbench-diff-preview,
    .workbench-task-diff {
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(2, 6, 12, .45);
      color: var(--text);
      white-space: pre;
      overflow: auto;
      font-size: .82rem;
      line-height: 1.4;
    }
    .workbench-diff-preview {
      display: block;
      max-height: 180px;
      padding: 8px;
    }
    .workbench-task-detail {
      display: grid;
      gap: 8px;
      margin-top: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(255, 255, 255, .025);
      padding: 12px;
    }
    .workbench-task-detail:empty {
      display: none;
    }
    .workbench-task-detail span {
      color: var(--muted);
      font-size: .9rem;
    }
    .workbench-task-detail p {
      margin: 0;
      overflow-wrap: anywhere;
    }
    .workbench-task-diff {
      margin: 0;
      max-height: 420px;
      padding: 10px;
    }
    .linklike {
      border: 0;
      background: transparent;
      color: inherit;
      padding: 0;
      text-align: left;
      cursor: pointer;
    }
    .linklike:hover {
      color: #9fd3ff;
    }
    .workbench-task span,
    .workbench-host span,
    .workbench-snapshot span {
      color: var(--muted);
      font-size: .9rem;
    }
    @media (max-width: 800px) {
      .workbench-search,
      .workbench-command-form,
      .workbench-log-form,
      .workbench-code-layout,
      .workbench-explain-bar,
      .workbench-chat-form {
        grid-template-columns: 1fr;
      }
    }
    .render-queue-label {
      display: block;
      color: var(--muted);
      font-size: 12px;
      margin-top: 2px;
    }
    .render-queue-metrics {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .pill.danger {
      border-color: rgba(255, 116, 116, 0.42);
      color: #ffb3b3;
      background: rgba(80, 20, 25, 0.32);
    }
    .render-queue-toolbar {
      justify-content: space-between;
    }
    .render-queue-list {
      display: grid;
      gap: 10px;
    }
    .render-worker-list {
      display: grid;
      gap: 10px;
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .render-worker-card {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .render-worker-card.active {
      border-color: rgba(241,199,107,0.58);
      background: rgba(45, 36, 18, 0.35);
    }
    .render-worker-card.disabled {
      opacity: 0.72;
    }
    .render-worker-head {
      display: flex;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
    }
    .render-worker-url {
      color: var(--muted);
      font-size: 12px;
      overflow-wrap: anywhere;
    }
    .render-worker-stats {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }
    .render-worker-stats span {
      overflow-wrap: anywhere;
    }
    .render-queue-job,
    .render-queue-empty {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .render-queue-job.active {
      border-color: rgba(241,199,107,0.58);
      background: rgba(45, 36, 18, 0.35);
    }
    .render-queue-job-header,
    .render-queue-job-meta {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      align-items: center;
    }
    .render-queue-job-header {
      justify-content: space-between;
    }
    .render-queue-cancel {
      margin-left: auto;
    }
    .render-queue-job-prompt {
      margin: 0;
      border: 1px solid rgba(120,150,170,0.22);
      border-radius: 8px;
      padding: 10px;
      background: rgba(5, 8, 13, 0.48);
      color: var(--muted);
      font-size: 12px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      max-height: 180px;
      overflow: auto;
    }
    .stats {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 10px;
    }
    .dashgrid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 14px;
    }
    .node-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
      gap: 14px;
      margin-bottom: 14px;
    }
    .node-card {
      padding: 14px;
      display: grid;
      gap: 10px;
    }
    .node-attention-panel {
      display: grid;
      gap: 10px;
      border-color: rgba(114,240,214,0.28);
      background: rgba(4, 10, 14, 0.78);
    }
    .node-attention-head {
      display: flex;
      gap: 10px;
      justify-content: space-between;
      align-items: center;
      flex-wrap: wrap;
    }
    .node-attention-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 8px;
    }
    .node-attention-grid > span {
      border: 1px solid rgba(114,240,214,0.18);
      border-radius: 8px;
      background: rgba(8, 14, 20, 0.74);
      padding: 8px 10px;
      min-height: 38px;
      overflow-wrap: anywhere;
    }
    .node-attention-grid > span:nth-child(odd) {
      color: #ffd966;
      font-weight: 800;
    }
    .node-head {
      display: flex;
      gap: 8px;
      justify-content: space-between;
      align-items: center;
    }
    .node-head h3 {
      margin: 0;
      font-size: 17px;
      letter-spacing: 0;
    }
    .node-kv {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr);
      gap: 5px 10px;
      color: var(--muted);
    }
    .node-kv span:nth-child(odd) {
      color: #c8d2e1;
    }
    .node-meter {
      display: grid;
      gap: 5px;
      border: 1px solid var(--line);
      background: rgba(5, 8, 12, 0.62);
      border-radius: 6px;
      padding: 8px;
    }
    .node-meter-track {
      height: 10px;
      border-radius: 999px;
      background: #05070a;
      border: 1px solid var(--line);
      overflow: hidden;
    }
    .node-meter-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, var(--good), var(--warn));
    }
    .node-meter.hot .node-meter-fill {
      background: linear-gradient(90deg, var(--warn), var(--bad));
    }
    .node-meter-label {
      color: var(--muted);
      font-size: 12px;
    }
    .node-status.online {
      color: var(--good);
      border-color: rgba(120,226,155,0.55);
      background: rgba(120,226,155,0.08);
    }
    .node-status.offline {
      color: var(--bad);
      border-color: rgba(255,114,114,0.55);
      background: rgba(255,114,114,0.08);
    }
    .node-log-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      max-height: 520px;
      overflow: auto;
    }
    .node-log-list article {
      padding: 10px;
      display: grid;
      gap: 6px;
      background: #0b1018;
    }
    .node-log-list pre,
    .node-card pre {
      margin: 0;
      max-height: 180px;
      overflow: auto;
      white-space: pre-wrap;
    }
    .node-say-text {
      min-width: 280px;
      flex: 1;
    }
    .node-config-form {
      margin-top: 10px;
    }
    .node-config-form input[type="number"] {
      width: 115px;
    }
    .notice {
      border: 1px solid var(--line);
      border-left: 3px solid var(--accent);
      border-radius: 8px;
      background: rgba(34, 211, 238, 0.08);
      color: var(--text);
      padding: 10px 12px;
      line-height: 1.45;
    }
    .notice a {
      color: var(--accent);
      font-weight: 700;
    }
    .render-lab-notice {
      margin: 8px 0 12px;
    }
    .cats-head {
      margin-bottom: 12px;
    }
    .cats-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }
    .cat-card,
    .cat-log-row {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
    }
    .cat-card {
      display: grid;
      gap: 8px;
      padding: 14px;
    }
    .cat-card h3 {
      margin: 0;
      font-size: 18px;
    }
    .cat-card p {
      margin: 0;
      color: var(--muted);
      line-height: 1.45;
    }
    .cat-card-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .cats-log {
      display: grid;
      gap: 8px;
    }
    .cats-places {
      display: grid;
      gap: 8px;
    }
    .cat-place-row {
      display: grid;
      grid-template-columns: minmax(160px, 220px) minmax(0, 1fr) auto;
      gap: 10px;
      align-items: center;
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px 12px;
    }
    .cat-place-row div {
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .cat-place-row div span,
    .cat-place-row p {
      color: var(--muted);
    }
    .cat-place-row p {
      margin: 0;
      overflow-wrap: anywhere;
      line-height: 1.35;
    }
    .cat-log-row {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 32%);
      gap: 10px;
      padding: 10px 12px;
    }
    .cat-log-main,
    .cat-log-meta {
      display: grid;
      gap: 4px;
      min-width: 0;
    }
    .cat-log-main span,
    .cat-log-meta span {
      overflow-wrap: anywhere;
    }
    .cat-log-meta {
      color: var(--muted);
      font-size: 12px;
      justify-items: end;
      text-align: right;
    }
    .stat {
      background: #0c111a;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
    }
    .stat strong {
      display: block;
      font-size: 22px;
      margin-top: 3px;
    }
    .grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
      gap: 14px;
    }
    .avatar-kit-head {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
    }
    .avatar-kit-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }
    .avatar-kit-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 10px;
      margin-bottom: 14px;
    }
    .avatar-kit-meta-card,
    .avatar-kit-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.84);
      min-width: 0;
    }
    .avatar-kit-meta-card {
      display: grid;
      gap: 5px;
      padding: 11px;
    }
    .avatar-kit-meta-card strong,
    .avatar-kit-card strong {
      color: var(--text);
      font-size: 13px;
    }
    .avatar-kit-meta-card span,
    .avatar-kit-card p,
    .avatar-kit-card small {
      color: var(--muted);
      overflow-wrap: anywhere;
      font-size: 12px;
    }
    .avatar-kit-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }
    .avatar-kit-card {
      display: grid;
      gap: 8px;
      padding: 10px;
      overflow: hidden;
    }
    .avatar-kit-image-link {
      display: grid;
      place-items: center;
      min-height: 210px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(4, 7, 11, 0.56);
      overflow: hidden;
    }
    .avatar-kit-image-link img {
      display: block;
      max-width: 100%;
      max-height: 300px;
      object-fit: contain;
    }
    .avatar-kit-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .avatar-kit-actions button,
    .avatar-kit-actions .button-link {
      width: 100%;
      min-width: 0;
    }
    .avatar-kit-manifest {
      max-height: 520px;
      margin: 10px 0 0;
      padding: 12px;
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(4, 7, 11, 0.68);
      color: var(--muted);
      white-space: pre-wrap;
    }
    article {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      overflow: hidden;
    }
    article.inactive { opacity: 0.55; }
    article.loraProfileCard details { display: none; }
    article.loraProfileCard.showDataset details.trainingImages { display: block; }
    article.loraBuilderCard details { display: block; }
    article.loraBuilderCard {
      max-width: 1180px;
      margin: 0 auto 14px;
    }
    article.loraBuilderCard > .body > .fields,
    article.loraBuilderCard > .body > .trainingImages,
    article.loraBuilderCard > .body > .actions {
      display: none;
    }
    .lora-builder-workbench {
      display: grid;
      grid-template-columns: minmax(420px, 1fr) minmax(300px, 36%);
      gap: 14px;
      align-items: start;
    }
    .lora-builder-controls {
      display: grid;
      gap: 12px;
    }
    .lora-builder-output img {
      min-height: 360px;
    }
    .render-create-panel .editor-layout.compact {
      grid-template-columns: minmax(560px, 1fr) minmax(260px, 320px);
      gap: 18px;
      align-items: start;
    }
    .render-create-panel textarea.renderCreatePrompt {
      min-height: 190px;
      resize: vertical;
    }
    .render-create-panel .new-render-main {
      display: grid;
      gap: 10px;
    }
    .vinna-preset-panel {
      display: grid;
      grid-template-columns: minmax(180px, 1fr) max-content max-content max-content;
      gap: 8px;
      align-items: end;
      border: 1px solid rgba(96, 165, 250, 0.24);
      border-radius: 8px;
      background: rgba(12, 22, 34, 0.72);
      padding: 10px;
    }
    .vinna-preset-panel .pill {
      align-self: center;
      white-space: nowrap;
    }
    .vinna-reference-row {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(180px, 1fr) minmax(120px, 160px) minmax(180px, 1fr) max-content;
      gap: 8px;
      align-items: end;
      padding-top: 8px;
      border-top: 1px solid rgba(148, 163, 184, 0.16);
    }
    .vinna-reference-file input {
      padding: 7px;
    }
    .model-guide {
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 10px;
      background: #0b1018;
      color: var(--muted);
      display: grid;
      gap: 6px;
      font-size: 12px;
    }
    .model-guide div strong {
      color: var(--text);
    }
    .model-badge {
      color: #d5edf8;
      border-color: rgba(114,215,255,0.32);
      background: rgba(18,56,75,0.48);
    }
    #renders-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
      gap: 12px;
    }
    .vinna-images-head {
      display: flex;
      gap: 14px;
      align-items: flex-start;
      justify-content: space-between;
    }
    .vinna-images-head p {
      margin: 4px 0 0;
      color: var(--muted);
      font-size: 13px;
    }
    .vinna-images-head input[type="search"] {
      min-width: min(320px, 100%);
    }
    .vinna-images-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
      gap: 10px;
      margin-bottom: 12px;
    }
    .vinna-image-stat,
    .empty-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.84);
      padding: 10px 12px;
    }
    .vinna-image-stat {
      display: grid;
      gap: 2px;
    }
    .vinna-image-stat strong {
      font-size: 22px;
      line-height: 1;
    }
    .vinna-image-stat span,
    .empty-card {
      color: var(--muted);
      font-size: 12px;
    }
    .vinna-image-stat.active {
      border-color: rgba(114, 215, 255, 0.66);
      box-shadow: inset 0 0 0 1px rgba(114, 215, 255, 0.18);
    }
    .vinna-images-grid {
      grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
      gap: 12px;
    }
    .vinna-image-card {
      border-color: rgba(114, 215, 255, 0.22);
    }
    .vinna-image-tag {
      text-transform: lowercase;
    }
    .render-card .preview {
      height: 190px;
    }
    .render-card .body {
      gap: 8px;
      padding: 10px;
    }
    .render-card .meta {
      align-items: flex-start;
      gap: 6px;
    }
    .render-card .id {
      font-size: 12px;
      color: var(--muted);
    }
    .render-card .model-badge {
      font-size: 11px;
      line-height: 1.25;
    }
    .render-card.compare-keeper {
      border-color: rgba(105,230,195,0.75);
      box-shadow: 0 0 0 1px rgba(105,230,195,0.28);
    }
    .render-card .compareTitle {
      color: #69e6c3;
      font-size: 13px;
    }
    .render-card .compareModelInfo {
      border: 1px solid rgba(120,150,170,0.28);
      border-radius: 8px;
      background: rgba(10,16,24,0.72);
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
      padding: 8px;
    }
    .render-card .actions {
      gap: 5px;
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      overflow: visible;
    }
    .render-card .actions select {
      flex: 1 1 118px;
      width: 118px;
      min-width: 0;
      max-width: 100%;
      padding-left: 6px;
      padding-right: 18px;
      font-size: 12px;
    }
    .render-card .actions button,
    .render-card .actions a {
      min-height: 30px;
      padding: 5px 6px;
      font-size: 12px;
    }
    .render-card .actions .icon-button {
      width: 30px;
      min-width: 30px;
      height: 30px;
      padding: 5px;
      display: inline-grid;
      place-items: center;
      flex: 0 0 30px;
    }
    .render-card .actions .deleteRender,
    .render-card .actions .copyPage {
      order: -2;
    }
    .render-card .actions .trace,
    .render-card .actions .pushChat {
      order: -1;
    }
    .render-card .actions .rerenderModel {
      order: 10;
    }
    .display-admin-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 12px;
      flex-wrap: wrap;
    }
    .display-admin-head p {
      margin: 4px 0 0;
      color: var(--muted);
    }
    .display-admin-render-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-render-tools p {
      margin: 4px 0 0;
      color: var(--muted);
    }
    .display-admin-render-tools textarea,
    .display-admin-auto-tools textarea {
      min-height: 54px;
    }
    .display-admin-auto-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-node-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-motion-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-light-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-automation-tools,
    .display-admin-automation-simulator,
    .display-admin-iot-tools {
      display: grid;
      gap: 10px;
      margin-bottom: 12px;
    }
    .display-admin-auto-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
    }
    .display-admin-auto-head > div:first-child {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    .display-admin-auto-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
      gap: 8px;
    }
    .display-admin-powersafe-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
    }
    .display-admin-auto-grid label,
    .display-admin-auto-head label,
    .display-admin-powersafe-grid label {
      display: flex;
      min-width: 0;
      gap: 7px;
      align-items: center;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
      text-transform: uppercase;
    }
    .display-admin-auto-grid input[type="number"] {
      min-width: 0;
      width: 100%;
    }
    .display-admin-powersafe-grid input[type="number"],
    .display-admin-powersafe-grid input[type="text"] {
      min-width: 0;
      width: 100%;
    }
    .display-admin-sim-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
    }
    .display-admin-sim-grid label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      text-transform: uppercase;
    }
    .display-admin-sim-grid select,
    .display-admin-sim-grid input {
      width: 100%;
      min-width: 0;
    }
    .display-admin-sim-output {
      min-height: 96px;
      max-height: 240px;
      overflow: auto;
      padding: 10px;
      border: 1px solid rgba(114,240,214,0.16);
      border-radius: 8px;
      background: rgba(2,8,10,0.62);
      color: var(--muted);
      white-space: pre-wrap;
    }
    .display-admin-iot-tools .actions input {
      min-width: 150px;
      max-width: 220px;
    }
    .display-admin-nanoleaf-tools .actions select {
      min-width: 120px;
      max-width: 150px;
    }
    #display-admin-nanoleaf-layout-save.dirty,
    #display-admin-nanoleaf-layout-saved.dirty,
    [data-nanoleaf-layout-save].dirty,
    [data-nanoleaf-layout-status].dirty {
      border-color: rgba(255,218,91,0.72);
      background: rgba(255,218,91,0.16);
      color: #ffe08d;
    }
    .display-nanoleaf-state {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 10px;
      margin-bottom: 10px;
    }
    .display-nanoleaf-card {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid rgba(160,178,190,0.22);
      border-radius: 8px;
      background: rgba(8, 14, 20, 0.82);
      min-width: 0;
    }
    .display-nanoleaf-card.ok {
      border-color: rgba(120,226,155,0.52);
    }
    .display-nanoleaf-card.fallback {
      border-color: rgba(241,199,107,0.54);
    }
    .display-nanoleaf-card.warning {
      border-color: rgba(255,107,128,0.48);
    }
    .display-nanoleaf-card input {
      width: 100%;
      min-width: 0;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    }
    .display-nanoleaf-summary {
      display: grid;
      gap: 6px;
      padding: 6px;
      border: 1px solid rgba(160,178,190,0.12);
      border-radius: 8px;
      background: rgba(3, 8, 12, 0.44);
    }
    .display-nanoleaf-legend,
    .display-nanoleaf-warning-list,
    .display-nanoleaf-toolbar,
    .display-nanoleaf-role-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .display-nanoleaf-workbench {
      display: grid;
      grid-template-columns: minmax(140px, 1fr) minmax(120px, 150px) auto 44px minmax(130px, 180px) auto minmax(170px, 1fr);
      gap: 7px;
      align-items: center;
      padding: 7px;
      border: 1px solid rgba(114,240,214,0.14);
      border-radius: 8px;
      background: rgba(3, 8, 12, 0.5);
      min-width: 0;
    }
    .display-nanoleaf-workbench input[type="search"],
    .display-nanoleaf-workbench select {
      min-width: 0;
      width: 100%;
      font-size: 12px;
    }
    .display-nanoleaf-workbench input[type="color"] {
      width: 40px;
      height: 32px;
      padding: 2px;
      border-radius: 7px;
      cursor: pointer;
    }
    .display-nanoleaf-workbench input[type="range"] {
      width: 100%;
      min-width: 0;
      accent-color: #5ee8d0;
    }
    .display-nanoleaf-filter-count,
    .display-nanoleaf-selected-detail {
      color: #cde3ea;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
      white-space: nowrap;
    }
    .display-nanoleaf-selected-detail {
      overflow: hidden;
      text-overflow: ellipsis;
      text-transform: none;
    }
    .display-nanoleaf-role-actions {
      grid-column: 1 / -1;
    }
    .display-nanoleaf-role-actions button {
      min-height: 28px;
      padding: 4px 8px;
      border: 1px solid rgba(255,218,91,0.3);
      border-radius: 7px;
      background: rgba(255,218,91,0.08);
      color: #ffe08d;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
    }
    .display-nanoleaf-role-chip,
    .display-nanoleaf-selected-chip,
    .display-nanoleaf-warning-list span {
      padding: 4px 8px;
      border: 1px solid rgba(160,178,190,0.22);
      border-radius: 999px;
      background: rgba(160,178,190,0.08);
      color: #d8e8ef;
      font-size: 11px;
      font-weight: 900;
      text-transform: uppercase;
    }
    .display-nanoleaf-role-chip.role-status {
      border-color: rgba(162,170,255,0.78);
      color: #bfc4ff;
    }
    .display-nanoleaf-role-chip.role-alert {
      border-color: rgba(255,190,203,0.78);
      color: #ffc7d3;
    }
    .display-nanoleaf-role-chip.role-ambient {
      border-color: rgba(255,232,140,0.78);
      color: #ffe08d;
    }
    .display-nanoleaf-role-chip.role-motion {
      border-color: rgba(182,255,242,0.78);
      color: #bffcf2;
    }
    .display-nanoleaf-role-chip.role-manual {
      border-color: rgba(255,182,233,0.78);
      color: #ffbdf0;
    }
    .display-nanoleaf-role-chip.role-ignored,
    .display-nanoleaf-selected-chip {
      border-color: rgba(160,178,190,0.32);
      color: #b7c8d0;
    }
    .display-nanoleaf-warning-list span {
      border-color: rgba(255,218,91,0.52);
      background: rgba(255,218,91,0.1);
      color: #ffe08d;
    }
    .display-nanoleaf-toolbar button {
      min-height: 30px;
      padding: 5px 9px;
      border: 1px solid rgba(114,240,214,0.28);
      border-radius: 7px;
      background: rgba(114,240,214,0.08);
      color: #d9fffa;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
    }
    .display-nanoleaf-toolbar button:hover,
    .display-nanoleaf-toolbar button:focus-visible,
    .display-nanoleaf-role-actions button:hover,
    .display-nanoleaf-role-actions button:focus-visible {
      border-color: rgba(114,240,214,0.72);
      background: rgba(114,240,214,0.16);
      outline: none;
    }
    .display-nanoleaf-layout-control {
      position: sticky;
      top: 8px;
      z-index: 6;
      display: grid;
      grid-template-columns: minmax(150px, 1fr) minmax(180px, 2fr) auto;
      gap: 8px;
      align-items: center;
      padding: 8px;
      border: 1px solid rgba(114,240,214,0.18);
      border-radius: 8px;
      background: rgba(3, 8, 12, 0.9);
      backdrop-filter: blur(8px);
      box-shadow: 0 10px 20px rgba(0,0,0,0.24);
    }
    .display-nanoleaf-layout-control [data-nanoleaf-layout-status],
    .display-nanoleaf-layout-hint {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      color: #cde3ea;
      font-size: 11px;
      font-weight: 900;
    }
    .display-nanoleaf-layout-hint {
      color: var(--muted);
      font-weight: 800;
    }
    .display-nanoleaf-layout-control button {
      min-height: 32px;
      padding: 5px 10px;
      border-radius: 7px;
      font-size: 11px;
      font-weight: 900;
      cursor: pointer;
    }
    .display-nanoleaf-layout {
      position: relative;
      min-height: 190px;
      max-height: 340px;
      border: 1px solid rgba(114,240,214,0.18);
      border-radius: 8px;
      overflow: hidden;
      background:
        linear-gradient(rgba(114,240,214,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(114,240,214,0.05) 1px, transparent 1px),
        rgba(3, 8, 12, 0.72);
      background-size: 24px 24px;
    }
    .display-nanoleaf-layout-panel {
      position: absolute;
      display: grid;
      place-items: center;
      width: 32px;
      height: 32px;
      border: 2px solid rgba(255,218,91,0.9);
      background: rgba(255,218,91,0.85);
      color: #081014;
      box-shadow: 0 8px 18px rgba(0,0,0,0.34);
      cursor: grab;
      transform-origin: 50% 50%;
      touch-action: none;
      user-select: none;
      z-index: 1;
    }
    .display-nanoleaf-layout-panel.dragging {
      cursor: grabbing;
      border-color: #ffffff;
      box-shadow: 0 0 0 3px rgba(114,240,214,0.42), 0 16px 28px rgba(0,0,0,0.5);
      z-index: 5;
    }
    .display-nanoleaf-layout-panel.role-status {
      background: rgba(114,132,255,0.92);
      border-color: rgba(162,170,255,0.98);
    }
    .display-nanoleaf-layout-panel.role-alert {
      background: rgba(255,98,128,0.92);
      border-color: rgba(255,190,203,0.98);
    }
    .display-nanoleaf-layout-panel.role-ambient {
      background: rgba(255,218,91,0.9);
      border-color: rgba(255,232,140,0.98);
    }
    .display-nanoleaf-layout-panel.role-motion {
      background: rgba(114,240,214,0.9);
      border-color: rgba(182,255,242,0.98);
    }
    .display-nanoleaf-layout-panel.role-manual {
      background: rgba(255,102,211,0.88);
      border-color: rgba(255,182,233,0.98);
    }
    .display-nanoleaf-layout-panel.role-ignored,
    .display-nanoleaf-layout-panel.disabled {
      background: rgba(115,125,132,0.55);
      border-color: rgba(170,180,186,0.62);
      opacity: 0.55;
    }
    .display-nanoleaf-layout-panel.triangle {
      clip-path: polygon(50% 5%, 96% 88%, 4% 88%);
    }
    .display-nanoleaf-layout-panel.shape {
      border-radius: 8px;
    }
    .display-nanoleaf-layout-panel span {
      display: grid;
      place-items: center;
      width: 100%;
      height: 100%;
      font-size: 11px;
      font-weight: 900;
      transform: rotate(var(--panel-label-rotate, 0deg));
    }
    .display-nanoleaf-layout-panel:hover,
    .display-nanoleaf-layout-panel:focus-visible,
    .display-nanoleaf-layout-panel.selected {
      border-color: #ffffff;
      box-shadow: 0 0 0 2px rgba(114,240,214,0.45), 0 10px 22px rgba(0,0,0,0.42);
      outline: none;
      z-index: 4;
    }
    .display-nanoleaf-layout-panel.filtered,
    .display-nanoleaf-role-row.filtered {
      display: none;
    }
    .display-nanoleaf-role-grid {
      display: grid;
      gap: 7px;
      max-height: min(520px, 50vh);
      overflow: auto;
      padding: 7px 6px 7px 0;
      border-top: 1px solid rgba(160,178,190,0.12);
      border-bottom: 1px solid rgba(160,178,190,0.12);
      scrollbar-color: rgba(114,240,214,0.62) rgba(8,14,20,0.72);
      scrollbar-width: thin;
    }
    .display-nanoleaf-role-grid::-webkit-scrollbar {
      width: 10px;
      height: 10px;
    }
    .display-nanoleaf-role-grid::-webkit-scrollbar-thumb {
      background: rgba(114,240,214,0.54);
      border-radius: 999px;
    }
    .display-nanoleaf-role-grid::-webkit-scrollbar-track {
      background: rgba(8,14,20,0.72);
      border-radius: 999px;
    }
    .display-nanoleaf-role-row {
      display: grid;
      grid-template-columns: 38px minmax(120px, 1fr) minmax(96px, 1fr) minmax(90px, 130px) minmax(105px, 150px) 70px 38px minmax(110px, 1fr);
      gap: 7px;
      align-items: center;
      min-width: 920px;
      min-height: 58px;
      padding: 10px 8px;
      border: 1px solid rgba(114,240,214,0.16);
      border-radius: 8px;
      background: rgba(8, 14, 20, 0.64);
    }
    .display-nanoleaf-role-row.selected {
      border-color: rgba(255,255,255,0.42);
      background: rgba(114,240,214,0.1);
      box-shadow: inset 0 0 0 1px rgba(114,240,214,0.18);
    }
    .display-nanoleaf-role-test {
      width: 38px;
      height: 38px;
      padding: 0;
      border-radius: 999px;
      border-color: rgba(255,218,91,0.86);
      background: rgba(255,218,91,0.2);
      color: #ffe08d;
      font-weight: 900;
    }
    .display-nanoleaf-role-rotate {
      width: 38px;
      height: 38px;
      padding: 0;
      border-radius: 8px;
      border-color: rgba(114,240,214,0.44);
      background: rgba(114,240,214,0.12);
      color: #bffcf2;
      font-weight: 900;
    }
    .display-nanoleaf-role-meta {
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .display-nanoleaf-role-meta strong,
    .display-nanoleaf-role-meta span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-nanoleaf-role-meta span {
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
    }
    .display-nanoleaf-role-row input,
    .display-nanoleaf-role-row select {
      min-width: 0;
      width: 100%;
      min-height: 34px;
      font-size: 12px;
    }
    .display-nanoleaf-role-enabled {
      display: flex;
      gap: 5px;
      align-items: center;
      min-height: 34px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }
    .display-nanoleaf-role-enabled input {
      width: 16px;
      height: 16px;
      accent-color: #5ee8d0;
    }
    @media (max-width: 920px) {
      .display-nanoleaf-workbench {
        grid-template-columns: minmax(130px, 1fr) minmax(110px, 140px) auto;
      }
      .display-nanoleaf-layout-control {
        grid-template-columns: 1fr auto;
      }
      .display-nanoleaf-layout-hint {
        grid-column: 1 / -1;
        order: 3;
      }
      .display-nanoleaf-selected-detail {
        grid-column: 1 / -1;
      }
    }
    .display-iot-mapping {
      display: grid;
      gap: 8px;
    }
	    .display-iot-mapping-head {
	      display: flex;
	      align-items: center;
	      justify-content: space-between;
	      gap: 10px;
	      flex-wrap: wrap;
	    }
	    .display-iot-mapping-tools {
	      display: flex;
	      align-items: center;
	      gap: 8px;
	      flex-wrap: wrap;
	    }
	    .display-iot-mapping-tools label {
	      display: flex;
	      align-items: center;
	      gap: 5px;
	      color: var(--muted);
	      font-size: 11px;
	      font-weight: 800;
	      text-transform: uppercase;
	    }
	    .display-iot-mapping-tools select,
	    .display-iot-mapping-tools button {
	      min-height: 30px;
	    }
    .display-iot-unmapped {
      display: grid;
      gap: 8px;
      border: 1px solid rgba(255,211,90,0.3);
      background: rgba(255,211,90,0.06);
      border-radius: 8px;
      padding: 10px;
    }
    .display-iot-unmapped > div:first-child {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: var(--muted);
    }
    .display-iot-unmapped-row {
      display: grid;
      grid-template-columns: minmax(180px, 1.2fr) minmax(90px, 0.6fr) minmax(90px, 0.6fr) auto;
      gap: 8px;
      align-items: center;
    }
    .display-iot-unmapped-row > span {
      display: grid;
      gap: 2px;
      min-width: 0;
    }
    .display-iot-unmapped-row small {
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-iot-unmapped-row input {
      width: 100%;
      min-width: 0;
    }
	    .display-iot-mapping-grid {
	      display: grid;
	      gap: 6px;
	      max-height: 520px;
	      overflow: auto;
	      padding-right: 4px;
	    }
	    .display-iot-mapping-row {
	      display: grid;
	      grid-template-columns: minmax(220px, 1.2fr) minmax(90px, 0.55fr) minmax(90px, 0.55fr) 72px 72px minmax(120px, 0.7fr) 54px;
	      gap: 7px;
	      align-items: center;
	      min-width: 900px;
      padding: 7px;
      border: 1px solid rgba(160,178,190,0.16);
      border-radius: 8px;
      background: rgba(255,255,255,0.025);
    }
    .display-iot-mapping-row.header {
      position: sticky;
      top: 0;
      z-index: 1;
      background: rgba(12, 18, 28, 0.96);
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }
    .display-iot-mapping-row.on {
      border-color: rgba(120,226,155,0.42);
      background: rgba(120,226,155,0.06);
    }
    .display-iot-mapping-row.clear {
      border-color: rgba(114,240,214,0.22);
    }
    .display-iot-mapping-name {
      display: grid;
      min-width: 0;
      gap: 2px;
    }
    .display-iot-mapping-name strong,
    .display-iot-mapping-name span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-iot-mapping-name span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .display-iot-mapping-row input[type="text"],
    .display-iot-mapping-row input[type="number"] {
      width: 100%;
      min-width: 0;
      font-size: 12px;
    }
    .display-iot-mapping-row input[type="checkbox"] {
      width: 20px;
      height: 20px;
      justify-self: center;
      accent-color: #5ee8d0;
    }
    .display-light-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 10px;
    }
    .display-light-prefs-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 10px;
    }
    .display-light-pref-card {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid rgba(114, 240, 214, 0.24);
      border-radius: 8px;
      background: rgba(9, 16, 24, 0.82);
    }
    .display-light-pref-fields {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 8px;
    }
    .display-light-pref-group {
      display: grid;
      gap: 8px;
      padding: 8px;
      border: 1px solid rgba(160, 178, 190, 0.12);
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.025);
    }
    .display-light-pref-group > strong {
      color: var(--text);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
    }
    .display-light-pref-card label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-transform: uppercase;
    }
    .display-light-pref-field.range {
      grid-template-rows: auto auto auto;
    }
    .display-light-pref-range {
      display: grid;
      grid-template-columns: minmax(90px, 1fr) 64px;
      gap: 8px;
      align-items: center;
    }
    .display-light-pref-range input[type="range"] {
      width: 100%;
      accent-color: #5ee8d0;
    }
    .display-light-pref-value {
      color: #a8ffd8;
      font-size: 11px;
      font-weight: 800;
      text-transform: none;
    }
    .display-light-pref-card label.wide {
      grid-column: 1 / -1;
    }
    .display-light-pref-card textarea {
      min-height: 58px;
      resize: vertical;
      text-transform: none;
      font-size: 12px;
    }
    .display-light-pref-card input[type="number"],
    .display-light-pref-card select {
      min-width: 0;
      width: 100%;
    }
    .display-hue-count.surface {
      border-color: rgba(94, 232, 208, 0.72);
      background: rgba(94, 232, 208, 0.15);
      color: #b8fff4;
    }
    .display-hue-count.dragon {
      border-color: rgba(132, 146, 255, 0.78);
      background: rgba(132, 146, 255, 0.18);
      color: #d7dcff;
    }
    .display-hue-saved {
      border-color: rgba(194, 142, 255, 0.7);
      background: rgba(194, 142, 255, 0.16);
      color: #ead7ff;
    }
    .display-sync-ok {
      border-color: rgba(66, 255, 164, 0.55);
      background: rgba(66, 255, 164, 0.18);
      color: #a8ffd8;
    }
    .display-sync-warn {
      border-color: rgba(255, 212, 90, 0.6);
      background: rgba(255, 212, 90, 0.18);
      color: #ffe7a0;
    }
    .display-sync-wait {
      border-color: rgba(160, 178, 190, 0.42);
      background: rgba(160, 178, 190, 0.12);
      color: var(--muted);
    }
    .display-light-pref-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }
    .display-light-card {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.72);
    }
    .display-light-options {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 6px 10px;
    }
    .display-light-options label {
      display: flex;
      min-width: 0;
      gap: 7px;
      align-items: center;
      padding: 4px 6px;
      border: 1px solid transparent;
      border-radius: 6px;
      color: var(--muted);
      font-size: 12px;
    }
    .display-light-options label.selected {
      border-color: rgba(114, 240, 214, 0.28);
      background: rgba(114, 240, 214, 0.09);
      color: var(--text);
    }
    .display-light-options span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-node-state-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
      gap: 10px;
    }
    .display-node-state-card {
      display: grid;
      gap: 8px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.78);
      min-width: 0;
    }
    .display-node-state-lines {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px 10px;
      color: var(--muted);
      font-size: 12px;
    }
    .display-node-state-lines span {
      display: grid;
      min-width: 0;
      gap: 2px;
    }
    .display-node-state-lines b,
    .display-node-state-lines span span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-node-state-lines b {
      color: var(--text);
      font-size: 11px;
      text-transform: uppercase;
    }
    .display-node-state-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .display-node-state-actions button {
      min-width: 0;
      width: 100%;
    }
    .display-motion-state {
      display: grid;
      gap: 10px;
    }
    .display-automation-state {
      display: grid;
      gap: 10px;
    }
    .display-automation-rules {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 8px;
    }
    .display-automation-rule {
      display: grid;
      min-width: 0;
      gap: 10px;
      padding: 10px;
      border: 1px solid rgba(114, 240, 214, 0.28);
      border-radius: 8px;
      background: rgba(8, 14, 20, 0.78);
      color: var(--text);
    }
    .display-automation-rule.disabled {
      border-color: rgba(160, 178, 190, 0.22);
      color: var(--muted);
      opacity: 0.72;
    }
    .display-automation-rule-toggle {
      display: flex;
      min-width: 0;
      gap: 10px;
      align-items: center;
    }
    .display-automation-rule-toggle input[type="checkbox"] {
      flex: 0 0 auto;
      width: 18px;
      height: 18px;
      accent-color: #5ee8d0;
    }
    .display-automation-rule-toggle > span {
      display: grid;
      min-width: 0;
      gap: 2px;
    }
    .display-automation-rule strong,
    .display-automation-rule-toggle span span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-automation-rule-toggle span span {
      color: var(--muted);
      font-size: 11px;
      font-weight: 700;
    }
    .display-automation-rule-decision {
      min-height: 28px;
      padding: 7px 9px;
      border: 1px solid rgba(130, 154, 170, 0.26);
      border-radius: 7px;
      background: rgba(255,255,255,0.035);
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
      line-height: 1.35;
    }
    .display-automation-rule-decision.ok {
      border-color: rgba(94, 232, 208, 0.46);
      background: rgba(42, 230, 205, 0.09);
      color: #bffcf2;
    }
    .display-automation-rule-decision.warning {
      border-color: rgba(255, 209, 102, 0.52);
      background: rgba(255, 209, 102, 0.10);
      color: #ffe7a5;
    }
    .display-automation-rule-decision.error {
      border-color: rgba(255, 99, 132, 0.56);
      background: rgba(255, 99, 132, 0.10);
      color: #ffd2dc;
    }
    .display-automation-rule-decision.quiet {
      border-color: rgba(126, 152, 255, 0.48);
      background: rgba(126, 152, 255, 0.10);
      color: #d9e0ff;
    }
    .display-automation-rule-fields {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
      gap: 7px;
    }
    .display-automation-rule-field {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 10px;
      font-weight: 800;
      text-transform: uppercase;
    }
    .display-automation-rule-field input {
      min-width: 0;
      width: 100%;
      font-size: 12px;
      text-transform: none;
    }
    .display-automation-rule-field select,
    .display-automation-remote-binding select,
    .display-automation-remote-binding input {
      min-width: 0;
      width: 100%;
      font-size: 12px;
      text-transform: none;
    }
    .display-automation-rule-field.checkbox {
      align-items: center;
      grid-template-columns: 18px minmax(0, 1fr);
      padding-top: 16px;
    }
    .display-automation-rule-field.checkbox.compact {
      padding-top: 0;
      text-transform: none;
      color: var(--text);
    }
    .display-automation-rule-field.checkbox input {
      width: 18px;
      height: 18px;
      accent-color: #5ee8d0;
    }
    .display-automation-remote-bindings {
      grid-column: 1 / -1;
      display: grid;
      gap: 8px;
      padding: 8px;
      border: 1px solid rgba(94, 232, 208, 0.22);
      border-radius: 8px;
      background: rgba(3, 10, 14, 0.42);
    }
    .display-automation-remote-binding-rows {
      display: grid;
      gap: 6px;
    }
    .display-automation-remote-binding {
      display: grid;
      grid-template-columns: minmax(130px, 1.1fr) 112px minmax(145px, 1.1fr) minmax(150px, 1.4fr) 72px 72px;
      gap: 6px;
      align-items: center;
    }
    .display-automation-remote-device {
      display: grid;
      gap: 8px;
      padding: 8px;
      border: 1px solid rgba(130, 160, 190, 0.2);
      border-radius: 8px;
      background: rgba(10, 17, 23, 0.44);
    }
    .display-automation-remote-channel-rows {
      display: grid;
      gap: 6px;
    }
    .display-automation-remote-binding.fixed-channel {
      grid-template-columns: minmax(150px, 0.8fr) minmax(210px, 1.4fr) 86px 90px;
    }
    .display-automation-remote-channel {
      color: var(--accent);
      font-size: 12px;
      white-space: nowrap;
    }
    .display-automation-remote-binding button {
      min-height: 31px;
      padding: 5px 7px;
    }
    @media (max-width: 980px) {
      .display-automation-remote-binding {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }
    .display-motion-card {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.82);
      min-width: 0;
    }
    .display-motion-card.ok { border-color: rgba(120,226,155,0.48); }
    .display-motion-card.clear { border-color: rgba(114,240,214,0.26); }
    .display-motion-card.warning,
    .display-motion-card.error { border-color: rgba(241,199,107,0.72); }
    .display-automation-card {
      display: grid;
      gap: 10px;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.82);
      min-width: 0;
    }
    .display-automation-card.ok { border-color: rgba(120,226,155,0.48); }
    .display-automation-card.clear { border-color: rgba(114,240,214,0.26); }
    .display-automation-card.warning,
    .display-automation-card.error { border-color: rgba(241,199,107,0.72); }
    .display-automation-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 8px;
    }
    .display-automation-summary-tile {
      display: grid;
      gap: 3px;
      padding: 10px;
      border: 1px solid rgba(114,240,214,0.18);
      border-radius: 8px;
      background: rgba(2, 8, 10, 0.5);
      min-width: 0;
    }
    .display-automation-summary-tile span {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }
    .display-automation-summary-tile strong {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      font-size: 13px;
    }
    .display-automation-summary-tile.ok {
      border-color: rgba(120,226,155,0.42);
      background: rgba(120,226,155,0.08);
    }
    .display-automation-summary-tile.warning {
      border-color: rgba(241,199,107,0.55);
      background: rgba(241,199,107,0.1);
    }
    .display-automation-summary-tile.error {
      border-color: rgba(255,107,128,0.55);
      background: rgba(255,107,128,0.1);
    }
    .display-automation-summary-tile.clear {
      border-color: rgba(160,178,190,0.22);
    }
    .display-automation-timeline {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 8px;
      padding: 8px;
      border: 1px solid rgba(114,240,214,0.14);
      border-radius: 8px;
      background: rgba(2, 8, 10, 0.42);
    }
    .display-automation-timeline-item {
      display: grid;
      grid-template-columns: 12px minmax(0, 1fr);
      gap: 8px;
      align-items: start;
      min-width: 0;
      padding: 7px;
      border: 1px solid rgba(160,178,190,0.14);
      border-radius: 8px;
      background: rgba(8,14,20,0.56);
    }
    .display-automation-timeline-dot {
      width: 9px;
      height: 9px;
      margin-top: 4px;
      border-radius: 999px;
      background: rgba(160,178,190,0.8);
      box-shadow: 0 0 0 3px rgba(160,178,190,0.1);
    }
    .display-automation-timeline-item.ok .display-automation-timeline-dot {
      background: #78e29b;
      box-shadow: 0 0 0 3px rgba(120,226,155,0.14);
    }
    .display-automation-timeline-item.warning .display-automation-timeline-dot,
    .display-automation-timeline-item.quiet .display-automation-timeline-dot {
      background: #f1c76b;
      box-shadow: 0 0 0 3px rgba(241,199,107,0.14);
    }
    .display-automation-timeline-item.error .display-automation-timeline-dot {
      background: #ff6b80;
      box-shadow: 0 0 0 3px rgba(255,107,128,0.14);
    }
    .display-automation-timeline-item.clear .display-automation-timeline-dot {
      background: rgba(160,178,190,0.72);
    }
    .display-automation-timeline-item div {
      display: grid;
      min-width: 0;
      gap: 2px;
    }
    .display-automation-timeline-item strong,
    .display-automation-timeline-item span,
    .display-automation-timeline-item small {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-automation-timeline-item strong {
      color: var(--muted);
      font-size: 10px;
      font-weight: 900;
      text-transform: uppercase;
    }
    .display-automation-timeline-item span {
      color: var(--text);
      font-size: 12px;
      font-weight: 900;
    }
    .display-automation-timeline-item small {
      color: var(--muted);
      font-size: 10px;
      font-weight: 700;
    }
    .display-motion-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      flex-wrap: wrap;
    }
    .display-motion-lines {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 7px 12px;
      color: var(--muted);
      font-size: 12px;
    }
    .display-motion-lines span {
      display: grid;
      min-width: 0;
      gap: 2px;
    }
    .display-motion-lines b,
    .display-motion-lines span span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-motion-lines b {
      color: var(--text);
      font-size: 11px;
      text-transform: uppercase;
    }
    .display-motion-chips {
      display: flex;
      gap: 7px;
      flex-wrap: wrap;
    }
    .display-motion-chip {
      padding: 5px 8px;
      border: 1px solid rgba(160,178,190,0.22);
      border-radius: 999px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 800;
    }
    .display-motion-chip.on {
      border-color: rgba(120,226,155,0.72);
      color: #bafed3;
      background: rgba(120,226,155,0.1);
    }
    .display-motion-chip.clear {
      border-color: rgba(114,240,214,0.28);
      color: #bdece5;
    }
    .display-motion-events {
      display: grid;
      gap: 8px;
      padding-top: 4px;
      border-top: 1px solid rgba(160,178,190,0.12);
    }
    .display-motion-event-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
      gap: 8px;
    }
    .display-motion-event {
      display: grid;
      gap: 3px;
      padding: 8px;
      border: 1px solid rgba(160,178,190,0.18);
      border-left-width: 4px;
      border-radius: 8px;
      background: rgba(255,255,255,0.025);
      min-width: 0;
    }
    .display-motion-event.on { border-left-color: rgba(120,226,155,0.95); }
    .display-motion-event.clear { border-left-color: rgba(114,240,214,0.8); }
    .display-motion-event.unknown { border-left-color: rgba(241,199,107,0.8); }
    .display-motion-event.dry-run { border-left-color: rgba(91,169,255,0.95); }
    .display-motion-event.skipped { border-left-color: rgba(169,185,203,0.78); opacity: 0.82; }
    .display-motion-event.error { border-left-color: rgba(255,107,128,0.95); }
    .display-motion-event strong,
    .display-motion-event span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-motion-event span {
      color: var(--muted);
      font-size: 12px;
    }
    .display-admin-summary {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
      gap: 12px;
      margin-bottom: 12px;
    }
    .display-summary-card,
    .display-feed-card,
    .display-render-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.86);
      overflow: hidden;
    }
    .display-summary-card {
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .display-summary-lines {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px 10px;
      color: var(--muted);
      font-size: 12px;
    }
    .display-summary-chips,
    .display-zigbee-device-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      min-width: 0;
    }
    .display-zigbee-device {
      max-width: 100%;
      overflow: hidden;
      padding: 4px 7px;
      border: 1px solid rgba(160, 178, 190, 0.2);
      border-radius: 6px;
      background: rgba(255, 255, 255, 0.035);
      color: var(--muted);
      font-size: 11px;
      font-weight: 800;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-zigbee-device.on {
      border-color: rgba(120, 226, 155, 0.45);
      color: #a8ffd8;
    }
    .display-zigbee-device.sensor {
      border-color: rgba(91, 169, 255, 0.42);
      color: #b9dcff;
    }
    .display-alarm-ok { border-color: rgba(120,226,155,0.42); }
    .display-alarm-warning { border-color: rgba(241,199,107,0.72); }
    .display-alarm-high { border-color: rgba(255,114,114,0.82); }
    .display-admin-layout {
      display: grid;
      grid-template-columns: minmax(300px, 0.88fr) minmax(260px, 0.66fr) minmax(480px, 1.46fr);
      gap: 12px;
      align-items: start;
    }
    .model-admin-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
      gap: 12px;
      align-items: start;
    }
    .model-admin-artifacts {
      display: grid;
      gap: 10px;
      margin-top: 12px;
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }
    .model-admin-artifact-fields {
      grid-template-columns: minmax(120px, 0.7fr) minmax(160px, 1fr);
    }
    .model-admin-runtime-fields {
      grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
    .model-admin-runtime-fields textarea {
      min-height: 70px;
      resize: vertical;
    }
    .model-admin-artifact-status {
      display: grid;
      gap: 5px;
      padding: 8px;
      border: 1px solid rgba(120, 226, 155, 0.18);
      border-radius: 6px;
      background: rgba(10, 16, 24, 0.48);
      overflow-wrap: anywhere;
    }
    .model-admin-artifact-history {
      display: grid;
      gap: 3px;
      padding-top: 5px;
      border-top: 1px solid var(--line);
    }
    .model-admin-compat {
      display: grid;
      gap: 3px;
      padding: 7px 8px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: rgba(10, 16, 24, 0.44);
      overflow-wrap: anywhere;
    }
    .model-admin-compat.ok {
      border-color: rgba(120, 226, 155, 0.35);
    }
    .model-admin-compat.warn {
      border-color: rgba(241, 199, 107, 0.48);
    }
    .model-admin-compat.bad {
      border-color: rgba(255, 114, 114, 0.52);
    }
    .model-admin-compat strong {
      font-size: 0.86rem;
    }
    .model-admin-compat span {
      color: var(--muted);
      font-size: 0.8rem;
    }
    .model-admin-diff-list {
      display: grid;
      gap: 5px;
      margin-top: 8px;
    }
    #model-admin-diff-panel .actions {
      align-items: center;
    }
    #model-admin-diff-search {
      min-width: min(280px, 100%);
      flex: 1 1 220px;
    }
    .model-admin-diff-change {
      display: grid;
      grid-template-columns: minmax(120px, 0.5fr) minmax(0, 1fr) minmax(0, 1fr) auto;
      gap: 6px;
      align-items: start;
      padding: 5px 6px;
      border: 1px solid var(--line);
      border-radius: 4px;
      background: rgba(10, 16, 24, 0.38);
    }
    .model-admin-diff-change button {
      align-self: center;
      white-space: nowrap;
    }
    .model-admin-diff-change code {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      font-size: 0.78rem;
      color: var(--muted);
    }
    @media (max-width: 880px) {
      .model-admin-diff-change {
        grid-template-columns: minmax(0, 1fr);
      }
      .model-admin-diff-change button {
        justify-self: start;
      }
    }
    #model-admin-bundle-json,
    #model-admin-undo-json {
      min-height: 220px;
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-size: 0.82rem;
      white-space: pre;
      overflow-wrap: normal;
    }
    #model-admin-history-panel .actions input,
    #model-admin-history-panel .actions select {
      min-width: 120px;
    }
    #model-admin-history-search {
      flex: 1 1 220px;
    }
    .model-admin-history-bundles {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
    }
    .model-admin-history-payload {
      margin: 8px 0 0;
      max-height: 220px;
      overflow: auto;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 4px;
      background: rgba(10, 16, 24, 0.38);
      color: var(--muted);
      font-size: 0.78rem;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .display-feed-grid,
    .display-render-grid,
    .display-event-grid {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }
    .display-feed-grid {
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
    .display-render-grid {
      grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .display-event-grid {
      grid-template-columns: 1fr;
    }
    .display-event-card {
      display: grid;
      gap: 6px;
      padding: 9px;
      border: 1px solid var(--line);
      border-left-width: 4px;
      border-radius: 8px;
      background: rgba(12, 18, 28, 0.78);
    }
    .display-event-card.warning {
      border-color: rgba(241,199,107,0.62);
      border-left-color: rgba(241,199,107,0.95);
    }
    .display-event-card.average {
      border-color: rgba(255,150,77,0.66);
      border-left-color: rgba(255,150,77,0.95);
    }
    .display-event-card.high,
    .display-event-card.disaster {
      border-color: rgba(255,114,114,0.76);
      border-left-color: rgba(255,114,114,0.96);
    }
    .display-event-card h3 {
      margin: 0;
      overflow: hidden;
      color: var(--text);
      font-size: 13px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-event-card p {
      margin: 0;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.35;
    }
    .display-event-tags {
      display: flex;
      gap: 4px;
      flex-wrap: wrap;
    }
    .display-event-tags span {
      max-width: 100%;
      overflow: hidden;
      padding: 2px 5px;
      border: 1px solid var(--line);
      border-radius: 4px;
      color: var(--muted);
      font-size: 11px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .display-feed-card img,
    .display-render-card img {
      width: 100%;
      height: 150px;
      object-fit: cover;
      display: block;
      background: #05070a;
    }
    .display-card-body {
      padding: 9px;
      display: grid;
      gap: 5px;
    }
    .display-card-body span,
    .display-card-body small,
    .display-card-body p {
      color: var(--muted);
      font-size: 12px;
      margin: 0;
    }
    .display-card-body strong {
      font-size: 13px;
    }
    .display-render-blocked {
      opacity: 0.58;
      border-color: rgba(255,114,114,0.62);
    }
    .display-render-favorite {
      border-color: rgba(255,204,74,0.8);
      box-shadow: inset 0 0 0 1px rgba(255,204,74,0.24);
    }
    .display-render-favorite .display-card-body strong::before {
      content: "★ ";
      color: #ffcc4a;
    }
    @media (max-width: 1120px) {
      .display-admin-layout {
        grid-template-columns: 1fr;
      }
      .model-admin-layout {
        grid-template-columns: 1fr;
      }
    }
    .icon-button svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }
    .render-card summary {
      cursor: pointer;
      color: var(--muted);
      font-size: 12px;
    }
    .render-card details > pre,
    .render-card details > label,
    .render-card details > textarea {
      width: 100%;
    }
    .render-card details .prompt,
    .render-card details .localPrompt,
    .render-card details .payload {
      max-height: 260px;
      min-height: 96px;
      overflow: auto;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .render-card details .editPrompt {
      min-height: 150px;
      width: 100%;
      resize: vertical;
    }
    .prompt-quality {
      border: 1px solid rgba(105,230,195,0.24);
      border-radius: 8px;
      background: rgba(6, 16, 20, 0.65);
      color: var(--muted);
      font-size: 12px;
      padding: 7px 9px;
      margin-bottom: 8px;
    }
    .prompt-quality.warn {
      border-color: rgba(241,199,107,0.55);
      color: #f1c76b;
      background: rgba(31, 22, 9, 0.55);
    }
    .compare-review-list {
      display: grid;
      gap: 14px;
    }
    .compare-review-scores {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 10px;
      align-items: stretch;
    }
    .compare-review-scores > strong {
      flex: 0 0 100%;
      color: var(--text);
      font-size: 13px;
    }
    .compare-score-card {
      border: 1px solid rgba(120,150,170,0.22);
      border-radius: 8px;
      background: rgba(5,10,16,0.48);
      padding: 8px;
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
      min-width: 210px;
      max-width: 360px;
    }
    .compare-score-card strong {
      flex: 0 0 100%;
      font-size: 13px;
    }
    .compare-score-card small {
      flex: 0 0 100%;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.35;
    }
    .compare-review-group {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .compare-review-header {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      align-items: center;
      justify-content: space-between;
    }
    .compare-review-group pre {
      white-space: pre-wrap;
      overflow-wrap: anywhere;
      max-height: 180px;
      overflow: auto;
      color: var(--muted);
      background: rgba(5,10,16,0.55);
      border: 1px solid rgba(120,150,170,0.18);
      border-radius: 8px;
      padding: 8px;
      font-size: 12px;
    }
    .compare-review-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
      gap: 12px;
    }
    .compare-review-card {
      border: 1px solid rgba(120,150,170,0.22);
      border-radius: 8px;
      background: rgba(10,16,24,0.62);
      padding: 8px;
      display: grid;
      gap: 7px;
    }
    .compare-review-card .image-link {
      display: block;
    }
    .compare-review-card img {
      width: 100%;
      height: clamp(300px, 46vw, 560px);
      object-fit: contain;
      border-radius: 6px;
      background: #06090d;
      cursor: zoom-in;
    }
    .compare-review-card strong {
      color: var(--text);
      font-size: 13px;
    }
    .compare-review-card .meta {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: flex-start;
    }
    .compare-review-actions {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 5px;
    }
    .compare-review-actions button {
      min-height: 30px;
      padding: 5px 6px;
      font-size: 12px;
    }
    .compare-review-issues {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      align-items: center;
      border: 1px solid rgba(120,150,170,0.18);
      border-radius: 8px;
      background: rgba(5,10,16,0.42);
      padding: 6px;
    }
    .compare-review-issues-title {
      color: var(--muted);
      font-size: 12px;
      padding: 0 3px;
    }
    .compare-review-issues button {
      min-height: 26px;
      padding: 4px 7px;
      font-size: 11px;
    }
    .compare-review-issues button.active {
      border-color: rgba(255,110,110,0.68);
      background: rgba(255,110,110,0.16);
      color: #ffd2d2;
    }
    .compare-review-card.compare-has-issues .compare-review-issues {
      border-color: rgba(255,110,110,0.42);
    }
    .compare-review-card.compare-good {
      border-color: rgba(105,230,195,0.75);
      box-shadow: 0 0 0 1px rgba(105,230,195,0.22);
    }
    .compare-review-card.compare-ok {
      border-color: rgba(245,200,95,0.65);
      box-shadow: 0 0 0 1px rgba(245,200,95,0.18);
    }
    .compare-review-card.compare-bad {
      border-color: rgba(255,110,110,0.7);
      box-shadow: 0 0 0 1px rgba(255,110,110,0.2);
    }
    .compare-review-card details pre {
      max-height: 220px;
    }
    .house-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
      gap: 12px;
    }
    .house-card {
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .house-card h3 {
      margin: 0;
      font-size: 16px;
    }
    .house-card ul {
      margin: 0;
      padding-left: 18px;
      color: var(--muted);
    }
    .house-controls {
      display: grid;
      gap: 10px;
      border-top: 1px solid var(--line);
      padding-top: 10px;
    }
    .house-control-panel {
      display: grid;
      gap: 8px;
      min-width: 0;
    }
    .house-control-panel strong {
      color: var(--text);
      font-size: 13px;
    }
    .house-action-row,
    .house-light-row {
      display: grid;
      grid-template-columns: minmax(90px, 1fr) minmax(78px, auto) repeat(2, minmax(54px, auto));
      gap: 6px;
      align-items: center;
    }
    .house-action-row {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .house-light-name,
    .house-light-status {
      color: var(--muted);
      font-size: 12px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .house-light-name {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    .house-light-name > span:first-child {
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .house-light-status {
      display: inline-flex;
      align-items: center;
      justify-content: flex-end;
      gap: 6px;
      font-weight: 700;
      color: var(--text);
    }
    .house-provider-badge {
      flex: 0 0 auto;
      border: 1px solid rgba(255,255,255,0.16);
      border-radius: 999px;
      padding: 1px 6px;
      color: #dbeafe;
      background: rgba(37,99,235,0.18);
      font-size: 10px;
      font-weight: 800;
      line-height: 1.4;
    }
    .house-provider-nanoleaf {
      color: #f5d0fe;
      background: rgba(192,38,211,0.18);
    }
    .house-provider-fallback,
    .house-provider-iot {
      color: #fde68a;
      background: rgba(180,83,9,0.18);
    }
    .house-light-row.is-offline .house-light-name,
    .house-light-row.is-offline .house-light-status {
      opacity: 0.68;
    }
    .house-light-swatch {
      width: 14px;
      height: 14px;
      flex: 0 0 14px;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.35);
      box-shadow: 0 0 10px currentColor;
    }
    .house-brightness-row {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr) 42px;
      gap: 8px;
      align-items: center;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .house-brightness-row input[type="range"] {
      width: 100%;
      accent-color: var(--accent);
    }
    .house-brightness-row strong {
      color: var(--text);
      text-align: right;
      font-size: 12px;
    }
    .house-color-row {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .house-scene-row {
      grid-column: 1 / -1;
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .house-scene-row button {
      flex: 1 1 78px;
      min-width: 0;
      padding-inline: 8px;
    }
    .house-color-button {
      width: 28px;
      min-width: 28px;
      height: 22px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,0.35);
      box-shadow: inset 0 0 0 1px rgba(0,0,0,0.45);
    }
    .house-control-panel select,
    .house-control-panel input {
      width: 100%;
    }
    .preset-reference-preview {
      display: grid;
      grid-template-columns: 96px 1fr;
      gap: 10px;
      align-items: center;
      border: 1px solid var(--line);
      background: #080c12;
      border-radius: 8px;
      padding: 8px;
    }
    .preset-reference-preview[hidden] { display: none; }
    .preset-reference-preview img {
      width: 96px;
      height: 96px;
      min-height: 0;
      object-fit: cover;
      border-radius: 4px;
      background: #05070a;
    }
    .preset-reference-preview small {
      display: block;
      color: var(--muted);
      line-height: 1.35;
    }
    .preview {
      display: block;
      width: 100%;
      height: 270px;
      object-fit: contain;
      background: #05070a;
      border-bottom: 1px solid var(--line);
    }
    .body {
      padding: 12px;
      display: grid;
      gap: 10px;
    }
    .meta {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: var(--muted);
      font-size: 12px;
    }
    .fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .fields label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
    }
    .field-label {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
    }
    .wide { grid-column: 1 / -1; }
    .fields input, .fields select, .fields textarea {
      width: 100%;
      color: var(--text);
      font-size: 13px;
    }
    .render-controls {
      display: grid;
      gap: 8px;
      margin-top: 8px;
    }
    .render-control {
      display: grid;
      gap: 6px;
      color: var(--muted);
      font-size: 12px;
    }
    .render-control:has(.render-control-row) {
      grid-template-columns: minmax(58px, max-content) minmax(135px, 1fr) minmax(42px, max-content);
      align-items: center;
      gap: 8px;
    }
    .render-control:has(.render-control-row) > .render-control-row {
      grid-column: 2;
      min-width: 0;
    }
    .render-control:has(.render-control-row) > .render-control-value {
      grid-column: 3;
      align-self: center;
    }
    .render-control-row {
      display: grid;
      grid-template-columns: auto 1fr auto;
      gap: 6px;
      align-items: center;
      min-width: 0;
    }
    .render-control-row span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .render-control input[type="range"] {
      width: 100%;
      padding: 0;
      min-height: 24px;
    }
    .render-control-value {
      min-width: 46px;
      text-align: right;
      color: var(--text);
      white-space: nowrap;
    }
    .genderShiftLabel {
      min-width: 58px;
    }
    .editor-layout {
      display: grid;
      grid-template-columns: minmax(190px, 18%) minmax(720px, 1fr) minmax(190px, 18%);
      gap: 14px;
      align-items: start;
    }
    .editor-preview {
      border: 1px solid var(--line);
      background: #05070a;
      border-radius: 8px;
      overflow: hidden;
    }
    .editor-preview img {
      display: block;
      width: 100%;
      max-height: calc(100vh - 170px);
      object-fit: contain;
      background: #05070a;
    }
    .editor-preview strong {
      display: block;
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.08em;
    }
    .editor-tabs {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }
    .editor-pane {
      display: grid;
      gap: 12px;
    }
    #editor-character-prompt,
    #editor-normal-prompt,
    #editor-simple-prompt {
      min-height: 150px;
    }
    #editor-character-prompt {
      min-height: 190px;
    }
    .editor-top-actions {
      margin: 10px 0 14px;
    }
    .editor-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(295px, 1fr));
      gap: 10px;
    }
    .modular-sections {
      display: grid;
      gap: 10px;
    }
    .modular-block {
      display: grid;
      gap: 8px;
      padding-top: 10px;
      border-top: 1px solid var(--line);
    }
    .modular-block:first-child {
      padding-top: 0;
      border-top: 0;
    }
    .modular-block strong {
      color: var(--text);
      font-size: 12px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
    }
    .toggle-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
      gap: 8px;
    }
    .chip-list {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      min-height: 34px;
      align-items: center;
    }
    .chip-list button {
      min-height: 28px;
      padding: 4px 8px;
      border-radius: 999px;
      font-size: 12px;
    }
    .chip-list button.modular-edit {
      border-color: rgba(114,215,255,0.42);
      background: rgba(18,56,75,0.42);
    }
    .chip-list button.modular-edit.disabled {
      opacity: 0.55;
      text-decoration: line-through;
    }
    .chip-list button.modular-disable,
    .chip-list button.modular-enable {
      border-color: rgba(241,199,107,0.35);
      background: rgba(67,50,14,0.34);
    }
    .chip-list button.modular-remove {
      min-width: 28px;
      padding: 4px 7px;
    }
    .profile-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }
    .profile-row {
      display: grid;
      grid-template-columns: minmax(120px, 1fr) minmax(100px, auto) auto;
      gap: 8px;
      align-items: center;
      padding: 8px;
      border: 1px solid var(--line);
      background: rgba(8, 13, 20, 0.45);
    }
    .profile-row.active {
      border-color: rgba(105,230,195,0.55);
    }
    .profile-row-actions {
      display: flex;
      gap: 6px;
      justify-content: flex-end;
      flex-wrap: wrap;
    }
    .desc, pre {
      color: var(--muted);
      overflow: hidden;
    }
    .detail-bank {
      display: grid;
      gap: 8px;
      margin-top: 8px;
    }
    .detail-row {
      display: grid;
      grid-template-columns: auto minmax(90px, 0.35fr) minmax(160px, 1fr);
      gap: 8px;
      align-items: center;
    }
    .detail-row input[type="checkbox"] {
      min-height: auto;
    }
    .detail-row input[type="text"] {
      width: 100%;
      min-width: 0;
    }
    pre {
      white-space: pre-wrap;
      max-height: 180px;
      margin: 0;
      background: #080c12;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 8px;
      font-size: 12px;
    }
    .hero-prompt-debug {
      display: grid;
      gap: 8px;
    }
    .hero-prompt-debug .prompt {
      max-height: 320px;
      color: var(--text);
    }
    .hero-prompt-debug .payload {
      max-height: 180px;
    }
    .debug-label {
      display: block;
      margin-bottom: 4px;
      color: var(--muted);
      font-size: 12px;
    }
    details summary {
      cursor: pointer;
      color: var(--accent);
    }
    .actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
    }
    .pill {
      color: var(--muted);
      border: 1px solid var(--line);
      border-radius: 999px;
      padding: 3px 8px;
      font-size: 12px;
    }
    .pill.muted {
      color: var(--muted);
      background: rgba(255,255,255,0.03);
    }
    .pill.ready {
      color: var(--good);
      border-color: rgba(120,226,155,0.55);
      background: rgba(120,226,155,0.08);
    }
    .pill.needs_trainable,
    .pill.needs_more {
      color: var(--warn);
      border-color: rgba(241,199,107,0.55);
      background: rgba(241,199,107,0.08);
    }
    .pill.needs_review,
    .pill.not_ready {
      color: var(--muted);
      background: rgba(255,255,255,0.03);
    }
    .pill.missing {
      color: var(--bad);
      border-color: rgba(255,111,145,0.58);
      background: rgba(255,111,145,0.08);
    }
    .actions button.active-filter {
      border-color: var(--accent);
      background: rgba(105,213,255,0.16);
      color: var(--text);
    }
    .list {
      display: grid;
      gap: 6px;
      margin-top: 10px;
    }
    .list div {
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 6px;
      padding: 7px 8px;
      color: var(--muted);
    }
    .chatlog {
      display: grid;
      gap: 8px;
      max-height: 360px;
      overflow: auto;
      margin-bottom: 10px;
    }
    .chatlog div {
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 6px;
      padding: 8px;
      white-space: pre-wrap;
    }
    .chatlog div.me {
      border-color: rgba(105,213,255,0.45);
      background: rgba(105,213,255,0.08);
    }
    .chatlog div.bot {
      border-color: rgba(91,246,222,0.32);
      background: rgba(91,246,222,0.06);
    }
    .chatlog div.error {
      border-color: rgba(255,111,145,0.55);
      background: rgba(255,111,145,0.08);
    }
    .chat-media {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 8px;
    }
    .chat-media a {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 34px;
      max-width: 180px;
      border: 1px solid rgba(91,246,222,0.32);
      background: rgba(5,7,10,0.55);
      color: var(--accent);
      border-radius: 7px;
      padding: 6px 8px;
      overflow: hidden;
      text-decoration: none;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .chat-media img {
      width: 96px;
      height: 72px;
      object-fit: cover;
      border-radius: 5px;
      background: #05070a;
    }
    .chat-tools {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(120px, 170px) auto auto;
      gap: 8px;
      align-items: end;
    }
    .chat-tools label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 700;
    }
    .chat-image-preview {
      display: flex;
      gap: 10px;
      align-items: center;
      border: 1px solid var(--line);
      background: rgba(11,16,24,0.74);
      border-radius: 8px;
      padding: 8px;
    }
    .chat-image-preview[hidden] {
      display: none !important;
    }
    .chat-image-preview img {
      width: 76px;
      height: 76px;
      object-fit: cover;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: #05070a;
    }
    .chat-image-preview div {
      display: grid;
      gap: 4px;
      min-width: 0;
    }
    .chat-image-preview strong,
    .chat-image-preview span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .chat-image-preview span {
      color: var(--muted);
      font-size: 12px;
    }
    @media (max-width: 760px) {
      .chat-tools {
        grid-template-columns: 1fr;
      }
    }
    .camera-history {
      display: grid;
      gap: 8px;
      margin-top: 10px;
      max-height: 460px;
      overflow: auto;
    }
    .camera-history-item {
      display: grid;
      grid-template-columns: 92px minmax(0, 1fr);
      gap: 10px;
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 8px;
      padding: 8px;
    }
    .camera-history-item img {
      width: 92px;
      height: 70px;
      object-fit: cover;
      border-radius: 6px;
      background: #05070a;
      border: 1px solid var(--line);
    }
    .camera-history-item .desc {
      max-height: 74px;
      white-space: pre-wrap;
    }
    .subtitle-list {
      display: grid;
      gap: 8px;
      max-height: calc(100vh - 250px);
      overflow: auto;
    }
    .subtitle-layout {
      display: grid;
      grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
      gap: 14px;
      align-items: start;
    }
    .subtitle-activity {
      display: grid;
      gap: 8px;
      max-height: calc(100vh - 250px);
      overflow: auto;
    }
    .subtitle-row {
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 8px;
      padding: 10px 12px;
      display: grid;
      gap: 5px;
    }
    .subtitle-meta {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      color: var(--muted);
      font-size: 12px;
    }
    .subtitle-text {
      color: var(--text);
      font-size: 18px;
      line-height: 1.45;
      overflow-wrap: anywhere;
    }
    .subtitle-activity .subtitle-text {
      color: var(--muted);
      font-size: 13px;
    }
    .brain-log-list,
    .debug-log-list {
      display: grid;
      gap: 10px;
      max-height: calc(100vh - 230px);
      overflow: auto;
    }
    .brain-log-card,
    .debug-log-card {
      padding: 12px;
      display: grid;
      gap: 8px;
      background: #0b1018;
    }
    .brain-log-card pre,
    .debug-log-card pre {
      max-height: 260px;
      color: var(--text);
      overflow: auto;
    }
    .render-trace {
      margin-top: 8px;
      border-top: 1px solid var(--line);
      padding-top: 8px;
    }
    .render-trace-items {
      display: grid;
      gap: 8px;
      margin-top: 8px;
    }
    .render-trace-item {
      border-left: 3px solid var(--line);
      padding: 8px 10px;
      background: rgba(8, 13, 20, 0.55);
      display: grid;
      gap: 6px;
    }
    .render-trace-item.trace-brain { border-left-color: #69e6c3; }
    .render-trace-item.trace-render,
    .render-trace-item.trace-render_attempt { border-left-color: #74a7ff; }
    .render-trace-item.trace-self_check { border-left-color: #f1c76b; }
    .render-trace-item.trace-chat { border-left-color: #a98cff; }
    .render-trace-item pre {
      max-height: 180px;
      overflow: auto;
      white-space: pre-wrap;
    }
    .debug-log-card.level-error,
    .debug-log-card.level-critical {
      border-color: rgba(255, 107, 107, 0.65);
    }
    .debug-log-card.level-warning {
      border-color: rgba(241, 199, 107, 0.65);
    }
    .good { color: var(--good); }
    .warn { color: var(--warn); }
    .bad { color: var(--bad); }
    .review-vision { min-height: 86px; white-space: pre-wrap; }
    .review-card textarea { min-height: 70px; resize: vertical; }
    .review-card.has-identity-sheet {
      grid-column: span 2;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
      align-items: start;
    }
    .review-card.has-identity-sheet .review-side-sheet {
      grid-column: 2;
      grid-row: 1 / span 2;
      position: sticky;
      top: 12px;
      border-left: 1px solid var(--line);
      min-height: 100%;
    }
    .review-side-sheet {
      background: rgba(13, 19, 29, 0.82);
    }
    .review-side-sheet .identity-sheet {
      border: 0;
      border-radius: 0;
      background: transparent;
    }
    .review-side-sheet .identity-sheet-thumbs {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .identity-sheets {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
      gap: 12px;
      margin-bottom: 14px;
    }
    .identity-sheet {
      border: 1px solid var(--line);
      background: var(--panel);
      border-radius: 8px;
      overflow: hidden;
    }
    .identity-sheet-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: start;
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
    }
    .identity-sheet-head strong {
      font-size: 15px;
    }
    .identity-sheet-actions {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 6px;
    }
    .identity-sheet-actions select {
      width: auto;
      min-width: 86px;
      padding: 7px 8px;
      font-size: 12px;
    }
    .identity-sheet-thumbs {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      padding: 8px;
      background: #070b11;
    }
    .identity-sheet-thumbs a {
      display: block;
      aspect-ratio: 1;
      border: 1px solid var(--line);
      border-radius: 6px;
      overflow: hidden;
      background: #05070a;
      position: relative;
    }
    .identity-sheet-thumbs img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }
    .identity-sheet-thumbs .train {
      outline: 2px solid rgba(120,226,155,0.72);
      outline-offset: -2px;
    }
    .identity-sheet-body {
      display: grid;
      gap: 8px;
      padding: 10px 12px 12px;
    }
    .identity-sheet-counts,
    .identity-sheet-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .identity-sheet-summary {
      color: var(--muted);
      min-height: 38px;
      font-size: 12px;
    }
    .review-image-frame {
      position: relative;
      display: block;
      background: #05080d;
    }
    .review-image-frame.crop-active {
      cursor: crosshair;
      outline: 1px solid var(--accent);
    }
    .review-image-frame .image-link {
      display: block;
    }
    .review-image-frame img {
      width: 100%;
      display: block;
    }
    .crop-box {
      position: absolute;
      border: 2px solid var(--accent);
      background: rgba(114, 215, 255, 0.16);
      box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.35);
      pointer-events: none;
    }
    .crop-tools {
      border: 1px solid var(--line);
      background: #0b1018;
      border-radius: 6px;
      padding: 8px;
      margin-top: 8px;
    }
    .iot-head .actions {
      align-items: center;
    }
    .iot-head select {
      width: auto;
      min-width: 110px;
    }
    .iot-head input[type="file"] {
      width: min(220px, 32vw);
      color: var(--muted);
      font-size: .85rem;
    }
    .iot-layout {
      display: grid;
      grid-template-columns: minmax(620px, 1fr) minmax(280px, 360px);
      gap: 12px;
      align-items: start;
    }
    .iot-map-panel {
      --iot-map-max-height: min(1040px, calc(100vh - 190px));
      padding: 10px;
      overflow: auto;
      display: grid;
      justify-items: center;
      align-content: start;
    }
    .iot-map-stage {
      position: relative;
      width: min(100%, calc(var(--iot-map-max-height) * var(--iot-map-aspect, 1)));
      max-height: var(--iot-map-max-height);
      aspect-ratio: var(--iot-map-aspect, 1);
      min-height: min(520px, var(--iot-map-max-height));
      background: #070b11;
      border: 1px solid var(--line);
      border-radius: 8px;
      overflow: hidden;
    }
    .iot-floorplan {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }
    .iot-room {
      fill: transparent;
      stroke: transparent;
      stroke-width: 0;
      cursor: crosshair;
      transition: fill .12s ease, stroke .12s ease;
    }
    .iot-room:hover {
      fill: rgba(114, 215, 255, 0.09);
      stroke: rgba(114, 215, 255, 0.28);
      stroke-width: 2;
    }
    .iot-room.muted {
      fill: transparent;
    }
    .iot-room.primary {
      fill: transparent;
    }
    .iot-outer-shell {
      fill: none;
      stroke: url(#iot-wall-hatch);
      stroke-width: 16;
      stroke-linejoin: round;
      stroke-linecap: square;
      pointer-events: none;
    }
    .iot-walls {
      fill: none;
      stroke: rgba(224, 232, 235, 0.46);
      stroke-width: 7;
      stroke-linejoin: round;
      stroke-linecap: round;
      pointer-events: none;
    }
    .iot-wall-fill {
      fill: none;
      stroke: rgba(224, 232, 235, 0.24);
      stroke-width: 18;
      stroke-linecap: square;
      pointer-events: none;
    }
    .iot-door {
      fill: none;
      stroke: rgba(255,255,255,0.32);
      stroke-width: 3;
      stroke-dasharray: 8 6;
      pointer-events: none;
    }
    .iot-room-label {
      fill: rgba(240, 247, 247, 0.55);
      font-size: 18px;
      font-weight: 700;
      text-anchor: middle;
      letter-spacing: 0;
      pointer-events: none;
    }
    .iot-room-size {
      fill: rgba(255, 174, 189, 0.5);
      font-size: 13px;
      font-weight: 700;
      text-anchor: middle;
      pointer-events: none;
    }
    .iot-dim {
      fill: rgba(240, 247, 247, 0.46);
      font-size: 11px;
      font-weight: 700;
      text-anchor: middle;
      pointer-events: none;
    }
    .iot-dim.rotate {
      transform: rotate(90deg);
      transform-box: fill-box;
      transform-origin: center;
    }
    .iot-marker-layer {
      position: absolute;
      inset: 0;
    }
    .iot-marker {
      position: absolute;
      width: 28px;
      height: 28px;
      margin-left: -14px;
      margin-top: -14px;
      border-radius: 50%;
      border: 2px solid #081016;
      color: #041015;
      font-weight: 800;
      font-size: 12px;
      display: grid;
      place-items: center;
      padding: 0;
      cursor: grab;
      box-shadow: 0 6px 18px rgba(0,0,0,0.36);
      z-index: 2;
    }
	    .iot-marker-label {
	      position: relative;
	      z-index: 2;
	      pointer-events: none;
	    }
	    .iot-marker-state-dot {
	      position: absolute;
	      left: -3px;
	      top: -3px;
	      width: 9px;
	      height: 9px;
	      border-radius: 50%;
	      border: 1px solid #061015;
	      background: rgba(160,178,190,0.9);
	      z-index: 4;
	      pointer-events: none;
	    }
	    .iot-marker.live .iot-marker-state-dot {
	      background: #78e29b;
	      box-shadow: 0 0 10px rgba(120,226,155,0.72);
	    }
	    .iot-marker.clear .iot-marker-state-dot {
	      background: #72f0d6;
	    }
	    .iot-marker.stale .iot-marker-state-dot {
	      background: #f1c76b;
	    }
	    .iot-marker-freshness {
	      position: absolute;
	      left: 50%;
	      bottom: -18px;
	      transform: translateX(-50%);
	      min-width: 22px;
	      padding: 1px 4px;
	      border: 1px solid rgba(114,240,214,0.42);
	      border-radius: 999px;
	      background: rgba(3, 7, 10, 0.84);
	      color: #dffcff;
	      font-size: 9px;
	      line-height: 1.25;
	      font-weight: 900;
	      white-space: nowrap;
	      z-index: 5;
	      pointer-events: none;
	    }
	    .iot-marker.freshness-fresh .iot-marker-freshness {
	      border-color: rgba(120,226,155,0.62);
	      color: #a8ffd8;
	    }
	    .iot-marker.freshness-warm .iot-marker-freshness {
	      border-color: rgba(241,199,107,0.55);
	      color: #ffe8ad;
	    }
	    .iot-marker.stale .iot-marker-freshness {
	      border-color: rgba(241,199,107,0.70);
	      color: #f1c76b;
	    }
	    .iot-marker:active {
	      cursor: grabbing;
	      z-index: 4;
	    }
    .iot-marker.selected {
      outline: 3px solid rgba(255,255,255,0.75);
      outline-offset: 2px;
      z-index: 3;
    }
    .iot-marker.disabled {
      opacity: .34;
      filter: grayscale(.8);
    }
    .iot-marker.automation::after {
      content: "";
      position: absolute;
      right: -2px;
      top: -2px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #31e6b5;
      border: 1px solid #061015;
    }
    .iot-marker.live {
      outline: 2px solid rgba(120,226,155,0.9);
      outline-offset: 1px;
    }
    .iot-marker.clear {
      box-shadow: 0 6px 18px rgba(0,0,0,0.36), 0 0 0 2px rgba(114,240,214,0.18);
    }
    .iot-marker.stale {
      opacity: .62;
    }
    .iot-marker.directed::before {
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      width: 2px;
      height: 20px;
      background: rgba(255,255,255,0.88);
      transform-origin: 50% 100%;
      transform: translate(-50%, -100%) rotate(var(--iot-marker-direction, 0deg));
      border-radius: 999px;
      pointer-events: none;
    }
    .iot-marker-fov {
      position: absolute;
      left: 50%;
      top: 50%;
      height: 58px;
      transform-origin: 50% 100%;
      clip-path: polygon(50% 100%, 0 0, 100% 0);
      background: linear-gradient(180deg, rgba(255,255,255,0.20), rgba(114,240,214,0.05));
      border-top: 1px solid rgba(255,255,255,0.20);
      pointer-events: none;
      z-index: 1;
    }
    .iot-marker.camera .iot-marker-fov {
      background: linear-gradient(180deg, rgba(255,106,213,0.24), rgba(255,106,213,0.05));
      border-top-color: rgba(255,106,213,0.30);
    }
    .iot-marker.motion .iot-marker-fov,
    .iot-marker.sensor .iot-marker-fov,
    .iot-marker.device .iot-marker-fov {
      background: linear-gradient(180deg, rgba(66,217,255,0.22), rgba(66,217,255,0.05));
      border-top-color: rgba(66,217,255,0.30);
    }
    .iot-marker.light { background: #ffd166; }
    .iot-marker.room { background: #7cc7ff; }
    .iot-marker.zone { background: #43e6b5; }
    .iot-marker.motion { background: #42d9ff; }
    .iot-marker.area { background: #9b8cff; }
    .iot-marker.camera { background: #ff6ad5; }
    .iot-marker.object { background: #f1c76b; }
    .iot-marker.object.role-furniture { background: #d79a62; }
    .iot-marker.object.role-landmark { background: #f1c76b; }
    .iot-marker.object.role-cat_place { background: #ff7adf; }
    .iot-marker.object.role-door,
    .iot-marker.object.role-window { background: #b7d6ff; }
    .iot-marker.remote { background: #ff9f6e; }
    .iot-marker.sensor,
    .iot-marker.device { background: #7ee787; }
    .iot-side {
      display: grid;
      gap: 10px;
      align-content: start;
    }
    .iot-side-title {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 22px;
      color: var(--muted);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
    }
    .iot-side-title strong {
      color: var(--fg);
      font-size: 13px;
      text-transform: none;
    }
    .iot-summary,
    .iot-selection-meta {
      display: grid;
      gap: 6px;
    }
    .iot-summary span,
    .iot-selection-meta span {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      color: var(--muted);
      border-bottom: 1px solid rgba(255,255,255,0.06);
      padding-bottom: 5px;
      min-width: 0;
    }
    .iot-summary b,
    .iot-selection-meta b {
      color: var(--fg);
      font-weight: 700;
    }
    .iot-review-tools {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
      border: 1px solid rgba(91,246,222,0.18);
      background: rgba(91,246,222,0.05);
      border-radius: 8px;
      padding: 8px;
    }
    .iot-review-tools strong {
      color: var(--fg);
      margin-right: 4px;
    }
    .iot-review-tools span {
      display: inline-flex;
      width: auto;
      border: 0;
      padding: 0;
      margin-right: 6px;
      color: var(--muted);
    }
    .iot-review-tools button {
      min-height: 28px;
      padding: 5px 8px;
      font-size: 11px;
    }
    .iot-selection {
      border: 1px solid var(--line);
      background: rgba(255,255,255,0.03);
      border-radius: 8px;
      padding: 10px;
      display: grid;
      gap: 8px;
    }
    .iot-selection-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .iot-selection-controls label {
      display: grid;
      gap: 4px;
      color: var(--muted);
      font-size: 12px;
      min-width: 0;
    }
    .iot-selection-controls input[type="text"],
    .iot-selection-controls input[type="number"],
    .iot-selection-controls select {
      width: 100%;
      min-width: 0;
    }
    .iot-selection-controls input[type="checkbox"] {
      justify-self: start;
    }
    .iot-selection-actions {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
      gap: 8px;
    }
    .iot-selection-actions .pinpoint {
      font-weight: 800;
      border-color: rgba(255,255,255,0.22);
    }
    .iot-selection-actions .pinpoint.pink {
      color: #ffd8f2;
      background: rgba(255, 70, 178, 0.16);
      border-color: rgba(255, 98, 199, 0.52);
    }
    .iot-selection-actions .pinpoint.cyan {
      color: #d8fffb;
      background: rgba(28, 218, 204, 0.14);
      border-color: rgba(66, 232, 212, 0.52);
    }
    .iot-selection-actions .pinpoint.warm {
      color: #fff2ca;
      background: rgba(255, 199, 85, 0.14);
      border-color: rgba(255, 209, 102, 0.52);
    }
    .iot-selection-actions .pinpoint.off {
      color: #d9e2e8;
      background: rgba(20, 26, 31, 0.86);
      border-color: rgba(120, 140, 150, 0.44);
    }
    .iot-selection-actions .manual-object {
      font-weight: 800;
      color: #e6fbff;
      background: rgba(30, 205, 255, 0.10);
      border-color: rgba(74, 222, 255, 0.45);
    }
    .iot-selection-actions .manual-object.cat {
      color: #ffe0fb;
      background: rgba(255, 76, 210, 0.12);
      border-color: rgba(255, 98, 221, 0.50);
    }
    .iot-selection-view-list {
      grid-column: 1 / -1;
      border: 1px solid rgba(114, 240, 214, 0.18);
      background: rgba(10, 18, 22, 0.68);
      border-radius: 8px;
      padding: 8px;
      display: grid;
      gap: 6px;
    }
    .iot-selection-view-list > strong {
      color: var(--fg);
      font-size: 12px;
    }
    .iot-selection-view-list > div {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto auto;
      gap: 6px;
      align-items: center;
    }
    .iot-selection-view-list span {
      color: var(--muted);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .iot-device-details {
      border: 1px solid var(--line);
      background: rgba(255,255,255,0.025);
      border-radius: 8px;
      overflow: hidden;
    }
    .iot-device-details summary {
      cursor: pointer;
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
      min-height: 38px;
      padding: 8px 10px;
      color: var(--fg);
      list-style: none;
    }
    .iot-device-details summary::-webkit-details-marker {
      display: none;
    }
    .iot-device-details summary::before {
      content: "›";
      color: var(--accent);
      font-size: 18px;
      line-height: 1;
      transform: rotate(0deg);
      transition: transform .12s ease;
    }
    .iot-device-details[open] summary::before {
      transform: rotate(90deg);
    }
    .iot-device-list {
      display: grid;
      gap: 6px;
      max-height: min(420px, 42vh);
      overflow: auto;
      padding: 0 8px 8px;
    }
    .iot-camera-tools {
      display: grid;
      grid-template-columns: minmax(92px, 1fr) minmax(92px, 1fr) repeat(3, auto);
      gap: 6px;
      padding: 0 8px 8px;
      align-items: center;
    }
    .iot-camera-tools select,
    .iot-camera-tools input,
    .iot-camera-tools button {
      min-width: 0;
    }
    .iot-camera-ptz {
      display: grid;
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 6px;
      padding: 0 8px 8px;
    }
    .iot-camera-ptz-status {
      grid-column: 1 / -1;
      border: 1px solid rgba(160, 178, 190, 0.24);
      border-radius: 6px;
      padding: 6px 8px;
      color: var(--muted);
      background: rgba(255,255,255,0.035);
      font-size: 12px;
      font-weight: 800;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .iot-camera-ptz-status.ok {
      border-color: rgba(120, 226, 155, 0.42);
      color: #a8ffd8;
      background: rgba(38, 178, 112, 0.08);
    }
    .iot-camera-ptz-status.warning {
      border-color: rgba(241, 199, 107, 0.52);
      color: #ffe8ad;
      background: rgba(241, 199, 107, 0.08);
    }
    .iot-camera-preset-tools {
      grid-column: 1 / -1;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(82px, auto) auto;
      gap: 6px;
    }
    .iot-camera-preset-tools select,
    .iot-camera-preset-tools button {
      min-width: 0;
    }
    .iot-camera-ptz button {
      min-width: 0;
      padding: 6px 8px;
      border-color: rgba(68, 218, 255, 0.45);
      color: #dffcff;
      background: rgba(11, 21, 30, 0.84);
    }
    .iot-camera-ptz button:disabled,
    .iot-camera-preset-tools select:disabled {
      opacity: 0.38;
      cursor: not-allowed;
      filter: grayscale(0.55);
    }
    .iot-camera-privacy {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 6px;
      padding: 0 8px 8px;
    }
    .iot-camera-privacy-card {
      display: grid;
      gap: 2px;
      min-width: 0;
      border: 1px solid rgba(160, 178, 190, 0.24);
      border-radius: 6px;
      padding: 7px 8px;
      background: rgba(255,255,255,0.032);
      color: var(--muted);
      font-size: 11px;
      line-height: 1.25;
    }
    .iot-camera-privacy-card b {
      color: var(--fg);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0;
    }
    .iot-camera-privacy-card span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .iot-camera-privacy-card.ok {
      border-color: rgba(120, 226, 155, 0.42);
      background: rgba(38, 178, 112, 0.08);
    }
    .iot-camera-privacy-card.bad {
      border-color: rgba(255, 106, 106, 0.62);
      background: rgba(255, 106, 106, 0.10);
      color: #ffd6d6;
    }
    .iot-camera-output {
      margin: 0 8px 8px;
      min-height: 60px;
      max-height: 180px;
      overflow: auto;
      white-space: pre-wrap;
      font-size: 12px;
    }
    .camera-history.compact {
      max-height: 420px;
      overflow: auto;
      padding: 0 8px 8px;
    }
    .iot-device-row {
      border: 1px solid var(--line);
      background: rgba(255,255,255,0.035);
      border-radius: 6px;
      color: var(--fg);
      text-align: left;
      padding: 8px 9px;
      display: grid;
      gap: 4px;
      min-height: 48px;
    }
    .iot-device-row b,
    .iot-device-row span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .iot-device-row b {
      color: var(--fg);
      font-size: 13px;
      line-height: 1.2;
    }
    .iot-device-row span {
      color: var(--muted);
      font-size: 12px;
      line-height: 1.25;
    }
	    .iot-device-row.selected {
	      border-color: var(--accent);
	      background: rgba(114, 215, 255, 0.12);
	    }
	    .iot-device-row.live {
	      border-color: rgba(120,226,155,0.42);
	    }
	    .iot-device-row.clear {
	      border-color: rgba(114,240,214,0.22);
	    }
	    .iot-device-row.freshness-stale {
	      border-color: rgba(241,199,107,0.52);
	      background: rgba(241,199,107,0.055);
	    }
	    .iot-device-row.disabled {
	      opacity: .55;
	    }
	    .iot-marker.confirmed,
	    .iot-device-row.confirmed {
	      border-color: rgba(120, 226, 155, 0.58);
	    }
	    .iot-marker.rejected,
	    .iot-device-row.rejected {
	      opacity: .42;
	      border-color: rgba(255, 117, 117, 0.55);
	    }
	    .iot-marker.merged,
	    .iot-device-row.merged {
	      border-style: dashed;
	      opacity: .5;
	    }
    a { color: var(--accent); }
    [hidden] { display: none !important; }
    @media (min-width: 900px) {
      body.menu-open header {
        margin-left: var(--side-nav-width);
      }
      body.menu-open main {
        max-width: none;
        margin-left: var(--side-nav-width);
        margin-right: 0;
      }
      body.menu-open .side-nav {
        width: var(--side-nav-width);
        box-shadow: none;
      }
      body.menu-open .menu-backdrop {
        display: none;
      }
    }
    @media (max-width: 760px) {
      .vinna-preset-panel {
        grid-template-columns: 1fr;
      }
      .vinna-reference-row {
        grid-template-columns: 1fr;
      }
      .vinna-preset-panel button,
      .vinna-preset-panel .pill {
        width: 100%;
      }
    }
    @media (min-width: 1120px) {
      .fields {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
      .panel > .fields,
      details > .fields {
        gap: 8px 10px;
      }
      .compact-builder {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }
    }
    @media (min-width: 1500px) {
      .editor-layout {
        grid-template-columns: minmax(210px, 17%) minmax(940px, 1fr) minmax(210px, 18%);
      }
    }
    @media (max-width: 1250px) {
      .editor-layout {
        grid-template-columns: 1fr;
      }
    }
    @media (max-width: 780px) {
      header { grid-template-columns: auto 1fr; align-items: center; }
      header h1 { align-self: center; }
      #main-toolbar,
      .authbar { grid-column: 1 / -1; }
      .toolbar { justify-content: stretch; }
      .authbar { justify-content: stretch; }
      .toolbar input[type="search"] { min-width: 0; flex: 1; }
      main { padding: 10px; }
      .grid { grid-template-columns: 1fr; }
      .node-grid { grid-template-columns: 1fr; }
      .node-say-text { min-width: 0; }
      .subtitle-layout { grid-template-columns: 1fr; }
      .fields { grid-template-columns: 1fr; }
      .render-control:has(.render-control-row) {
        grid-template-columns: 1fr;
      }
      .render-control:has(.render-control-row) > .render-control-row,
      .render-control:has(.render-control-row) > .render-control-value {
        grid-column: auto;
      }
      .render-control:has(.render-control-row) > .render-control-value {
        text-align: left;
      }
      .public-shell { grid-template-columns: 1fr; }
      .public-intro { min-height: 280px; padding: 20px; }
      .public-intro h2 { font-size: 34px; }
      .public-signals { grid-template-columns: 1fr; }
      .public::after { left: 14px; right: 14px; bottom: 12px; }
      .public-image-view { grid-template-columns: 1fr; }
      .public-image-frame { min-height: auto; }
      .editor-layout { grid-template-columns: 1fr; }
      .render-queue-card { grid-template-columns: 1fr; }
      .render-queue-metrics { justify-content: flex-start; }
      .lora-builder-workbench { grid-template-columns: 1fr; }
      .iot-layout { grid-template-columns: 1fr; }
      .iot-map-stage { min-height: auto; }
      .iot-device-list { max-height: none; }
      .cat-log-row { grid-template-columns: 1fr; }
      .cat-place-row { grid-template-columns: 1fr; }
      .cat-log-meta {
        justify-items: start;
        text-align: left;
      }
      .review-card.has-identity-sheet {
        grid-column: auto;
        grid-template-columns: 1fr;
      }
      .review-card.has-identity-sheet .review-side-sheet {
        grid-column: auto;
        grid-row: auto;
        position: static;
        border-left: 0;
        border-top: 1px solid var(--line);
      }
    }
