:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --text: #172126;
  --muted: #65747c;
  --line: #d8e0e3;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b7791f;
  --danger: #c2410c;
  --ok: #15803d;
  --shadow: 0 10px 30px rgba(23, 33, 38, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .5;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(14px, 3vw, 28px);
  background: rgba(255, 255, 255, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 0 1px 5px;
  color: #102a32;
  font-size: 24px;
  font-weight: 950;
  line-height: .98;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

.topbar h1 a {
  color: inherit;
  text-decoration: none;
}

.topbar h1::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  bottom: 0;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0 58%, #24b8a8 58% 100%);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar-title {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.topbar-title-line {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  min-width: 0;
}

.app-version-label {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  margin-bottom: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9aa8ad;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-sub {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.site-brand {
  display: inline-flex;
  align-items: flex-end;
  gap: 4px;
  min-width: 0;
}

.site-logo-link {
  display: inline-flex;
  align-items: center;
  width: 132px;
  max-width: 28vw;
  padding: 2px 4px 0;
}

.site-logo-link:hover {
  opacity: .86;
}

.site-logo {
  display: block;
  width: 100%;
  height: auto;
}

.site-version {
  display: inline-flex;
  align-items: center;
  margin-bottom: 7px;
  color: #68768a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.feedback-button {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: #263241;
  padding: 6px 12px;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.feedback-button:hover,
.feedback-button:focus-visible {
  border-color: #9bb9e5;
  background: #f7fbff;
  color: #173d83;
  text-decoration: none;
}

.share-box {
  position: relative;
  flex: 0 0 auto;
}

.share-box > summary {
  list-style: none;
}

.share-box > summary::-webkit-details-marker {
  display: none;
}

.share-button {
  min-height: 36px;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: #263241;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04);
}

.share-button::before {
  content: "";
  width: 15px;
  height: 15px;
  background:
    radial-gradient(circle at 12px 3px, currentColor 0 2px, transparent 2.5px),
    radial-gradient(circle at 3px 8px, currentColor 0 2px, transparent 2.5px),
    radial-gradient(circle at 12px 13px, currentColor 0 2px, transparent 2.5px),
    linear-gradient(26deg, transparent 0 42%, currentColor 43% 56%, transparent 57%),
    linear-gradient(-25deg, transparent 0 42%, currentColor 43% 56%, transparent 57%);
}

.share-button:hover,
.share-box[open] .share-button {
  border-color: #9bb9e5;
  background: #f7fbff;
  color: #173d83;
}

.share-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: min(390px, calc(100vw - 28px));
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 14px 36px rgba(17, 24, 39, .18);
}

.share-panel-title {
  margin: 0;
  color: #263241;
  font-size: 13px;
  font-weight: 900;
}

.share-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.share-url-input {
  min-width: 0;
  height: 34px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  background: #f8fafc;
  padding: 5px 8px;
  color: #475569;
  font-size: 12px;
}

.share-copy-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 5px 9px;
  font-weight: 800;
  white-space: nowrap;
}

.share-copy-button:hover,
.share-copy-button.copied {
  border-color: #a6d8c9;
  background: #effbf7;
  color: #14705c;
}

.share-link-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.share-link {
  min-height: 32px;
  border: 1px solid #d8e2ee;
  border-radius: 6px;
  color: #263241;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 8px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 800;
}

.share-link:hover {
  border-color: #9bb9e5;
  background: #f7fbff;
  color: #173d83;
}

.share-status {
  min-height: 16px;
  color: #14705c;
  font-size: 12px;
  line-height: 1.35;
}

.version-page {
  background: #f5f7f8;
}

.version-shell {
  width: min(940px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 24px 0 42px;
}

.version-head {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(23, 33, 38, .06);
}

.version-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid #cbd7e6;
  border-radius: 7px;
  background: #fff;
  color: #263241;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.version-back:hover,
.version-back:focus-visible {
  border-color: #9bb9e5;
  background: #f7fbff;
  color: #173d83;
}

.version-kicker {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 950;
}

.version-head h1 {
  margin: 0;
  color: #102a32;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.15;
}

.version-head h1 span {
  display: inline-flex;
  margin-left: 8px;
  color: #0f766e;
  font-size: 14px;
  vertical-align: middle;
}

.version-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.version-item {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.version-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.version-item-meta span {
  color: var(--accent);
}

.version-item h2 {
  margin: 0;
  color: #172126;
  font-size: 17px;
}

.version-item p {
  margin: 0;
  color: #43525b;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(270px, 320px);
  gap: 16px;
  padding: 16px clamp(14px, 3vw, 28px) 28px;
}

.page-change-log {
  padding: 0 clamp(14px, 3vw, 28px) 30px;
}

.page-change-log-inner {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(145, 166, 176, .3);
  color: var(--muted);
}

.page-change-log-title {
  justify-self: start;
  color: #607078;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.page-change-log-title:hover,
.page-change-log-title:focus-visible {
  color: #26343b;
  text-decoration: underline;
}

.latest-changes {
  display: grid;
  gap: 4px;
}

.latest-change {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 6px;
  color: #667780;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
}

.latest-change-version {
  flex: 0 0 auto;
  color: #9aa8ad;
}

.latest-change-title {
  min-width: 0;
  overflow: hidden;
  color: #52636b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.latest-change:hover .latest-change-title,
.latest-change:focus-visible .latest-change-title {
  color: #26343b;
  text-decoration: underline;
}

.category-search-footer {
  margin: 0 clamp(14px, 3vw, 28px) 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.category-footer-placeholder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 12px;
}

.category-footer-placeholder-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.category-footer-placeholder-main strong {
  color: var(--text);
  font-size: 15px;
}

.category-footer-placeholder-main span {
  font-size: 12px;
}

.category-footer-placeholder-links,
.category-related-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.category-related-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid #dce4ee;
  border-radius: 7px;
  background: #fff;
  color: #263241;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.category-related-link:hover,
.category-related-link:focus-visible {
  border-color: #bad0f0;
  background: #f4f8ff;
  color: #173d83;
  text-decoration: none;
}

.category-search-footer .category-overview {
  display: grid;
  gap: 12px;
}

.category-search-footer .category-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.category-search-footer .category-overview-head-start {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.category-search-footer .category-overview h2 {
  margin: 0;
  font-size: 17px;
}

.category-search-footer .category-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  align-items: start;
}

.category-search-footer .category-family {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
}

.category-search-footer .category-family-title {
  display: grid;
  gap: 3px;
  border-bottom: 1px solid #e8edf4;
  color: var(--text);
  padding: 2px 2px 8px;
  text-decoration: none;
}

.category-search-footer .category-family-title:hover strong,
.category-search-footer .category-family-title:focus-visible strong {
  color: var(--accent-2);
}

.category-search-footer .category-family-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--text);
}

.category-search-footer .category-family-main strong {
  min-width: 0;
}

.category-search-footer .category-family-title strong {
  font-size: 15px;
  line-height: 1.35;
}

.category-search-footer .category-family-meta,
.category-search-footer .category-descendant-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.category-search-footer .category-descendant-list {
  display: grid;
  gap: 1px;
}

.category-search-footer .category-descendant-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  color: var(--text);
  padding: 4px 6px 4px calc(8px + var(--level, 0) * 16px);
  text-decoration: none;
}

.category-search-footer .category-descendant-row:hover,
.category-search-footer .category-descendant-row:focus-visible {
  background: #f4f8ff;
  color: #173d83;
}

.category-search-footer .category-descendant-row.has-children .category-descendant-name {
  font-weight: 700;
}

.category-search-footer .category-descendant-main {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.category-search-footer .category-descendant-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-search-footer .category-descendant-meta {
  white-space: nowrap;
}

.category-search-footer .category-icon-sm {
  width: 18px;
  height: 18px;
}

.category-search-footer .category-icon-md {
  width: 22px;
  height: 22px;
}

@supports (content-visibility: auto) {
  .category-search-footer .category-family {
    content-visibility: auto;
    contain-intrinsic-size: auto 420px;
  }

  .category-search-footer .category-descendant-row {
    content-visibility: auto;
    contain-intrinsic-size: auto 28px;
  }
}

.site-footer {
  padding: 0 clamp(14px, 3vw, 28px) 24px;
  color: var(--muted);
}

.site-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.site-footer-logo {
  display: inline-flex;
  align-items: center;
  width: 118px;
  opacity: .92;
}

.site-footer-logo:hover,
.site-footer-logo:focus-visible {
  opacity: 1;
  text-decoration: none;
}

.site-footer-logo img {
  display: block;
  width: 100%;
  height: auto;
}

.site-footer-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}

.site-footer-nav a {
  border: 1px solid #dce4ee;
  border-radius: 6px;
  background: #fff;
  color: #4f5f73;
  padding: 5px 9px;
  text-decoration: none;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
  border-color: #bad0f0;
  background: #f4f8ff;
  color: #173d83;
  text-decoration: none;
}

.version-site-footer {
  width: min(940px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 0 0 24px;
}

.mobile-settings-toggle,
.mobile-top-actions,
.mobile-save-build-button,
.mobile-auto-build-status {
  display: none;
}

.auto-build-note-muted {
  display: inline-block;
  margin-top: 2px;
  color: #5d747b;
  font-size: .86em;
  font-weight: 700;
  line-height: 1.35;
}

.left-tools-column,
.settings-panel,
.ai-tools-panel,
.saved-builds-panel,
.parts-panel,
.check-panel {
  min-width: 0;
}

.left-tools-column,
.check-panel {
  align-self: start;
  position: sticky;
  top: 76px;
}

.left-tools-column {
  display: grid;
  gap: 12px;
}

.check-panel section,
.parts-panel,
.settings-panel,
.ai-tools-panel,
.saved-builds-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-panel,
.ai-tools-panel,
.saved-builds-panel {
  padding: 12px;
}

.settings-section {
  padding: 0 0 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(145, 166, 176, .28);
}

.settings-section h2,
.parts-panel h2,
.check-panel h2 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.25;
  letter-spacing: 0;
}

.settings-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.settings-title-row > span:first-child {
  flex: 0 0 auto;
}

.settings-legacy-note {
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.25;
  text-align: right;
}

.settings-legacy-note a {
  color: var(--accent-strong);
  text-decoration: none;
}

.settings-legacy-note a:hover,
.settings-legacy-note a:focus-visible {
  text-decoration: underline;
}

.settings-mode-head {
  display: grid;
  gap: 8px;
}

.auto-build-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(145, 166, 176, .36);
  border-radius: 7px;
  background: color-mix(in srgb, var(--surface) 74%, #eef6f5);
}

.auto-build-tabs label {
  min-width: 0;
}

.auto-build-tabs input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auto-build-tabs span {
  display: grid;
  place-items: center;
  min-height: 28px;
  padding: 4px 3px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.auto-build-tabs input:checked + span {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, .22);
}

.settings-panel[data-auto-kind="performance"] [data-auto-build-panel="budget"],
.settings-panel[data-auto-kind="budget"] [data-auto-build-panel="performance"] {
  display: none;
}

.purpose-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.purpose-grid label {
  min-width: 0;
}

.purpose-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.purpose-grid span {
  display: block;
  min-height: 28px;
  padding: 6px 6px;
  border: 1px solid rgba(145, 166, 176, .42);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
}

.purpose-grid input:checked + span {
  border-color: rgba(15, 118, 110, .5);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.field-block {
  display: grid;
  gap: 6px;
  margin-bottom: 11px;
}

.setting-divider-after {
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(145, 166, 176, .32);
}

.perf-field {
  gap: 3px;
  margin-bottom: 8px;
}

.perf-field > label {
  line-height: 1.2;
}

.perf-field input[type="range"] {
  height: 22px;
  margin: -1px 0 0;
}

.perf-field .range-scale {
  margin-top: -2px;
  line-height: 1.05;
}

.field-block:last-child {
  margin-bottom: 0;
}

.settings-actions-section {
  padding: 0;
  margin-bottom: 0;
  border-bottom: 0;
}

.budget-build-note {
  display: none;
  margin: 0 0 8px;
  border-left: 3px solid rgba(15, 118, 110, .34);
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent-soft) 46%, #fff);
  color: #48616a;
  padding: 7px 9px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
}

.settings-panel[data-auto-kind="budget"] .budget-build-note {
  display: block;
}

.settings-actions {
  display: grid;
  grid-template-columns: minmax(86px, .7fr) minmax(120px, 1fr);
  gap: 8px;
}

.settings-actions .primary-button,
.settings-actions .ghost-button {
  width: 100%;
}

.settings-action-status {
  position: relative;
  min-height: 0;
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #82cfc4;
  border-left: 6px solid var(--accent);
  border-radius: 9px;
  background: linear-gradient(135deg, #e0faf5 0%, #f6fffc 100%);
  color: #0e3d37;
  font-size: 12.5px;
  font-weight: 900;
  line-height: 1.55;
  box-shadow: 0 10px 24px rgba(15, 118, 110, .15);
}

.settings-action-status .loading-inline {
  gap: 8px;
}

.settings-action-status .loading-spinner {
  border-color: rgba(15, 118, 110, .24);
  border-top-color: var(--accent);
}

.settings-action-status:empty {
  display: none;
}

.ai-tools-section {
  display: grid;
  gap: 9px;
}

.ai-tools-section h2 {
  margin: 0;
}

.ai-tool-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.ai-tool-button {
  min-width: 0;
  min-height: 32px;
  padding: 5px 3px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}

.ai-tool-button.is-ai-active {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, .18);
}

.ai-shared-result {
  position: relative;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid #cfe4e0;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #eefaf7;
  box-shadow: 0 5px 14px rgba(15, 118, 110, .08);
}

.ai-shared-result:empty {
  display: none;
}

.ai-shared-result[data-source]::before {
  content: "";
  position: absolute;
  top: -7px;
  width: 12px;
  height: 12px;
  border-left: 1px solid #cfe4e0;
  border-top: 1px solid #cfe4e0;
  background: #eefaf7;
  transform: rotate(45deg);
}

.ai-shared-result[data-level="loading"] {
  border-left-color: #2563eb;
  background: #eef5ff;
}

.ai-shared-result[data-level="loading"]::before {
  background: #eef5ff;
}

.ai-shared-result[data-level="warn"] {
  border-color: #f0dfae;
  border-left-color: #d9a21b;
  background: #fffaf0;
}

.ai-shared-result[data-level="warn"]::before {
  border-left-color: #f0dfae;
  border-top-color: #f0dfae;
  background: #fffaf0;
}

.ai-shared-result[data-level="error"] {
  border-color: #f3c4c4;
  border-left-color: #dc2626;
  background: #fff7f7;
}

.ai-shared-result[data-level="error"]::before {
  border-left-color: #f3c4c4;
  border-top-color: #f3c4c4;
  background: #fff7f7;
}

.ai-shared-result[data-source="build-request"]::before {
  left: calc(16.666% - 6px);
}

.ai-shared-result[data-source="build-review"]::before {
  left: calc(50% - 6px);
}

.ai-shared-result[data-source="performance-review"]::before {
  left: calc(83.333% - 6px);
}

.ai-result {
  display: grid;
  gap: 7px;
  min-height: 0;
  color: #17443e;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.ai-result:empty {
  color: var(--muted);
}

.ai-result[data-level="warn"] {
  color: #68571a;
}

.ai-result[data-level="error"] {
  color: #8b1f1f;
}

.saved-builds-panel {
  display: grid;
  gap: 8px;
}

.saved-builds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.saved-builds-head h2 {
  margin: 0;
  font-size: 14px;
  line-height: 1.25;
}

.saved-builds-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.saved-build-slots {
  display: grid;
  gap: 8px;
}

.saved-build-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.saved-build-slot-count {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  min-width: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.saved-build-save-current {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 38px;
  border: 1px solid rgba(15, 118, 110, .36);
  border-radius: 7px;
  background: #f2fbf8;
  color: #0f5f59;
  padding: 7px 10px;
  text-align: center;
}

.saved-build-save-current.only-save {
  min-height: 38px;
}

.saved-build-save-current span {
  font-size: 12px;
  font-weight: 950;
  line-height: 1.2;
}

.saved-build-save-current small {
  overflow: hidden;
  color: #587078;
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-build-save-current:hover,
.saved-build-save-current:focus-visible {
  border-color: rgba(15, 118, 110, .6);
  background: #e9f8f4;
}

.saved-build-list {
  display: grid;
  gap: 6px;
}

.saved-build-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  gap: 5px;
  align-items: stretch;
}

.saved-build-load {
  min-width: 0;
  display: grid;
  gap: 2px;
  min-height: 52px;
  border: 1px solid #dbe5ec;
  border-radius: 7px;
  background: #fff;
  color: #24343b;
  padding: 7px 8px;
  text-align: left;
}

.saved-build-load:hover,
.saved-build-load:focus-visible {
  border-color: rgba(37, 99, 235, .35);
  background: #f5f9ff;
}

.saved-build-load strong,
.saved-build-load span,
.saved-build-load small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-build-load strong {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 950;
}

.saved-build-load span {
  color: #52656e;
  font-size: 11px;
  line-height: 1.25;
}

.saved-build-load small {
  color: #8a989e;
  font-size: 10px;
  font-weight: 800;
}

.saved-build-edit {
  position: relative;
  min-width: 0;
  width: 32px;
  min-height: 52px;
  border: 1px solid #dbe5ec;
  border-radius: 7px;
  background: #fff;
  color: #53666f;
}

.saved-build-edit:hover,
.saved-build-edit:focus-visible {
  border-color: rgba(15, 118, 110, .45);
  background: #f2fbf8;
  color: #0f5f59;
}

.pencil-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%) rotate(-42deg);
}

.pencil-icon::before,
.pencil-icon::after {
  content: "";
  position: absolute;
  display: block;
}

.pencil-icon::before {
  left: 3px;
  top: 1px;
  width: 6px;
  height: 12px;
  border-radius: 2px;
  background: currentColor;
}

.pencil-icon::after {
  left: 4px;
  top: 12px;
  width: 0;
  height: 0;
  border-left: 2px solid transparent;
  border-right: 2px solid transparent;
  border-top: 4px solid currentColor;
}

.save-build-modal::backdrop {
  background: rgba(23, 33, 38, .48);
}

.save-build-shell {
  width: min(460px, calc(100vw - 28px));
  display: grid;
  gap: 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 18px 48px rgba(17, 24, 39, .2);
}

.save-build-name-field {
  display: grid;
  gap: 5px;
  color: #3f5058;
  font-size: 12px;
  font-weight: 900;
}

.save-build-name-field input {
  width: 100%;
  height: 38px;
  border: 1px solid #cfdbe1;
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.save-build-name-field input:focus {
  outline: 2px solid rgba(15, 118, 110, .18);
  border-color: rgba(15, 118, 110, .5);
}

.save-build-modal-summary {
  min-height: 28px;
  border: 1px solid #e1e9ed;
  border-radius: 7px;
  background: #f7fafb;
  color: #4d6169;
  padding: 7px 8px;
  font-size: 12px;
  line-height: 1.35;
}

.save-build-overwrite {
  display: grid;
  gap: 6px;
}

.save-build-overwrite[hidden] {
  display: none;
}

.save-build-overwrite p {
  margin: 0;
  color: #667780;
  font-size: 11px;
  font-weight: 900;
}

.save-build-overwrite > div {
  display: grid;
  gap: 5px;
}

.overwrite-build-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #dbe5ec;
  border-radius: 7px;
  background: #fff;
  color: #26343b;
  padding: 7px 8px;
  text-align: left;
}

.overwrite-build-button:hover,
.overwrite-build-button:focus-visible {
  border-color: rgba(15, 118, 110, .45);
  background: #f2fbf8;
}

.overwrite-build-button span {
  min-width: 0;
  display: grid;
  gap: 1px;
}

.overwrite-build-button strong,
.overwrite-build-button small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overwrite-build-button strong {
  font-size: 12px;
  line-height: 1.2;
}

.overwrite-build-button small {
  color: #6a7b82;
  font-size: 10px;
}

.overwrite-build-button b {
  color: #0f766e;
  font-size: 11px;
  white-space: nowrap;
}

.save-build-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.save-build-foot .save-build-delete {
  min-width: 76px;
  margin-right: auto;
  border-color: #f0c7b5;
  background: #fff7f2;
  color: #9a3412;
}

.save-build-foot .save-build-delete:hover,
.save-build-foot .save-build-delete:focus-visible {
  border-color: #e99a78;
  background: #fff0e7;
}

.save-build-foot .ghost-button {
  min-width: 86px;
}

.save-build-foot .primary-button {
  min-width: 120px;
}

.ai-summary {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 6px;
  background: #f2f7f7;
}

.ai-summary p,
.ai-list-block ul,
.ai-part-review p {
  margin: 0;
}

.ai-summary-tags {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.ai-verdict,
.ai-score {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #dff4ef;
  color: #064e46;
  font-size: 11px;
  font-weight: 900;
}

.ai-score {
  background: #edf4ff;
  color: #174478;
}

.ai-part-reviews {
  display: grid;
  gap: 5px;
}

.ai-part-review {
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-left: 3px solid #9bb4c0;
  border-radius: 5px;
  background: #fff;
}

.ai-part-review[data-level="ok"] {
  border-left-color: #0f766e;
}

.ai-part-review[data-level="warn"] {
  border-left-color: #d9bd65;
}

.ai-part-review[data-level="error"] {
  border-left-color: #d14b4b;
}

.ai-part-review strong,
.ai-list-block strong {
  color: #26343b;
  font-size: 12px;
}

.ai-list-block {
  display: grid;
  gap: 4px;
}

.ai-list-block ul {
  display: grid;
  gap: 3px;
  padding-left: 1.25em;
}

.ai-purpose-modal {
  width: min(560px, calc(100vw - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  box-shadow: 0 18px 60px rgba(15, 23, 42, .28);
}

.ai-purpose-modal::backdrop {
  background: rgba(15, 23, 42, .42);
}

.ai-purpose-shell {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #fff;
}

.ai-purpose-shell textarea {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
}

.ai-purpose-examples {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ai-purpose-examples button {
  min-height: 28px;
  border: 1px solid #dce4ee;
  border-radius: 999px;
  background: #f8fafc;
  color: #4f5f73;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}

.ai-purpose-examples button:hover,
.ai-purpose-examples button:focus-visible {
  border-color: #bad0f0;
  background: #f4f8ff;
  color: #173d83;
}

.ai-purpose-error {
  min-height: 16px;
  color: #8b1f1f;
  font-size: 12px;
  font-weight: 800;
}

.ai-purpose-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.field-block > label,
.mini-field {
  color: #24333a;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.field-block output {
  float: right;
  color: var(--accent);
  font-weight: 800;
  font-size: 12px;
  line-height: 1.2;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.segmented-wrap {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.segmented label {
  min-width: 0;
}

.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfcfc;
  color: #26343b;
  font-weight: 700;
  text-align: center;
}

.segmented input:checked + span {
  border-color: rgba(15, 118, 110, .55);
  background: #dff4ef;
  color: #064e46;
}

.settings-panel .gpu-maker-segmented,
.settings-panel .size-segmented {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}

.settings-panel .gpu-maker-segmented span {
  min-height: 30px;
  padding: 5px 3px;
  font-size: 11px;
}

.settings-panel .size-segmented span {
  min-height: 28px;
  padding: 4px 3px;
  font-size: 12px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.range-scale {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
}

.budget-scale {
  position: relative;
  display: block;
  height: 13px;
  margin-right: 8px;
  margin-left: 8px;
}

.budget-scale span {
  position: absolute;
  top: 0;
  left: var(--pos, 0%);
  white-space: nowrap;
  transform: translateX(-50%);
}

.budget-scale span[data-edge="start"] {
  transform: translateX(0);
}

.budget-scale span[data-edge="end"] {
  transform: translateX(-100%);
}

.gpu-scale {
  font-size: 10px;
}

.compact-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.compact-grid h2 {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.mini-field {
  display: grid;
  gap: 5px;
  font-size: 12px;
}

.mini-field input,
.mini-field select,
.modal-tools input,
.modal-tools select,
.category-picker select {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 7px 9px;
}

.parts-panel {
  display: grid;
  align-self: start;
  align-content: start;
  gap: 16px;
  padding: 16px 14px 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head > .ghost-button {
  flex: 0 0 auto;
  white-space: nowrap;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.parts-grid {
  display: block;
  min-width: 0;
}

.parts-table-wrap {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.parts-table-scroll {
  overflow: auto;
  border-radius: inherit;
}

.parts-table-wrap::before,
.build-overview::before {
  content: attr(data-frame-label);
  position: absolute;
  z-index: 3;
  top: -9px;
  left: 12px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--surface);
  color: #526174;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
}

.build-overview::before {
  content: "概要";
}

.parts-table-wrap::before {
  left: 10px;
  display: none;
}

.parts-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

.parts-table th,
.parts-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

.parts-table th {
  background: #f8fafc;
  color: #526174;
  font-size: 12px;
}

.parts-table tbody tr:nth-child(even) {
  background: #f8fbfc;
}

.parts-gap-row td {
  height: 6px;
  padding: 0;
  border-top: 1px solid #d3e0e6;
  border-right: 0;
  border-bottom: 1px solid #d3e0e6;
  border-left: 0;
  background: var(--surface);
}

.parts-maintenance-row td {
  padding: 6px 9px;
  background: #fffdf2;
}

.parts-row.is-role-start > td {
  box-shadow: none;
}

.parts-row.is-inactive > td:not(.parts-role-cell) {
  opacity: .55;
  background: #eef3f5;
}

.parts-row.is-empty {
  color: var(--muted);
}

.parts-row.has-part-error > td:not(.parts-role-cell) {
  background: #fff1f2;
}

.parts-role-cell {
  position: relative;
  width: 104px;
  border-right: 1px solid #d2dfe5;
  background: #e7eef2;
}

.parts-table td.parts-role-cell {
  padding: 6px;
  vertical-align: middle;
}

.part-role-button {
  position: absolute;
  inset: 6px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px;
  place-content: center;
  place-items: center stretch;
  width: auto;
  height: auto;
  min-height: 0;
  padding: 8px 6px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #1f333c;
  text-align: center;
  cursor: pointer;
}

.part-role-button:hover,
.part-role-button:focus-visible {
  background: rgba(255, 255, 255, .64);
  color: var(--accent-2);
}

.part-role-button:focus-visible {
  outline: 2px solid rgba(46, 125, 146, .42);
  outline-offset: 2px;
}

.part-role-button:disabled {
  cursor: not-allowed;
  opacity: .7;
}

.part-role-capacity-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 8px);
  min-height: 17px;
  padding: 1px 5px;
  border: 1px solid rgba(15, 118, 110, .18);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  color: #0f766e;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}

.part-role-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 17px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  word-break: keep-all;
  overflow-wrap: normal;
}

.category-icon {
  display: inline-block;
  flex: 0 0 auto;
  color: #2f3d4f;
}

.category-icon-sm {
  width: 25px;
  height: 25px;
}

.part-role-category-icon {
  position: absolute;
  left: -11px;
  top: calc(100% + 1px);
  width: 25px;
  height: 25px;
  transform: translateY(-50%);
}

.part-issue-list {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.part-issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  padding: 5px 7px;
  border-radius: 5px;
  border: 1px solid #d8e2ea;
  background: #fff;
  color: #455866;
  font-size: 12px;
  line-height: 1.35;
}

.part-issue b {
  font-size: 11px;
  line-height: 1.4;
}

.part-issue[data-level="error"] {
  border-color: rgba(220, 38, 38, .28);
  background: #fff7f7;
  color: #7f1d1d;
}

.part-issue[data-level="warn"] {
  border-color: rgba(202, 138, 4, .16);
  background: #fffdf2;
  color: #68571a;
}

.part-issue[data-level="unknown"] {
  border-color: rgba(202, 138, 4, .16);
  background: #fffbea;
  color: #68571a;
}

.part-role-label-text {
  display: block;
  min-width: 0;
  max-width: 100%;
  line-break: strict;
}

.part-role-button:hover .category-icon,
.part-role-button:focus-visible .category-icon {
  color: currentColor;
}

.part-role-search-icon {
  display: block;
  width: 14px;
  height: 14px;
  justify-self: center;
  background: currentColor;
  -webkit-mask: url("./search-icon.svg") center / contain no-repeat;
  mask: url("./search-icon.svg") center / contain no-repeat;
  opacity: .62;
}

.part-role-button:hover .part-role-search-icon,
.part-role-button:focus-visible .part-role-search-icon {
  opacity: .9;
}

.part-role-note {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}

.parts-active-cell {
  width: 48px;
  text-align: center;
  vertical-align: middle;
}

.parts-product-cell {
  min-width: 290px;
}

.parts-product-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
  align-items: center;
}

.parts-price-cell {
  width: 150px;
}

.parts-spec-cell {
  min-width: 260px;
}

.mobile-spec-details {
  display: none;
}

.parts-action-cell {
  width: 44px;
}

.parts-actions {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.part-slot {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
  overflow: hidden;
}

.part-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid #e7ecee;
  background: var(--surface-2);
}

.part-head h3 {
  margin: 0;
  font-size: 14px;
}

.part-head p {
  margin: 2px 0 0;
  font-size: 11px;
}

.selected-list {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.selected-row {
  display: grid;
  grid-template-columns: 22px 48px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 4px;
  border-radius: 7px;
}

.selected-row.is-inactive {
  opacity: .48;
  background: #eef3f5;
}

.active-part-control {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  gap: 2px;
  min-width: 28px;
}

.active-part-control.has-quantity {
  gap: 1px;
}

.active-radio,
.active-chip {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}

.active-radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.active-radio span {
  width: 16px;
  height: 16px;
  border: 2px solid #b6c8d1;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
}

.active-radio input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
}

.active-check span {
  border-radius: 5px;
}

.part-quantity-select {
  width: 30px;
  height: 21px;
  min-height: 21px;
  padding: 0 1px;
  border: 1px solid #bcd0d8;
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-align-last: center;
}

.active-chip {
  border-radius: 999px;
  background: #e8f5f2;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
}

.selected-thumb,
.result-image,
.table-product-image {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e2e8ea;
  background: #fff;
}

.selected-thumb {
  width: 48px;
  height: 48px;
  border-radius: 6px;
}

.selected-thumb img,
.result-image img,
.table-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.no-image {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: linear-gradient(135deg, #dbe4e8, #f4e8c8);
}

.selected-main {
  min-width: 0;
}

.selected-main strong,
.result-body h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.selected-main strong {
  font-size: 13px;
}

.selected-meta,
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.badge-line,
.spec-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}

.parts-spec-list {
  margin-top: 0;
}

.badge-line span {
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 999px;
  background: #e7efff;
  color: #1e3a8a;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.spec-pair {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 2px 5px;
  border: 1px solid #dce2eb;
  border-radius: 5px;
  background: #fbfcfe;
  color: #4f5d70;
  font-size: 12px;
}

.spec-pair.has-meter {
  padding-bottom: 6px;
}

.spec-pair b {
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  color: #26343b;
}

.spec-pair b::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: .95em;
  margin: 0 3px;
  background: #cbd5e1;
}

.spec-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.spec-meter {
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 2px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf5fa;
}

.spec-meter > span {
  display: block;
  height: 100%;
  min-width: 2px;
  max-width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #75cef7 0%, #ffb29f 100%);
}

.empty-part,
.empty-results,
.loading-row {
  margin: 0;
  padding: 16px;
  color: var(--muted);
  text-align: center;
}

.loading-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
}

.loading-row.compact {
  padding: 10px;
}

.loading-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.loading-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd9de;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: loading-spin .75s linear infinite;
}

.loading-spinner.small {
  width: 15px;
  height: 15px;
  border-width: 2px;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

.check-panel {
  display: grid;
  gap: 12px;
}

.check-panel section {
  padding: 14px;
}

.summary-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-value {
  display: grid;
  gap: 2px;
}

.summary-band strong {
  color: var(--accent);
  font-size: 18px;
}

.build-overview {
  position: relative;
  display: grid;
  align-self: start;
  gap: 8px;
  min-height: 112px;
  margin: 0 10px;
  padding: 12px 8px 8px;
  border: 1px solid #d8e5eb;
  border-radius: 7px;
  background: #fbfdff;
}

.overview-pc-search {
  position: absolute;
  z-index: 5;
  top: -14px;
  right: 12px;
}

.overview-pc-search-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border: 1px solid rgba(15, 118, 110, .35);
  border-radius: 999px;
  background: #fff;
  color: #0f5f59;
  padding: 4px 10px;
  box-shadow: 0 4px 12px rgba(17, 38, 46, .08);
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.2;
  list-style: none;
  white-space: nowrap;
}

.overview-pc-search-button::-webkit-details-marker {
  display: none;
}

.overview-pc-search-button::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 6px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-1px);
}

.overview-pc-search[open] .overview-pc-search-button::after {
  transform: rotate(225deg) translate(-1px, -1px);
}

.overview-pc-search-button:disabled,
.overview-pc-search.is-disabled .overview-pc-search-button {
  border-color: #d3dde3;
  background: #f3f6f8;
  box-shadow: none;
  color: #8b9ba4;
  cursor: not-allowed;
}

.overview-pc-search.is-disabled .overview-pc-search-button::after {
  opacity: .35;
}

.overview-pc-search-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  display: grid;
  min-width: 148px;
  padding: 5px;
  border: 1px solid #d8e5eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 38, 46, .16);
}

.overview-pc-search-menu a {
  border-radius: 6px;
  color: #20333b;
  padding: 7px 9px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.overview-pc-search-menu a:hover,
.overview-pc-search-menu a:focus-visible {
  background: #eaf6f3;
  color: #0f766e;
  outline: none;
}

.build-overview::before {
  background: #fbfdff;
}

.has-shared-parts .build-overview {
  min-height: 118px;
}

.build-overview-head {
  display: grid;
  grid-template-columns: auto minmax(170px, 260px) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.overview-total {
  display: grid;
  gap: 1px;
  min-width: 116px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #eef7f8;
}

.overview-total span {
  color: #52636c;
  font-size: 11px;
  font-weight: 800;
}

.overview-total strong {
  color: var(--accent);
  font-size: 18px;
  line-height: 1.15;
}

.overview-price-history {
  position: relative;
  min-width: 0;
  min-height: 74px;
  display: grid;
  gap: 3px;
  padding: 6px 8px;
  border: 1px solid #dce8ed;
  border-radius: 6px;
  background: #fff;
}

.price-history-head,
.price-history-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.price-history-head span,
.price-history-foot {
  color: #647780;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
}

.price-history-head strong {
  min-width: 0;
  color: #0f766e;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-history-svg {
  display: block;
  width: 100%;
  height: 42px;
  cursor: crosshair;
}

.price-history-area {
  fill: rgba(15, 118, 110, .12);
}

.price-history-line {
  fill: none;
  stroke: #0f766e;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.price-history-dot {
  fill: #0f766e;
  stroke: #fff;
  stroke-width: 1.2;
}

.price-history-hover-guide {
  position: absolute;
  width: 1px;
  border-radius: 999px;
  background: rgba(15, 118, 110, .32);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-.5px);
  transition: opacity .12s ease;
}

.price-history-tooltip {
  position: absolute;
  z-index: 2;
  max-width: 118px;
  padding: 3px 6px;
  border: 1px solid rgba(15, 118, 110, .2);
  border-radius: 5px;
  background: rgba(23, 38, 48, .92);
  box-shadow: 0 4px 12px rgba(15, 23, 42, .16);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, calc(-100% - 6px));
  transition: opacity .12s ease;
  white-space: nowrap;
}

.overview-price-history.is-hovering .price-history-hover-guide,
.overview-price-history.is-hovering .price-history-tooltip {
  opacity: 1;
}

.price-history-foot b {
  color: #647780;
  font-size: 10px;
  font-weight: 950;
  white-space: nowrap;
}

.price-history-foot b.is-up {
  color: #b45309;
}

.price-history-foot b.is-down {
  color: #047857;
}

.price-history-empty {
  min-height: 42px;
  border-radius: 5px;
  background:
    linear-gradient(135deg, transparent 0 46%, rgba(100, 116, 139, .22) 47% 53%, transparent 54% 100%),
    linear-gradient(180deg, #f5f8fa, #fff);
}

.overview-text {
  margin: 0;
  color: #1f333c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.overview-part {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.overview-separator {
  display: inline-block;
  width: 1px;
  height: 1.05em;
  margin: 0 9px;
  background: #b8c7d0;
  vertical-align: middle;
  transform: translateY(.15em);
}

.overview-part.is-empty {
  color: var(--muted);
}

.overview-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.overview-metric {
  min-width: 0;
  padding: 6px 7px;
  border: 1px solid #e0e9ee;
  border-radius: 6px;
  background: #fff;
}

.overview-metric.is-empty {
  opacity: .72;
}

.overview-metric-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 7px;
  min-width: 0;
  color: #52636c;
  font-size: 11px;
  font-weight: 800;
}

.overview-metric-top b {
  min-width: 0;
  color: #24333a;
  font-size: 12px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-meter {
  position: relative;
  height: 7px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eef3;
}

.overview-meter span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #2e7d92, #50a58c);
}

.overview-meter i {
  position: absolute;
  inset: 0 0 0 auto;
  width: 2px;
  background: #1f333c;
  opacity: .65;
}

#powerEstimate {
  display: grid;
  gap: 2px;
  min-width: 112px;
}

.power-summary-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: #42535c;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.power-summary-line b {
  color: var(--accent);
  font-size: 15px;
}

.power-summary-line small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.power-summary-band {
  align-items: center;
}

.formula-button {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #cbd9de;
  border-radius: 6px;
  background: #fff;
  color: #1f333c;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.formula-button:hover,
.formula-button:focus-visible,
.formula-button.is-open {
  border-color: rgba(46, 125, 146, .35);
  background: #edf7fa;
  color: var(--accent-2);
}

.formula-button:focus-visible {
  outline: 2px solid rgba(46, 125, 146, .38);
  outline-offset: 2px;
}

.power-formula-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
}

.power-formula-panel[hidden] {
  display: none;
}

.power-formula-head {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid #d8e5ea;
  border-radius: 7px;
  background: #f7fbfc;
}

.power-formula-head strong {
  color: #1f333c;
}

.power-formula-head span {
  color: var(--muted);
  font-size: 12px;
}

.power-formula-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce6ea;
  border-radius: 7px;
  background: #fff;
}

