/* KCD Door Studio — neutral, quiet UI so door colors read true. */
:root {
  --bg: #F4F2EE;          /* warm off-white page */
  --surface: #FAF9F6;     /* cards / door stage */
  --surface-2: #EFECE7;
  --line: #E3DFD8;
  --ink: #2B313F;         /* KCD Charcoal */
  --ink-2: #5F6470;
  --ink-3: #8D9099;
  --kcd-blue: #17557D;    /* header accent only */
  --focus: #6B7A8C;
  --line-strong: #CFCAC1;  /* a border on hover */
  --ink-strong: #1E232E;   /* the primary button on hover */
  --danger: #8C4A40;       /* destructive links */
  --danger-strong: #A8463F; /* errors, destructive on hover */
  --radius: 14px;
  --shadow: 0 1px 2px rgba(43, 49, 63, .05), 0 8px 24px rgba(43, 49, 63, .06);
  --ease: cubic-bezier(.2, .7, .2, 1);
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 64px; padding: 0 28px;
  background: rgba(250, 249, 246, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { height: 30px; width: auto; }
.product { font-weight: 600; font-size: 16px; letter-spacing: .01em; color: var(--ink); padding-left: 14px; border-left: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; }
.tab {
  border: 0; background: none; padding: 20px 16px 18px; font-size: 14px; font-weight: 500; color: var(--ink-2);
  border-bottom: 2px solid transparent; transition: color .2s var(--ease), border-color .2s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--kcd-blue); }
.count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 10px; font-size: 11px; line-height: 18px; background: var(--surface-2); color: var(--ink-2); }
.count:empty { display: none; }
.top-right { justify-self: end; }
.internal { font-size: 12px; color: var(--ink-3); }

