body {
  --bg: #fcfcfa;
  --panel: #fcfcfa;
  --ink: #343627;
  --line: #d8dcd2;
  --accent: #393d20;
  --green: #393d20;
  --muted: #626657;
  --frame-wash: #f0f2ea;
  --frame-selected: #e5e9dc;
  --frame-line-strong: #a2a68f;
  --frame-shadow: #34362712;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body > header,
.platform-toolbar,
.library,
.inspector,
.extra-inspector,
.object-inspector,
.floating-panel-header,
.floating-panel-footer {
  background: var(--panel);
  border-color: var(--line);
}

body > header,
.platform-toolbar,
.library,
.inspector,
.extra-inspector,
.object-inspector {
  border-radius: 0;
  box-shadow: none;
}

:is(.library, .inspector, .extra-inspector, .object-inspector, dialog) :is(h2, h3) {
  color: var(--ink);
  font-weight: 600;
}

body > header .project-name input {
  color: var(--ink);
}

body > header nav button:not(.primary),
.platform-toolbar button,
.module-card,
.unit-style-card,
.width-choice,
.account-provider,
:is(.library, .inspector, .extra-inspector, .object-inspector, dialog) :is(input, select, textarea) {
  border-color: var(--line);
}

.view-header > .view-switch {
  margin-inline-start: auto;
}

.linear-reorder-overlay {
  position: absolute;
  z-index: 7;
  inset: 0;
  pointer-events: none;
}

.linear-reorder-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.linear-reorder-track,
.linear-reorder-limits,
.linear-reorder-guide-line,
.linear-reorder-guide-icon {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.linear-reorder-track {
  stroke: #526454;
  stroke-width: 1.25;
  stroke-dasharray: 3 4;
}

.linear-reorder-limits {
  stroke: #445245;
  stroke-width: 2.4;
  filter: drop-shadow(0 0 1px white);
}

.linear-reorder-guide {color: #456652}
.linear-reorder-guide[data-hidden="true"] {display: none}
.linear-reorder-guide-line {
  stroke: currentColor;
  stroke-width: 1.25;
  opacity: .7;
  filter: drop-shadow(0 0 1px white);
}
.linear-reorder-guide-ring {
  fill: white;
  stroke: currentColor;
  stroke-width: 1.35;
  filter: drop-shadow(0 1px 2px #253c3440);
}
.linear-reorder-guide-icon {
  stroke: currentColor;
  stroke-width: 1.5;
}
.linear-reorder-guide[data-state="origin"] .linear-reorder-guide-line {stroke-dasharray: 2 3}
.linear-reorder-guide[data-state="origin"] .linear-reorder-guide-ring {fill: currentColor; stroke: white}

.linear-reorder-guide[data-state="active"] {color: #087f4f}
.linear-reorder-guide[data-state="active"] .linear-reorder-guide-line {
  opacity: 1;
  stroke-width: 3;
  filter: drop-shadow(0 0 1px white) drop-shadow(0 0 3px #087f4f66);
}
.linear-reorder-guide[data-state="active"] .linear-reorder-guide-ring {fill: currentColor; stroke: white}
.linear-reorder-guide[data-state="active"] .linear-reorder-guide-icon {
  stroke: white;
  stroke-width: 2;
}

.linear-reorder-guide[data-state="blocked"],
.linear-reorder-overlay[data-feedback="blocked"] .linear-reorder-hint {color: #843e35}
.linear-reorder-guide[data-state="blocked"] .linear-reorder-guide-line {stroke-dasharray: 2 3}
.linear-reorder-overlay[data-feedback="limit"] .linear-reorder-limits {stroke: #843e35; stroke-width: 3.5}
.linear-reorder-overlay[data-feedback="limit"] .linear-reorder-hint {color: #843e35}

[data-linear-reorder] canvas {
  cursor: grabbing;
}

#viewer canvas[aria-keyshortcuts]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -3px;
}

.linear-reorder-hint {
  position: absolute;
  left: 50%;
  bottom: 12px;
  width: max-content;
  max-width: calc(100% - 40px);
  transform: translateX(-50%);
  padding: 5px 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
}

.linear-reorder-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

:is(body > header, .platform-toolbar, .view-switch, .view-tools, .toolbar-dimensions, .library, .inspector, .extra-inspector, .object-inspector, .module-context, .popover, dialog) :is(button, input, select, textarea),
#elevation-switch button,
.account-provider {
  border-radius: 0;
}

:is(body > header nav, .platform-toolbar, .library, .inspector, .extra-inspector, .object-inspector, .module-context, .popover, dialog) button:not(.primary, .active, .selected, [aria-pressed="true"], [aria-selected="true"]),
.module-card,
.unit-style-card,
.width-choice {
  background-color: var(--panel);
}

.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
}

body > header nav .primary:hover,
.primary:hover {
  background: var(--ink);
  border-color: var(--ink);
}

.tabs,
.quote-total,
.spec-card,
.tip,
.handleless-controls input:disabled {
  background: var(--frame-wash);
  color: var(--ink);
}

.quote-total,
.spec-card,
.tip {
  border-radius: 0;
}

.view-switch button.active,
.view-tools button[aria-pressed="true"],
#elevation-switch button.active,
.tabs button[aria-selected="true"],
.cabinet-category-tabs button.active,
.width-choice.selected,
.width-choice[aria-pressed="true"],
.pipe-choices button[aria-pressed="true"],
.button-options button[aria-pressed="true"],
.handleless-controls [aria-pressed="true"],
.countertop-config button[aria-pressed="true"],
.upper-wing-menu button.selected,
.platform-toolbar button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--panel);
}

.unit-style-card.selected,
.unit-style-card[aria-pressed="true"] {
  background: var(--frame-selected);
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
  color: var(--ink);
}

.popover,
.module-context,
dialog,
#export-dialog,
#fittings-dialog {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 0;
  box-shadow: 0 8px 24px var(--frame-shadow);
  color: var(--ink);
}

dialog::backdrop,
#plan-actions-dialog::backdrop {
  background: #34362726;
}

#plan-actions-dialog {
  width: min(264px, calc(100vw - 16px));
  padding: 0;
  border: 1px solid var(--line);
}

#plan-actions-dialog[open] {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

#plan-actions-dialog > button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 68px;
  padding: 7px 3px;
  border: 0;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
  font-size: 12px;
  line-height: 1.2;
}

#plan-actions-dialog > button:not(:nth-child(3n + 1)) {
  border-inline-start: 1px solid var(--line);
}