.power-formula-card.is-selected {
  border-color: rgba(46, 125, 146, .4);
  background: #f3fbfd;
}

.power-formula-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-weight: 800;
}

.power-formula-title strong {
  color: var(--accent);
}

.power-formula-expression {
  padding: 7px 8px;
  border-radius: 6px;
  background: #eef4f6;
  color: #273941;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.power-formula-list {
  display: grid;
  gap: 5px;
  margin: 0;
}

.power-formula-list div {
  display: grid;
  grid-template-columns: minmax(84px, .8fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: start;
}

.power-formula-list dt {
  color: #42535c;
  font-size: 12px;
  font-weight: 800;
}

.power-formula-list dd {
  display: grid;
  gap: 1px;
  margin: 0;
  color: #52636c;
  font-size: 12px;
}

.power-formula-list dd strong {
  color: #1f333c;
  font-size: 13px;
}

.power-formula-list dd span,
.power-formula-card p {
  color: var(--muted);
  font-size: 11px;
}

.power-formula-card p {
  margin: 0;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e8edf0;
  color: #34444c;
  font-weight: 800;
}

.status-pill[data-level="ok"] {
  background: #dcfce7;
  color: #166534;
}

.status-pill[data-level="info"] {
  background: #e8f1f5;
  color: #35515f;
}

.status-pill[data-level="warn"] {
  background: #fff7d6;
  color: #6f5a18;
}

.status-pill[data-level="error"] {
  background: #ffedd5;
  color: #9a3412;
}

.check-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.check-item {
  padding: 9px 10px;
  border-left: 4px solid #94a3b8;
  background: #f8fafb;
}

.check-item strong {
  display: block;
  margin-bottom: 2px;
}

.check-item p {
  margin: 0;
  color: #52636c;
}

.check-item[data-level="ok"] {
  border-left-color: var(--ok);
}

.check-item[data-level="info"] {
  border-left-color: #8aa5b3;
  background: #f3f8fa;
}

.check-item[data-level="info"] strong {
  color: #2f4a58;
}

.check-item[data-level="info"] p {
  color: #526b78;
}

.check-item[data-level="warn"] {
  border-left-color: #d9bd65;
  background: #fffdf2;
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, .14);
}

