/* Premium homeowner workspace built on the existing warm architectural system. */
body[data-route="design"],
body[data-route="studio"] {
  --pw-canvas: var(--arch-paper, #f2eee6);
  --pw-surface: var(--arch-paper-raised, #fbf8f2);
  --pw-inset: var(--arch-paper-deep, #e5ded2);
  --pw-ink: var(--arch-ink, #211f1b);
  --pw-ink-soft: var(--arch-ink-soft, #37332d);
  --pw-muted: var(--arch-muted, #686159);
  --pw-rule: var(--arch-rule, #bcb3a5);
  --pw-rule-soft: var(--arch-rule-soft, #d9d0c3);
  --pw-clay: var(--arch-clay, #a84631);
  --pw-clay-dark: var(--arch-clay-dark, #843524);
  --pw-clay-soft: var(--arch-clay-soft, #f0ded7);
  --pw-moss: var(--arch-moss, #526158);
  --pw-moss-soft: var(--arch-moss-soft, #e4e9e3);
  --pw-error: var(--arch-error, #8e3529);
  --pw-shadow-soft: var(--arch-shadow-soft, 0 8px 26px rgba(58, 49, 39, .07));
  --pw-shadow-lift: var(--arch-shadow-lift, 0 16px 36px rgba(58, 49, 39, .12));
  margin: 0;
  background: var(--pw-inset);
  color: var(--pw-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

body:is([data-route="design"], [data-route="studio"]) #app {
  width: 100%;
  max-width: none;
  margin: 0;
  background: var(--pw-canvas);
  box-shadow: none;
}

body[data-route="design"] #header,
body[data-route="design"] #cta-bar,
body[data-route="studio"] #header { display: none !important; }
body:is([data-route="design"], [data-route="studio"]) #screen { padding: 0; overflow: visible; }
body:is([data-route="design"], [data-route="studio"]) .screen-enter { animation: pw-enter .28s ease-out both; }
body:is([data-route="design"], [data-route="studio"]) :is(button, a, input, textarea):focus-visible {
  outline: 3px solid var(--pw-clay);
  outline-offset: 3px;
}

.pw-route-root { width: 100%; min-width: 0; }
.pw-shell { min-height: 100vh; min-height: 100dvh; color: var(--pw-ink); background: var(--pw-canvas); }
.pw-icon { display: block; flex: 0 0 auto; }

.pw-topbar {
  position: sticky;
  z-index: 70;
  top: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 64px;
  border-bottom: 1px solid var(--pw-rule-soft);
  background: rgba(251, 248, 242, .98);
}

.pw-brand {
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 11px;
  padding: 0 22px;
  border: 0;
  border-right: 1px solid var(--pw-rule-soft);
  background: transparent;
  color: var(--pw-ink);
  text-align: left;
  cursor: pointer;
}
.pw-brand-mark {
  width: 24px;
  height: 24px;
  border-bottom: 4px solid var(--pw-clay);
  border-left: 4px solid var(--pw-clay);
}
.pw-brand > span:last-child { display: grid; min-width: 0; gap: 2px; }
.pw-brand strong { font-size: 12px; letter-spacing: .09em; }
.pw-brand small { color: var(--pw-muted); font-size: 7px; letter-spacing: .13em; }

.pw-global-nav {
  display: flex;
  min-width: 0;
  align-items: stretch;
  justify-content: center;
  overflow-x: auto;
  padding: 0 8px;
  scrollbar-width: none;
}
.pw-global-nav::-webkit-scrollbar { display: none; }
.pw-global-nav button {
  position: relative;
  min-width: max-content;
  min-height: 44px;
  padding: 0 clamp(10px, 1.5vw, 20px);
  border: 0;
  background: transparent;
  color: var(--pw-muted);
  font: 650 11px/1 inherit;
  cursor: pointer;
}
.pw-global-nav button::after {
  position: absolute;
  right: 14px;
  bottom: -1px;
  left: 14px;
  height: 2px;
  background: transparent;
  content: '';
}
.pw-global-nav button:hover { color: var(--pw-ink); }
.pw-global-nav button.is-active { color: var(--pw-ink); }
.pw-global-nav button.is-active::after { background: var(--pw-clay); }

.pw-topbar-actions { display: flex; align-items: center; gap: 4px; padding: 8px 18px 8px 8px; }
.pw-icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--pw-ink-soft);
  cursor: pointer;
}
.pw-icon-button:hover { border-color: var(--pw-rule-soft); background: var(--pw-canvas); }
.pw-account-button {
  display: flex;
  max-width: 220px;
  min-height: 44px;
  align-items: center;
  gap: 9px;
  margin-left: 3px;
  padding: 3px 0 3px 3px;
  border: 0;
  background: transparent;
  color: var(--pw-ink);
  text-align: left;
  cursor: pointer;
}
.pw-account-avatar {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--pw-inset);
  color: var(--pw-ink-soft);
  font-size: 10px;
  font-weight: 800;
}
.pw-account-button > span:nth-child(2) { display: grid; min-width: 0; gap: 1px; }
.pw-account-button small { color: var(--pw-muted); font-size: 7px; letter-spacing: .1em; }
.pw-account-button strong { overflow: hidden; max-width: 112px; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pw-account-button > .pw-icon { width: 15px; }

.pw-unit-slot { margin-right: 5px; }
.pw-unit-slot .us-unit-toggle {
  min-height: 44px;
  padding: 2px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-canvas);
}
.pw-unit-slot .us-unit-toggle button {
  min-width: 47px;
  min-height: 38px;
  border-radius: 0;
  color: var(--pw-muted);
  font-size: 9px;
}
.pw-unit-slot .us-unit-toggle button.is-active {
  background: var(--pw-surface);
  color: var(--pw-ink);
  box-shadow: inset 0 -2px var(--pw-clay);
}

.pw-shell-body { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; }
.pw-rail {
  position: sticky;
  z-index: 30;
  top: 64px;
  display: flex;
  height: calc(100vh - 64px);
  height: calc(100dvh - 64px);
  min-height: 520px;
  flex-direction: column;
  padding: 22px 14px 18px;
  overflow-y: auto;
  border-right: 1px solid var(--pw-rule-soft);
  background: var(--pw-surface);
}

.pw-active-project {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 14px 10px;
  border: 1px solid var(--pw-rule-soft);
  background: var(--pw-canvas);
}
.pw-project-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--pw-clay);
  color: var(--pw-clay);
}
.pw-project-mark .pw-icon { width: 18px; }
.pw-active-project > div { display: grid; min-width: 0; gap: 4px; }
.pw-active-project small,
.pw-manager-title small { color: var(--pw-muted); font-size: 7px; font-weight: 750; letter-spacing: .11em; }
.pw-active-project strong { overflow: hidden; font: 400 13px/1.25 Georgia, "Times New Roman", serif; text-overflow: ellipsis; }
.pw-active-project .pw-icon-button { width: 30px; height: 30px; }
.pw-active-project .pw-icon-button .pw-icon { width: 14px; }
.pw-status-pill {
  width: max-content;
  max-width: 100%;
  padding: 4px 7px;
  background: var(--pw-clay-soft);
  color: var(--pw-clay-dark);
  font-size: 8px;
  font-weight: 750;
}

.pw-project-nav { display: grid; gap: 2px; margin-top: 18px; }
.pw-project-nav button {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: transparent;
  color: var(--pw-muted);
  font: 650 10.5px/1.2 inherit;
  text-align: left;
  cursor: pointer;
}
.pw-project-nav .pw-icon { width: 17px; height: 17px; }
.pw-project-nav button:hover { border-color: var(--pw-rule-soft); color: var(--pw-ink); }
.pw-project-nav button.is-active {
  border-color: var(--pw-rule-soft);
  background: var(--pw-clay-soft);
  color: var(--pw-clay-dark);
  box-shadow: inset 2px 0 var(--pw-clay);
}

.pw-manager-card {
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--pw-rule-soft);
  background: var(--pw-canvas);
}
.pw-manager-title { display: flex; align-items: center; gap: 9px; }
.pw-manager-title > div { display: grid; gap: 2px; }
.pw-manager-title strong { font-size: 10px; }
.pw-manager-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--pw-moss-soft);
  color: var(--pw-moss);
  font-size: 9px;
  font-weight: 800;
}
.pw-manager-card p { margin: 11px 0; color: var(--pw-muted); font-size: 9px; line-height: 1.5; }
.pw-manager-card .pw-manager-chat { width: 100%; }

.pw-main {
  width: 100%;
  max-width: 1450px;
  min-width: 0;
  margin: 0 auto;
  padding: 28px clamp(24px, 2.7vw, 42px) 56px;
}
.pw-main h1,
.pw-main h2,
.pw-main h3,
.pw-main p { margin-top: 0; }

.pw-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 19px;
  border-bottom: 1px solid var(--pw-ink);
}
.pw-eyebrow { display: block; color: var(--pw-clay); font-size: 9px; font-weight: 800; letter-spacing: .15em; }
.pw-page-header h1,
.pw-empty-state h1 {
  margin: 7px 0 8px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 3.2vw, 46px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -.035em;
}
.pw-project-facts { display: flex; flex-wrap: wrap; gap: 7px 19px; color: var(--pw-muted); font-size: 10px; }
.pw-project-facts span { position: relative; }
.pw-project-facts span + span::before {
  position: absolute;
  top: .62em;
  left: -11px;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--pw-rule);
  content: '';
}
.pw-page-actions { display: flex; flex: 0 0 auto; gap: 8px; }

.pw-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 15px;
  border: 1px solid var(--pw-rule);
  border-radius: 2px;
  background: transparent;
  color: var(--pw-ink);
  font: 700 10px/1 inherit;
  letter-spacing: .025em;
  cursor: pointer;
}
.pw-button > .pw-icon { width: 16px; height: 16px; }
.pw-button--primary { border-color: var(--pw-clay); background: var(--pw-clay); color: #fffaf2; }
.pw-button--primary:hover { border-color: var(--pw-clay-dark); background: var(--pw-clay-dark); }
.pw-button--secondary:hover { border-color: var(--pw-ink); background: var(--pw-surface); }
.pw-button--ink { border-color: var(--pw-ink); background: var(--pw-ink); color: #f7f2e9; }
.pw-button--ink:hover { background: var(--pw-clay-dark); border-color: var(--pw-clay-dark); }
.pw-button:disabled { cursor: not-allowed; opacity: .5; }

.pw-stage-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  margin: 0;
  padding: 21px 0 24px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}
.pw-stage-stepper::-webkit-scrollbar { display: none; }
.pw-stage { position: relative; display: grid; justify-items: center; gap: 8px; min-width: 0; text-align: center; }
.pw-stage::before {
  position: absolute;
  z-index: 0;
  top: 15px;
  right: 50%;
  left: -50%;
  height: 1px;
  background: var(--pw-rule-soft);
  content: '';
}
.pw-stage:first-child::before { display: none; }
.pw-stage--complete::before,
.pw-stage--current::before { background: var(--pw-clay); }
.pw-stage-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid var(--pw-rule);
  border-radius: 50%;
  background: var(--pw-surface);
  color: var(--pw-muted);
  font: 700 9px/1 inherit;
}
.pw-stage-marker .pw-icon { width: 14px; }
.pw-stage--complete .pw-stage-marker { border-color: var(--pw-ink); background: var(--pw-ink); color: #f7f2e9; }
.pw-stage--current .pw-stage-marker {
  border: 2px solid var(--pw-clay);
  color: var(--pw-clay-dark);
  box-shadow: 0 0 0 4px var(--pw-clay-soft);
}
.pw-stage-copy { display: grid; min-width: 0; gap: 2px; }
.pw-stage-copy strong { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pw-stage-copy small { color: var(--pw-muted); font-size: 7.5px; }
.pw-stage--current .pw-stage-copy strong { color: var(--pw-clay-dark); }

.pw-next-decision {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 15px 16px;
  border: 1px solid var(--pw-clay);
  background: var(--pw-clay-soft);
}
.pw-decision-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--pw-clay);
  color: var(--pw-clay-dark);
  font: 400 13px/1 Georgia, "Times New Roman", serif;
}
.pw-next-decision small { color: var(--pw-clay-dark); font-size: 7px; font-weight: 800; letter-spacing: .12em; }
.pw-next-decision h2 { margin: 3px 0 2px; font: 400 17px/1.2 Georgia, "Times New Roman", serif; }
.pw-next-decision p { margin-bottom: 0; color: var(--pw-muted); font-size: 9px; line-height: 1.45; }

.pw-home-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.pw-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-surface);
}
.pw-plan-card { grid-column: span 7; }
.pw-materials-card { grid-column: span 5; }
.pw-summary-card { grid-column: span 3; }
.pw-estimate-card { grid-column: span 4; }
.pw-contractors-card { grid-column: span 5; }
.pw-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.pw-section-heading h2 { margin-bottom: 3px; font: 400 17px/1.2 Georgia, "Times New Roman", serif; }
.pw-section-heading p { max-width: 540px; margin-bottom: 0; color: var(--pw-muted); font-size: 8.5px; line-height: 1.45; }
.pw-text-action {
  display: inline-flex;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid var(--pw-rule);
  background: transparent;
  color: var(--pw-clay-dark);
  font: 700 9px/1 inherit;
  cursor: pointer;
}
.pw-text-action:hover { border-bottom-color: var(--pw-clay); color: var(--pw-clay); }
.pw-text-action .pw-icon { width: 14px; }

.pw-view-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  border: 1px solid var(--pw-rule-soft);
  background: var(--pw-canvas);
}
.pw-view-toggle button {
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: var(--pw-muted);
  font: 700 8px/1 inherit;
  cursor: pointer;
}
.pw-view-toggle button.is-active { background: var(--pw-ink); color: #f7f2e9; }
.pw-plan-display { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 7px; }
.pw-plan-pane { min-width: 0; margin: 0; border: 1px solid var(--pw-rule-soft); background: var(--pw-canvas); }
.pw-plan-pane figcaption {
  padding: 8px 10px;
  border-bottom: 1px solid var(--pw-rule-soft);
  color: var(--pw-muted);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: .12em;
}
.pw-floor-plan { display: block; width: 100%; height: 335px; background: #f7f2e9; }
.pw-live-scene { position: relative; height: 335px; overflow: hidden; background: var(--pw-ink); color: #f7f2e9; }
.pw-live-scene canvas { display: block; width: 100%; height: 100%; }
.pw-scene-loading {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 20px;
  background: var(--pw-ink);
  text-align: center;
}
.pw-scene-loading > span {
  width: 26px;
  height: 26px;
  margin-bottom: 3px;
  border: 2px solid #5d574f;
  border-top-color: #e17a61;
  border-radius: 50%;
  animation: pw-spin .8s linear infinite;
}
.pw-scene-loading strong { font-size: 11px; }
.pw-scene-loading small { color: #c7beb2; font-size: 8px; }
.pw-live-scene.is-unavailable { display: grid; place-content: center; gap: 5px; padding: 20px; text-align: center; }
.pw-live-scene.is-unavailable strong { font-size: 11px; }
.pw-live-scene.is-unavailable small { color: #c7beb2; font-size: 8px; }
.pw-room-chips {
  display: flex;
  gap: 5px;
  margin-top: 9px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.pw-room-chips::-webkit-scrollbar { display: none; }
.pw-room-chips button {
  min-width: max-content;
  min-height: 44px;
  padding: 0 11px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: transparent;
  color: var(--pw-muted);
  font: 700 8.5px/1 inherit;
  cursor: pointer;
}
.pw-room-chips button.is-active { border-color: var(--pw-clay); background: var(--pw-clay-soft); color: var(--pw-clay-dark); }
.pw-helper-copy { margin: 7px 0 0; color: var(--pw-muted); font-size: 8px; line-height: 1.45; }

.pw-material-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.pw-material-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 210px;
  grid-template-rows: 96px 1fr;
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-canvas);
  color: var(--pw-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.pw-material-card:hover { border-color: var(--pw-clay); transform: translateY(-1px); }
.pw-material-card.is-selected { border-color: var(--pw-clay); box-shadow: inset 0 -3px var(--pw-clay); }
.pw-material-image { display: block; width: 100%; height: 96px; object-fit: cover; border-bottom: 1px solid var(--pw-rule-soft); }
.pw-material-image--fallback { background: var(--pw-inset); }
.pw-material-body { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; padding: 9px; }
.pw-material-space { color: var(--pw-clay); font-size: 7px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pw-material-body strong {
  display: -webkit-box;
  min-height: 2.7em;
  margin-top: 4px;
  overflow: hidden;
  font-size: 9px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.pw-material-rate { margin-top: 6px; color: var(--pw-ink); font-size: 9px; font-weight: 800; }
.pw-material-tag { margin-top: auto; padding-top: 7px; color: var(--pw-moss); font-size: 7.5px; font-weight: 700; }
.pw-selection-check {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 2px solid #fffaf2;
  border-radius: 50%;
  background: var(--pw-clay);
  color: #fffaf2;
}
.pw-selection-check .pw-icon { width: 13px; }
.pw-material-more {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  margin-top: 9px;
  padding: 0 10px;
  border: 1px solid var(--pw-rule-soft);
  background: transparent;
  color: var(--pw-ink);
  font: 700 9px/1 inherit;
  cursor: pointer;
}
.pw-material-more:hover { border-color: var(--pw-ink); }
.pw-material-more .pw-icon { width: 15px; }

.pw-summary-list { margin: 0; }
.pw-summary-list > div {
  display: grid;
  grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--pw-rule-soft);
}
.pw-summary-list > div:last-child { border-bottom: 0; }
.pw-summary-list dt { color: var(--pw-muted); font-size: 8px; }
.pw-summary-list dd { margin: 0; overflow-wrap: anywhere; color: var(--pw-ink-soft); font-size: 8.5px; font-weight: 700; text-align: right; }

.pw-estimate-total { padding: 14px 0 16px; border-top: 1px solid var(--pw-rule-soft); }
.pw-estimate-total span,
.pw-estimate-total strong,
.pw-estimate-total small { display: block; }
.pw-estimate-total span { color: var(--pw-muted); font-size: 7px; font-weight: 800; letter-spacing: .11em; }
.pw-estimate-total strong { margin-top: 4px; font: 400 30px/1.05 Georgia, "Times New Roman", serif; font-variant-numeric: tabular-nums; }
.pw-estimate-total small { margin-top: 5px; color: var(--pw-clay-dark); font-size: 8px; }
.pw-cost-bar { display: flex; height: 9px; overflow: hidden; background: var(--pw-inset); }
.pw-cost-bar span { display: block; height: 100%; }
.pw-cost-bar__materials { background: var(--pw-clay); }
.pw-cost-bar__labor { background: var(--pw-moss); }
.pw-cost-bar__other { background: var(--pw-rule); }
.pw-cost-legend { display: grid; gap: 7px; margin: 13px 0 0; }
.pw-cost-legend > div { display: flex; justify-content: space-between; gap: 12px; }
.pw-cost-legend dt { display: flex; min-width: 0; align-items: center; gap: 7px; color: var(--pw-muted); font-size: 8px; }
.pw-cost-legend dd { margin: 0; font-size: 8px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.pw-cost-dot { display: block; width: 7px; height: 7px; flex: 0 0 auto; }
.pw-cost-dot--materials { background: var(--pw-clay); }
.pw-cost-dot--labor { background: var(--pw-moss); }
.pw-cost-dot--other { background: var(--pw-rule); }
.pw-fine-print { margin: 13px 0 0; color: var(--pw-muted); font-size: 7.5px; line-height: 1.5; }

.pw-contractor-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.pw-contractor-card { min-width: 0; padding: 10px; border: 1px solid var(--pw-rule-soft); background: var(--pw-canvas); }
.pw-contractor-heading { display: flex; min-width: 0; align-items: center; gap: 8px; }
.pw-contractor-heading > div { display: grid; min-width: 0; gap: 1px; }
.pw-contractor-heading strong { overflow: hidden; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.pw-contractor-heading small { overflow: hidden; color: var(--pw-muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.pw-contractor-avatar {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--pw-clay);
  color: var(--pw-clay-dark);
  font: 400 9px/1 Georgia, "Times New Roman", serif;
}
.pw-contractor-rating { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.pw-contractor-rating span { color: var(--pw-clay-dark); font-size: 8px; font-weight: 800; }
.pw-contractor-rating small { color: var(--pw-muted); font-size: 7px; }
.pw-contractor-card dl { margin: 9px 0 0; }
.pw-contractor-card dl > div { display: flex; justify-content: space-between; gap: 6px; padding: 5px 0; border-top: 1px solid var(--pw-rule-soft); }
.pw-contractor-card dt { color: var(--pw-muted); font-size: 6.8px; }
.pw-contractor-card dd { margin: 0; font-size: 7px; font-weight: 700; text-align: right; }
.pw-contractor-card .pw-text-action { width: 100%; justify-content: space-between; margin-top: 4px; }

.pw-ai-bar {
  display: grid;
  grid-template-columns: auto minmax(185px, .7fr) minmax(390px, 1.5fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--pw-ink);
  background: var(--pw-surface);
}
.pw-ai-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--pw-clay);
  color: var(--pw-clay);
}
.pw-ai-mark .pw-icon { width: 19px; }
.pw-ai-intro h2 { margin-bottom: 2px; font: 400 14px/1.2 Georgia, "Times New Roman", serif; }
.pw-ai-intro p { margin-bottom: 0; color: var(--pw-muted); font-size: 7.5px; line-height: 1.4; }
.pw-ai-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
.pw-ai-prompts button {
  min-height: 44px;
  padding: 7px 9px;
  border: 1px solid var(--pw-rule-soft);
  background: var(--pw-canvas);
  color: var(--pw-ink-soft);
  font: 650 7.5px/1.35 inherit;
  text-align: left;
  cursor: pointer;
}
.pw-ai-prompts button:hover { border-color: var(--pw-clay); color: var(--pw-clay-dark); }

.pw-empty-state {
  display: grid;
  min-height: 65vh;
  place-content: center;
  justify-items: start;
  padding: 42px;
  border: 1px solid var(--pw-rule-soft);
  background: var(--pw-surface);
}
.pw-empty-state p { max-width: 560px; margin: 0 0 20px; color: var(--pw-muted); font-size: 13px; line-height: 1.6; }

.pw-cost-sheet,
.pw-ai-sheet,
.pw-ai-compose,
.pw-contractor-sheet { color: var(--pw-ink, var(--arch-ink)); }
.pw-cost-sheet > p:first-child,
.pw-ai-sheet > p,
.pw-contractor-sheet > p { color: var(--pw-muted, var(--arch-muted)); font-size: 12px; line-height: 1.6; }
.pw-cost-sheet dl { margin: 15px 0 0; border-top: 1px solid var(--pw-rule-soft, var(--arch-rule-soft)); }
.pw-cost-sheet dl > div { display: flex; justify-content: space-between; gap: 18px; padding: 11px 0; border-bottom: 1px solid var(--pw-rule-soft, var(--arch-rule-soft)); }
.pw-cost-sheet dt { color: var(--pw-muted, var(--arch-muted)); font-size: 11px; }
.pw-cost-sheet dd { margin: 0; font-size: 11px; font-weight: 750; font-variant-numeric: tabular-nums; text-align: right; }
.pw-cost-sheet .pw-cost-sheet-total { border-bottom-color: var(--pw-ink, var(--arch-ink)); }
.pw-cost-sheet-total :is(dt, dd) { color: var(--pw-ink, var(--arch-ink)); font-size: 13px; }
.pw-ai-question { padding: 12px; border-left: 2px solid var(--pw-clay, var(--arch-clay)); background: var(--pw-canvas, var(--arch-paper)); color: var(--pw-ink, var(--arch-ink)) !important; font-weight: 700; }
.pw-ai-compose { display: grid; gap: 12px; }
.pw-ai-input {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--pw-rule, var(--arch-rule));
  border-radius: 2px;
  background: var(--pw-surface, var(--arch-paper-raised));
  color: var(--pw-ink, var(--arch-ink));
  font: 400 16px/1.5 "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.pw-ai-compose .pw-button { justify-self: end; }

/* Material Selection is a decision workspace: catalog, live room, and evidence stay connected. */
body[data-route="studio"] .material-workspace-main {
  max-width: 1600px;
  padding-top: 24px;
}

.material-workspace-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  align-items: end;
  gap: 24px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--pw-ink);
}
.material-workspace-kicker {
  grid-column: 1 / -1;
  color: var(--pw-clay);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
}
.material-workspace-intro .headline {
  margin: -13px 0 0;
  color: var(--pw-ink);
  font: 400 clamp(30px, 3vw, 44px)/1.05 Georgia, "Times New Roman", serif;
  letter-spacing: -.035em;
}
.material-workspace-intro .sub-text {
  margin: 0;
  color: var(--pw-muted);
  font-size: 11px;
  line-height: 1.55;
}
.material-stage-stepper { margin-top: 17px; }

.material-workspace-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 15px 0 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--pw-rule-soft);
}
.material-workspace-tools .btn {
  width: auto;
  min-height: 44px;
  padding: 9px 13px;
  border-radius: 2px;
}
.material-workspace-tools .studio-draft-status {
  margin-right: auto;
  color: var(--pw-muted);
  font-size: 9px;
}

body[data-route="studio"] .us-live-budget {
  top: 72px;
  margin: 10px 0 13px;
  border-color: var(--pw-rule-soft);
  background: var(--pw-surface);
  box-shadow: var(--pw-shadow-soft);
}

.material-selection-grid {
  display: grid;
  grid-template-columns: minmax(290px, .8fr) minmax(430px, 1.35fr) minmax(310px, .9fr);
  grid-template-areas: "catalog scene inspector";
  gap: 12px;
  align-items: start;
}
.material-catalog-panel { grid-area: catalog; }
.material-scene-panel { grid-area: scene; }
.material-inspector { grid-area: inspector; }

body[data-route="studio"] .material-scene-panel {
  min-width: 0;
  padding: 13px;
  border-color: var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-surface);
  box-shadow: none;
}
.material-scene-panel > div:first-child {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  color: var(--pw-ink);
  font-size: 11px;
}
.material-scene-help {
  margin-left: auto;
  color: var(--pw-muted);
  font-size: 8px;
  font-weight: 600;
}
.material-scene-shell {
  height: clamp(390px, 39vw, 560px);
  min-height: 390px;
  overflow: hidden;
  border: 1px solid #39352f;
  border-radius: 2px;
  background: #211f1b;
}
.material-scene-panel .cam-chips {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  margin-top: 10px;
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: thin;
}
.material-scene-panel .cam-chips .chip,
.material-scene-panel .segment button {
  min-width: max-content;
  min-height: 44px;
  border-color: var(--pw-rule-soft);
  background: var(--pw-canvas);
  color: var(--pw-muted);
  font-size: 9px;
}
.material-scene-panel .cam-chips .chip.on,
.material-scene-panel .segment button.on {
  border-color: var(--pw-clay);
  background: var(--pw-clay-soft);
  color: var(--pw-clay-dark);
}
.material-scene-panel > .small {
  margin: 9px 0 0 !important;
  color: var(--pw-muted);
  font-size: 9px;
  line-height: 1.5;
}

body[data-route="studio"] .material-catalog-panel.live-studio {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-surface);
  color: var(--pw-ink);
}
body[data-route="studio"] .material-catalog-panel .live-eyebrow {
  color: var(--pw-clay);
  font-size: 8px;
  letter-spacing: .12em;
}
body[data-route="studio"] .material-catalog-panel .live-title {
  margin-top: 7px;
  color: var(--pw-ink);
  font: 400 23px/1.1 Georgia, "Times New Roman", serif;
}
body[data-route="studio"] .material-catalog-panel .live-copy {
  color: var(--pw-muted);
  font-size: 10px;
  line-height: 1.5;
}
body[data-route="studio"] .material-catalog-panel .live-product-tabs {
  display: flex;
  margin: 13px -14px 0;
  padding: 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--pw-rule-soft);
}
body[data-route="studio"] .material-catalog-panel .live-tab {
  min-width: max-content;
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--pw-muted);
  font-size: 9px;
}
body[data-route="studio"] .material-catalog-panel .live-tab.on {
  border-bottom-color: var(--pw-clay);
  background: transparent;
  color: var(--pw-ink);
}
body[data-route="studio"] .material-catalog-panel .cam-chips {
  gap: 5px;
  margin: 9px 0 !important;
}
body[data-route="studio"] .material-catalog-panel .chip {
  min-width: max-content;
  min-height: 40px;
  padding: 7px 10px;
  border-color: var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-canvas);
  color: var(--pw-muted);
  font-size: 8px;
}
body[data-route="studio"] .material-catalog-panel .chip.on {
  border-color: var(--pw-clay);
  background: var(--pw-clay-soft);
  color: var(--pw-clay-dark);
}
body[data-route="studio"] .material-catalog-panel .live-product-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
body[data-route="studio"] .material-catalog-panel .live-product-card {
  min-height: 225px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-canvas);
  color: var(--pw-ink);
  box-shadow: none;
}
body[data-route="studio"] .material-catalog-panel .live-product-card:hover {
  transform: none;
  border-color: var(--pw-rule);
  background: var(--pw-surface);
}
body[data-route="studio"] .material-catalog-panel .live-product-card.selected {
  border-color: var(--pw-clay);
  background: var(--pw-clay-soft);
  box-shadow: inset 0 -3px var(--pw-clay);
}
body[data-route="studio"] .material-catalog-panel .live-product-select {
  min-height: 225px;
  padding: 0 9px 10px;
  border-radius: 2px;
  color: var(--pw-ink);
}
body[data-route="studio"] .material-catalog-panel .live-product-swatch {
  width: calc(100% + 18px);
  height: 92px;
  margin: 0 -9px;
  border-color: var(--pw-rule-soft);
}
body[data-route="studio"] .material-catalog-panel .live-product-tier {
  color: var(--pw-clay-dark);
  font-size: 7px;
}
body[data-route="studio"] .material-catalog-panel .live-product-name {
  min-height: 3.5em;
  color: var(--pw-ink);
  font-size: 10px;
}
body[data-route="studio"] .material-catalog-panel .live-product-price {
  color: var(--pw-ink);
  font-size: 11px;
}
body[data-route="studio"] .material-catalog-panel .live-product-price small {
  display: block;
  color: var(--pw-muted);
  font-size: 7px;
  font-weight: 600;
}
body[data-route="studio"] .material-catalog-panel .live-product-code { color: var(--pw-muted); }
body[data-route="studio"] .material-catalog-panel .live-product-info > span {
  border-color: var(--pw-rule);
  background: var(--pw-surface);
  color: var(--pw-ink);
}
body[data-route="studio"] .material-catalog-panel .live-product-info:hover > span {
  background: var(--pw-clay-soft);
  color: var(--pw-clay-dark);
}
body[data-route="studio"] .material-catalog-panel .live-room-required {
  min-height: 230px;
  border-color: var(--pw-rule-soft);
  background: var(--pw-canvas);
  color: var(--pw-ink);
}
body[data-route="studio"] .material-catalog-panel .live-room-required span { color: var(--pw-muted); }
body[data-route="studio"] .material-catalog-panel .live-update-status {
  display: flex;
  min-height: 44px;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 9px;
  border-top: 1px solid var(--pw-rule-soft);
  color: var(--pw-muted);
  font-size: 8.5px;
  line-height: 1.4;
}
.material-estimate-delta { color: var(--pw-clay-dark); }
.material-undo {
  min-height: 38px;
  margin-left: auto;
  padding: 0 10px;
  border: 1px solid var(--pw-ink);
  border-radius: 2px;
  background: transparent;
  color: var(--pw-ink);
  font: 750 8px/1 inherit;
  cursor: pointer;
}

