:root {
      color-scheme: light;
      --bg: #f4f6f8;
      --panel: #ffffff;
      --text: #17202a;
      --muted: #667085;
      --line: #d7dde5;
      --field-bg: #ffffff;
      --field-text: #17202a;
      --soft: #e8eef5;
      --notice-bg: #eef6ff;
      --memo-bg: #f3f8ff;
      --memo-line: #c7ddf4;
      --shadow: rgba(16, 24, 40, .16);
      --table-even: #f1f7fd;
      --table-odd: #ffffff;
      --hot: #acd4f5;
      --bunker: #dff3df;
      --accent: #1267b1;
      --accent-strong: #0b4e88;
      --danger: #b42318;
      --ok: #1f7a4d;
      --ui-font-size: 13px;
      --ui-control-height: 34px;
    }
    html[data-theme="dark"] {
      color-scheme: dark;
      --bg: #0f1720;
      --panel: #17212b;
      --text: #e6edf3;
      --muted: #aab6c5;
      --line: #2d3a47;
      --field-bg: #111a23;
      --field-text: #e6edf3;
      --soft: #243241;
      --notice-bg: #102538;
      --memo-bg: #12283c;
      --memo-line: #2f5f86;
      --shadow: rgba(0, 0, 0, .38);
      --table-even: #132435;
      --table-odd: #101c28;
      --hot: #244f72;
      --bunker: #1f4b36;
      --accent: #4ea1f0;
      --accent-strong: #8ec8ff;
      --danger: #f0655d;
      --ok: #67d39a;
    }
    * { box-sizing: border-box; }
    html[data-ui-size="compact"] { --ui-font-size: 12px; --ui-control-height: 30px; }
    html[data-ui-size="large"] { --ui-font-size: 15px; --ui-control-height: 40px; }
    html[data-ui-scale="60"] { --ui-scaled-viewport-width:166.6667vw; --ui-scaled-viewport-height:166.6667vh; --ui-standard-max:1966.6667px; --ui-wide-max:2800px; }
    html[data-ui-scale="70"] { --ui-scaled-viewport-width:142.8572vw; --ui-scaled-viewport-height:142.8572vh; --ui-standard-max:1685.7143px; --ui-wide-max:2400px; }
    html[data-ui-scale="80"] { --ui-scaled-viewport-width:125vw; --ui-scaled-viewport-height:125vh; --ui-standard-max:1475px; --ui-wide-max:2100px; }
    html[data-ui-scale="90"] { --ui-scaled-viewport-width:111.1112vw; --ui-scaled-viewport-height:111.1112vh; --ui-standard-max:1311.1112px; --ui-wide-max:1866.6667px; }
    html[data-ui-scale="110"] { --ui-scaled-viewport-width:90.9091vw; --ui-scaled-viewport-height:90.9091vh; --ui-standard-max:1072.7273px; --ui-wide-max:1527.2728px; }
    html[data-ui-scale="125"] { --ui-scaled-viewport-width:80vw; --ui-scaled-viewport-height:80vh; --ui-standard-max:944px; --ui-wide-max:1344px; }
    html[data-ui-scale="60"] body { zoom: .6; }
    html[data-ui-scale="70"] body { zoom: .7; }
    html[data-ui-scale="80"] body { zoom: .8; }
    html[data-ui-scale="90"] body { zoom: .9; }
    html[data-ui-scale="110"] body { zoom: 1.1; }
    html[data-ui-scale="125"] body { zoom: 1.25; }
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"]) body {
      width: var(--ui-scaled-viewport-width);
      min-height: var(--ui-scaled-viewport-height);
    }
    @supports not (zoom: 1) {
      html[data-ui-scale="60"] body { transform:scale(.6); transform-origin:top left; }
      html[data-ui-scale="70"] body { transform:scale(.7); transform-origin:top left; }
      html[data-ui-scale="80"] body { transform:scale(.8); transform-origin:top left; }
      html[data-ui-scale="90"] body { transform:scale(.9); transform-origin:top left; }
      html[data-ui-scale="110"] body { transform:scale(1.1); transform-origin:top left; }
      html[data-ui-scale="125"] body { transform:scale(1.25); transform-origin:top left; }
    }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: Arial, Helvetica, sans-serif;
      font-size: var(--ui-font-size);
      line-height: 1.3;
    }
    header {
      background: #16202a;
      color: #fff;
      border-bottom: 1px solid #0f1720;
    }
    html[data-sticky-header="true"] header { position: sticky; top: 0; z-index: 100; }
    .bar, main {
      width: min(1180px, calc(100vw - 32px));
      margin: 0 auto;
    }
    html[data-content-width="wide"] .bar,
    html[data-content-width="wide"] main { width: min(1680px, calc(100vw - 28px)) !important; }
    html[data-content-width="full"] .bar,
    html[data-content-width="full"] main { width: calc(100vw - 20px) !important; max-width: none !important; }
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="standard"] .bar,
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="standard"] main {
      width: min(var(--ui-standard-max), calc(var(--ui-scaled-viewport-width) - 32px)) !important;
      max-width: none !important;
    }
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="wide"] .bar,
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="wide"] main {
      width: min(var(--ui-wide-max), calc(var(--ui-scaled-viewport-width) - 28px)) !important;
      max-width: none !important;
    }
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="full"] .bar,
    html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"])[data-content-width="full"] main {
      width: calc(var(--ui-scaled-viewport-width) - 20px) !important;
      max-width: none !important;
    }
    html[data-show-service-data="false"] [data-ui-service-detail],
    html[data-show-service-data="false"] .audit-technical { display: none !important; }
    html[data-sticky-table-headers="true"] .table-wrap thead th {
      position: sticky;
      top: 0;
      z-index: 3;
    }
    html[data-table-density="compact"] table th,
    html[data-table-density="compact"] table td { padding-top: 5px !important; padding-bottom: 5px !important; }
    html[data-table-density="spacious"] table th,
    html[data-table-density="spacious"] table td { padding-top: 13px !important; padding-bottom: 13px !important; }
    html[data-ui-size="compact"] .panel { padding: 10px; }
    html[data-ui-size="large"] .panel { padding: 20px; }
    .ui-notification-toast {
      position: fixed;
      right: 24px;
      bottom: 24px;
      z-index: 190;
      width: min(420px, calc(100vw - 28px));
      padding: 14px 16px;
      border: 1px solid var(--accent);
      border-left-width: 5px;
      border-radius: 9px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 18px 46px var(--shadow);
    }
    .ui-notification-toast.error { border-color: var(--danger); }
    .ui-notification-toast strong { display: block; margin-bottom: 4px; }
    .ui-notification-toast p { margin: 0; color: var(--muted); }
    .bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 50px;
      gap: 12px;
    }
    .header-actions { display: flex; flex: 1; align-items: center; justify-content: flex-end; gap: 8px; }
    .global-vehicle-search {
      position: relative;
      flex: 1 1 480px;
      max-width: 620px;
      margin-left: auto;
    }
    .global-search-field { position: relative; }
    .global-search-field input {
      width: 100%;
      height: var(--ui-control-height);
      min-height: var(--ui-control-height);
      padding: 6px 58px 6px 32px;
      border-color: #41505f;
      background: #111a23;
      color: #fff;
    }
    .global-search-field::before {
      content: "\1F50D";
      position: absolute;
      z-index: 1;
      left: 11px;
      top: 7px;
      filter: grayscale(1);
      opacity: .72;
      pointer-events: none;
    }
    .global-search-shortcut {
      position: absolute;
      right: 9px;
      top: 7px;
      padding: 2px 5px;
      border: 1px solid #41505f;
      border-radius: 4px;
      color: #aab6c5;
      font-size: 11px;
      pointer-events: none;
    }
    .global-search-toggle { display: none; }
    .global-search-results {
      position: absolute;
      z-index: 120;
      top: calc(100% + 6px);
      left: 0;
      right: 0;
      max-height: min(440px, calc(100vh - 90px));
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      box-shadow: 0 18px 46px var(--shadow);
    }
    .global-search-result {
      display: grid;
      grid-template-columns: minmax(90px, 150px) minmax(0, 1fr);
      gap: 4px 12px;
      width: 100%;
      padding: 10px 12px;
      border: 0;
      border-bottom: 1px solid var(--line);
      border-radius: 0;
      background: transparent;
      color: var(--text);
      text-align: left;
    }
    .global-search-result:last-child { border-bottom: 0; }
    .global-search-result:hover,
    .global-search-result.active { background: var(--soft); }
    .global-search-result strong { overflow-wrap: anywhere; }
    .global-search-result span {
      min-width: 0;
      overflow-wrap: anywhere;
      color: var(--muted);
      font-size: 13px;
    }
    .global-search-empty { margin: 0; padding: 14px; color: var(--muted); }
    .notification-bell {
      position: relative;
      width: 36px;
      min-width: 36px;
      height: 36px;
      min-height: 36px;
      padding: 0;
      border-color: #41505f;
      background: transparent;
      color: #fff;
      font-size: 17px;
    }
    .notification-bell-icon {
      display: block;
      color: inherit;
      font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
      font-size: 18px;
      line-height: 1;
      filter: grayscale(1);
    }
    .background-jobs-icon {
      display: block;
      color: inherit;
      font-size: 21px;
      line-height: 1;
    }
    .pwa-install-button[hidden] { display: none; }
    .pwa-install-icon {
      position: relative;
      display: block;
      width: 18px;
      height: 19px;
      margin: auto;
      background: linear-gradient(currentColor, currentColor) center 1px / 2px 11px no-repeat;
    }
    .pwa-install-icon::before {
      content: "";
      position: absolute;
      left: 5px;
      top: 5px;
      width: 7px;
      height: 7px;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
      transform: rotate(45deg);
    }
    .pwa-install-icon::after {
      content: "";
      position: absolute;
      left: 1px;
      right: 1px;
      bottom: 0;
      height: 5px;
      border-left: 2px solid currentColor;
      border-right: 2px solid currentColor;
      border-bottom: 2px solid currentColor;
    }
    .pwa-install-dialog {
      width: min(480px, calc(100vw - 24px));
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px var(--shadow);
    }
    .pwa-install-dialog::backdrop { background: rgba(3, 10, 18, .72); }
    .pwa-install-content { padding: 18px; }
    .pwa-install-content p { margin: 0 0 16px; color: var(--muted); line-height: 1.5; }
    .pwa-install-content ol { margin: 0 0 18px; padding-left: 22px; line-height: 1.65; }
    .notification-badge {
      position: absolute;
      top: -5px;
      right: -5px;
      display: none;
      min-width: 19px;
      height: 19px;
      padding: 0 5px;
      border-radius: 10px;
      background: #dc4c43;
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      line-height: 19px;
    }
    .notification-badge.visible { display: block; }
    .notification-dialog {
      width: min(620px, calc(100vw - 24px));
      max-height: min(720px, calc(100vh - 24px));
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px var(--shadow);
    }
    .notification-dialog::backdrop { background: rgba(3, 10, 18, .72); }
    .notification-head {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      padding: 14px;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }
    .notification-head h2 { margin: 0; }
    .site-sound-control {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      min-height: 36px;
      padding: 0 9px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--field-bg);
      color: var(--text);
      font-size: 13px;
    }
    .site-sound-control input { width: 105px; margin: 0; accent-color: var(--accent); }
    .site-sound-control output { min-width: 34px; color: var(--muted); text-align: right; }
    .push-notification-status { max-width: 220px; color: var(--muted); font-size: 12px; line-height: 1.25; }
    #pushNotificationsToggle.push-enabled { border-color: var(--ok); color: var(--ok); }
    @media (max-width: 620px) {
      .notification-dialog[open] {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        width: calc(100vw - 12px);
        height: calc(100dvh - 12px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        max-height: none;
        margin: auto;
        overflow: hidden;
      }
      .notification-head {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 8px;
        padding: 11px;
      }
      .notification-head h2 { margin: 0; }
      .notification-head .actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        width: 100%;
      }
      #pushNotificationsToggle { min-width: 0; width: 100%; }
      #notificationClose { grid-column: 2; grid-row: 1; }
      .push-notification-status { grid-column: 1 / -1; max-width: none; }
      .push-notification-status:empty { display: none; }
      .site-sound-control { min-width: 0; justify-content: center; }
      .site-sound-control input { width: 82px; }
      #notificationReadAll { white-space: nowrap; }
      .notification-dialog[open] .notification-list {
        min-height: 0;
        max-height: none;
        overflow-y: auto;
        overscroll-behavior: contain;
      }
    }
    .notification-list { display: grid; max-height: calc(100vh - 140px); overflow: auto; }
    .notification-item {
      display: block;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
      color: var(--text);
      text-decoration: none;
    }
    .notification-item.unread,
    .notification-item:hover { background: var(--soft); }
    .notification-item-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
    .notification-item p { margin: 0; color: var(--muted); }
    .notification-link { color: var(--text); text-decoration: none; }
    .notification-link:hover { text-decoration: underline; }
    .notification-item .notification-identity { cursor: copy; flex-shrink: 0; border: 1px solid transparent; font-size: 11px; font-weight: 400; }
    .notification-identity:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
    .notification-output { margin: 8px 0; }
    .notification-output summary { cursor: pointer; }
    .command-output { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; margin: 8px 0; padding: 10px; background: var(--soft); border: 1px solid var(--line); border-radius: 6px; font-size: 12px; }

    .brand {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: #fff;
      font-weight: 700;
      letter-spacing: 0;
      text-decoration: none;
    }
    .logo-mark {
      display: inline-grid;
      place-items: center;
      width: 48px;
      height: 32px;
      border: 1px solid rgba(255,255,255,.26);
      border-radius: 6px;
      background: #0f1720;
      color: #fff;
      font-weight: 800;
      font-size: 17px;
      line-height: 1;
    }
    .brand-text {
      white-space: nowrap;
    }
    .build-version {
      display: inline-flex;
      align-items: center;
      min-height: 22px;
      padding: 2px 7px;
      border: 1px solid rgba(255,255,255,.22);
      border-radius: 999px;
      background: rgba(255,255,255,.08);
      color: rgba(255,255,255,.72);
      font-size: 11px;
      font-weight: 600;
      line-height: 1;
      white-space: nowrap;
    }
    .brand-tools {
      display: inline-flex;
      align-items: center;
      gap: 12px;
    }
    .theme-toggle {
      width: 38px;
      height: 38px;
      min-height: 38px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid rgba(255,255,255,.28);
      background: transparent;
      color: #fff;
      font-size: 19px;
    }
    .theme-toggle:hover {
      background: rgba(255,255,255,.08);
    }
    .theme-toggle .sun { display: none; }
    html[data-theme="dark"] .theme-toggle .moon { display: none; }
    html[data-theme="dark"] .theme-toggle .sun { display: inline; }
    .scroll-top {
      position: fixed;
      right: 28px;
      bottom: 28px;
      z-index: 50;
      width: 48px;
      height: 48px;
      min-height: 48px;
      padding: 0;
      border-radius: 999px;
      border: 1px solid var(--accent);
      background: var(--panel);
      color: var(--accent);
      font-size: 24px;
      line-height: 1;
      box-shadow: 0 12px 28px rgba(0,0,0,.18);
      opacity: 0;
      pointer-events: none;
      transform: translateY(10px);
      transition: opacity .18s ease, transform .18s ease, background .18s ease;
    }
    .scroll-top.visible {
      opacity: 1;
      pointer-events: auto;
      transform: translateY(0);
    }
    .scroll-top:hover {
      background: var(--accent);
      color: #fff;
    }
    .nav-menu { position: relative; margin-left: auto; }
    .nav-menu > summary {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      min-height: 38px;
      padding: 8px 12px;
      border: 1px solid rgba(255,255,255,.24);
      border-radius: 6px;
      color: #fff;
      cursor: pointer;
      list-style: none;
      user-select: none;
    }
    .nav-menu > summary::-webkit-details-marker { display: none; }
    .nav-menu > summary::after { content: "▾"; font-size: 12px; color: #dce8f5; }
    .nav-menu[open] > summary::after { content: "▴"; }
    .nav-menu nav {
      position: absolute;
      top: calc(100% + 8px);
      right: 0;
      z-index: 60;
      display: grid;
      min-width: 190px;
      padding: 8px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 14px 36px var(--shadow);
    }
    .nav-menu nav a {
      display: block;
      padding: 9px 10px;
      border-radius: 6px;
      color: var(--text);
      text-decoration: none;
      white-space: nowrap;
    }
    .nav-menu nav a:hover { background: var(--soft); }
    .nav-menu nav .nav-game-button {
      display: block;
      width: 100%;
      padding: 9px 10px;
      border: 0;
      border-radius: 6px;
      background: transparent;
      color: var(--text);
      font: inherit;
      text-align: left;
      cursor: pointer;
    }
    .nav-menu nav .nav-game-button:hover { background: var(--soft); }
    .nav-account {
      display: grid;
      gap: 2px;
      margin: 0 0 6px;
      padding: 8px 10px 10px;
      border-bottom: 1px solid var(--line);
    }
    .nav-account b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .nav-account span { color: var(--muted); font-size: 12px; }
    .idle-game {
      position: fixed;
      inset: 0;
      z-index: 200;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 22px;
      background: rgba(6, 12, 18, .72);
      backdrop-filter: blur(5px);
    }
    .idle-game.open {
      display: flex;
    }
    .game-panel {
      width: min(420px, calc(100vw - 28px));
      padding: 18px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px rgba(0,0,0,.38);
    }
    .game-panel.harvest-mode {
      width: 100vw;
      height: 100dvh;
      max-width: none;
      padding: 14px;
      border: 0;
      border-radius: 0;
      display: grid;
      grid-template-columns: minmax(0, 1fr) 280px;
      grid-template-rows: auto auto minmax(0, 1fr) auto;
      gap: 10px 14px;
    }
    .game-panel.harvest-mode .game-head,
    .game-panel.harvest-mode .game-modes,
    .game-panel.harvest-mode .game-actions {
      grid-column: 1 / -1;
      margin: 0;
    }
    .game-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }
    .game-modes {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }
    .game-modes button {
      min-height: var(--ui-control-height);
      padding: 6px 10px;
      border-radius: 6px;
    }
    .game-modes button.active {
      background: var(--accent);
      color: #fff;
    }
    .game-title {
      margin: 0;
      font-size: 24px;
      line-height: 1;
    }
    .game-score {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 76px;
      min-height: 36px;
      padding: 7px 10px;
      border-radius: 6px;
      background: var(--soft);
      font-weight: 800;
    }
    .game-board {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 8px;
      aspect-ratio: 1;
      padding: 8px;
      border-radius: 8px;
      background: #0f1720;
      touch-action: none;
    }
    .game-board.harvest {
      display: block;
      grid-column: 1;
      grid-row: 3;
      width: 100%;
      height: 100%;
      min-height: 0;
      aspect-ratio: auto;
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      background: #17351f;
    }
    .harvest-canvas {
      display: block;
      width: 100%;
      height: 100%;
      touch-action: none;
    }
    .harvest-side {
      display: none;
    }
    .game-panel.harvest-mode .harvest-side {
      display: flex;
      grid-column: 2;
      grid-row: 3;
      min-height: 0;
      flex-direction: column;
      gap: 10px;
      overflow: auto;
    }
    .harvest-card {
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--soft);
    }
    .harvest-stats {
      display: grid;
      grid-template-columns: 1fr auto;
      gap: 6px 12px;
      font-size: 14px;
    }
    .harvest-stats strong { text-align: right; }
    .harvest-meter {
      height: 8px;
      margin-top: 10px;
      overflow: hidden;
      border-radius: 4px;
      background: var(--panel);
    }
    .harvest-meter span {
      display: block;
      width: 0;
      height: 100%;
      background: #d4a62a;
      transition: width .15s linear;
    }
    .harvest-upgrades {
      display: grid;
      gap: 7px;
    }
    .harvest-upgrade {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
      min-height: var(--ui-control-height);
      padding: 6px 8px;
      text-align: left;
      border-radius: 5px;
    }
    .harvest-upgrade span {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .harvest-upgrade small { color: inherit; opacity: .78; }
    .harvest-controls {
      display: none;
      grid-template-columns: repeat(3, 46px);
      grid-template-rows: repeat(2, 42px);
      justify-content: center;
      gap: 5px;
    }
    .harvest-controls button {
      min-height: 42px;
      padding: 0;
      font-size: 20px;
    }
    .harvest-controls [data-dir="up"] { grid-column: 2; }
    .harvest-controls [data-dir="left"] { grid-column: 1; grid-row: 2; }
    .harvest-controls [data-dir="down"] { grid-column: 2; grid-row: 2; }
    .harvest-controls [data-dir="right"] { grid-column: 3; grid-row: 2; }
    .game-panel.harvest-mode .game-hint {
      position: absolute;
      left: 28px;
      bottom: 22px;
      z-index: 2;
      max-width: calc(100vw - 360px);
      margin: 0;
      padding: 6px 9px;
      border-radius: 5px;
      background: rgba(8, 17, 24, .82);
      color: #fff;
    }
    .game-cell {
      display: grid;
      place-items: center;
      min-width: 0;
      border-radius: 6px;
      background: #1f2c39;
      color: #fff;
      font-size: 26px;
      font-weight: 800;
      line-height: 1;
      overflow: hidden;
    }
    .harvest-cell {
      min-width: 0;
      border-radius: 3px;
      background: #244a28;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
    }
    .harvest-cell.grain {
      background: linear-gradient(135deg, #d3b13e, #7ca13a);
    }
    .harvest-cell.cut {
      background: #31523a;
    }
    .harvest-cell.combine {
      background: #e24d38;
      box-shadow: inset 0 0 0 2px #ffd166;
    }
    .game-cell[data-v="0"] { color: transparent; }
    .game-cell[data-v="2"] { background: #dce8f5; color: #17202a; }
    .game-cell[data-v="4"] { background: #c8d7e8; color: #17202a; }
    .game-cell[data-v="8"] { background: #68a8df; }
    .game-cell[data-v="16"] { background: #3d8acc; }
    .game-cell[data-v="32"] { background: #2b6fb0; }
    .game-cell[data-v="64"] { background: #18538e; }
    .game-cell[data-v="128"] { background: #28a06f; font-size: 23px; }
    .game-cell[data-v="256"] { background: #158456; font-size: 23px; }
    .game-cell[data-v="512"] { background: #b88a2f; font-size: 23px; }
    .game-cell[data-v="1024"] { background: #9a6426; font-size: 20px; }
    .game-cell[data-v="2048"] { background: #d94b4b; font-size: 20px; }
    .game-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 14px;
    }
    .game-hint {
      margin: 10px 0 0;
      color: var(--muted);
      font-size: 13px;
    }
    @media (max-width: 760px) {
      .idle-game { padding: 0; }
      .game-panel.harvest-mode {
        padding: 8px;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto minmax(260px, 1fr) auto auto;
        gap: 7px;
        overflow: auto;
      }
      .game-panel.harvest-mode .game-head { grid-row: 1; }
      .game-panel.harvest-mode .game-modes { grid-row: 2; }
      .game-board.harvest { grid-column: 1; grid-row: 3; min-height: 48vh; }
      .game-panel.harvest-mode .harvest-side {
        grid-column: 1;
        grid-row: 4;
        display: grid;
        grid-template-columns: 1fr;
        overflow: visible;
      }
      .game-panel.harvest-mode .game-actions { grid-row: 5; }
      .harvest-controls { display: grid; }
      .game-panel.harvest-mode .game-hint {
        position: static;
        max-width: none;
        grid-column: 1;
        margin: 0;
      }
      .harvest-upgrades { grid-template-columns: 1fr 1fr; }
      .game-title { font-size: 20px; }
    }
    main { padding: 16px 0 30px; }
    h1 { font-size: 24px; margin: 0 0 12px; letter-spacing: 0; }
    h2 { font-size: 16px; margin: 0 0 9px; letter-spacing: 0; }
    .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .dashboard-top {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }
    main.dashboard-main {
      width: min(1880px, calc(100vw - 24px));
    }
    .dashboard-vehicles-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      margin-bottom: 8px;
    }
    .dashboard-vehicles-head h2 { margin-bottom: 7px; }
    .dashboard-bko-stats { display: flex; gap: 6px; flex-wrap: wrap; }
    .dashboard-bko-refresh-state { align-self: center; color: var(--muted); font-size: 12px; }
    .dashboard-bko-refresh-button.is-loading {
      animation: dashboard-bko-refresh-spin .8s linear infinite;
    }
    @keyframes dashboard-bko-refresh-spin {
      to { transform: rotate(360deg); }
    }
    .row.vehicle-row {
      display: grid;
      grid-template-columns: minmax(320px, 1fr) 190px 310px;
      align-items: center;
      position: relative;
    }
    .row.vehicle-row::before {
      content: "";
      position: absolute;
      top: 7px;
      bottom: 7px;
      left: 0;
      width: 5px;
      border-radius: 4px;
      background: var(--muted);
    }
    .row.vehicle-row.vehicle-online::before { background: #65cf87; }
    .row.vehicle-row.vehicle-offline::before { background: #ff6b6b; }
    .row.vehicle-row.vehicle-unknown::before { background: #e4a11b; }
    .row.vehicle-row .vehicle-info { padding-left: 12px; }
    .vehicle-primary {
      display: flex;
      align-items: baseline;
      gap: 4px;
      margin-bottom: 2px;
      color: var(--text);
    }
    .dashboard-copy-value {
      display: inline;
      padding: 0;
      border: 0;
      border-radius: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      font-weight: 700;
      line-height: inherit;
      cursor: pointer;
    }
    .dashboard-copy-value:hover,
    .dashboard-copy-value:focus-visible {
      color: var(--accent-strong);
      outline: none;
    }
    .dashboard-copy-value.copied { color: var(--ok); }
    .vehicle-health-summary {
      display: grid;
      gap: 3px;
      width: 100%;
      min-height: 46px;
      box-sizing: border-box;
      align-content: center;
      min-width: 0;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-left: 4px solid var(--muted);
      border-radius: 7px;
      background: var(--soft);
      color: var(--text);
      text-decoration: none;
      transition: transform .14s ease, border-color .14s ease, background .14s ease;
    }
    .vehicle-health-summary:hover {
      transform: translateY(-1px);
      border-color: var(--accent);
      border-left-color: var(--accent);
    }
    .vehicle-health-summary b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .vehicle-health-summary small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .vehicle-health-summary.ok { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--panel)); }
    .vehicle-health-summary.warning { border-left-color: #e4a11b; background: color-mix(in srgb, #e4a11b 8%, var(--panel)); }
    .vehicle-health-summary.danger { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--panel)); }
    .icon-button {
      display: inline-grid;
      place-items: center;
      width: 32px;
      height: 32px;
      min-height: 32px;
      padding: 0;
      font-size: 20px;
      line-height: 1;
    }
    form.compact {
      margin: 0;
    }
    .dashboard-status {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
    }
    .dashboard-status h2 {
      margin-bottom: 0;
    }
    .dashboard-status p {
      margin: 0;
    }
    .panel {
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 12px;
    }
    .row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 9px;
      border-top: 1px solid var(--line);
      padding: 7px 0;
    }
    .row:first-child { border-top: 0; padding-top: 0; }
    .row,
    .command-row,
    .monitor-row {
      content-visibility: auto;
      contain-intrinsic-size: auto 72px;
    }
    .muted { color: var(--muted); }
    .tag {
      display: inline-flex;
      align-items: center;
      min-height: 21px;
      padding: 2px 7px;
      border-radius: 999px;
      background: var(--soft);
      color: var(--text);
      font-size: 11px;
      white-space: nowrap;
    }
    .tag.ok { background: #e8f5ee; color: var(--ok); }
    .tag.danger { background: #fff1f0; color: var(--danger); }
    html[data-theme="dark"] .tag.ok { background: #173625; }
    html[data-theme="dark"] .tag.danger { background: #3a1e1e; }
    .actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .rfid-actions {
      align-items: center;
      justify-content: space-between;
    }
    .rfid-actions-left,
    .rfid-actions-right {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }
    .rfid-report-actions {
      display: flex;
      justify-content: flex-end;
      margin-top: 12px;
    }
    .vehicle-actions {
      display: grid;
      grid-template-columns: 44px 32px 76px 86px 32px;
      gap: 6px;
      align-items: center;
      justify-content: end;
      flex: 0 0 310px;
    }
    .vehicle-actions .tag {
      justify-content: center;
      min-height: 30px;
      padding: 2px 8px;
    }
    .vehicle-actions a.button,
    .vehicle-actions button {
      min-height: 30px;
      padding: 4px 8px;
      width: 100%;
      font-size: 13px;
      transition: transform .14s ease, border-color .14s ease, background .14s ease, color .14s ease;
    }
    .vehicle-actions a.button:hover,
    .vehicle-actions button:hover {
      transform: translateY(-1px);
    }
    .vehicle-actions .icon-button {
      width: 30px;
      height: 30px;
      min-height: 30px;
      padding: 0;
      font-size: 18px;
    }
    .vehicle-actions .watch-toggle {
      font-weight: 700;
      transition: background .14s ease, border-color .14s ease, color .14s ease, transform .14s ease;
    }
    .vehicle-actions .watch-add {
      border-color: color-mix(in srgb, var(--ok) 58%, var(--line));
      background: color-mix(in srgb, var(--ok) 14%, transparent);
      color: color-mix(in srgb, var(--ok) 78%, var(--text));
    }
    .vehicle-actions .watch-remove {
      border-color: color-mix(in srgb, var(--danger) 58%, var(--line));
      background: color-mix(in srgb, var(--danger) 13%, transparent);
      color: color-mix(in srgb, var(--danger) 78%, var(--text));
    }
    .vehicle-actions .watch-toggle:hover {
      transform: translateY(-1px);
      background: color-mix(in srgb, currentColor 18%, transparent);
    }
    @media (prefers-reduced-motion: reduce) {
      .vehicle-health-summary,
      .vehicle-actions a.button,
      .vehicle-actions button { transition: none; }
    }
    .vehicle-actions .coord-button {
      width: 32px;
      min-width: 32px;
      padding: 0;
      font-size: 18px;
    }
    .vehicle-actions .action-empty {
      width: 100%;
      height: 30px;
    }
    .command-actions {
      display: grid;
      grid-template-columns: 70px 64px;
      gap: 10px;
      align-items: center;
      justify-content: end;
      flex: 0 0 148px;
    }
    .command-actions .tag {
      justify-content: center;
      min-height: 32px;
      padding: 2px 8px;
    }
    .command-actions form {
      margin: 0;
    }
    .command-actions button {
      width: 64px;
      min-height: 36px;
      padding: 6px 10px;
    }
    .command-row { flex-wrap: wrap; }
    .command-row > div:first-child {
      flex: 1 1 0;
      min-width: 0;
    }
    .command-row > .command-actions {
      flex: 0 0 148px;
      margin-left: auto;
    }
    .command-job {
      flex: 1 0 100%;
      display: grid;
      grid-template-columns: minmax(170px, 1fr) auto;
      gap: 8px 12px;
      padding: 10px 0 2px;
    }
    .command-job[hidden] { display: none; }
    .command-job-track {
      grid-column: 1 / -1;
      height: 7px;
      overflow: hidden;
      border-radius: 4px;
      background: var(--soft);
    }
    .command-job-bar {
      display: block;
      width: 0;
      height: 100%;
      background: var(--accent);
      transition: width .25s ease;
    }
    .command-job-meta { color: var(--muted); font-size: 13px; }
    .command-job-cancel { min-height: 30px; padding: 4px 9px; }
    .command-job-output {
      grid-column: 1 / -1;
      max-height: 320px;
      margin: 2px 0 0;
      overflow: auto;
      white-space: pre-wrap;
    }
    .site-process-indicator {
      position: fixed;
      z-index: 1200;
      left: 16px;
      bottom: 16px;
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      width: min(360px, calc(100vw - 32px));
      padding: 11px 12px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 12px 34px var(--shadow);
    }
    .site-process-indicator[hidden] { display: none; }
    .site-process-spinner {
      width: 20px;
      height: 20px;
      border: 2px solid var(--soft);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: site-process-spin .8s linear infinite;
    }
    .site-process-content { min-width: 0; display: grid; gap: 3px; }
    .site-process-content strong,
    .site-process-content > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .site-process-content > span { color: var(--muted); font-size: 12px; }
    .site-process-track { height: 4px; overflow: hidden; border-radius: 2px; background: var(--soft); }
    .site-process-track span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s ease; }
    .site-process-indicator.navigation .site-process-track span {
      width: 38% !important;
      animation: site-process-slide 1.05s ease-in-out infinite;
    }
    @keyframes site-process-spin { to { transform: rotate(360deg); } }
    @keyframes site-process-slide {
      0% { transform: translateX(-110%); }
      100% { transform: translateX(300%); }
    }
    a.button, button {
      appearance: none;
      border: 1px solid var(--accent);
      border-radius: 6px;
      background: var(--accent);
      color: #fff;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 32px;
      padding: 5px 10px;
      text-decoration: none;
      font: inherit;
      line-height: 1.2;
    }
    a.button.secondary, button.secondary {
      background: var(--field-bg);
      color: var(--accent-strong);
    }
    a.button.success, button.success {
      background: #19724a;
      border-color: #23885b;
      color: #fff;
    }
    a.button.success:hover, button.success:hover {
      background: #23885b;
    }
    button.danger {
      background: var(--danger);
      border-color: var(--danger);
    }
    input {
      width: 100%;
      min-height: var(--ui-control-height);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 6px 9px;
      font: inherit;
      background: var(--field-bg);
      color: var(--field-text);
    }
    input[type="checkbox"],
    input[type="radio"] {
      width: 16px;
      min-height: 16px;
      height: 16px;
      margin: 0;
      accent-color: var(--accent);
    }
    select {
      width: 100%;
      min-height: var(--ui-control-height);
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 6px 9px;
      font: inherit;
      background: var(--field-bg);
      color: var(--field-text);
    }
    textarea {
      width: 100%;
      min-height: 240px;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 9px;
      font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
      background: #0b1117;
      color: #e6edf3;
      resize: vertical;
    }
    label { display: block; margin-bottom: 4px; color: var(--muted); }
    form.inline { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; }
    form.inline .grow { flex: 1; min-width: 220px; }
    form.dashboard-search {
      display: grid;
      grid-template-columns: minmax(150px, 0.8fr) minmax(160px, 0.85fr) minmax(190px, 1fr) minmax(230px, 1.15fr) minmax(180px, 0.95fr);
      gap: 10px;
      align-items: end;
    }
    form.dashboard-search .grow {
      min-width: 0;
    }
    form.dashboard-search .dashboard-query {
      grid-column: 1 / span 2;
      max-width: 520px;
    }
    form.dashboard-search .dashboard-query-field {
      grid-column: 3;
      max-width: 190px;
    }
    form.dashboard-search .dashboard-filter-project { grid-column: 1; }
    form.dashboard-search .dashboard-filter-status { grid-column: 2; }
    form.dashboard-search .dashboard-filter-region { grid-column: 3; }
    form.dashboard-search .dashboard-filter-pu { grid-column: 4; }
    form.dashboard-search .dashboard-filter-type { grid-column: 5; }
    form.dashboard-search .search-actions {
      grid-column: 1 / -1;
    }
    .dashboard-mobile-filter-toggle {
      display: none;
    }
    .search-actions {
      flex: 0 0 100%;
      display: flex;
      gap: 8px;
      justify-content: flex-start;
      margin-top: 8px;
    }
    pre {
      overflow: auto;
      white-space: pre-wrap;
      word-break: break-word;
      background: #111820;
      color: #e6edf3;
      border-radius: 8px;
      padding: 14px;
      line-height: 1.45;
      max-height: 620px;
    }
    .table-wrap {
      overflow: auto;
      border: 1px solid var(--line);
      border-radius: 8px;
      max-height: 72vh;
      background: var(--field-bg);
    }
    .tm-device-meta {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin: -6px 0 16px;
    }
    .tm-copy-meta {
      cursor: copy;
      user-select: none;
      transition: background .15s ease, color .15s ease, box-shadow .15s ease;
    }
    .tm-copy-meta:hover,
    .tm-copy-meta:focus-visible {
      box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 38%, transparent);
      outline: none;
    }
    .tm-copy-meta.copied {
      background: #19724a;
      color: #fff;
    }
    .tm-device-nav {
      display: grid;
      grid-template-columns: minmax(260px, 1.25fr) minmax(260px, 1fr);
      gap: 12px;
      align-items: end;
      margin-bottom: 12px;
    }
    .tm-device-nav form {
      display: flex;
      gap: 8px;
      align-items: end;
    }
    .tm-device-nav .grow {
      flex: 1;
      min-width: 0;
    }
    .tm-wide-panel {
      position: relative;
      left: 50%;
      width: calc(var(--ui-scaled-viewport-width, 100vw) - 48px);
      max-width: none;
      transform: translateX(-50%);
    }
    .tm-filter-actions {
      display: flex;
      gap: 8px;
      align-items: center;
      flex-wrap: wrap;
    }
    @media (max-width: 720px) {
      .tm-device-nav {
        grid-template-columns: 1fr;
      }
      .tm-wide-panel {
        width: calc(var(--ui-scaled-viewport-width, 100vw) - 16px);
      }
    }
    .terminal-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 380px;
      gap: 16px;
      align-items: start;
    }
    .terminal-window {
      border: 1px solid #253244;
      border-radius: 8px;
      overflow: hidden;
      background: #05080c;
      box-shadow: 0 12px 28px var(--shadow);
    }
    .terminal-titlebar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 34px;
      padding: 6px 10px;
      background: #101820;
      color: #dce8f5;
      border-bottom: 1px solid #253244;
      font-size: 13px;
    }
    .command-help details {
      border-top: 1px solid var(--line);
      padding: 10px 0;
    }
    .command-help details:first-child { border-top: 0; padding-top: 0; }
    .command-help summary {
      cursor: pointer;
      font-weight: 700;
      color: var(--text);
    }
    .command-help pre {
      max-height: 220px;
      margin: 8px 0 0;
      font-size: 12px;
    }
    .seal-builder {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 360px;
      gap: 16px;
      align-items: start;
    }
    .seal-vehicle-list {
      display: grid;
      gap: 10px;
      max-height: 62vh;
      overflow: auto;
      padding-right: 4px;
    }
    .seal-vehicle {
      display: grid;
      grid-template-columns: 24px minmax(0, 1fr);
      gap: 10px;
      align-items: start;
      border-top: 1px solid var(--line);
      padding: 10px 0;
    }
    .seal-vehicle:first-child {
      border-top: 0;
      padding-top: 0;
    }
    .seal-controls {
      display: grid;
      gap: 14px;
    }
    .seal-toggle-row,
    .reason-grid {
      display: grid;
      gap: 8px;
    }
    .seal-toggle-row label,
    .reason-grid label {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      align-items: start;
      gap: 8px;
      margin: 0;
      color: var(--text);
      text-align: left;
    }
    .seal-toggle-row input,
    .reason-grid input {
      justify-self: start;
      margin-top: 2px;
    }
    .seal-output {
      min-height: 300px;
      font-size: 14px;
      white-space: pre-wrap;
      overflow-wrap: anywhere;
    }
    .seal-reason-add { display: grid; gap: 8px; margin-top: 10px; }
    .seal-reason-add-toggle { justify-self: start; }
    .seal-reason-add-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto; gap: 7px; align-items: center; }
    .seal-reason-add-form[hidden] { display: none; }
    .seal-reason-add-form > span { grid-column: 1 / -1; }
    .seal-search { position: relative; min-width: 0; margin-bottom: 10px; }
    .seal-search input { width: 100%; min-width: 0; }
    .seal-search-results.open {
      position: absolute;
      z-index: 30;
      top: calc(100% + 4px);
      left: 0;
      right: 0;
      max-height: min(360px, 55vh);
      overflow-y: auto;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--panel);
      box-shadow: 0 14px 36px var(--shadow);
    }
    .seal-search-option { display: grid; gap: 3px; width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); text-align: left; }
    .seal-search-option span { min-width: 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
    .memo-command-list {
      display: grid;
      gap: 8px;
      margin-top: 10px;
    }
    .memo-command-line {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 34px 34px;
      gap: 8px;
      align-items: center;
      padding: 8px;
      border-radius: 8px;
      background: #111820;
    }
    .memo-command-line code {
      overflow: auto;
      color: #e6edf3;
      font-size: 12px;
      line-height: 1.35;
      white-space: pre-wrap;
      word-break: break-word;
    }
    .memo-mini {
      width: 34px;
      height: 30px;
      min-height: 30px;
      padding: 0;
      border-radius: 6px;
      font-size: 14px;
    }
    .memo-run {
      border-color: #16833a;
      background: #16833a;
      color: #fff;
    }
    .memo-copy {
      background: var(--field-bg);
      color: var(--accent-strong);
    }
    table.tm {
      width: max-content;
      min-width: 100%;
      border-collapse: separate;
      border-spacing: 0;
      font-size: 12px;
      line-height: 1.25;
      white-space: nowrap;
      table-layout: fixed;
    }
    table.tm th {
      position: sticky;
      top: 0;
      z-index: 1;
      background: #2f6f9f;
      color: #fff;
      text-align: left;
      padding: 6px 8px;
      border-right: 1px solid rgba(255,255,255,.22);
      font-weight: 700;
      overflow: visible;
    }
    table.tm td {
      overflow: hidden;
      text-overflow: ellipsis;
    }
    table.tm th.filtered { background: #1f5f8d; }
    .tm-th {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      width: 100%;
      max-width: 100%;
      min-width: 0;
      overflow: hidden;
    }
    .tm-th-label {
      overflow: hidden;
      text-overflow: ellipsis;
      min-width: 0;
    }
    .tm-resizer {
      position: absolute;
      top: 0;
      right: -3px;
      width: 7px;
      height: 100%;
      cursor: col-resize;
      z-index: 4;
      user-select: none;
      touch-action: none;
    }
    .tm-resizer:hover,
    .tm-resizer.active {
      background: rgba(255, 255, 255, 0.28);
    }
    .tm-filter {
      position: relative;
      display: inline-block;
    }
    .tm-filter summary {
      display: inline-grid;
      place-items: center;
      width: 20px;
      height: 20px;
      border-radius: 4px;
      border: 1px solid rgba(255,255,255,.32);
      cursor: pointer;
      list-style: none;
      background: rgba(255,255,255,.08);
    }
    .tm-filter summary::-webkit-details-marker { display: none; }
    .tm-filter.active summary {
      background: #0f8bd8;
      border-color: #8ed1ff;
    }
    .filter-icon {
      width: 12px;
      height: 12px;
      display: inline-block;
      position: relative;
    }
    .filter-icon::before {
      content: "";
      position: absolute;
      left: 1px;
      top: 1px;
      width: 10px;
      height: 5px;
      border: 1px solid currentColor;
      border-bottom: 0;
      transform: skewX(-18deg);
    }
    .filter-icon::after {
      content: "";
      position: absolute;
      left: 5px;
      top: 6px;
      width: 2px;
      height: 5px;
      background: currentColor;
    }
    .tm-filter-popover {
      position: absolute;
      z-index: 20;
      top: 26px;
      left: 0;
      width: 220px;
      padding: 10px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 16px 40px var(--shadow);
      color: var(--text);
    }
    .tm-filter-popover label {
      color: var(--muted);
      margin-bottom: 6px;
    }
    .tm-filter-popover input {
      min-height: 34px;
      margin-bottom: 8px;
    }
    .tm-filter-actions {
      display: flex;
      gap: 8px;
      align-items: center;
    }
    .tm-filter-actions button,
    .tm-filter-actions a.button {
      min-height: 32px;
      padding: 5px 9px;
    }
    .tm-filter-trigger {
      display: inline-grid;
      place-items: center;
      width: 20px;
      height: 20px;
      min-width: 20px;
      padding: 0;
      border: 1px solid #8ebce0;
      border-radius: 4px;
      background: transparent;
      color: inherit;
      cursor: pointer;
    }
    .tm-filter-trigger:hover,
    .tm-filter-trigger:focus-visible {
      background: color-mix(in srgb, var(--accent) 20%, transparent);
      border-color: var(--accent);
      outline: none;
    }
    .tm-filter-trigger.active {
      background: #0f8bd8;
      border-color: #8ed1ff;
    }
    .tm-column-filter-backdrop[hidden] { display: none; }
    .tm-column-filter-backdrop {
      position: fixed;
      z-index: 500;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 16px;
      background: color-mix(in srgb, #000 45%, transparent);
    }
    .tm-column-filter-dialog {
      width: min(410px, calc(100vw - 32px));
      padding: 16px;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel);
      box-shadow: 0 20px 48px var(--shadow);
      color: var(--text);
    }
    .tm-column-filter-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 14px;
    }
    .tm-column-filter-heading h3 { margin: 0; font-size: 17px; }
    .tm-column-filter-close {
      width: 30px;
      min-width: 30px;
      height: 30px;
      padding: 0;
      font-size: 20px;
      line-height: 1;
    }
    .tm-column-filter-dialog label { display: grid; gap: 6px; color: var(--muted); }
    .tm-column-filter-dialog input { min-height: 38px; }
    .tm-column-filter-dialog .tm-filter-actions { margin-top: 16px; justify-content: flex-end; }
    .tm-day-picker {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      min-width: 0;
      flex: 0 0 auto;
    }
    .tm-day-date-field {
      position: relative;
      display: inline-flex;
      align-items: stretch;
      min-width: 0;
    }
    .tm-day-picker .tm-quick-day {
      width: 124px;
      min-height: 32px;
      padding: 5px 8px;
      border-radius: 6px 0 0 6px;
      border-right: 0;
    }
    .tm-day-picker .tm-quick-day-calendar {
      position: absolute;
      right: 0;
      bottom: 0;
      width: 1px;
      height: 1px;
      min-width: 0;
      min-height: 0;
      padding: 0;
      opacity: 0;
      pointer-events: none;
    }
    .tm-day-picker .tm-quick-day-calendar.tm-calendar-fallback {
      position: static;
      width: 150px;
      height: auto;
      min-height: 32px;
      padding: 5px 8px;
      opacity: 1;
      pointer-events: auto;
    }
    .tm-day-date-field:has(.tm-calendar-fallback) .tm-quick-day { display: none; }
    .tm-day-picker .tm-day-calendar-button {
      display: grid;
      place-items: center;
      width: 32px;
      min-width: 32px;
      min-height: 32px;
      padding: 0;
      border-radius: 0 6px 6px 0;
    }
    .tm-day-picker .tm-day-step {
      width: 34px;
      min-width: 34px;
      padding-inline: 0;
    }
    #tm-live-region {
      position: relative;
      transition: opacity .16s ease;
    }
    #tm-live-region.tm-live-loading { opacity: .72; }
    #tm-live-region.tm-live-loading::after {
      content: "";
      position: absolute;
      z-index: 30;
      top: 18px;
      right: 18px;
      width: 18px;
      height: 18px;
      border: 2px solid var(--line);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: tm-live-spin .7s linear infinite;
    }
    .tm-live-tools {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: wrap;
    }
    .tm-sheet-nav {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding-right: 4px;
      border-right: 1px solid var(--line);
    }
    .tm-sheet-nav > button:not(.tm-sheet-label) {
      width: 36px;
      min-width: 36px;
      padding-inline: 0;
      font-size: 18px;
    }
    .tm-sheet-nav .tm-sheet-jump {
      width: 29px;
      min-width: 29px;
      font-size: 15px;
    }
    .tm-sheet-nav .tm-sheet-label {
      min-width: 66px;
      justify-content: center;
      border: 1px solid var(--line);
      cursor: pointer;
    }
    .tm-sheet-nav .tm-sheet-label:hover,
    .tm-sheet-nav .tm-sheet-label:focus-visible {
      border-color: var(--accent);
      background: color-mix(in srgb, var(--accent) 12%, var(--soft));
      outline: none;
    }
    .tm-anomaly-nav {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding-right: 4px;
    }
    .tm-anomaly-nav .tm-anomaly-step {
      width: 36px;
      min-width: 36px;
      padding-inline: 0;
      font-size: 18px;
    }
    .tm-anomaly-nav .tm-anomaly-kind {
      width: 210px;
      min-width: 170px;
      min-height: 34px;
    }
    .tm-anomaly-nav.empty .tm-anomaly-kind { color: var(--muted); }
    @keyframes tm-live-spin { to { transform: rotate(360deg); } }
    table.tm td {
      padding: 5px 8px;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      font-variant-numeric: tabular-nums;
    }
    table.tm tr:nth-child(even) td { background: var(--table-even); }
    table.tm tr:nth-child(odd) td { background: var(--table-odd); }
    table.tm tbody tr:hover td {
      box-shadow: inset 0 0 0 9999px rgba(255, 255, 255, .06);
    }
    table.tm tbody tr.tm-row-selected td {
      box-shadow: inset 0 0 0 9999px rgba(35, 190, 105, .24);
    }
    table.tm tbody tr.tm-row-selected:hover td {
      box-shadow: inset 0 0 0 9999px rgba(35, 190, 105, .32);
    }
    table.tm td.tm-data-cell {
      cursor: cell;
      user-select: none;
    }
    table.tm td.tm-cell-selected {
      box-shadow: inset 0 0 0 9999px rgba(35, 190, 105, .24), inset 0 0 0 1px rgba(92, 226, 151, .72) !important;
    }
    table.tm td.tm-cell-selected:hover {
      box-shadow: inset 0 0 0 9999px rgba(35, 190, 105, .32), inset 0 0 0 1px rgba(112, 239, 169, .9) !important;
    }
    body.tm-cell-dragging {
      user-select: none;
      cursor: cell;
    }
    table.tm td.hot { background: var(--hot) !important; }
    table.tm td.bypass-on { background: var(--hot) !important; }
    table.tm td.bunker-on { background: var(--bunker) !important; }
    table.tm td.event-ok { background: var(--bunker) !important; }
    table.tm td.rec-gap {
      background: #6d2525 !important;
      color: #fff;
      font-weight: 700;
    }
    table.tm td.tm-anomaly-match {
      box-shadow: inset 0 0 0 9999px rgba(255, 166, 0, .22), inset 0 0 0 2px rgba(255, 179, 38, .9) !important;
    }
    table.tm td.tm-anomaly-current {
      position: relative;
      z-index: 2;
      box-shadow: inset 0 0 0 9999px rgba(255, 107, 71, .30), inset 0 0 0 3px #ff624a !important;
    }
    table.tm td.null { color: #8a96a6; }
    a[href*="ContainerDetails.aspx?NetObject=C:35"] {
      display: none;
    }
    table.rfid-table th:nth-child(3) {
      width: 130px;
    }
    table.rfid-table th:nth-child(4) {
      width: 130px;
    }
    table.rfid-table th:nth-child(5) {
      width: 42%;
    }
    .rfid-down-cell {
      min-width: 120px;
      font-weight: 700;
    }
    .rfid-down-cell.down {
      background: rgba(218, 54, 51, 0.20) !important;
      color: #ffb4b4;
    }
    .rfid-ppr-cell {
      min-width: 130px;
    }
    .rfid-ppr-cell.ppr-ok {
      background: rgba(35, 134, 54, 0.28) !important;
    }
    .rfid-ppr-cell.ppr-missing {
      background: rgba(218, 54, 51, 0.22) !important;
    }
    .rfid-ppr-cell input {
      min-height: 36px;
      padding: 6px 8px;
    }
    .rfid-note-form {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) auto;
      gap: 8px;
      align-items: start;
    }
    .rfid-note-form textarea {
      min-height: 38px;
      height: auto;
      padding: 8px 10px;
      overflow: hidden;
      resize: none;
    }
    .rfid-note-form button {
      min-height: 38px;
      white-space: nowrap;
    }
    .rfid-note-meta {
      grid-column: 1 / -1;
      color: var(--muted);
      font-size: 12px;
      line-height: 1.3;
    }
    .tm-column-builder {
      display: grid;
      grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
      gap: 12px;
      height: 100%;
      min-height: 0;
    }
    .tm-column-builder-head,
    .tm-column-section-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
    }
    .tm-column-builder-actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex: 0 0 auto;
    }
    .tm-column-presets {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .tm-column-presets button {
      min-height: 30px;
      padding: 4px 9px;
      font-size: 13px;
    }
    .tm-column-user-presets {
      display: flex;
      align-items: stretch;
      gap: 5px;
      min-width: 0;
      overflow-x: auto;
      padding-bottom: 2px;
      border-bottom: 1px solid var(--line);
    }
    .tm-column-user-preset {
      display: inline-flex;
      align-items: center;
      gap: 7px;
      flex: 0 0 auto;
      min-height: 36px;
      padding: 6px 10px;
      border: 1px solid var(--line);
      border-bottom-color: transparent;
      border-radius: 6px 6px 0 0;
      background: var(--field-bg);
      color: var(--field-text);
      cursor: pointer;
    }
    .tm-column-user-preset.active {
      background: var(--soft);
      border-color: var(--accent);
      color: #fff;
    }
    .tm-column-user-preset-name {
      max-width: 180px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .tm-column-user-preset-remove {
      width: 22px;
      min-height: 22px;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font-size: 17px;
      line-height: 1;
      cursor: pointer;
    }
    .tm-column-preset-add {
      flex: 0 0 36px;
      width: 36px;
      min-height: 36px;
      padding: 0;
      font-size: 21px;
      line-height: 1;
    }
    .tm-column-workspace {
      display: grid;
      grid-template-columns: minmax(300px, 0.9fr) minmax(360px, 1.1fr);
      gap: 12px;
      height: clamp(300px, 55vh, 620px);
      min-height: 300px;
      max-height: 620px;
      overflow: hidden;
    }
    .tm-column-panel {
      display: grid;
      grid-template-rows: auto minmax(0, 1fr);
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--field-bg);
    }
    .tm-column-panel[open] {
      height: 100%;
      min-height: 0;
      max-height: 100%;
    }
    .tm-column-panel > summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      min-height: 42px;
      padding: 8px 11px;
      border-bottom: 1px solid var(--line);
      background: var(--soft);
      cursor: pointer;
      list-style: none;
    }
    .tm-column-panel > summary::-webkit-details-marker { display: none; }
    .tm-column-panel > summary::after {
      content: '▸';
      flex: 0 0 auto;
      color: var(--muted);
      transform: rotate(90deg);
      transition: transform 0.15s ease;
    }
    .tm-column-panel:not([open]) > summary { border-bottom: 0; }
    .tm-column-panel:not([open]) > summary::after { transform: rotate(0deg); }
    .tm-column-panel:not([open]) {
      display: block;
      align-self: start;
    }
    .tm-column-panel-body {
      min-height: 0;
      max-height: 100%;
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
      -webkit-overflow-scrolling: touch;
      padding: 6px;
    }
    .tm-selected-list {
      display: grid;
      gap: 5px;
      height: auto;
      max-height: none;
      overflow: visible;
      padding: 0;
    }
    .tm-selected-item {
      display: grid;
      grid-template-columns: 22px minmax(0, 1fr) repeat(3, 30px);
      align-items: center;
      gap: 4px;
      min-height: 36px;
      padding: 3px 5px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--panel);
      cursor: grab;
    }
    .tm-selected-item.dragging {
      opacity: 0.55;
      cursor: grabbing;
      background: var(--soft);
    }
    .tm-selected-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .tm-column-move {
      width: 30px;
      min-height: 28px;
      padding: 0;
      line-height: 1;
    }
    .tm-column-catalog {
      height: auto;
      min-height: 0;
      overflow: visible;
      padding: 0 4px;
    }
    .tm-column-group {
      border-bottom: 1px solid var(--line);
      padding: 5px 0;
    }
    .tm-column-group summary {
      cursor: pointer;
      font-weight: 700;
      padding: 6px 2px;
    }
    .tm-column-group-options {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 3px 10px;
      padding: 4px 2px 8px;
    }
    .tm-column-catalog-option {
      min-width: 0;
      padding: 4px;
    }
    .tm-column-catalog-option span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .column-drag-handle {
      color: var(--muted);
      cursor: grab;
      font-size: 14px;
      line-height: 1;
      user-select: none;
    }
    details.columns-menu {
      position: relative;
      min-width: 280px;
    }
    details.columns-menu summary {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 10px 12px;
      background: var(--field-bg);
      color: var(--field-text);
      cursor: pointer;
      list-style: none;
    }
    details.columns-menu summary::-webkit-details-marker { display: none; }
    .columns-popover {
      position: fixed;
      z-index: 1000;
      inset: 10px;
      width: auto;
      height: calc(100vh - 20px);
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 16px 40px var(--shadow);
      padding: 14px;
    }
    .tm-column-close {
      width: 34px;
      min-height: 34px;
      padding: 0;
      font-size: 20px;
      line-height: 1;
    }
    .tm-column-save {
      min-height: 34px;
      padding: 6px 12px;
    }
    .tm-column-preview-wrap {
      min-width: 0;
      border-top: 1px solid var(--line);
      padding-top: 10px;
    }
    .tm-column-preview {
      display: flex;
      width: 100%;
      min-height: 56px;
      overflow-x: auto;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--field-bg);
    }
    .tm-column-preview-cell {
      flex: 0 0 160px;
      display: flex;
      align-items: center;
      min-width: 68px;
      padding: 10px 12px;
      border-right: 1px solid var(--line);
      background: var(--accent);
      color: #fff;
      font-weight: 700;
      cursor: grab;
      user-select: none;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .tm-column-preview-cell:last-child {
      border-right: 0;
    }
    .tm-column-preview-cell.dragging {
      opacity: 0.55;
      cursor: grabbing;
    }
    @media (max-width: 700px) {
      details.columns-menu {
        min-width: min(100%, 280px);
      }
      .columns-popover {
        inset: 4px;
        max-width: calc(100vw - 8px);
        height: calc(100vh - 8px);
        padding: 10px;
        overflow: hidden;
      }
      .tm-column-builder {
        grid-template-rows: auto auto auto auto minmax(0, 1fr) auto;
      }
      .tm-column-builder-head {
        position: relative;
        gap: 6px;
        min-height: 34px;
        padding-right: 128px;
      }
      .tm-column-builder-head > b {
        min-width: 0;
        font-size: 14px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .tm-column-builder-actions {
        position: absolute;
        top: 0;
        right: 0;
        gap: 6px;
      }
      .tm-column-builder-actions > .muted {
        display: none;
      }
      .tm-column-presets {
        max-width: 100%;
      }
      .tm-column-workspace {
        grid-template-columns: 1fr;
        grid-template-rows: minmax(150px, 1fr) minmax(150px, 1fr);
        height: clamp(320px, 58vh, 560px);
        min-height: 320px;
        max-height: 560px;
      }
      .tm-column-panel > summary {
        min-width: 0;
      }
      .tm-column-panel > summary .muted,
      .tm-column-section-head .muted {
        display: none;
      }
      .tm-column-group-options {
        grid-template-columns: 1fr;
      }
    }
    details.filter-menu {
      position: relative;
      min-width: 100%;
    }
    details.filter-menu summary {
      min-height: 40px;
      border: 1px solid var(--line);
      border-radius: 6px;
      padding: 10px 12px;
      background: var(--field-bg);
      color: var(--field-text);
      cursor: pointer;
      list-style: none;
      white-space: nowrap;
    }
    details.filter-menu summary::-webkit-details-marker { display: none; }
    .filter-with-exclude {
      position: relative;
      display: block;
    }
    .filter-exclude-toggle {
      position: absolute;
      right: 0;
      top: -30px;
      z-index: 2;
      width: 24px;
      min-height: 22px;
      padding: 0;
      border-radius: 5px;
      font-size: 13px;
      line-height: 1;
      font-weight: 700;
    }
    .filter-exclude-toggle.active {
      background: var(--accent);
      color: #fff;
    }
    .filter-popover {
      position: absolute;
      z-index: 10;
      top: 48px;
      left: 0;
      width: min(360px, calc(100vw - 48px));
      background: var(--panel);
      border: 1px solid var(--line);
      border-radius: 8px;
      box-shadow: 0 16px 40px var(--shadow);
      padding: 14px;
    }
    .filter-options {
      display: grid;
      grid-template-columns: 1fr;
      gap: 8px;
      max-height: 280px;
      overflow: auto;
      padding-top: 12px;
      border-top: 1px solid var(--line);
    }
    .column-search {
      margin-bottom: 10px;
    }
    .check {
      display: flex;
      align-items: center;
      gap: 8px;
      color: var(--text);
      margin: 0;
      min-height: 24px;
    }
    .panel-head {
      display: flex;
      align-items: end;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 12px;
    }
    .panel-head h2 { margin: 0; }
    .export-tools {
      display: flex;
      align-items: end;
      gap: 8px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .export-tools form {
      display: flex;
      align-items: end;
      gap: 8px;
      margin: 0;
    }
    .compact-field {
      min-width: 120px;
    }
    .notice {
      border-left: 4px solid var(--accent);
      background: var(--notice-bg);
      padding: 12px 14px;
      border-radius: 6px;
      margin-bottom: 16px;
    }
    .memo {
      border: 1px solid var(--memo-line);
      background: var(--memo-bg);
      border-radius: 8px;
      padding: 12px 14px;
      margin: 10px 0 14px;
    }
    .memo ol {
      margin: 8px 0 0 18px;
      padding: 0;
    }
    .memo li { margin: 4px 0; }
    .relay-step {
      cursor: help;
    }
    .monitor-frame {
      width: 100%;
      height: calc(100vh - 170px);
      min-height: 720px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--field-bg);
    }
    .relay-step b {
      border-bottom: 1px dotted var(--muted);
    }
    .relay-job-status { margin-top: 8px; }
    .relay-job-message,
    .relay-job-details { grid-column: 1 / -1; min-width: 0; }
    .relay-job-message { padding: 8px 10px; border-radius: 6px; background: var(--soft); overflow-wrap: anywhere; }
    .relay-job-message .tag { margin-right: 6px; }
    .relay-job-details summary { cursor: pointer; color: var(--accent-strong); }
    .relay-job-details pre { max-height: 260px; margin: 7px 0 0; }
    .dicts-shell {
      position: relative;
      left: 50%;
      width: calc(var(--ui-scaled-viewport-width, 100vw) - 32px);
      max-width: none;
      transform: translateX(-50%);
    }
    .dicts-heading,
    .dicts-toolbar,
    .dicts-tabs,
    .dict-card-head,
    .dict-view-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      flex-wrap: wrap;
    }
    .dicts-heading h1,
    .dict-card-head h2,
    .dict-view-head h1 { margin-bottom: 0; }
    .dict-heading-actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .dicts-tabs {
      justify-content: flex-start;
      gap: 4px;
      margin: 14px 0;
      border-bottom: 1px solid var(--line);
    }
    .dict-tab {
      min-height: 38px;
      border: 0;
      border-bottom: 3px solid transparent;
      border-radius: 0;
      background: transparent;
      color: var(--muted);
      padding: 8px 12px;
    }
    .dict-tab.active {
      border-bottom-color: var(--accent);
      color: var(--text);
      background: transparent;
    }
    .dict-tab-pane[hidden] { display: none; }
    .dict-search-grid {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px) auto;
      gap: 10px;
      align-items: end;
    }
    .dict-filter-menu { position: relative; }
    .dict-filter-menu summary {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      min-height: 40px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--field-bg);
      color: var(--field-text);
      cursor: pointer;
      list-style: none;
    }
    .dict-filter-menu summary::-webkit-details-marker { display: none; }
    .dict-filter-menu summary::after { content: "▾"; color: var(--muted); }
    .dict-filter-popover {
      position: absolute;
      z-index: 20;
      top: 46px;
      left: 0;
      width: min(340px, calc(100vw - 32px));
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      box-shadow: 0 16px 40px var(--shadow);
    }
    .dict-filter-options { display: grid; gap: 9px; }
    .dict-filter-options label {
      display: grid;
      grid-template-columns: 18px minmax(0, 1fr);
      gap: 8px;
      align-items: center;
      margin: 0;
      color: var(--text);
    }
    .dict-filter-actions { display: flex; gap: 8px; margin-top: 12px; }
    .dict-status-grid,
    .dict-reader-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 10px;
    }
    .dict-status-card,
    .dict-reader-card {
      min-width: 0;
      padding: 12px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--field-bg);
    }
    .dict-status-card strong,
    .dict-reader-card strong { display: block; margin-bottom: 6px; }
    .dict-status-meta {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr);
      gap: 5px 10px;
      font-size: 13px;
    }
    .dict-status-meta span:nth-child(odd) { color: var(--muted); }
    .dict-reader-card {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 10px;
    }
    .dict-reader-card a.button { white-space: nowrap; }
    .dict-progress { margin-top: 14px; }
    .dict-progress[hidden] { display: none; }
    .dict-progress-track {
      height: 10px;
      overflow: hidden;
      border-radius: 5px;
      background: var(--soft);
    }
    .dict-progress-bar {
      width: 0;
      height: 100%;
      background: var(--accent);
      transition: width .25s ease;
    }
    .dict-progress-meta {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      margin-top: 7px;
      color: var(--muted);
      font-size: 13px;
      flex-wrap: wrap;
    }
    .dict-cancel-button[hidden] { display: none; }
    .dict-jobs-dialog {
      width: min(940px, calc(100vw - 28px));
      max-height: min(760px, calc(100vh - 28px));
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px var(--shadow);
    }
    .dict-jobs-dialog::backdrop { background: rgba(3, 10, 18, .72); }
    .bko-diagnostic-dialog {
      width: min(980px, calc(100vw - 28px));
      max-height: calc(100vh - 28px);
      max-height: calc(100dvh - 28px);
      padding: 0;
      overflow: hidden;
      border: 1px solid var(--line);
      border-radius: 10px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px var(--shadow);
    }
    .bko-diagnostic-dialog[open] { display: flex; flex-direction: column; }
    .bko-diagnostic-standalone {
      display: flex;
      flex-direction: column;
      width: 100%;
      max-height: none;
      margin: 0;
      overflow: visible;
      box-shadow: none;
    }
    .bko-diagnostic-standalone .bko-diagnostic-body { overflow: visible; }
    .bko-diagnostic-dialog::backdrop { background: rgba(3, 10, 18, .72); }
    .bko-diagnostic-head {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 14px;
      padding: 12px 14px;
      border-bottom: 1px solid var(--line);
    }
    .bko-diagnostic-head h2 { margin: 0 0 4px; }
    .bko-diagnostic-head-actions { display: flex; gap: 8px; }
    .bko-diagnostic-close { width: 38px; min-width: 38px; padding: 6px; font-size: 22px; line-height: 1; }
    .bko-diagnostic-tabs {
      display: flex;
      gap: 4px;
      padding: 0 14px;
      border-bottom: 1px solid var(--line);
    }
    .bko-diagnostic-tab {
      min-height: 36px;
      padding: 7px 10px;
      border: 0;
      border-bottom: 3px solid transparent;
      border-radius: 0;
      background: transparent;
      color: var(--muted);
    }
    .bko-diagnostic-tab.active { border-bottom-color: var(--accent); background: transparent; color: var(--text); }
    .bko-diagnostic-body { flex: 1 1 auto; min-height: 0; max-height: none; padding: 12px 14px 16px; overflow: auto; overscroll-behavior: contain; }
    .bko-diagnostic-pane[hidden] { display: none; }
    .bko-diagnostic-meta { display: flex; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
    .bko-diagnostic-grid { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 8px; }
    .bko-diagnostic-problem {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 9px;
      padding: 8px 10px;
      border: 1px solid var(--line);
      border-left-width: 4px;
      border-radius: 7px;
      background: var(--soft);
    }
    .bko-diagnostic-problem.active { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--panel)); }
    .bko-diagnostic-problem.ok { border-left-color: var(--ok); }
    .bko-diagnostic-problem.info { border-left-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
    .bko-diagnostic-problem.missing,
    .bko-diagnostic-problem.unknown { border-left-color: var(--muted); color: var(--muted); }
    .bko-diagnostic-problem.active strong { color: #ff857d; }
    .bko-diagnostic-problem.ok strong { color: var(--ok); }
    .bko-diagnostic-sections { display: grid; gap: 12px; }
    .bko-diagnostic-section { padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
    .bko-diagnostic-section h3 { margin: 0 0 10px; }
    .bko-diagnostic-fields { display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 0 20px; margin: 0; }
    .bko-diagnostic-field { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(120px, 1.1fr); gap: 9px; padding: 5px 0; border-bottom: 1px solid var(--line); }
    .bko-diagnostic-field dt { color: var(--muted); }
    .bko-diagnostic-field dd { margin: 0; overflow-wrap: anywhere; }
    .bko-diagnostic-loading { min-height: 160px; display: grid; place-items: center; color: var(--muted); }
    .bko-remote-diagnostics { margin-top: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
    .bko-remote-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .bko-remote-head h3 { margin: 0 0 4px; }
    .bko-remote-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
    .bko-remote-output { max-height: 360px; margin: 12px 0 0; padding: 9px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); }
    .bko-remote-progress { padding: 8px; color: var(--muted); font-size: 13px; }
    .bko-remote-progress strong { display: block; margin-bottom: 7px; color: var(--text); }
    .bko-remote-stages { display: flex; flex-wrap: wrap; gap: 6px; }
    .bko-remote-stage { padding: 3px 7px; border: 1px solid var(--line); border-radius: 999px; }
    .bko-remote-stage.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--panel)); color: var(--text); }
    .bko-remote-stage.done { border-color: var(--ok); color: var(--ok); }
    .bko-remote-repair { margin-top: 8px; }
    .bko-remote-toast { position: fixed; right: 18px; bottom: 18px; z-index: 500; max-width: min(420px, calc(100vw - 36px)); padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 7px; background: var(--panel); box-shadow: 0 14px 38px var(--shadow); }
    .bko-remote-toast.error { border-left-color: var(--danger); }
    .bko-remote-result { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); }
    .bko-remote-result:last-child { border-bottom: 0; }
    .bko-remote-result-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: #fff; font-weight: 800; line-height: 1; }
    .bko-remote-result.ok .bko-remote-result-icon { background: var(--ok); }
    .bko-remote-result.warning .bko-remote-result-icon { background: #b77800; }
    .bko-remote-result.failed .bko-remote-result-icon { background: var(--danger); }
    .bko-remote-result-main { min-width: 0; }
    .bko-remote-result-line { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
    .bko-remote-result-line span { color: var(--muted); overflow-wrap: anywhere; }
    .bko-remote-result details { margin-top: 5px; color: var(--muted); font-size: 12px; }
    .bko-remote-result details summary { width: max-content; cursor: pointer; }
    .bko-remote-result pre { max-height: 180px; margin: 6px 0 0; padding: 8px; overflow: auto; border-radius: 5px; background: var(--panel); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
    .bko-mqtt-meta { display: flex; gap: 7px; margin-bottom: 10px; flex-wrap: wrap; }
    .bko-mqtt-alerts, .bko-mqtt-summary, .bko-mqtt-groups { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
    .bko-mqtt-alerts h3, .bko-mqtt-summary h3, .bko-mqtt-groups h3 { margin: 0 0 8px; font-size: 15px; }
    .bko-mqtt-alert { display: flex; justify-content: space-between; gap: 12px; padding: 7px 9px; border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
    .bko-mqtt-alert + .bko-mqtt-alert { margin-top: 5px; }
    .bko-mqtt-alert.warning { border-left-color: #e8ad29; background: color-mix(in srgb, #e8ad29 10%, transparent); }
    .bko-mqtt-summary dl { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); gap: 0 18px; margin: 0; }
    .bko-mqtt-field, .bko-mqtt-row { display: grid; grid-template-columns: minmax(150px, .9fr) minmax(120px, 1.1fr); gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
    .bko-mqtt-field dt, .bko-mqtt-row span { color: var(--muted); }
    .bko-mqtt-field dd { margin: 0; overflow-wrap: anywhere; }
    .bko-mqtt-row strong { font-weight: 500; overflow-wrap: anywhere; }
    .bko-mqtt-group { border-top: 1px solid var(--line); }
    .bko-mqtt-group summary { padding: 7px 2px; cursor: pointer; font-weight: 700; }
    .bko-mqtt-group > div { padding: 0 8px 7px; }
    .dict-jobs-head {
      position: sticky;
      top: 0;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      background: var(--panel);
    }
    .dict-jobs-head h2 { margin: 0; }
    .dict-jobs-close { width: 40px; min-width: 40px; padding: 7px; font-size: 22px; line-height: 1; }
    .background-jobs-tabs {
      display: flex;
      gap: 4px;
      padding: 10px 16px 0;
      border-bottom: 1px solid var(--line);
    }
    .background-jobs-tab {
      min-height: 38px;
      padding: 8px 12px;
      border: 0;
      border-bottom: 3px solid transparent;
      border-radius: 0;
      background: transparent;
      color: var(--muted);
    }
    .background-jobs-tab.active {
      border-bottom-color: var(--accent);
      color: var(--text);
    }
    .background-jobs-tab span {
      display: inline-block;
      min-width: 20px;
      margin-left: 4px;
      padding: 1px 6px;
      border-radius: 10px;
      background: var(--soft);
      font-size: 12px;
    }
    .dict-jobs-body { padding: 14px 16px 16px; overflow: auto; }
    .dict-job-list { display: grid; gap: 9px; }
    .dict-job-card {
      display: grid;
      grid-template-columns: minmax(170px, .7fr) minmax(230px, 1.4fr) auto;
      gap: 12px;
      align-items: center;
      padding: 11px;
      border: 1px solid var(--line);
      border-radius: 7px;
      background: var(--field-bg);
    }
    .dict-job-device strong { display: block; }
    .dict-job-device small,
    .dict-job-details small { display: block; color: var(--muted); margin-top: 3px; }
    .dict-job-progress { height: 7px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: var(--soft); }
    .dict-job-progress span { display: block; height: 100%; background: var(--accent); }
    .dict-job-actions { display: flex; justify-content: flex-end; }
    .dict-table { width: 100%; border-collapse: collapse; }
    .dict-table th,
    .dict-table td {
      padding: 8px 10px;
      border-bottom: 1px solid var(--line);
      text-align: left;
      vertical-align: top;
      white-space: nowrap;
    }
    .dict-table tbody tr:hover td { background: var(--soft); }
    .dict-view-search {
      display: grid;
      grid-template-columns: minmax(240px, 1fr) auto;
      gap: 8px;
      align-items: end;
    }
    .dict-pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      margin-top: 12px;
      flex-wrap: wrap;
    }
    .watchlist-shell {
      position: relative;
      left: 50%;
      width: calc(var(--ui-scaled-viewport-width, 100vw) - 32px);
      max-width: none;
      transform: translateX(-50%);
    }
    .monitor-profile-bar {
      display: flex;
      align-items: flex-end;
      gap: 12px;
      margin: -2px 0 14px;
      border-bottom: 1px solid var(--line);
    }
    .monitor-profile-tabs {
      display: flex;
      flex: 1 1 auto;
      align-items: flex-end;
      gap: 3px;
      min-width: 0;
      overflow-x: auto;
      scrollbar-width: thin;
    }
    .monitor-profile-tabs form { margin: 0; flex: 0 0 auto; }
    .monitor-profile-tab {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 42px;
      padding: 8px 13px;
      border-color: transparent;
      border-bottom-color: transparent;
      border-radius: 6px 6px 0 0;
      background: transparent;
      color: var(--muted);
      white-space: nowrap;
    }
    .monitor-profile-tab:hover { background: var(--soft); color: var(--text); border-color: var(--line); }
    .monitor-profile-tab span {
      min-width: 23px;
      padding: 2px 6px;
      border-radius: 10px;
      background: var(--soft);
      color: var(--muted);
      font-size: 12px;
      line-height: 17px;
      text-align: center;
    }
    .monitor-profile-tab.active {
      margin-bottom: -1px;
      background: var(--panel);
      color: var(--text);
      border-color: var(--line);
      border-bottom-color: var(--panel);
    }
    .monitor-profile-tab.active span { background: var(--accent); color: #fff; }
    .monitor-profile-tools { margin: 0 0 6px auto; flex: 0 0 auto; }
    .monitor-list { border-top: 1px solid var(--line); }
    .monitor-row {
      display: grid;
      grid-template-columns: minmax(310px, 1.05fr) minmax(280px, 1fr) auto;
      gap: 16px;
      align-items: center;
      padding: 14px 0;
      border-bottom: 1px solid var(--line);
      scroll-margin-top: 74px;
    }
    .monitor-vehicle { min-width: 0; }
    .monitor-vehicle b { font-size: 16px; }
    .monitor-state-line { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
    .monitor-pending { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
    .monitor-note-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: start; }
    .monitor-note-form textarea { min-height: 40px; max-height: 150px; resize: vertical; }
    .monitor-note-meta { grid-column: 1 / -1; color: var(--muted); font-size: 12px; }
    .monitor-row-actions {
      display: grid;
      grid-template-columns: auto auto 52px 44px 44px 36px;
      gap: 7px;
      align-items: center;
      justify-content: end;
    }
    .monitor-row-actions .button,
    .monitor-row-actions button { min-height: 36px; padding: 6px 9px; }
    .monitor-row-actions .monitor-mini { width: 44px; min-width: 44px; padding: 0; }
    .monitor-action-dialog,
    .profile-dialog {
      width: min(560px, calc(100vw - 24px));
      padding: 0;
      border: 1px solid var(--line);
      border-radius: 8px;
      background: var(--panel);
      color: var(--text);
      box-shadow: 0 24px 70px var(--shadow);
    }
    .monitor-action-dialog {
      width: min(920px, calc(100vw - 32px));
      max-height: min(88vh, 820px);
      overflow: hidden;
    }
    .monitor-action-dialog form { display: flex; max-height: inherit; flex-direction: column; }
    .monitor-action-dialog::backdrop,
    .profile-dialog::backdrop { background: rgba(3, 10, 18, .72); }
    .monitor-dialog-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px; border-bottom: 1px solid var(--line); }
    .monitor-dialog-head h2 { margin: 0; }
    .monitor-dialog-body { display: grid; gap: 12px; padding: 14px; }
    .monitor-action-dialog .monitor-dialog-body { overflow-y: auto; overscroll-behavior: contain; }
    .monitor-action-section { display: grid; gap: 9px; }
    .monitor-action-section + .monitor-action-section { padding-top: 13px; border-top: 1px solid var(--line); }
    .monitor-action-section h3 { margin: 0; font-size: 15px; }
    .monitor-action-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .monitor-action-option {
      display: grid;
      min-height: 42px;
      grid-template-columns: 20px minmax(0, 1fr) auto;
      gap: 9px;
      align-items: center;
      margin: 0;
      padding: 9px 11px;
      border: 1px solid var(--line);
      border-radius: 6px;
      background: var(--bg);
      cursor: pointer;
    }
    .monitor-action-option:hover { border-color: var(--accent); }
    .monitor-action-option input { width: 18px; height: 18px; }
    .monitor-action-option b { min-width: 0; overflow-wrap: anywhere; }
    .monitor-action-option .tag { justify-self: end; }
    .monitor-broadcast-field { display: grid; gap: 6px; }
    .monitor-dialog-submit { position: sticky; bottom: -14px; padding: 12px 0 0; background: var(--panel); }
    .profile-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
    .profile-editor-row form:first-child { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
    .profile-create-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding-top: 12px; border-top: 1px solid var(--line); }
    @media (max-width: 780px) {
      html {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
      }
      body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
        font-size: 14px;
        -webkit-text-size-adjust: 100%;
      }
      .table-wrap {
        contain: inline-size;
      }
      header {
        position: sticky;
        z-index: 100;
        top: 0;
        padding-top: env(safe-area-inset-top);
      }
      .bar,
      main {
        width: calc(100% - 16px);
        max-width: none;
      }
      .bar {
        min-height: 52px;
        gap: 5px;
      }
      main {
        min-width: 0;
        padding: 14px 0 calc(28px + env(safe-area-inset-bottom));
      }
      main.dashboard-main { width: calc(100% - 16px); }
      h1 {
        margin-bottom: 12px;
        font-size: 22px;
        line-height: 1.2;
        overflow-wrap: anywhere;
      }
      h2 {
        margin-bottom: 9px;
        font-size: 17px;
        line-height: 1.25;
      }
      .brand-tools {
        min-width: 0;
        gap: 5px;
      }
      .brand {
        min-width: 0;
        gap: 6px;
      }
      .logo-mark {
        width: 43px;
        height: 30px;
        font-size: 15px;
      }
      .brand-text {
        max-width: 88px;
        overflow: hidden;
        text-overflow: ellipsis;
        font-size: 13px;
      }
      .header-actions {
        min-width: 0;
        gap: 4px;
      }
      .theme-toggle,
      .notification-bell,
      .global-search-toggle {
        width: 36px;
        min-width: 36px;
        height: 36px;
        min-height: 36px;
      }
      .nav-menu > summary {
        min-height: 36px;
        padding: 7px 9px;
        gap: 5px;
        font-size: 13px;
      }
      .nav-menu nav {
        position: fixed;
        top: calc(56px + env(safe-area-inset-top));
        right: 8px;
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 68px - env(safe-area-inset-top));
        overflow-y: auto;
        overscroll-behavior: contain;
      }
      .nav-menu nav a {
        min-height: 40px;
        padding: 10px;
      }
      .panel {
        min-width: 0;
        padding: 12px;
        border-radius: 6px;
      }
      .dashboard-top {
        gap: 10px;
      }
      .notice {
        padding: 10px 12px;
      }
      .notice .tag {
        max-width: 100%;
        white-space: normal;
        overflow-wrap: anywhere;
      }
      label {
        margin-bottom: 4px;
        font-size: 13px;
      }
      input,
      select {
        min-width: 0;
        min-height: 42px;
        padding: 8px 10px;
      }
      button,
      a.button {
        min-height: 40px;
        padding: 8px 11px;
      }
      textarea {
        min-height: 150px;
        padding: 10px;
      }
      form.inline .grow {
        min-width: 0;
      }
      .search-actions {
        margin-top: 4px;
        gap: 6px;
      }
      .table-wrap {
        width: 100%;
        max-width: 100%;
        border-radius: 6px;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
      }
      .tag {
        padding: 4px 7px;
        font-size: 12px;
      }
      .scroll-top {
        right: 12px;
        bottom: calc(12px + env(safe-area-inset-bottom));
        width: 42px;
        height: 42px;
        min-height: 42px;
      }
      .global-search-field {
        top: calc(58px + env(safe-area-inset-top));
      }
      .grid { grid-template-columns: 1fr; }
      .row { align-items: flex-start; flex-direction: column; }
      .row.vehicle-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
        gap: 10px;
      }
      .seal-page-title { max-width: 100%; overflow-wrap: anywhere; }
      .seal-page-nav { display: grid; gap: 9px; }
      .seal-page-nav > .actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
      .seal-page-nav > .actions > * { width: 100%; min-width: 0; }
      .seal-builder {
        grid-template-columns: minmax(0, 1fr);
        width: 100%;
        max-width: 100%;
        gap: 12px;
      }
      .seal-builder > .panel,
      .seal-controls,
      .seal-controls > div { width: 100%; min-width: 0; max-width: 100%; }
      .seal-vehicle-list { max-height: 44vh; padding-right: 2px; }
      .seal-vehicle { grid-template-columns: 22px minmax(0, 1fr); gap: 8px; }
      .seal-vehicle > span,
      .seal-vehicle .muted { min-width: 0; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; }
      .seal-selection-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
      .seal-selection-actions button { width: 100%; min-width: 0; }
      .seal-toggle-row label,
      .reason-grid label { grid-template-columns: 22px minmax(0, 1fr); min-width: 0; }
      .seal-reason-add-toggle { width: 100%; }
      .seal-reason-add-form { grid-template-columns: 1fr 1fr; }
      .seal-reason-add-form input { grid-column: 1 / -1; width: 100%; }
      .seal-reason-add-form button { width: 100%; }
      #seal-custom-reason { width: 100%; max-width: 100%; }
      .seal-output { min-height: 220px; width: 100%; max-width: 100%; }
      .seal-copy-actions,
      .seal-copy-actions button { width: 100%; }
      .vehicle-actions {
        width: 100%;
        flex: none;
        display: grid;
        grid-template-columns: minmax(44px, .7fr) 40px minmax(68px, 1fr) minmax(54px, .8fr) 40px;
        justify-content: stretch;
        gap: 6px;
        overflow: visible;
        padding-bottom: 0;
      }
      .vehicle-actions > * {
        min-width: 0;
      }
      .vehicle-actions a.button,
      .vehicle-actions button {
        width: 100%;
      }
      .vehicle-actions .action-empty {
        display: none;
      }
      .vehicle-row { padding: 12px 0; }
      .vehicle-info {
        width: 100%;
        min-width: 0;
        overflow-wrap: anywhere;
      }
      .vehicle-health-summary { width: 100%; }
      .dashboard-vehicles-head { align-items: stretch; flex-direction: column; }
      .command-actions {
        width: 100%;
        flex: none;
        justify-content: start;
      }
      .command-row > .command-actions {
        width: 100%;
        flex: none;
        margin-left: 0;
      }
      .terminal-layout { grid-template-columns: 1fr; }
      form.inline { align-items: stretch; flex-direction: column; }
      form.dashboard-search {
        grid-template-columns: minmax(0, 1fr) 112px;
        align-items: end;
      }
      form.dashboard-search .dashboard-query {
        grid-column: 1;
      }
      form.dashboard-search .dashboard-query-field {
        grid-column: 2;
      }
      form.dashboard-search .dashboard-mobile-filter-toggle {
        display: inline-flex;
        grid-column: 1 / -1;
        width: 100%;
        align-items: center;
        justify-content: space-between;
      }
      form.dashboard-search .dashboard-filter-project,
      form.dashboard-search .dashboard-filter-status,
      form.dashboard-search .dashboard-filter-region,
      form.dashboard-search .dashboard-filter-pu,
      form.dashboard-search .dashboard-filter-type {
        display: none;
      }
      form.dashboard-search.mobile-advanced-open .dashboard-filter-project,
      form.dashboard-search.mobile-advanced-open .dashboard-filter-status,
      form.dashboard-search.mobile-advanced-open .dashboard-filter-region,
      form.dashboard-search.mobile-advanced-open .dashboard-filter-pu,
      form.dashboard-search.mobile-advanced-open .dashboard-filter-type {
        display: block;
        grid-column: 1 / -1 !important;
      }
      form.dashboard-search .search-actions {
        grid-column: 1 / -1;
        flex-direction: row;
      }
      form.dashboard-search .search-actions > * {
        flex: 1 1 0;
      }
      .tm-filter-form {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end !important;
        gap: 8px !important;
      }
      .tm-filter-form > div {
        min-width: 0 !important;
      }
      .tm-filter-form > div:nth-of-type(5),
      .tm-filter-form > details {
        grid-column: 1 / -1;
      }
      .tm-filter-actions {
        grid-column: 1 / -1;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
      }
      .tm-filter-actions > * {
        flex: 0 0 auto;
      }
      .tm-device-nav form {
        flex-direction: row;
      }
      .tm-device-nav form button {
        flex: 0 0 auto;
      }
      .tm-device-meta {
        gap: 5px;
        margin-bottom: 10px;
      }
      .tm-wide-panel {
        padding: 10px;
      }
      .tm-wide-panel .panel-head {
        gap: 8px;
        align-items: center;
      }
      .tm-wide-panel .panel-head h2 {
        margin: 0;
      }
      .dicts-shell { width: calc(var(--ui-scaled-viewport-width, 100vw) - 16px); }
      .dicts-heading { align-items: flex-start; }
      .dict-heading-actions { width: 100%; }
      .dict-heading-actions .button,
      .dict-heading-actions button { flex: 1 1 180px; }
      .dict-search-grid,
      .dict-view-search { grid-template-columns: 1fr; }
      .dict-search-grid button,
      .dict-view-search button { width: 100%; }
      .dict-filter-popover { width: calc(var(--ui-scaled-viewport-width, 100vw) - 32px); }
      .dict-status-grid,
      .dict-reader-grid { grid-template-columns: 1fr; }
      .dict-reader-card { grid-template-columns: minmax(0, 1fr); }
      .dict-reader-card a.button { width: 100%; }
      .dicts-tabs { flex-wrap: nowrap; overflow-x: auto; }
      .bko-diagnostic-grid,
      .bko-diagnostic-fields { grid-template-columns: 1fr; }
      .bko-diagnostic-field { grid-template-columns: 1fr; gap: 3px; }
      .bko-mqtt-summary dl { grid-template-columns: 1fr; }
      .bko-mqtt-field, .bko-mqtt-row { grid-template-columns: 1fr; gap: 2px; }
      .dict-jobs-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
      .dict-job-card { grid-template-columns: 1fr; }
      .dict-job-actions { justify-content: stretch; }
      .dict-job-actions button { width: 100%; }
      .watchlist-shell { width: calc(var(--ui-scaled-viewport-width, 100vw) - 16px); }
      .monitor-row { grid-template-columns: 1fr; gap: 11px; }
      .monitor-row-actions { justify-content: start; grid-template-columns: auto auto 52px 44px 44px 36px; }
      .profile-editor-row { grid-template-columns: 1fr; }
      .monitor-profile-bar { gap: 6px; }
      .monitor-profile-tab { padding-inline: 10px; }
      .monitor-profile-tools { margin-bottom: 6px; }
      .notification-dialog,
      .monitor-action-dialog,
      .profile-dialog { width: calc(100vw - 12px); max-height: calc(100vh - 12px); }
      .monitor-action-grid { grid-template-columns: 1fr; }
      .bar { gap: 8px; }
      .global-vehicle-search { flex: 0 0 auto; margin-left: auto; }
      .global-search-toggle {
        display: inline-grid;
        place-items: center;
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
        border-color: #41505f;
        background: transparent;
        filter: grayscale(1);
      }
      .global-search-field {
        display: none;
        position: fixed;
        z-index: 150;
        top: 64px;
        left: 8px;
        right: 8px;
      }
      .global-vehicle-search.open .global-search-field { display: block; }
      .global-search-shortcut { display: none; }
      .global-search-results { max-height: calc(100vh - 124px); }
      .global-search-result { grid-template-columns: 1fr; gap: 3px; }
    }
    @media (max-width: 560px) {
      .brand-text {
        display: none;
      }
      .build-version {
        display: none !important;
      }
      .brand-tools {
        flex: 0 0 auto;
      }
      .header-actions {
        flex: 1 1 auto;
        justify-content: flex-end;
      }
      .bar {
        width: calc(100% - 12px);
      }
      main {
        width: calc(100% - 12px);
      }
    }
    @media (max-width: 380px) {
      .reference-board-toggle { display: none !important; }
      .theme-toggle,
      .notification-bell,
      .global-search-toggle {
        width: 34px;
        min-width: 34px;
        height: 34px;
        min-height: 34px;
      }
      .nav-menu > summary { padding-inline: 7px; }
    }
    body.embedded-page > header,
body.embedded-page > .notification-dialog,
body.embedded-page > .dict-jobs-dialog,
body.embedded-page > .pwa-install-dialog,
body.embedded-page > .site-process-indicator,
body.embedded-page > .idle-game,
body.embedded-page > .scroll-top { display:none !important; }
html:is([data-ui-scale="60"],[data-ui-scale="70"],[data-ui-scale="80"],[data-ui-scale="90"],[data-ui-scale="110"],[data-ui-scale="125"]) body.embedded-page {
  zoom:1 !important;
  width:100vw !important;
  min-height:100vh !important;
  transform:none !important;
}
body.embedded-page > main { width:100% !important; max-width:none !important; margin:0 !important; padding:8px !important; }
body.embedded-page { overflow-x:hidden !important; }
body.embedded-page > main > *,
body.embedded-page .panel { min-width:0; max-width:100%; }
body.embedded-page .dicts-shell {
  position:static !important;
  left:auto !important;
  width:100% !important;
  max-width:none !important;
  transform:none !important;
}
body.embedded-page .command-row,
body.embedded-page .command-row > div:first-child {
  width:100%;
  min-width:0;
  max-width:100%;
}
body.embedded-page .command-row .muted,
body.embedded-page .command-row code {
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:break-word;
}
body.embedded-page .dict-search-grid {
  grid-template-columns:minmax(0,1fr) !important;
  width:100%;
}
body.embedded-page .dict-search-grid > *,
body.embedded-page .dict-search-grid input,
body.embedded-page .dict-search-grid button,
body.embedded-page .dict-filter-menu { width:100%; min-width:0; max-width:100%; }
body.embedded-page .notice .tag {
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
body.embedded-page .command-row {
  display:grid;
  grid-template-columns:minmax(0,1fr);
}
body.embedded-page .command-row > div:first-child {
  padding-right:18px;
  overflow-wrap:anywhere;
}
body.embedded-page .command-row > .command-actions {
  width:auto;
  margin:6px 0 0;
  justify-self:start;
}
body.embedded-page .bko-diagnostic-head-actions > a[href^="/dev/"] { display:none !important; }
@media (max-width: 700px) {
  html[data-mobile-compact="true"] { --ui-font-size: 12px; --ui-control-height: 32px; }
  html[data-mobile-compact="true"] .panel { padding: 9px !important; }
  html[data-mobile-compact="true"] table th,
  html[data-mobile-compact="true"] table td { padding: 5px 7px !important; }
  html[data-mobile-compact="true"] .bar { min-height: 44px; }
}
.nav-menu>nav{max-height:calc(var(--ui-scaled-viewport-height,100dvh) - 80px);overflow-y:auto;overscroll-behavior:contain}.nav-other>summary{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;min-height:38px;box-sizing:border-box;border:0;border-radius:6px;background:transparent;color:var(--text);cursor:pointer;list-style:none;font:inherit}.nav-other>summary::-webkit-details-marker{display:none}.nav-other>summary::after{content:"▾";font-size:12px;color:var(--muted)}.nav-other[open]>summary::after{content:"▴"}.nav-other>summary:hover{background:var(--soft)}.nav-other-content{display:grid;margin:2px 0 6px 8px;padding-left:6px;border-left:1px solid var(--line)}.nav-other-content a{font-size:13px}@media(max-width:800px){.nav-other>summary{min-height:40px;padding:10px}}