.check-item[data-level="warn"] strong {
  color: #6f5a18;
}

.check-item[data-level="warn"] p {
  color: #665b2a;
}

.check-item[data-level="unknown"] {
  border-left-color: #d9bd65;
  background: #fffdf2;
  box-shadow: inset 0 0 0 1px rgba(202, 138, 4, .14);
}

.check-item[data-level="unknown"] strong {
  color: #6f5a18;
}

.check-item[data-level="unknown"] p {
  color: #665b2a;
}

.check-item[data-level="error"] {
  border-left-color: var(--danger);
  background: #fff1f2;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .16);
}

.check-item[data-level="error"] strong {
  color: #991b1b;
}

.check-item[data-level="error"] p {
  color: #7f1d1d;
}

.check-note {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(202, 138, 4, .14);
  border-radius: 7px;
  background: #fffdf2;
  color: #665b2a;
  font-size: 12px;
  line-height: 1.5;
}

.check-note[hidden] {
  display: none;
}

.check-note strong {
  display: block;
  margin-bottom: 3px;
  color: #6f5a18;
  font-size: 12px;
}

.check-note p {
  margin: 0;
}

.category-maintenance-notice {
  display: grid;
  gap: 3px;
  padding: 8px 10px;
  border: 1px solid rgba(202, 138, 4, .18);
  border-left: 4px solid rgba(202, 138, 4, .46);
  border-radius: 7px;
  background: #fffdf2;
  color: #5f4f17;
  line-height: 1.45;
}

