/* Shared orange-white workbench theme; production component styles load first. */
:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #fff3e9;
  --border: #e3e7ec;
  --text: #202a35;
  --muted: #697586;
  --accent: #c45112;
  --live: #e58a21;
  --ok: #27804d;
  --warn: #a96512;
  --err: #bd3f36;
  --radius: 10px;
  --radius-sm: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(32, 42, 53, .05);
  --shadow-md: 0 10px 28px rgba(32, 42, 53, .08);
  --ease-out: cubic-bezier(.2, .8, .2, 1);

  /* 字体。**全是系统自带**，不下载不构建——这台机器在国内，
     引一个 web font 就是引一条会超时的外部依赖。

     Bahnschrift 是 Windows 自带的 DIN 变体（站台牌、仪表盘那种字），
     压缩方正，用在赛道名和时刻上。没有它时退到各平台的等价窄体。 */
  --display: "Bahnschrift", "DIN Alternate", "Oswald", "PingFang SC", sans-serif;
  --body: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  --data: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

a, button, summary, .card, .panel, .track-card, .review-card, .lanecard { transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.sidebar nav .nav-section .nav-children { display: flex; flex-direction: column; }
.sidebar nav .nav-section summary { cursor: pointer; user-select: none; }
@media (prefers-reduced-motion: reduce) { .track-running .dot { animation: none; } }

/* ══════════════════════════════════════════════════════════════════
   2026-11-11 视觉精修层：不改变页面骨架、路由或业务组件结构。
   只统一间距、层级、导航图标、交互反馈和轻量动效。
   ══════════════════════════════════════════════════════════════════ */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

body {
  background:
    radial-gradient(circle at 85% 0%, rgba(229, 138, 33, .07), transparent 28rem),
    var(--bg);
}

.sidebar {
  width: 232px;
  padding: 18px 12px;
  box-shadow: 1px 0 0 rgba(32, 42, 53, .02);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: thin;
}

.brand {
  min-height: 48px;
  padding: 0 10px 18px;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .01em;
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #f29a39, var(--accent));
  box-shadow: 0 7px 16px rgba(196, 81, 18, .22);
}
.brand-mark svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.brand-logo { background: transparent; }
.brand-logo img { display: block; width: 100%; height: 100%; border-radius: inherit; }

/* Authentication shares the workbench palette, with an independent form layout. */
.login-screen {
  --login-bg: #fff9f3;
  --login-line: #eadfd5;
  --login-focus: rgba(196, 81, 18, .14);
  min-height: 100svh;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 18% 18%, rgba(248, 154, 56, .13), transparent 45%),
    radial-gradient(ellipse at 90% 88%, rgba(248, 154, 56, .09), transparent 40%),
    var(--login-bg);
}
.login-shell { width: min(100%, 420px); }
.login-form {
  position: relative;
  width: 100%;
  gap: 24px;
  padding: 40px;
  border: 1px solid var(--login-line);
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(115, 66, 28, .07), 0 4px 12px rgba(115, 66, 28, .03);
  animation: login-arrive .36s var(--ease-out) both;
}
.login-form::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  right: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, #f89a38, transparent);
}
.login-heading { margin-bottom: 4px; }
.login-form .login-brand { justify-content: flex-start; gap: 14px; margin: 0 0 28px; font-size: 20px; font-weight: 700; letter-spacing: .04em; }
.login-form .brand-mark { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; }
.login-heading h1 { margin: 0; color: var(--text); font-size: 26px; font-weight: 650; line-height: 1.4; letter-spacing: .02em; }
.login-form label { gap: 10px; color: var(--text); font-size: 14px; font-weight: 500; }
.login-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #a7adb5;
  border-radius: 10px;
  background: var(--panel);
  font: 16px/1.5 var(--body);
  transition: border-color .16s ease, box-shadow .16s ease;
}
.login-form input:hover { border-color: var(--muted); }
.login-form input:focus { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 5px var(--login-focus); }
.login-form .login-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  margin-top: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 12px rgba(196, 81, 18, .16);
}
.login-submit svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.login-form .login-submit:hover { background: #ad430c; box-shadow: 0 7px 18px rgba(196, 81, 18, .22); }
.login-form .login-submit:active { background: #963b0b; box-shadow: none; transform: none; }
.login-form .login-submit:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.login-form .login-error { margin: 0; padding: 12px 14px; font-size: 14px; border-radius: 10px; }
@keyframes login-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 480px) {
  .login-screen { padding: 24px 16px; }
  .login-form { padding: 32px 24px; border-radius: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-form { animation: none; }
  .login-form input, .login-form .login-submit { transition: none; }
}

.sidebar nav { gap: 8px; }
.sidebar nav .nav-section { margin: 0; }
.sidebar nav .nav-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 10px;
  color: #8a94a3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  list-style: none;
  border-radius: var(--radius-sm);
}
.sidebar nav .nav-section summary::-webkit-details-marker { display: none; }
.sidebar nav .nav-section summary:hover { color: var(--accent); background: #fff8f2; }
.nav-chevron {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s var(--ease-out);
}
.nav-section[open] > summary .nav-chevron { transform: rotate(90deg); }
.sidebar nav .nav-section .nav-children { gap: 3px; padding-top: 3px; }
.sidebar nav .nav-section .nav-children > a.sub,
.sidebar nav a.sub {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin: 0;
  padding: 6px 10px 6px 32px;
  border: 0;
  border-radius: 10px;
  color: #667384;
  font-size: 13px;
  font-weight: 500;
}
.sidebar nav a.sub::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 999px;
  background: transparent;
}
.sidebar nav a.sub:hover {
  color: #2d3743;
  background: #fff8f2;
  text-decoration: none;
}
.sidebar nav a.sub.on {
  color: #9f3f0b;
  background: linear-gradient(90deg, #fff0e4, #fff7f1);
  box-shadow: inset 0 0 0 1px rgba(196, 81, 18, .08);
  font-weight: 700;
}
.sidebar nav a.sub.on::before { background: var(--accent); }
.nav-icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .88;
}
.sidebar nav a.sub:hover .nav-icon { color: var(--accent); opacity: 1; }
.sidebar nav a.sub.on .nav-icon { color: var(--accent); opacity: 1; }
.nav-group { margin: 12px 10px 4px; padding-top: 12px; border-top: 1px solid var(--border); color: #9aa3af; font-size: 11px; font-weight: 700; letter-spacing: .1em; }

.topbar {
  min-height: 68px;
  padding: 14px 30px;
  gap: 16px;
  flex-wrap: wrap;
  background: rgba(255, 255, 255, .94);
  box-shadow: var(--shadow-sm);
}
.topbar h1 { min-width: 0; overflow-wrap: anywhere; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
.user-box {
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  padding: 4px 6px 4px 5px;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}
.account-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--panel-2);
  color: var(--accent);
  font-size: 15px;
  font-weight: 750;
  line-height: 1;
}
.account-name {
  min-width: 0;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 14px;
  font-weight: 650;
}
.account-logout-form { flex: 0 0 auto; padding-left: 8px; border-left: 1px solid var(--border); }
.account-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 550;
  line-height: 20px;
  white-space: nowrap;
  cursor: pointer;
}
.account-logout .nav-icon { width: 16px; height: 16px; opacity: 1; }
.account-logout:hover { background: var(--panel-2); color: var(--accent); }
.account-logout:active { background: var(--border); color: var(--accent); }

