/* Keep the sail and the order information in view while editing. */
.builder-redesign .viewer-panel #canvas-wrap {
  height: clamp(470px, calc(100vh - 280px), 720px);
  min-height: 470px;
}

.builder-redesign .viewer-watermark {
  display: none;
}

.builder-redesign .swatches {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-height: none;
  overflow: visible;
  gap: 8px;
}

.builder-redesign .swatch {
  height: 49px;
}

.builder-redesign .price-fabric-preview {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
}

.builder-redesign .price-fabric-image {
  width: 76px;
  height: 76px;
  aspect-ratio: 1;
  border-radius: 5px;
}

.builder-redesign .price-fabric-caption {
  min-width: 0;
  margin-top: 0;
  gap: 3px;
}

.builder-redesign .price-fabric-caption strong {
  font-size: 13px;
  line-height: 1.35;
}

.builder-redesign .price-head {
  padding: 16px 18px;
}

.builder-redesign .studio-specs {
  padding-top: 4px;
  padding-bottom: 8px;
}

.builder-redesign .studio-specs > div {
  padding: 6px 0;
}

@media (max-width: 850px) {
  .builder-redesign .viewer-panel #canvas-wrap {
    height: 46vh;
    min-height: 320px;
    max-height: 520px;
  }
}

@media (max-width: 580px) {
  .builder-redesign .swatches {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .builder-redesign .viewer-panel #canvas-wrap {
    height: 42vh;
    min-height: 300px;
  }
}

/* Align the desktop controls and 3D stage at the bottom of the workspace. */
@media (min-width: 1251px) {
  .builder-redesign .workspace {
    --builder-stage-height: clamp(780px, calc(100dvh - 60px), 1220px);
  }

  .builder-redesign .controls,
  .builder-redesign .viewer-panel {
    height: var(--builder-stage-height);
    min-height: 0;
    max-height: var(--builder-stage-height);
  }

  .builder-redesign .viewer-panel {
    display: flex;
    flex-direction: column;
  }

  .builder-redesign .viewer-top,
  .builder-redesign .sun-toolbar,
  .builder-redesign .viewer-bottom {
    flex: none;
  }

  .builder-redesign .viewer-panel #canvas-wrap {
    flex: 1 1 auto;
    height: auto;
    min-height: 0;
    max-height: none;
  }
}

