/* Dark theme */
* { box-sizing: border-box; }
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #121212;
  color: #ccc;
  padding: 30px;
  max-width: 700px;
  margin: auto;
}
h2 { text-align: center; color: #bbb; margin-bottom: 25px; }
.browser-tabs {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  border-bottom: 1px solid #444;
}
.browser-tab {
  margin: 0;
  padding: 11px 16px;
  border: 1px solid #333;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #252525;
  color: #888;
}
.browser-tab:hover { background: #333; color: #ccc; }
.browser-tab.active {
  position: relative;
  bottom: -1px;
  background: #1e1e1e;
  color: #ddd;
  border-color: #555;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
form {
  background: #1e1e1e;
  padding: 25px 30px;
  border-radius: 0 10px 10px 10px;
  box-shadow: 0 0 15px #555555aa;
  border: 1px solid #333;
}
label { display: block; font-weight: 600; color: #bbb; margin-top: 18px; margin-bottom: 6px; user-select: none; }
.dimensions-row,
.quantities-row,
.options-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.options-row {
  grid-template-columns: repeat(2, 1fr);
}
.options-row label {
  margin-top: 18px;
}
.dimension-field label,
.quantity-field label { margin-top: 18px; }
.quantity-field small {
  display: block;
  margin-top: 5px;
  color: #888;
  font-size: .75rem;
}
input[type="number"], input[type="text"] {
  width: 100%; padding: 10px 12px; font-size: 1rem;
  border: 1.5px solid #555; border-radius: 6px;
  background-color: #2a2a2a; color: #ccc; transition: border-color .3s ease;
}
input::placeholder { color: #888; opacity: .75; }
input[type="number"]:focus, input[type="text"]:focus {
  outline: none; border-color: #bbb; box-shadow: 0 0 8px #bbbbbbcc; background-color: #333;
}
input[type="checkbox"], input[type="radio"] { margin-right: 10px; accent-color: #bbb; cursor: pointer; }
.custom-cabinet-options { display: none; margin-top: 8px; padding: 10px 14px; border-left: 3px solid #777; background: #252525; }
.custom-cabinet-options label { margin-top: 6px; font-weight: 500; }
.item-section { margin-top: 20px; padding: 20px; border-radius: 10px; border: 1px solid #3a3a3a; background: #252525; display: none; }
.item-section h3 { margin-top: 0; color: #bbb; }
.item-entry { display: flex; gap: 12px; margin-top: 12px; align-items: center; }
.item-entry input { flex: 1 1 45%; padding: 8px 10px; font-size: .9rem; background: #2a2a2a; border: 1.5px solid #555; color: #ccc; }
button { padding: 10px 18px; font-size: 1rem; font-weight: 700; border-radius: 8px; border: none; cursor: pointer; transition: background-color .3s ease; background: #bbb; color: #121212; user-select: none; margin-top: 10px; }
button:hover { background: #999; }
button.add-item { margin-top: 15px; padding: 8px 14px; font-size: .9rem; font-weight: 600; }
button.remove-item { padding: 6px 10px; font-size: .85rem; background: #e57373; color: white; }
button.remove-item:hover { background: #ef5350; }
button[type="submit"] { margin-top: 30px; width: 100%; padding: 14px 0; font-size: 1.1rem; border-radius: 10px; font-weight: 700; }
#preview {
  display: none;
  width: 612px;
  max-width: 100%;
  margin: 40px auto 0;
  color: #222;
  font-size: .95rem;
}
.preview-page {
  width: 100%;
  max-width: 612px;
  min-height: 792px;
  aspect-ratio: 8.5 / 11;
  margin: 0 auto 35px;
  padding: 48px 44px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 2px;
  box-shadow: 0 5px 18px #00000066;
}
.preview-column { min-width: 0; height: 100%; overflow: hidden; }
#preview h4 { margin: 0 0 8px; color: #222; font-size: 1rem; }
#preview .preview-group + .preview-group { margin-top: 22px; }
#preview ul { padding-left: 0; margin: 0; list-style: none; }
#preview li { padding: 3px 0; line-height: 1.3; }
.cut-size-section {
  margin-top: 25px;
  padding: 20px;
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
}
.cut-size-section h3 { margin: 0 0 12px; color: #bbb; }
.cut-size-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.cut-size-row label { margin-top: 0; }

.optimized-cut-list {
  margin-top: 20px;
  padding: 20px;
  background: #1e1e1e;
  color: #ccc;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
}
.optimized-cut-list h3 { margin: 0 0 14px; color: #bbb; }
.optimized-cut-list p { color: #888; margin: 0 0 12px; }
.optimized-cut-list ul { margin: 0; padding-left: 20px; }
.optimized-cut-list li { padding: 4px 0; }
.cut-diagram { margin-top: 28px; }
.board-diagram {
  position: relative;
  width: 100%;
  aspect-ratio: var(--board-ratio);
  min-height: 180px;
  margin: 26px 0 12px 42px;
  width: calc(100% - 42px);
  border: 2px solid #aaa;
  background: #303030;
  overflow: visible;
}
.board-surface {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #303030;
}
.dimension-line {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #ddd;
  font-size: .72rem;
  line-height: 1;
  pointer-events: none;
}
.dimension-width {
  left: 0;
  right: 0;
  top: -21px;
  border-top: 1px solid #aaa;
}
.dimension-length {
  top: 0;
  bottom: 0;
  left: -31px;
  width: 18px;
  flex-direction: column;
  border-left: 1px solid #aaa;
}
.dimension-line .arrow { font-size: .7rem; }
.diagram-strip {
  position: relative;
  width: 100%;
  min-height: 1px;
  border-bottom: 1px solid #121212;
  background: linear-gradient(90deg, #666, #4d4d4d);
  display: flex;
  flex-direction: row;
  color: #eee;
  font-size: .65rem;
  text-align: center;
}
.strip-dimension {
  position: absolute;
  z-index: 2;
  top: 4px;
  left: 2px;
  right: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1px;
  min-height: 18px;
  padding: 2px 1px;
  color: #fff;
  background: transparent;
  border: 0;
  font-size: .62rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
}
.strip-dimension strong { font-weight: 700; }
.strip-dimension span { font-size: .55rem; }
.diagram-pieces {
  display: flex;
  flex-direction: row;
  flex: 1;
  align-items: stretch;
  border-top: 0;
}
.diagram-pieces i {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 2px;
  overflow: hidden;
  border-bottom: 1px solid #222;
  background: #999;
  color: #111;
  font-style: normal;
  font-size: .6rem;
  line-height: 1.1;
}
.diagram-pieces i small { font-size: .58rem; }
.piece-label { font-size: .58rem; font-weight: 700; }
.piece-dimension {
  display: flex;
  align-items: center;
  gap: 2px;
  writing-mode: vertical-rl;
  font-size: .55rem;
  line-height: 1;
}
.piece-dimension span { font-size: .5rem; }
.piece-dimension strong { font-size: .56rem; }
.conversion-table-section {
  margin-top: 35px;
  background: #1e1e1e;
  border: 1px solid #3a3a3a;
  padding: 20px;
  border-radius: 12px;
}
.conversion-table-section h3 { margin-top: 0; color: #bbb; }
.conversion-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0 0 12px;
  background: transparent;
  color: #bbb;
  border-radius: 0;
  text-align: left;
}
.conversion-toggle:hover { background: transparent; color: #fff; }
.conversion-toggle .toggle-icon { font-size: 1.4rem; line-height: 1; }
.table-help { color: #888; font-size: .9rem; margin-bottom: 14px; }
.conversion-table {
  width: 100%;
  border-collapse: collapse;
  color: #ccc;
  user-select: text;
}
.conversion-table th,
.conversion-table td {
  padding: 8px 12px;
  border: 1px solid #444;
  text-align: left;
}
.conversion-table th {
  background: #2a2a2a;
  color: #bbb;
}
.conversion-table tbody tr:nth-child(even) { background: #252525; }
.conversion-table tbody tr:hover { background: #333; }
.additional-section {
  margin-top: 0;
  padding: 25px 30px;
  border: 1px solid #333;
  border-top: 0;
  border-radius: 0 10px 10px 10px;
  background: #1e1e1e;
  box-shadow: 0 0 15px #555555aa;
}
.additional-section h3,
.additional-table h4 { margin-top: 0; color: #bbb; }
.additional-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 0 0 12px;
  background: transparent;
  color: #bbb;
  border-radius: 0;
  text-align: left;
}
.additional-toggle:hover { background: transparent; color: #fff; }
.toggle-icon { font-size: 1.4rem; line-height: 1; }
.additional-form { padding: 0; background: transparent; border: 0; box-shadow: none; }
.additional-form[hidden] { display: none; }
.additional-table + .additional-table { margin-top: 24px; }
.additional-row {
  display: grid;
  grid-template-columns: .7fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}
.additional-header { color: #888; font-size: .85rem; font-weight: 600; }
.additional-row input { min-width: 0; }
.additional-row button { margin-top: 0; }
.history-controls { display: flex; gap: 10px; margin-top: 12px; }
.history-controls button { flex: 1; margin-top: 0; }
.history-controls button:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 520px) {
  body { padding: 15px; }
  form { padding: 20px; }
  .dimensions-row,
  .quantities-row,
  .options-row { grid-template-columns: 1fr; gap: 0; }
  .item-entry { gap: 6px; }
  .additional-row { grid-template-columns: 1fr; gap: 6px; }
  .additional-header { display: none; }
  .cut-size-row { grid-template-columns: 1fr; gap: 0; }
  .additional-row button { width: 100%; }
    #preview {
    width: 100%;
  }
  .preview-page {
    min-height: 0;
    aspect-ratio: 8.5 / 11;
    padding: 30px 24px;
    gap: 20px;
  }
}

/* Modern clean visual refresh */
:root {
  --page-bg: #0d1117;
  --surface: #151b24;
  --surface-soft: #1b2430;
  --surface-raised: #202b38;
  --line: #303d4d;
  --line-soft: #273342;
  --text: #e6edf3;
  --muted: #9aa8b7;
  --accent: #8fb8d8;
  --accent-strong: #b7d8ee;
  --shadow: 0 12px 30px rgba(0, 0, 0, .28);
  --shadow-soft: 0 5px 16px rgba(0, 0, 0, .2);
}

body {
  max-width: 860px;
  padding: 36px 24px 60px;
  background: var(--page-bg);
  color: var(--text);
}

h2 {
  margin: 0 0 28px;
  color: var(--text);
  font-size: 2rem;
  letter-spacing: .02em;
}

h3, h4 { letter-spacing: .01em; }

.browser-tabs {
  gap: 6px;
  margin-top: 0;
  border-bottom: 1px solid var(--line);
}

.browser-tab {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  box-shadow: none;
}

.browser-tab:hover { background: var(--surface-raised); color: var(--text); }
.browser-tab.active {
  background: var(--surface);
  color: var(--accent-strong);
  border-color: var(--line);
  border-bottom: 2px solid var(--accent);
}

form, .additional-section, .cut-size-section, .optimized-cut-list, .conversion-table-section {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

form {
  padding: 28px;
  border-radius: 0 12px 12px 12px;
}

.additional-section { padding: 28px; border-radius: 0 12px 12px 12px; }
label { color: var(--text); }
.dimension-field, .quantity-field { min-width: 0; }

.dimensions-row, .quantities-row, .options-row {
  gap: 18px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line-soft);
}

.options-row { padding-bottom: 4px; }
.options-row label { margin-top: 18px; }

input[type="number"], input[type="text"] {
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #10161e;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}

input[type="number"]:focus, input[type="text"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(143, 184, 216, .14);
  background: #121b25;
}

.item-section {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}

.item-section h3, .additional-section h3, .cut-size-section h3,
.optimized-cut-list h3, .conversion-table-section h3 { color: var(--accent-strong); }
.custom-cabinet-options { background: var(--surface-raised); border-left-color: var(--accent); }
.item-entry, .additional-row { padding-top: 12px; border-top: 1px solid var(--line-soft); }
.item-entry input { background: #151d27; border-color: var(--line); }

button {
  background: var(--accent);
  color: #101820;
  border: 1px solid transparent;
  border-radius: 7px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
}
button:hover { background: var(--accent-strong); box-shadow: 0 6px 14px rgba(0, 0, 0, .25); }
button.add-item { background: transparent; color: var(--accent-strong); border-color: var(--line); box-shadow: none; }
button.add-item:hover { background: var(--surface-raised); }
button.remove-item { background: #a9575c; border-color: #c16a6e; }
button[type="submit"] { box-shadow: 0 7px 18px rgba(143, 184, 216, .16); }

.history-controls { border-top: 1px solid var(--line-soft); padding-top: 14px; }
.cut-size-section, .optimized-cut-list, .conversion-table-section { border-radius: 10px; }
.optimized-cut-list { color: var(--text); }
.optimized-cut-list p, .quantity-field small, .table-help { color: var(--muted); }

.conversion-toggle { color: var(--text); box-shadow: none; }
.conversion-table th { background: var(--surface-raised); color: var(--accent-strong); }
.conversion-table th, .conversion-table td { border-color: var(--line); }
.conversion-table tbody tr:nth-child(even) { background: var(--surface-soft); }
.conversion-table tbody tr:hover { background: #2a3745; }

/* Browser printing: keep each preview page at exact letter proportions. */
@media print {
  @page {
    size: letter portrait;
    margin: 0;
  }

  html,
  body {
    width: 8.5in;
    min-width: 8.5in;
    margin: 0;
    padding: 0;
    background: #fff;
  }

  body > :not(#preview) {
    display: none !important;
  }

  #preview {
    display: block !important;
    width: 8.5in;
    max-width: none;
    margin: 0;
    color: #222;
    /* Same scale as the 612 x 792 px screen preview. */
    font-size: .95rem;
  }

  .preview-page {
    width: 8.5in;
    height: 11in;
    min-height: 11in;
    max-width: none;
    margin: 0;
    padding: .5in .4583in;
    gap: .375in;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  .preview-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }

  .preview-column {
    height: 100%;
    overflow: hidden;
  }

  /* Scale the screen preview (612 x 792 px) to letter paper (8.5 x 11 in). */
  #preview h4 { font-size: 1.3333rem; }
  #preview .preview-group + .preview-group { margin-top: 29.3333px; }
  #preview li { padding: 4px 0; line-height: 1.3; }
}

/* Light modern theme */
:root {
  --page-bg: #f3f6f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-raised: #eef4f8;
  --line: #d6e0e8;
  --line-soft: #e5ebf0;
  --text: #263746;
  --muted: #687988;
  --accent: #3f789d;
  --accent-strong: #245b7d;
  --shadow: 0 8px 24px rgba(42, 67, 86, .10);
  --shadow-soft: 0 4px 12px rgba(42, 67, 86, .07);
}

body {
  background: var(--page-bg);
  color: var(--text);
}

h2 { color: var(--accent-strong); }
.browser-tabs { border-bottom-color: var(--line); }
.browser-tab {
  background: #e8eef3;
  color: var(--muted);
  border-color: var(--line);
}
.browser-tab:hover { background: #dce8ef; color: var(--text); }
.browser-tab.active {
  background: var(--surface);
  color: var(--accent-strong);
  border-color: var(--line);
  border-bottom-color: var(--accent);
}

form, .additional-section, .cut-size-section, .optimized-cut-list,
.conversion-table-section {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

label { color: var(--text); }
.dimensions-row, .quantities-row, .options-row {
  border-bottom-color: var(--line-soft);
}

input[type="number"], input[type="text"] {
  background: #fbfdff;
  border-color: #bfccd6;
  color: var(--text);
  box-shadow: inset 0 1px 2px rgba(42, 67, 86, .06);
}
input::placeholder { color: #82909c; }
input[type="number"]:focus, input[type="text"]:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(63, 120, 157, .15);
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }

.item-section {
  background: var(--surface-soft);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.item-section h3, .additional-section h3, .cut-size-section h3,
.optimized-cut-list h3, .conversion-table-section h3 {
  color: var(--accent-strong);
}
.custom-cabinet-options {
  background: var(--surface-raised);
  border-left-color: var(--accent);
}
.item-entry, .additional-row { border-top-color: var(--line-soft); }
.item-entry input { background: #fff; border-color: #bfccd6; }

button {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 10px rgba(42, 67, 86, .16);
}
button:hover { background: var(--accent-strong); }
button.add-item {
  background: transparent;
  color: var(--accent-strong);
  border-color: var(--line);
  box-shadow: none;
}
button.add-item:hover { background: var(--surface-raised); }
button.remove-item { background: #c75d63; border-color: #d77a7f; }
button[type="submit"] { box-shadow: 0 6px 16px rgba(63, 120, 157, .2); }
.history-controls { border-top-color: var(--line-soft); }

.optimized-cut-list { color: var(--text); }
.optimized-cut-list p, .quantity-field small, .table-help { color: var(--muted); }
.conversion-toggle { color: var(--text); }
.conversion-table { color: var(--text); }
.conversion-table th, .conversion-table td { border-color: var(--line); }
.conversion-table th { background: var(--surface-raised); color: var(--accent-strong); }
.conversion-table tbody tr:nth-child(even) { background: var(--surface-soft); }
.conversion-table tbody tr:hover { background: #e4eef4; }

.board-diagram { border-color: #8ca0ad; background: #dce5ea; }
.board-surface { background: #dce5ea; }
.diagram-strip { border-right-color: #fff; background: linear-gradient(90deg, #b6c5ce, #9eafb9); color: #234; }
.diagram-pieces i { border-bottom-color: #7f919c; background: #e3ebef; color: #24333d; }
.dimension-line { color: #405766; }
.dimension-width { border-top-color: #8ca0ad; }
.dimension-length { border-left-color: #8ca0ad; }
.strip-dimension { color: #24333d; }

/* Minimal black-and-white line-based theme */
:root {
  --page-bg: #f4f4f4;
  --surface: #fff;
  --surface-soft: #fafafa;
  --surface-raised: #f0f0f0;
  --line: #222;
  --line-soft: #d2d2d2;
  --text: #171717;
  --muted: #666;
  --accent: #111;
  --accent-strong: #000;
  --shadow: 0 4px 14px rgba(0, 0, 0, .12);
  --shadow-soft: 0 2px 8px rgba(0, 0, 0, .08);
}

body { background: var(--page-bg); color: var(--text); }
h2, h3, h4,
.item-section h3, .additional-section h3, .cut-size-section h3,
.optimized-cut-list h3, .conversion-table-section h3 { color: #111; }

.browser-tabs { gap: 0; border-bottom: 2px solid #111; }
.browser-tab {
  border: 1px solid #aaa;
  border-bottom: 0;
  border-radius: 0;
  background: #e8e8e8;
  color: #555;
  box-shadow: none;
}
.browser-tab.active {
  background: #fff;
  color: #111;
  border-color: #111;
  border-bottom: 2px solid #fff;
}

form, .additional-section, .cut-size-section, .optimized-cut-list,
.conversion-table-section {
  border-color: #222;
  border-radius: 0;
  box-shadow: var(--shadow);
}

input[type="number"], input[type="text"] {
  border: 0;
  border-bottom: 1px solid #777;
  border-radius: 0;
  background: transparent;
  color: #111;
  box-shadow: none;
}
input[type="number"]:focus, input[type="text"]:focus {
  border: 0;
  border-bottom: 2px solid #000;
  box-shadow: none;
  background: transparent;
}

.item-section {
  border-color: #bbb;
  border-radius: 0;
  background: var(--surface-soft);
  box-shadow: var(--shadow-soft);
}
.custom-cabinet-options {
  background: #f1f1f1;
  border-left: 3px solid #111;
}
.item-entry, .additional-row { border-top-color: #ccc; }
.item-entry input { border-radius: 0; background: #fff; }

button {
  border-radius: 0;
  background: #111;
  color: #fff;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .18);
}
button:hover { background: #333; }
button.add-item {
  border-radius: 0;
  background: #fff;
  color: #111;
  border-color: #111;
  box-shadow: none;
}
button.add-item:hover { background: #eee; }
button.remove-item { background: #333; border-color: #111; }
button.remove-item:hover { background: #000; }
button[type="submit"] { box-shadow: 0 4px 12px rgba(0, 0, 0, .2); }

.preview-page { border-radius: 0; }
.conversion-table-section { border-radius: 0; }
.conversion-table th, .conversion-table td { border-color: #999; }
.conversion-table th { background: #e8e8e8; color: #111; }
.conversion-table tbody tr:nth-child(even) { background: #f5f5f5; }
.conversion-table tbody tr:hover { background: #e2e2e2; }

.board-diagram { border-color: #222; background: #ddd; }
.board-surface { background: #ddd; }
.diagram-strip { background: linear-gradient(90deg, #999, #777); }
.dimension-line { color: #111; }
.dimension-width { border-top-color: #222; }
.dimension-length { border-left-color: #222; }
.strip-dimension { color: #111; }

/* Minimal layout: section blocks use only a top divider. */
form,
.additional-section,
.cut-size-section,
.optimized-cut-list,
.conversion-table-section,
.item-section {
  border: 0;
  border-top: 1px solid #222;
  border-radius: 0;
  box-shadow: none;
}

form {
  border-top: 2px solid #111;
}

.additional-section,
.cut-size-section,
.optimized-cut-list,
.conversion-table-section,
.item-section {
  background: transparent;
  padding-left: 0;
  padding-right: 0;
}

.item-section {
  margin-top: 28px;
  padding-top: 18px;
}

.cut-size-section,
.optimized-cut-list,
.conversion-table-section,
.additional-section {
  margin-left: 0;
  margin-right: 0;
}

/* Remove the square frame from form rows and keep simple horizontal dividers. */
.dimensions-row,
.quantities-row,
.options-row,
.item-entry,
.additional-row {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}

.browser-tab {
  border: 0;
  border-radius: 10px 10px 0 0;
}

input[type="number"],
input[type="text"],
button,
.custom-cabinet-options {
  border-radius: 0;
}

.custom-cabinet-options {
  border-top: 1px solid #bbb;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

/* Todos los botones con esquinas redondeadas. */
button,
.browser-tab {
  border-radius: 8px;
}

/* Vista técnica del Panel Preview: colores planos, cotas y separación de piezas. */
.board-diagram {
  background: #fff;
  border: 2px solid #111;
}
.board-surface {
  background: #fff;
}
.diagram-strip {
  background: #e8e8e8;
  border-right: 0;
  border-bottom: 1px solid #777;
  color: #111;
}
.diagram-pieces i {
  background: #fff;
  border-right: 1px solid #777;
  border-bottom: 0;
  color: #111;
}
.diagram-pieces i:last-child { border-right: 0; }
.dimension-line,
.strip-dimension,
.piece-dimension {
  color: #111;
}
.dimension-width,
.dimension-length {
  border-color: #111;
}

/* Medidas limpias dentro del plano, sin flechas ni líneas de cota. */
.board-surface { overflow: visible; }
.strip-dimension {
  top: 50%;
  bottom: auto;
  left: -38px;
  right: auto;
  width: 32px;
  min-height: 0;
  display: block;
  padding: 0;
  transform: translateY(-50%);
  text-align: right;
  font-size: .55rem;
}
.strip-dimension strong { font-size: .58rem; }
.strip-dimension span { display: none; }
.diagram-pieces i { position: relative; }
.piece-dimension {
  position: absolute;
  top: 50%;
  left: 2px;
  right: 2px;
  justify-content: center;
  gap: 2px;
  writing-mode: horizontal-tb;
  border: 0;
  transform: translateY(-50%);
  font-size: .55rem;
}
.piece-dimension strong { font-size: .58rem; }
.piece-dimension span { display: none; }
.piece-label { display: none; }

/* Números y medidas más visibles en la vista previa. */
#preview li {
  font-size: 1.15rem;
}