.material-inspector {
  position: sticky;
  top: 74px;
  min-width: 0;
  max-height: calc(100vh - 90px);
  max-height: calc(100dvh - 90px);
  overflow: auto;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-surface);
  color: var(--pw-ink);
}
.material-inspector-empty {
  display: grid;
  min-height: 360px;
  place-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
}
.material-inspector-empty > span { color: var(--pw-clay); font: 400 36px/1 Georgia, serif; }
.material-inspector-empty h2 { margin: 0; font: 400 22px/1.15 Georgia, serif; }
.material-inspector-empty p { margin: 0; color: var(--pw-muted); font-size: 10px; line-height: 1.55; }
.material-inspector-heading { padding: 12px 12px 14px; }
.material-inspector-swatch {
  display: block;
  width: 100%;
  height: 145px;
  object-fit: cover;
  border: 1px solid var(--pw-rule-soft);
}
.material-inspector-eyebrow {
  margin: 12px 0 4px !important;
  color: var(--pw-clay);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
}
.material-inspector-heading h2 { margin: 0; font: 400 21px/1.18 Georgia, serif; }
.material-installed-rate { margin: 9px 0 0 !important; font-size: 14px; font-weight: 800; }
.material-installed-rate span { color: var(--pw-muted); font-size: 8px; font-weight: 600; }
.material-inspector-room { margin: 4px 0 0 !important; color: var(--pw-moss); font-size: 8px; font-weight: 750; }
.material-inspector-tabs {
  display: flex;
  overflow-x: auto;
  border-top: 1px solid var(--pw-rule-soft);
  border-bottom: 1px solid var(--pw-rule-soft);
}
.material-inspector-tabs button {
  min-width: max-content;
  min-height: 44px;
  flex: 1;
  padding: 0 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--pw-muted);
  font: 700 8px/1 inherit;
  cursor: pointer;
}
.material-inspector-tabs button.is-active { border-bottom-color: var(--pw-clay); color: var(--pw-ink); }
.material-inspector-body { display: grid; gap: 12px; padding: 13px; }
.material-considerations { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--pw-rule-soft); }
.material-considerations section { min-width: 0; padding: 10px; }
.material-considerations section + section { border-left: 1px solid var(--pw-rule-soft); }
.material-inspector h3 { margin: 0 0 7px; font-size: 9px; letter-spacing: .02em; }
.material-considerations .is-pro h3 { color: var(--pw-moss); }
.material-considerations .is-con h3 { color: var(--pw-clay-dark); }
.material-considerations ul { display: grid; gap: 5px; margin: 0; padding-left: 14px; color: var(--pw-muted); font-size: 8px; line-height: 1.4; }
.material-care { padding: 11px; background: var(--pw-canvas); }
.material-care p { margin: 0; color: var(--pw-muted); font-size: 9px; line-height: 1.5; }
.material-cost-card { display: grid; gap: 7px; padding: 11px; border: 1px solid var(--pw-rule-soft); }
.material-cost-card > div { display: flex; justify-content: space-between; gap: 10px; font-size: 9px; }
.material-cost-card span { color: var(--pw-muted); }
.material-cost-card strong { text-align: right; }
.material-cost-card small { padding-top: 7px; border-top: 1px solid var(--pw-rule-soft); color: var(--pw-muted); font-size: 7.5px; line-height: 1.45; }
.material-ai-guidance { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px; padding: 11px; background: var(--pw-moss-soft); }
.material-ai-mark { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--pw-moss); color: var(--pw-moss); font-size: 8px; font-weight: 850; }
.material-ai-guidance p { margin: 0; color: var(--pw-ink-soft); font-size: 8.5px; line-height: 1.5; }
.material-full-details { width: 100%; min-height: 44px; border-radius: 2px; }
.material-inspector-note { margin: 0; color: var(--pw-muted); font-size: 9px; line-height: 1.5; }
.material-project-examples { display: grid; gap: 8px; }
.material-project-examples article { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 2px 9px; align-items: center; }
.material-project-examples canvas { width: 80px; height: 62px; grid-row: span 2; object-fit: cover; }
.material-project-examples strong { font-size: 9px; }
.material-project-examples span { color: var(--pw-muted); font-size: 8px; }
.material-install-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; counter-reset: install; }
.material-install-steps li { display: grid; grid-template-columns: 25px minmax(0, 1fr); gap: 2px 8px; padding: 10px 0; border-bottom: 1px solid var(--pw-rule-soft); counter-increment: install; }
.material-install-steps li::before { grid-row: span 2; content: counter(install, decimal-leading-zero); color: var(--pw-clay); font: 400 12px/1 Georgia, serif; }
.material-install-steps strong { font-size: 9px; }
.material-install-steps span { color: var(--pw-muted); font-size: 8px; line-height: 1.4; }