.content {
  padding: 28px 30px 40px;
  animation: content-enter .28s var(--ease-out) both;
}
@keyframes content-enter {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.cards, .card-grid, .cardwall { gap: 18px; }
.card, .panel, .track-card, .lanecard, .review-card {
  border-color: #e2e6eb;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card { padding: 18px 20px; }
.panel { padding: 20px 22px; margin-top: 20px; }
.card:hover, .panel:hover, .track-card:hover, .lanecard:hover, .review-card:hover {
  border-color: #d4d9e0;
  box-shadow: 0 8px 24px rgba(32, 42, 53, .07);
}
.track-card { background: var(--panel); }

button, .btn, .primary.as-link {
  touch-action: manipulation;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
}
button.primary, .primary.as-link, .btn.primary, a.primary.btn {
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  background: linear-gradient(180deg, #d7631f, var(--accent));
  color: #fff;
  box-shadow: 0 4px 10px rgba(196, 81, 18, .16);
  font-weight: 650;
}
button.primary:hover, .primary.as-link:hover, .btn.primary:hover, a.primary.btn:hover {
  background: linear-gradient(180deg, #c95717, #aa410b);
  border-color: #aa410b;
  box-shadow: 0 6px 14px rgba(196, 81, 18, .22);
  opacity: 1;
  text-decoration: none;
}
button.primary:active, .primary.as-link:active, .btn.primary:active, a.primary.btn:active {
  background: #a73e09;
  box-shadow: inset 0 2px 4px rgba(91, 30, 0, .18);
}
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:focus, select:focus, textarea:focus, input[type=number]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 81, 18, .12);
  outline: none;
}
button:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; box-shadow: none; }
.link-btn { padding: 5px 7px; border-radius: 7px; }
.link-btn:hover { background: #fff3e9; text-decoration: none; }

@media (max-width: 900px) {
  .sidebar { width: 214px; }
  .content, .topbar { padding-left: 22px; padding-right: 22px; }
}

.radar-platforms .btn {
  border: 1px solid transparent;
  background: transparent;
  color: #a34b18;
  box-shadow: none;
  font-weight: 550;
}
.radar-platforms .btn:hover {
  border-color: #f0d7c6;
  background: #fff8f2;
  color: #833c12;
  box-shadow: none;
  opacity: 1;
}
.radar-platforms .btn.primary,
.radar-platforms a.primary.btn {
  border-color: #efc29f;
  background: #fff2e7;
  color: #983e0d;
  box-shadow: inset 0 0 0 1px rgba(196, 81, 18, .03);
  font-weight: 650;
}
.radar-platforms .btn.primary:hover,
.radar-platforms a.primary.btn:hover {
  border-color: #e9b28c;
  background: #ffefe2;
  box-shadow: none;
}
.radar-platforms .btn.primary:active,
.radar-platforms a.primary.btn:active {
  background: #ffe8d6;
  box-shadow: none;
}
.radar-platforms { gap: 14px; margin-bottom: 14px; }

.radar-agent-grade, .radar-agent-grade.grade-ss, .radar-agent-grade.grade-s { background: #fff0e4; color: #93400f; border: 1px solid #f0d5bf; border-radius: 6px; }
.radar-platforms { display:flex; flex-wrap:wrap; }
.radar-filters { gap: 12px; }
.radar-filters { display: block; }
.radar-filter-panel { margin-bottom: 18px; }
.radar-filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: center;
  gap: 14px;
}
.radar-filter-row + .radar-filter-row {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.radar-filter-row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px 12px;
}
.radar-filter-row-fields > label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.radar-filter-row-fields input[type="search"],
.radar-filter-row-fields select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
}
.radar-filter-row-actions > label {
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}
.radar-filter-row-actions > label input[type="checkbox"] { flex: 0 0 auto; }
.radar-filter-row-actions > button,
.radar-filter-row-actions > .btn {
  display: inline-flex;
  width: auto;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.radar-grid { margin-top: 14px; }
.radar-grid > .radar-card {
  content-visibility: auto;
  contain-intrinsic-size: auto 720px;
}
.radar-product-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radar-product-title h3 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.radar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
}
.radar-actions .radar-action {
  display: inline-flex;
  min-width: 0;
  min-height: 40px;
  flex: 1 1 132px;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 8px;
  text-align: center;
  white-space: nowrap;
}
.radar-actions .radar-action-secondary {
  border: 1px solid #e3c9b6;
  background: #fff;
  color: #7d4c2d;
  font-weight: 600;
}
.radar-actions .radar-action-secondary:hover {
  border-color: #dca47e;
  background: #fff8f2;
  color: #713b1b;
  text-decoration: none;
}
.radar-actions .radar-action-primary { flex-basis: 150px; }
.radar-generation { max-width: 1100px; }
.radar-generation fieldset { background: #fff; border-radius: 10px; }
.radar-element-tags label { background: #faf8f6; border: 1px solid var(--border); border-radius: 8px; }
.radar-element-tags label:has(input:checked) { background: #fff3e9; border-color: #edc5a8; }
@media (max-width: 900px) {
  .radar-filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .layout { display: block; }
  .sidebar { position: static; width: 100%; height: auto; max-height: none; padding: 10px 12px; }
  .brand { min-height: 36px; padding-bottom: 8px; }
  .sidebar nav { display: flex; flex-direction: row; align-items: flex-start; gap: 12px; }
  .nav-section { flex: 1; min-width: 0; }
  .sidebar nav .nav-section .nav-children > a.sub { padding-left: 10px; min-height: 44px; }
  .content { padding: 16px 12px 28px; }
  .topbar { padding: 12px; }
  .user-box { gap: 8px; }
  .account-identity { gap: 8px; }
  .account-name { max-width: 112px; }
  .account-logout { min-height: 44px; }
  .panel { padding: 16px; margin-top: 16px; }
  .radar-generation-person { grid-template-columns: 1fr; }
  .radar-filter-panel { padding: 14px; }
  .radar-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .radar-filter-row-actions > button,
  .radar-filter-row-actions > .btn,
  .radar-actions .radar-action { min-height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

.radar-pool-add-form { display: flex; flex: 1 1 150px; min-width: 0; }
.radar-pool-add-form .radar-action { width: 100%; }
.radar-pool-cart {
  position: fixed;
  right: 22px;
  bottom: 64px;
  z-index: 30;
  width: max-content;
  max-width: calc(100vw - 28px);
  color: var(--text);
}
.radar-pool-cart > summary {
  display: flex;
  width: max-content;
  min-width: 164px;
  min-height: 48px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 4px 14px rgba(32, 42, 53, .14);
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.radar-pool-cart > summary:hover { border-color: #d9a47f; box-shadow: 0 6px 18px rgba(32, 42, 53, .18); }
.radar-pool-cart > summary::-webkit-details-marker { display: none; }
.radar-pool-cart > summary svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.9; }
.radar-pool-cart > summary b { display: grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 12px; font-variant-numeric: tabular-nums; }
.radar-pool-cart > summary:focus-visible,
.radar-pool-cart button:focus-visible,
.radar-pool-form button:focus-visible,
.radar-pool-form input:focus-visible,
.radar-pool-form select:focus-visible,
.radar-pool-form textarea:focus-visible { outline: 3px solid #ed9a56; outline-offset: 2px; }
.radar-pool-cart-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 10px);
  width: min(360px, calc(100vw - 40px));
  max-height: min(65vh, calc(100dvh - 140px), 560px);
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 8px 28px rgba(25, 24, 22, .2);
}
.radar-pool-cart-heading,
.radar-pool-page-heading,
.radar-pool-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.radar-pool-cart-heading { margin-bottom: 10px; }
.radar-pool-cart-panel ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.radar-pool-cart-panel [hidden] { display: none; }
.radar-pool-cart-panel li { display: grid; grid-template-columns: 44px minmax(0, 1fr) 36px; align-items: center; gap: 9px; min-height: 48px; }
.radar-pool-cart-panel li img { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: 5px; background: var(--panel-2); object-fit: cover; }
.radar-pool-cart-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-pool-cart-panel li form { margin: 0; }
.radar-pool-cart-panel button,
.radar-pool-remove { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); color: var(--text); cursor: pointer; font-size: 20px; line-height: 1; }
.workbench-toast {
  position: fixed;
  z-index: 120;
  top: 20px;
  left: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100vw - 32px);
  min-height: 48px;
  padding: 10px 18px;
  border: 1px solid color-mix(in srgb, var(--ok) 38%, white);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 8px 24px rgba(25, 35, 31, .16);
  pointer-events: none;
  animation: workbench-toast-in .18s ease-out both;
}
.workbench-toast svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: var(--ok); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.workbench-toast.is-leaving { animation: workbench-toast-out .18s ease-in both; }
.workbench-toast.is-error { border-color: color-mix(in srgb, var(--err) 38%, white); }
.workbench-toast.is-error svg { stroke: var(--err); }
@keyframes workbench-toast-in {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes workbench-toast-out {
  to { opacity: 0; transform: translate(-50%, -8px); }
}
.radar-pool-page { max-width: 1480px; }
.radar-pool-page-heading { margin-bottom: 16px; }
.radar-pool-page-heading h2,
.radar-pool-section-heading h3,
.radar-pool-config h3 { margin: 0; }
.radar-pool-page-heading p { margin: 2px 0 0; }
.radar-pool-form { max-width: none; gap: 24px; }
.radar-pool-items,
.radar-pool-config { min-width: 0; }
.radar-pool-section-heading { margin: 4px 0 10px; }
.radar-pool-section-heading > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.radar-pool-list { border-top: 1px solid var(--border); }
.radar-pool-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 0 2px; }
.radar-pool-pagination[hidden] { display: none; }
.radar-pool-pagination button { min-height: 38px; }
.radar-pool-item {
  display: grid;
  grid-template-columns: 24px 64px minmax(160px, .85fr) minmax(260px, 1.15fr) 36px;
  align-items: start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.radar-pool-item[hidden] { display: none; }
.radar-pool-check { display: flex; min-height: 44px; align-items: flex-start; justify-content: center; padding-top: 10px; }
.radar-pool-check input,
.radar-pool-ack input,
.radar-pool-regenerate input { width: 18px; height: 18px; accent-color: #c85114; }
.radar-pool-thumb { width: 64px; height: 64px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel-2); object-fit: cover; }
.radar-pool-product { display: grid; min-width: 0; gap: 5px; overflow-wrap: anywhere; }
.radar-pool-product strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.radar-pool-item-options { display: grid; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.radar-pool-item-options > label { min-width: 0; margin: 0; }
.radar-pool-references { grid-column: 1 / -1; min-width: 0; }
.radar-pool-reference-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 8px; font-size: 12px; }
.radar-pool-reference-heading small { margin-left: 6px; font-weight: normal; }
.radar-reference-text { background: none; border: none; box-shadow: none; color: var(--accent); padding: 2px 0; min-height: 28px; font-size: 12px; cursor: pointer; }
.radar-reference-text[hidden], .radar-reference-tile[hidden] { display: none; }
.radar-pool-reference-strip { display: flex; flex-wrap: wrap; gap: 10px; min-height: 64px; }
.radar-reference-tile { position: relative; width: 68px; height: 68px; flex: 0 0 68px; }
.radar-reference-preview { display: grid; place-items: center; width: 68px; height: 68px; padding: 2px; overflow: hidden; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); cursor: zoom-in; box-shadow: none; }
.radar-reference-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 3px; }
.radar-reference-preview span { color: var(--muted); font-size: 11px; }
.radar-reference-remove { position: absolute; top: -7px; right: -7px; width: 26px; height: 26px; min-height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--panel); color: var(--text); font-size: 18px; line-height: 1; box-shadow: 0 1px 3px rgb(0 0 0 / 10%); }
.radar-reference-remove:hover { color: var(--err); border-color: var(--err); }
.radar-pool-references > p { margin: 8px 0 0; }
.radar-pool-references[data-reference-count="0"] > p,
.radar-pool-references[data-reference-state="error"] > p { color: var(--err); }
.radar-reference-dialog { width: min(920px, calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--border); border-radius: 12px; color: var(--text); background: var(--panel); box-sizing: border-box; }
.radar-reference-dialog::backdrop { background: rgb(15 23 42 / 72%); }
.radar-reference-dialog-heading, .radar-reference-dialog-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 16px; }
.radar-reference-dialog-heading { border-bottom: 1px solid var(--border); }
.radar-reference-dialog .radar-reference-close { appearance: none; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 40px; height: 40px; min-height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-sm); background: transparent; color: var(--muted); box-shadow: none; cursor: pointer; }
.radar-reference-dialog .radar-reference-close:hover { background: var(--bg); color: var(--text); border-color: var(--border); }
.radar-reference-dialog .radar-reference-close:active { background: var(--panel-2); color: var(--accent); }
.radar-reference-dialog > img { display: block; width: 100%; height: min(68dvh, 780px); object-fit: contain; background: var(--panel-2); }
.radar-reference-dialog-footer span { min-width: 0; overflow-wrap: anywhere; }
.radar-reference-dialog-footer { border-top: 1px solid var(--border); }
.radar-reference-dialog-footer .radar-reference-delete { flex-shrink: 0; min-height: 40px; white-space: nowrap; cursor: pointer; }
.radar-reference-preview:focus-visible, .radar-reference-remove:focus-visible, .radar-reference-text:focus-visible,
.radar-reference-dialog button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.radar-pool-note { grid-column: 1 / -1; }
.radar-pool-note textarea { width: 100%; min-height: 54px; resize: vertical; }
.radar-pool-uploads { display: grid; gap: 5px; min-width: 0; margin: 0; border: 1px solid var(--border); border-radius: 6px; }
.radar-pool-uploads label { display: flex; align-items: flex-start; gap: 6px; overflow-wrap: anywhere; }
.radar-pool-regenerate,
.radar-pool-ack { display: flex !important; align-items: flex-start; gap: 8px; }
.radar-pool-price,
.radar-pool-clip { display: grid; gap: 4px; }
.radar-pool-price input,
.radar-pool-clip input { width: 100%; min-width: 0; }
.radar-pool-remove { justify-self: end; }
.radar-pool-config { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--border); }
.radar-pool-config > label { display: grid; gap: 6px; }
.radar-pool-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 12px; }
.radar-pool-choice-grid > label { display: grid; min-width: 0; gap: 6px; margin: 0; }
.radar-pool-choice-grid select { min-height: 44px; }
.radar-pool-config select,
.radar-pool-config textarea,
.radar-pool-config input:not([type=checkbox]):not([type=radio]) { width: 100%; min-width: 0; box-sizing: border-box; }
.radar-pool-config fieldset { margin: 0; }
.radar-pool-ack { margin: 4px 0; }
.radar-pool-submit { min-height: 46px; justify-self: start; padding: 10px 22px; }
.radar-pool-submit:disabled { opacity: .55; cursor: not-allowed; }
.radar-pool-empty { display: grid; justify-items: center; gap: 12px; padding: 56px 12px; border-top: 1px solid var(--border); text-align: center; }
.radar-pool-empty svg { width: 38px; height: 38px; fill: none; stroke: var(--muted); stroke-width: 1.5; }
@media (max-width: 900px) {
  .radar-pool-item { grid-template-columns: 24px 56px minmax(0, 1fr) 36px; }
  .radar-pool-thumb { width: 56px; height: 56px; }
  .radar-pool-product { grid-column: 3; }
  .radar-pool-item-options { grid-column: 2 / 4; }
  .radar-pool-remove { grid-column: 4; grid-row: 1; }
}
@media (max-width: 760px) {
  .radar-pool-choice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .radar-pool-choice-grid > label:last-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .radar-pool-cart { right: 12px; bottom: calc(env(safe-area-inset-bottom, 0px) + 64px); }
  .radar-pool-item { grid-template-columns: 24px 48px minmax(0, 1fr) 36px; gap: 8px; }
  .radar-pool-thumb { width: 48px; height: 48px; }
  .radar-pool-item-options { grid-template-columns: 1fr; }
  .radar-pool-choice-grid { grid-template-columns: 1fr; }
  .radar-pool-choice-grid > label:last-child { grid-column: auto; }
  .radar-pool-config fieldset { padding: 12px; }
  .radar-pool-return { min-height: 42px; white-space: nowrap; }
}