.view { display: none; }
.view.active { display: grid; animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- explore ---------- */
#view-explore { grid-template-columns: 252px 1fr; min-height: calc(100vh - 64px); }
.filters {
  position: sticky; top: 64px; align-self: start; height: calc(100vh - 64px); overflow: auto;
  padding: 22px 18px 40px 26px; border-right: 1px solid var(--line);
}
.filters section { margin-top: 20px; }
.filters h4 { margin: 0 0 9px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.search input {
  width: 100%; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); outline: none; font-size: 14px; transition: border-color .2s;
}
.search input:focus { border-color: var(--focus); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; font-size: 13px; color: var(--ink-2);
  transition: all .18s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.chip .n { font-size: 11px; opacity: .6; }
.link { border: 0; background: none; padding: 0; color: var(--ink-2); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link:hover { color: var(--ink); }
.filters > .link { margin-top: 22px; }

.stage { padding: 22px 32px 60px; min-width: 0; }
.stage-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.stage-meta { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--ink-3); }
#toggleFilters { display: none; }

.doorpick { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border-radius: 14px; flex-wrap: wrap; }
.doorpick button {
  border: 0; background: none; height: 34px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; transition: all .18s var(--ease); white-space: nowrap;
}
.doorpick button:hover { color: var(--ink); }
.doorpick button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.doorpick .sep { width: 1px; background: #D9D4CC; margin: 7px 4px; }
.doorpick.small button { height: 30px; padding: 0 12px; font-size: 13px; }

.tag { display: inline-flex; align-items: center; height: 19px; padding: 0 7px; border-radius: 10px; font-size: 11px; font-weight: 600; letter-spacing: .02em; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.soon { background: #EDE7DA; color: #6E5E3E; }
.tag.concept { background: #E6E8EC; color: #4E5666; }
.tag.ph { background: #F1E4E0; color: #7D4E44; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 26px 22px; }
.card { position: relative; cursor: pointer; }
.card .door {
  position: relative; background: var(--surface); border-radius: var(--radius); padding: 18px 20px; aspect-ratio: 0.62;
  display: flex; align-items: center; justify-content: center; transition: box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card:hover .door { box-shadow: var(--shadow); transform: translateY(-2px); }
.card canvas, .card svg { max-width: 100%; max-height: 100%; display: block; }
.card .meta { padding: 10px 4px 0; }
.card .name { font-size: 14px; font-weight: 600; line-height: 1.3; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.card .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.card .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.pin {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 999px; border: 0;
  background: rgba(250,249,246,.94); box-shadow: 0 1px 3px rgba(0,0,0,.1); display: grid; place-items: center;
  opacity: 0; transition: opacity .2s var(--ease), transform .2s var(--ease);
}
.card:hover .pin, .pin.on, .pin:focus-visible { opacity: 1; }
.pin svg { width: 15px; height: 15px; }
.pin.on { background: var(--ink); color: #fff; }
.unavail { font-size: 12px; color: var(--ink-3); text-align: center; line-height: 1.5; padding: 10px; }
.empty { padding: 60px 0; text-align: center; color: var(--ink-3); font-size: 14px; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(43,49,63,.18); opacity: 0; pointer-events: none; transition: opacity .25s var(--ease); z-index: 30; }
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 40; background: var(--bg);
  transform: translateX(102%); transition: transform .32s var(--ease); overflow: auto; box-shadow: -12px 0 40px rgba(43,49,63,.12);
}
.drawer.on { transform: none; }
.close { position: absolute; top: 14px; right: 16px; width: 36px; height: 36px; border-radius: 999px; border: 0; background: var(--surface-2); font-size: 18px; line-height: 1; color: var(--ink-2); z-index: 2; }
.drawer-body { padding: 26px 30px 50px; }
.d-door { background: var(--surface); border-radius: var(--radius); padding: 28px; display: flex; justify-content: center; }
.d-door canvas, .d-door svg { max-height: 52vh; max-width: 100%; }
.d-title { margin: 20px 0 2px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.d-sub { color: var(--ink-2); font-size: 14px; }
.d-actions { display: flex; gap: 8px; margin: 18px 0 8px; flex-wrap: wrap; }
.d-sec { margin-top: 24px; }
.d-sec h4 { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.d-list { list-style: none; margin: 0; padding: 0; }
.d-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.d-list li span:last-child { color: var(--ink-3); text-align: right; }
.d-list a { color: inherit; }
.near { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--surface); cursor: pointer; }
.near .sw { width: 34px; height: 34px; border-radius: 10px; flex: none; }
.near .de { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.values { margin-top: 10px; font: 12px/1.8 ui-monospace, "Cascadia Mono", Consolas, monospace; color: var(--ink-2); background: var(--surface); border-radius: 10px; padding: 10px 14px; }
.refs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.refs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.fine { font-size: 12px; color: var(--ink-3); line-height: 1.5; margin-top: 8px; }

/* ---------- buttons ---------- */
.primary, .ghost {
  height: 38px; padding: 0 16px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 7px; transition: all .18s var(--ease);
}
.primary { background: var(--ink); color: #fff; }
.primary:hover { background: var(--ink-strong); }
.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.ghost:hover { border-color: var(--line-strong); background: var(--surface); }
.ghost.small { height: 30px; padding: 0 12px; font-size: 12px; }
.ghost.on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ---------- spectrum ---------- */
#view-spectrum { grid-template-columns: 1fr; padding: 22px 32px 40px; }
.spec-hero { display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 40px; align-items: start; }
.spec-left { position: sticky; top: 86px; }
.spec-door { background: var(--surface); border-radius: 14px; padding: 24px 24px 14px; }
.door-fig { margin: 0; display: flex; flex-direction: column; align-items: center; }
.door-fig canvas { max-width: 100%; max-height: calc(100vh - 380px); min-height: 260px; }
.door-fig figcaption { margin-top: 14px; text-align: center; }
.cap-name { display: block; font-weight: 600; font-size: 16px; }
.cap-sub { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.spec-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.spec-title { font-size: 24px; font-weight: 600; letter-spacing: -.01em; margin-top: 4px; }
.slider { display: grid; grid-template-columns: 62px 1fr 62px; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.slider span:last-child { text-align: right; }
input[type=range] { -webkit-appearance: none; appearance: none; height: 4px; border-radius: 6px; background: var(--line); outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: grab; }
input[type=range]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 1px 4px rgba(0,0,0,.15); cursor: grab; }
.spec-readout { display: flex; gap: 16px; align-items: start; margin-top: 18px; }
.swatchpair { display: flex; flex: none; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatchpair .sw { width: 44px; height: 44px; }
.readout-de { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.spec-actions { display: flex; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.save-row { display: flex; gap: 8px; margin-top: 12px; }
.save-row input { flex: 1; min-width: 0; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); outline: none; }
.note { font-size: 12px; color: var(--ink-3); line-height: 1.55; margin-top: 6px; }
.step-row { margin-top: 22px; }
.step-strip { display: grid; grid-template-columns: repeat(9, 1fr); gap: 8px; }
.step-strip.settle { animation: settle .35s var(--ease); }
@keyframes settle { from { opacity: .35; transform: scale(.985); } to { opacity: 1; transform: none; } }
.step { user-select: none; -webkit-user-select: none; }
.step.center { cursor: default; }
.spec-hint { font-size: 13px; color: var(--ink-2); margin: 18px 0 -6px; }
.step { background: var(--surface); border-radius: 10px; padding: 8px 7px 6px; border: 1px solid transparent; cursor: pointer; text-align: center; transition: box-shadow .18s var(--ease), border-color .18s var(--ease); }
.step:hover { box-shadow: var(--shadow); }
.step.center { border-color: #BDB7AD; }
.step canvas { width: 100%; height: auto; display: block; max-height: calc((100vh - 330px) / 3 - 30px); object-fit: contain; }
.step .de { font-size: 11px; color: var(--ink-3); margin-top: 5px; white-space: nowrap; }

/* ---------- shortlist ---------- */
#view-shortlist { grid-template-columns: 1fr; padding: 30px 32px 60px; align-content: start; }
.shortlist-head h2 { margin: 0; font-size: 24px; font-weight: 600; }
.muted { color: var(--ink-3); font-size: 14px; margin: 6px 0 24px; }
.shortlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.sl-card { background: var(--surface); border-radius: var(--radius); padding: 18px; display: grid; grid-template-columns: 96px 1fr; gap: 16px; }
.sl-card canvas { width: 96px; height: auto; }
.sl-card .name { font-weight: 600; font-size: 14px; }
.sl-card .sub { font-size: 12px; color: var(--ink-3); margin: 2px 0 10px; }
.sl-card textarea { width: 100%; min-height: 70px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 12.5px/1.5 inherit; font-family: inherit; background: var(--bg); outline: none; }
.sl-card .row { display: flex; gap: 10px; margin-top: 8px; }

.toast { position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 14px; font-size: 13px; transition: all .3s var(--ease); z-index: 50; pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- iPad / narrow ---------- */
@media (max-width: 1100px) {
  .top { grid-template-columns: auto 1fr; padding: 0 18px; }
  .top-right { display: none; }
  .tabs { justify-self: end; }
  #view-explore { grid-template-columns: 1fr; }
  .filters { position: fixed; z-index: 35; top: 64px; left: 0; width: 290px; background: var(--bg); transform: translateX(-102%); transition: transform .3s var(--ease); box-shadow: 12px 0 40px rgba(43,49,63,.12); }
  .filters.on { transform: none; }
  #toggleFilters { display: inline-flex; }
  .stage { padding: 18px 20px 50px; }
  .spec-hero { grid-template-columns: minmax(220px, 280px) 1fr; gap: 24px; }
  #view-spectrum { padding: 18px 20px 40px; }
  .step-strip { grid-template-columns: repeat(9, minmax(64px, 1fr)); overflow-x: auto; }
}
@media (max-width: 640px) {
  .product { display: none; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }
}

/* ===== v2: clearer flow ===== */
.tab b { display: inline-grid; place-items: center; width: 19px; height: 19px; margin-right: 6px; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.tab.active b { background: var(--kcd-blue); color: #fff; }
.pick-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bar-label { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.doorpick .grp { align-self: center; margin: 0 2px 0 4px; }
.doorpick .moreless { color: var(--ink-3); font-weight: 400; }
details.more { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
details.more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); list-style: none; }
details.more summary::after { content: " +"; color: var(--ink-3); }
details.more[open] summary::after { content: " \2212"; }
details.more summary::-webkit-details-marker { display: none; }
/* Door Lab's active-filter row only (a bare .active also matched every open screen, .view.active) */
#activeFilters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -6px 0 20px; }
#activeFilters .x { margin-left: 2px; opacity: .7; font-size: 14px; line-height: 1; }
#activeFilters .link { margin-left: 6px; }
.concept-note { display: flex; gap: 16px; align-items: center; background: var(--surface); border-radius: var(--radius); padding: 12px 16px 12px 12px; margin: -4px 0 22px; max-width: 760px; }
.concept-note img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.cn-title { font-weight: 600; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.cn-text { font-size: 13px; color: var(--ink-2); margin-top: 3px; line-height: 1.5; }
@media (hover: none) { .pin { opacity: .75; } }

.refs.four { grid-template-columns: repeat(4, 1fr); }
.mini { background: var(--surface); border-radius: 10px; padding: 8px; text-align: center; cursor: pointer; }
.mini .fine { margin-top: 4px; }
.mini-door { height: 120px; display: flex; align-items: center; justify-content: center; }
.mini-door canvas { max-height: 120px; max-width: 100%; }
.mini-door .unavail { font-size: 11px; padding: 0; }
.near-name { font-weight: 600; font-size: 14px; }
.fine.nm { margin: 0; }

/* adjust view */
.spec-title-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.spec-title { margin-top: 0; }
.pick-color { position: relative; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.pick-color:hover { border-color: var(--line-strong); background: var(--surface); }
.pick-color::after { content: "\25BE"; margin-left: 6px; font-size: 10px; }
.pick-color select { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; font-size: 14px; }
.spec-hint { font-size: 13px; color: var(--ink-2); margin: 16px 0 0; }
.axis { margin-top: 18px; }
.row-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.axis input[type=range] { display: block; width: calc(100% - 100% / 9 + 22px); margin: 9px auto 9px; }
.step { font: inherit; color: inherit; display: block; width: 100%; border: 1.5px solid transparent; }
.step.sel { border-color: var(--ink); box-shadow: 0 1px 6px rgba(43,49,63,.14); }
.step .de { min-height: 14px; font-weight: 600; color: var(--ink-2); }
.swatchpair .sw { width: 58px; height: 46px; display: flex; align-items: flex-end; justify-content: center; }
.swatchpair .sw i { font-style: normal; font-size: 10px; font-weight: 600; padding-bottom: 4px; color: rgba(0,0,0,.55); }
.swatchpair .sw.dark i { color: rgba(255,255,255,.75); }
.spec-links { display: flex; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.spec-actions .primary, .spec-actions .ghost { flex: 1 1 auto; justify-content: center; }
.step canvas { max-height: calc((100vh - 440px) / 3); min-height: 90px; }
.axis { margin-top: 14px; }
.door-fig canvas { max-height: calc(100vh - 410px); }

/* ===== v3: sliders clustered, rows = nearby options ===== */
.slider-card { background: var(--surface); border-radius: var(--radius); padding: 14px 20px 12px; margin-top: 14px; max-width: 640px; }
.sc-title, .near-head { font-size: 14px; font-weight: 600; color: var(--ink); }
.sc-title span, .near-head span { font-weight: 400; color: var(--ink-3); font-size: 13px; margin-left: 8px; }
.srow { display: grid; grid-template-columns: 58px 1fr 58px; align-items: center; gap: 14px; font-size: 13px; color: var(--ink-2); margin-top: 12px; }
.srow span:last-child { text-align: right; }
.srow input[type=range] { width: 100%; margin: 0; background: #DDD8CF; }
.near-head { margin-top: 20px; }
.axis { margin-top: 10px; }
.row-head { font-weight: 400; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.step canvas { max-height: calc((100vh - 560px) / 3); min-height: 84px; }
.step.sel { cursor: default; }
.step.off { visibility: hidden; }

/* ===== v4 ===== */
a.brand { text-decoration: none; color: inherit; cursor: pointer; }
.top-right { display: flex; align-items: center; gap: 10px; }
.top-right .link { font-size: 12px; }
.chip { white-space: nowrap; max-width: 100%; }
.filters .chip { height: auto; min-height: 28px; padding-top: 4px; padding-bottom: 4px; }
.sortwrap { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.sortwrap select { height: 30px; padding: 0 28px 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; outline: none; }
.link.danger { color: var(--danger); }
.stain-only { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 2px; }
.srow { grid-template-columns: 76px 1fr 76px; }
.srow.wood { grid-template-columns: 76px 1fr 0; }
.srow.wood .doorpick { justify-self: start; }

/* ===== v5: Side by Side + Kitchen View ===== */
.tab b { display: none; }
.tab { padding-left: 13px; padding-right: 13px; white-space: nowrap; }
.filters .chip { white-space: normal; text-align: left; line-height: 1.25; }
.d-links { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 12px 0 4px; }
.d-links .link { font-size: 13px; }

#view-side { grid-template-columns: 1fr; padding: 26px 32px 60px; align-content: start; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h2, .k-controls h2 { margin: 0; font-size: 24px; font-weight: 600; }
.page-head .muted { margin: 6px 0 0; max-width: 620px; }
.sbs-row { display: flex; gap: 3px; background: var(--surface); border-radius: 14px; padding: 26px 26px 14px; overflow-x: auto; }
.sbs-card { flex: 1 1 0; min-width: 120px; max-width: 250px; cursor: grab; border-radius: 10px; padding: 0 0 8px; transition: opacity .15s, box-shadow .15s; }
.sbs-card.dragging { opacity: .35; }
.sbs-card.over { box-shadow: -3px 0 0 var(--ink); }
.sbs-door { display: flex; align-items: flex-end; justify-content: center; min-height: 120px; }
.sbs-door canvas { width: 100%; height: auto; display: block; }
.sbs-meta { padding: 10px 6px 0; text-align: center; }
.sbs-meta .name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sbs-meta .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.sbs-card.mine .sub { color: var(--ink); font-weight: 600; }
.sbs-tools { display: flex; gap: 4px; justify-content: center; margin-top: 8px; opacity: 0; transition: opacity .15s; }
.sbs-card:hover .sbs-tools, .sbs-tools:focus-within { opacity: 1; }
@media (hover: none) { .sbs-tools { opacity: 1; } }
.sbs-tools .ghost.small { height: 26px; padding: 0 9px; }
.sbs-tools [disabled] { opacity: .3; pointer-events: none; }
.sbs-foot { display: flex; gap: 22px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

#view-kitchen { grid-template-columns: 330px 1fr; min-height: calc(100vh - 64px); }
.k-controls { padding: 26px 22px 40px 28px; border-right: 1px solid var(--line); overflow: auto; }
.k-controls .muted { margin: 6px 0 16px; }
.k-controls h4 { margin: 18px 0 8px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-templates { flex-direction: column; border-radius: 14px; align-items: stretch; }
.k-templates button { justify-content: flex-start; border-radius: 10px; }
.k-zone { border-top: 1px solid var(--line); margin-top: 18px; }
.k-cur { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.k-cur .dot { width: 14px; height: 14px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.k-group { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.k-gname { width: 64px; font-size: 12px; color: var(--ink-3); line-height: 1.2; }
.k-sw { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; box-shadow: inset 0 0 0 1px rgba(0,0,0,.16); transition: transform .12s; }
.k-sw:hover { transform: scale(1.15); }
.k-sw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.k-stage { padding: 26px 32px 40px; min-width: 0; }
.k-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); max-width: calc((100vh - 170px) * 16 / 9); }
.k-frame canvas { width: 100%; height: auto; display: block; }
.k-tag { position: absolute; left: 14px; bottom: 14px; background: rgba(250,249,246,.9); }
@media (max-width: 1100px) {
  #view-kitchen { grid-template-columns: 1fr; }
  .k-controls { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 20px; }
  .k-stage { padding: 18px 20px 40px; }
  #view-side { padding: 18px 20px 40px; }
}
.k-stage { align-self: start; position: sticky; top: 64px; }
.k-controls { align-self: start; position: sticky; top: 64px; height: calc(100vh - 64px); }
.k-sw { width: 22px; height: 22px; }
.k-gname { width: 58px; }
.k-zone { margin-top: 14px; }
.k-controls h4 { margin-top: 14px; }
@media (max-width: 1100px) { .k-stage, .k-controls { position: static; height: auto; } }
#view-spectrum.stain .step canvas { max-height: calc((100vh - 655px) / 3); min-height: 76px; }

/* ===== v6: Framed / Frameless ===== */
.top { grid-template-columns: auto 1fr auto; gap: 18px; }
.top-left { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tabs { justify-self: center; }
.mode { display: flex; padding: 3px; background: var(--surface-2); border-radius: 14px; flex: none; }
.mode button { border: 0; background: none; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-2); transition: all .18s var(--ease); }
.mode button.on { background: var(--ink); color: #fff; }
.plane { display: inline-flex; align-items: center; gap: 9px; padding-left: 14px; border-left: 1px solid var(--line); }
.plane-word { display: flex; flex-direction: column; font-size: 16px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; line-height: 1; color: var(--ink); }
.plane-word small { font-size: 10px; font-weight: 600; letter-spacing: .18em; color: var(--ink-3); margin-top: 4px; }
@media (max-width: 1320px) { .plane .tag { display: none; } .internal { display: none; } }
@media (max-width: 1100px) { .top { grid-template-columns: auto 1fr; } .tab { padding-left: 9px; padding-right: 9px; font-size: 13px; } }
@media (max-width: 900px) { .product { display: none; } }
.k-empty { font-size: 14px; color: var(--ink-2); line-height: 1.6; margin-top: 18px; }

/* ===== v7: angled Kitchen View (CSS 3D) ===== */
.k3-host { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #EEEAE3; }
.k3-scene { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; transform-origin: 0 0; perspective: 1500px; overflow: hidden; background: linear-gradient(#F1EEE8, #E9E5DE); }
.k3-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.k3-p { position: absolute; left: 0; top: 0; transform-origin: 0 0; backface-visibility: hidden; }
.k3-hood { backface-visibility: visible; filter: drop-shadow(-6px 10px 12px rgba(0,0,0,.18)); }
.k-select { width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); margin-bottom: 10px; outline: none; }

/* ===== v8: sharing ===== */
body.guest .tabs, body.guest .mode, body.guest .top-right { visibility: hidden; }
#view-share, #view-noaccess { grid-template-columns: 1fr; padding: 26px 32px 60px; align-content: start; }
.sec-title { font-size: 16px; font-weight: 600; margin: 26px 0 12px; }
.share-panel { background: var(--surface); border-radius: 14px; padding: 22px 26px 24px; margin-bottom: 26px; }
.share-panel h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.sp-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 34px; }
.sp-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink); margin: 16px 0 6px; }
.sp-label span { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.share-panel input:not([type=checkbox]), .share-panel textarea, .share-panel select, .d-share input, #shVote textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: inherit; font-size: 14px; background: var(--bg); color: var(--ink); outline: none; }
.share-panel input:focus, .share-panel textarea:focus { border-color: var(--focus); }
.sp-check { display: flex; align-items: center; gap: 9px; font-size: 14px; font-weight: 600; margin: 16px 0 8px; cursor: pointer; }
.sp-check input { width: 16px; height: 16px; accent-color: var(--ink); }
.sp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-row > input, .sp-row > select { flex: 1 1 160px; width: auto; }
.sp-actions { margin-top: 20px; }
.sp-error { color: var(--danger); font-size: 13px; margin: 12px 0 0; }
.sp-done { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; }
.sp-done .sp-row { margin-top: 10px; }
a.primary { text-decoration: none; }
.share-card { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 14px; max-width: 760px; }
.sc-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; margin-bottom: 8px; flex-wrap: wrap; }
.res-row { display: grid; grid-template-columns: 14px minmax(140px, 260px) 1fr 24px; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.res-row .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.res-bar { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.res-bar i { display: block; height: 100%; background: var(--ink); border-radius: 6px; }
.res-n { text-align: right; font-weight: 600; }
.res-who { grid-column: 2 / -1; font-size: 12px; color: var(--ink-3); margin-top: -2px; }
.share-card .row { display: flex; gap: 16px; margin-top: 10px; flex-wrap: wrap; }
.share-item { cursor: default; padding: 8px 8px 12px; border: 2px solid transparent; }
.share-item.votable { cursor: pointer; }
.share-item.votable:hover { border-color: var(--line); }
.share-item.picked { border-color: var(--ink); }
.pick-mark { margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.share-item.picked .pick-mark { color: var(--ink); }
#shVote { margin-top: 18px; max-width: 620px; display: grid; gap: 10px; }
.d-share { display: grid; gap: 8px; margin-top: 10px; }
.d-share .primary { justify-self: start; }
#view-noaccess h2 { font-weight: 600; color: var(--ink); }
@media (max-width: 900px) { .sp-grid { grid-template-columns: 1fr; gap: 6px; } }

/* ===== v9: swatch menu, hood reference ===== */
button.pick-color { background: none; font: inherit; font-size: 12px; font-weight: 600; }
.cmenu { position: absolute; z-index: 60; width: 320px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(43,49,63,.18); padding: 10px; }
.cmenu-q { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 999px; padding: 0 14px; font: inherit; font-size: 13px; background: var(--bg); outline: none; }
.cmenu-list { max-height: min(56vh, 460px); overflow: auto; margin-top: 8px; }
.cmenu-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 10px 8px 4px; position: sticky; top: 0; background: var(--surface); }
.cmenu-i { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 10px; font: inherit; font-size: 14px; text-align: left; color: var(--ink); }
.cmenu-i:hover { background: var(--surface-2); }
.cmenu-i.on { background: var(--surface-2); font-weight: 600; }
.cmenu-i .dot { width: 20px; height: 20px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.cmenu-n { flex: 1; }
.cmenu-f { font-size: 11px; color: var(--ink-3); }
.k-hoodref { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.k-hoodimg { width: 64px; height: 64px; object-fit: contain; background: var(--surface); border-radius: 10px; flex: none; }

/* ===== v10: concept filter, factory notes ===== */
#f-concept { margin-top: 16px; }
.concept-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 40px; padding: 0 14px; border-radius: 10px; border: 1.5px solid var(--ink); background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); transition: all .18s var(--ease); }
.concept-btn:hover { background: var(--surface-2); }
.concept-btn.on { background: var(--ink); color: #fff; }
.concept-btn .n { min-width: 22px; padding: 1px 7px; border-radius: 10px; background: var(--surface-2); color: var(--ink-2); font-size: 12px; text-align: center; }
.concept-btn.on .n { background: rgba(255,255,255,.2); color: #fff; }
.concept-btn[disabled] { border-color: var(--line); color: var(--ink-3); cursor: default; }
.factory { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border-left: 3px solid var(--ink-3); }
.factory h5 { margin: 0 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.factory p { margin: 0 0 6px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.factory.small { margin: 0 0 10px; padding: 8px 10px; background: var(--bg); }
.factory.small p { font-size: 12px; }
.k3-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ===== v11: competitor database ===== */
#view-comp { grid-template-columns: 1fr; padding: 26px 32px 60px; align-content: start; }
.comp-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.comp-bar input { height: 38px; width: 260px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); outline: none; font: inherit; font-size: 14px; }
.comp-card { cursor: default; }
.comp-card .door img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.comp-card .fine { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.comp-card .fine .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.comp-actions { display: flex; align-items: center; gap: 12px; margin-top: 9px; flex-wrap: wrap; }
.comp-card .tags:empty { display: none; }
.comp-card .door img { height: 100%; width: auto; }

/* ===== v12: photoreal kitchen ===== */
.k-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.k-actions { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.primary[disabled] { opacity: .6; cursor: default; }

/* v13: bigger, easier Color Lab sliders with a reset; roomier shortlist cards */
.slider-card { max-width: 980px; padding: 18px 24px 20px; }
.sc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sc-title { font-size: 16px; }
#resetSpec[disabled] { opacity: .45; cursor: default; }
.srow { grid-template-columns: 110px 1fr 110px; gap: 18px; margin-top: 20px; font-size: 14px; }
.srow.wood { grid-template-columns: 110px 1fr 0; }
.srow .nudge { height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; transition: background .15s var(--ease); }
.srow .nudge:hover { background: var(--surface-2); }
.srow .nudge:active { transform: translateY(1px); }
.srow input[type=range] { height: 10px; border-radius: 6px; cursor: pointer;
  background: linear-gradient(to right, transparent calc(50% - 1.5px), var(--ink-2) calc(50% - 1.5px), var(--ink-2) calc(50% + 1.5px), transparent calc(50% + 1.5px)), #DDD8CF; }
.srow input[type=range]::-webkit-slider-thumb { width: 34px; height: 34px; border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.srow input[type=range]::-moz-range-thumb { width: 34px; height: 34px; border: 2px solid var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.22); }
.srow input[type=range]:focus-visible { outline: 2px solid var(--ink); outline-offset: 8px; }
.shortlist { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.sl-card { grid-template-columns: 120px 1fr; }
.sl-card canvas { width: 120px; }

/* v14: factory instructions as a fold-out with labeled rows */
details.factory { padding: 0; overflow: hidden; }
details.factory summary { display: flex; align-items: baseline; gap: 10px; padding: 11px 14px; cursor: pointer; list-style: none; }
details.factory summary::-webkit-details-marker { display: none; }
details.factory summary::after { content: "+"; margin-left: auto; font-size: 16px; line-height: 1; color: var(--ink-3); }
details.factory[open] summary::after { content: "\2013"; }
details.factory .f-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); white-space: nowrap; }
details.factory .f-sum { font-size: 13px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
details.factory[open] .f-sum { display: none; }
details.factory dl { display: grid; grid-template-columns: max-content 1fr; gap: 7px 14px; margin: 0; padding: 2px 14px 10px; font-size: 13px; line-height: 1.45; }
details.factory dt { color: var(--ink-3); }
details.factory dd { margin: 0; color: var(--ink); }
details.factory .f-foot { margin: 0; padding: 8px 14px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
details.factory > p { padding: 0 14px; }
details.factory > .link { margin: 8px 14px 12px; }
details.factory.small dl { font-size: 13px; }
details.factory.small { padding: 0; margin: 0 0 10px; }

/* v15: room for the My concepts tab in the header */
.tab { display: inline-flex; align-items: center; gap: 5px; }
.tab .count { margin-left: 0; flex: none; }
.product { white-space: nowrap; }
@media (max-width: 1500px) { .tab { padding-left: 10px; padding-right: 10px; } .top { gap: 12px; } }
@media (max-width: 1100px) { .tab { padding-left: 7px; padding-right: 7px; font-size: 13px; } .top-right { display: none; } }
.tab.active { margin: 0; flex-wrap: nowrap; } /* the generic .active rule (filter bar) was lifting the current tab */

/* v16: account button and dialog */
.top-right { display: flex; align-items: center; gap: 12px; }
@media (max-width: 1100px) { .top { grid-template-columns: auto 1fr auto; } .top-right { display: flex; } #crawlStatus, #crawlNow { display: none; } }
#acctBtn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.acct { border: 0; border-radius: 14px; padding: 26px 26px 22px; width: min(400px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog.acct::backdrop { background: rgba(30,30,30,.35); }
dialog.acct form { display: block; position: relative; }
dialog.acct label { display: block; font-size: 13px; color: var(--ink-2); margin-top: 14px; }
dialog.acct input { display: block; width: 100%; height: 40px; margin-top: 5px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-size: 14px; color: var(--ink); outline: none; }
dialog.acct input:focus { border-color: var(--ink-2); }
dialog.acct .primary { width: 100%; margin-top: 18px; height: 42px; }
dialog.acct h3 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
dialog.acct .fine { margin: 12px 0 0; line-height: 1.5; }
dialog.acct #acctSignOut { margin-top: 18px; }
.acct-x { position: absolute; top: -14px; right: -12px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 6px; }
.acct-err { margin: 12px 0 0; font-size: 13px; color: var(--danger-strong); }
.top-left { min-width: max-content; }
@media (max-width: 1400px) { #crawlNow { display: none; } .tab { padding-left: 8px; padding-right: 8px; } }
@media (max-width: 1100px) { .tab { padding-left: 5px; padding-right: 5px; } .top { gap: 8px; padding-left: 14px; padding-right: 14px; } }
@media (max-width: 1100px) { .product { display: none; } .mode button { padding: 0 9px; } .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; } }

/* v17: People list for admins */
dialog.acct.wide { width: min(600px, calc(100vw - 32px)); }
dialog.acct h4 { margin: 22px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.person { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); }
.person .p-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.person .p-acts { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; font-size: 13px; }
.invite-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
dialog.acct .invite-row input { margin-top: 0; }
dialog.acct .invite-row .primary { width: auto; margin-top: 0; height: 40px; padding: 0 16px; }

/* v18: Brand filter as an A-Z list instead of bubbles */
#f-brand, #f-rta { display: flex; flex-direction: column; gap: 0; flex-wrap: nowrap; }
#f-brand .chip, #f-rta .chip { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font-size: 14px; text-align: left; white-space: nowrap; }
#f-brand .chip:hover, #f-rta .chip:hover { background: var(--surface-2); }
#f-brand .chip.on, #f-rta .chip.on { background: var(--ink); color: #fff; }
#f-brand .chip .n, #f-rta .chip .n { margin-left: 10px; }
#f-rta:not(:empty) { margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
@media (max-width: 1100px) { .top { grid-template-columns: auto minmax(0, 1fr) auto; } .tabs { justify-self: stretch; } .tab { flex: none; } }

/* v19: password reset and change */
.acct-foot { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
dialog.acct .acct-foot #acctSignOut { margin-top: 0; }
#acctForgot { display: block; margin: 12px auto 0; font-size: 13px; }
#acctChange { margin-top: 8px; padding-top: 4px; border-top: 1px solid var(--line); }
dialog.acct #pwSave { width: auto; margin-top: 12px; height: 38px; padding: 0 16px; }

/* v20: color and door-style filters on the Competitors tab */
.comp-bar { margin-bottom: 12px; }
.comp-filters { margin-bottom: 22px; padding: 4px 16px; background: var(--surface); border-radius: var(--radius); }
.cf-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.cf-row + .cf-row { border-top: 1px solid var(--line); }
.cf-label { width: 84px; flex: none; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.cf-row .chips { flex: 1; min-width: 0; }
#view-explore { align-items: start; } /* short result lists used to float down the page */

/* v21: filters inside Kitchen View */
.k-filters { margin-top: 10px; padding: 4px 12px 12px; background: var(--surface); border-radius: 10px; }
.k-filters .kf-label { margin: 10px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-filters .chip { height: 28px; padding: 0 10px; font-size: 13px; }
.k-source .fine .link { margin-left: 4px; }

/* v22: layout prompt for AI kitchens, and My kitchens */
.k-ai { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.k-ai input { flex: 1; min-width: 260px; height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); outline: none; }
.k-ai input:focus { border-color: var(--ink-2); }
#kAiNote { margin: 8px 0 0; }
.k-saved-h { margin: 26px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-saved { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.k-card { background: var(--surface); border-radius: 14px; padding: 8px 8px 10px; }
.k-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; border-radius: 10px; overflow: hidden; cursor: pointer; }
.k-thumb img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform .25s var(--ease); }
.k-thumb:hover img { transform: scale(1.03); }
.k-card-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 8px 4px 0; font-size: 13px; }
.k-card-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.k-card .fine { margin: 4px 4px 0; }

/* v23: one styled tooltip for the whole app */
.tip { position: fixed; z-index: 1000; left: 0; top: 0; padding: 6px 10px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 12px; line-height: 1.4; font-weight: 500;
  box-shadow: 0 6px 18px rgba(0,0,0,.18); pointer-events: none; opacity: 0; transform: translateY(3px); transition: opacity .14s var(--ease), transform .14s var(--ease); }
.tip.on { opacity: 1; transform: none; }

/* v24: reference picture for AI kitchens; "what they're pushing" on Competitors */
.k-ref { display: inline-flex; align-items: center; height: 42px; padding: 0 16px; border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 14px; }
.k-refchip { position: relative; display: inline-flex; }
.k-refchip img { height: 42px; width: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); }
.k-refchip button { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
#view-comp .stage-meta { display: flex; align-items: center; gap: 16px; }
.push-title { margin: 26px 0 12px; font-size: 16px; font-weight: 600; }
.push-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; align-items: start; }
.push-card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; }
.push-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.push-name { font-size: 16px; font-weight: 600; color: var(--ink); text-decoration: none; }
.push-name:hover { text-decoration: underline; }
.push-sec h5 { margin: 14px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.push-sec ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.push-sec.new { margin-top: 12px; padding: 2px 12px 10px; border-radius: 10px; background: var(--surface-2); }
.push-banners { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.push-banners img { width: 100%; height: 84px; object-fit: cover; border-radius: 10px; background: var(--bg); }
.push-social { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
.k-hoodw { display: flex; align-items: center; gap: 6px; margin-top: 8px; }

/* v25: "Concept doors" reads as a quiet label in the door picker, not a button */
.doorpick .grp-label { align-self: center; padding: 0 4px 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; cursor: default; user-select: none; }

/* v26: Competitors first; Browse colors + Color Lab grouped as "Create"; sort on Competitors */
.tab-group { display: flex; align-items: center; align-self: center; gap: 2px; padding: 3px 4px 3px 10px; margin: 0 4px; border-radius: 14px; background: var(--surface-2); }
.tg-label { margin-right: 4px; font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); user-select: none; }
.tab-group .tab { padding: 7px 11px; border: 0; border-radius: 10px; }
.tab-group .tab.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.comp-sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.comp-sort select { height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); }
.comp-card.kcd .door { display: flex; align-items: center; justify-content: center; }
.comp-card.kcd .door canvas { max-width: 100%; height: auto; }
@media (max-width: 1250px) { .tg-label { display: none; } .tab-group { padding-left: 4px; } }
#crawlNow[hidden], #acctBtn[hidden] { display: none !important; }
.top-right { white-space: nowrap; }
#acctBtn { flex: none; }
@media (max-width: 1640px) { #crawlStatus { display: none; } }

/* v27: "Most promoted doors" (replaces the earlier promotions list) */
.push-site { margin-top: 30px; }
.push-site .push-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.push-site h3 { margin: 0; font-size: 18px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.push-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.push-doors { margin-top: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.push-door .door { display: flex; align-items: center; justify-content: center; }
.push-door .door canvas { max-width: 100%; height: auto; }
.push-why { margin-top: 6px; line-height: 1.4; }
.push-loose { margin: 14px 0 0; }

/* v28: admin "needs attention" bar */
.alertbar { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 9px 32px; background: #F6E9D6; border-bottom: 1px solid #E5D2B4; font-size: 13px; color: var(--ink); }
.alertbar[hidden] { display: none; }
.alertbar .ab-msg { flex: 1; min-width: 240px; }
.alertbar .ab-note { color: var(--ink-3); font-size: 12px; }
#kAiNote.warn { color: #8A4B14; font-weight: 600; background: #F6E9D6; padding: 8px 12px; border-radius: 10px; }
.card-del { margin-top: 8px; font-size: 12px; }

/* v29: delete on an idea card is a quiet icon that appears on hover (top left, mirroring the pin) */
.card-del { position: absolute; top: 10px; left: 10px; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: rgba(250,249,246,.94);
  box-shadow: 0 1px 3px rgba(0,0,0,.1); display: grid; place-items: center; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity .2s var(--ease), color .2s var(--ease); }
.card-del svg { width: 15px; height: 15px; }
.card:hover .card-del, .card-del:focus-visible { opacity: 1; }
.card-del:hover { color: var(--danger-strong); }
@media (hover: none) { .card-del { opacity: .75; } }

/* v30: Kitchen View "colors to choose from": two summary buttons that open in place */
.k-srcbtn { display: flex; align-items: center; gap: 10px; width: 100%; height: 42px; margin-top: 8px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.k-srcbtn:hover, .k-srcbtn.open { border-color: var(--ink-3); }
.k-srclabel { width: 56px; flex: none; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-srcval { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.k-caret { color: var(--ink-3); font-size: 16px; line-height: 1; }
.k-panel { margin-top: 6px; padding: 6px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.k-panel.k-filters { padding: 2px 12px 12px; }
.k-check { display: flex; align-items: center; gap: 10px; width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; text-align: left; }
.k-check:hover { background: var(--surface-2); }
.k-check .k-box { width: 18px; height: 18px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--ink-3); border-radius: 6px; font-size: 12px; line-height: 1; color: #fff; }
.k-check.on .k-box { background: var(--ink); border-color: var(--ink); }
.k-check .n { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.k-panel-head { display: flex; align-items: center; gap: 12px; margin: 6px 8px 2px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.k-panel-head span { flex: 1; }
.k-panel-head .link { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 500; }
.k-srcnote { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
.k-gname { overflow: hidden; text-overflow: ellipsis; }

/* v31: "Gaps and ideas" on the Competitors tab */
.gap-title { margin: 34px 0 6px; font-size: 18px; font-weight: 600; }
.gap-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; margin-top: 18px; }
.gap-callout { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); font-size: 14px; line-height: 1.5; }
.gap-callout-n { flex: none; font-size: 24px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.gap-table { display: grid; margin-top: 12px; background: var(--surface); border-radius: var(--radius); padding: 6px 14px 10px; overflow-x: auto; font-size: 13px; }
.gap-th { padding: 10px 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gap-th.kcd, .gap-td.kcd { background: var(--surface-2); }
.gap-th.kcd { border-radius: 10px 10px 0 0; color: var(--ink); }
.gap-td { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px; border-top: 1px solid var(--line); }
.gap-td.name { font-size: 14px; font-weight: 600; flex-wrap: wrap; }
.gap-td.none { color: var(--ink-3); }
.gap-td.count { flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; font-weight: 600; }
.gap-sep { grid-column: 1 / -1; padding: 12px 6px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); border-top: 1px solid var(--line); }
.gap-dots, .gap-swatches { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; }
.gap-swatches { margin: 8px 0 6px; }
.gap-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0,0,0,.12); flex: none; }
.gap-dot.big { width: 22px; height: 22px; }
.gap-more { font-size: 11px; color: var(--ink-3); }
.gap-flag { font-size: 11px; }
.gap-flag.gap { background: #F2D9CF; color: #7A2E1C; }
.gap-flag.thin { background: #F6E9D6; color: #7A5210; }
.gap-flag.lead { background: #DDE9DC; color: #2F5A33; }
.gap-ideas { margin-top: 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.gap-list { margin-top: 10px; background: var(--surface); border-radius: var(--radius); padding: 4px 18px; }
.gap-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 11px 0; border-top: 1px solid var(--line); font-size: 14px; }
.gap-line:first-child { border-top: 0; }
.gap-line strong { min-width: 150px; }
.gap-line .tag { margin-left: auto; }
.gap-flag.none { background: var(--surface-2); color: var(--ink-3); }

/* v32: filter choices that would show nothing are switched off */
.chip.zero, .chip[disabled] { opacity: .42; cursor: default; }
.chip.zero:hover, .chip[disabled]:hover { background: inherit; }

/* v33: KCD lines that are not generally available show as a ring in the gaps grid */
.gap-dot.limited { background: transparent; border-width: 3px; border-style: solid; }

/* v34: Door Lab and Color Lab as one pair; Back link in Color Lab; fine-tune shortcut on Door Lab cards */
.tab-group { padding-left: 4px; }
.tg-arrow { color: var(--ink-3); font-size: 16px; padding: 0 1px; user-select: none; }
.lab-intro { margin: 0 0 14px; }
.lab-intro h2 { margin: 0 0 4px; font-size: 24px; font-weight: 600; }
.lab-intro p { margin: 0; max-width: 720px; }
.spec-back { display: inline-block; margin: 0 0 10px; font-size: 13px; }
.card-tune { position: absolute; left: 50%; transform: translate(-50%, 6px); top: calc(100% - 132px); padding: 8px 14px; border: 0; border-radius: 14px; background: rgba(43,49,63,.92); color: #fff; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; cursor: pointer; opacity: 0; transition: opacity .18s var(--ease), transform .18s var(--ease); }
.card:hover .card-tune, .card-tune:focus-visible { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .card-tune { display: none; } }

/* v35: header hierarchy. Three main places (Competitors, Door Lab > Color Lab, Kitchen View), then quieter tools and saved work */
.tab-sep { align-self: center; width: 1px; height: 22px; margin: 0 10px; background: var(--line); flex: none; }
.tab.minor { font-size: 13px; font-weight: 500; color: var(--ink-3); padding-left: 9px; padding-right: 9px; }
.tab.minor:hover, .tab.minor.active { color: var(--ink); }
.tab:not(.minor) { font-weight: 600; }
@media (max-width: 1100px) { .tab-sep { margin: 0 5px; } .tab.minor { font-size: 13px; padding-left: 6px; padding-right: 6px; } }

/* v36: competitors fold away in Kitchen View's Brands panel; no reference photo in the profile note */
.k-fold { display: flex; align-items: center; gap: 8px; flex: 1; padding: 4px 0; border: 0; background: none; font: inherit; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; text-align: left; }
.k-comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 6px; }
.k-comp-grid .k-check { font-size: 13px; padding: 0 6px; gap: 8px; }
.concept-note img, .concept-note > a { display: none; }

/* v37: Competitors opens on doors; profile and color filters fold behind one button */
.comp-filters[hidden] { display: none; }
#compFiltersBtn.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
.comp-bar { margin-bottom: 18px; }

/* v38: Gaps and ideas, who had it first and what arrived when */
.when-line { align-items: flex-start; flex-wrap: nowrap; }
.when-line strong { display: flex; flex-direction: column; gap: 2px; min-width: 170px; flex: none; }
.when-line strong .fine { font-weight: 400; }
.when-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.when-lab { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin: 0 2px 0 6px; }
.when-lab:first-child { margin-left: 0; }
.when-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 5px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; background: var(--bg); white-space: nowrap; }
.when-chip em { font-style: normal; color: var(--ink-2); }
.when-chip.after { border-color: var(--ink-2); }
.when-year strong { min-width: 60px; }
.when-year .gap-dots { flex: 1; gap: 4px; }
.gap-dot.kcd-ring { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); margin: 0 4px; }
@media (max-width: 800px) { .when-line { flex-wrap: wrap; } }
.when-chip.sure { border-color: var(--ink); font-weight: 600; }
.when-chip.sure em { font-weight: 400; }

/* v39: lists inside the Shortlist */
.sl-lists { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 18px; }
.sl-lists[hidden] { display: none; }
.sl-lists .link { font-size: 13px; }
.sl-list-tools { display: inline-flex; gap: 14px; margin-left: auto; }
.sl-list-input { font: inherit; font-size: 13px; padding: 6px 12px; border: 1px solid var(--ink-2); border-radius: 999px; background: var(--surface); width: 210px; }
.sl-move { font: inherit; font-size: 13px; color: var(--ink-2); border: 1px solid var(--line); border-radius: 6px; background: var(--surface); padding: 3px 6px; max-width: 150px; }
.sl-list-empty { grid-column: 1 / -1; }

/* v40: one Save, lists in My Ideas, Shortlist as a star */
.pin.txt { width: auto; height: 28px; padding: 0 11px; border-radius: 999px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink); cursor: pointer; white-space: nowrap; }
.pin.txt.on { color: #fff; }
@media (hover: none) { .pin.txt { opacity: 1; } }
#ideaLists { margin: 4px 0 16px; }
.sl-list-tools { align-items: center; }
.card .meta .sl-move { margin-top: 8px; }
.sl-group { grid-column: 1 / -1; margin: 10px 0 -4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.sl-group:first-child { margin-top: 0; }
#ideasNote { margin-top: 18px; }
.ideas-foot { margin-top: 22px; }

/* v41: Settings screen for admins */
#view-admin { max-width: 1040px; }
.admin { display: grid; gap: 18px; }
.admin-card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; }
.admin-card h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.admin-card .fine { margin: 0 0 12px; }
.admin-warn { margin: 0 0 12px; padding: 10px 12px; border-left: 3px solid #B98A2F; background: #F6EFDF; border-radius: 6px; font-size: 13px; color: var(--ink); }
.admin-row { display: grid; grid-template-columns: minmax(200px, 300px) 1fr; gap: 8px 22px; padding: 14px 0; border-top: 1px solid var(--line); }
.admin-what { display: flex; flex-direction: column; gap: 3px; font-size: 14px; }
.admin-who { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.admin-add { font: inherit; font-size: 13px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); width: 190px; }
.admin-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; margin: 0 0 12px; }
.admin-line select, .admin-num { font: inherit; font-size: 14px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.admin-num { width: 90px; }
.admin-sites { display: grid; grid-template-columns: minmax(160px, 1.4fr) 1fr 1fr; gap: 0; font-size: 14px; margin: 0 0 14px; max-width: 620px; }
.admin-sites > div { padding: 6px 0; border-top: 1px solid var(--line); }
.admin-th { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); border-top: 0 !important; }
.admin-stale { color: var(--danger-strong); font-weight: 600; }
#view-admin .invite-row { margin-top: 12px; max-width: 640px; }
.inv-admin { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
#view-admin .person { max-width: none; }
@media (max-width: 760px) { .admin-row { grid-template-columns: 1fr; } }
#view-admin { grid-template-columns: 1fr; padding: 30px 32px 60px; align-content: start; }
#view-admin .invite-row { grid-template-columns: 1fr 1.3fr auto auto; align-items: center; }
#view-admin .invite-row input[type="text"], #view-admin .invite-row input:not([type]), #view-admin .invite-row input[type="email"] { height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-size: 14px; color: var(--ink); min-width: 0; }
#view-admin .invite-row .primary { height: 38px; padding: 0 16px; }

/* v42: review pass. My Ideas is its own simple screen; gaps table headers; narrow header; Settings button at tablet width */
#view-explore.ideas-mode { grid-template-columns: 1fr; }
#view-explore.ideas-mode > aside.filters, #view-explore.ideas-mode #active, #view-explore.ideas-mode .active-row { display: none; }
.gap-th { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25; align-self: end; }
#compGaps { max-width: 100%; }
.gap-table { max-width: 100%; }
#view-admin #crawlNow { display: inline-flex; }
@media (max-width: 1100px) { .tab { padding-left: 4px; padding-right: 4px; } .tab.minor { padding-left: 4px; padding-right: 4px; } .tab-sep { margin: 0 3px; } .mode button { padding: 0 7px; } }
.comp-actions { flex-wrap: wrap; row-gap: 4px; }
#view-explore.ideas-mode #activeFilters { display: none; }
#view-explore.ideas-mode .pin.txt { opacity: 1; }
@media (max-width: 1100px) { .tab, .tab.minor { padding-left: 3px; padding-right: 3px; font-size: 12px; } .tab-sep { margin: 0 2px; } }
#view-comp > *, #compGaps > * { min-width: 0; }
#compGaps { overflow-x: auto; }

/* v43: step readout under each Color Lab slider */
.srow { position: relative; }
.sval { grid-column: 1 / -1; justify-self: center; min-height: 15px; margin-top: -4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.srow span.sval:last-child { text-align: center; }

/* v44: Kitchen View in three steps (Room, Cabinets, Picture); one part at a time; click the room to pick a part */
.k-controls h4.k-step, .k-ai h4.k-step { display: flex; align-items: center; gap: 8px; margin: 22px 0 10px; font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--ink); }
.k-step span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; }
.k-rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.k-room { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px 8px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; color: var(--ink-2); }
.k-room:hover { border-color: var(--line-strong); }
.k-room.on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.k-room-pic svg { width: 54px; height: 36px; display: block; }
.k-room-pic rect { fill: currentColor; opacity: .55; }
.k-room.on .k-room-pic rect { opacity: .9; }
.k-room-name { font-size: 11px; line-height: 1.2; text-align: center; }
.k-same { width: 100%; margin: 0 0 10px; }
.k-parts { display: flex; width: 100%; }
.k-parts button { flex: 1; justify-content: center; }
.k-zone.k-flat { border-top: 0; margin-top: 12px; }
.k-zone.k-flat .k-gname { display: block; margin: 10px 0 6px; }
.k-zone.k-more { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 13px; }
.k-more .k-panel { flex-basis: 100%; }
.k-hoods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.k-hood { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font: inherit; cursor: pointer; }
.k-hood.on { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.k-hood img { width: 100%; height: 54px; object-fit: contain; }
.k-hood-none { display: grid; place-items: center; width: 100%; height: 54px; font-size: 11px; color: var(--ink-3); background: var(--surface-2); border-radius: 6px; }
.k-hood-name { font-size: 11px; line-height: 1.2; text-align: center; color: var(--ink-2); }
.k-hint { margin: 8px 0 0; }
.k-ai { display: block; margin-top: 4px; }
.k-ai-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.k-ai-more { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.k-ai-more[hidden] { display: none; }
.k-ai-more #kPrompt { flex: 1; min-width: 260px; }
.k-ai-tip { cursor: help; border-bottom: 1px dotted var(--ink-3); }
#kScene canvas { touch-action: manipulation; }
@media (max-width: 1100px) { #view-kitchen .k-stage { order: -1; position: static; } .k-hoods { grid-template-columns: repeat(6, 1fr); } .k-rooms { max-width: 520px; } .k-parts { max-width: 520px; } }

/* v45: Room View. KCD renderings as rooms; steps in order at tablet width */
#kTemplates.k-rooms { display: block; }
.k-room-head { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink); }
.k-room-head:first-child { margin-top: 0; }
.k-room-head span { font-weight: 400; color: var(--ink-3); font-size: 12px; }
#kTemplates .k-rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
#kTemplates .k-rooms.photo { grid-template-columns: repeat(2, 1fr); }
.k-room.photo { padding: 0 0 6px; overflow: hidden; }
.k-room.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
#kRoomPic { z-index: 1; }
#kPhoto { z-index: 2; }
.k-frame .k-tag { z-index: 3; }
@media (max-width: 1100px) {
  #view-kitchen.active { display: flex; flex-direction: column; }
  #view-kitchen .k-stage { display: contents; }
  #view-kitchen .k-frame { order: 1; margin: 16px 16px 0; }
  #view-kitchen .k-hint { order: 2; margin: 8px 18px 0; }
  #view-kitchen .k-controls { order: 3; height: auto; position: static; border-right: 0; padding-top: 14px; }
  #view-kitchen #kAi, #view-kitchen #kAiNote, #view-kitchen .k-actions, #view-kitchen #kSavedWrap, #view-kitchen #kNote { order: 4; margin-left: 28px; margin-right: 22px; }
  #view-kitchen #kNote { margin-bottom: 40px; }
  #kTemplates .k-rooms.photo { grid-template-columns: repeat(4, 1fr); max-width: none; }
}
#kTemplates .k-rooms.photo { grid-template-columns: repeat(3, 1fr); gap: 6px; } .k-room.photo .k-room-name { font-size: 11px; padding: 0 3px; }
@media (max-width: 1100px) {
  #view-kitchen { align-items: stretch; }
  #view-kitchen .k-frame { align-self: center; width: calc(100% - 32px); max-width: 900px; }
  #view-kitchen .k-controls, #view-kitchen #kAi, #view-kitchen #kAiNote, #view-kitchen .k-actions, #view-kitchen #kSavedWrap, #view-kitchen #kNote, #view-kitchen .k-hint { align-self: stretch; }
  #view-kitchen .k-controls { border-bottom: 0; }
}

/* v46: "Your own photo" is a room tile in step 1; a picture can also be dropped on the room */
.k-room.photo.own.empty { border-style: dashed; justify-content: center; padding: 0 0 6px; }
.k-own-plus { display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; font-size: 24px; font-weight: 300; color: var(--ink-2); background: var(--surface-2); }
.k-room.photo.own.empty:hover .k-own-plus { color: var(--ink); }
.k-frame.drop { outline: 3px dashed var(--ink-2); outline-offset: -6px; }

/* v47: fixes from the test pass */
#view-admin #crawlNow { display: none; }
#view-admin #crawlNow:not([hidden]) { display: inline-flex; }

/* v48: the room while an AI picture is being made */
.k-busy { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; background: rgba(244, 242, 238, .62); backdrop-filter: blur(7px) saturate(.85); -webkit-backdrop-filter: blur(7px) saturate(.85); animation: kBusyIn .35s var(--ease) both; }
.k-busy[hidden] { display: none; }
.k-busy-card { width: min(400px, calc(100% - 48px)); padding: 22px 24px 20px; background: rgba(250, 249, 246, .94); border-radius: 14px; box-shadow: 0 10px 40px rgba(43, 49, 63, .14), 0 0 0 1px rgba(43, 49, 63, .06); text-align: left; }
.k-busy-title { font-size: 16px; font-weight: 600; color: var(--ink); }
.k-busy-sub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 13px; color: var(--ink-2); }
.k-busy-sub .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.k-busy-bar { position: relative; height: 4px; margin: 16px 0 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.k-busy-bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 6px; background: var(--ink); transition: width .5s linear; }
.k-busy-step { font-size: 13px; color: var(--ink-2); min-height: 17px; }
#view-kitchen.busy .k-controls { pointer-events: none; opacity: .55; transition: opacity .25s var(--ease); }
#view-kitchen.busy #kAiMore, #view-kitchen.busy #kPhotoBack, #view-kitchen.busy #kSave, #view-kitchen.busy #kAiOpts { pointer-events: none; opacity: .5; }
@keyframes kBusyIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .k-busy { animation: none; } .k-busy-bar span { transition: none; } }
.k-frame.own .k-photo { object-fit: contain; background: #E9E6E0; }

/* v49: tidy option for a person's own photo */
.k-tidy { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink); cursor: pointer; }
.k-tidy[hidden] { display: none; }
.k-tidy input { width: 15px; height: 15px; accent-color: var(--ink); }
#view-kitchen.busy .k-tidy { pointer-events: none; opacity: .5; }
.k-tidy { flex: none; white-space: nowrap; width: auto; margin: 0; } .k-tidy input { flex: 0 0 15px; min-width: 0; padding: 0; margin: 0; display: inline-block; }

/* v50: download and before/after in Room View; How it works; Feedback */
.k-split { position: absolute; inset: 0; z-index: 3; cursor: ew-resize; touch-action: none; }
.k-split[hidden] { display: none; }
.k-split-line { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(43,49,63,.25); }
.k-split-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--ink); font-size: 18px; letter-spacing: 2px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.k-split-lab { position: absolute; top: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(250,249,246,.9); font-size: 12px; font-weight: 600; color: var(--ink); pointer-events: none; }
.k-split-lab.l { left: 14px; } .k-split-lab.r { right: 14px; }
.k-frame .k-tag { z-index: 4; }
#kCompare.on { border-color: var(--ink); color: var(--ink); font-weight: 600; }
dialog.acct.how { width: min(520px, calc(100vw - 32px)); }
dialog.acct h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.how-steps { list-style: none; margin: 14px 0 12px; padding: 0; display: grid; gap: 12px; }
.how-steps li { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.how-steps li > span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; margin-top: 1px; }
.how-steps strong { color: var(--ink); }
.how-foot { display: flex; align-items: center; gap: 16px; margin-top: 16px; }
dialog.acct .how-foot .primary { width: auto; margin: 0; padding: 0 20px; height: 40px; }
dialog.acct textarea { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-size: 14px; color: var(--ink); resize: vertical; }
.fb-pill { position: fixed; right: 16px; bottom: 14px; z-index: 30; height: 30px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; background: rgba(250,249,246,.94); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.fb-pill:hover { color: var(--ink); border-color: var(--line-strong); }
.fb-pill[hidden] { display: none; }
#howBtn[hidden] { display: none; }
@media (max-width: 1100px) { #howBtn { display: none; } }
@media print { .fb-pill { display: none; } }
#howDlg .acct-x, #fbDlg .acct-x { top: 10px; right: 12px; } #howDlg, #fbDlg { overflow-x: hidden; }

/* v51: a thin vertical divider between Door Lab and Color Lab instead of a chevron */
.tg-arrow.tg-pipe { display: inline-block; width: 1px; height: 16px; margin: 0 3px; background: var(--line-strong); font-size: 0; }

/* v52: header in workflow order. Four equal tabs for the work; My Ideas and Shortlist by the account; Side by Side reached from "Compare" links */
.tabs { gap: 6px; }
.tabs .tab { font-size: 14px; }
.top-right .tab.mine { font-size: 13px; font-weight: 500; color: var(--ink-2); padding: 0 8px; white-space: nowrap; align-self: stretch; }
.top-right .tab.mine:hover, .top-right .tab.mine.active { color: var(--ink); }
.top-right .tab-sep { margin: 0 2px; height: 18px; }
.top-right { align-self: stretch; }
@media (max-width: 1250px) { #crawlStatus { display: none; } }
@media (max-width: 1100px) { .top-right { gap: 6px; } .top-right .tab-sep { display: none; } .top-right .tab.mine { font-size: 13px; padding: 0 5px; } .tabs .tab { font-size: 13px; } }


/* v53 (Nov 21): Gaps and ideas in four tabs; color map, profiles by color, what's moving, KCD scorecard, closest rival */
.gap-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 4px; }
.gap-tabs .chip { height: 32px; padding: 0 15px; border-radius: 999px; font-size: 14px; }
.gap-pane[hidden] { display: none; }
.gap-title.first { margin-top: 20px; }
.gap-rank { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-right: 8px; padding: 0 5px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 600; vertical-align: 1px; }
.map-label { margin-top: 16px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.color-map { position: relative; height: 360px; margin-top: 8px; padding: 30px 64px; background: var(--surface); border-radius: var(--radius); }
.map-plot { position: relative; width: 100%; height: 100%; }
.map-ax { position: absolute; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.map-ax.top { top: 9px; left: 50%; transform: translateX(-50%); }
.map-ax.bottom { bottom: 9px; left: 50%; transform: translateX(-50%); }
.map-ax.left { left: 12px; top: 50%; transform: translateY(-50%); }
.map-ax.right { right: 12px; top: 50%; transform: translateY(-50%); }
.map-dot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; padding: 0; border-radius: 50%; border: 1px solid rgba(0,0,0,.16); cursor: pointer; transition: transform .12s; }
.map-dot:hover { transform: scale(1.5); z-index: 3; }
.map-dot.kcd { width: 18px; height: 18px; margin: -9px 0 0 -9px; z-index: 2; border-color: transparent; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.pair-table .gap-td.pair { justify-content: center; font-weight: 600; margin: 2px; min-height: 36px; border-top: 0; border-radius: 6px; }
.pair-table .gap-td.pair.ours { box-shadow: inset 0 0 0 2px var(--ink); }
.pair-table .gap-td.name { border-top: 0; }
.pair-table .gap-th, .move-table .gap-th { text-align: center; }
.pair-table .gap-th:first-child, .move-table .gap-th:first-child { text-align: left; }
.move-table .gap-td { align-items: center; }
.move-table .gap-dot.kcd-ring { margin: 3px 5px; }
.score-table { grid-template-columns: minmax(190px, 1.3fr) minmax(200px, 1.6fr) minmax(150px, 1.1fr) minmax(100px, .7fr) minmax(150px, auto); }
.score-table .gap-td.name { flex-wrap: nowrap; gap: 10px; }
.score-table .gap-td.name .fine { font-weight: 400; }
.rival strong { min-width: 150px; }
.rival-bar { flex: 0 1 260px; min-width: 120px; height: 8px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.rival-bar span { display: block; height: 100%; border-radius: 6px; background: var(--ink); }
.rival-n { min-width: 96px; font-weight: 600; }
@media (max-width: 800px) { .color-map { height: 300px; padding: 28px 16px; } .map-ax.left, .map-ax.right { top: auto; bottom: 9px; transform: none; } }
.gap-table > .gap-th[title] { font-size: 10px; letter-spacing: .02em; }


/* v54 (Nov 21): Who had it first as a timeline */
.tl-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 10px 0 4px; font-size: 13px; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 8px; }
.tl-legend i { display: inline-block; flex: none; }
.tl-k-demo { width: 2px; height: 16px; background: var(--ink); }
.tl-dot-demo { width: 22px; height: 10px; border-radius: 6px; background: linear-gradient(90deg, rgba(110,104,96,0), #8C857B 70%); }
.tl-win-demo { width: 26px; height: 10px; border-radius: 6px; background: #8C857B; box-shadow: 0 0 0 1.5px var(--ink); }
.tl-scroll { overflow-x: auto; margin-top: 10px; background: var(--surface); border-radius: var(--radius); }
.tl { min-width: 760px; padding: 4px 18px 10px; }
.tl-row { display: grid; grid-template-columns: 190px 1fr 190px; gap: 16px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); }
.tl-row.tl-head { border-top: 0; padding: 6px 0 0; }
.tl-label { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.tl-label .fine { font-weight: 400; }
.tl-track { position: relative; min-height: 20px; }
.tl-head .tl-track { height: 18px; }
.tl-ylab { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); }
.tl-year { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); }
.tl-k { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); z-index: 2; }
.tl-k.upcoming { background: repeating-linear-gradient(180deg, var(--ink) 0 4px, transparent 4px 7px); }
.tl-kdot { position: absolute; top: -7px; left: 50%; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink); }
.tl-dot { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--c); border: 1px solid rgba(0,0,0,.18); z-index: 1; }
.tl-dot::before { content: ''; position: absolute; right: 10px; top: 3px; width: 22px; height: 4px; border-radius: 6px; background: linear-gradient(90deg, transparent, rgba(110,104,96,.35)); }
.tl-dot.exact { box-shadow: 0 0 0 1.5px var(--ink); }
.tl-dot.exact::before { display: none; }
.tl-win { position: absolute; height: 10px; margin-top: -5px; border-radius: 6px; box-shadow: 0 0 0 1.5px var(--ink); z-index: 1; }
.tl-dot:hover, .tl-win:hover { z-index: 4; transform: scale(1.25); }
.tl-sum { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.tl-sum .tag { margin: 0; }
.tl-k.own { width: 0; margin-left: 0; background: none; border-left: 1.5px dotted var(--ink-3); z-index: 1; }
.tl-k.own.upcoming { background: none; }

/* v55 (Nov 21): Shortlist cards keep their text inside; the My Ideas star reads as an action until it is on */
.sl-card { grid-template-columns: 120px minmax(0, 1fr); }
.sl-card > div { min-width: 0; }
.sl-card textarea { box-sizing: border-box; max-width: 100%; }
.sl-card details.factory { max-width: 100%; box-sizing: border-box; }
.sl-card details.factory dl { grid-template-columns: max-content minmax(0, 1fr); }
.sl-card details.factory dd, .sl-card .name, .sl-card .sub { overflow-wrap: anywhere; }
@media (max-width: 560px) { .sl-card { grid-template-columns: 84px minmax(0, 1fr); } .sl-card canvas { width: 84px; } }
.pin.txt.add { background: rgba(250,249,246,.9); color: var(--ink-2); font-weight: 500; box-shadow: none; border: 1px solid var(--line); }
.pin.txt.add:hover { color: var(--ink); border-color: var(--ink-3); }

/* v56 (Nov 21): links from Gaps and ideas to the filtered Doors view */
.gap-link { color: inherit; text-decoration: underline; text-decoration-color: var(--ink-3); text-underline-offset: 3px; cursor: pointer; }
.gap-link:hover { text-decoration-color: var(--ink); }
#compGroup[hidden] { display: none; }

/* v57 (Nov 21): someone not yet let in (guest) can still reach Sign in at the top right */
body.guest .top-right #acctBtn { visibility: visible; }

/* v58 (Nov 21): Competitors - the doors are the page; Most promoted and Gaps and ideas are quiet side views */
#compMode[hidden] { display: none; }
.comp-more { display: flex; gap: 8px; flex-wrap: wrap; }
.comp-more-link { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: transparent; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; transition: border-color .15s, color .15s; }
.comp-more-link:hover { color: var(--ink); border-color: var(--ink-3); }
.comp-more-link span { color: var(--ink-3); }
.comp-more-link[hidden] { display: none; }
.comp-back { display: inline-block; margin-bottom: 6px; font-size: 13px; }
.comp-back[hidden] { display: none; }

/* v59 (Nov 21): factory instructions box - no dark stripe bent around the rounded corner; a thin even outline instead */
.factory, details.factory, .factory.small, details.factory.small { border-left: 0; border: 1px solid var(--line); }

/* v60 (Nov 21): Shortlist cards say what each door is made of */
.sl-spec { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 3px 12px; margin: 6px 0 12px; font-size: 13px; line-height: 1.45; }
.sl-spec dt { color: var(--ink-3); }
.sl-spec dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* v61 (Nov 21): Shortlist - "Sent to you": shares a colleague sent, found without the email */
#toMe { margin-bottom: 8px; }
#toMe .sec-title { margin-top: 4px; }
.share-card.to-me .row { align-items: center; justify-content: flex-end; }
.share-card.to-me.waiting { box-shadow: inset 0 0 0 1px var(--line, rgba(0,0,0,.12)); }
.tm-msg { margin: 0 0 10px; font-size: 13px; color: var(--ink-2, #555); }
.tm-doors { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; margin-top: 4px; }
.tm-door { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 92px; text-align: center; color: var(--ink-2); }
.tm-door.on { color: var(--ink); font-weight: 600; }
.tm-pic { width: 64px; display: flex; justify-content: center; }
.tm-pic img, .tm-pic canvas { width: 100%; height: auto; display: block; }
.tm-status { margin-right: auto; font-size: 13px; color: var(--ink-3); }
.tm-door .dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }

/* v62 (Nov 21): Competitors - the three deeper views as tiles that say what each answers (CEO: the pills undersold them) */
#compMore { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; }
#compMore.in-side { grid-template-columns: repeat(2, minmax(0, 340px)); margin-top: 32px; }
.comp-more-link { display: flex; align-items: center; gap: 14px; height: auto; min-height: 68px; padding: 14px 16px; text-align: left;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color .15s, box-shadow .15s, transform .15s; }
.comp-more-link:hover { border-color: var(--ink-3); box-shadow: 0 6px 18px rgba(40, 36, 30, .07); transform: translateY(-1px); }
.cm-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--bg, #F3F1ED); display: grid; place-items: center; }
.cm-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cm-text strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.cm-text > span { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.comp-more-link .cm-arrow { margin-left: auto; color: var(--ink-3); font-size: 16px; }
@media (max-width: 900px) { #compMore, #compMore.in-side { grid-template-columns: 1fr; } }

/* Head to Head */
.h2h-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.h2h-pick .bar-label { margin-right: 4px; align-self: center; }
.h2h-head { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 8px; }
.h2h-profs { display: flex; flex-direction: column; gap: 8px; }
.h2h-prof { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.h2h-prof-l { width: 130px; color: var(--ink-3); font-size: 13px; }
.h2h-table { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 6px 14px; align-items: start; max-width: 920px; }
.h2h-th { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 0 4px 4px; }
.h2h-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 16px; padding-bottom: 6px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; }
.h2h-cell { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; background: var(--surface); min-height: 56px; }
.h2h-cell.t { cursor: pointer; }
.h2h-cell.t:hover { box-shadow: inset 0 0 0 1px var(--ink-3); }
.h2h-cell.none { background: transparent; border: 1px dashed var(--line); color: var(--ink-3); font-size: 13px; justify-content: center; }
.h2h-stack { display: flex; flex-direction: column; gap: 6px; }
.h2h-sw { flex: none; width: 30px; height: 40px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.h2h-name { font-size: 14px; color: var(--ink); }
.h2h-mid { align-self: center; text-align: center; font-size: 12px; color: var(--ink-2); position: relative; }
.h2h-mid::before, .h2h-mid::after { content: ""; position: absolute; top: 50%; width: 14px; border-top: 1px solid var(--line); }
.h2h-mid::before { left: -6px; } .h2h-mid::after { right: -6px; }
.h2h-mid.only { color: var(--ink-3); }
.h2h-mid.only::before, .h2h-mid.only::after { display: none; }
.h2h-tune { align-self: flex-start; font-size: 12px; margin-left: 4px; }
.h2h-none { grid-column: 1 / -1; }
@media (max-width: 760px) { .h2h-head { grid-template-columns: 1fr; } .h2h-table { grid-template-columns: minmax(0, 1fr) 70px minmax(0, 1fr); } }

/* paint or stain, wherever doors are listed */
#compFinish { flex: none; }
.sl-fin { display: inline-flex; gap: 6px; margin-left: auto; order: 9; }

/* My Ideas: each idea on the door it was saved on, so no door picker there */
#view-explore.ideas-mode .pick-wrap { display: none; }

/* After Save: the lists, right there */
.save-bar { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 51;
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px; max-width: min(92vw, 720px); padding: 10px 12px 10px 18px;
  background: var(--ink); color: #fff; border-radius: 14px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.18); transition: all .25s var(--ease); }
.save-bar.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.sb-msg { font-weight: 600; margin-right: 6px; }
.sb-label { color: rgba(255,255,255,.65); }
.sb-chip { height: 28px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.28); background: transparent; color: #fff; font: inherit; font-size: 13px; cursor: pointer; }
.sb-chip:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); }
.sb-chip.new { border-style: dashed; }
.sb-input { height: 28px; width: 170px; padding: 0 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.5); background: rgba(255,255,255,.1); color: #fff; font: inherit; font-size: 13px; }
.sb-input::placeholder { color: rgba(255,255,255,.55); }
.sb-x { width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: rgba(255,255,255,.7); font-size: 18px; cursor: pointer; }
.sb-x:hover { color: #fff; background: rgba(255,255,255,.1); }

/* v63 (Nov 21): accessibility pass - quiet grey text readable (4.5:1 on every page background, was 2.7-3.0); room under the Feedback pill so it never hides the last cards or buttons */
:root { --ink-3: #686B74; }
main.view.active { padding-bottom: 64px; }

/* v64 (Nov 21): the deeper views as one quiet line of links under the page intro (CEO: tiles looked like filters for the
   whole page; pills undersold them). Text links with small icons, no boxes, so they read as places to go, not filters. */
#compMore, #compMore.in-side { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin: 12px 0 0; grid-template-columns: none; }
#compMore.in-side { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
#compMore .cm-label { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
#compMore .comp-more-link { display: inline-flex; align-items: center; gap: 7px; min-height: 0; height: auto; padding: 4px 0; border: 0; border-radius: 0;
  background: none; box-shadow: none; transform: none; font-size: 14px; color: var(--ink); }
#compMore .comp-more-link:hover { box-shadow: none; transform: none; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--ink-3); }
#compMore .cm-icon { width: auto; height: auto; background: none; border-radius: 0; }
#compMore .cm-icon svg { width: 16px; height: 16px; stroke: var(--ink-2); }
#compMore .cm-text { flex-direction: row; }
#compMore .cm-text strong { font-size: 14px; font-weight: 500; }
#compMore .cm-text > span { display: none; }
#compMore .cm-arrow { margin-left: 0; font-size: 13px; }

/* v65 (Nov 21): Room Visualizer: where the swatches come from, said ABOVE them; the choices open in place (CEO: the filter sat below what it filters) */
.k-src { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 8px 0 10px; font-size: 13px; color: var(--ink-3); }
.k-src .link { font-size: 13px; }
.k-src .k-panel { flex-basis: 100%; margin-top: 6px; }

/* v66 (Nov 21): Room Visualizer swatches - paint is a flat dot, a stain shows fine grain lines (CEO: make it obvious which is which) */
.k-sw.stain { background-image: repeating-linear-gradient(97deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3.5px, rgba(255,255,255,.10) 3.5px 4.5px, transparent 4.5px 7px); }
.k-sw-key { display: flex; gap: 16px; margin: 0 0 8px; font-size: 12px; color: var(--ink-3); }
.k-sw-key span { display: inline-flex; align-items: center; gap: 6px; }
.k-sw-key .k-sw { display: inline-block; width: 14px; height: 14px; padding: 0; background-color: #B8A792; cursor: default; pointer-events: none; }

/* v67 (Nov 21): the same paint/stain look on every colour picker swatch (colour menu, Room Visualizer's current colour, Head to Head) */
.dot.stain, .h2h-sw.stain { background-image: repeating-linear-gradient(97deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3.5px, rgba(255,255,255,.10) 3.5px 4.5px, transparent 4.5px 7px); }
.cmenu-f { color: var(--ink-3); }

/* v68 (Nov 21): full-size zoom of a competitor door photo; a clear way to close Room Visualizer's colour choices */
.door.zoomable { position: relative; cursor: zoom-in; }
.zoom-hint { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 999px; background: rgba(250,249,246,.94); box-shadow: 0 1px 3px rgba(0,0,0,.12);
  display: grid; place-items: center; opacity: 0; transition: opacity .18s; pointer-events: none; }
.zoom-hint svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.card:hover .zoom-hint, .door.zoomable:focus-within .zoom-hint { opacity: 1; }
@media (hover: none) { .zoom-hint { opacity: .85; } }
body.zooming { overflow: hidden; }
.zoom { position: fixed; inset: 0; z-index: 200; background: rgba(240,238,233,.97); display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 28px; padding: 36px 40px; cursor: zoom-out; }
.zoom-stage { display: flex; align-items: center; justify-content: center; min-width: 0; min-height: 0; overflow: hidden; cursor: zoom-in; }
.zoom-stage img { max-width: 100%; max-height: calc(100vh - 72px); width: auto; height: auto; object-fit: contain; image-rendering: auto; box-shadow: 0 10px 40px rgba(40,36,30,.12); background: #fff; }
.zoom.small .zoom-stage img { max-width: min(100%, calc(var(--zmax, 2) * 100%)); }
.zoom.actual .zoom-stage { overflow: auto; align-items: flex-start; justify-content: flex-start; cursor: zoom-out; }
.zoom.actual .zoom-stage img { max-width: none; max-height: none; }
.zoom-cap { align-self: center; display: flex; flex-direction: column; gap: 6px; cursor: default; font-size: 14px; color: var(--ink-2); }
.zoom-cap strong { font-size: 24px; font-weight: 600; color: var(--ink); }
.zoom-size { margin-top: 10px; font-size: 13px; color: var(--ink-3); }
.zoom-cap .link { align-self: flex-start; margin-top: 8px; }
.zoom-x { position: absolute; top: 14px; right: 18px; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--surface); font-size: 24px; line-height: 1; color: var(--ink); cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
@media (max-width: 800px) { .zoom { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; padding: 56px 16px 20px; } .zoom-stage img { max-height: calc(100vh - 220px); } }
.k-panel-end { margin-top: 12px; }

/* v69 (Nov 21): Room Visualizer - Save sits right above the room (CEO: it looked like an afterthought); zoom ground fully solid */
.k-stage-bar { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin: 0 0 10px; }
.k-save { display: inline-flex; align-items: center; gap: 7px; }
.k-save svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.zoom { background: var(--bg); }

/* v70 (Nov 21): Save this room sits with the buttons under the picture (CEO: top right was out of the way) */
.k-save-alone { display: flex; gap: 14px; align-items: center; margin: 8px 0 0; }
.k-save-alone:empty { display: none; }

/* v71 (Nov 21): the room-change box says what it does and has its own Apply button (CEO: no way to tell how to submit it) */
.k-prompt-l { display: block; margin: 10px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.k-prompt-row { display: flex; gap: 8px; align-items: stretch; }
.k-prompt-row input { flex: 1; min-width: 0; }
.k-prompt-row .primary { flex: none; }
.k-prompt-help { margin: 6px 0 0; }

/* v72 (Nov 21): Shortlist side by side */
.sl-view { grid-column: 1 / -1; justify-self: start; margin: 0 0 6px; }
.sl-side-controls { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 4px; }
.sl-on { align-items: center; }
.sl-side-row { grid-column: 1 / -1; display: flex; gap: 16px; overflow-x: auto; padding: 4px 2px 14px; align-items: flex-start; }
.sl-side-row .sbs-card { flex: 0 0 200px; }
.sl-side-sep { flex: none; align-self: stretch; display: flex; align-items: center; padding: 0 4px; border-left: 1px solid var(--line); }
.sl-side-sep span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
#shortlist > .fine { grid-column: 1 / -1; }

/* v73 (Nov 21): where to buy a competitor's sample door; Samples to order on the Shortlist */
.sample-line { margin-top: 2px; }
.sample-line.none { color: var(--ink-3); }
.zoom-cap .sample-line { font-size: 13px; }
.sl-samples { grid-column: 1 / -1; margin-top: 18px; padding: 18px 20px; background: var(--surface); border-radius: var(--radius); }
.sl-samples h3 { margin: 0 0 4px; font-size: 16px; }
.sl-seller { margin-top: 14px; }
.sl-seller-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; font-size: 14px; font-weight: 600; }
.sl-sample-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-top: 1px solid var(--line); font-size: 13px; }
.sl-sample-sum { margin: 14px 0 0; font-size: 13px; color: var(--ink-2); }

/* v74 (Nov 21): paint brands' Colors of the Year (diamonds on the color map); what the industry says */
.map-dot.trend { border-radius: 6px; transform: rotate(45deg); width: 14px; height: 14px; margin: -7px 0 0 -7px; box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3px var(--ink-2); z-index: 2; }
.map-dot.trend:hover { transform: rotate(45deg) scale(1.5); }
.trend-finds { padding: 6px 18px 12px; }
.trend-src { padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.trend-src:first-child { border-top: 0; }
.trend-src strong { display: flex; align-items: center; gap: 8px; }
.trend-src ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); }
.trend-src li { margin: 3px 0; line-height: 1.45; }

/* v75 (Nov 22): answering a share in one step: "I'm <email>" beside Send my pick */
.sh-as { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.sh-as:empty { display: none; }
.sh-as select { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); max-width: 260px; }

/* v76 (Nov 22): header always on screen. body was fixed at one screen tall, so sticky header / filter column let go after one screen of scrolling */
body { height: auto; min-height: 100%; }

/* v77 (Nov 22): Color Lab as one recipe: 1 Profile, 2 Color, 3 Adjust in one card */
.slider-card.recipe { padding: 6px 24px 20px; }
.rc-row { display: grid; grid-template-columns: 116px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rc-row.rc-adjust { border-bottom: 0; padding-bottom: 4px; }
.rc-label { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--ink); }
.rc-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: var(--surface); font-size: 12px; font-weight: 600; flex: none; }
.recipe .pick-wrap { margin: 0; }
.rc-color { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.rc-color .dot { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }
.spec-from { font-size: 16px; font-weight: 600; }
.spec-from .sub, .spec-from small { font-weight: 400; }
.recipe .sc-head { margin: 0; }
.recipe .sc-title span { font-weight: 400; }
.recipe .srow { margin-left: 132px; }
.recipe .stain-only { margin-left: 0; }
@media (max-width: 1100px) { .rc-row { grid-template-columns: 1fr; gap: 8px; } .recipe .srow { margin-left: 0; } }
.recipe .sc-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: nowrap; }
.recipe .sc-title { flex: 1; min-width: 0; font-size: 13px; color: var(--ink-2); }
.recipe #resetSpec { flex: none; }

/* v78 (Nov 22): door zoom: actual size keeps the clicked spot in the middle instead of jumping to the corner */
.zoom-stage { position: relative; }
.zoom.actual .zoom-stage { align-items: normal; justify-content: normal; }
.zoom.actual .zoom-stage img { margin: auto; flex: none; }
.zoom.fits .zoom-stage, .zoom.small .zoom-stage { cursor: default; }

/* v79 (Nov 22): Color Lab recipe, tighter: less padding, step readouts sit under the slider instead of on their own line */
.slider-card.recipe { padding: 2px 22px 12px; }
.rc-row { padding: 8px 0; gap: 12px; grid-template-columns: 104px minmax(0, 1fr); }
.rc-row.rc-adjust { padding-bottom: 0; }
.recipe .srow { margin-left: 116px; margin-top: 6px; padding-bottom: 12px; row-gap: 0; }
.recipe .srow .nudge { height: 30px; }
.recipe .sval { position: absolute; left: 50%; bottom: -2px; transform: translateX(-50%); margin: 0; min-height: 0; line-height: 14px; pointer-events: none; }
@media (max-width: 1100px) { .rc-row { grid-template-columns: 1fr; gap: 6px; } .recipe .srow { margin-left: 0; } }

/* v80 (Nov 22): door zoom for KCD doors too (drawn on a canvas), and a richer caption */
.zoom-stage canvas { max-width: 100%; max-height: calc(100vh - 72px); width: auto; height: auto; display: block; }
.zoom.actual .zoom-stage canvas { max-width: none; max-height: none; margin: auto; flex: none; }
.zoom-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 12px 0 4px; font-size: 13px; }
.zoom-facts dt { color: var(--ink-3); white-space: nowrap; }
.zoom-facts dd { margin: 0; color: var(--ink); }
.zoom-facts .dot { width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; }
.zoom-cap .tags { margin-top: 2px; }
.zoom-acts { display: flex; gap: 16px; margin-top: 10px; }
.zoom-acts .link { margin-top: 0; }
.door-in { display: contents; }
@media (max-width: 800px) { .zoom-stage canvas { max-height: calc(100vh - 220px); } }

/* v81 (Nov 22): Undo beside "Or pick a nearby option" in Color Lab */
.near-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#specUndo { flex: none; }

/* v82 (Nov 22): the color menu as a swatch deck: family chips, a name line, dots grouped by brand */
.cmenu.cdeck { padding: 12px 12px 8px; }
.cdeck-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cdeck-chips .chip { padding: 4px 10px; font-size: 12px; }
.cdeck-show { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-top: 8px; padding: 4px 6px; border-radius: 10px; background: var(--bg); font-size: 13px; color: var(--ink); }
.cdeck-show .dot { width: 18px; height: 18px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.cdeck-list { max-height: min(52vh, 420px); }
.cdeck-row { display: flex; flex-wrap: wrap; gap: 7px; padding: 4px 6px 8px; }
.cdeck-sw { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); transition: transform .12s var(--ease); }
.cdeck-sw:hover, .cdeck-sw:focus-visible { transform: scale(1.18); outline: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px var(--surface), 0 0 0 3.5px var(--ink-3); }
.cdeck-sw.stain { background-image: repeating-linear-gradient(97deg, rgba(0,0,0,.16) 0 1px, transparent 1px 3.5px, rgba(255,255,255,.10) 3.5px 4.5px, transparent 4.5px 7px); }
.cdeck-sw.on { box-shadow: inset 0 0 0 1px rgba(0,0,0,.14), 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }

/* v83 (Nov 22): Shortlist side by side: the line before KCD's lineup is a hairline only, no label, so doors sit close */
.sl-side-sep { width: 1px; padding: 0; margin: 0 -8px; border: 0; background: var(--line); }
.sl-side-sep span { display: none; }


/* v84 (Nov 22): Door Lab search sits beside the color count and Sort, always in view (it was hidden with the filter column) */
.stage-meta .search input { width: 230px; height: 34px; margin: 0; }
@media (max-width: 760px) { .stage-meta { flex-wrap: wrap; } .stage-meta .search { flex: 1 1 100%; } .stage-meta .search input { width: 100%; } }

/* v85 (Nov 22): Redo beside Undo in Color Lab */
.spec-ur { display: inline-flex; gap: 8px; flex: none; }

/* v86 (Nov 22): Settings > New Profiles: a new door shape waits for an admin's OK */
.np-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 20px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.np-row:first-child { border-top: 0; }
.np-pics { display: flex; gap: 12px; }
.np-pics figure { margin: 0; text-align: center; }
.np-door { width: 96px; height: 170px; display: grid; place-items: center; }
.np-door canvas { max-width: 100%; max-height: 100%; }
.np-text p { margin: 4px 0 8px; }
.np-text p { font-size: 14px; }

/* v87 (Nov 22): zoom on Door Studio's own mockups (door panel, Color Lab, Shortlist) */
.zoomable.mock { position: relative; cursor: zoom-in; }
.zoomable.mock:hover .zoom-hint, .spec-door:hover .zoom-hint, .d-door:hover .zoom-hint, .sbs-door:hover .zoom-hint { opacity: 1; }

/* v88 (Nov 22): Correct this door (admins) */
.corr-dlg { border: 0; border-radius: var(--radius); padding: 22px 24px; width: min(460px, 92vw); background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.corr-dlg::backdrop { background: rgba(30,28,25,.35); }
.corr-dlg h3 { margin: 0 0 4px; font-size: 18px; }
.corr-dlg label { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; margin: 10px 0; font-size: 14px; }
.corr-dlg label.chk { display: flex; gap: 8px; }
.corr-dlg select, .corr-dlg input:not([type=checkbox]) { font: inherit; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%; box-sizing: border-box; }
.corr-dlg .row { margin-top: 14px; display: flex; gap: 10px; }

/* v89 (Nov 22): Settings > KCD Lineup */
.lu-h { margin: 14px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.lu-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.lu-row .dot { width: 18px; height: 18px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.lu-row.off { opacity: .5; }
.lu-form { padding: 10px 0 14px; border-top: 1px solid var(--line); }
.lu-form label { display: grid; grid-template-columns: 130px minmax(0, 1fr); align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.lu-form label.chk { display: flex; gap: 8px; }
.lu-form select, .lu-form input:not([type=checkbox]):not([type=file]) { font: inherit; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); width: 100%; box-sizing: border-box; }
.lu-form .row { display: flex; gap: 10px; margin-top: 10px; }
.lu-add { margin-top: 14px; }
.lu-add summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* v90 (Nov 22): Settings > KCD Rooms */
.rm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-top: 10px; }
.rm-tile { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--bg); }
.rm-tile.off { opacity: .55; }
.rm-tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; display: block; }
.rm-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 2px 4px; font-size: 14px; }
.rm-meta .fine { flex-basis: 100%; }
.tag.fr { background: var(--ink); color: var(--surface); }
.tag.fl { background: var(--surface-2); color: var(--ink); border: 1px solid var(--ink-3); }
.rm-tile .row { display: flex; gap: 12px; }
.rm-kind { display: flex; gap: 16px; }

/* v91 (Nov 22): Settings > Competitors: status and Check now per site, requests for new competitors */
.admin-sites.comp { grid-template-columns: minmax(170px, 1.6fr) 1fr .9fr 1fr auto; max-width: 820px; align-items: center; }
.admin-sites.comp > div { padding: 7px 8px 7px 0; }
.cs-name { display: flex; flex-direction: column; }
.cs-name a { color: var(--ink-3); text-decoration: none; }
.cs-name a:hover { text-decoration: underline; }
.cs-name.off { color: var(--ink-3); text-decoration: line-through; }
.admin-sites.comp select { font-size: 13px; padding: 3px 6px; }
.admin-sites.comp > div:nth-child(5n+2), .admin-sites.comp > div:nth-child(5n) { white-space: nowrap; }
.admin-sites.comp .link { white-space: nowrap; }
@media (max-width: 760px) { .admin-sites.comp { grid-template-columns: minmax(110px, 1fr) auto auto auto auto; } .admin-sites.comp > div { padding-right: 6px; } .admin-sites.comp select { padding: 3px 2px; } }
@media (max-width: 600px) {
  .admin-sites.comp { grid-template-columns: auto auto 1fr auto; }
  .admin-sites.comp > .admin-th { display: none; }
  .admin-sites.comp > .cs-name { grid-column: 1 / -1; padding-bottom: 2px; }
  .admin-sites.comp > div:not(.cs-name) { border-top: 0; padding-top: 2px; }
  .admin-sites.comp > div:nth-child(5n+3)::after { content: ' door colors'; color: var(--ink-3); }
  .admin-sites.comp > div:nth-child(5n+3) { white-space: nowrap; }
}

/* v92 (Nov 22): Settings > KCD Rooms edit form across the grid, labels above fields; Rename on your own ideas */
.rm-edit { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 320px) minmax(0, 1fr); gap: 20px; align-items: start; border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--bg); }
.rm-edit > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.rm-edit-h { font-weight: 600; margin: 0 0 10px; }
.rm-form { display: grid; gap: 12px; max-width: 460px; margin: 6px 0 14px; }
.rm-field { display: grid; gap: 4px; }
.rm-lab { font-size: 13px; color: var(--ink-3); }
.rm-field input:not([type]) { width: 100%; box-sizing: border-box; }
.rm-pic { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rm-edit .row, .lu-add .row { display: flex; gap: 10px; }
@media (max-width: 640px) { .rm-edit { grid-template-columns: 1fr; } }
.d-title .d-rename { font-size: 13px; font-weight: 400; margin-left: 6px; }
.d-title .d-name-in { font: inherit; font-size: 18px; padding: 4px 8px; flex: 1; min-width: 0; }
.d-title:has(.d-name-in) { display: flex; gap: 8px; align-items: center; }

/* v93 (Nov 22): Room Visualizer marked Beta in the header and its title */
.beta { display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: 2px; line-height: 1.4; }
h2 .beta { font-size: 11px; vertical-align: 5px; }

/* v94 (Nov 22): Settings: one section at a time, picked from a grouped list on the left */
#view-admin { max-width: 1240px; }
.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 28px; align-items: start; }
.admin-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.an-group { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 16px 10px 4px; }
.an-group:first-child { margin-top: 0; }
.admin-nav button { display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; background: none; border: 0; border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.admin-nav button:hover { background: var(--surface); color: var(--ink); }
.admin-nav button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: inset 2px 0 0 var(--ink); }
.an-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink); flex: none; }
.admin-layout .admin > .admin-card { display: none; }
.admin-layout .admin > .admin-card.cur:not([hidden]) { display: block; }
.admin-layout .admin-card { padding: 24px 28px 28px; }
.admin-layout .admin-card h3 { font-size: 18px; margin-bottom: 8px; }
.admin-layout .admin-card > .fine:first-of-type { max-width: 720px; margin-bottom: 18px; }
@media (max-width: 820px) {
  .admin-layout { grid-template-columns: 1fr; gap: 14px; }
  .admin-nav { position: static; flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .an-group { display: none; }
  .admin-nav button { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
  .admin-nav button.on { box-shadow: none; background: var(--ink); color: var(--surface); }
  .an-dot { background: currentColor; }
}
/* adding a report: a quiet line with a moving bar while it uploads and is read */
.rep-busy { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13px; color: var(--ink-2); }
.rep-busy .bar { height: 3px; border-radius: 6px; background: var(--line); overflow: hidden; position: relative; max-width: 360px; }
.rep-busy .bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 35%; background: var(--ink); border-radius: 6px; animation: repbar 1.3s ease-in-out infinite; }
@keyframes repbar { 0% { left: -35%; } 100% { left: 100%; } }
/* v95 (Nov 22): What the Industry Says as headline numbers and themed bar charts */
.ind-heads { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 14px 0 22px; }
.ind-head { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.ind-big { font-size: 30px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); line-height: 1.1; }
.ind-htext { font-size: 14px; color: var(--ink-2); line-height: 1.4; flex: 1; }
.ind-hsrc { display: flex; gap: 6px; flex-wrap: wrap; }
.ind-src { display: inline-block; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; text-decoration: none; white-space: nowrap; vertical-align: 1px; }
a.ind-src:hover { color: var(--ink); border-color: var(--ink-3); }
.ind-theme { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; margin: 0 0 14px; }
.ind-theme h4 { margin: 0 0 4px; font-size: 18px; font-weight: 600; }
.ind-take { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; max-width: 820px; }
.ind-charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 28px; }
.ind-chart { min-width: 0; }
.ind-ch-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.ind-bar { display: grid; grid-template-columns: minmax(110px, 42%) 1fr 38px; align-items: center; gap: 8px; font-size: 13px; margin: 5px 0; }
.ind-lab { display: flex; align-items: center; gap: 6px; color: var(--ink-2); min-width: 0; }
.ind-sw { width: 11px; height: 11px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.ind-track { position: relative; height: 9px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.ind-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink-2); border-radius: 6px; }
.ind-prev { position: absolute; left: 0; top: 0; bottom: 0; background: var(--line); border-radius: 6px; }
.ind-prev + .ind-fill { height: 5px; top: 2px; }
.ind-val { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.ind-note { margin-top: 6px; }
.ind-facts { margin: 14px 0 0; padding-left: 18px; font-size: 14px; color: var(--ink-2); }
.ind-facts li { margin: 4px 0; }
.ind-kcd { margin: 14px 0 0; padding: 10px 14px; background: var(--bg); border-radius: 10px; font-size: 14px; color: var(--ink-2); }
.ind-kcd strong { color: var(--ink); font-weight: 600; }
/* v96 (Nov 22): one quiet "Color Lab" button (was the link "Fine-tune in Color Lab") */
.lab-btn { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .15s, background .15s; }
.lab-btn:hover { border-color: var(--ink-3); background: var(--bg); }
.lab-btn.lab-big { height: 38px; padding: 0 16px; font-size: 14px; }
.lab-ic { display: inline-flex; width: 13px; height: 13px; }
.lab-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.lab-ic svg circle { fill: var(--surface); }
.card-tune { display: inline-flex; align-items: center; gap: 5px; }
.card-tune .lab-ic svg circle { fill: currentColor; }
/* v97 (Nov 22): one idea in several lists: a small "Lists" button with a checklist */
.lp-btn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; cursor: pointer; }
.lp-menu { position: absolute; z-index: 60; min-width: 200px; max-width: 260px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.lp-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; font-size: 14px; cursor: pointer; }
.lp-item:hover { background: var(--bg); }
.lp-new { margin: 4px 0 2px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font: inherit; font-size: 13px; }
.lp-done { align-self: flex-end; margin-top: 2px; }

/* v98 (Nov 22): Door Lab: Include made-to-order colors chip wraps inside the filter column */
#f-rta .chip.mto-chip { white-space: normal; text-align: left; max-width: 100%; }

/* v99 (Nov 22): Competitors: the filter button with filters on stays outlined (.ghost.on had filled it dark, hiding its text) */
#compFiltersBtn.on { background: transparent; color: var(--ink); }

/* v100 (Nov 22): Door Lab filter chips under Brand wrap inside the column (the dark Sold at RTA Cabinet Store chip ran over); Who Had It First marks open the door */
#f-rta .chip { white-space: normal; text-align: left; max-width: 100%; }
.tl-dot, .tl-win { cursor: pointer; }

/* v101 (Nov 22): My Ideas in the save bar is a link to My Ideas */
#saveBar .sb-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
#saveBar .sb-link:hover { text-decoration-thickness: 2px; }

/* v102 (Nov 22): Settings > Weekly Sweep: what the last run changed */
.sweep-list { margin: 4px 0 10px 18px; padding: 0; }
.sweep-list li { margin: 2px 0; }

/* v103 (Nov 22): Room Visualizer at tablet width: Save this room stays under the room (it had jumped above it) */
@media (max-width: 1100px) { #view-kitchen #kSaveAlone { order: 2; margin: 8px 18px 0; } }

/* v104 (polish review): Color Lab no longer scrolls sideways on an iPad held upright (its right column could not shrink) */
.spec-hero { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); }
@media (max-width: 1100px) { .spec-hero { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); } }
@media (max-width: 820px) { .spec-hero { grid-template-columns: minmax(170px, 210px) minmax(0, 1fr); gap: 18px; } }

/* v105 (polish review): iPad upright (under 860px): the four tabs get their own row under the logo and account, instead of being cut off mid-word */
@media (max-width: 860px) {
  .top { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .top .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: start; overflow-x: visible; }
}

/* v106 (polish review): one set of states for every control
   - keyboard focus: one visible ring everywhere (several fields had removed the browser's and put nothing back)
   - disabled: dimmed and a not-allowed pointer, unless a control has its own disabled look
   - pressed: a one-pixel press on buttons
   - links that open another website end in an arrow
   - the Color Lab button matches the small outlined buttons it sits beside on cards */
:is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--kcd-blue) !important; outline-offset: 2px; }
:is(input, select, textarea):focus-visible { outline-offset: 1px; }
button:disabled { cursor: not-allowed; opacity: .5; }
:is(.primary, .ghost, .lab-btn, .pick-color, .chip, .nudge, .pin, .card-tune, .k-room):active:not(:disabled) { transform: translateY(1px); }
a[target="_blank"]:not(:has(img, canvas, .door))::after { content: "\2009\2197" / ""; font-size: .85em; display: inline-block; text-decoration: none; }
.lab-btn { height: 30px; font-size: 12px; font-weight: 600; }
.lab-btn.lab-big { height: 38px; font-size: 14px; }
.link.danger:hover { color: #6E2F26; }

/* v107 (polish review): on Competitors cards the buttons line up across a row (pinned to the bottom of each card,
   whatever the length of the text above them) */
.comp-card { display: flex; flex-direction: column; }
.comp-card > .meta { flex: 1; display: flex; flex-direction: column; }
.comp-card > .meta > .comp-actions { margin-top: auto; padding-top: 8px; }

/* v108 (polish review): the list picker on My Ideas cards is the same small pill as other dropdown buttons ("Change color") */
.sl-move.lp-btn { border-radius: 999px; padding: 3px 10px; }
.sl-move.lp-btn:hover { border-color: var(--line-strong); color: var(--ink); }

/* v109 (polish review): text sizes and corner roundings brought to one scale (see the notes in the sizes above) */

/* v110 (polish review, accessibility): counts on chips and the Original / Now words on swatches meet WCAG AA contrast;
   Room Visualizer swatches are at least 24 px to click or tap */
.chip .n { opacity: 1; color: var(--ink-2); }
.chip.on .n { color: inherit; opacity: .85; }
.swatchpair .sw i { color: #000; }
.swatchpair .sw.dark i { color: #fff; }  /* with the switch at L* 50, either word passes 4.5:1 on any swatch */
.k-sw { width: 24px; height: 24px; }
.zoomable:focus-visible .zoom-hint { opacity: 1; }  /* the magnifier shows for keyboard users too */

/* v111 (CEO, Nov 22): login required. Signed out, the page is just a centered sign-in card on the page color; the
   header, alerts and Feedback button stay hidden until you sign in. */
body.signin-page .top, body.signin-page #alertBar, body.signin-page #fbBtn { display: none !important; }
#view-signin.active { display: grid; place-items: center; min-height: 100vh; padding: 40px 16px; }
.signin-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 32px 30px 26px; box-shadow: 0 1px 2px rgba(30,35,46,.04), 0 16px 40px rgba(30,35,46,.07); }
.signin-logo { display: block; height: 36px; margin: 0 auto 18px; }
.signin-card h1 { margin: 0; text-align: center; font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.signin-sub { margin: 6px 0 4px; text-align: center; font-size: 14px; line-height: 1.5; color: var(--ink-3); }
.signin-msg { margin: 18px 0 0; text-align: center; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.signin-card form { display: block; position: relative; }
.signin-card label { display: block; font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.signin-card input { display: block; width: 100%; height: 40px; margin-top: 5px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--bg); font: inherit; font-size: 14px; color: var(--ink); }
.signin-card input:focus { border-color: var(--ink-2); }
.signin-card .primary { width: 100%; margin-top: 18px; height: 42px; justify-content: center; }
.signin-card .fine { margin: 14px 0 0; line-height: 1.5; text-align: center; }
.signin-card #acctMode { justify-content: center; margin-top: 18px; }


/* v112 (CEO, Nov 22): the notice bar says what to do. "See details" opens the full text and a button to where to act. */
.alertbar .ab-detail { flex-basis: 100%; padding: 4px 0 6px; }
.alertbar .ab-detail[hidden] { display: none; }
.alertbar .ab-todo { margin: 0 0 8px; font-size: 13px; color: var(--ink); }
.alertbar .ab-detail pre { margin: 0 0 10px; max-height: 240px; overflow: auto; padding: 10px 12px; background: rgba(255,255,255,.55); border: 1px solid #E5D2B4;
  border-radius: 10px; font: inherit; font-size: 12px; line-height: 1.55; white-space: pre-wrap; color: var(--ink-2); }

/* v113 (CEO, Nov 22): sign-in card polish. One-line subtitle, the form leads, even 16 px rhythm, the invitation note
   under the button behind a hairline. */
.signin-card { padding: 36px 32px 24px; }
.signin-logo { height: 40px; margin-bottom: 20px; }
.signin-card h1 { font-size: 24px; }
.signin-sub { margin: 6px 0 8px; font-size: 14px; text-wrap: balance; }
.signin-card .fine, .signin-msg, .signin-foot { text-wrap: balance; }
.signin-card label { margin-top: 16px; }
.signin-card #acctWhy { margin: 16px 0 0; }
.signin-card .primary { margin-top: 24px; }
.signin-card #acctForgot { margin: 14px auto 0; }
.signin-foot { margin: 20px -32px 0; padding: 16px 32px 0; border-top: 1px solid var(--line); text-align: center; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.signin-foot[hidden] { display: none; }

/* v114 (CEO, Nov 22): a quiet line on Competitors saying the doors are read from each company's website, with
   "Let us know" opening Feedback */
.comp-source { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); }  /* sits under the Go Deeper links */
.comp-source .link { font-size: 12px; }

/* v115 (CEO, Nov 22): the color menu filters by Paint / Stain first, then by color family for both */
.cdeck-chips { display: flex; flex-direction: column; gap: 6px; }
.cdeck-fin, .cdeck-fam { display: flex; flex-wrap: wrap; gap: 6px; }
.cdeck-fin { padding-bottom: 6px; border-bottom: 1px solid var(--line); }

/* v116 (CEO, Nov 22): Room Visualizer step 3 puts the notes box right above the picture button, always shown */
#kAiOpts { display: block; margin: 4px 0 12px; }  /* label above, box full width under it */
#kAiOpts .k-prompt-l { display: block; font-weight: 600; margin-bottom: 6px; }
#kAiOpts .k-prompt-row { display: flex; }
#kAiOpts #kPrompt { flex: 1; min-width: 0; width: 100%; max-width: 640px; }
#kAiOpts .k-opt { font-weight: 400; color: var(--ink-3); }
#kAiOpts .k-prompt-help { margin-top: 6px; }

/* v117 (CEO, Nov 23): every door on Competitors sits in the same frame. The frame no longer grows with a photo's
   shape (it ran 317 to 386 px tall); each photo or KCD drawing is fitted inside it, centered. Small photos keep
   their size cap (inline max-width) and are centered too. */
.comp-card .door { aspect-ratio: 0.62; height: auto; overflow: hidden; }
.comp-card .door > img, .comp-card.kcd .door canvas {
  position: absolute; inset: 18px 20px; margin: auto; width: calc(100% - 40px); height: calc(100% - 36px);
  max-height: calc(100% - 36px); object-fit: contain;
}
.comp-card.kcd .door canvas { width: auto; height: auto; max-width: calc(100% - 40px); }
/* Sort: Profile puts a quiet heading over each profile's doors */
.comp-group-head { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 8px; margin: 18px 0 -4px; padding-bottom: 6px;
  border-bottom: 1px solid var(--line); font-size: 16px; font-weight: 600; color: var(--ink); }
.comp-group-head:first-child { margin-top: 0; }
.comp-group-head .n { font-size: 12px; font-weight: 400; color: var(--ink-3); }

/* v118 (CEO, Nov 23): Head to Head shows the door itself when you hover a color */
.h2h-pop { position: fixed; z-index: 60; width: 200px; padding: 12px; background: var(--surface); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,.14), 0 0 0 1px var(--line); pointer-events: none; animation: h2hPop .14s var(--ease); }
.h2h-pop-door { height: 250px; display: flex; align-items: center; justify-content: center; }
.h2h-pop-door img, .h2h-pop-door canvas { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.h2h-pop-door .door-in { display: contents; }
.h2h-pop-cap { font-size: 13px; font-weight: 600; margin-top: 8px; line-height: 1.3; }
.h2h-pop .fine { margin-top: 2px; }
.h2h-cell.k { cursor: default; }
@keyframes h2hPop { from { opacity: 0; transform: translateY(3px); } }
@media (hover: none) { .h2h-pop { display: none; } }

/* v119 (CEO, Nov 23): Market Insights > Trends, How Profiles Are Moving: one small name per competitor door line */
.prof-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.prof-pill { font: inherit; font-size: 11px; line-height: 1.25; padding: 3px 7px; border-radius: 6px; background: var(--surface-2);
  color: var(--ink-2); border: 1px solid transparent; text-align: left; cursor: pointer; }
.prof-pill:hover { border-color: var(--line-strong); color: var(--ink); }
.prof-pill.kcd { background: transparent; border-color: var(--ink); color: var(--ink); font-weight: 600; cursor: default; }
.prof-pill.more { cursor: default; }
.prof-move .gap-td.name { display: block; }
.prof-move .gap-td.name .fine { margin-top: 2px; }
.prof-move .gap-td { min-width: 0; }
.prof-pill { overflow-wrap: break-word; hyphens: auto; }

/* v120 (CEO, Nov 23): share an idea by picking colleagues as you type; picks become chips */
.pp { position: relative; }
.pp-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 40px; padding: 5px 8px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--bg); cursor: text; }
.pp-box:focus-within { border-color: var(--focus); }
.d-share .pp-box input, .share-panel .pp-box input { flex: 1; min-width: 120px; width: auto; border: 0; padding: 4px; background: transparent; }
.pp-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--surface-2);
  font-size: 13px; color: var(--ink); }
.pp-chip button { border: 0; background: none; width: 24px; height: 24px; border-radius: 50%; color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer; }
.pp-chip button:hover { background: var(--line); color: var(--ink); }
.pp-list { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); padding: 4px; background: var(--surface);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12), 0 0 0 1px var(--line); }
.pp-opt { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.pp-opt.on, .pp-opt:hover { background: var(--surface-2); }
.pp-name { font-size: 14px; color: var(--ink); }
.pp-mail { font-size: 12px; color: var(--ink-3); }

/* v121 (CEO, Nov 23): Share sits with the door panel's main actions; its form opens right under them */
.d-share-btn { display: inline-flex; align-items: center; gap: 6px; }
.d-share-btn .lab-ic { width: 14px; height: 14px; }
.d-share-btn .lab-ic svg circle { fill: none; }
.d-share-btn[aria-expanded="true"] { border-color: var(--ink); }
.d-share-sec { margin: 0 0 6px; }
.d-share-sec .d-share { margin-top: 2px; }
.d-share-sec > .fine:empty { display: none; }

/* v122 (Nov 23, cleanup review): a plain message when Door Studio cannot start, and a quiet placeholder for a door
   photo that did not load (its name shows instead of the browser's broken-picture icon) */
.boot-fail { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: var(--bg, #F4F2EE); padding: 24px; }
.boot-fail-box { max-width: 420px; text-align: center; }
.boot-fail-box h2 { font-size: 24px; font-weight: 600; margin: 0 0 8px; }
.boot-fail-box p { font-size: 14px; color: var(--ink-2); margin: 0 0 20px; line-height: 1.5; }
.boot-fail-box .primary { height: 42px; padding: 0 22px; border-radius: 999px; border: 0; font-size: 14px; font-weight: 600; cursor: pointer; }
img.img-failed { background: var(--surface-2); color: var(--ink-3); font-size: 12px; line-height: 1.4; text-align: center; padding: 12px; box-sizing: border-box; min-height: 120px; border-radius: 6px; }

/* v123 (Nov 23, cleanup review): on laptop widths the header was 50 px wider than the window for admins, so every
   screen scrolled sideways. Tighter spacing between 1025 and 1400 px; a long account name is cut with an ellipsis.
   The notice bar's small note now passes 4.5:1. */
@media (min-width: 1025px) and (max-width: 1400px) {
  header.top { padding-left: 12px; padding-right: 12px; gap: 6px; }
  .top-left { gap: 10px; }
  .brand { gap: 10px; }
  .brand .product { padding-left: 10px; }
  nav.tabs { gap: 2px; }
  nav.tabs .tab { padding-left: 5px; padding-right: 5px; }
  .top-right .tab.mine { padding-left: 5px; padding-right: 5px; }
  .top-right { gap: 8px; }
}
#acctBtn { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alertbar .ab-note { color: var(--ink-2); }
/* small laptops and large tablets in landscape (1025 to 1260 px): the same compact header as tablet width */
@media (min-width: 1025px) and (max-width: 1260px) {
  .product { display: none; }
  .tabs .tab { font-size: 13px; }
  .mode button { padding: 0 9px; }
  .top-right .tab-sep { display: none; }
}

/* v124 (CEO, Nov 23): "Save this room" asks for the name in Door Studio's own small box, not the browser's prompt */
dialog.ask-name { width: min(420px, calc(100vw - 32px)); padding: 24px; }
dialog.ask-name h3 { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
dialog.ask-name input { width: 100%; height: 42px; padding: 0 12px; font: inherit; font-size: 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; box-sizing: border-box; }
dialog.ask-name .ask-row { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
dialog.ask-name .ask-row button { height: 40px; padding: 0 18px; width: auto; margin: 0; }

/* v125 (CEO, Nov 25): Color Lab, paints only: the nearest Sherwin-Williams color, "Switch to …", and the note for the
   paint booth. One quiet outlined box, like the factory instructions. */
.sw-box { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.sw-h { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.sw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sw-dot { width: 28px; height: 28px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.sw-dot.s { width: 14px; height: 14px; }
.sw-name { flex: 1; min-width: 140px; display: flex; flex-direction: column; font-size: 13px; color: var(--ink-3); }
.sw-name b { font-size: 14px; font-weight: 600; color: var(--ink); }
.sw-row button { width: auto; margin: 0; white-space: nowrap; }
.sw-also { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.sw-alt { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--ink-2); cursor: pointer; width: auto; margin: 0; }
.sw-alt:hover { color: var(--ink); text-decoration: underline; }
.sw-fine { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-3); }
.sw-booth { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.sw-booth .sw-h { margin-bottom: 4px; }
.sw-booth p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; color: var(--ink); }

/* v126 (CEO, Nov 25): the Sherwin-Williams fan deck, to browse, from its own button in Color Lab's step 2. Strips do
   not wrap, so every row is one strip running light to dark. */
.cdeck-row.fan { flex-wrap: nowrap; padding-bottom: 3px; }
.rc-color #specFanBtn { color: var(--ink-3); }
.rc-color #specFanBtn:hover { color: var(--ink-2); }

/* v127 (Nov 26, deep review): Door Studio's own yes/no box replaces the browser's confirm(); "Door Studio" stays in the
   header at tablet width (the account button shows the first name there, and the header's Beta tag steps aside; the
   page title keeps it); the Feedback pill no longer covers the last row of a page. */
dialog.ask-confirm p { margin: 0; font-size: 14px; line-height: 1.5; }
button.primary.danger { background: var(--danger); border-color: var(--danger); }
button.primary.danger:hover { background: var(--danger-strong); border-color: var(--danger-strong); }
#acctBtn .acct-short { display: none; }
@media (max-width: 1100px) {
  .top .product { display: inline; }
  #acctBtn .acct-full { display: none; }
  #acctBtn .acct-short { display: inline; }
  .top .tab .beta { display: none; }
  .tabs .tab { font-size: 13px; }
  .top .product { padding-left: 10px; font-size: 14px; }
}
main, .view { scroll-padding-bottom: 64px; }
body { padding-bottom: 56px; }
/* the closed factory box's one-line summary wraps instead of being cut to "Slightly li…" on narrow Shortlist cards */
details.factory .f-sum { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.4; }
/* the closed door panel casts no shadow onto the page edge */
.drawer { box-shadow: none; }
.drawer.on { box-shadow: -12px 0 40px rgba(43,49,63,.12); }
/* How it works stays reachable at tablet width, as a small round "?" */
#howBtn .how-short { display: none; }
@media (max-width: 1100px) {
  #howBtn { display: inline-flex !important; }
  #howBtn .how-full { display: none; }
  #howBtn .how-short { display: inline-grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
  #howBtn { text-decoration: none; }
}
#adminOpen .gear-short { display: none; }
@media (max-width: 1100px) {
  #adminOpen .how-full { display: none; }
  #adminOpen .gear-short { display: inline-grid; place-items: center; width: 24px; height: 24px; color: var(--ink-2); }
  #adminOpen { text-decoration: none; }
}
@media (max-width: 1100px) { .tabs { gap: 2px; } }
/* analytics stay neutral (Design principles: the dots are the color): states told apart by weight, not hue */
.gap-flag.gap { background: var(--ink); color: #fff; }
.gap-flag.thin { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.gap-flag.lead { background: var(--surface-2); color: var(--ink-2); }
details.factory .f-foot .f-vals { margin-left: 8px; font-size: 12px; }
/* Settings > Competitors: each row's lines meet (the name cell sat higher than the rest) */
.admin-sites.comp { align-items: stretch; }
.admin-sites.comp > * { display: flex; align-items: center; }
/* Door Lab's two-line filter chips ("Sold at RTA Cabinet Store", "Include made-to-order colors") get the room they need */
#f-brand .chip, #f-rta .chip { height: auto; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
/* Who Had It First: the verdict wraps inside its column instead of running past the card */
.tl-row { grid-template-columns: 190px minmax(0, 1fr) 210px; }
.tl-sum .tag { white-space: normal; height: auto; line-height: 1.35; padding-top: 2px; padding-bottom: 2px; }
/* the color map's axis words never hide a dot */
.map-ax { pointer-events: none; background: none; z-index: 0; }
/* full-size view: "Their page ↗" and "Correct this door" stay whole */
.zoom-acts { flex-wrap: wrap; row-gap: 8px; }
.zoom-acts > * { white-space: nowrap; }
/* Competitors' filter labels on one line ("Paint or Stain", "Solid Color or Wood Grain") */
.cf-label { width: 128px; }
/* Color Lab: a little more room between a slider's step count and the next slider */
.recipe .srow { padding-bottom: 18px; }
.recipe .sval { bottom: 0; }
.admin-sites.comp > .cs-name, .admin-sites.comp > div:has(.cs-name) { align-items: flex-start; justify-content: center; flex-direction: column; }
.admin-sites.comp select { height: 32px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); font: inherit; font-size: 13px; color: var(--ink); }
.gap-td.pair .pair-kcd { font-size: 10px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; }
/* Print / Save as PDF (deep review, Nov 26): the page itself, without the header, notices, filter columns, menus or
   the Feedback pill, so a Market Insights tab or the Shortlist can go into a meeting as it is */
@media print {
  .top, #alertBar, .alertbar, #fbBtn, .filters, .scrim, .drawer, .cmenu, .tip, #saveBar, .k-controls { display: none !important; }
  body { background: #fff; padding-bottom: 0; }
  #view-explore { grid-template-columns: 1fr !important; }
  .card, .gap-callout, .gap-table, .sl-card, .tl-row { break-inside: avoid; }
  a[href]::after { content: none !important; }
}
@media print { #compBack, #compMore { display: none !important; } }
/* the Factory Sheet (Nov 26): its button beside Share, "Our Pick" on Shortlist cards, and the options box */
.sl-head-acts { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.pick-btn { height: 30px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.pick-btn:hover { color: var(--ink); border-color: var(--ink-3); }
.pick-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
dialog.sheet-dlg { width: min(560px, calc(100vw - 32px)); }
dialog.sheet-dlg > p.muted { margin: -4px 0 14px; font-size: 14px; line-height: 1.5; }
dialog.sheet-dlg .sp-label { display: block; margin: 14px 0 8px; }
dialog.sheet-dlg .sheet-pick { display: flex; flex-wrap: wrap; gap: 6px; }
dialog.sheet-dlg .sheet-zh { margin-top: 18px; }
dialog.sheet-dlg .fine { margin: 2px 0 0 25px; }
/* small factory boxes (Shortlist cards): the summary gets its own full line under the title, never a narrow column */
details.factory.small summary { flex-wrap: wrap; row-gap: 2px; }
details.factory.small summary::after { order: 2; }
details.factory.small .f-sum { order: 3; flex-basis: 100%; }
.sl-card .row { flex-wrap: wrap; row-gap: 8px; }
.sl-card .row > * { white-space: nowrap; }
dialog.sheet-dlg input[type=checkbox] { width: 16px; height: 16px; padding: 0; margin: 0; flex: none; accent-color: var(--ink); }
dialog.sheet-dlg .sheet-zh { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; }
/* Door Lab's Saved Views (Nov 27): one-click filter sets at the top of the filter column */
.f-views { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.f-views .view-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.f-views .view-chip { flex: 1; justify-content: flex-start; text-align: left; white-space: normal; height: auto; min-height: 30px; padding-top: 5px; padding-bottom: 5px; }
.f-views .view-del { flex: none; width: 24px; height: 24px; border: 0; border-radius: 999px; background: none; color: var(--ink-3); font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; }
.f-views .view-row:hover .view-del, .f-views .view-del:focus-visible { opacity: 1; }
.f-views .view-del:hover { background: var(--surface-2); color: var(--ink); }
.f-views .view-save { font-size: 13px; margin-top: 2px; }
