.hexdisplay-wall-planner-host {
  color-scheme: light;
  --ink: #1f292d;
  --muted: #647178;
  --line: #cfd6da;
  --panel: #ffffff;
  --canvas: #f5f7f8;
  --accent: #2274a5;
  --accent-strong: #14516f;
  --support: #ff6b35;
  --soft: #eef3f5;
  --shadow: 0 1px 2px rgba(23, 35, 40, 0.08);
  --chrome-dark: #3e454d;
  --chrome-mid: #8f98a1;
  --chrome-light: #f5f8fb;
  --chrome-blue: #d9eefc;
  display: block;
  width: 100%;
  max-width: 1400px;
  margin: 24px auto;
}

.hexdisplay-wall-planner-host * {
  box-sizing: border-box;
}

.hexdisplay-wall-planner-host {
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.hexdisplay-wall-planner-host button,
.hexdisplay-wall-planner-host input,
.hexdisplay-wall-planner-host select {
  font: inherit;
}

.hexdisplay-wall-planner-host button,
.hexdisplay-wall-planner-host select,
.hexdisplay-wall-planner-host input {
  border: 1px solid #c8d2d7;
  border-radius: 6px;
}

.hexdisplay-wall-planner-host button {
  min-height: 36px;
  padding: 0 11px;
  color: var(--ink);
  background: linear-gradient(#ffffff, #f8fafb);
  cursor: pointer;
  font-weight: 600;
  box-shadow: var(--shadow);
}

.hexdisplay-wall-planner-host button:hover,
.hexdisplay-wall-planner-host button.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.hexdisplay-wall-planner-host button.is-active {
  background: #e9f4f8;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.hexdisplay-wall-planner-host button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.hexdisplay-wall-planner-host input,
.hexdisplay-wall-planner-host select {
  min-height: 40px;
  width: 100%;
  margin-top: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
}

.hexdisplay-wall-planner-host label {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.planner-shell {
  position: relative;
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 1050px;
  overflow: hidden;
  border: 1px solid rgba(59, 66, 74, 0.85);
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 18%),
    linear-gradient(180deg, #f7fafc 0%, #d8dde2 9%, #68717a 18%, #eef3f7 27%, #5b646d 36%, #1d2329 48%, #d7dde2 62%, #4b535b 78%, #0e1216 100%);
  box-shadow:
    0 26px 50px rgba(20, 28, 35, 0.18),
    0 8px 18px rgba(20, 28, 35, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(12, 16, 20, 0.74);
}

.planner-shell::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(216, 240, 255, 0.26), rgba(255, 255, 255, 0) 10%),
    linear-gradient(180deg, rgba(19, 23, 28, 0.95), rgba(52, 58, 66, 0.78) 18%, rgba(243, 247, 250, 0.92) 30%, rgba(255, 255, 255, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(120, 131, 142, 0.3);
  pointer-events: none;
  z-index: 0;
}

.planner-shell::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 22%;
  width: 18%;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
  filter: blur(4px);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.checkout-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(11, 17, 23, 0.54);
  backdrop-filter: blur(5px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

.checkout-overlay.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.checkout-overlay-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  width: min(100%, 360px);
  padding: 20px 22px;
  border: 1px solid rgba(179, 193, 202, 0.46);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 248, 0.96));
  box-shadow:
    0 24px 48px rgba(6, 12, 17, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.checkout-overlay-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(34, 116, 165, 0.18);
  border-top-color: #2274a5;
  border-radius: 50%;
  animation: hdp-spin 0.82s linear infinite;
}

.checkout-overlay-copy {
  display: grid;
  gap: 4px;
}

.checkout-overlay-copy strong {
  color: #172329;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.checkout-overlay-copy span {
  color: #53626b;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
}

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

.planner-sidebar {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 14px;
  padding: 18px 18px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 251, 0.94));
  border-right: 1px solid rgba(171, 181, 189, 0.72);
  min-height: 0;
  overflow-y: auto;
}

.sidebar-header {
  padding-bottom: 8px;
  border-bottom: 1px solid #e4eaed;
}

.sidebar-logo {
  display: block;
  width: 100%;
  max-width: 252px;
  max-height: 46px;
  height: auto;
  object-fit: contain;
  object-position: left center;
}

.sidebar-logo-fallback {
  color: var(--ink);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.1;
}

.planner-main {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: clamp(620px, 62vh, 760px) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.field-row,
.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.compact-actions .fit-wall-action,
.compact-actions .mirror-design-action,
.compact-actions button:last-child {
  grid-column: span 2;
}

.compact-actions .fit-wall-action {
  border-color: rgba(35, 117, 177, 0.55);
  background: #eef7ff;
  color: #155b8e;
  font-weight: 750;
}

.compact-actions .mirror-design-action {
  border-color: rgba(107, 84, 181, 0.5);
  background: #f4f0ff;
  color: #543a9c;
  font-weight: 750;
}

.edit-action-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 3px;
  border: 1px solid #cfdbe3;
  border-radius: 9px;
  background: #edf2f5;
}

.edit-action-picker button {
  min-width: 0;
  min-height: 34px;
  padding: 5px 8px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: #53636d;
  font-size: 0.72rem;
  font-weight: 750;
}

.edit-action-picker button.is-active {
  border-color: #7fb2d5;
  background: #fff;
  color: #155b8e;
  box-shadow: 0 2px 6px rgba(35, 75, 103, 0.12);
}

.control-section {
  display: grid;
  gap: 10px;
}

.control-section + .control-section {
  padding-top: 12px;
  border-top: 1px solid #e4eaed;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.unit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(88, 102, 112, 0.42);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(222, 229, 234, 0.96)),
    linear-gradient(180deg, #f9fbfc, #d9e0e5);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    inset 0 -1px 0 rgba(92, 104, 113, 0.18),
    0 2px 5px rgba(29, 39, 46, 0.08);
}

.unit-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.unit-toggle-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.unit-toggle-button {
  min-height: 18px;
  padding: 0 8px;
  border-radius: 999px !important;
  border-color: transparent !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #4f5f68;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.unit-toggle-button:hover {
  color: var(--accent-strong);
}

.unit-toggle-button.is-active {
  border-color: rgba(34, 116, 165, 0.54) !important;
  background: linear-gradient(180deg, #ffffff, #e8f3f8) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.96),
    0 1px 2px rgba(20, 30, 37, 0.07) !important;
  color: #173f56;
  font-weight: 600;
}

.field-label {
  position: relative;
}

.field-label input,
.field-label select {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 500;
}

.input-with-unit input {
  padding-right: 34px;
}

.input-with-unit span {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

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

.tool-group button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.tool-group-primary {
  padding-bottom: 10px;
}

.tool-group-addon {
  position: relative;
  padding: 22px 10px 10px;
  border: 1px solid #d7e2e7;
  border-radius: 8px;
  background: #f6fafb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.tool-group-addon::before {
  content: "";
  position: absolute;
  top: -9px;
  left: 34px;
  right: 34px;
  height: 1px;
  background: #c9d6dc;
}

.tool-group-label {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tool-group-addon button {
  min-height: 34px;
  background: #ffffff;
  box-shadow: 0 1px 1px rgba(23, 35, 40, 0.05);
}

.tool-group-addon button.is-active {
  background: #e9f4f8;
}

.tool-symbol {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  color: var(--accent-strong);
  font-size: 0.95rem;
  font-weight: 900;
}

.tool-color-field {
  grid-column: 1 / -1;
  margin-top: 2px;
}

.tool-group-addon .tool-color-field {
  margin-top: 0;
}

.color-field {
  padding-left: 28px;
}

.color-field select {
  padding-left: 12px;
}

.color-swatch {
  position: absolute;
  left: 0;
  bottom: 9px;
  width: 18px;
  height: 18px;
  border: 1px solid #8d9ca4;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #fff;
}

.range-field input,
.overlay-zoom input {
  accent-color: var(--accent);
}

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

.pan-grid button:first-child,
.pan-grid button:last-child {
  grid-column: 2;
}

.primary-action {
  position: relative;
  display: block;
  width: min(100%, 340px);
  min-height: 0;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: translateY(0);
  transition:
    transform 120ms ease,
    filter 120ms ease,
    box-shadow 120ms ease;
}

.hexdisplay-wall-planner-host button.primary-action,
.hexdisplay-wall-planner-host button.primary-action:hover,
.hexdisplay-wall-planner-host button.primary-action:focus-visible,
.hexdisplay-wall-planner-host button.primary-action:active,
.hexdisplay-wall-planner-host button.primary-action:disabled {
  min-height: 0;
  padding: 0;
  color: inherit;
  border: 0;
  border-radius: 0;
  outline: none;
  background: transparent;
  box-shadow: none;
}

.primary-action-visual {
  display: block;
  width: 100%;
  aspect-ratio: 1439 / 445;
  background-image: url("./assets/add_design_to_cart_button_tight_transparent.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter:
    drop-shadow(0 14px 22px rgba(18, 30, 44, 0.24))
    drop-shadow(0 3px 0 rgba(11, 18, 26, 0.18));
  transform: translateY(0);
  transition:
    transform 120ms ease,
    filter 120ms ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: inherit;
}

.primary-action:hover .primary-action-visual,
.primary-action:focus-visible .primary-action-visual {
  filter:
    brightness(1.02)
    drop-shadow(0 18px 28px rgba(18, 30, 44, 0.28))
    drop-shadow(0 4px 0 rgba(11, 18, 26, 0.2));
  transform: translateY(-1px);
}

.primary-action:active,
.primary-action.is-busy {
  background: transparent;
  border: 0;
  box-shadow: none;
}

.primary-action:active .primary-action-visual,
.primary-action.is-busy .primary-action-visual {
  filter:
    brightness(0.96)
    saturate(0.98)
    drop-shadow(0 8px 12px rgba(18, 30, 44, 0.16));
  transform: translateY(2px);
}

.primary-action:disabled,
.primary-action:disabled:hover {
  background: transparent;
  border: 0;
  filter: none;
  box-shadow: none;
}

.primary-action:disabled .primary-action-visual {
  filter:
    saturate(0.78)
    opacity(0.82)
    drop-shadow(0 5px 8px rgba(18, 30, 44, 0.12));
}

.planner-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.action-section {
  display: grid;
  gap: 12px;
  margin-top: 0;
  padding-top: 14px;
}

.secondary-action {
  width: 100%;
  min-height: 46px;
  padding: 0 16px;
  border: 1px solid rgba(74, 88, 98, 0.72) !important;
  border-radius: 14px !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(235, 241, 245, 0.96)) !important;
  color: #1f2a30 !important;
  font-size: 0.92rem;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  box-shadow:
    0 8px 16px rgba(20, 30, 37, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
}

.secondary-action:hover,
.secondary-action:focus-visible {
  border-color: rgba(34, 116, 165, 0.72) !important;
  color: #134866 !important;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(228, 238, 244, 0.98)) !important;
}

.canvas-wrap {
  position: relative;
  min-height: 0;
  padding: 18px;
  background: var(--canvas);
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

[data-planner-svg].is-moving-design,
[data-planner-svg].is-moving-design .cell {
  cursor: grabbing !important;
}

.canvas-mode-hint {
  position: absolute;
  left: 18px;
  top: 18px;
  z-index: 5;
  max-width: 220px;
  padding: 10px 12px;
  border: 1px solid rgba(22, 37, 46, 0.22);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(241, 246, 249, 0.95));
  box-shadow: 0 14px 28px rgba(18, 31, 38, 0.18);
  color: #15384d;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.35;
  opacity: 0;
  transform: translateY(8px) scale(0.98);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 140ms ease, transform 140ms ease;
}

.canvas-mode-hint.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.canvas-tool-cursor-hint {
  position: absolute;
  z-index: 6;
  display: grid;
  gap: 1px;
  width: max-content;
  max-width: 230px;
  padding: 7px 9px;
  border: 1px solid rgba(184, 137, 44, 0.5);
  border-radius: 8px;
  background: rgba(255, 250, 232, 0.96);
  box-shadow: 0 8px 20px rgba(42, 35, 18, 0.16);
  color: #59420e;
  opacity: 0;
  transform: translateY(4px);
  pointer-events: none;
  transition: opacity 100ms ease, transform 100ms ease;
}

.canvas-tool-cursor-hint.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.canvas-tool-cursor-hint strong {
  font-size: 0.72rem;
  line-height: 1.2;
}

.canvas-tool-cursor-hint span {
  color: #76622f;
  font-size: 0.64rem;
  line-height: 1.25;
}

.mode-overlay {
  position: absolute;
  top: 30px;
  left: 30px;
  z-index: 3;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(151, 168, 176, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(23, 35, 40, 0.12);
  backdrop-filter: blur(8px);
}

.mode-overlay button {
  min-height: 32px;
  min-width: 88px;
  border-color: transparent;
  box-shadow: none;
  font-size: 0.78rem;
}

.mode-overlay button.is-active {
  border-color: var(--accent);
  background: #e9f4f8;
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.view-overlay {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: grid;
  grid-template-rows: auto;
  width: 188px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(122, 137, 147, 0.62);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 247, 0.92));
  box-shadow: 0 16px 30px rgba(23, 35, 40, 0.16);
  backdrop-filter: blur(10px);
  align-content: start;
  height: auto;
  max-height: calc(100% - 36px);
}

.view-overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding-bottom: 8px;
}

.view-overlay-title {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.view-overlay-toggle {
  display: inline-grid;
  place-items: center;
  position: relative;
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-radius: 11px;
  border: 1px solid rgba(89, 103, 115, 0.58);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(234, 239, 243, 0.94));
  color: transparent;
  font-size: 0;
  line-height: 1;
  text-indent: -9999px;
  overflow: hidden;
  box-shadow:
    0 8px 14px rgba(26, 36, 45, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transform: translateY(0);
  transition:
    transform 140ms ease,
    box-shadow 140ms ease,
    border-color 140ms ease,
    background 140ms ease;
}

.view-overlay-toggle::before,
.view-overlay-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: #1c252c;
  transform: translate(-50%, -50%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.view-overlay.is-collapsed .view-overlay-toggle::after {
  transform: translate(-50%, -50%) rotate(90deg);
}

.view-overlay-toggle:hover,
.view-overlay-toggle:focus-visible {
  border-color: rgba(53, 116, 165, 0.72);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(226, 237, 244, 0.96));
  box-shadow:
    0 10px 16px rgba(26, 36, 45, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
  transform: translateY(-1px);
}

.view-overlay-toggle:active {
  transform: translateY(1px);
  box-shadow:
    0 4px 8px rgba(26, 36, 45, 0.12),
    inset 0 2px 5px rgba(167, 180, 190, 0.3);
}

.view-overlay-body {
  display: grid;
  align-content: start;
  gap: 10px;
}

.view-overlay.is-collapsed {
  width: 52px;
  padding: 10px;
  box-shadow: 0 12px 22px rgba(23, 35, 40, 0.14);
}

.view-overlay.is-collapsed .view-overlay-header {
  padding-bottom: 0;
  justify-content: center;
}

.view-overlay.is-collapsed .view-overlay-title,
.view-overlay.is-collapsed .view-overlay-body {
  pointer-events: none;
  display: none;
}

.view-overlay.is-collapsed .view-overlay-body {
  display: none;
}

.overlay-zoom {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay-auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.overlay-auto-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.overlay-auto-toggle {
  min-height: 26px !important;
  padding: 0 12px !important;
  border-radius: 999px !important;
  font-size: 0.7rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.overlay-expand-wall {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(183, 201, 213, 0.85);
  border-radius: 10px;
  background: rgba(239, 247, 255, 0.82);
  cursor: pointer;
}

.overlay-expand-wall input {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 1px 0 0;
  accent-color: #2375b1;
}

.overlay-expand-wall span {
  display: grid;
  gap: 1px;
  color: #243038;
  font-size: 0.7rem;
  line-height: 1.25;
}

.overlay-expand-wall small {
  color: #64727b;
  font-size: 0.63rem;
}

.overlay-zoom input {
  min-height: 18px;
  margin-top: 4px;
  padding: 0;
}

.view-overlay.is-auto-zoom .overlay-zoom,
.view-overlay.is-auto-zoom .pan-grid {
  opacity: 0.5;
}

.view-overlay .pan-grid {
  grid-template-columns: repeat(3, 42px);
  grid-template-areas:
    ". up ."
    "left reset right"
    ". down .";
  justify-content: center;
  gap: 6px;
}

.view-overlay .pan-grid button {
  min-width: 0;
  min-height: 34px;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.view-overlay .pan-grid button[data-reset-view] {
  font-size: 0.72rem;
}

.view-overlay .pan-grid button[data-pan="up"] {
  grid-area: up;
}

.view-overlay .pan-grid button[data-pan="left"] {
  grid-area: left;
}

.view-overlay .pan-grid button[data-reset-view] {
  grid-area: reset;
}

.view-overlay .pan-grid button[data-pan="right"] {
  grid-area: right;
}

.view-overlay .pan-grid button[data-pan="down"] {
  grid-area: down;
}

.view-overlay-help {
  display: grid;
  gap: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(207, 214, 218, 0.9);
}

.view-overlay-help p {
  margin: 0;
  color: #5b6870;
  font-size: 0.69rem;
  font-weight: 500;
  line-height: 1.35;
}

.view-overlay-help strong {
  color: #243038;
  font-weight: 700;
}

svg[data-planner-svg] {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  touch-action: none;
  user-select: none;
}

svg[data-planner-svg].is-panning {
  cursor: grabbing;
}

svg[data-planner-svg].is-area-fill .cell {
  cursor: url("./paint-bucket-cursor.svg") 5 27, crosshair;
}

.wall-boundary {
  fill: #fbfcfc;
  stroke: #20282c;
  stroke-width: 2;
}

.centerline {
  stroke: #9aacb5;
  stroke-dasharray: 8 8;
  stroke-width: 1.5;
}

.bottom-line {
  stroke: #20282c;
  stroke-width: 3;
}

.wall-dimension-label,
.design-dimension-label,
.centerline-dimension-label {
  dominant-baseline: middle;
  font-size: 13px;
  font-weight: 700;
  paint-order: stroke;
  pointer-events: none;
  stroke: #fff;
  stroke-linejoin: round;
  stroke-width: 5;
  text-anchor: middle;
}

.wall-dimension-label {
  fill: #20282c;
}

.design-dimension-label {
  fill: var(--accent-strong);
}

.centerline-dimension-label {
  fill: #20282c;
  font-size: 14px;
  font-weight: 800;
  stroke-width: 4;
}

.centerline-bracket-line,
.centerline-bracket-tick,
.centerline-bracket-guide,
.centerline-bracket-pointer {
  stroke: #20282c;
  stroke-width: 1.5;
  pointer-events: none;
}

.centerline-bracket-guide {
  stroke-dasharray: 5 4;
}

.centerline-bracket-line,
.centerline-bracket-tick {
  stroke-width: 2;
}

.centerline-bracket-pointer {
  stroke-width: 1.75;
}

.design-footprint {
  fill: transparent;
  stroke: var(--accent);
  stroke-dasharray: 9 6;
  stroke-width: 2;
  pointer-events: none;
}

.dimension-line,
.dimension-tick {
  stroke: var(--accent);
  stroke-width: 1.5;
  pointer-events: none;
}

.cell {
  cursor: pointer;
}

.cell.is-empty polygon {
  stroke-dasharray: 4 5;
}

.cell:hover polygon {
  stroke: var(--accent);
  stroke-width: 3;
}

.cell.is-unsupported polygon {
  filter: drop-shadow(0 0 4px rgba(255, 107, 53, 0.7));
}

.cell.is-focus-muted {
  opacity: 0.3;
}

.cell.is-focus-layer polygon {
  stroke: var(--accent-strong);
  stroke-width: 4;
  filter: drop-shadow(0 0 8px rgba(34, 116, 165, 0.62));
}

.blueprint-number {
  pointer-events: none;
}

.blueprint-number-backdrop {
  fill: rgba(255, 255, 255, 0.94);
  stroke: #20282c;
  stroke-width: 2;
}

.blueprint-number-text {
  fill: #20282c;
  font-size: 14px;
  font-weight: 900;
  dominant-baseline: middle;
  text-anchor: middle;
}

.shelf-halo,
.shelf-outline,
.shelf-line {
  pointer-events: none;
  stroke-linecap: round;
}

.shelf-halo {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 11;
}

.shelf-outline {
  stroke: #20282c;
  stroke-width: 7;
}

.shelf-line {
  stroke-width: 4;
}

.support-marker {
  fill: var(--support);
  stroke: #fff;
  stroke-width: 2;
}

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  align-content: start;
  gap: 1px;
  max-width: 100%;
  height: auto;
  min-height: 340px;
  overflow: visible;
  background: var(--line);
  border-top: 1px solid var(--line);
}

.panels article {
  min-width: 0;
  min-height: 0;
  overflow: visible;
  padding: 16px;
  background: var(--panel);
}

.panels h2 {
  margin: 0 0 12px;
  font-size: 1rem;
}

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

.panel-heading h2 {
  flex: 0 0 auto;
  margin: 0;
}

.planner-color-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 9px;
  color: #435d7a;
  font-size: 0.68rem;
  line-height: 1;
}

.planner-color-counts[hidden] {
  display: none;
}

.planner-color-counts > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.planner-color-counts i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(12, 35, 67, 0.22);
  border-radius: 50%;
  background: var(--count-color);
}

.planner-color-counts b {
  color: #132847;
  font-weight: 750;
}

.panels h3 {
  margin: 12px 0 6px;
  font-size: 0.88rem;
}

.planner-value-summary {
  display: grid;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #9fc8ef;
  border-radius: 10px;
  background: linear-gradient(135deg, #edf7ff, #f8fbff);
  color: #17314f;
}

.planner-value-summary > .planner-value-summary__label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.planner-value-summary > .planner-value-summary__per-bay {
  color: #0f58ae;
  font-size: 1.35rem;
  line-height: 1.1;
}

.planner-value-summary__per-bay > small {
  color: #355b84;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
}

.planner-cost-breakdown {
  display: grid;
  gap: 3px;
  margin-top: 2px;
  padding-top: 7px;
  border-top: 1px solid #c9def4;
  color: #52657d;
  font-size: 0.66rem;
}

.planner-cost-breakdown > span,
.planner-cost-breakdown > strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.planner-cost-breakdown > strong {
  margin-top: 2px;
  color: #334c69;
  font-weight: 800;
}

.planner-cost-breakdown b {
  flex: 0 0 auto;
  color: inherit;
}

.planner-value-summary > em {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 4px;
  color: #435d7a;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 800;
}

.planner-value-summary > em.is-active {
  padding: 8px 10px;
  border: 1px solid #a9ddc2;
  border-radius: 8px;
  background: linear-gradient(135deg, #edfbf3, #f7fff9);
  color: #167344;
}

.planner-value-summary > .is-next-tier {
  padding: 8px 10px;
  border: 1px solid #bdd6f2;
  border-radius: 8px;
  background: #f6faff;
  color: #174f91;
  font-size: 0.68rem;
  font-weight: 750;
}

.planner-value-summary > .is-next-tier > strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.planner-next-tier-table {
  display: grid;
  grid-template-columns: minmax(60px, 1fr) auto auto;
  gap: 3px 12px;
  align-items: baseline;
}

.planner-next-tier-table > :nth-child(3n + 2) {
  color: #435d7a;
  font-weight: 650;
}

.planner-next-tier-table > b {
  text-align: right;
  white-space: nowrap;
}

.planner-savings-reward {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  text-align: right;
}

.planner-savings-reward > strong {
  flex: 0 0 auto;
  color: #08733e;
  font-size: 1.08rem;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 10px rgba(8, 115, 62, 0.18);
}

.planner-savings-reward > small {
  max-width: 190px;
  color: #167344;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1.25;
}

.build-requirements-list {
  display: grid;
  gap: 0;
  border: 1px solid #d8e3ec;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.build-requirements-list > p {
  display: grid;
  grid-template-columns: minmax(8.5rem, 0.42fr) minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  margin: 0;
  padding: 7px 10px;
  border-bottom: 1px solid #e7edf2;
  font-size: 0.72rem;
}

.build-requirements-list > p:last-child {
  border-bottom: 0;
}

.build-requirements-list strong {
  color: #29445f;
  font-weight: 850;
}

.build-requirements-list span {
  min-width: 0;
  color: #1f3449;
}

.build-requirements-list small {
  color: #66788a;
  font-size: 0.68rem;
}

.build-notes {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid #f0c7a9;
  border-radius: 8px;
  background: #fff8f2;
  color: #714019;
  font-size: 0.7rem;
}

.build-notes > p:last-child {
  margin-bottom: 0;
}

.layer-preview {
  display: grid;
  gap: 6px;
}

.blueprint-layer-explorer {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  grid-template-areas:
    "title controls"
    "help controls";
  align-items: center;
  gap: 2px 12px;
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #9fc8ef;
  border-radius: 8px;
  background: linear-gradient(135deg, #edf7ff, #f8fbff);
}

.blueprint-layer-explorer__title {
  grid-area: title;
  color: #174f91;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.blueprint-layer-explorer small {
  grid-area: help;
  color: #60758a;
  font-size: 0.65rem;
  line-height: 1.25;
}

.blueprint-layer-explorer__controls {
  grid-area: controls;
  display: grid;
  grid-template-columns: 34px minmax(90px, auto) 34px;
  align-items: center;
  overflow: hidden;
  border: 1px solid #afcbe4;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(34, 91, 139, 0.08);
}

.blueprint-layer-explorer__controls button {
  min-width: 0;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #155b8e;
  box-shadow: none;
  font-size: 1rem;
}

.blueprint-layer-explorer__controls button:hover:not(:disabled) {
  background: #e6f3ff;
}

.blueprint-layer-explorer__controls output {
  padding: 0 8px;
  color: #17314f;
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
}

.blueprint-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px;
  padding: 8px;
  border: 1px solid #d9e4e8;
  border-radius: 6px;
  background: #f7fafb;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

@media (max-width: 720px) {
  .blueprint-layer-explorer {
    grid-template-columns: 1fr;
    grid-template-areas:
      "title"
      "controls"
      "help";
    gap: 6px;
  }

  .blueprint-layer-explorer__controls {
    width: 100%;
    grid-template-columns: 40px 1fr 40px;
  }
}

.blueprint-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.blueprint-legend b {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #aebbc1;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 0.68rem;
  line-height: 1;
}

.blueprint-legend i {
  flex: 0 0 auto;
}

.legend-shelf {
  width: 18px;
  height: 5px;
  border: 2px solid #20282c;
  border-radius: 999px;
  background: #9eb5c0;
  box-shadow: 0 0 0 2px #fff;
}

.legend-support {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #ff7a3d;
  box-shadow: 0 0 0 1px #ff7a3d;
}

.layer-row {
  border: 1px solid #d9e1e5;
  border-radius: 6px;
  background: #fbfcfc;
}

.layer-row.is-focused {
  border-color: var(--accent);
  background: #eef8fb;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.layer-row summary {
  display: grid;
  grid-template-columns: 18px minmax(62px, 0.8fr) auto minmax(80px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
}

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

.layer-row summary::before {
  content: "+";
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e8f2f6;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 18px;
  text-align: center;
}

.layer-row[open] summary::before {
  content: "-";
}

.layer-row.is-focused summary::before {
  content: "✓";
  background: var(--accent);
  color: #fff;
}

.layer-title {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
}

.layer-count {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.layer-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 18px;
  padding: 0 6px 0 4px;
  border: 1px solid #d2dce0;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.layer-chip span {
  width: 10px;
  height: 10px;
  border: 1px solid #8d9ca4;
  border-radius: 50%;
}

.layer-details-table {
  width: calc(100% - 42px);
  margin: 0 8px 8px 34px;
  border-collapse: collapse;
  table-layout: fixed;
}

.layer-details-table th,
.layer-details-table td {
  padding: 6px 0;
  border-bottom: 1px solid #dbe5e9;
  font-size: 0.75rem;
  line-height: 1.25;
  vertical-align: top;
}

.layer-details-table tr:last-child th,
.layer-details-table tr:last-child td {
  border-bottom: 0;
}

.layer-details-table th {
  width: 92px;
  padding-right: 10px;
  color: var(--muted);
  font-weight: 900;
  text-align: left;
  text-transform: uppercase;
}

.layer-details-table td {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.hexdisplay-wall-planner-host dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.hexdisplay-wall-planner-host dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.hexdisplay-wall-planner-host dd {
  margin: 2px 0 0;
}

.hexdisplay-wall-planner-host p {
  margin: 0 0 10px;
}

.hexdisplay-wall-planner-host ol {
  margin: 0;
  padding-left: 20px;
}

.hexdisplay-wall-planner-host pre {
  overflow: auto;
  max-height: 280px;
  margin: 0;
  padding: 12px;
  border-radius: 6px;
  background: #162125;
  color: #d8e7ec;
  font-size: 0.78rem;
}

@media (max-width: 980px) {
  .hexdisplay-wall-planner-host {
    width: 100%;
    max-width: 100%;
    margin: 16px 0;
  }

  .planner-shell {
    grid-template-columns: 1fr;
    width: 100%;
    height: auto;
    min-height: 0;
  }

  .planner-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .panels {
    height: auto;
    min-height: 340px;
    grid-template-columns: 1fr;
  }
}