.material-companions { margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--pw-rule-soft); }
.material-companion-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.material-companion-heading span { color: var(--pw-clay); font-size: 7px; font-weight: 800; letter-spacing: .1em; }
.material-companion-heading h3 { margin: 3px 0 0; font: 400 16px/1.15 Georgia, serif; }
.material-companion-heading small { color: var(--pw-muted); font-size: 8px; }
.material-companion-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 9px; }
.material-companion-list button {
  display: grid;
  min-width: 0;
  min-height: 76px;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid var(--pw-rule-soft);
  border-radius: 2px;
  background: var(--pw-canvas);
  color: var(--pw-ink);
  text-align: left;
  cursor: pointer;
}
.material-companion-list canvas { width: 58px; height: 58px; object-fit: cover; }
.material-companion-list button > span { display: grid; min-width: 0; gap: 4px; }
.material-companion-list strong { overflow: hidden; font-size: 8px; line-height: 1.3; text-overflow: ellipsis; }
.material-companion-list small { color: var(--pw-muted); font-size: 7px; }
.material-companion-empty { margin: 9px 0 0 !important; color: var(--pw-muted); font-size: 8px; }

body[data-route="studio"] .render-direction-section { margin-top: 22px !important; padding-top: 17px; border-top: 1px solid var(--pw-ink); }
body[data-route="studio"] .render-direction-section > .section-title { color: var(--pw-ink); }
body[data-route="studio"] #cta-bar { background: var(--pw-canvas); }