/* Give the empty space below the model a useful, readable design summary. */
.builder-standard .sail-detail-panel {
  margin-top: 12px;
  padding: clamp(20px, 2vw, 30px);
  background: #1b2532;
  border: 1px solid #394a5f;
  border-radius: 7px;
  color: #f3f7fc;
  box-shadow: 0 16px 45px #0004;
}
.sail-detail-heading { display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:20px; }
.sail-detail-heading h2 { margin:5px 0 4px;font-size:clamp(21px,1.6vw,28px);line-height:1.15; }
.sail-detail-heading p { margin:0;color:#aabbd0;font-size:13px; }
.detail-live { display:inline-flex;align-items:center;gap:7px;white-space:nowrap;color:#9fc9fd;font-size:10px;font-weight:800;letter-spacing:.12em; }
.detail-live span { width:7px;height:7px;border-radius:50%;background:#42dba5;box-shadow:0 0 0 3px #42dba524; }
.sail-detail-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.sail-detail-card { min-width:0;min-height:96px;padding:16px 18px;background:#202e3e;border:1px solid #3c5169;border-radius:6px; }
.sail-detail-card > span,.sail-detail-card > div > span { display:block;margin-bottom:8px;color:#88b8ee;font-size:10px;font-weight:800;letter-spacing:.11em; }
.sail-detail-card strong { display:block;overflow-wrap:anywhere;font-size:15px;line-height:1.3; }
.sail-detail-card p { margin:5px 0 0;color:#c0ccdb;font-size:12px;line-height:1.4;overflow-wrap:anywhere; }
.detail-fabric-card { display:flex;align-items:center;gap:16px; }
.detail-fabric-card img { flex:none;width:62px;height:62px;object-fit:cover;background:#f5f5f5;border:1px solid #5d6f82;border-radius:5px; }
.sail-detail-note { margin:16px 0 0;color:#9faec0;font-size:11px;line-height:1.45; }
.sail-detail-edit{margin-top:12px;padding:4px 0;border:0;background:transparent;color:#91c7ff;font-size:11px;font-weight:800;text-align:left;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.sail-detail-edit:hover{color:#fff}
html[data-theme=light] .sail-detail-edit{color:#155d9d}
.builder-redesign .viewer-panel #canvas-wrap{background:linear-gradient(180deg,#344b61 0%,#617891 46%,#b8a992 100%)}
.builder-redesign .viewer-watermark{display:block;left:auto;right:22px;top:22px;max-width:calc(100% - 44px);transform:none;font:800 clamp(12px,1.6vw,17px) Manrope,Arial,sans-serif;letter-spacing:.035em;opacity:.58;text-align:right;text-shadow:0 1px 9px #14283aaa}
@media(max-width:700px){.builder-redesign .viewer-watermark{right:13px;top:11px;font-size:12px;transform:none}}

@media (min-width: 1251px) {
  .builder-standard .controls { min-height:0;max-height:none; }
  .builder-standard .design-column { display:flex;flex-direction:column;min-height:0; }
  .builder-standard .sail-detail-panel { flex:1 1 auto;min-height:0;overflow:auto; }
}
@media (max-width: 700px) {
  .sail-detail-heading { flex-direction:column;gap:8px; }
  .sail-detail-grid { grid-template-columns:1fr; }
}

/* A short guide makes the design, save, and order path visible. */
.builder-steps {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:0;
  padding:16px clamp(18px,2.1vw,48px);
  background:#142234;
  border-top:1px solid #31465c;
  border-bottom:1px solid #31465c;
}
.builder-step {
  position:relative;
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  min-height:66px;
  padding:8px clamp(12px,1.4vw,26px);
  border:0;
  border-radius:0;
  background:transparent;
  color:#eaf2fc;
}
.builder-step:first-child{padding-left:0}
.builder-step:not(:last-child)::after{content:"";position:absolute;right:0;top:12px;bottom:12px;width:1px;background:#3e5872}
.builder-step > span {
  flex:none;
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:50%;
  background:#1479f6;
  color:#fff;
  box-shadow:0 0 0 4px #1479f622;
  font-size:14px;
  font-weight:800;
}
.builder-step strong { display:block;margin:0 0 4px;font-size:15px;line-height:1.2; }
.builder-step p { margin:0;color:#bfd0e2;font-size:12px;line-height:1.4; }
.builder-redesign .save-explainer {
  margin:8px 0 0;
  color:#bdcde0;
  font-size:11px;
  line-height:1.45;
}
@media (max-width: 1100px) { .builder-steps { grid-template-columns:repeat(2,minmax(0,1fr)); }.builder-step:nth-child(2)::after{display:none}.builder-step:nth-child(n+3){border-top:1px solid #3e5872} }
@media (max-width: 570px) { .builder-steps { grid-template-columns:1fr;padding:10px 18px }.builder-step{padding:12px 0}.builder-step:not(:last-child)::after{display:none}.builder-step+.builder-step{border-top:1px solid #3e5872} }

/* Account → projects → shade sails reads as one vertical list. */
.builder-redesign .company-home{max-width:1100px;margin:14px auto;border:1px solid #34485e;border-radius:8px}
.builder-redesign .company-home-account{display:block;margin:18px 0;padding:20px;border:1px solid #3c5874;border-radius:7px}
.builder-redesign .company-home-account [hidden]{display:none!important}
.account-profile-heading h3{margin:5px 0;color:#f5f8ff;font-size:20px}
.account-profile-heading p{margin:4px 0 16px;color:#b4c6db;font-size:12px}
.account-profile-editor{border-top:1px solid #3a5370;padding-top:12px}
.account-profile-editor summary{cursor:pointer;color:#b6d6fb;font-weight:800;font-size:12px}
.account-profile-editor[open] form{margin-top:16px}
.company-home-new-project-form[hidden]{display:none!important}
.company-home-new-project-form{margin:14px 0 18px;padding:22px;background:#203249;border:1px solid #48709a;border-radius:7px;color:#e9f4ff}
.company-home-new-project-form h3{margin:5px 0 6px;font-size:21px}
.company-home-new-project-form p{margin:0 0 17px;color:#bbd1e7;font-size:12px}
.company-home-new-project-form form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.company-home-new-project-form label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800}
.company-home-new-project-form input,.company-home-new-project-form select{width:100%;min-height:40px;padding:9px 11px;background:#111b28;border:1px solid #50647e;border-radius:5px;color:#f7fbff}
.new-project-actions{grid-column:1/-1;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.new-project-actions button{padding:10px 14px;border:1px solid #137dfb;border-radius:5px;background:#137dfb;color:#fff;font-weight:800;cursor:pointer}
.new-project-actions button[data-cancel]{background:transparent;border-color:#667e99}
.new-project-actions [role="status"]{color:#c6def4;font-size:12px}
#account-profile-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px;width:100%}
#account-profile-form label,.company-home-project-edit label{display:flex;flex-direction:column;gap:6px;color:#dceafa;font-size:12px;font-weight:700}
#account-profile-form input,#account-profile-form select,.company-home-project-edit input{width:100%;min-height:40px;padding:9px 11px;background:#111b28;border:1px solid #50647e;border-radius:5px;color:#f7fbff}
#account-profile-form input[readonly]{opacity:.8}
.profile-save-row{grid-column:1/-1;display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.profile-save-row button,.company-home-project-edit button,.company-home-new-project,.company-home-add-sail{border:1px solid #137dfb;border-radius:5px;background:#137dfb;color:#fff;padding:10px 14px;font-weight:800;text-decoration:none;cursor:pointer}
.profile-save-row span{font-size:12px;color:#bbd2ed}
.builder-redesign #company-home-list,.builder-redesign .company-home-group{display:flex;flex-direction:column;gap:10px;width:100%}
.builder-redesign .company-home-project{width:100%;padding:0;overflow:hidden}
.builder-redesign .company-home-location{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 20px;cursor:pointer}
.builder-redesign .company-home-location strong{font-size:17px}
.builder-redesign .company-home-location span{font-size:12px}
.builder-redesign .company-home-project[open] .company-home-location{border-bottom:1px solid #3b5068;background:#22354b}
.builder-redesign .company-home-sails{padding:0 20px;margin:0}
.company-home-project-actions{display:flex;align-items:center;gap:10px;padding:14px 20px;flex-wrap:wrap}
.company-home-cart-add-all{border:1px solid #137dfb;border-radius:5px;background:#137dfb;color:#fff;padding:10px 14px;font-weight:800;cursor:pointer}
.company-home-cart-add-all:disabled{opacity:.55;cursor:not-allowed}
.company-home-cart-all-status{color:#bed6ef;font-size:12px}
.company-home-delete-project,.company-home-delete{border:1px solid #a6505b;border-radius:5px;background:transparent;color:#ffc5cd;padding:8px 11px;cursor:pointer;font-weight:700}
.company-home-project-edit{margin:0 20px 18px;border:1px solid #455975;border-radius:6px;padding:12px;color:#e4efff}
.company-home-project-edit summary{cursor:pointer;font-weight:800}
.company-home-project-edit form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:14px}
.company-home-project-edit form button,.company-home-project-edit form p{grid-column:1/-1;margin:0}
#company-home-head-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#company-home-head-actions>a{font-size:12px;font-weight:800;color:#a8cfff;text-decoration:none}
#company-home-head-actions .company-home-new-project{color:#fff}
.builder-redesign .company-home-sail-link{font-weight:800}

/* Keep the selected project, sail name, and save action visible above the model. */
.builder-identity{display:flex;align-items:end;gap:18px;padding:15px 20px;background:#1b2735;border:1px solid #3b5069;border-radius:7px;color:#f2f7ff}
.builder-identity>div:first-child{min-width:160px;max-width:32%}
.builder-identity .builder-project-switch{width:clamp(170px,20vw,260px);min-width:0;max-width:32%;flex:none}
.builder-project-select{display:block!important;margin:0!important;color:#8abaff!important;font-size:10px!important;font-weight:800!important;letter-spacing:.12em}
.builder-project-select select{display:block;width:100%;height:40px;margin:6px 0 0;padding:0 30px 0 11px;border:1px solid #536a85;border-radius:5px;background:#121d2a;color:#fff;font-size:14px;font-weight:700;letter-spacing:normal;cursor:pointer;text-overflow:ellipsis}
.builder-project-select select:focus-visible{outline:2px solid #81b9ff;outline-offset:2px}
.builder-identity span{display:block;color:#8abaff;font-size:10px;font-weight:800;letter-spacing:.12em;margin-bottom:6px}
.builder-identity strong{display:block;font-size:17px;overflow-wrap:anywhere}
.builder-sail-name{flex:1;min-width:180px}
.builder-sail-name label{display:block;font-size:0;margin:0}
.builder-sail-name input{width:100%;height:40px;margin:0;padding:9px 11px;border:1px solid #536a85;border-radius:5px;background:#121d2a;color:#fff;font-size:14px}
#builder-save-file{height:40px;padding:0 17px;border:1px solid #1479f6;border-radius:5px;background:#1479f6;color:#fff;font-weight:800;cursor:pointer;white-space:nowrap}
#builder-save-file:disabled{opacity:.6;cursor:wait}
.builder-flow-dialog{max-width:min(92vw,480px);width:100%;border:1px solid #5b789b;border-radius:9px;padding:25px;background:#1b2735;color:#f4f8ff;box-shadow:0 20px 70px #0009}
.builder-flow-dialog::backdrop{background:#06111dc9}
.builder-flow-dialog h2{margin:0 0 10px;font-size:23px}
.builder-flow-dialog p{font-size:13px;line-height:1.5;color:#c3d0e2}
.builder-flow-dialog label{display:block;margin:14px 0;font-size:12px;font-weight:800}
.builder-flow-dialog input,.builder-flow-dialog select{display:block;width:100%;height:42px;margin-top:6px;padding:8px 10px;background:#101a27;border:1px solid #5c7190;border-radius:5px;color:#fff}
.builder-dialog-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:20px}
.builder-dialog-actions button{padding:10px 13px;border:1px solid #527092;border-radius:5px;background:#23354b;color:#fff;font-weight:800;cursor:pointer}
.builder-dialog-actions button:last-child{background:#1479f6;border-color:#1479f6}
@media(max-width:720px){#account-profile-form,.company-home-project-edit form,.company-home-new-project-form form{grid-template-columns:1fr}.builder-identity{align-items:stretch;flex-direction:column}.builder-identity .builder-project-switch{width:100%;max-width:none}.builder-sail-name{min-width:0}.builder-redesign .company-home-location{align-items:flex-start;flex-direction:column}}

/* Keep the account and project workflow aligned with the full-width builder. */
.builder-redesign .company-home{box-sizing:border-box;width:100%;max-width:none;margin:0;border-left:0;border-right:0;border-radius:0;padding:22px clamp(18px,2.1vw,48px) 28px}
.builder-redesign .company-home-account{margin:16px 0;padding:22px;background:#203249}
.builder-redesign #company-home-list,.builder-redesign .company-home-group{display:flex;flex-direction:column;gap:12px;width:100%}
.builder-redesign .company-home-project{width:100%;margin:0}
.builder-redesign .company-home-location{flex-direction:row;justify-content:flex-start;gap:14px;min-height:64px}
.builder-redesign .company-home-project-title{display:flex;flex-direction:column;gap:4px;min-width:0}
.builder-redesign .company-home-project-label{color:#85b7f6;font-size:10px;font-weight:800;letter-spacing:.13em}
.builder-redesign .company-home-project-name{font-size:17px}
.builder-redesign .company-home-project-count{margin-left:auto;color:#b9cce1}
.builder-redesign .company-home-project-toggle{display:inline-flex;align-items:center;gap:8px;color:#e8f2ff;font-weight:800;white-space:nowrap}
.builder-redesign .company-home-project-toggle::after{content:'⌄';font-size:20px;line-height:1;transition:transform .18s ease}
.builder-redesign .company-home-project[open] .company-home-project-toggle::after{transform:rotate(180deg)}
.builder-redesign .company-home-sail{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0}
.company-home-sail-detail{display:flex;align-items:center;gap:14px;min-width:0}
.company-home-sail-description{display:flex;flex-direction:column;gap:3px;min-width:0}
.company-home-sail-description span{font-size:12px;color:#b9cce1}
.company-home-color-swatch{display:block;flex:none;width:48px;height:48px;border:2px solid #8aa4bc;border-radius:9px;box-shadow:inset 0 0 0 2px #ffffff22}
.builder-redesign .company-home-sail-price{display:block;color:#e9f4ff;font-size:13px}
.builder-redesign .company-home-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.builder-redesign .company-home-actions button.company-home-cart-add{padding:9px 13px;border:1px solid #1479f6;border-radius:5px;background:#1479f6;color:white;font-weight:800;cursor:pointer;white-space:nowrap}
.builder-redesign .company-home-actions button.company-home-cart-add:disabled{opacity:.7;cursor:wait}
.company-home-cart-status{margin:0;color:#ffbac2;font-size:13px}
.company-home-cart-status:empty{display:none}
.header-cart-link{display:inline-flex;align-items:center;gap:7px;white-space:nowrap}
.header-cart-link span{display:inline-grid;place-items:center;min-width:19px;height:19px;padding:0 5px;border-radius:20px;background:#1479f6;color:#fff;font-size:11px}
@media(max-width:720px){.builder-redesign .company-home{padding:16px 12px 22px}.builder-redesign .company-home-sail{align-items:flex-start;flex-direction:column}.builder-redesign .company-home-actions{justify-content:flex-start;width:100%}.builder-redesign .company-home-project-count{margin-left:0}}
.page-title-screen-reader{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.topbar{position:sticky;top:0;z-index:1000;box-shadow:0 8px 22px #07111d55}
.builder-redesign .studio-context{display:none!important}
/* Keep the project list quick to scan without hiding any actions. */
.builder-redesign .company-home-head{margin-bottom:9px}
.builder-redesign #company-home-list,.builder-redesign .company-home-group{gap:6px}
.builder-redesign .company-home-group>.company-home-company{margin:7px 0 2px;font-size:11px;line-height:1.2}
.builder-redesign .company-home-location{min-height:50px;padding:9px 14px;gap:10px}
.builder-redesign .company-home-project-title{gap:2px}
.builder-redesign .company-home-project-name{font-size:15px}
.builder-redesign .company-home-project-label{font-size:9px}
.builder-redesign .company-home-project-count,.builder-redesign .company-home-project-toggle{font-size:11px}
.builder-redesign .company-home-sail{padding:10px 0}
.builder-redesign .company-home-sails{padding:0 14px}
.builder-redesign .company-home-project-actions{padding:10px 14px}
.topbar .header-login-status{margin-right:auto;color:#b8d9fa;font-size:12px;font-weight:800;white-space:nowrap}
.topbar a[hidden]{display:none!important}
.builder-redesign .project-bar{display:none}
.builder-redesign .studio-project-drawer .project-bar{display:block}
.fabric-zoom-preview{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:#06111dcc;pointer-events:none}
.fabric-zoom-preview[hidden]{display:none!important}
.fabric-zoom-card{width:min(520px,calc(100vw - 32px));padding:16px;background:#1d2d40;border:1px solid #83a3c6;border-radius:12px;box-shadow:0 22px 70px #0009;color:#f4f8ff}
.fabric-zoom-sample{aspect-ratio:1;background:#fff center/cover no-repeat;border-radius:8px;border:1px solid #a8b8c9}
.fabric-zoom-card strong{display:block;margin-top:12px;font-size:18px}
.fabric-zoom-card small{display:block;margin-top:3px;color:#b9d0ea}
.standard-deduction-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0}
.standard-deduction-grid label{font-size:11px;font-weight:800}
.standard-deduction-grid .standard-hardware-entry{margin-top:5px}
.standard-deduction-grid input:disabled{opacity:.55}
.standard-deduction-total{padding:10px 12px;border:1px solid #3a5774;border-radius:5px;background:#21354a;color:#d8e9fa;font-size:12px}
.standard-deduction-total strong{color:#fff}
@media(max-width:560px){.standard-deduction-grid{grid-template-columns:1fr}}
.account-signup-dialog{width:min(680px,calc(100vw - 26px));max-height:calc(100vh - 30px);overflow:auto;padding:26px;background:#1b2c41;border:1px solid #5a7fa5;border-radius:10px;color:#f1f7ff;box-shadow:0 25px 75px #0009}
.account-signup-dialog::backdrop{background:#070f1bcf}
.account-signup-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px}
.account-signup-head h2{margin:4px 0 0;font-size:28px}
.account-signup-head [data-close]{border:0;background:transparent;color:#fff;font-size:28px;cursor:pointer}
.account-signup-dialog>p{color:#c3d6eb;font-size:13px}
.account-signup-dialog form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 16px}
.account-signup-dialog label{display:flex;flex-direction:column;gap:6px;font-size:12px;font-weight:800}
.account-signup-dialog input,.account-signup-dialog select{width:100%;min-height:40px;padding:9px 11px;background:#101b29;border:1px solid #59718e;border-radius:5px;color:#fff}
.account-signup-dialog [hidden]{display:none!important}
.account-signup-actions,.account-signup-dialog form [role="status"]{grid-column:1/-1}
.account-signup-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.account-signup-actions button{padding:11px 18px;border:1px solid #137dfb;border-radius:5px;background:#137dfb;color:#fff;font-weight:800;cursor:pointer}
.account-signup-actions a{color:#aad1ff;font-size:12px}
.account-signup-dialog form [role="status"]{min-height:18px;margin:0;color:#d5e8ff;font-size:12px}
@media(max-width:720px){.account-signup-dialog form{grid-template-columns:1fr}.topbar .header-login-status{order:3;width:100%;margin:0}}

.from-the-blog{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 14px;margin:18px 0 0;padding:14px 0 2px;border-top:1px solid #d5ddd8;font-size:13px;line-height:1.45}
.from-the-blog span{font-size:10px;letter-spacing:.16em;font-weight:800;text-transform:uppercase;color:#8a6a3f}
.from-the-blog a{color:#9d6638;font-weight:700;text-decoration:none}
.from-the-blog a:hover,.from-the-blog a:focus-visible{text-decoration:underline}
html[data-theme=light] .from-the-blog{border-color:#c6d7e7}