#plan-actions-dialog > button:nth-child(n + 4) {
  border-block-start: 1px solid var(--line);
}

#plan-actions-dialog > button svg {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
}

#plan-actions-dialog > button:disabled {
  opacity: .55;
}

#plan-actions-dialog > button:focus-visible {
  outline-offset: -3px;
}

@media (hover: hover) {
  #plan-actions-dialog > button:not(:disabled):hover {
    background: var(--frame-wash);
  }
}

#export-dialog .export-option {
  background: var(--frame-wash);
  border-color: var(--line);
  border-radius: 0;
}

#export-dialog .export-option:active {
  background: var(--frame-selected);
}

.export-info {
  border-color: var(--line);
}

.export-info summary,
#export-dialog :is(.export-format, .export-info p),
.side-panel-thickness legend,
.countertop-appliance-settings > .small-note {
  color: var(--muted);
}

#export-status {
  color: var(--ink);
}

.startup-spinner {
  border-color: var(--line);
  border-top-color: var(--accent);
}

:is(body > header, .platform-toolbar, .view-switch, .view-tools, .toolbar-dimensions, .library, .inspector, .extra-inspector, .object-inspector, .module-context, .popover, dialog) :is(button, input, select, textarea, a, summary):focus-visible,
#elevation-switch button:focus-visible,
#export-dialog .export-option:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (hover: hover) {
  :is(body > header nav, .platform-toolbar, .library, .inspector, .extra-inspector, .object-inspector, .module-context, .popover, dialog) button:not(:disabled, .primary, .active, .selected, [aria-pressed="true"], [aria-selected="true"]):hover,
  .width-choice:hover:not(:disabled):not(.selected),
  #export-dialog .export-option:hover {
    background: var(--frame-wash);
    border-color: var(--frame-line-strong);
  }

  #export-dialog .export-option:hover {
    background: var(--frame-selected);
  }
}