@media (max-width: 1390px) {
  .material-selection-grid {
    grid-template-columns: minmax(300px, .78fr) minmax(420px, 1.22fr);
    grid-template-areas: "catalog scene" "inspector inspector";
  }
  .material-inspector { position: static; max-height: none; }
  .material-inspector-heading { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 14px; }
  .material-inspector-swatch { grid-row: span 5; height: 160px; }
  .material-inspector-tabs { justify-content: flex-start; }
  .material-inspector-tabs button { flex: 0 0 auto; }
}

@keyframes pw-enter {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
@keyframes pw-spin { to { transform: rotate(360deg); } }

@media (max-width: 1240px) {
  .pw-topbar { grid-template-columns: 190px minmax(0, 1fr) auto; }
  .pw-brand { padding-inline: 17px; }
  .pw-global-nav button { padding-inline: 10px; font-size: 10px; }
  .pw-account-button > span:nth-child(2) { display: none; }
  .pw-account-button { width: 44px; }
  .pw-main { padding-inline: 24px; }
  .pw-plan-card { grid-column: span 7; }
  .pw-materials-card { grid-column: span 5; }
  .pw-summary-card { grid-column: span 4; }
  .pw-estimate-card { grid-column: span 4; }
  .pw-contractors-card { grid-column: span 4; }
  .pw-contractor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  .pw-topbar { grid-template-columns: 190px 1fr; }
  .pw-global-nav { display: none; }
  .pw-topbar-actions { justify-self: end; }
  .pw-shell-body { grid-template-columns: 76px minmax(0, 1fr); }
  .pw-rail { padding-inline: 8px; }
  .pw-active-project { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 10px 6px; }
  .pw-active-project > div,
  .pw-active-project > .pw-icon-button,
  .pw-manager-card { display: none; }
  .pw-project-nav button { justify-content: center; padding: 0; }
  .pw-project-nav button span { display: none; }
  .pw-project-nav .pw-icon { width: 19px; height: 19px; }
  .pw-project-nav button.is-active { box-shadow: inset 0 -2px var(--pw-clay); }
  .pw-plan-card,
  .pw-materials-card { grid-column: span 12; }
  .pw-summary-card,
  .pw-estimate-card { grid-column: span 6; }
  .pw-contractors-card { grid-column: span 12; }
  .pw-contractor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pw-material-rail { grid-template-columns: repeat(4, minmax(190px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .pw-ai-bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pw-ai-prompts { grid-column: 1 / -1; order: 3; }
  body[data-route="studio"] .material-workspace-main { padding-inline: 20px; }
  .material-workspace-tools .studio-draft-status { width: 100%; order: 3; }
}

@media (max-width: 820px) {
  .pw-topbar { min-height: 60px; grid-template-columns: 1fr auto; }
  .pw-brand { min-height: 60px; border-right: 0; }
  .pw-brand small { display: none; }
  .pw-topbar-actions { padding: 6px 10px 6px 4px; }
  .pw-topbar-actions > .pw-icon-button { display: none; }
  .pw-shell-body { display: block; }
  .pw-rail {
    position: sticky;
    top: 60px;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 0;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--pw-rule-soft);
  }
  .pw-active-project,
  .pw-manager-card { display: none; }
  .pw-project-nav { display: flex; gap: 0; margin: 0; overflow-x: auto; scrollbar-width: none; }
  .pw-project-nav::-webkit-scrollbar { display: none; }
  .pw-project-nav button { min-width: max-content; justify-content: center; gap: 7px; padding: 0 13px; border-width: 0 0 2px; }
  .pw-project-nav button span { display: block; }
  .pw-project-nav .pw-icon { width: 15px; height: 15px; }
  .pw-project-nav button.is-active { border-bottom-color: var(--pw-clay); background: var(--pw-clay-soft); box-shadow: none; }
  .pw-main { padding: 21px 18px calc(44px + env(safe-area-inset-bottom)); }
  .pw-page-header { align-items: flex-start; flex-direction: column; gap: 16px; }
  .pw-page-actions { width: 100%; }
  .pw-page-actions .pw-button { flex: 1; }
  .pw-stage-stepper { grid-template-columns: repeat(6, 140px); margin-inline: -18px; padding-inline: 18px; }
  .pw-next-decision { grid-template-columns: auto minmax(0, 1fr); }
  .pw-next-decision .pw-button { grid-column: 1 / -1; width: 100%; }
  .pw-summary-card,
  .pw-estimate-card,
  .pw-contractors-card { grid-column: span 12; }
  .pw-contractor-grid { grid-template-columns: repeat(3, minmax(170px, 1fr)); overflow-x: auto; padding-bottom: 4px; }
  .pw-ai-bar { grid-template-columns: auto minmax(0, 1fr); }
  .pw-ai-bar > .pw-button { grid-column: 1 / -1; width: 100%; }
  .pw-ai-prompts { grid-template-columns: 1fr; }
  .material-workspace-intro { grid-template-columns: 1fr; gap: 9px; }
  .material-workspace-intro .headline { margin-top: -8px; }
  .material-stage-stepper { margin-inline: -18px; }
  .material-workspace-tools {
    flex-wrap: nowrap;
    margin-inline: -18px;
    padding-inline: 18px;
    overflow-x: auto;
  }
  .material-workspace-tools .studio-draft-status { display: none; }
  body[data-route="studio"] .us-live-budget { top: 113px; }
  .material-selection-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "scene" "catalog" "inspector";
    gap: 10px;
  }
  .material-inspector-heading { display: block; }
  .material-inspector-swatch { height: min(44vw, 190px); }
  .material-inspector-tabs button { flex: 1; }
  .material-scene-shell { height: min(72vw, 470px); min-height: 330px; }
}

@media (max-width: 700px) {
  .pw-brand { padding-inline: 13px; }
  .pw-brand strong { font-size: 10px; }
  .pw-brand-mark { width: 20px; height: 20px; border-width: 3px; }
  .pw-unit-slot { margin: 0; }
  .pw-unit-slot .us-unit-toggle button { min-width: 43px; }
  .pw-account-button { display: none; }
  .pw-page-header h1 { font-size: 34px; }
  .pw-plan-display { display: block; }
  .pw-plan-display[data-focus="2d"] .pw-plan-pane--3d,
  .pw-plan-display[data-focus="3d"] .pw-plan-pane--2d { display: none; }
  .pw-floor-plan,
  .pw-live-scene { height: min(74vw, 360px); min-height: 290px; }
  .pw-section-heading { align-items: stretch; flex-direction: column; }
  .pw-section-heading > :is(.pw-text-action, .pw-view-toggle) { align-self: flex-start; }
  .pw-material-rail {
    display: flex;
    margin-inline: -16px;
    padding: 0 16px 5px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
  }
  .pw-material-card { width: min(68vw, 250px); min-width: min(68vw, 250px); scroll-snap-align: start; }
  .pw-summary-list > div { grid-template-columns: minmax(100px, .85fr) minmax(0, 1.15fr); }
  .pw-contractor-grid { margin-inline: -16px; padding-inline: 16px; }
  .pw-ai-bar { align-items: start; }
  .pw-ai-mark { width: 36px; height: 36px; }
  body[data-route="studio"] .material-workspace-main { padding-inline: 14px; }
  .material-stage-stepper,
  .material-workspace-tools { margin-inline: -14px; padding-inline: 14px; }
  .material-scene-panel > div:first-child { align-items: flex-start; flex-direction: column; }
  .material-scene-help { margin-left: 0; }
  .material-scene-shell { height: min(78vw, 390px); min-height: 290px; }
  .material-companion-list { display: flex; overflow-x: auto; }
  .material-companion-list button { width: 210px; min-width: 210px; }
  .material-considerations { grid-template-columns: 1fr; }
  .material-considerations section + section { border-top: 1px solid var(--pw-rule-soft); border-left: 0; }
}

@media (max-width: 430px) {
  .pw-main { padding-inline: 14px; }
  .pw-project-nav button { padding-inline: 11px; }
  .pw-stage-stepper { margin-inline: -14px; padding-inline: 14px; }
  .pw-page-actions { display: grid; grid-template-columns: 1fr; }
  .pw-next-decision { grid-template-columns: 1fr; }
  .pw-decision-mark { width: 36px; height: 36px; }
  .pw-panel { padding: 14px; }
  .pw-material-rail,
  .pw-contractor-grid { margin-inline: -14px; padding-inline: 14px; }
  .pw-contractor-grid { grid-template-columns: repeat(3, minmax(210px, 1fr)); }
  .pw-estimate-total strong { font-size: 27px; }
  .pw-cost-legend > div { align-items: flex-start; }
  .pw-ai-bar { grid-template-columns: 1fr; padding: 14px; }
  .pw-ai-mark { display: none; }
  .pw-ai-prompts,
  .pw-ai-bar > .pw-button { grid-column: auto; }
  .pw-ai-compose .pw-button { width: 100%; justify-self: stretch; }
  .material-workspace-intro .headline { font-size: 30px; }
  body[data-route="studio"] .material-catalog-panel.live-studio,
  body[data-route="studio"] .material-scene-panel { padding: 11px; }
  body[data-route="studio"] .material-catalog-panel .live-product-tabs { margin-inline: -11px; padding-inline: 11px; }
  body[data-route="studio"] .material-catalog-panel .live-product-grid { gap: 6px; }
  body[data-route="studio"] .material-catalog-panel .live-product-card,
  body[data-route="studio"] .material-catalog-panel .live-product-select { min-height: 218px; }
  .material-project-examples article { grid-template-columns: 68px minmax(0, 1fr); }
  .material-project-examples canvas { width: 68px; height: 56px; }
}

@media (prefers-reduced-motion: reduce) {
  body:is([data-route="design"], [data-route="studio"]) .screen-enter,
  .pw-scene-loading > span { animation: none; }
  .pw-material-card,
  .live-product-card { transition: none; }
}