.category-maintenance-notice strong {
  font-size: 12px;
  font-weight: 700;
}

.category-maintenance-notice small {
  color: #8a7529;
  font-size: 11px;
}

.category-maintenance-modal {
  margin: 10px 10px 8px;
}

.primary-button,
.ghost-button,
.delete-button,
.slot-button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
}

.primary-button {
  min-height: 36px;
  padding: 7px 12px;
  background: var(--accent);
  color: #fff;
}

.ghost-button {
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--line);
  background: #fff;
  color: #24333a;
}

.delete-button {
  min-height: 34px;
  padding: 6px 10px;
}

.slot-button {
  min-width: 54px;
  min-height: 32px;
  padding: 5px 9px;
  background: #fff;
  border-color: #cbd5d9;
  color: var(--accent-2);
}

.icon-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  background: #fff;
  border-color: var(--line);
  color: #34444c;
}

.icon-button.small {
  width: 28px;
  height: 28px;
}

.mobile-remove-button {
  display: none;
}

.muted {
  color: var(--muted);
}

.danger-text {
  color: var(--danger);
}

.search-modal {
  width: min(1480px, calc(100vw - 32px));
  height: min(900px, calc(100vh - 32px));
  max-height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.search-modal::backdrop {
  background: rgba(10, 20, 26, .45);
}

.modal-shell {
  display: grid;
  grid-template-rows: auto auto auto auto auto auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  min-width: 0;
  max-height: min(900px, calc(100vh - 32px));
  overflow: hidden;
  margin: 0;
  background: #fff;
}

.modal-head,
.modal-tools,
.modal-foot,
.category-picker {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-head h2 {
  margin: 0;
  font-size: 18px;
}

.modal-head p {
  margin: 2px 0 0;
  color: var(--muted);
}

.modal-tools {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.dependency-panel {
  display: grid;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbfc;
}

.dependency-panel[hidden] {
  display: none;
}

.dependency-group {
  display: grid;
  gap: 6px;
}

.dependency-group > strong {
  color: #31424b;
  font-size: 12px;
}

.dependency-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dependency-adopted {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid #b7dfd8;
  border-radius: 7px;
  background: #eefaf7;
  color: #17443e;
  font-size: 12px;
}

.dependency-adopted span {
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.dependency-adopted b,
.dependency-adopted small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dependency-adopted small {
  color: var(--muted);
}

.dependency-button {
  display: grid;
  max-width: 260px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #cddce3;
  border-radius: 7px;
  background: #fff;
  color: #22343c;
  cursor: pointer;
  text-align: left;
}

.dependency-button:hover {
  border-color: #9ec0e8;
  background: #f2f7ff;
}

.dependency-button.is-adopted {
  border-color: var(--accent);
  background: #e8f7f3;
  box-shadow: inset 3px 0 0 var(--accent);
}

.dependency-button.is-adopted span {
  color: #075d55;
}

.dependency-button.is-inactive {
  opacity: .62;
}

.dependency-button span,
.dependency-button small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dependency-button span {
  font-size: 12px;
  font-weight: 800;
}

.dependency-button small {
  color: var(--muted);
  font-size: 11px;
}

.view-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.view-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.view-button {
  display: inline-flex;
  width: 34px;
  min-height: 28px;
  margin: 0;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  cursor: pointer;
}

.view-button::before {
  content: "";
  display: block;
  width: 17px;
  height: 15px;
}

.view-button.list::before {
  background:
    linear-gradient(#526174, #526174) 0 0 / 17px 2px no-repeat,
    linear-gradient(#526174, #526174) 0 6px / 17px 2px no-repeat,
    linear-gradient(#526174, #526174) 0 12px / 17px 2px no-repeat,
    linear-gradient(#526174, #526174) 0 0 / 2px 15px no-repeat,
    linear-gradient(#526174, #526174) 7px 0 / 2px 15px no-repeat,
    linear-gradient(#526174, #526174) 15px 0 / 2px 15px no-repeat;
}

.view-button.table::before {
  background:
    linear-gradient(#526174, #526174) 0 1px / 17px 2px no-repeat,
    linear-gradient(#526174, #526174) 0 6px / 17px 2px no-repeat,
    linear-gradient(#526174, #526174) 0 11px / 17px 2px no-repeat;
}

.view-toggle input:checked + .view-button {
  background: var(--accent-2);
}

.view-toggle input:checked + .view-button.list::before {
  background:
    linear-gradient(#fff, #fff) 0 0 / 17px 2px no-repeat,
    linear-gradient(#fff, #fff) 0 6px / 17px 2px no-repeat,
    linear-gradient(#fff, #fff) 0 12px / 17px 2px no-repeat,
    linear-gradient(#fff, #fff) 0 0 / 2px 15px no-repeat,
    linear-gradient(#fff, #fff) 7px 0 / 2px 15px no-repeat,
    linear-gradient(#fff, #fff) 15px 0 / 2px 15px no-repeat;
}

.view-toggle input:checked + .view-button.table::before {
  background:
    linear-gradient(#fff, #fff) 0 1px / 17px 2px no-repeat,
    linear-gradient(#fff, #fff) 0 6px / 17px 2px no-repeat,
    linear-gradient(#fff, #fff) 0 11px / 17px 2px no-repeat;
}

.condition-panel {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 250px));
  justify-content: start;
  align-items: start;
  gap: 8px;
  min-width: 0;
  max-height: min(240px, 28vh);
  overflow: auto;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: #f7fafb;
  transition: max-height .18s ease, padding .18s ease, background-color .18s ease;
}

.condition-box {
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid #dce5e9;
  border-radius: 7px;
  background: #fff;
}

.condition-box.is-active {
  border-color: #80c8be;
  background: #f0fbf8;
  box-shadow: inset 3px 0 0 var(--accent);
}

.condition-box:has(.dual-range) {
  padding: 5px 7px 6px;
}

.condition-box legend {
  max-width: 100%;
  padding: 0 4px;
  color: #31424b;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.16;
  overflow-wrap: anywhere;
}

.condition-box.is-active legend {
  color: #075d55;
}

.condition-box.is-active legend::after {
  content: "指定中";
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  vertical-align: 1px;
}

.condition-box:has(.dual-range) legend {
  padding: 0 3px;
}

.condition-box legend span {
  color: var(--muted);
  font-weight: 600;
}

.condition-box input[type="number"],
.condition-box input[type="text"],
.condition-box input[type="search"] {
  width: 100%;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 7px;
}

.condition-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
}

.condition-range span {
  color: var(--muted);
  font-size: 12px;
}

.dual-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 6px;
  row-gap: 0;
  margin-top: -2px;
}

.range-field {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.condition-box .range-field input {
  min-height: 28px;
  padding-top: 3px;
  padding-bottom: 3px;
  padding-right: 30px;
}

.range-suffix {
  position: absolute;
  right: 8px;
  bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.range-slider {
  grid-column: 1 / -1;
  position: relative;
  z-index: 2;
  height: 18px;
  margin-bottom: -5px;
  cursor: pointer;
  overflow: visible;
  --from: 0%;
  --to: 100%;
}

.range-slider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 7px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #dbe3ef 0, #dbe3ef var(--from), var(--accent-2) var(--from), var(--accent-2) var(--to), #dbe3ef var(--to), #dbe3ef 100%);
}

.range-slider input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  pointer-events: none;
}

.range-slider input[type="range"]::-webkit-slider-runnable-track {
  border: 0;
  background: transparent;
}

.range-slider input[type="range"]::-moz-range-track {
  border: 0;
  background: transparent;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-2);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(23, 33, 38, .24);
  pointer-events: none;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-2);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(23, 33, 38, .24);
  pointer-events: none;
}

.condition-box summary {
  min-height: 30px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
}

.condition-box.is-active summary {
  color: #075d55;
  font-weight: 800;
}

.condition-options {
  display: grid;
  gap: 4px;
  max-height: 220px;
  overflow: auto;
  padding-right: 2px;
}

.condition-check {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  color: #31424b;
  font-size: 12px;
  line-height: 1.35;
}

.condition-check span {
  overflow-wrap: anywhere;
}

.condition-check.is-selected {
  border-radius: 5px;
  background: #eef7f5;
  color: #0f5f59;
}

.result-list {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  display: grid;
  gap: 10px;
  padding: 12px 14px;
}

.condition-compact {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #f7fafb 0%, #eef7f6 100%);
  color: #22343c;
  cursor: pointer;
  text-align: left;
}

.condition-compact[hidden] {
  display: none;
}

.condition-compact:hover {
  background: #e8f5f2;
}

.condition-compact-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 1px solid #9bb5bd;
  border-radius: 5px;
  background: #fff;
}

.condition-compact-icon::before,
.condition-compact-icon::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}

.condition-compact-icon::before {
  top: 5px;
  box-shadow: 4px 4px 0 var(--accent);
}

.condition-compact-icon::after {
  bottom: 5px;
  width: 6px;
}

.condition-compact-text {
  min-width: 0;
  overflow: hidden;
  color: #263942;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.condition-compact-caret {
  position: relative;
  width: 18px;
  height: 18px;
  border: 1px solid #c8d6db;
  border-radius: 999px;
  background: #fff;
}

.condition-compact-caret::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
}

.search-modal.is-results-scrolled:not(.is-condition-expanded) .condition-panel {
  display: none;
}

.result-graph {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid #dce5e9;
  border-radius: 8px;
  background: #f7fafb;
}

.result-graph-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.result-graph-head strong {
  color: var(--text);
  font-size: 13px;
}

.graph-bars {
  display: grid;
  gap: 5px;
}

.graph-row {
  display: grid;
  grid-template-columns: minmax(140px, 260px) minmax(0, 1fr) 70px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.graph-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.graph-track,
.metric-bar {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5edf0;
}

.graph-track span,
.metric-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.result-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}

.result-item {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.result-selectable {
  cursor: pointer;
}

.result-selectable:focus-visible {
  outline: 2px solid rgba(15, 118, 110, .42);
  outline-offset: 2px;
}

.result-cards .result-item:nth-child(even) {
  border-color: #cfdbea;
  background: linear-gradient(180deg, #fbfdff 0%, #f6faff 100%);
}

.result-cards .result-item:hover {
  border-color: #bfd2eb;
  background: #f4f9ff;
  box-shadow: 0 2px 8px rgba(31, 95, 209, .07);
}

.result-media {
  display: grid;
  gap: 6px;
  align-content: start;
  min-width: 0;
}

.result-image {
  width: 86px;
  height: 86px;
  border: 1px solid #e5eaf1;
  border-radius: 6px;
  background: #fff;
}

.result-image .no-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 5px;
  background: #f1f4f8;
}

.result-body {
  min-width: 0;
}

.result-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.product-title-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.product-detail-link,
.product-title,
.table-product-title {
  color: var(--text);
  text-decoration: none;
}

.product-detail-link:hover,
.product-title:hover,
.table-product-title:hover {
  color: #0f766e;
  text-decoration: underline;
}

.result-selectable .product-title:hover,
.result-selectable .table-product-title:hover,
.result-selectable .offer-price-link:hover {
  color: inherit;
  text-decoration: none;
}

.detail-cta {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 1px 5px;
  border: 1px solid #d7e2e7;
  border-radius: 5px;
  background: #fff;
  color: #526174;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-decoration: none;
  white-space: nowrap;
}

.detail-cta:hover {
  border-color: #9ec0e8;
  color: #315b8c;
  background: #f2f7ff;
}

.result-body h3 {
  min-width: 0;
  margin: 0;
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.select-pill {
  flex: 0 0 auto;
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #fff;
  color: #315b8c;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.select-pill:hover {
  border-color: #9ec0e8;
  background: #f2f7ff;
}

.result-price {
  margin-top: 4px;
}

.price-cell-content {
  display: grid;
  gap: 3px;
  align-content: start;
}

.price,
.price-link,
.offer-price-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.price {
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.price-link,
.offer-price-link {
  text-decoration: none;
}

.price-link:hover,
.offer-price-link:hover {
  text-decoration: underline;
}

.price-amount,
.offer-price-link strong {
  white-space: nowrap;
}

.offer-price-link {
  color: var(--text);
  font-size: 12px;
}

.offer-price-link strong {
  color: var(--accent);
}

.shop-icon {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  border-radius: 4px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .08);
}

.price-shop-line .shop-icon {
  width: 15px;
  height: 15px;
}

.offer-delivery-badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
}

.offer-delivery-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 1px 5px;
  border: 1px solid #dbe7f3;
  border-radius: 999px;
  background: #f8fbff;
  color: #526174;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  white-space: nowrap;
}

.offer-delivery-badge.prime {
  border-color: #b8d8f1;
  background: #edf7ff;
  color: #1468a8;
}

.offer-delivery-badge.shipping-free {
  border-color: #bde7cf;
  background: #effaf3;
  color: #197447;
}

.offer-delivery-badge.shipping-paid {
  border-color: #ead8b5;
  background: #fff8e9;
  color: #7c5512;
}

.external-icon {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  background: currentColor;
  opacity: .75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3E%3Cpath%20d='M27%2012h9v9M32%2026v8H14V16h8M24%2024l11-11'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2048%2048'%3E%3Cg%20fill='none'%20stroke='black'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='2'%3E%3Cpath%20d='M27%2012h9v9M32%2026v8H14V16h8M24%2024l11-11'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.offer-details {
  min-width: 150px;
  margin-top: 3px;
}

.offer-details summary {
  cursor: pointer;
  color: #315b8c;
  font-size: 12px;
  list-style: none;
}

.offer-details summary::-webkit-details-marker {
  display: none;
}

.offer-details summary::after {
  content: " v";
  color: var(--muted);
  font-size: 10px;
}

.offer-details[open] summary::after {
  content: " ^";
}

.table-offers {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.offer-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding-top: 3px;
  border-top: 1px solid #edf1f6;
  font-size: 12px;
}

.more-offers-note {
  color: var(--muted);
  font-size: 11px;
  padding-top: 2px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.result-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 8px 9px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  vertical-align: top;
}

.result-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #526174;
  font-size: 12px;
}

.result-table tbody tr:nth-child(even) {
  background: #f8fbfc;
}

.result-table tbody tr:hover {
  background: #eef7f6;
}

.result-table tbody tr.result-selectable:focus-visible {
  outline-offset: -2px;
}

.table-product-main {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  min-width: 240px;
  align-items: center;
}

.table-product-image {
  width: 46px;
  height: 46px;
  border-radius: 6px;
}

.table-product-title {
  color: var(--text);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.table-product-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.table-price-cell strong {
  white-space: nowrap;
}

.table-metric-cell {
  min-width: 110px;
}

.metric-value {
  display: block;
  color: #24333a;
  font-weight: 700;
}

.metric-bar {
  margin-top: 6px;
}

.table-action-cell {
  width: 76px;
  text-align: center;
}

.modal-foot {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  text-align: center;
}

.examples-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.examples-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 0 18px;
  border-bottom: 1px solid var(--line);
}

.examples-kicker {
  margin: 0 0 3px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.examples-hero h2 {
  margin: 0;
  color: #13272f;
  font-size: 28px;
  line-height: 1.1;
}

.examples-hero p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.examples-create-link {
  flex: 0 0 auto;
  min-width: 132px;
  text-decoration: none;
}

.examples-toolbar {
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.examples-search-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 170px 150px max-content;
  gap: 9px;
  align-items: end;
}

.examples-search-row label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.examples-search-row label span {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.examples-search-row input,
.examples-search-row select {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cfdbe5;
  border-radius: 7px;
  background: #fff;
  color: var(--text);
  padding: 6px 9px;
}

.examples-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.examples-tags button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  border: 1px solid #d7e1e8;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 850;
}

.examples-tags button b {
  color: #6b7a84;
  font-size: 10px;
}

.examples-tags button.is-active {
  border-color: #7bb8ad;
  background: #e7f5f2;
  color: #075e56;
}

.examples-range-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.examples-range {
  --range-left: 0%;
  --range-right: 0%;
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid #dde8ed;
  border-radius: 7px;
  background: #fbfdfd;
  padding: 7px 8px 6px;
}

.examples-range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.examples-range-head span {
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.examples-range-head output {
  overflow: hidden;
  color: #0f766e;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.examples-dual-range {
  position: relative;
  height: 18px;
  border-radius: 999px;
}

.examples-dual-range::before,
.examples-dual-range::after {
  content: "";
  position: absolute;
  top: 8px;
  height: 4px;
  border-radius: 999px;
}

.examples-dual-range::before {
  left: 0;
  right: 0;
  background: #dce8ed;
}

.examples-dual-range::after {
  left: var(--range-left);
  right: var(--range-right);
  background: rgba(15, 118, 110, .35);
}

.examples-dual-range input[type="range"] {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 18px;
  margin: 0;
  background: transparent;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.examples-dual-range input[type="range"]::-webkit-slider-runnable-track {
  height: 18px;
  background: transparent;
}

.examples-dual-range input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  border: 2px solid #0f766e;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
  cursor: pointer;
  pointer-events: auto;
  -webkit-appearance: none;
}

.examples-dual-range input[type="range"]::-moz-range-track {
  height: 18px;
  background: transparent;
}

.examples-dual-range input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid #0f766e;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 23, 42, .18);
  cursor: pointer;
  pointer-events: auto;
}

.examples-range-marks {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  color: #71808a;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.1;
  text-align: center;
}

.examples-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
}

.examples-result-head p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.examples-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(318px, 1fr));
  gap: 12px;
  margin-top: 10px;
}

.example-card {
  display: grid;
  overflow: hidden;
  border: 1px solid #d9e2e8;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
}

.example-card-main {
  display: grid;
  gap: 10px;
  padding: 13px;
  color: inherit;
  text-decoration: none;
}

.example-card-main:hover h3,
.example-card-main:focus-visible h3 {
  color: #0f766e;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.example-card-title {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 8px;
  align-items: start;
}

.example-card-title h3 {
  margin: 0;
  color: #12242d;
  font-size: 16px;
  line-height: 1.35;
}

.example-ok,
.example-warning,
.example-popular {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.example-ok {
  background: #e8f7ee;
  color: #166534;
}

.example-warning {
  background: #fffdf2;
  color: #6f5a18;
}

.example-card-badges {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.example-popular {
  background: #eef7f8;
  color: #0f766e;
}

.example-summary {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.4;
}

.example-metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

.example-metrics span {
  display: grid;
  gap: 1px;
  min-width: 0;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  background: #f8fafb;
  padding: 5px 7px;
}

.example-metrics b {
  color: #71808a;
  font-size: 10px;
  font-weight: 900;
}

.example-metrics strong {
  overflow: hidden;
  color: #172126;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-metrics .example-price-metric {
  border-color: rgba(15, 118, 110, .28);
  background: #eefaf8;
}

.example-metrics .example-price-metric b {
  color: #0f766e;
}

.example-metrics .example-price-metric strong {
  color: #0b6b61;
  font-size: 15px;
}

.example-performance-graph {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  border: 1px solid #e1e8ed;
  border-radius: 7px;
  background: linear-gradient(180deg, #fbfdfd, #f6fbfa);
}

.example-performance-row {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.example-performance-row b,
.example-performance-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-performance-row b {
  color: #647482;
  font-size: 10px;
  font-weight: 900;
}

.example-performance-row i {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe9ee;
}

.example-performance-row em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #38b2ac);
}

.example-performance-row strong {
  color: #172126;
  font-size: 11px;
  font-weight: 900;
}

.example-part-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.example-part {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 6px;
  align-items: center;
  min-width: 0;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  background: #fbfcfd;
  padding: 5px;
}

.example-part img,
.example-no-image {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 5px;
  object-fit: contain;
  background: #eef3f6;
}

.example-part b {
  overflow: hidden;
  color: #647482;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-part em {
  overflow: hidden;
  color: #1f2d36;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.example-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 13px;
  border-top: 1px solid #e1e8ed;
  background: #f8fbfa;
}

.example-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.example-tag-list span {
  display: inline-flex;
  min-height: 20px;
  border: 1px solid #d7e4df;
  border-radius: 999px;
  background: #fff;
  color: #49605d;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 850;
}

.example-open-link {
  flex: 0 0 auto;
  color: #0f766e;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.example-open-link:hover,
.example-open-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.examples-empty {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 180px;
  border: 1px dashed #ccd8de;
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  padding: 44px 16px;
  text-align: center;
}

.examples-empty strong {
  color: #26333b;
}

.examples-more {
  display: flex;
  justify-content: center;
  padding: 18px 0 0;
}

@media (max-width: 1180px) {
  .workspace {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .build-overview,
  .has-shared-parts .build-overview {
    min-height: 152px;
  }

  .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .check-panel {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .check-panel section:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .topbar {
    position: static;
  }

  .examples-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .examples-create-link {
    width: 100%;
  }

  .examples-search-row {
    grid-template-columns: 1fr;
  }

  .examples-list {
    grid-template-columns: 1fr;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .build-overview,
  .has-shared-parts .build-overview {
    min-height: 178px;
  }

  .mobile-top-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(104px, .36fr);
    align-items: stretch;
    gap: 8px;
  }

  .mobile-settings-toggle {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 12px;
    min-height: 58px;
    width: 100%;
    border: 1px solid rgba(15, 118, 110, .42);
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(15, 118, 110, .12), rgba(37, 99, 235, .08)),
      #ffffff;
    color: #102a32;
    padding: 10px 13px;
    text-align: left;
    box-shadow: 0 8px 20px rgba(23, 33, 38, .08);
  }

  .mobile-save-build-button {
    display: grid;
    place-items: center;
    min-height: 58px;
    border: 1px solid rgba(15, 118, 110, .5);
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    padding: 8px 9px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-align: center;
    box-shadow: 0 8px 20px rgba(23, 33, 38, .08);
  }

  .mobile-save-build-button:hover,
  .mobile-save-build-button:focus-visible {
    background: #0b6861;
  }

  .mobile-settings-toggle span {
    color: #0f766e;
    font-size: 12px;
    font-weight: 950;
    line-height: 1.1;
  }

  .mobile-settings-toggle strong {
    grid-column: 1;
    color: #172126;
    font-size: 15px;
    line-height: 1.2;
  }

  .mobile-settings-toggle::after {
    content: "";
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 12px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    justify-self: center;
    transition: transform .16s ease;
  }

  .mobile-settings-toggle[aria-expanded="true"]::after {
    transform: rotate(225deg);
  }

  .mobile-auto-build-status {
    display: block;
    min-height: 0;
    margin: -2px 0 0;
    padding: 10px 12px;
    border-color: #82cfc4;
    border-left-width: 6px;
    border-radius: 9px;
    background: linear-gradient(135deg, #e0faf5 0%, #f6fffc 100%);
    color: #0e3d37;
    box-shadow: 0 10px 24px rgba(15, 118, 110, .15);
  }

  .mobile-auto-build-status:empty {
    display: none;
  }

  .left-tools-column,
  .settings-panel,
  .check-panel {
    position: static;
  }

  .settings-panel:not(.is-open) {
    display: none;
  }

  .settings-panel.is-open {
    border-color: rgba(15, 118, 110, .42);
    box-shadow: 0 8px 22px rgba(23, 33, 38, .08);
  }

  .ai-tools-panel .ai-shared-result {
    margin-top: 8px;
  }

  .saved-builds-panel.is-empty {
    display: none;
  }

  .saved-builds-panel .saved-build-action-row {
    display: none;
  }

  .parts-grid,
  .check-panel {
    grid-template-columns: 1fr;
  }

  .parts-table-wrap::before {
    display: block;
  }

  .build-overview-head {
    grid-template-columns: minmax(104px, .9fr) minmax(126px, 1.1fr);
    align-items: stretch;
    gap: 7px;
  }

  .overview-total {
    min-width: 0;
    min-height: 62px;
    align-content: center;
  }

  .overview-price-history {
    min-height: 62px;
    padding: 5px 7px;
  }

  .price-history-svg {
    height: 30px;
  }

  .price-history-empty {
    min-height: 30px;
  }

  .overview-text {
    grid-column: 1 / -1;
  }

  .overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .overview-metric {
    padding: 5px;
  }

  .overview-metric-top {
    gap: 4px;
    font-size: 10px;
  }

  .overview-metric-top b {
    font-size: 11px;
  }

  .overview-meter {
    height: 6px;
    margin-top: 4px;
  }

  .modal-tools {
    grid-template-columns: minmax(112px, 1fr) minmax(82px, 100px) auto auto;
    gap: 5px;
    padding: 8px 10px;
  }

  .modal-tools input,
  .modal-tools select {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 12px;
  }

  .modal-tools .primary-button {
    min-height: 32px;
    padding: 5px 8px;
    font-size: 12px;
  }

  .modal-tools .view-toggle {
    min-height: 32px;
  }

  .modal-tools .view-button {
    width: 28px;
    min-height: 24px;
  }

  .search-modal {
    width: calc(100vw - 10px);
    max-width: calc(100vw - 10px);
    height: calc(100dvh - 10px);
    max-height: calc(100dvh - 10px);
    border-radius: 7px;
  }

  .modal-shell {
    max-height: calc(100dvh - 10px);
  }

  .modal-head,
  .modal-tools,
  .modal-foot,
  .category-picker {
    padding: 8px 10px;
  }

  .modal-head {
    gap: 8px;
  }

  .modal-head h2 {
    font-size: 16px;
  }

  .modal-head p {
    display: -webkit-box;
    max-height: 32px;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .dependency-panel {
    max-height: 92px;
    overflow: auto;
    padding: 6px 10px;
    overscroll-behavior: contain;
  }

  .dependency-group {
    gap: 4px;
  }

  .dependency-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 5px;
  }

  .dependency-button {
    max-width: 100%;
    min-height: 31px;
    padding: 4px 7px;
  }

  .condition-compact {
    min-height: 38px;
    padding: 7px 10px;
  }

  .condition-panel {
    grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
    gap: 6px;
    max-height: min(44vh, 360px);
    max-height: min(44dvh, 360px);
    padding: 8px 10px;
    overscroll-behavior: contain;
  }

  .condition-box {
    padding: 6px;
  }

  .condition-box:has(.dual-range),
  .condition-box:has(input[data-text-key]) {
    grid-column: 1 / -1;
  }

  .condition-box legend {
    font-size: 11px;
  }

  .condition-box summary {
    min-height: 26px;
  }

  .condition-options {
    max-height: 150px;
  }

  .condition-check {
    gap: 5px;
    font-size: 11px;
  }

  .result-list {
    padding: 9px 10px;
  }

  .graph-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .graph-name {
    white-space: normal;
  }

  .result-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
  }

  .parts-table {
    display: block;
    min-width: 0;
    border-collapse: separate;
  }

  .result-table thead,
  .parts-table thead {
    display: none;
  }

  .result-table tbody,
  .parts-table tbody {
    display: grid;
    gap: 8px;
  }

  .result-table tr,
  .parts-table tr {
    display: grid;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
  }

  .parts-table .parts-row {
    grid-template-columns: 34px minmax(84px, .82fr) minmax(118px, 1.18fr);
    align-items: stretch;
  }

  .parts-table .parts-gap-row {
    display: block;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .result-table td,
  .parts-table td {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 1px solid #edf1f6;
  }

  .parts-table td {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .result-table td::before,
  .parts-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  .parts-table .parts-gap-row td {
    display: block;
    height: 6px;
    padding: 0;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    background: var(--surface);
  }

  .parts-table .parts-gap-row td::before {
    display: none;
  }

  .parts-table .parts-maintenance-row {
    display: block;
    border: 0;
    border-radius: 0;
    overflow: visible;
    background: transparent;
  }

  .parts-table .parts-maintenance-row td {
    display: block;
    padding: 0;
    border: 0;
  }

  .parts-table .parts-maintenance-row td::before {
    display: none;
  }

  .parts-table td.parts-role-cell {
    display: block;
    grid-column: 1 / -1;
    min-height: 40px;
    padding: 5px 7px;
  }

  .parts-table td.parts-role-cell::before {
    display: none;
  }

  .parts-table .part-role-button {
    position: relative;
    inset: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 34px;
    padding: 5px 8px;
  }

  .parts-table .part-role-capacity-badge {
    top: -5px;
    right: -7px;
    min-height: 15px;
    padding: 1px 4px;
    font-size: 9px;
  }

  .parts-table .part-role-label {
    display: flex;
    flex: 0 1 auto;
    gap: 5px;
    justify-content: center;
    width: auto;
    min-height: 0;
  }

  .parts-table .part-role-category-icon {
    position: static;
    width: 22px;
    height: 22px;
    transform: none;
  }

  .parts-table .part-role-search-icon {
    flex: 0 0 auto;
    justify-self: auto;
    width: 14px;
    height: 14px;
    margin-left: 1px;
  }

  .parts-table .part-role-label-text {
    display: inline;
  }

  .parts-table .part-role-note {
    text-align: center;
  }

  .result-table td:last-child,
  .parts-table td:last-child {
    border-bottom: 0;
  }

  .table-product-cell,
  .parts-product-cell {
    display: block !important;
    min-width: 0;
  }

  .parts-product-cell {
    position: relative;
    grid-column: 2 / 4;
    padding-right: 40px;
    padding-bottom: 4px;
  }

  .table-product-cell::before,
  .table-action-cell::before,
  .parts-product-cell::before,
  .parts-action-cell::before {
    display: none;
  }

  .table-product-main {
    min-width: 0;
  }

  .table-action-cell {
    width: auto;
  }

  .parts-role-cell,
  .parts-active-cell,
  .parts-price-cell,
  .parts-spec-cell,
  .parts-action-cell {
    width: auto;
    min-width: 0;
  }

  .parts-active-cell {
    display: flex !important;
    grid-column: 1;
    align-items: center;
    justify-content: center;
    padding: 6px 1px 6px 4px;
  }

  .parts-active-cell::before {
    display: none;
  }

  .parts-active-cell .active-radio {
    width: 22px;
    height: 22px;
  }

  .parts-active-cell .active-part-control {
    min-width: 28px;
  }

  .parts-active-cell .part-quantity-select {
    width: 28px;
    height: 20px;
    min-height: 20px;
    font-size: 10px;
  }

  .parts-spec-cell {
    display: block !important;
    grid-column: 3;
    align-self: stretch;
    padding-top: 2px;
    padding-left: 0;
    padding-right: 7px;
  }

  .parts-price-cell {
    display: block !important;
    grid-column: 1 / 3;
    align-self: stretch;
    padding-right: 4px;
    padding-left: 10px;
    padding-top: 2px;
    padding-bottom: 6px;
  }

  .parts-price-cell::before,
  .parts-spec-cell::before {
    display: none;
  }

  .parts-price-cell .price-cell-content {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 5px;
    row-gap: 4px;
    align-items: center;
    justify-content: start;
  }

  .parts-price-cell .price-shop-line {
    min-width: 0;
  }

  .parts-price-cell .offer-details {
    min-width: 0;
    margin-top: 0;
    justify-self: end;
  }

  .parts-price-cell .offer-details summary {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 2px 7px;
    border: 1px solid #dce6ef;
    border-radius: 999px;
    background: #f8fbff;
    line-height: 1;
  }

  .parts-price-cell .offer-details[open] {
    grid-column: 1 / -1;
  }

  .parts-price-cell .offer-details .table-offers {
    min-width: 168px;
  }

  .parts-price-cell .table-offers {
    margin-top: 3px;
  }

  .parts-product-cell .mobile-remove-button {
    display: flex;
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 0 8px 0 8px;
    background: #f8fafc;
    color: transparent;
    font-size: 0;
    line-height: 0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
  }

  .parts-product-cell .mobile-remove-button::before {
    content: "×";
    display: block;
    color: #64748b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    transform: translateY(-1px);
  }

  .parts-action-cell {
    display: none !important;
  }

  .parts-spec-cell > .parts-spec-list {
    display: none;
  }

  .parts-spec-cell .mobile-spec-details {
    display: block;
  }

  .parts-spec-cell .mobile-spec-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 28px;
    padding: 5px 7px;
    border: 1px solid #dce2eb;
    border-radius: 6px;
    background: #fbfcfe;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    list-style: none;
    cursor: pointer;
  }

  .parts-spec-cell .mobile-spec-details summary span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .parts-spec-cell .mobile-spec-details summary::-webkit-details-marker {
    display: none;
  }

  .parts-spec-cell .mobile-spec-details summary::after {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-right: 2px solid #64748b;
    border-bottom: 2px solid #64748b;
    transform: rotate(45deg) translateY(-2px);
  }

  .parts-spec-cell .mobile-spec-details[open] summary::after {
    transform: rotate(225deg) translate(-1px, -1px);
  }

  .parts-spec-cell .mobile-spec-details .parts-spec-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4px;
    margin-top: 5px;
    min-width: 0;
  }

  .parts-spec-cell .spec-pair {
    display: grid;
    grid-template-columns: minmax(104px, 38%) minmax(0, 1fr);
    width: 100%;
    box-sizing: border-box;
    gap: 5px;
    align-items: center;
    padding: 4px 6px;
    font-size: 11px;
    line-height: 1.35;
  }

  .parts-spec-cell .spec-pair b {
    min-width: 0;
    color: #334155;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .parts-spec-cell .spec-pair b::after {
    display: none;
  }

  .parts-spec-cell .spec-value {
    min-width: 0;
    justify-content: flex-start;
    word-break: keep-all;
    overflow-wrap: break-word;
  }

  .parts-spec-cell .spec-pair.is-cost-performance {
    display: none;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 13px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-brand {
    justify-content: space-between;
    width: 100%;
  }

  .topbar-title-line {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .latest-changes {
    gap: 5px;
  }

  .latest-change {
    grid-template-columns: 1fr;
    gap: 1px;
    max-width: 100%;
  }

  .category-search-footer {
    margin: 0 10px 16px;
    padding-top: 16px;
  }

  .category-footer-placeholder {
    align-items: flex-start;
    flex-direction: column;
  }

  .category-footer-placeholder-links,
  .category-related-links {
    justify-content: flex-start;
  }

  .category-search-footer .category-family-grid {
    grid-template-columns: 1fr;
  }

  .site-footer {
    padding: 0 10px 18px;
  }

  .site-footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-nav {
    justify-content: flex-start;
  }

  .site-logo-link {
    width: 118px;
    max-width: 38vw;
  }

  .share-box {
    align-self: flex-end;
  }

  .examples-shell {
    width: min(100% - 18px, 1180px);
    padding-top: 14px;
  }

  .examples-hero h2 {
    font-size: 24px;
  }

  .examples-toolbar {
    padding: 10px;
  }

  .example-performance-graph,
  .example-part-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .examples-range-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .example-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented,
  .segmented-wrap {
    grid-template-columns: 1fr;
  }

  .compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px;
  }

  .compact-grid h2 {
    grid-column: 1 / -1;
  }

  .mini-field {
    gap: 4px;
    font-size: 11px;
  }

  .mini-field input,
  .mini-field select {
    min-height: 32px;
    padding: 5px 4px;
    font-size: 12px;
  }

  .settings-panel .auto-build-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-panel .segmented {
    grid-template-columns: repeat(auto-fit, minmax(54px, 1fr));
    gap: 4px;
  }

  .settings-panel .segmented-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-panel .gpu-maker-segmented,
  .settings-panel .size-segmented {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .settings-panel .segmented span {
    min-height: 28px;
    padding: 4px 3px;
    font-size: 11px;
  }

  .section-head,
  .part-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-head {
    align-items: center;
    flex-direction: row;
  }

  .result-cards {
    grid-template-columns: 1fr;
  }

  .result-item {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .result-image {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 360px) {
  .parts-table .parts-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .build-overview-head {
    grid-template-columns: 1fr;
  }

  .parts-product-cell,
  .parts-price-cell,
  .parts-spec-cell {
    grid-column: 2;
  }

  .overview-text,
  .overview-total,
  .overview-price-history {
    grid-column: 1;
  }

  .result-item {
    grid-template-columns: 66px minmax(0, 1fr);
  }

  .result-image {
    width: 66px;
    height: 66px;
  }
}
