  :root {
    --bg: #111827;
    --surface: #1f2937;
    --card: #374151;
    --accent: #f59e0b;
    --accent2: #ef4444;
    --accent3: #10b981;
    --blue: #3b82f6;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --dim: #6b7280;
    --input-bg: #111827;
    --border: #374151;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; }
  /* Print/export branding — never show in the interactive UI */
  .print-branding { display: none !important; }
  body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
  }
  header {
    background: var(--surface);
    border-bottom: 2px solid var(--accent);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
  }
  header h1 { font-size: 1.3rem; }
  header h1 span { color: var(--accent); }
  .header-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .header-actions a.btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
  }

  /* Header dropdown menus */
  .menu {
    position: relative;
  }
  .menu-toggle::after {
    content: '';
    display: inline-block;
    margin-left: .4rem;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    vertical-align: middle;
    opacity: .85;
  }
  .menu.open .menu-toggle {
    border-color: var(--accent);
  }
  .menu-panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 200px;
    padding: .5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    display: grid;
    gap: .35rem;
    z-index: 120;
  }
  .menu-panel[hidden] { display: none !important; }
  .menu-label {
    font-size: .7rem;
    color: var(--muted);
    font-weight: 600;
    padding: .15rem .35rem 0;
  }
  .menu-select {
    width: 100%;
    padding: .4rem 1.4rem .4rem .5rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: .75rem;
  }
  .menu-item {
    width: 100%;
    text-align: left;
    padding: .5rem .65rem;
    border-radius: 6px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text);
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
  }
  .menu-item:disabled,
  .menu-item[aria-disabled="true"] {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
  }
  .menu-item:disabled:hover,
  .menu-item[aria-disabled="true"]:hover {
    background: transparent;
    border-color: transparent;
  }
  .menu-item-accent {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
    font-weight: 700;
  }
  .menu-item-accent:hover {
    filter: brightness(1.08);
    border-color: var(--accent);
  }
  .btn {
    padding: .45rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: .8rem;
    cursor: pointer;
    transition: .15s;
    font-weight: 500;
  }
  .btn:hover { border-color: var(--accent); }
  .btn-primary { background: var(--accent); color: #000; border-color: var(--accent); font-weight: 700; }
  .btn-primary:hover { filter: brightness(1.1); }
  .btn:disabled { cursor: default; opacity: 1; }
  .btn.calc-success {
    background: var(--accent3);
    border-color: var(--accent3);
    color: #042f1a;
    filter: none;
    animation: calc-success-pop .35s ease-out;
  }
  .btn.calc-success .calc-check {
    display: inline-block;
    animation: calc-check-bounce .4s ease-out;
  }
  @keyframes calc-success-pop {
    0% { transform: scale(0.96); }
    55% { transform: scale(1.04); }
    100% { transform: scale(1); }
  }
  @keyframes calc-check-bounce {
    0% { transform: scale(0.4); opacity: 0; }
    60% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(1); }
  }

  .app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 1rem;
    align-items: start;
  }
  @media (max-width: 960px) {
    .app { grid-template-columns: 1fr; padding: .5rem; }
    .input-col { order: 2; position: static; max-height: none; }
    .output-col { order: 1; }
  }
  @media (max-width: 768px) {
    .app { padding: .5rem; gap: .6rem; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: .5rem; }
    .panel { padding: .85rem; }
    .panel h2 { font-size: .82rem; }
    .row { grid-template-columns: 1fr 100px 26px; }
    .tab { font-size: .72rem; padding: .45rem .4rem; }
    #three-container { height: 400px; }
  }
  @media (max-width: 600px) {
    header { padding: .6rem .75rem; flex-wrap: wrap; gap: .5rem; }
    header h1 { font-size: 1.05rem; }
    .header-actions {
      width: 100%;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: .4rem;
    }
    .header-actions .btn { width: 100%; justify-content: center; font-size: .75rem; padding: .45rem .5rem; text-align: center; }
    .header-actions .menu { min-width: 0; }
    .menu-panel {
      left: 0;
      right: 0;
      min-width: 0;
      width: 100%;
    }
    .app { padding: .4rem; gap: .5rem; }
    .panel { padding: .75rem; }
    .panel h2 { font-size: .78rem; margin-bottom: .5rem; }
    .row { grid-template-columns: 1fr 90px 24px; gap: .2rem; margin-bottom: .3rem; }
    .row label { font-size: .72rem; }
    .row input, .row select { font-size: 16px; padding: .3rem .35rem; }
    .tabs { flex-wrap: wrap; gap: 2px; padding: 2px; }
    .tab { font-size: .65rem; padding: .4rem .25rem; min-width: 0; }
    .stats { grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: .4rem; }
    .stat .v { font-size: 1rem; }
    .stat .l { font-size: .6rem; }
    .stat { padding: .45rem; }
    .diagram-box { touch-action: pan-y; }
    #three-container { height: 350px; touch-action: none; }
    .three-controls { bottom: 6px; left: 6px; gap: 4px; flex-wrap: wrap; }
    .three-controls button { padding: 5px 8px; font-size: .68rem; }
    table { font-size: .7rem; }
    th { font-size: .6rem; padding: .35rem .4rem; }
    td { padding: .3rem .4rem; }
    .tbl-header { padding: .5rem .65rem; font-size: .8rem; }
    .cut-item { grid-template-columns: 1fr; gap: .3rem; font-size: .72rem; }
    .cut-bar-wrap { width: 100%; }
  }

  /* ===== INPUT PANEL ===== */
  .input-col {
    position: sticky;
    top: 70px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--card) transparent;
  }
  .panel {
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    margin-bottom: .75rem;
  }
  .panel h2 {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--accent);
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
  }
  .panel h2 .icon { font-size: 1rem; }
  .row {
    display: grid;
    grid-template-columns: 1fr 110px 28px;
    align-items: center;
    gap: .25rem;
    margin-bottom: .35rem;
  }
  .row label {
    font-size: .8rem;
    color: var(--muted);
  }
  .row input, .row select {
    width: 100%;
    padding: .35rem .45rem;
    border-radius: 5px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font-size: .85rem;
    text-align: right;
  }
  .row select { text-align: left; grid-column: 2 / 4; }
  .row .unit {
    font-size: .7rem;
    color: var(--dim);
  }
  .row #btnTaxZipLookup {
    grid-column: 3;
    padding: .25rem .15rem;
    font-size: .68rem;
    min-width: 0;
    width: 100%;
  }
  .field-hint {
    margin: -.15rem 0 .55rem;
    font-size: .72rem;
    color: var(--muted);
    min-height: 1em;
    line-height: 1.35;
  }
  .field-hint[data-kind="ok"] { color: var(--accent3); }
  .field-hint[data-kind="warn"] { color: var(--accent); }
  .field-hint[data-kind="err"] { color: var(--accent2); }
  .field-hint:empty { display: none; }
  .row-wide { grid-template-columns: 1fr 1fr; }
  .row-wide select { grid-column: auto; }

  .sep { border: none; border-top: 1px solid var(--border); margin: .6rem 0; }

  /* ===== OUTPUT ===== */
  .output-col { display: flex; flex-direction: column; gap: 1rem; }

  .tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    background: var(--surface);
    border-radius: 8px;
    padding: 3px;
    border: 1px solid var(--border);
  }
  .tab {
    flex: 1 1 110px;
    min-width: 0;
    padding: .5rem .4rem;
    text-align: center;
    font-size: .8rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    color: var(--muted);
    transition: .15s;
    white-space: nowrap;
  }
  .tab.active { background: var(--accent); color: #000; }
  .tab:not(.active):hover { color: var(--text); }

  .tab-content { display: none; }
  .tab-content.active { display: block; }

  /* Stats */
  .stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: .6rem;
  }
  .stat {
    background: var(--surface);
    border-radius: 8px;
    padding: .65rem;
    border: 1px solid var(--border);
    text-align: center;
  }
  .stat .v { font-size: 1.2rem; font-weight: 700; color: var(--accent); }
  .stat .l { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

  /* Diagram */
  .diagram-box {
    background: var(--surface);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--border);
    touch-action: pan-y;
  }
  .diagram-box canvas { width: 100%; height: 550px; display: block; }
  #cvsCross { height: 640px; }
  #cvsSection { height: 580px; }

  @media (max-width: 768px) {
    .diagram-box canvas { height: 420px; }
    #cvsCross { height: 480px; }
    #cvsFront, #cvsSection { height: 440px; }
  }
  @media (max-width: 600px) {
    .diagram-box { padding: .5rem; }
    .diagram-box canvas { height: 300px; }
    #cvsCross { height: 340px; }
    #cvsFront, #cvsSection { height: 340px; }
  }
  @media print {
    body { background: #fff !important; color: #000 !important; }
    header, .input-col, .tabs, .tbl-wrap, #three-container, .three-controls,
    .site-footer, .ad-consent, .adsbygoogle, .no-print { display: none !important; }
    .app { display: block !important; max-width: 100% !important; padding: 0 !important; }
    .output-col { width: 100% !important; }
    .tab-content { display: block !important; }
    #tab-diagram { display: block !important; }
    .diagram-box { background: #fff !important; border: 1px solid #ccc !important; page-break-inside: avoid; margin-bottom: 12px !important; padding: 4px !important; }
    .diagram-box canvas { height: auto !important; }
    .stats { display: none !important; }
    #tab-buylist, #tab-cutlist, #tab-framing, #tab-3d { display: none !important; }

    .print-branding {
      display: flex !important;
      flex-wrap: wrap;
      align-items: baseline;
      justify-content: space-between;
      gap: .35rem 1rem;
      margin: 0 0 .75rem;
      padding: 0 0 .5rem;
      border-bottom: 2px solid #000;
      color: #000 !important;
      background: #fff !important;
    }
    .print-branding-title {
      font-size: 14pt;
      font-weight: 700;
      color: #000 !important;
    }
    .print-branding-meta,
    .print-branding-meta a {
      font-size: 9pt;
      color: #000 !important;
    }

    /* Buy-list print mode (body.print-buylist set by printBuyList) */
    body.print-buylist {
      background: #fff !important;
      color: #000 !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    body.print-buylist .app,
    body.print-buylist .output-col,
    body.print-buylist #tab-buylist,
    body.print-buylist .tbl-wrap,
    body.print-buylist .tbl-scroll {
      overflow: visible !important;
      max-height: none !important;
      height: auto !important;
    }
    body.print-buylist #tab-diagram,
    body.print-buylist #tab-cutlist,
    body.print-buylist #tab-framing,
    body.print-buylist #tab-3d { display: none !important; }
    body.print-buylist #tab-buylist { display: block !important; }
    body.print-buylist .tbl-wrap {
      display: block !important;
      background: #fff !important;
      border: 1px solid #000 !important;
      border-radius: 0 !important;
      box-shadow: none !important;
    }
    body.print-buylist .stats {
      display: grid !important;
      background: transparent !important;
      gap: .35rem !important;
      margin-bottom: .75rem !important;
      page-break-inside: avoid;
    }
    body.print-buylist .stat {
      background: #fff !important;
      border: 1px solid #999 !important;
      color: #000 !important;
    }
    body.print-buylist .stat .v,
    body.print-buylist .stat .l,
    body.print-buylist .stat .v[style],
    body.print-buylist .tbl-header,
    body.print-buylist .tbl-header .cost,
    body.print-buylist table,
    body.print-buylist th,
    body.print-buylist td,
    body.print-buylist .note,
    body.print-buylist .r {
      color: #000 !important;
      background: #fff !important;
    }
    body.print-buylist .tbl-header {
      border-bottom: 2px solid #000 !important;
      padding: .5rem 0 !important;
      font-size: 1rem !important;
    }
    body.print-buylist .tbl-header .cost {
      font-size: 1.1rem !important;
      font-weight: 700 !important;
    }
    body.print-buylist table { font-size: 9pt !important; }
    body.print-buylist th {
      background: #eee !important;
      color: #000 !important;
      border-bottom: 1px solid #000 !important;
      position: static !important;
      font-size: 8pt !important;
    }
    body.print-buylist td {
      border-bottom: 1px solid #ccc !important;
      padding: .28rem .4rem !important;
    }
    body.print-buylist tr:hover td { background: #fff !important; }
    body.print-buylist .cat-row td {
      background: #e8e8e8 !important;
      color: #000 !important;
      border-top: 1px solid #000 !important;
      border-bottom: 1px solid #000 !important;
      font-weight: 700 !important;
    }
    body.print-buylist .subtotal-row td {
      color: #000 !important;
      border-top: 1px solid #666 !important;
      font-weight: 600 !important;
    }
    body.print-buylist .total-row td {
      color: #000 !important;
      border-top: 2px solid #000 !important;
      font-weight: 700 !important;
      font-size: 10pt !important;
    }
    body.print-buylist .total-row td:last-child { color: #000 !important; }
    body.print-buylist .note { color: #333 !important; }
    body.print-buylist thead { display: table-header-group; }
    body.print-buylist tr { page-break-inside: avoid; }
  }

  .tbl-scroll {
    max-height: 70vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .tbl-scroll-pad { padding: 1rem; }
  #three-container { width: 100%; height: 500px; position: relative; border-radius: 8px; overflow: hidden; background: #9ec9f0; touch-action: none; }
  #three-container canvas { display: block; width: 100% !important; height: 100% !important; }
  .three-status {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 17, 23, 0.82);
    color: var(--text);
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    pointer-events: none;
  }
  .three-status[hidden] { display: none !important; }
  .three-controls { position: absolute; bottom: 10px; left: 10px; display: flex; gap: 6px; z-index: 10; }
  .three-controls button { padding: 4px 10px; border-radius: 4px; border: 1px solid var(--border); background: rgba(31,41,55,0.85); color: var(--text); font-size: .75rem; cursor: pointer; backdrop-filter: blur(4px); }
  .three-controls button:hover { border-color: var(--accent); }
  .three-controls button.active { background: var(--accent); color: #000; border-color: var(--accent); }

  /* Tables */
  .tbl-wrap {
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow: hidden;
  }
  .tbl-header {
    padding: .75rem 1rem;
    font-weight: 700;
    font-size: .9rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .tbl-header .cost { color: var(--accent); font-size: 1.1rem; }
  table { width: 100%; border-collapse: collapse; font-size: .8rem; }
  th {
    text-align: left;
    padding: .45rem .65rem;
    background: var(--card);
    color: var(--muted);
    font-weight: 600;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    position: sticky;
    top: 0;
  }
  td { padding: .4rem .65rem; border-bottom: 1px solid #1f2937; }
  tr:hover td { background: rgba(245,158,11,.04); }
  .r { text-align: right; font-variant-numeric: tabular-nums; }
  .cat-row td {
    background: var(--card);
    color: var(--accent);
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .55rem .65rem;
  }
  .subtotal-row td {
    font-weight: 600;
    border-top: 1px solid var(--dim);
    color: var(--accent3);
    font-size: .8rem;
  }
  .total-row td {
    font-weight: 700;
    border-top: 2px solid var(--accent);
    font-size: .95rem;
    padding: .65rem;
  }
  .total-row td:last-child { color: var(--accent); }
  .note { font-size: .7rem; color: var(--dim); font-style: italic; }
  .waste-tag {
    display: inline-block;
    font-size: .6rem;
    background: var(--card);
    color: var(--dim);
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 4px;
  }

  /* Cut list */
  .cut-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: .5rem;
    padding: .4rem .65rem;
    border-bottom: 1px solid #1f2937;
    font-size: .8rem;
    align-items: center;
  }
  .cut-item:hover { background: rgba(245,158,11,.04); }
  .cut-bar-wrap {
    width: 180px;
    height: 14px;
    background: var(--card);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
  }
  .cut-bar {
    height: 100%;
    background: var(--accent3);
    border-radius: 3px 0 0 3px;
  }
  .cut-bar.waste {
    background: var(--accent2);
    opacity: .5;
    border-radius: 0 3px 3px 0;
  }

  @media print { .ad-consent, .adsbygoogle, .site-footer, .no-print { display: none !important; } }
  @media (max-width: 960px) {
    section [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  }

  /* ===== COOKIE / AD CONSENT BANNER ===== */
  .ad-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 2px solid var(--accent);
    padding: .75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    z-index: 200;
    flex-wrap: wrap;
  }
  .ad-consent p { font-size: .82rem; color: var(--muted); flex: 1; min-width: 200px; }
  .ad-consent button { white-space: nowrap; }
  .ad-consent.hidden { display: none; }

  /* ===== SITE FOOTER / FEEDBACK ===== */
  .site-footer {
    margin-top: 2rem;
    border-top: 2px solid var(--accent);
    background: var(--surface);
    padding: 1.75rem 1.5rem 2rem;
  }
  .footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
  }
  .footer-feedback h2 {
    font-size: 1.05rem;
    margin-bottom: .35rem;
    color: var(--text);
  }
  .footer-feedback > p {
    color: var(--muted);
    font-size: .85rem;
    margin-bottom: 1rem;
    max-width: 52rem;
  }
  .feedback-form {
    display: grid;
    gap: .75rem;
    max-width: 520px;
  }
  .feedback-row {
    display: grid;
    gap: .3rem;
  }
  .feedback-row label {
    font-size: .75rem;
    color: var(--muted);
    font-weight: 600;
  }
  .feedback-form input,
  .feedback-form select,
  .feedback-form textarea {
    width: 100%;
    padding: .5rem .65rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: .85rem;
  }
  .feedback-form textarea { resize: vertical; min-height: 88px; }
  .feedback-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .25rem;
  }
  .footer-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    font-size: .8rem;
    color: var(--muted);
  }
  .footer-meta a {
    color: var(--accent);
    text-decoration: none;
  }
  .footer-meta a:hover { text-decoration: underline; }
  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem .55rem;
    align-items: center;
  }

  /* Lumber prices modal */
  .modal {
    border: none;
    padding: 0;
    margin: auto;
    position: fixed;
    inset: 0;
    width: min(720px, calc(100vw - 2rem));
    max-width: min(720px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    background: transparent;
    color: var(--text);
  }
  .modal::backdrop {
    background: rgba(0, 0, 0, 0.65);
  }
  .modal-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    border-top: 3px solid var(--accent);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2rem);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  }
  .modal-header {
    padding: 1rem 1.15rem .65rem;
    border-bottom: 1px solid var(--border);
  }
  .modal-header h2 {
    font-size: 1.05rem;
    margin: 0;
  }
  .modal-sub {
    margin: .35rem 0 0;
    font-size: .8rem;
    color: var(--muted);
  }
  .modal-body {
    padding: .85rem 1.15rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .price-grades {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  .price-grade h3 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--accent);
    margin: 0 0 .5rem;
  }
  .price-grade-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .4rem .65rem;
  }
  .price-row {
    display: grid;
    grid-template-columns: 1fr 4.5rem 2rem;
    align-items: center;
    gap: .25rem;
  }
  .price-row.price-mult-row {
    grid-template-columns: auto 4.5rem auto;
    max-width: 280px;
    gap: .4rem .5rem;
  }
  .price-row.price-mult-row .btn {
    padding: .3rem .65rem;
    font-size: .8rem;
  }
  .price-row label {
    font-size: .75rem;
    color: var(--muted);
  }
  .price-row input {
    width: 100%;
    padding: .3rem .35rem;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: var(--input-bg);
    color: var(--text);
    font: inherit;
    font-size: .8rem;
    text-align: right;
  }
  .price-row .unit {
    font-size: .68rem;
    color: var(--dim);
  }
  .modal-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .75rem 1.15rem 1rem;
    border-top: 1px solid var(--border);
  }
  .modal-footer-right {
    display: flex;
    gap: .5rem;
    margin-left: auto;
  }
