/* ---------- tokens ---------- */
:root {
  color-scheme: light;
  --navy: #242a28;
  --navy2: #46534e;
  --gold: #d82e55;
  --brand: #ce244c;
  --brand-hover: #b51d41;
  --brand-soft: #fff0f4;
  --brand-ink: #9d2142;
  --gold-d: #bd2349;
  --cream: #fcf8f9;
  --paper: #ffffff;
  --surface-soft: #f7f0f2;
  --line: #e1e5e2;
  --muted: #66716b;
  --ok: #286447;
  --ok-bg: #eaf4ed;
  --warn: #94551e;
  --warn-bg: #fbefdf;
  --demo: #6b607d;
  --demo-bg: #f0edf5;
  --est: #73661e;
  --est-bg: #f5f1da;
  --danger: #ae3d3d;
  --on-solid: #ffffff;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-lg: 16px;
  --text-title: 24px;
  --radius-sm: 8px;
  --r: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 2px 8px #182b3808;
  --shadow-float: 0 16px 56px #182b3826;
  --top: 64px;
  --tabs: 0px;
  font-family: 'Be Vietnam Pro', system-ui, sans-serif;
  color: var(--navy);
  font-size: var(--text-base);
  line-height: 1.6;
}

/* ---------- base ---------- */
body {
  margin: 0;
  background: var(--cream);
  overflow: hidden;
  height: 100dvh;
}

h1 {
  font-size: 24px;
  letter-spacing: -.5px;
  margin: var(--space-1) 0 var(--space-2);
  font-weight: 600;
  line-height: 1.25;
}

h2 {
  font-size: 20px;
  margin: 0 0 6px;
  font-weight: 600;
}

h3 {
  font-size: 16px;
  margin: 0 0 10px;
  font-weight: 600;
}

h4 {
  font-size: 13px;
  margin: 14px 0 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--navy2);
}

p {
  margin: 6px 0;
}

code {
  font-size: 12px;
  background: #f1efe9;
  padding: 1px 5px;
  border-radius: 4px;
}

button, .button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.primary {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.small {
  padding: 6px 11px;
  font-size: 13px;
}

.danger {
  color: #a33;
  border-color: #e6c2c2;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  font-weight: 500;
}

input:focus, select:focus, textarea:focus, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

label {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 13px;
  font-weight: 500;
}

label small, .fine {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

label.check {
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  font-weight: 400;
}

label.check input {
  width: 16px;
  height: 16px;
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.row.between {
  justify-content: space-between;
}

.row.end {
  justify-content: flex-end;
  margin-top: var(--space-3);
}

.grow {
  flex: 1;
}

.hide-m {

}

.eyebrow {
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--gold-d);
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

button, .button {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius-sm);
  transition: background .15s, border-color .15s;
}

button:hover:not(:disabled), .button:hover {
  background: var(--surface-soft);
  border-color: #bbc7bf;
}

.primary, .chip.on, .opt.on, .seg button.on {
  background: var(--navy);
  color: var(--on-solid);
}

.primary:hover:not(:disabled) {
  background: var(--navy2);
  color: var(--on-solid);
}

.ghost {
  background: transparent;
  border-color: transparent;
}

.tiny {
  padding: 3px 9px;
  font-size: 12px;
  border-radius: 6px;
  min-height: 32px;
}

button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-underline-offset: 4px;
}

input, select, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: var(--space-2) 10px;
  min-width: 0;
  background: var(--paper);
  min-height: 40px;
}

input[type=checkbox], input[type=radio] {
  min-height: auto;
  accent-color: var(--gold);
}

input[type=range] {
  accent-color: var(--gold);
}

img, svg {
  max-width: 100%;
}

button, p, .bubble, .jt, .card {
  overflow-wrap: anywhere;
}

.row > *, .grid2 > *, .grid3 > *, .split > * {
  min-width: 0;
}

::selection {
  background: var(--ok-bg);
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #c6cec8 transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- layout ---------- */
body.chat-collapsed .shell {
  grid-template-columns: 0 1fr;
}

body.chat-collapsed .chat {
  visibility: hidden;
}

body.pro-mode .shell {
  grid-template-columns: 1fr;
}

body.pro-mode .chat, body.pro-mode .mtabs {
  display: none !important;
}

.shell {
  display: grid;
  height: calc(100dvh - var(--top) - var(--tabs));
  grid-template-columns: minmax(320px, 30%) minmax(0, 1fr);
}

body.pro-mode {
  --tabs: 0px;
}

/* ---------- topbar ---------- */
.crumb {
  font-weight: 600;
  color: var(--gold-d);
}

.homepick {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.homename {
  font-weight: 600;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  padding: 6px var(--space-2);
  border-color: transparent;
}

.save {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.save.saved {
  color: var(--ok);
}

.save.error {
  color: #b33;
  cursor: pointer;
  text-decoration: underline;
}

.journey-btn em {
  font-style: normal;
  background: var(--warn);
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: grid;
  place-items: center;
}

.dots {
  display: flex;
  gap: 3px;
}

.dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ddd8cc;
}

.dots i.d-done {
  background: var(--ok);
}

.dots i.d-doing {
  background: var(--gold);
}

.dots i.d-stale {
  background: var(--warn);
}

.dots i.d-confirmed {
  background: #8fb7a0;
}

.top {
  height: var(--top);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
  gap: var(--space-4);
  padding: 0 var(--space-5);
}

.logo {
  font-weight: 800;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 21px;
  letter-spacing: -1px;
}

.logo span {
  font-size: 9px;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--gold-d);
}

.journey-btn {
  gap: var(--space-2);
  background: var(--paper);
  border-color: var(--line);
  font-size: 13px;
}

.journey-btn b {
  border-radius: 10px;
  padding: 0 7px;
  font-size: 12px;
  background: var(--surface-soft);
  color: var(--navy);
}

.avatar {
  border-radius: 50%;
  padding: 0;
  font-weight: 700;
  background: var(--surface-soft);
  min-height: 36px;
  width: 36px;
  height: 36px;
}

.chat-reopen {
  display: none;
}

body.chat-collapsed .chat-reopen {
  display: inline-flex;
}

/* ---------- chat ---------- */
.msg {
  display: flex;
  gap: 6px;
}

.msg.user {
  justify-content: flex-end;
}

.msg.ai .bubble {
  border-bottom-left-radius: 4px;
}

.msg.note {
  font-size: 12px;
  color: var(--muted);
  align-items: flex-start;
}

.note-ico {
  color: var(--gold-d);
  padding-top: 6px;
}

.typing {
  display: flex;
  gap: var(--space-1);
}

.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aaa;
  animation: blink 1s infinite;
}

.typing i:nth-child(2) {
  animation-delay: .2s;
}

.typing i:nth-child(3) {
  animation-delay: .4s;
}

@keyframes blink {
  50% {
    opacity: .2;
  }
}

.icon {
  padding: var(--space-2) 10px;
}

.chat {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
  overflow: hidden;
  background: var(--cream);
}

.chat-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding: 20px;
  border-bottom: 0;
  align-items: flex-start;
}

.chat-head b {
  margin-right: var(--space-1);
  display: block;
  font-size: 15px;
  margin-bottom: var(--space-1);
}

.chat-head .tag {
  font-size: 10px;
  padding: 2px 6px;
  white-space: normal;
}

.chatlist {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) 20px;
  gap: var(--space-5);
  overscroll-behavior: contain;
}

.msg .bubble {
  border-radius: 12px;
  white-space: normal;
  max-width: 100%;
  padding: 0;
  background: transparent;
  line-height: 1.8;
}

.msg.user .bubble {
  border-bottom-right-radius: 4px;
  background: #e7ece8;
  color: var(--navy);
  padding: var(--space-3) var(--space-4);
  border-radius: 20px 20px 4px 20px;
  max-width: 90%;
}

.msg.note .bubble {
  background: transparent;
  border: 0;
  border-left: 2px solid var(--line);
  border-radius: 0;
  padding: var(--space-1) var(--space-3);
}

.quick {
  display: flex;
  flex-wrap: wrap;
  padding: var(--space-2) 20px;
  gap: var(--space-2);
}

.quick .chip {
  background: transparent;
  font-size: 12px;
  padding: 6px var(--space-3);
  text-align: left;
}

.composer {
  display: flex;
  border-top: 1px solid var(--line);
  margin-top: var(--space-2);
  margin: var(--space-1) var(--space-4) 20px;
  padding: var(--space-2);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  gap: var(--space-1);
}

.composer:focus-within {
  border-color: var(--gold);
}

.composer input#chatinput {
  flex: 1;
  border: 0;
  background: transparent;
  padding: var(--space-2) 0;
  width: 0;
  outline: none;
}

.composer button {
  flex-shrink: 0;
  border-radius: 50%;
  width: 40px;
  padding: 0;
}

/* ---------- home ---------- */
.resume small {
  opacity: .7;
  display: block;
}

.resume b {
  font-size: 16px;
  display: block;
}

.resume span {
  font-size: 12px;
  opacity: .8;
}

.page {
  max-width: 1100px;
  margin: 0 auto;
}

.page.narrow {
  max-width: 680px;
}

.back {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}

.tri {
  margin: 18px 0;
}

.opts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.opt.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.rec {
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 18px;
  margin-top: 20px;
}

.rec b {
  font-size: 18px;
  display: block;
  margin: var(--space-1) 0;
}

.facts {
  width: 100%;
  border-collapse: collapse;
}

.facts th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  padding: 6px var(--space-2) 6px 0;
  width: 34%;
  color: var(--navy2);
}

.facts td {
  padding: var(--space-1) 6px;
  vertical-align: middle;
}

.facts input, .facts select {
  width: 100%;
}

.src {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1efe9;
  color: var(--muted);
  margin-right: var(--space-1);
  white-space: nowrap;
}

.src.user {
  background: #e9f1f7;
  color: #2e5f80;
}

.src.doc {
  background: var(--est-bg);
  color: var(--est);
}

.src.ai {
  background: var(--demo-bg);
  color: var(--demo);
}

.fnote {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.lib-row, .doc-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: var(--space-2) 0;
  border-top: 1px solid #f0eee9;
  flex-wrap: wrap;
}

.lib-row b {
  min-width: 150px;
}

.lib-row small {
  flex: 1;
  color: var(--muted);
}

.doc-row > div {
  flex: 1;
  min-width: 120px;
}

.doc-row small {
  display: block;
  color: var(--muted);
}

.thumb {
  width: 54px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  background: #eee;
}

.pdf {
  width: 54px;
  height: 42px;
  border-radius: 6px;
  background: #f6e6e3;
  color: #a3483a;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

.log {
  padding-left: var(--space-4);
  margin: 0;
  font-size: 13px;
}

.log li {
  margin: var(--space-1) 0;
}

.log em {
  color: var(--gold-d);
  font-style: normal;
}

.entry {
  margin: 0 auto;
  max-width: 1100px;
  padding-top: clamp(var(--space-4), 4vh, var(--space-7));
}

.hello {
  margin-top: 20px;
  font-size: clamp(26px, 2.6vw, 38px);
  line-height: 1.35;
  letter-spacing: -1px;
  max-width: 820px;
  margin: var(--space-4) 0;
}

.sub {
  color: var(--muted);
  max-width: 680px;
  line-height: 1.8;
}

.groups {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .3px;
  text-transform: none;
  color: var(--muted);
}

.groups .cards {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.groups section:first-child .cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.groups section:last-child .cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.need-card {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  justify-content: flex-start;
  padding: 20px;
  gap: var(--space-3);
  min-height: 192px;
  border-radius: var(--r);
}

.need-card:hover {
  box-shadow: var(--shadow-sm);
}

.need-card b {
  line-height: 1.35;
  font-size: 15px;
}

.need-card small {
  color: var(--muted);
  font-weight: 400;
  font-size: 12px;
  line-height: 1.7;
}

.nc-ico {
  display: grid;
  place-items: center;
  font-size: 18px;
  background: var(--surface-soft);
  color: var(--gold-d);
  border-radius: 12px;
  width: 36px;
  height: 36px;
}

.nc-go {
  margin-top: auto;
  font-size: 12px;
  color: var(--muted);
}

.groups section:last-child .need-card {
  background: var(--paper);
}

.entry-foot {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

.entry-foot .button:first-child {
  background: var(--navy);
  color: var(--on-solid);
  border-color: var(--navy);
}

.resume {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  border-radius: 12px;
  flex-wrap: wrap;
  background: var(--paper);
  color: var(--navy);
  border: 1px solid var(--line);
  padding: var(--space-4) 20px;
}

.resume .primary {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--on-solid);
}

.foot {
  display: flex;
  font-size: 12px;
  color: var(--muted);
  flex-wrap: wrap;
  margin-top: var(--space-6);
  gap: var(--space-4);
}

.foot a {
  text-decoration: none;
}

/* ---------- workspace ---------- */
.ws-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.taskbar {
  padding: 10px 14px;
  border-radius: var(--r);
  background: var(--demo-bg);
  margin-bottom: var(--space-3);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.taskbar.error {
  background: #fbeaea;
  color: #8a2b2b;
}

.spin {
  width: 14px;
  height: 14px;
  border: 2px solid #c9cbe0;
  border-top-color: var(--demo);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}

.spin.big {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.tag.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.tag.warn {
  background: var(--warn-bg);
  color: var(--warn);
}

.tag.demo {
  background: var(--demo-bg);
  color: var(--demo);
}

.tag.est, .tag.illus {
  background: var(--est-bg);
  color: var(--est);
}

.tag.user {
  background: #e9f1f7;
  color: #2e5f80;
}

.card.center {
  text-align: center;
  padding: 40px;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.grid3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.split.wide {
  grid-template-columns: 1.25fr 1fr;
}

.opt-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  align-items: flex-start;
}

.opt-card p {
  color: var(--muted);
  margin: 0;
}

.notice {
  background: var(--warn-bg);
  border-radius: 8px;
  padding: 10px var(--space-3);
  font-size: 13px;
}

.known {
  background: var(--ok-bg);
  border-radius: 8px;
  padding: var(--space-2) var(--space-3);
  font-size: 13px;
}

.conflict {
  background: var(--warn-bg);
  border: 1px solid #ecd2ad;
  border-radius: var(--r);
  padding: var(--space-3) 14px;
  margin-bottom: 14px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px var(--space-3);
  font-size: 13px;
  background: #fff;
  font-weight: 400;
}

.chip.on {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.chips.big .chip {
  padding: 9px var(--space-4);
  font-size: 14px;
}

.stepper li {
  counter-increment: s;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.stepper li.done::before {
  content: '✓';
  background: var(--ok);
  color: #fff;
  border-color: var(--ok);
}

.stepper li.on::before {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.stepper li.on .link {
  color: var(--navy);
  font-weight: 600;
}

.stepper li:not(:last-child)::after {
  content: '';
  width: 22px;
  height: 1px;
  background: var(--line);
  margin: 0 var(--space-1);
}

.stepper .link {
  color: inherit;
}

.versions .vrow, .vrow {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid #f0eee9;
  flex-wrap: wrap;
}

.versions .vrow:first-of-type {
  border-top: 0;
}

.assume {
  font-size: 13px;
  background: var(--est-bg);
  border-color: #e6e4c9;
}

.warnline {
  color: var(--warn);
  font-size: 13px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.plan {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: var(--space-2);
  gap: var(--space-1);
}

.plan img {
  width: 100%;
  height: 110px;
  object-fit: contain;
  background: #fff;
}

.plan b {
  font-size: 12.5px;
}

.plan small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}

.planimg {
  width: 100%;
  max-height: 420px;
  object-fit: contain;
  background: #fff;
  border-radius: 6px;
}

.pdfbox {
  padding: 40px;
  text-align: center;
  background: #f6f4ef;
  border-radius: 8px;
}

.pdfbox small {
  display: block;
  color: var(--muted);
}

.plansvg {
  width: 100%;
  height: auto;
  background: #fff;
  border-radius: 6px;
}

.plansvg .rl {
  font-size: 30px;
  text-anchor: middle;
  fill: var(--navy);
  font-weight: 600;
}

.plansvg .ra {
  font-size: 24px;
  text-anchor: middle;
  fill: var(--muted);
}

.plansvg .rl, .plansvg .ra {
  paint-order: stroke;
  stroke: #fff;
  stroke-width: 9px;
  stroke-linejoin: round;
  pointer-events: none;
}

.plansvg text {
  position: relative;
}

.plansvg .fu {
  fill: #dfd7c8;
  stroke: #8d7e68;
  stroke-width: 3;
}

.plansvg .wood {
  fill: #cdb38d;
}

.plansvg .table {
  fill: #e9dcc5;
}

.plansvg .store {
  fill: #b8a17a;
}

.plansvg .desk {
  fill: #9fb3a0;
}

.mark circle {
  fill: var(--navy);
  stroke: #fff;
  stroke-width: 6;
}

.mark.p1 circle {
  fill: #b2452f;
}

.mark.p2 circle {
  fill: var(--warn);
}

.mark.p4 circle {
  fill: #8b8f94;
}

.mark text {
  fill: #fff;
  font-size: 34px;
  font-weight: 700;
  text-anchor: middle;
}

.issues {
  list-style: none;
  padding: 0;
  margin: 0;
}

.issues li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f0eee9;
}

.issues li:first-child {
  border-top: 0;
}

.issues .num {
  flex: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
}

.issues .p1 .num {
  background: #b2452f;
}

.issues .p2 .num {
  background: var(--warn);
}

.issues .p4 .num {
  background: #8b8f94;
}

.issues small {
  color: var(--muted);
  display: block;
}

.issues p {
  margin: 3px 0 0;
  font-size: 13px;
}

.issues .nodata b {
  color: var(--muted);
}

.ask {
  background: #fbf8f2;
  border-color: #eadfca;
}

.ask label {
  margin-bottom: 10px;
}

.opts3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.optc.on {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.pros, .cons {
  padding-left: 18px;
  margin: var(--space-2) 0;
  font-size: 13px;
}

.pros li::marker {
  content: '+ ';
  color: var(--ok);
}

.cons li::marker {
  content: '− ';
  color: #b2452f;
}

.cmp3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.cmp {
  flex-direction: column;
  padding: 6px;
  gap: var(--space-1);
}

.cmp.on {
  border-color: var(--navy);
}

.progress {
  height: 6px;
  background: #ebe7de;
  border-radius: 4px;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  background: var(--gold);
  transition: width .3s;
}

.qbox {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  margin-top: var(--space-3);
}

.why {
  color: var(--muted);
  margin-top: 0;
}

ul.why {
  padding-left: 18px;
  color: var(--navy2);
  font-size: 13px;
}

.qcards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-top: var(--space-3);
}

.qcard {
  flex-direction: column;
  padding: 18px 10px;
  font-size: 14px;
  min-height: 96px;
}

.qcard span {
  font-size: 24px;
  color: var(--gold-d);
}

.qcard.on, .pal.on, .pick.on {
  border-color: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

.pgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: var(--space-3);
}

.pgrid.small {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
}

.pick {
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  align-items: stretch;
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.pick img, .pgrid figure img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
  border-radius: 8px 8px 0 0;
}

.pick span {
  padding: 7px 10px;
  font-size: 13px;
  text-align: left;
}

.pick.off {
  opacity: .5;
}

.fbb {
  display: flex;
  gap: 6px;
  padding: 0 10px 10px;
}

.pgrid figure {
  margin: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.pgrid figcaption {
  padding: 6px 10px;
  font-size: 12px;
}

.pgrid figcaption small {
  display: block;
  color: var(--muted);
}

.pals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
  margin-top: var(--space-3);
}

.pal {
  flex-direction: column;
  padding: 10px;
  align-items: stretch;
}

.sw {
  display: flex;
  border-radius: 6px;
  overflow: hidden;
  height: 34px;
}

.sw i {
  flex: 1;
}

.sw.big {
  height: 54px;
  margin: 10px 0;
}

.insight {
  background: var(--paper);
  border: 1px solid var(--gold);
  border-radius: 12px;
  padding: 22px;
  margin-top: var(--space-3);
}

.insight h2 em, .hero-p h2 span, .reveal h2 span {
  font-style: normal;
  color: var(--gold-d);
}

.hero-p h2 {
  font-size: 26px;
}

.rooms {
  padding-left: 18px;
  font-size: 13px;
}

.rooms li {
  margin: 6px 0;
}

.brief {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 13px;
  background: #f8f6f1;
  padding: var(--space-3);
  border-radius: 8px;
}

.scopes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.scope {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: var(--space-3);
}

.scope small {
  color: var(--muted);
  font-weight: 400;
}

.scope.off {
  opacity: .6;
  cursor: not-allowed;
}

.scope em {
  font-style: normal;
  font-size: 11px;
  color: var(--warn);
}

.askgrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}

.askgrid em {
  color: #b2452f;
  font-style: normal;
}

.empty {
  text-align: center;
  color: var(--muted);
}

.total {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: var(--space-4);
  align-items: start;
}

.tot-main b {
  display: block;
  font-size: 30px;
  letter-spacing: -1px;
  margin: var(--space-1) 0;
}

.tot-main span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.tot-main .delta {
  color: var(--navy2);
}

.levels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
  grid-column: 1 / -1;
}

.total .like-hint {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  align-self: start;
  margin: 0;
}

/* Câu điền chỗ trống (bước Thông tin nhà) */
.sentence { line-height: 2.6; font-size: 15px; margin: 0; }
.sentence select, .sentence input {
  display: inline-block; width: auto; min-width: 0; vertical-align: middle;
  margin: 0 2px; padding: 6px 10px; border-radius: 8px; border: 0;
  background: #eef2ff; color: var(--navy); font: inherit; font-weight: 600;
}
.sentence input { width: 5.5em; text-align: center; }
/* Diện tích đang giả định: ô nổi lên để khách điền số thật. */
.sentence .ask-area input { background: var(--warn-bg); outline: 2px dashed var(--warn); }
.tot-main .area-basis { font-weight: 600; color: var(--navy); }
.tot-main .area-basis.assumed { color: var(--warn); }
.linklike { display: inline; padding: 0; margin: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
.sentence select:focus, .sentence input:focus { outline: 2px solid var(--navy); }

.lvl {
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
}

.lvl small {
  color: var(--muted);
}

.lvl b {
  font-size: 14px;
}

.lvl em {
  font-style: normal;
  font-size: 12px;
  color: var(--muted);
}

.lvl.on {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.slider {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.slider input {
  flex: 1;
  max-width: 320px;
}

.budget tr.off td {
  color: #aaa;
}

.budget tr.off td b {
  font-weight: 500;
}

.budget tr.nodata td:last-child {
  color: var(--warn);
}

.switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
}

.switch input {
  opacity: 0;
  width: 100%;
  height: 100%;
  position: absolute;
  margin: 0;
  cursor: pointer;
  z-index: 1;
}

.switch i {
  position: absolute;
  inset: 0;
  background: #d6d3cb;
  border-radius: 20px;
  transition: .2s;
}

.switch i::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
}

.switch input:checked + i {
  background: var(--ok);
}

.switch input:checked + i::after {
  left: 17px;
}

.switch input:focus-visible + i {
  outline: 2px solid var(--gold);
}

.try {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-4);
  align-items: start;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin: var(--space-2) 0;
}

.stage {
  --sh: 62vh;
  position: relative;
  background: #ddd;
  border-radius: 10px;
  overflow: hidden;
  margin: 0 auto;
  touch-action: none;
}

body.chat-collapsed .stage {
  --sh: 76vh;
}

.ab .stage {
  --sh: 40vh;
}

.stage-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.stage .before {
  position: absolute;
  inset: 0;
  --cut: inherit;
}

.stage.cmp {
  --cut: 50%;
}

.stage .cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
  z-index: 3;
}

.stage .cut-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--cut);
  width: 3px;
  background: #fff;
  box-shadow: 0 0 6px #0006;
  transform: translateX(-1px);
  z-index: 2;
  pointer-events: none;
}

.stage .lbl {
  position: absolute;
  top: 10px;
  background: #182b38cc;
  color: #fff;
  font-size: 11px;
  padding: 3px var(--space-2);
  border-radius: 10px;
  z-index: 2;
  pointer-events: none;
}

.stage .lbl.l {
  left: 10px;
}

.stage .lbl.r {
  right: 10px;
}

.stage.draw {
  touch-action: none;
  user-select: none;
  cursor: crosshair;
  outline: 2px dashed var(--gold);
}

.drawbox {
  position: absolute;
  border: 2px solid var(--gold);
  background: #c5a57933;
  z-index: 4;
}

.hl {
  fill: none;
  stroke: #fff;
  stroke-dasharray: 1.2 .8;
  vector-effect: non-scaling-stroke;
  stroke-width: 2px;
}

.ab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}

.ab figure {
  margin: 0;
}

.ab figcaption {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
}

.seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.seg button {
  border: 0;
  border-radius: 0;
  padding: 6px 10px;
  font-size: 13px;
}

.seg button.on {
  background: var(--navy);
  color: #fff;
}

.hint {
  background: #fbf8f2;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filters select {
  flex: 1;
  min-width: 110px;
}

.prod {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f0eee9;
}

.prod img, .swatch-img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.prod b {
  font-size: 13px;
  display: block;
}

.prod small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.src-link {
  font-size: 11.5px;
  color: var(--gold-d);
}

.vars {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: 6px;
}

.var {
  padding: 3px var(--space-2) 3px var(--space-1);
  font-size: 11.5px;
  border-radius: 14px;
  gap: var(--space-1);
}

.var i {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid #0002;
}

.rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.room {
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 0;
  overflow: hidden;
}

.room img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.room b, .room small {
  padding: 0 10px;
}

.room small {
  color: var(--muted);
  font-weight: 400;
  padding-bottom: 10px;
}

.thumbs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.thumbs button {
  padding: 0;
  overflow: hidden;
}

.thumbs img {
  width: 70px;
  height: 54px;
  object-fit: cover;
  display: block;
}

.boq tr.needs td {
  background: #fffaf2;
}

.vf {
  font-size: 11.5px;
  display: block;
}

.vf.needs {
  color: var(--warn);
}

.vf.ai {
  color: var(--demo);
}

.vf.confirmed {
  color: var(--ok);
}

.addrow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.addrow input[name=desc] {
  flex: 2;
  min-width: 160px;
}

.addrow input {
  width: 100px;
  flex: 1;
}

.plist {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pcard {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--space-3);
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  align-items: start;
}

.pcard small {
  display: block;
  color: var(--muted);
}

.pcard ul.why {
  margin: 6px 0 0;
}

.pact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.plogo {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: #f0ece3;
  font-weight: 700;
  color: var(--gold-d);
}

.plogo img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.pcard.link .pp {
  cursor: pointer;
}

.pcard.link:hover {
  border-color: var(--gold-d);
}

.pcard.link:hover .pp b {
  text-decoration: underline;
}

.plogo.big {
  width: 80px;
  height: 80px;
  font-size: 30px;
}

.preview ul {
  padding-left: 18px;
}

.consent {
  margin-top: 14px;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.radio {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: var(--space-2);
}

.req.cancelled {
  opacity: .6;
}

.recips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: var(--space-2) 0;
}

.rcp {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 14px;
  background: #f1efe9;
}

.rcp.responded {
  background: var(--ok-bg);
  color: var(--ok);
}

.wait {
  color: var(--warn);
  font-size: 12px;
}

.cmp tr.extra td {
  color: var(--muted);
  font-size: 12px;
}

.cmp tr.tot td {
  border-top: 2px solid var(--line);
}

details summary {
  cursor: pointer;
  font-weight: 500;
  margin: var(--space-2) 0;
}

.ws {
  overflow-y: auto;
  min-width: 0;
  padding: var(--space-6) var(--space-6) 64px;
  background: var(--paper);
  overscroll-behavior: contain;
}

.ws-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
}

.ws-head h1 {
  margin-top: var(--space-2);
}

.canvas {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
  box-shadow: none;
}

.card .card {
  padding: var(--space-4);
  box-shadow: none;
}

.tag {
  display: inline-block;
  font-weight: 600;
  border-radius: 20px;
  background: #eee;
  color: #555;
  white-space: nowrap;
  vertical-align: middle;
  font-size: 11px;
  padding: 3px var(--space-2);
  line-height: 1.5;
}

.tag.illus {
  background: var(--demo-bg);
  color: var(--demo);
}

.actions-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: var(--space-3) 0;
  margin-top: var(--space-1);
  gap: var(--space-2);
  border-top: 1px solid var(--line);
  padding-top: var(--space-4);
}

.stepper {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-4);
  counter-reset: s;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.stepper li::before {
  content: counter(s);
  border-radius: 50%;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 12px;
  background: #fff;
  width: 24px;
  height: 24px;
}

.opt-card, .qbox, .insight {
  padding: var(--space-5);
}

.notice, .known, .conflict {
  line-height: 1.7;
}

.scope.on {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
  background: var(--ok-bg);
}

.pgrid figure, .pick, .pcard, .chip, .ji, .stepper li::before {
  background: var(--paper);
}

.ask, .hint, .pdfbox {
  background: var(--surface-soft);
  border-color: var(--line);
}

.catalog {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px;
  position: sticky;
  max-height: calc(100dvh - var(--top) - 40px);
  overflow-y: auto;
  top: 8px;
}

.tot-main .tag {
  display: inline-block;
}

/* ---------- table ---------- */
.tbl td small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.nowrap {
  white-space: nowrap;
}

.qty {
  width: 70px;
  padding: 5px 7px;
}

.cell {
  width: 100%;
  min-width: 120px;
  padding: 5px 7px;
}

.tbl {
  width: 100%;
  font-size: 13px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.tbl th {
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-soft);
  padding: var(--space-3) var(--space-4);
  white-space: nowrap;
}

.tbl td {
  padding: var(--space-4);
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.tbl tbody tr:hover td {
  background: var(--surface-soft);
}

.tblwrap {
  overflow-x: auto;
  max-height: none;
  overflow-y: visible;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.tbl.budget td:nth-child(3), .tbl.boq :is(th, td):nth-child(5), .tbl.boq :is(th, td):nth-child(8), .tbl.cmp :is(th, td):nth-child(n+2) {
  text-align: right;
}

.qty, input[type=number] {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- journey ---------- */
.journey.open {
  display: block;
}

.jp-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.jp-list {
  list-style: none;
  padding: 0;
  margin: var(--space-3) 0;
}

.st-done .ji {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
  font-weight: 700;
}

.st-doing .ji {
  border-color: var(--gold);
  background: radial-gradient(circle, var(--gold) 0 4px, #fff 5px);
}

.st-stale .ji {
  background: var(--warn);
  border-color: var(--warn);
  color: #fff;
  font-weight: 700;
}

.st-confirmed .ji {
  border-color: #8fb7a0;
  color: #5f9b78;
}

.st-skipped {
  opacity: .6;
}

.jt {
  flex: 1;
}

.jt small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.toast {
  position: fixed;
  bottom: calc(20px + var(--tabs));
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--navy);
  color: var(--paper);
  padding: 10px var(--space-4);
  border-radius: 10px;
  opacity: 0;
  transition: .25s;
  pointer-events: none;
  z-index: 50;
  max-width: min(560px, 92vw);
  font-size: 13px;
}

.toast.on {
  opacity: 1;
  transform: translate(-50%, 0);
}

dialog::backdrop {
  background: #182b3866;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-row {
  justify-content: space-between;
}

.list-row.on {
  border-color: var(--navy);
}

.list-row small {
  color: var(--muted);
  font-weight: 400;
}

.mtabs {
  display: none;
}

.journey {
  position: fixed;
  top: calc(var(--top) + 8px);
  right: 16px;
  max-height: calc(100dvh - var(--top) - 24px);
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  z-index: 30;
  display: none;
  padding: var(--space-5);
  width: 420px;
  border-radius: 20px;
  box-shadow: var(--shadow-float);
}

.jp-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: var(--space-4);
}

.jp-head b {
  font-size: 18px;
}

.jp-list li {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border-top: 1px solid #f0eee9;
  position: relative;
  padding: var(--space-1) 0;
}

.jrow {
  flex: 1;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-align: left;
  background: none;
  border: 0;
  box-shadow: none;
  padding: var(--space-3) var(--space-2);
  border-radius: 12px;
  min-height: 56px;
  color: inherit;
  font-weight: 400;
}

.jrow:hover {
  background: var(--surface-soft);
}

.jgo {
  color: var(--muted);
  font-size: 20px;
}

.jmore {
  position: relative;
}

.jmore summary {
  list-style: none;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-size: 18px;
}

.jmore summary::-webkit-details-marker {
  display: none;
}

.jmore summary:hover, .jmore[open] summary {
  background: var(--surface-soft);
}

.jmore > div {
  position: absolute;
  right: 0;
  top: 38px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 170px;
  padding: var(--space-1);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-float);
}

.jmore > div button {
  justify-content: flex-start;
}

.ji {
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  border: 2px solid #d8d3c7;
  color: #b3ad9f;
  background: #fff;
  width: 28px;
  height: 28px;
}

dialog {
  padding: 0;
  width: min(640px, 94vw);
  max-height: 88dvh;
  box-shadow: 0 30px 80px #0004;
  background: var(--paper);
  color: var(--navy);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.dlg-in {
  display: flex;
  flex-direction: column;
  padding: var(--space-5);
  gap: var(--space-4);
}

/* ---------- Pro ---------- */
.pro {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--space-5);
  max-width: 1240px;
  margin: 0 auto;
}

.pro-nav a span {
  width: 18px;
  color: var(--gold-d);
}

.pro-nav a.on span {
  color: var(--gold);
}

.pro-nav a.main {
  font-weight: 600;
  border: 1px solid var(--gold);
  margin-bottom: var(--space-2);
}

.pro-body {
  min-width: 0;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 var(--space-4);
}

.kpis small, .kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.kpis b {
  font-size: 22px;
}

.pro-edit {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.pro-edit .card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}

.pro-edit h4 {
  margin: var(--space-1) 0 0;
}

.imgs {
  display: flex;
  gap: var(--space-4);
}

.cover-thumb {
  width: 160px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  background: #f0ece3;
  display: block;
}

.pf {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: var(--space-2) 0;
  border-bottom: 1px solid #f0eee9;
}

.pf small {
  color: var(--muted);
  display: block;
}

.pf p {
  margin: 2px 0;
  font-size: 13px;
}

.public .cover {
  height: 180px;
  border-radius: 12px;
  background: linear-gradient(120deg, #e9e1d3, #c9b08c);
  overflow: hidden;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pub-head {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  margin: -40px 20px var(--space-4);
  flex-wrap: wrap;
}

.pub-head .plogo {
  border: 4px solid var(--cream);
}

.pub-head > div {
  flex: 1;
  padding-top: 36px;
}

.pub-head p {
  margin: 0;
  color: var(--muted);
}

.pub-head .primary {
  margin-top: 36px;
}

.pro-nav {
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: start;
  gap: var(--space-1);
  padding: var(--space-2);
  background: var(--cream);
  border-radius: var(--r);
}

.pro-nav a {
  text-decoration: none;
  border-radius: 8px;
  display: flex;
  gap: 10px;
  color: var(--navy2);
  padding: var(--space-3);
}

.pro-nav a.on {
  background: var(--paper);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
}

.kpis > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--space-5);
}

/* ---------- mobile ---------- */
@media (max-width: 1100px) {
  .try {
    grid-template-columns: 1fr;
  }

  .catalog {
    position: static;
    max-height: none;
  }

  .groups {
    grid-template-columns: 1fr;
  }

  .askgrid {
    grid-template-columns: 1fr 1fr;
  }

  .scopes {
    grid-template-columns: 1fr 1fr;
  }

  .total {
    grid-template-columns: 1fr;
  }

  .total .like-hint {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }

  .split.wide, .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --tabs: 56px;
    --top: 52px;
  }

  .hide-m {
    display: none !important;
  }

  .top {
    gap: var(--space-2);
    padding: 0 10px;
  }

  .logo span {
    display: none;
  }

  .homename {
    max-width: 120px;
  }

  .journey-btn .jlabel {
    display: none;
  }

  .shell {
    grid-template-columns: 1fr !important;
  }

  body[data-tab="chat"] .ws {
    display: none;
  }

  body[data-tab="ws"] .chat {
    display: none;
  }

  body.chat-collapsed .chat {
    visibility: visible;
  }

  .ws {
    padding: 14px var(--space-4) 40px;
  }

  .mtabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tabs);
    background: var(--paper);
    border-top: 1px solid var(--line);
    z-index: 25;
  }

  .mtabs button {
    border: 0;
    border-radius: 0;
    font-weight: 600;
    color: var(--muted);
    position: relative;
  }

  .mtabs button.on {
    color: var(--navy);
    box-shadow: inset 0 3px 0 var(--gold);
  }

  .mtabs b {
    background: #b2452f;
    color: #fff;
    border-radius: 10px;
    font-size: 11px;
    padding: 0 6px;
    margin-left: var(--space-1);
  }

  .journey {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    border-radius: 16px 16px 0 0;
    max-height: 80dvh;
    padding-bottom: calc(var(--space-4) + var(--tabs));
  }

  .grid2, .grid3, .opts3, .cmp3, .pro-edit, .askgrid, .levels {
    grid-template-columns: 1fr;
  }

  .groups section:first-child .cards, .groups section:last-child .cards {
    grid-template-columns: 1fr;
  }

  .need-card {
    min-height: 0;
  }

  .hello {
    font-size: 22px;
  }

  h1 {
    font-size: 20px;
  }

  .pro {
    grid-template-columns: 1fr;
  }

  .pro-nav {
    flex-direction: row;
    overflow-x: auto;
    position: static;
  }

  .pro-nav a {
    white-space: nowrap;
  }

  .pro-nav .fine {
    display: none;
  }

  .ab {
    grid-template-columns: 1fr;
  }

  .pcard {
    grid-template-columns: 44px 1fr;
  }

  .pact {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }

  .stepper li:not(:last-child)::after {
    width: 8px;
  }

  .facts th {
    width: 40%;
  }

  .card > .tbl, .pro-body .tbl, .page > .tbl {
    display: block;
    overflow-x: auto;
  }

  .tot-main b {
    font-size: 24px;
  }
}

@media (max-width: 1100px) {
  .top {
    gap: var(--space-2);
    padding: 0 var(--space-4);
  }

  .top .dots {
    display: none;
  }

  .homename {
    max-width: 160px;
  }

  .ws {
    padding: var(--space-5);
  }

  .canvas {
    padding: var(--space-4);
  }

  .grid3, .opts3 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  :root {
    --top: 60px;
    --tabs: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .top {
    padding: 0 var(--space-3);
    gap: var(--space-2);
  }

  .logo {
    font-size: 19px;
  }

  .homepick {
    flex: 1;
    gap: var(--space-1);
  }

  .homename {
    max-width: 180px;
    padding: var(--space-1);
  }

  .save {
    font-size: 10px;
  }

  .journey-btn {
    padding: var(--space-2);
    min-width: 44px;
  }

  .top > .grow {
    display: none;
  }

  .ws {
    padding: var(--space-5) 20px 40px;
  }

  .entry {
    padding-top: var(--space-2);
  }

  .hello {
    font-size: 30px;
  }

  .groups section:first-child .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .groups section:last-child .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .need-card {
    padding: var(--space-4);
    min-height: 180px;
  }

  .mtabs {
    padding: var(--space-2) var(--space-3) calc(var(--space-2) + env(safe-area-inset-bottom, 0px));
    gap: var(--space-2);
  }

  .mtabs button {
    border-radius: 12px;
    font-size: 13px;
  }

  .mtabs button.on {
    background: var(--surface-soft);
    box-shadow: none;
  }

  .journey {
    width: 100%;
    padding: var(--space-5) 20px calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  }

  .journey::before {
    content: '';
    display: block;
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: var(--line);
    margin: -var(--space-3) auto var(--space-4);
  }

  .chat {
    border-right: 0;
  }

  .chatlist {
    padding: var(--space-5);
  }

  .quick {
    padding: var(--space-2) 20px;
  }

  input:not([type=checkbox]):not([type=radio]), select, textarea {
    font-size: 16px !important;
    min-height: 44px;
  }

  .tiny, .small, .chip, .icon {
    min-height: 44px;
  }

  .tbl {
    min-width: 600px;
  }

  .tblwrap {
    max-height: none;
  }

  .tblwrap:has(.budget) { overflow: visible; border: 0; }
  .tblwrap .tbl.budget, .tbl.budget tbody { display: block; min-width: 0; width: 100%; }
  .tbl.budget tr { display: grid; grid-template-columns: 52px minmax(0,1fr); gap: 4px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .tbl.budget td { display: block; padding: 0; border: 0; width: auto !important; min-width: 0; }
  .tbl.budget td:first-child { grid-row: 1 / 3; padding-top: 2px; }
  .tbl.budget td:nth-child(3) { grid-column: 2; font-weight: 700; white-space: normal; }
  .tbl.budget .bmeta .qty { width: 96px; }
  dialog { width: 100%; max-width: 100%; max-height: calc(100dvh - env(safe-area-inset-top, 0px) - 24px); margin: auto 0 0; border-radius: 24px 24px 0 0; overscroll-behavior: contain; }
  .dlg-in { padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }

  .card > .tbl, .pro-body .tbl, .page > .tbl {
    min-width: 0;
    width: 100%;
  }

  .facts, .facts tbody { display: block; width: 100%; }
  .facts tr { display: grid; grid-template-columns: minmax(0,1fr); gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .facts th, .facts td { display: block; width: 100%; min-width: 0; padding: 0; }
  .facts td:empty { display: none; }

  .card {
    padding: 20px;
  }

  .canvas {
    padding: var(--space-4);
    border-radius: 16px;
  }
}

@media (max-width: 480px) {
  .homepick {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .homename {
    max-width: 144px;
    min-height: 24px;
    font-size: 12px;
  }

  .save {
    padding-left: var(--space-1);
  }

  .avatar {
    width: 32px;
    height: 32px;
    min-height: 32px;
  }

  .ws {
    padding: 20px var(--space-4) var(--space-6);
  }

  .hello {
    font-size: 26px;
    letter-spacing: -.6px;
  }

  .groups {
    margin-top: var(--space-5);
  }

  .groups section:first-child .cards, .groups section:last-child .cards {
    grid-template-columns: 1fr;
  }

  .need-card {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 20px;
    gap: var(--space-1) var(--space-3);
    min-height: 112px;
  }

  .nc-ico {
    grid-row: 1 / 3;
  }

  .need-card small {
    grid-column: 2;
  }

  .nc-go {
    grid-column: 3;
    grid-row: 1 / 3;
    font-size: 0;
    margin: auto;
  }

  .nc-go::after {
    content: '→';
    font-size: 18px;
  }

  .entry-foot {
    flex-direction: column;
    align-items: stretch;
  }

  .canvas {
    padding: var(--space-3);
  }

  .card {
    padding: var(--space-4);
  }

  .ws-tools {
    gap: var(--space-1);
  }

  .imgs {
    flex-wrap: wrap;
  }

  .scopes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .journey-btn { gap: var(--space-1); }
}
@media (max-width: 480px) {
  .homename { max-width: 108px; }
}

/* ---------- dark mode ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --navy: #e6eae7;
    --navy2: #c7d0ca;
    --gold: #85b99e;
    --gold-d: #9bc4ad;
    --cream: #191d1b;
    --paper: #222724;
    --surface-soft: #2c332f;
    --line: #3b443e;
    --muted: #a7b2aa;
    --ok: #a0d1af;
    --ok-bg: #263c2e;
    --warn: #edbb83;
    --warn-bg: #423426;
    --demo: #c4b9d8;
    --demo-bg: #35303f;
    --est: #d4ca8b;
    --est-bg: #3b3926;
    --on-solid: #1b211d;
    --shadow-float: 0 16px 56px #0008;
  }

  .msg.user .bubble, .avatar, .nc-ico, .src, code, .rcp, .plogo, .pdfbox {
    background: var(--surface-soft);
  }

  .budget tr.off td {
    color: var(--muted);
  }

  .boq tr.needs td {
    background: var(--warn-bg);
  }

  .tag.user, .src.user {
    background: #293c49;
    color: #a5c9e2;
  }

  .progress, .switch i {
    background: var(--line);
  }

  .toast, .issues .num, .stepper li.on::before {
    color: var(--on-solid);
  }

  .st-done .ji, .st-stale .ji, .stepper li.done::before {
    color: #18251b;
  }

  .plansvg .rl {
    fill: #242a28;
  }

  .plansvg .ra {
    fill: #66716b;
  }

  .mark circle {
    fill: #242a28;
  }

  .mark.p1 circle {
    fill: #b2452f;
  }

  .mark.p2 circle {
    fill: #a8661b;
  }

  .mark.p4 circle {
    fill: #8b8f94;
  }

  .lib-row, .doc-row, .vrow, .issues li, .prod, .pf, .jp-list li {
    border-color: var(--line);
  }
}

/* ---------- catalog thử sản phẩm: bố cục trang danh mục ---------- */
.try {
  grid-template-columns: minmax(0, 1fr) minmax(340px, 42%);
}

.catalog.fs {
  padding: 0;
  max-height: calc(100dvh - var(--top) - 190px);
  min-height: 460px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  container-type: inline-size;
}

.fs button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0;
  font-weight: inherit;
  justify-content: flex-start;
}

.fs button:hover:not(:disabled) {
  background: none;
}

.fs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}

.fs-nav button {
  padding: 6px 10px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.4px;
  color: var(--muted);
}

.fs-nav button.on, .fs-nav button:hover:not(:disabled) {
  color: var(--navy);
}

.fs-nav button.on {
  text-decoration: underline;
  text-underline-offset: 8px;
  text-decoration-thickness: 2px;
}

.fs-body {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 16px 8px;
  overflow-y: auto;
  flex: 1;
}

.fs-side {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fs-side button {
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  color: #b6bcb8;
}

.fs-side button:hover:not(:disabled) {
  color: var(--navy);
}

.fs-side button.on {
  color: var(--navy);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.fs-title {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -.4px;
  margin: 0 0 14px;
}

.fs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 22px 14px;
  margin-bottom: 14px;
}

.fs-item {
  margin: 0;
  min-width: 0;
}

.fs .fs-img {
  display: block;
  width: 100%;
  aspect-ratio: 202 / 141;
  background: #f7f7f7;
  overflow: hidden;
  position: relative;
}

.fs .fs-img:hover:not(:disabled) {
  background: #f7f7f7;
}

.fs-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}

.fs-img.fit img {
  object-fit: contain;
  padding: 10px;
  box-sizing: border-box;
  mix-blend-mode: multiply;
}

.fs-img:hover img {
  transform: scale(1.04);
}

.fs-swatch {
  position: absolute;
  inset: 22% 26%;
  border-radius: 4px;
  box-shadow: 0 8px 18px #0002;
}

.fs-item.on .fs-img {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}

.fs-item figcaption {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.fs-name {
  margin-top: 12px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -.2px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.fs-meta {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
}

.fs-meta code {
  font-size: 11px;
}

.fs-sw {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.fs .fs-sw button {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid #0002;
}

.fs .fs-sw button.on {
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--navy);
}

.fs .fs-try {
  margin-top: 10px;
  padding-left: 9px;
  border-left: 1px solid #c6c9ca;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .15px;
  text-transform: uppercase;
  color: #394b57;
  gap: 8px;
  white-space: nowrap;
}

.fs .fs-try i {
  font-style: normal;
  font-size: 13px;
  transition: transform .2s;
}

.fs .fs-try:hover i {
  transform: translateX(3px);
}

.fs-item.on .fs-try {
  color: var(--ok);
  border-color: var(--ok);
}

.fs-item .src-link {
  font-size: 11px;
  margin-top: 4px;
}

.fs-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.fs-cta b {
  display: block;
  font-size: 14px;
}

.fs-cta small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.fs .fs-cta .primary {
  background: var(--navy);
  color: var(--on-solid);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  min-height: 42px;
  font-weight: 600;
  white-space: nowrap;
  justify-content: center;
}

.fs .fs-cta .primary:hover:not(:disabled) {
  background: var(--navy2);
}

@container (max-width: 380px) {
  .fs-body {
    grid-template-columns: 1fr;
  }

  .fs-side {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px 14px;
  }
}

@media (max-width: 1100px) {
  .try {
    grid-template-columns: 1fr;
  }

  .catalog.fs, .fs-body {
    overflow: visible;
    max-height: none;
  }

  .fs-cta {
    position: sticky;
    bottom: 0;
  }
}

/* ---------- CTA kết nối KTS / tổng thầu ---------- */
.lead-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0 8px;
}

.lead-cta {
  display: flex;
  gap: 16px;
  padding: 22px 24px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: #eff1ec;
}

.lead-cta.warm {
  background: #f6f1e9;
  border-color: #ece3d3;
}

.lead-ic {
  font-size: 28px;
  line-height: 1;
  color: #7d8a6f;
  padding-top: 8px;
}

.lead-cta.warm .lead-ic {
  color: #9b8a66;
}

.lead-cta h3 {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 600;
}

.lead-cta p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.lead-cta .primary {
  font-weight: 600;
  padding: 10px 22px;
  min-height: 44px;
}

/* ---------- bảng bóc tách trực quan ---------- */
.boq-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 8px 0 4px;
}

.boq-intro h2 {
  margin: 0 0 2px;
  font-size: 20px;
  font-weight: 600;
}

.notice.compact {
  padding: 8px 12px;
  font-size: 12.5px;
  margin: 8px 0 14px;
}

.vboq-wrap {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
}

.vboq {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.vboq thead th {
  background: var(--surface-soft);
  text-align: left;
  font-weight: 500;
  font-size: 14px;
  color: var(--navy2);
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.vboq thead th:nth-child(1) { width: 200px; }
.vboq thead th:nth-child(2) { width: 120px; }
.vboq thead th:nth-child(4) { width: 230px; }

.boq-intro .row button {
  white-space: nowrap;
}

.qt .vf {
  font-size: 11.5px;
  line-height: 1.35;
}

.vboq .room-row th {
  text-align: left;
  padding: 14px 18px 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--muted);
  font-weight: 600;
}

.vboq td {
  vertical-align: top;
  padding: 18px 14px;
  border-bottom: 1px solid var(--line);
}

.vboq tbody:last-child tr:last-child td {
  border-bottom: 0;
}

.vrow-item.off td:not(.it) {
  opacity: .5;
}

.it-visual {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #f2f0ea;
}

.it-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.it-visual input {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 18px;
  height: 18px;
  accent-color: var(--navy);
}

.it-name {
  width: 100%;
  margin-top: 10px;
  font-weight: 600;
  font-size: 15px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.it-spec {
  width: 100%;
  margin-top: 6px;
  font-size: 12.5px;
  padding: 6px 10px;
  box-sizing: border-box;
  color: var(--muted);
}

.it .tag, .it small {
  margin-top: 6px;
  display: block;
}

.it-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.it-tools select {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  padding: 5px 8px;
}

.it-tools .link {
  color: var(--gold-d);
  font-size: 13px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
}

.qt input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.qt .vf {
  display: inline-block;
  margin-bottom: 4px;
}

.qt small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.sg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.sg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  transition: border-color .15s, box-shadow .15s;
}

.sg-card:hover {
  border-color: #bbc7bf;
}

.sg-card.on {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
}

.sg-card input {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 17px;
  height: 17px;
  accent-color: var(--navy);
  z-index: 1;
}

.sg-img {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f2f0ea;
}

.sg-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sg-info {
  padding: 8px 10px 10px;
  line-height: 1.35;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sg-info b {
  font-size: 14px;
}

.sg-info span {
  font-size: 13px;
}

.sg-info small {
  font-size: 11.5px;
  color: var(--muted);
}

.sg-links {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.sg-empty {
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  margin: 0;
}

.rq .tag {
  display: inline-block;
  margin-bottom: 8px;
}

.top3 {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.top3 label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.35;
}

.top3 input {
  margin-top: 2px;
  accent-color: var(--navy);
}

.top3 .rank {
  flex: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.top3 small {
  display: block;
  color: var(--muted);
  font-size: 11.5px;
}

.rq .primary.full {
  width: 100%;
  min-height: 48px;
  font-weight: 600;
  font-size: 15px;
}

.rq > small {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--muted);
}

.quote-dock {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-float);
}

.quote-dock b {
  display: block;
}

.quote-dock small {
  color: var(--muted);
  font-size: 12px;
}

.quote-dock .primary.big {
  min-height: 48px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 15px;
}

@media (max-width: 1100px) {
  .lead-ctas {
    grid-template-columns: 1fr;
  }

  .vboq, .vboq tbody, .vboq tr, .vboq td, .vboq th {
    display: block;
    width: auto;
  }

  .vboq thead {
    display: none;
  }

  .vboq td {
    border-bottom: 0;
    padding: 10px 16px;
  }

  .vboq td::before {
    content: attr(data-label);
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
  }

  .vboq td.it::before {
    display: none;
  }

  .vrow-item {
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }

  .boq-intro {
    flex-direction: column;
    gap: 4px;
  }

  .quote-dock {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px 12px;
  }

  .quote-dock small, .quote-dock .ghost {
    display: none;
  }

  .quote-dock .primary.big {
    width: 100%;
  }
}

@media (prefers-color-scheme: dark) {
  .lead-cta, .lead-cta.warm {
    background: var(--surface-soft);
    border-color: var(--line);
  }

  .fs .fs-img, .fs .fs-img:hover:not(:disabled), .sg-img, .it-visual {
    background: #ecebe7;
  }

  .fs-side button {
    color: #6f7a73;
  }
}

/* ---------- thử sản phẩm: nhúng trình thử Fursys ---------- */
.tryon-embed {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--paper);
}

.tryon-embed iframe {
  display: block;
  width: 100%;
  height: calc(100dvh - var(--top) - 220px);
  min-height: 560px;
  border: 0;
  background: #fff;
}

.tryon-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 260px;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: var(--paper);
  color: inherit;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
}

.tryon-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.tryon-cta b {
  display: block;
  font-size: 16px;
}

.tryon-cta small {
  color: var(--muted);
  font-size: 12.5px;
}

.tryon-cta .primary.big {
  min-height: 48px;
  padding: 10px 24px;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .tryon-embed iframe {
    height: calc(100dvh - var(--top) - var(--tabs) - 200px);
    min-height: 480px;
  }

  .tryon-cta {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ---------- Báo giá 4 bước: bóc tách theo 4 nhóm, top 3 NCC, so sánh ---------- */
.how3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0 4px; }
.how3 > div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.how3 b { display: block; font-size: 14px; }
.how3 span { font-size: 12.5px; color: var(--muted); }
.fine.right { text-align: right; }
.fine.pad { padding: 10px 16px; margin: 0; }

.ai-note { background: var(--ok-bg); border: 1px solid #cfe5d6; border-radius: var(--r); padding: 12px 16px; margin: 8px 0 14px; font-size: 13px; }
.ai-note p { margin: 4px 0 0; }
.ai-note ul { margin: 6px 0 0; padding-left: 18px; color: var(--warn); }
.ai-note small { color: var(--muted); }

.bcat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); margin: 0 0 14px; overflow: hidden; }
.bcat > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.bcat > header label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; }
.bcat > header b { font-size: 15px; }
.bcat > header small { color: var(--muted); font-size: 12.5px; flex: 1; }
.cnum { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: var(--on-solid); font-size: 12px; font-weight: 600; display: inline-grid; place-items: center; flex: none; }

.brow { display: grid; grid-template-columns: 20px minmax(0, 1fr) 170px 36px; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); align-items: start; }
.brows .brow:first-child { border-top: 0; }
.brow.off { opacity: .55; }
.brow > input[type=checkbox] { margin-top: 9px; accent-color: var(--navy); }
.bmain { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bline { display: flex; gap: 8px; }
.bmain input, .bqty input, .btools select { font: inherit; font-size: 13.5px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 9px; background: var(--paper); color: inherit; min-width: 0; }
.bmain .it-name { flex: 1; font-weight: 600; }
.bmain .it-room { width: 140px; color: var(--navy2); }
.bmain .it-spec { width: 100%; box-sizing: border-box; color: var(--navy2); }
.bsrc { display: flex; align-items: center; gap: 8px; }
.bsrc small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.conf { flex: none; width: 46px; height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.conf i { display: block; height: 100%; }
.conf.hi i { background: var(--ok); }
.conf.mid i { background: var(--est); }
.conf.lo i { background: var(--warn); }
.mini-picks { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mini-picks small { color: var(--muted); font-size: 11.5px; }
.mp { display: flex; flex-direction: row; margin: 0; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px 2px 3px; font-size: 12px; cursor: pointer; }
.mp input { display: none; }
.mp img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.mp.on { border-color: var(--navy); background: var(--surface-soft); font-weight: 600; }
.bqty { display: flex; flex-direction: column; gap: 4px; }
.qline { display: flex; gap: 6px; }
.qline input:first-child { width: 92px; }
.qline input:last-child { width: 64px; }
.bqty small { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.btools { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.btools select { width: 100%; }

.send-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.send-sum { position: sticky; top: 8px; display: flex; flex-direction: column; gap: 10px; }
.send-sum h3, .send-sum h4 { margin: 0; }
.send-sum ul { margin: 0; padding-left: 18px; }
.plist-sum { list-style: none; padding: 0 !important; display: flex; flex-direction: column; gap: 8px; }
.plist-sum li { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; }
.plist-sum small { display: block; color: var(--muted); font-size: 11.5px; }
.demo-dot { display: inline !important; color: var(--demo) !important; }
.send-sum .primary.full { width: 100%; }
.cat-ps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px 0; }
.cat-ps small { color: var(--muted); font-size: 12px; }
.chip.on { background: var(--navy); color: var(--on-solid); border-color: var(--navy); }
.srow { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.srows .srow:first-child { border-top: 0; }
.cat-ps + .srows .srow:first-child { margin-top: 6px; }
.sitem b { display: block; font-size: 14px; }
.sitem small { color: var(--muted); font-size: 12px; line-height: 1.35; display: block; }
.srow .top3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.pc { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font-size: 13px; line-height: 1.35; }
.pc.on { border-color: var(--gold); background: var(--ok-bg); }
.pc input { margin-top: 2px; accent-color: var(--gold); }
.pc-b { min-width: 0; }
.pc-b b { display: block; }
.pc-b small { display: block; color: var(--muted); font-size: 11.5px; }

.progress { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 10px 0 2px; }
.progress i { display: block; height: 100%; background: var(--ok); }
.cmp tr.catrow td { background: var(--surface-soft); font-weight: 600; font-size: 12.5px; }
.cmp td.na { color: var(--line); text-align: center; }
.cmp td.best { background: var(--ok-bg); font-weight: 600; }
.cmp td small { display: block; color: var(--muted); font-weight: 400; }
.best-sum { margin: 10px 0 0; padding: 10px 12px; background: var(--ok-bg); border-radius: var(--radius-sm); font-size: 13.5px; }

@media (max-width: 1100px) {
  .send-grid { grid-template-columns: 1fr; }
  .send-sum { position: static; }
  .srow { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .how3 { grid-template-columns: 1fr; }
  .brow { grid-template-columns: 20px minmax(0, 1fr) 36px; }
  .bmain { grid-column: 2; }
  .bdel { grid-column: 3; grid-row: 1; }
  .bqty { grid-column: 2; }
  .bline { flex-direction: column; }
  .bmain .it-room { width: auto; }
  .srow .top3 { grid-template-columns: 1fr; }
}
.tbl.cmp th, .tbl.cmp td { min-width: 120px; }
.tbl.cmp th:first-child, .tbl.cmp td:first-child { min-width: 170px; }
.tbl.cmp th:nth-child(2), .tbl.cmp td:nth-child(2) { min-width: 64px; white-space: nowrap; }


/* JEGA brand and concise controls */
.ui-icon { width: 20px; height: 20px; flex: none; vertical-align: middle; pointer-events: none; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 40px; min-width: 40px; height: 40px; padding: 8px; text-decoration: none; }
.icon-button[aria-pressed="true"] { color: var(--brand); background: var(--brand-soft); border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.fbb { gap: 8px; }
.pick.off { opacity: 1; }
.pick.off > img { opacity: .55; }
.primary, .entry-foot .button:first-child, .resume .primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.primary:hover:not(:disabled), .entry-foot .button:first-child:hover, .resume .primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.chip.on, .opt.on, .seg button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.logo { color: var(--brand); }
.composer .primary { background: var(--brand); }
.msg.user .bubble { background: var(--brand-soft); }
.need-group { padding: 24px; border-radius: 24px; border: 1px solid #f1d7df; background: #fffafb; }
.need-group.post { background: #fff; border-color: #e9dbe0; }
.group-heading { display: flex; gap: 12px; align-items: center; margin-bottom: 20px; }
.group-heading h2 { font-size: 18px; color: #72213b; margin: 0; line-height: 1.5; }
.group-heading p { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.group-number { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px; color: #fff; background: var(--brand); font-size: 13px; font-weight: 700; }
.post .group-number { background: #8c3156; }
.groups { gap: 24px; }
.groups .cards { margin-top: 0; }
.groups section.need-group .need-card { background: var(--tile-bg); border: 1px solid var(--tile-border); min-height: 200px; padding: 20px; transition: transform .18s, box-shadow .18s, border-color .18s; }
.need-space { --tile-bg: #ffe7ee; --tile-border: #efb4c3; --tile-accent: #bc234d; }
.need-style { --tile-bg: #fbe5f3; --tile-border: #e5b2d6; --tile-accent: #a22a78; }
.need-budget { --tile-bg: #fff0e9; --tile-border: #efc2b1; --tile-accent: #b74238; }
.need-tryon { --tile-bg: #fff0f4; --tile-border: #efbdcd; --tile-accent: #bd315e; }
.need-boq { --tile-bg: #f3e9f0; --tile-border: #d9b9ce; --tile-accent: #8d365e; }
.need-experts { --tile-bg: #ffeef0; --tile-border: #efbcc4; --tile-accent: #a8324a; }
.need-materials { --tile-bg: #fbecef; --tile-border: #e6bcc8; --tile-accent: #9c3a5c; }
.groups .need-card:hover { background: var(--tile-bg); border-color: var(--tile-accent); transform: translateY(-3px); box-shadow: 0 8px 24px #bd234917; }
.need-card b { color: #422630; }
.need-card small { color: #71535e; }
.need-card .nc-ico { background: var(--tile-accent); color: #fff; width: 40px; height: 40px; border-radius: 12px; }
.need-card .nc-go { color: var(--tile-accent); font-weight: 600; }
.credits { color: var(--muted); font-size: 12px; }
.homepick .save.saved { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-bg); }
@media (max-width: 1100px) and (min-width: 821px) {
  .groups section:first-child .cards, .groups section:last-child .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .groups section.need-group .need-card { min-height: 160px; }
}
@media (max-width: 820px) {
  .need-group { padding: 20px; }
  .groups section.need-group .need-card { padding: 16px; }
  .icon-button { min-width: 44px; width: 44px; height: 44px; }
}
@media (max-width: 480px) {
  .need-group { padding: 16px; border-radius: 20px; }
  .group-heading { gap: 10px; margin-bottom: 16px; align-items: flex-start; }
  .group-heading h2 { font-size: 16px; }
  .group-heading p { font-size: 11px; }
  .group-number { width: 32px; height: 32px; border-radius: 10px; }
  .groups section.need-group .need-card { min-height: 132px; grid-template-columns: 36px minmax(0, 1fr) 16px; padding: 16px 12px; gap: 4px 10px; }
  .need-card .nc-ico { width: 32px; height: 32px; border-radius: 10px; }
  .need-card b { font-size: 14px; }
  .top { gap: 4px; padding: 0 8px; }
  .top > .icon-button { width: 32px; min-width: 32px; padding: 4px; }
  .homename { max-width: 90px; }
  .homepick { flex-direction: row; align-items: center; }
  .homepick .save.saved { width: 16px; height: 16px; flex-shrink: 0; padding: 0; font-size: 9px; }
  .journey-btn { padding: 8px 4px; }
}
@media (prefers-color-scheme: dark) {
  :root { --brand: #d82e55; --brand-hover: #bd2448; --brand-soft: #422630; --brand-ink: #f4b0c2; --gold: #ed8ca5; --gold-d: #f0a4b8; }
  .need-group { background: #2c2227; border-color: #5b3544; }
  .need-group.post { background: #262126; border-color: #4c3542; }
  .group-heading h2 { color: #f6bfce; }
  .need-space { --tile-bg: #4b2633; --tile-border: #81445a; --tile-accent: #b92a53; }
  .need-style { --tile-bg: #43243a; --tile-border: #784363; --tile-accent: #9e367b; }
  .need-budget { --tile-bg: #452d29; --tile-border: #78504a; --tile-accent: #b84940; }
  .need-tryon { --tile-bg: #432731; --tile-border: #794356; --tile-accent: #b52f5a; }
  .need-boq { --tile-bg: #392735; --tile-border: #67465e; --tile-accent: #91416b; }
  .need-experts { --tile-bg: #452730; --tile-border: #7a4552; --tile-accent: #a8384f; }
  .need-materials { --tile-bg: #3f2631; --tile-border: #714356; --tile-accent: #9c4063; }
  .need-card b { color: #fff1f5; }
  .need-card small { color: #d9bbc5; }
  .need-card .nc-go { color: #f6b6ca; }
}

/* Dòng danh sách báo giá gọn: chi tiết ẩn trong .bmore; bảng ngân sách 3 cột. */
.bmore summary { cursor: pointer; color: var(--muted); font-size: 12.5px; list-style: none; }
.bmore summary::-webkit-details-marker { display: none; }
.bmore summary::after { content: ' ›'; }
.bmore[open] summary::after { content: ' ⌄'; }
.bmore[open] { display: flex; flex-direction: column; gap: 8px; }
.bmore .bgroup { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; margin: 0; font-size: 12.5px; color: var(--muted); }
.bmore .it-spec { width: 100%; max-width: none; box-sizing: border-box; }
.bmore .bgroup select { width: auto; flex: none; }
.bqty .vf { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; }
.bqty .vf .link { font-size: 12px; padding: 0; }
.bdel { width: 32px; height: 32px; padding: 0; justify-content: center; color: var(--muted); }
.tbl.budget td { vertical-align: middle; }
.tbl.budget td:first-child { width: 48px; }
.tbl.budget .bmeta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); }
.tbl.budget .bmeta .qty { width: 72px; flex: none; padding: 4px 6px; }
.tbl.budget td:nth-child(3) { white-space: nowrap; }
.howcalc summary { cursor: pointer; font-weight: 600; }
@media (max-width: 820px) { .bcat header > small { display: none; } }
.bcat.empty { opacity: .7; }
.bcat.empty header { border-bottom: 0; }
.tbl.budget { min-width: 0; width: 100%; }
.tbl.budget td { white-space: normal; }
.tbl.budget td:nth-child(3) { white-space: nowrap; }

/* Bác sĩ không gian: chấm điểm AI lên chính mặt bằng của khách */
.planpins {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  line-height: 0;
  background: #fff;
  border-radius: 6px;
}

.planpins .pinned {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

.pin {
  position: absolute;
  transform: translate(-50%, -50%);
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 12px;
  border: 2px solid #fff;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
  cursor: help;
}

.pin.p1 { background: #b2452f; }
.pin.p2 { background: var(--warn); }
.pin.p4 { background: #8b8f94; }

.pin.chg {
  border-radius: 4px;
  background: #2f6f5e;
  font-size: 11px;
}

.changes {
  padding-left: 18px;
  margin: var(--space-2) 0;
  font-size: 13px;
}

.changes li { margin-bottom: 4px; }

.space-banner.brief-fix { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 12px; }
.brief-fix .fix-row { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.brief-fix .fix-row.jumps { flex-direction: row; flex-wrap: wrap; }
.brief-fix .fix-row .needtiles { align-self: stretch; }
.send-facts select, .send-facts input { width: auto; max-width: 140px; display: inline-block; padding: 4px 8px; font-size: 13px; }
.brief-fix .fix-row .needtiles { margin: 0; }
.brief-fix .fix-row .row input { max-width: 90px; }

.space-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin-bottom: var(--space-3);
  border-radius: 8px;
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 13px;
}

/* ---------- Phong cách: trả lời bằng ảnh, moodboard ---------- */
.qcard.photo { padding: 0; overflow: hidden; align-items: stretch; min-height: 0; gap: 0; }
.qcard.photo img { width: 100%; height: 150px; object-fit: cover; display: block; }
.qcard.photo span { font-size: 14px; font-weight: 600; color: var(--navy); padding: 10px 12px; text-align: left; }
.qcard.photo.on span, .pal.on b { color: var(--brand-ink); }
.pgrid.tall { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.pgrid.tall .pick img { height: 190px; }
.pick.on::after, .qcard.photo.on::after, .pal.on::after { content: '✓'; position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.qcard.photo, .pal { position: relative; }
.pal { padding: 0; overflow: hidden; gap: 0; }
.pal img { width: 100%; height: 130px; object-fit: cover; display: block; }
.pal .sw { height: 12px; border-radius: 0; }
.pal b { padding: 9px 12px; font-size: 14px; text-align: left; }
.reveal { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-5); align-items: center; margin-top: var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-5); }
.reveal h2 { font-size: 34px; margin: 4px 0 8px; color: var(--brand-ink); }
.lead { font-size: 16px; line-height: 1.5; color: var(--navy2); margin: 0 0 var(--space-4); }
.reveal .sw { height: 28px; margin-bottom: var(--space-3); }
.mood { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: 150px 150px; gap: 8px; }
.mood img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; display: block; }
.mood img:first-child { grid-row: span 2; }
.alts { margin-top: var(--space-4); }
.alts b { font-size: 14px; }
.altrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: var(--space-2); }
.altcard { padding: 0; overflow: hidden; flex-direction: column; align-items: stretch; gap: 0; }
.altcard img { width: 100%; height: 90px; object-fit: cover; display: block; }
.altcard span { padding: 8px 10px; font-size: 13px; text-align: left; }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 130px; gap: 8px; margin-top: var(--space-3); }
.board figure { margin: 0; border-radius: 12px; overflow: hidden; }
.board figure.lead { grid-column: span 2; grid-row: span 2; }
.board img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-p .lead { margin-bottom: var(--space-3); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--space-5); margin-bottom: var(--space-3); }
.hero-meta > div { display: flex; flex-direction: column; gap: 6px; min-width: 200px; }
.hero-meta small { color: var(--muted); font-size: 12px; }
.restyle summary { cursor: pointer; color: var(--muted); font-size: 13px; }
.credit { text-align: right; }
@media (max-width: 820px) {
  .reveal { grid-template-columns: 1fr; padding: var(--space-4); }
  .mood { grid-template-rows: 120px 120px; }
  .altrow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 110px; }
  .qcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .qcard.photo img { height: 110px; }
  .pgrid.tall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgrid.tall .pick img { height: 140px; }
}

/* ---------- Pro: Khách hàng tiềm năng ---------- */
.lfilter { display: flex; flex-direction: column; gap: 10px; }
.lfilter > div { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lfilter small { width: 72px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-size: 11px; }
.lcount { margin: var(--space-4) 0 var(--space-3); color: var(--muted); font-size: 13px; flex-wrap: wrap; gap: 8px; }
.lgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--space-4); }
.lcard { display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.lcover { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--surface-soft); }
.lcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lnimg { position: absolute; right: 10px; bottom: 10px; background: #000a; color: #fff; font-size: 12px; padding: 3px 8px; border-radius: 99px; }
.lfit { position: absolute; left: 10px; top: 10px; }
.lbody { display: flex; flex-direction: column; gap: 10px; padding: var(--space-4); flex: 1; }
.lbody h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.lbody h3 a { color: inherit; text-decoration: none; }
.lid { display: inline-block; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; font-size: 12px; color: var(--muted); }
.lstat { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; color: var(--ok); background: var(--ok-bg); }
.lstat.warn { color: var(--warn); background: var(--warn-bg); }
.lstat.demo { color: var(--demo); background: var(--demo-bg); }
.lloc { margin: 0; color: var(--muted); font-size: 13px; }
.lbody .chips .chip, .ldetail .chips .chip { cursor: default; font-size: 12px; padding: 3px 10px; }
.lspec { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; margin: 0; padding: 12px; background: var(--surface-soft); border-radius: var(--radius-sm); }
.lspec.one { grid-template-columns: 1fr; background: none; padding: 0; }
.lspec dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.lspec dd { margin: 2px 0 0; font-weight: 600; font-size: 13.5px; }
.lcard blockquote, .ldetail blockquote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--navy2); font-size: 13px; }
.lcard blockquote { padding: 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lfoot { color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; margin-top: auto; }
.lact b { font-size: 15px; }
.lhead h1 { margin: 10px 0 4px; }
.lgallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 150px; gap: 8px; margin: var(--space-4) 0 var(--space-2); }
.lgallery a { position: relative; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-soft); border: 1px solid var(--line); }
.lgallery a.big, .lgallery.n3 a { grid-row: span 2; }
.lgallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lgallery span { position: absolute; left: 8px; bottom: 8px; background: #000a; color: #fff; font-size: 11.5px; padding: 2px 8px; border-radius: 99px; }
.ldetail { display: grid; grid-template-columns: 1fr 320px; gap: var(--space-4); align-items: start; margin-top: var(--space-4); }
.ldetail > div { display: flex; flex-direction: column; gap: var(--space-4); }
.ldetail .card { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.ldetail h3, .ldetail h4 { margin: 0; }
.lcontact { position: sticky; top: 16px; }
.lmask { letter-spacing: .08em; color: var(--muted); background: var(--surface-soft); padding: 1px 6px; border-radius: 4px; }
.lunlock { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
.lunlock b { font-size: 20px; }
.lunlock small { color: var(--muted); }
.lcontact button.primary { width: 100%; justify-content: center; }
@media (max-width: 1100px) { .ldetail { grid-template-columns: 1fr; } .lcontact { position: static; } }
@media (max-width: 820px) {
  .lgallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 120px; }
  .lgallery a.big { grid-column: span 2; grid-row: span 2; }
  .lspec { grid-template-columns: 1fr; }
  .lfilter small { width: 100%; }
  .kpis.lk { grid-template-columns: 1fr 1fr; }
}
.portrait .board { margin-bottom: var(--space-3); }

/* ---------- Ảnh trên thẻ nhu cầu, nhu cầu gia đình, mức đầu tư ---------- */
/* Trang chủ dạng danh sách (taste.css): ảnh thu nhỏ thay cho icon ở đầu mỗi dòng. */
body .entry .groups section.need-group .need-card { grid-template-columns: 76px minmax(0, 1fr); gap: 0 14px; padding: 10px 14px; }
.nc-img { display: block; width: 76px; height: 58px; border-radius: 8px; overflow: hidden; background: var(--surface-soft); }
.nc-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.need-card:hover .nc-img img { transform: scale(1.06); }
.nc-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.needtiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: var(--space-2) 0 var(--space-3); }
.needtile { position: relative; flex-direction: column; align-items: stretch; padding: 0; gap: 0; overflow: hidden; border-radius: 12px; }
.needtile img { width: 100%; height: 76px; object-fit: cover; display: block; }
.needtile span { padding: 7px 8px; font-size: 12px; line-height: 1.3; text-align: left; font-weight: 600; }
.needtile.on { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.needtile.on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.lvl { padding: 0 0 10px; overflow: hidden; gap: 4px; }
.lvl img { width: 100%; height: 84px; object-fit: cover; display: block; margin-bottom: 6px; }
.lvl small, .lvl b, .lvl em { padding: 0 10px; }
@media (max-width: 820px) {
  .needtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lvl img { height: 64px; }
}

/* Trạng thái tự lưu thay cho nút "Lưu kết quả" */
.actions-bar .autosaved {
  align-self: center;
  color: var(--ok);
  font-size: 0.875rem;
  white-space: nowrap;
}

/* ---------- Danh sách bóc tách: bảng ảnh hạng mục · số lượng · mẫu gợi ý · gửi hỏi giá ---------- */
.up-kinds { margin: 4px 0 10px; padding-left: 18px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.bcat { container-type: inline-size; }
.qhead, .qrow { display: grid; grid-template-columns: 170px 96px minmax(0, 1fr) 190px; gap: 18px; padding: 14px 16px; }
.qhead { padding-block: 9px; background: var(--surface-soft); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.qrow { border-top: 1px solid var(--line); align-items: start; }
.qtable .qrow:nth-child(2) { border-top: 0; }
.qrow.off .qitem, .qrow.off .qqty, .qrow.off .qsug { opacity: .5; }
.qitem, .qqty, .qreq, .qsug { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.qitem { gap: 0; }
.qitem .qpic { margin-bottom: 6px; }
.qrow input:not([type=checkbox]), .qrow select { font: inherit; font-size: 13.5px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 4px 6px; background: transparent; color: inherit; min-width: 0; width: 100%; box-sizing: border-box; }
.qrow input:not([type=checkbox]):hover, .qrow select:hover { border-color: var(--line); }
.qrow input:not([type=checkbox]):focus, .qrow select:focus { border-color: var(--navy); background: var(--paper); outline: none; }
.qitem .it-name { font-weight: 600; font-size: 14px; margin-top: 2px; }
.qitem .it-room { color: var(--muted); font-size: 12.5px; padding-block: 0; }
/* Ảnh hạng mục: tick ở góc trái, thay ảnh / xóa hiện khi rê chuột */
.qpic { position: relative; }
.qpic > label { display: block; margin: 0; cursor: pointer; }
.qpic > label > input { position: absolute; top: 8px; left: 8px; width: 18px; height: 18px; margin: 0; accent-color: var(--navy); }
.qtools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.qpic:hover .qtools, .qpic:focus-within .qtools { opacity: 1; }
.qtools > * { display: grid; place-items: center; width: 26px; height: 26px; margin: 0; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--navy); font-size: 12px; cursor: pointer; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.qtools svg { width: 15px; height: 15px; }
@media (hover: none) { .qtools { opacity: 1; } }
.qthumb { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-soft); }
.qthumb > img { width: 100%; height: 100%; object-fit: cover; }
.qthumb.empty { flex-direction: column; gap: 2px; color: var(--muted); font-size: 12px; text-align: center; padding: 8px; border: 1px dashed var(--line); }
.qthumb.empty b { color: var(--navy2); font-size: 13px; }
.qth-tag { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10.5px; padding: 1px 6px; border-radius: 999px; }
.cropv { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; }
.cropv > img { position: absolute; max-width: none; }
.qmore summary { font-size: 12px; color: var(--muted); cursor: pointer; padding-left: 6px; }
.qmore[open] { display: flex; flex-direction: column; gap: 4px; }
.qmore small { color: var(--muted); font-size: 11.5px; padding-left: 6px; }
.qmore input, .qmore select { border-color: var(--line) !important; }
/* Số lượng: một ô số + đơn vị; số JEGA ước lượng có viền nét đứt */
.qqty input { border-color: var(--line) !important; }
.qqty input[type=number] { font-weight: 600; text-align: center; }
.qqty input.guess { border-style: dashed !important; }
/* Mẫu gợi ý: ảnh + thương hiệu + tên + mã */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pcard { position: relative; display: flex; flex-direction: column; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; cursor: pointer; background: var(--paper); transition: border-color .15s; }
.pcard:hover { border-color: var(--navy2); }
.pcard.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.pcard input { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; margin: 0; accent-color: var(--navy); }
.pimg { display: block; aspect-ratio: 4 / 3; background: var(--surface-soft); }
.pimg img { width: 100%; height: 100%; object-fit: cover; }
.pinfo { display: flex; flex-direction: column; padding: 7px 9px 9px; font-size: 12.5px; line-height: 1.35; }
.pinfo b { font-size: 13px; }
.pinfo span, .pinfo small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pinfo small { color: var(--muted); font-size: 11px; }
/* Đang tải mẫu từ catalog: khung xám nhấp nháy nhẹ, giữ nguyên chỗ để bảng không nhảy */
.pcard.ghost { cursor: default; }
.pcard.ghost .pinfo b, .pcard.ghost .pinfo span { display: block; height: 10px; margin: 3px 0; border-radius: 4px; background: var(--surface-soft); }
.pcard.ghost .pinfo span { width: 70%; }
.pcards.loading .pcard { animation: pghost 1.2s ease-in-out infinite alternate; }
@keyframes pghost { from { opacity: 1; } to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .pcards.loading .pcard { animation: none; } }
.qnone { color: var(--muted); font-size: 12.5px; padding-top: 4px; }
/* Gửi tới: mỗi NCC một dòng, NCC ngoài khu vực mờ đi */
.qps { display: flex; flex-direction: column; gap: 4px; }
.qp { display: flex; flex-direction: row; align-items: center; gap: 7px; margin: 0; font-size: 13px; cursor: pointer; line-height: 1.3; }
.qp span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qp input { margin: 0; flex: none; accent-color: var(--navy); }
.qp.far { color: var(--muted); }
.qreq .primary { width: 100%; margin-top: 4px; }
.qsent { font-size: 12px; color: var(--ok) !important; align-self: center; }
@container (max-width: 860px) {
  .qhead { display: none; }
  .qrow { grid-template-columns: 150px minmax(0, 1fr); }
  .qsug, .qreq { grid-column: 1 / -1; }
  .qqty { max-width: 150px; }
  .qreq .primary { width: auto; align-self: flex-start; padding-inline: 28px; }
}
@container (max-width: 480px) {
  .qrow { grid-template-columns: 1fr; }
}

/* ---------- Danh bạ chuyên gia & nhà cung cấp (thay trang nhúng) ---------- */
.dir + .dir { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.dir-title { margin: 0 0 6px; font-size: var(--text-title); }
.dir-sub { margin: 0 0 18px; color: var(--muted); max-width: 72ch; }
.dir-filter { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.dir-filter input { flex: 2 1 240px; min-width: 0; }
.dir-filter select { flex: 1 1 150px; min-width: 0; width: auto; }
.dir-filter button { flex: none; }
.dir-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.dir-head h2 { margin: 0; font-size: 20px; }
.dir-sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: var(--text-sm); }
.dir-sort select { width: auto; }
.dir-more { display: flex; justify-content: center; margin-top: 20px; }
.dir-empty { padding: 28px; text-align: center; color: var(--muted); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.dir-empty.big { padding: 56px 24px; margin-top: 20px; }
.dir-empty.big h3 { margin: 14px 0 6px; color: var(--navy); font-size: 22px; }
.dir-empty.big p { margin: 0; }
.dir-empty-ic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 14px; background: var(--surface-soft); font-size: 20px; }
.dir .chips { margin-bottom: 4px; }

.ex-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ex-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.ex-top { display: flex; gap: 12px; align-items: center; padding: 14px 14px 12px; }
.ex-ava { position: relative; flex: none; width: 52px; height: 52px; }
.ex-ava img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: var(--surface-soft); border: 1px solid var(--line); }
.ex-ava i { position: absolute; left: 50%; bottom: -6px; transform: translateX(-50%); font-size: 10px; font-weight: 600; line-height: 1; font-style: normal; padding: 2px 6px; border-radius: 6px; background: var(--brand); color: #fff; }
.ex-id { min-width: 0; }
.ex-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ex-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.ex-ok { flex: none; font-size: 11px; font-weight: 600; color: var(--ok); background: var(--ok-bg); padding: 2px 6px; border-radius: 999px; }
.ex-id small { color: var(--muted); }
.ex-loc { color: var(--navy); }
.ex-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; height: 96px; }
.ex-photos span { position: relative; overflow: hidden; background: var(--surface-soft); }
.ex-photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ex-photos b { position: absolute; inset: 0; display: grid; place-items: center; background: #0007; color: #fff; font-size: 18px; }
.ex-stats { margin: 0; padding: 12px 14px 4px; color: var(--muted); font-size: var(--text-sm); }
.ex-stats span { margin: 0 6px; color: var(--line); }
.ex-acts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; padding: 10px 14px 14px; margin-top: auto; }
.ex-acts > * { width: 100%; justify-content: center; text-align: center; }

.su-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.su-badge { flex: none; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--est); background: var(--est-bg); color: var(--est); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.su-meta { margin: 0 0 16px; color: var(--muted); font-size: var(--text-sm); }
.su-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.su-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.su-visual { position: relative; height: 150px; background: var(--surface-soft); }
.su-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.su-pill, .su-tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #fffffff0; color: #242a28; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-pill { left: 12px; }
.su-tag { right: 12px; font-weight: 500; color: #66716b; }
.su-body { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.su-head { display: flex; gap: 12px; align-items: flex-end; margin-top: -22px; position: relative; }
.su-logo { flex: none; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.su-logo img { width: 30px; height: 30px; object-fit: contain; }
.su-head h3 { margin: 0; font-size: 17px; line-height: 1.25; }
.su-head p { margin: 2px 0 0; font-size: var(--text-sm); color: var(--ok); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.su-head > div { min-width: 0; padding-top: 26px; }
.su-scopes { display: grid; gap: 8px; }
.su-scopes div { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-soft); }
.su-scopes b { font-size: var(--text-sm); }
.su-scopes span, .su-scopes small, .su-more { font-size: var(--text-xs); color: var(--muted); }
.su-link { margin-top: auto; font-size: var(--text-sm); font-weight: 600; color: var(--brand-ink); }
.su-pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 24px; color: var(--muted); font-size: var(--text-sm); }
/* Catalog sản phẩm (CSDL catalog) */
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 4px; align-items: start; }
.pr-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.pr-card:hover, .pr-card:focus-visible { border-color: var(--navy2, var(--line)); box-shadow: 0 4px 14px #0000000f; }
/* Ảnh luôn vuông: ảnh đặt tuyệt đối trong khung để ảnh dọc/ngang không kéo giãn khung (và cả hàng thẻ) */
.pr-visual { position: relative; display: block; aspect-ratio: 1 / 1; overflow: hidden; background: var(--surface-soft); }
.pr-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-cat { position: absolute; left: 10px; top: 10px; z-index: 1; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #fffffff0; color: #242a28; }
.pr-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.pr-body h3 { margin: 0; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pr-meta { margin: 0; font-size: var(--text-xs); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-price { margin: 2px 0 0; font-weight: 700; color: var(--brand-ink); }
.pr-acts { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.pr-acts button { width: 100%; margin: 0; }
.pr-body .pr-try { font-weight: 600; border: 1px solid currentColor; }
/* Bộ lọc xổ xuống: Thương hiệu / Ngành hàng / Giá — nút gọn, bấm mới hiện danh sách */
.pr-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: -4px 0 8px; }
.pr-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-dd { position: relative; }
.pr-dd > summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; max-width: 220px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); font-size: var(--text-sm); font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; user-select: none; }
.pr-dd > summary::-webkit-details-marker { display: none; }
.pr-dd > summary:hover { border-color: var(--navy2, var(--muted)); }
.pr-dd.on > summary { border-color: var(--brand-ink); color: var(--brand-ink); background: color-mix(in srgb, var(--brand-ink) 7%, var(--paper)); }
.pr-caret { flex: none; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); opacity: .7; transition: transform .15s; }
.pr-dd[open] .pr-caret { transform: translateY(1px) rotate(-135deg); }
.pr-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; width: 260px; max-width: calc(100vw - 32px); padding: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 10px 30px #00000024; }
.pr-menu-q { width: 100%; margin: 0 0 6px; }
.pr-opts { display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.pr-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 0; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-size: var(--text-sm); text-align: left; cursor: pointer; }
.pr-opt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-opt small { flex: none; color: var(--muted); font-size: 11px; }
.pr-opt:hover { background: var(--surface-soft); }
.pr-opt.on { font-weight: 700; color: var(--brand-ink); }
.pr-opt[hidden] { display: none; }
.pr-count { margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.pr-count .dir-sort { margin: 0 0 0 auto; white-space: nowrap; }
.pr-count .dir-sort select { margin: 0; width: auto; min-width: 0; field-sizing: content; min-height: 0; height: 34px; padding: 4px 30px 4px 12px; border-radius: 999px; font-size: var(--text-sm); font-weight: 600; }
/* Màn hẹp: danh sách bám theo cả hàng bộ lọc (rộng hết khung) để không tràn mép phải */
@media (max-width: 820px) {
  .pr-filters { position: relative; width: 100%; }
  .pr-dd { position: static; }
  .pr-dd > summary { max-width: 46vw; }
  .pr-menu { left: 0; right: 0; width: auto; max-width: none; }
  /* Điện thoại: tab đã ghi "Sản phẩm" nên bỏ tiêu đề trùng; ô tìm + nút một hàng; 3 bộ lọc một hàng */
  #catalog-products .dir-title { display: none; }
  #catalog-products .dir-filter { flex-wrap: nowrap; gap: 8px; margin-bottom: 12px; }
  #catalog-products .dir-filter input { flex: 1 1 auto; }
  #catalog-products .dir-filter button { padding-inline: 14px; }
  .pr-bar { margin: 0 0 8px; }
  .pr-filters { flex-wrap: nowrap; gap: 6px; }
  .pr-dd > summary { padding: 6px 10px; gap: 6px; font-size: 13px; }
  .pr-count { margin-bottom: 10px; }
}
/* Màn chi tiết sản phẩm: ảnh (vuông) + ảnh nhỏ bên trái, thông tin + thông số bên phải; điện thoại xếp dọc */
dialog:has(.pd) { width: min(960px, 94vw); }
.pd { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 24px; }
.pd-main { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--r); background: var(--surface-soft); }
.pd-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pd-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.pd-thumbs button { position: relative; flex: none; width: 60px; height: 60px; padding: 0; margin: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-soft); cursor: pointer; }
.pd-thumbs button.on { border-color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand-ink); }
.pd-thumbs img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-cat { padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-soft); }
.pd-info h2 { margin: 0; font-size: 22px; line-height: 1.3; }
.pd-brand { margin: 0; color: var(--muted); font-size: var(--text-sm); }
.pd-price { margin: 2px 0 4px; font-size: 18px; font-weight: 700; color: var(--brand-ink); }
.pd-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.pd-acts button { margin: 0; }
.pd-specs { margin: 4px 0 0; border-top: 1px solid var(--line); }
.pd-specs > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: var(--text-sm); }
.pd-specs dt { color: var(--muted); }
.pd-specs dd { margin: 0; overflow-wrap: anywhere; }
.pd-desc { margin: 6px 0 0; font-size: var(--text-sm); line-height: 1.6; color: var(--ink, inherit); max-height: 11em; overflow-y: auto; }
.pd-src { margin-top: 6px; font-size: var(--text-sm); font-weight: 600; color: var(--brand-ink); }
.pd-load i { display: block; height: 12px; margin: 10px 0; border-radius: 6px; background: var(--surface-soft); animation: pr-pulse 1.2s ease-in-out infinite; }
.pd-load i:nth-child(2) { width: 80%; } .pd-load i:nth-child(3) { width: 60%; }
@media (max-width: 820px) { .pd { grid-template-columns: 1fr; gap: 14px; } .pd-info h2 { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .pd-load i { animation: none; } }
.pr-card.skel .pr-visual, .su-card.skel .su-visual { animation: pr-pulse 1.2s ease-in-out infinite; }
.pr-card.skel i { display: block; height: 12px; margin: 4px 0; border-radius: 6px; background: var(--surface-soft); }
.pr-card.skel i + i { width: 60%; }
@keyframes pr-pulse { 50% { opacity: .55; } }
.su-ini { font-size: 22px; font-weight: 800; color: var(--brand-ink); }
.su-card .ex-tags { padding: 0; }
.su-acts { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.su-acts .su-link { margin-top: 0; }
@media (max-width: 820px) { .pr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .pr-body { padding: 10px; } .pr-body h3 { font-size: 14px; } }

@media (max-width: 820px) {
  .su-top { flex-direction: column; }
}

/* ---------- Main flow 11/2026: phản hồi nhẹ, 3 cách tìm người làm, ảnh 3D, quyền mở lead ---------- */
/* Phản hồi: một dòng nhỏ, nút tròn nhẹ — không chiếm chỗ, không bắt gõ. */
.fb { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--text-sm); color: var(--muted); }
.fb-q { margin-right: 2px; }
.fb-btn { min-height: 30px; min-width: 30px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; line-height: 1; cursor: pointer; }
.fb-btn:hover { border-color: var(--brand); }
.fb-btn.on { background: var(--brand-soft); border-color: var(--brand); }
.fb.done { color: var(--ok); }
.fb.done .fb-btn { min-height: 24px; min-width: 24px; font-size: 12px; color: var(--muted); }
.fb-why { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.fb-chip { min-height: 26px; padding: 0 10px; border-radius: 999px; border: 1px dashed var(--line); background: transparent; font-size: var(--text-xs); color: var(--navy2); cursor: pointer; }
.fb-chip:hover { border-style: solid; border-color: var(--brand); color: var(--brand-ink); }

/* Khái toán: ♥ trên từng mức đầu tư */
.lvl-wrap { position: relative; display: flex; }
.lvl-wrap .lvl { flex: 1; }
.lvl-like { position: absolute; top: 6px; right: 6px; width: 32px; height: 32px; min-height: 32px; padding: 0; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92); color: var(--brand); font-size: 17px; line-height: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .15); cursor: pointer; }
.lvl-like.on { background: var(--brand); color: var(--on-solid); }
.like-hint { margin: 4px 0 6px; }

/* Tìm người làm: 3 phương án */
.experts-choice { margin: var(--space-4) 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
.experts-choice h3 { margin: 0; }
.lead-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); margin: var(--space-3) 0; }
.lead-mode { display: flex; gap: 10px; align-items: flex-start; text-align: left; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); cursor: pointer; }
.lead-mode:hover { border-color: var(--brand); }
.lead-mode.on { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); background: var(--brand-soft); }
.lm-n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); color: var(--navy); font-weight: 700; font-size: 13px; }
.lead-mode.on .lm-n { background: var(--brand); color: var(--on-solid); }
.lm-t { display: flex; flex-direction: column; gap: 3px; }
.lm-t small { color: var(--muted); font-size: var(--text-sm); line-height: 1.4; }
.lm-rec { font-style: normal; font-size: 11px; font-weight: 600; padding: 1px 7px; margin-left: 4px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); white-space: nowrap; }
.lead-panel h4 { margin: var(--space-3) 0 var(--space-2); }
.lead-consent { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-3); }
.okline { color: var(--ok); font-weight: 600; }
.rep { color: var(--est); margin-left: 4px; }
.slotbar { display: flex; align-items: center; gap: 8px; font-size: var(--text-sm); color: var(--navy2); margin: var(--space-2) 0; }
.slots { display: inline-flex; gap: 4px; }
.slots i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--brand); }
.slots i.on { background: var(--brand); }
.linkish { background: none; border: 0; padding: 0; min-height: 0; color: var(--brand-ink); text-decoration: underline; cursor: pointer; font: inherit; }

/* Ảnh 3D */
.render-src { list-style: none; padding: 0; margin: var(--space-3) 0; display: grid; gap: 4px; font-size: var(--text-sm); }
.render-src .ok span { color: var(--ok); }
.render-src .miss { color: var(--muted); }
.render-img { margin: 0 0 var(--space-3); }
.render-img img { width: 100%; border-radius: var(--radius-sm); display: block; background: var(--surface-soft); min-height: 200px; }
.render-img figcaption { margin-top: 6px; font-size: var(--text-xs); color: var(--muted); }
.render-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-2); }
.render-grid figure { margin: 0; }
.render-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.seg.tabs { margin-bottom: var(--space-3); }

/* Pro: quyền mở lead theo phương án */
.lmode { display: inline-flex; align-items: center; gap: 4px; font-size: var(--text-xs); font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--navy2); white-space: nowrap; }
.lmode.m-open { background: var(--ok-bg); color: var(--ok); }
.lmode.m-jega { background: var(--est-bg); color: var(--est); }
.lmode.m-self { background: var(--demo-bg); color: var(--demo); }
.lrules { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); }
.lrules > div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.lrules small { color: var(--muted); font-size: var(--text-xs); line-height: 1.4; }
.lrules .fine { grid-column: 1 / -1; margin: 0; }
.lunlock.locked b { font-size: 15px; }

@media (max-width: 820px) {
  .lead-modes, .lrules { grid-template-columns: 1fr; }
  .lead-modes { gap: var(--space-1); }
  .lead-mode { align-items: center; padding: 8px 12px; min-height: 48px; }
  .lead-mode:not(.on) .lm-t small { display: none; }
}
.why1 { display: block; color: var(--muted); font-size: var(--text-xs); margin-top: 2px; }
.experts-choice > .seg { margin-bottom: var(--space-2); }
.lead-panel .plist { display: grid; gap: 6px; }
.lead-panel .pcard { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 8px 10px; }
.lead-panel .pcard .plogo { width: 36px; height: 36px; margin: 0; }
.lead-panel .pcard .pact { margin: 0; }
p.render-src { display: block; margin: var(--space-3) 0; }
#render-note { width: 100%; }
.render-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .render-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Phong cách: màn “Nhà bạn”, thẻ phong cách ---------- */
.qgroup { margin-top: var(--space-4); }
.qgroup > b { display: block; font-size: var(--text-sm); color: var(--muted); font-weight: 600; margin-bottom: var(--space-2); }
.pick-count { margin: var(--space-3) 0 0; font-weight: 600; color: var(--brand-ink); }
.altrow.scroll { display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.altrow.scroll .altcard { flex: 0 0 150px; scroll-snap-align: start; }
.altrow.all { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--space-3) 0; }
.altcard { position: relative; }
.altcard.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand) inset; }
.altcard.on span { color: var(--brand-ink); font-weight: 700; }
.restyle + .restyle { margin-top: var(--space-2); }
.qcards { grid-template-columns: repeat(3, minmax(0, 1fr)); }

/* ---------- CTA cuối mỗi bước: người làm (chính) + bước miễn phí (phụ) ---------- */
.next-cta { margin: var(--space-5) 0 var(--space-3); display: grid; gap: var(--space-2); }
.nc-pro { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: var(--space-4); width: 100%; padding: 0; overflow: hidden; text-align: left; background: var(--brand); color: #fff; border: 0; border-radius: var(--r); min-height: 84px; box-shadow: 0 6px 18px rgba(206, 36, 76, .22); }
.nc-pro:hover { background: var(--brand-hover); }
.nc-pro img { width: 96px; height: 100%; min-height: 84px; object-fit: cover; display: block; }
.nc-t { display: grid; gap: 2px; padding: var(--space-3) 0; }
.nc-t b { font-size: 18px; line-height: 1.3; color: #fff; }
.nc-t small { font-size: var(--text-sm); color: rgba(255, 255, 255, .85); }
.nc-go { font-size: 24px; padding-right: var(--space-5); }
.nc-free { justify-self: center; font-size: var(--text-base); }
@media (max-width: 820px) {
  .qcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .altrow.all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Thanh CTA cuối bước (không ghim — khách đọc xong mới thấy): một hàng gọn (người làm = chính, lối tự làm = phụ) để không che nội dung. */
  .next-cta { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-2); }
  .nc-pro { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-2); min-height: 52px; box-shadow: none; }
  .nc-pro img { display: none; }
  .nc-t { padding: 8px 0 8px var(--space-4); }
  .nc-t b { font-size: 15px; line-height: 1.3; }
  .nc-t small { display: none; }
  .nc-pro .nc-go { font-size: 18px; padding-right: var(--space-3); }
  .nc-pro .nc-go::after { content: none; }
  .nc-free { max-width: 104px; padding: 0 4px; font-size: 13px; line-height: 1.3; white-space: normal; text-align: center; }
}

/* ---------- Trạm phong thủy: cùng khung thẻ trắng + thẻ ảnh như các câu hỏi khác ---------- */
.fs-year { display: grid; gap: 6px; font-weight: 600; max-width: 240px; margin-top: var(--space-2); }
.fs-card { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-4); margin: var(--space-4) 0 var(--space-2); padding: var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.fs-pic { margin: 0; border-radius: var(--radius-sm); overflow: hidden; }
.fs-pic img { width: 100%; height: 100%; min-height: 130px; object-fit: cover; display: block; }
.fs-info { display: grid; gap: var(--space-3); align-content: center; }
.fs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); }
.fs-head h3 { margin: 2px 0; font-size: 24px; color: var(--brand-ink); }
.fs-row { display: grid; grid-template-columns: 72px minmax(0, 1fr); align-items: center; column-gap: var(--space-3); row-gap: 4px; }
.fs-row > small { font-weight: 600; color: var(--navy2); grid-row: span 2; }
.fs-row .sw { height: 18px; }
.fs-row.avoid > small { color: var(--danger); }
.fs-els { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.fs-els .qcard.photo img { height: 110px; }
.fs-els .qcard.photo span small { display: block; font-weight: 400; font-size: var(--text-xs); color: var(--muted); margin-top: 2px; }
.pal .fs-ok { position: absolute; top: 8px; left: 8px; z-index: 1; font-style: normal; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper); color: var(--brand-ink); border: 1px solid var(--line); }
.fs-cta { display: flex; align-items: center; gap: var(--space-3); width: 100%; margin-top: var(--space-3); padding: var(--space-3); border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); color: var(--navy); text-align: left; }
.fs-cta b { flex: 1; }
.fs-thumbs { display: flex; }
.fs-thumbs img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper); margin-left: -10px; }
.fs-thumbs img:first-child { margin-left: 0; }
@media (max-width: 820px) {
  .fs-els { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fs-els .qcard.photo img { height: 90px; }
  .fs-card { grid-template-columns: 1fr; gap: var(--space-3); }
  .fs-pic img { min-height: 0; height: 120px; }
  .fs-row { grid-template-columns: 1fr; }
  .fs-row > small { grid-row: auto; }
  .fs-year { max-width: none; }
}

/* ---------- Bác sĩ không gian: thư viện có bộ lọc, xác nhận số đọc từ bản vẽ, nhánh giữ nguyên / cải tạo ---------- */
.plib { margin-top: var(--space-5); }
.up-card { flex-direction: row; align-items: center; justify-content: space-between; gap: var(--space-4); }
.up-card p { margin: 2px 0 0; font-size: 13px; }
.plib-q { width: 100%; min-height: 46px; margin: var(--space-2) 0; border-radius: 12px; font-size: 15px; padding: 0 var(--space-4); }
.plib-f { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: var(--space-2) 0 var(--space-3); }
.plib-f select { width: 100%; border-radius: 10px; }
.plib-f select.on { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.plib .plans { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.plib .plan { padding: 0 0 var(--space-3); overflow: hidden; border-radius: 12px; gap: 2px; align-items: stretch; }
.plib .plan img { height: 170px; border-bottom: 1px solid var(--line); margin-bottom: var(--space-2); }
.plib .plan b, .plib .plan small { padding: 0 var(--space-3); }
.plib .plan b { font-size: 14px; }
.plib .plan small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plib .plan:hover { border-color: var(--brand); }
.needph { display: block; height: 76px; background: linear-gradient(135deg, var(--surface-soft), var(--line)); }
.plan-thumb { padding: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.planzoom { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #fff; border-radius: 10px; cursor: zoom-in; min-height: 0; overflow: hidden; }
.planzoom:hover:not(:disabled) { background: #fff; }
.planzoom img { width: 100%; height: auto; max-height: min(70vh, 640px); min-height: 280px; object-fit: contain; display: block; background: #fff; }
.planzoom span { position: absolute; right: 10px; bottom: 10px; padding: 5px 12px; border-radius: 20px; background: var(--navy); color: var(--on-solid); font-size: 12px; font-weight: 600; }
.zoomimg { max-width: min(92vw, 1100px); max-height: 78vh; object-fit: contain; background: #fff; border-radius: 10px; }
@media (max-width: 820px) {
  .up-card { flex-direction: column; align-items: stretch; }
  .plib .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .plib .plan img { height: 130px; }
  .plib-f { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.readok { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 var(--space-2); padding: 8px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); font-size: 13px; font-weight: 600; }
.readok details { width: 100%; font-weight: 400; }
.readok details .row { gap: 8px; flex-wrap: wrap; }
.readok details input { width: 80px; }
.space-fork .grid2 { gap: 10px; }
.fork { flex-direction: column; align-items: flex-start; text-align: left; gap: 4px; padding: var(--space-3); border-radius: 12px; }
.fork small { font-weight: 400; color: var(--muted); }
.fork.on { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy); }
.why-pro { margin-top: var(--space-3); padding: var(--space-3); border-radius: 10px; background: var(--warn-bg); }
.why-pro ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.why-pro p { margin: 4px 0 0; font-size: 13px; }
@media (max-width: 820px) { .space-fork .grid2 { grid-template-columns: 1fr; } }

/* Thẻ chuyên gia từ CSDL JEGA (không ảnh dự án, không link ngoài) */
.ex-ini { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-soft); border: 1px solid var(--line); color: var(--brand); font-weight: 600; font-size: 20px; }
.ex-bio { margin: 0; padding: 4px 14px 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ex-tags { margin: 0; padding: 10px 14px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ex-tags span { font-size: 12px; padding: 3px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); }
.ex-card .ex-acts { margin-top: auto; }

/* ---------- Co giãn theo vùng làm việc: đóng chat thì nội dung to ra theo (thẻ, ảnh mặt bằng, ô nhu cầu), không chỉ thêm cột ---------- */
.ws { scrollbar-gutter: stable; container-type: inline-size; container-name: ws; }
.shell { transition: grid-template-columns .22s ease; }
@media (prefers-reduced-motion: reduce) { .shell { transition: none; } }
.plib .plans { grid-template-columns: repeat(auto-fill, minmax(clamp(190px, 17cqw, 340px), 1fr)); }
.plib .plan img { height: clamp(170px, 14cqw, 280px); }
.planzoom img { max-height: min(78vh, 60cqw); }
.needtiles { grid-template-columns: repeat(auto-fill, minmax(clamp(140px, 14cqw, 240px), 1fr)); }
.needtile img { height: clamp(76px, 7cqw, 130px); }
@container ws (max-width: 820px) { .needtiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Hiện đủ danh sách (không cắt từng đợt): thẻ ngoài màn hình không tốn công vẽ, ảnh tải khi cuộn tới */
.plib .plan, .ex-card { content-visibility: auto; contain-intrinsic-size: auto 260px; }
.ex-card { contain-intrinsic-size: auto 340px; }


/* ---------- Thẻ chuyên gia: lưới đều nhau + hồ sơ chi tiết ---------- */
.ex-card { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.ex-card:hover { box-shadow: 0 8px 24px #0001; transform: translateY(-2px); }
.ex-card:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.ex-top { height: 78px; box-sizing: border-box; }
.ex-photos { display: grid; grid-template-columns: repeat(3, 1fr); height: 96px; }
.ex-photos span:empty { background: var(--surface-soft); }
.ex-bio { height: calc(1.45em * 3 + 4px); box-sizing: content-box; }
.ex-stats { padding: 10px 14px 0; font-weight: 600; color: var(--navy); }
.ex-tags { flex-wrap: nowrap; overflow: hidden; height: 26px; align-items: center; }
.ex-tags span { white-space: nowrap; flex: none; }
.ex-acts { display: block; padding: 14px; margin-top: auto; }
.ex-acts button { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; padding: 0 16px; white-space: nowrap; font-weight: 600; }
.ex-name b { flex: 0 1 auto; }

.exp-head { display: flex; gap: 14px; align-items: center; }
.exp-head .ex-id { flex: 1; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.exp-head h2 { margin: 0; font-size: 20px; }
.exp-head .ghost { align-self: flex-start; }
.ex-ava.lg, .ex-ava.lg img, .ex-ava.lg .ex-ini { width: 72px; height: 72px; font-size: 26px; }
.exp-stats { display: flex; gap: 28px; padding: 12px 0; border-block: 1px solid var(--line); }
.exp-stats div { display: flex; flex-direction: column; }
.exp-stats b { font-size: 20px; color: var(--navy); }
.exp-stats small { color: var(--muted); }
.exp-bio { margin: 0; line-height: 1.55; }
.dlg-in .ex-tags { height: auto; flex-wrap: wrap; padding: 0; overflow: visible; }
.exp-works { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.exp-works figure { margin: 0; }
.exp-works img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: 10px; background: var(--surface-soft); display: block; }
.exp-works figcaption { margin-top: 6px; font-size: 13px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.exp-cta { width: 100%; height: 46px; white-space: nowrap; }
dialog:has(.exp-head) { width: min(720px, 94vw); }
@media (max-width: 820px) { .exp-works { grid-template-columns: 1fr; } .exp-stats { gap: 18px; } }
.ex-tags span { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ex-tags span.more { flex: none; }
.exp-chips { display: flex; flex-direction: column; gap: 8px; } .exp-chips .ex-tags { margin: 0; }

/* ───────── Tài khoản, JEGA Pro dữ liệu thật, quản trị (11/2026) ───────── */
.login { display: grid; gap: 10px; margin: 8px 0 14px; }
.login .row { flex-wrap: wrap; }
.login input[name="code"] { font-size: 20px; letter-spacing: 6px; max-width: 180px; }
.acct-in { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); margin: 8px 0 14px; }
.acct-in p { margin: 0 0 8px; }
.avatar.in { box-shadow: 0 0 0 2px var(--brand); }
.pro-gate { margin-bottom: 16px; border-color: var(--brand); }
.pro-gate .pcard { margin: 8px 0; }
.sla { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); white-space: nowrap; }
.sla.soon { background: #fff4e0; color: #8a5a00; }
.sla.late { background: #fdecec; color: var(--danger); }
.tag.bad { background: #fdecec; color: var(--danger); }
.rstat { font-size: 12px; margin-right: 6px; color: var(--muted); }
.rstat.responded { color: var(--ok); }
.rstat.expired { color: var(--danger); }
.replies { display: grid; gap: 8px; margin: 10px 0; }
.reply { padding: 8px 12px; border-left: 3px solid var(--brand); background: var(--surface-soft); border-radius: 6px; }
.reply p { margin: 4px 0 0; }
.reply.mine { border-left-color: var(--line); }
.rcp.expired { color: var(--danger); }
.rcp.pending { color: var(--muted); }
.lead-consent input[name="phone"] { max-width: 220px; }
.admin .tbl tr.late td { background: #fdecec; }
.admin .tbl tr.soon td { background: #fff4e0; }
.admin .tbl tr.off td { opacity: .5; }
.admin .tbl td form.row { gap: 6px; flex-wrap: nowrap; }
.admin .dir-filter select, .admin .dir-filter input { min-width: 0; }
.admin .notice input { width: 100%; margin-top: 6px; }
.claim .pcard { margin: 12px 0 18px; }
.claim .row { flex-wrap: wrap; gap: 10px; }
@media (prefers-color-scheme: dark) {
  .sla.soon, .admin .tbl tr.soon td { background: #3a2f1a; color: #f0c674; }
  .sla.late, .tag.bad, .admin .tbl tr.late td { background: #3a1f1f; color: #f09a9a; }
}

/* ---------- Bổ sung 11/2026 ---------- */
.fs-clash { margin: var(--space-2) 0 0; padding: 10px 14px; border-radius: 8px; background: var(--warn-bg); color: var(--warn); font-size: 14px; line-height: 1.5; }
.jega-take { display: grid; gap: 4px; margin: var(--space-2) 0; padding: 12px 14px; border-radius: 10px; background: var(--brand-soft); color: var(--navy); font-size: 15px; line-height: 1.5; }
.jega-take b { font-size: 16px; }
.sent-box { display: grid; gap: 6px; margin-top: var(--space-2); padding: 14px 16px; border-radius: 10px; background: var(--ok-bg); color: var(--ok); font-size: 15px; line-height: 1.5; }
.sent-box > b { font-size: 16px; }
.sent-box p { margin: 0; }
.pick-row { border: 0; padding: 0; margin: 0 0 var(--space-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pick-row legend { width: 100%; font-weight: 600; margin-bottom: 6px; }
.pill-radio { position: relative; }
.pill-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill-radio span { display: inline-block; padding: 8px 16px; min-height: 40px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface, transparent); font-weight: 600; }
.pill-radio input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.pill-radio input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.lead-consent label:not(.check) { display: grid; gap: 4px; font-weight: 600; }
.area-pick .chip { min-height: 44px; }
.note-more { margin-top: 4px; font-size: 13px; }
.note-more p { margin: 2px 0; }
.bubble ul { margin: 6px 0; padding-left: 18px; }
.entry-pro { margin-top: var(--space-4); text-align: center; }
/* Form liên hệ dùng chung (contact-form.js): email bắt buộc, tên + SĐT tùy chọn, một ô đồng ý. */
.lead-consent .contact-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-2); width: 100%; }
.lead-consent .contact-fields input { width: 100%; max-width: none; }
.lead-consent .contact-fields small { font-weight: 400; color: var(--muted); }
.lead-consent label.check { width: 100%; align-items: flex-start; }
.lead-consent textarea { width: 100%; }
/* JEGA Pro khi chưa đăng nhập: không có menu, chỉ lời chào + đăng nhập. */
.pro.solo { display: block; max-width: 820px; margin: 0 auto; }
.pro-landing h1 { margin: 0 0 var(--space-3); }
.pro-why { list-style: none; padding: 0; margin: 0 0 var(--space-4); display: grid; gap: var(--space-2); }
.pro-why li { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); }
.pro-why span { color: var(--muted); font-size: 14px; }

/* “Nhà của tôi” (thay thanh Hành trình x/7): ảnh nhỏ của phần đã có + số đếm, không có mẫu số. */
.journey-btn .jthumbs { display: inline-flex; }
.journey-btn .jthumbs img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 2px solid var(--paper); margin-left: -8px; }
.journey-btn .jthumbs img:first-child { margin-left: 0; }
.jp-sec { margin: var(--space-4) 0 var(--space-1); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.jp-empty { margin: 0; }
.jp-list .jimg { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.jp-list:not(.have) .jimg { filter: saturate(.55); opacity: .85; }
.jp-list.have .st-stale small { color: var(--warn); }
@media (max-width: 820px) {
  .journey-btn .jlabel { display: inline; font-size: 11px; }
}
@media (max-width: 480px) {
  .journey-btn .jlabel { display: none; }
}
.jp-foot { margin: var(--space-3) 0 0; font-size: 13px; }

/* ---------- Pro: hồ sơ của tôi (form + xem trước thẻ khách thấy) ---------- */
.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-4); align-items: start; margin-top: var(--space-3); }
.pf-layout .pro-edit { grid-template-columns: 1fr; }
.pro-edit h3 small, .pro-edit h4 small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 6px; }
.pro-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 600; }
.pro-edit label.check { flex-direction: row; align-items: center; font-weight: 400; }
.pro-edit .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.req { color: var(--brand); }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pf-id { display: flex; gap: var(--space-4); align-items: flex-start; }
.pf-grow { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pick-logo { align-items: center; }
.pick-logo .plogo { width: 72px; height: 72px; }
.pick-cover .cover-thumb { width: 100%; max-width: 420px; height: 120px; }
.pf .thumb { width: 54px; height: 54px; object-fit: cover; border-radius: 8px; }
.pf .thumb.ph { display: grid; place-items: center; font-size: 10px; color: var(--muted); background: var(--surface-soft); text-align: center; }
.pf-act { display: flex; gap: 2px; }
.pf-add { border-top: 1px dashed var(--line); padding-top: var(--space-3); display: flex; flex-direction: column; gap: 8px; }
.pf-preview { position: sticky; top: 12px; display: flex; flex-direction: column; gap: var(--space-3); }
.pf-preview h4 { margin: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.pf-card .ex-card { box-shadow: var(--shadow-sm); }
.pf-more summary { cursor: pointer; font-size: 13px; color: var(--brand-ink); }
.pf-detail { margin-top: 8px; padding: var(--space-3); background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); max-height: 520px; overflow: auto; }
.pf-detail [data-ui="close"], .pf-detail .exp-cta { display: none; }
.pf-check { display: flex; flex-direction: column; gap: 6px; padding: var(--space-3); background: var(--surface-soft); border-radius: var(--r); font-size: 13px; }
.pf-check span { color: var(--muted); }
.pf-check span.ok { color: var(--ok); }
.exp-cover img { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--radius-sm); }
.exp-str { margin: 0; padding-left: 18px; font-size: 13.5px; }
.exp-works figcaption small { display: block; color: var(--muted); font-size: 11.5px; }
@media (max-width: 1100px) { .pf-layout { grid-template-columns: 1fr; } .pf-preview { position: static; order: -1; } }
@media (max-width: 820px) { .row3, .pf-grow { grid-template-columns: 1fr; } .pf-id { flex-direction: column; } }

/* ---------- Pro: hồ sơ khách (lead & yêu cầu) ---------- */
.lsec { display: flex; align-items: baseline; gap: 10px; margin: var(--space-5) 0 var(--space-3); font-size: 18px; }
.lsec small { font-weight: 400; color: var(--muted); font-size: 13px; }
.lstat.closed { color: var(--muted); background: var(--surface-soft); }
.lcard.is-closed .lcover img { filter: saturate(.75); }
.card.req.is-closed { background: #fbfbfa; }
.rsum { display: flex; gap: var(--space-3); align-items: flex-start; margin: var(--space-2) 0; }
.rsum p { margin: 0 0 4px; }
.rimgs { display: grid; grid-template-columns: repeat(2, 64px); gap: 4px; flex: none; }
.rimgs img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.crow { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.crow small { color: var(--muted); }
.crow span { text-align: right; }
.lsw { display: inline-flex; gap: 3px; vertical-align: middle; margin-left: 6px; }
.lsw i { width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--line); }
.lplain { margin: 0; padding-left: 18px; font-size: 13.5px; display: flex; flex-direction: column; gap: 4px; }
.lgallery.n1 { grid-template-columns: 1fr; grid-auto-rows: 260px; }
.lgallery.n2 { grid-template-columns: 1fr 1fr; grid-auto-rows: 220px; }
.lgallery.n2 a.big { grid-row: auto; }
.lcover { overflow: hidden; }
.lcover img { position: absolute; inset: 0; }
.lunlock { flex-wrap: wrap; gap: 4px 10px; } .lunlock b { white-space: nowrap; }
.pro-edit label > .tag, .pro-edit label > .tiny { align-self: flex-start; }
.pro-edit .hint { background: none; padding: 0; }

/* ---------- Popup chờ AI (wait.js) ---------- */
#wait.wait-on { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgb(20 24 22 / .45); }
.wt-box { position: relative; width: min(980px, 100%); max-height: calc(100dvh - 32px); overflow: auto; display: grid; grid-template-columns: minmax(240px, 2fr) 3fr; gap: 24px; padding: 28px; background: var(--paper); color: var(--navy); border-radius: 20px; box-shadow: 0 24px 60px rgb(0 0 0 / .25); }
.wt-x { position: absolute; top: 10px; right: 10px; z-index: 1; }
.wt-left { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.wt-stage { position: relative; width: min(280px, 100%); aspect-ratio: 1; display: grid; place-items: center; }
.wt-ring { position: absolute; inset: 0; border-radius: 50%; border: 6px solid var(--brand-soft); border-top-color: var(--brand); border-right-color: var(--brand); animation: spin 1.1s linear infinite; }
.wt-scene { position: relative; width: 88%; aspect-ratio: 720 / 404; border-radius: 12px; overflow: hidden; }
.wt-scene svg { display: block; }
.wt-msg { margin: 0; font-size: var(--text-lg); font-weight: 700; }
.wt-dots i { font-style: normal; animation: blink 1.2s infinite; } .wt-dots i:nth-child(2) { animation-delay: .2s; } .wt-dots i:nth-child(3) { animation-delay: .4s; }
.wt-right { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.wt-tag { align-self: flex-start; padding: 3px 10px; border-radius: 99px; background: var(--surface-soft); color: var(--muted); font-size: var(--text-xs); font-weight: 600; }
.wt-ex img { display: block; width: 100%; border-radius: 10px; object-fit: cover; }
/* 1 · mặt bằng */
.wt-space { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; align-items: start; }
.wt-plan { position: relative; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.wt-plan i { position: absolute; translate: -50% -50%; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-solid); font: 700 12px/1 inherit; font-style: normal; box-shadow: 0 0 0 4px rgb(206 36 76 / .25); }
.wt-side { display: flex; flex-direction: column; gap: 10px; }
.wt-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: var(--text-sm); }
.wt-issues li { display: flex; gap: 8px; align-items: flex-start; padding: 8px; border-radius: 10px; background: var(--surface-soft); }
.wt-issues b { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: var(--on-solid); font-size: 11px; }
.wt-opts { display: grid; gap: 6px; font-size: var(--text-sm); }
.wt-opts span { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; }
.wt-opts .on { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }
.wt-opts em { float: right; font-style: normal; font-size: var(--text-xs); color: var(--ok); }
/* 2 · ảnh 3D */
.wt-render { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
.wt-top { aspect-ratio: 4 / 3; object-fit: contain !important; background: #fff; border: 1px solid var(--line); }
.wt-rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 10px; overflow: hidden; }
.wt-rooms img { aspect-ratio: 16 / 10; border-radius: 0; }
/* 3 · bóc tách */
.wt-boq { display: grid; grid-template-columns: 1fr 1.4fr; gap: 12px; align-items: start; }
.wt-src { aspect-ratio: 4 / 3; object-fit: contain !important; background: #fff; border: 1px solid var(--line); }
.wt-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.wt-list li { display: flex; gap: 10px; align-items: center; padding: 6px; border: 1px solid var(--line); border-radius: 10px; font-size: var(--text-sm); }
.wt-list li img { width: 40px; height: 40px; flex: none; border-radius: 8px; }
.wt-list span { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wt-list span b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wt-list small { color: var(--muted); }
.wt-list em { font-style: normal; font-weight: 600; white-space: nowrap; }
@media (max-width: 820px) {
  .wt-box { grid-template-columns: 1fr; padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); gap: 16px; border-radius: 24px 24px 0 0; max-height: calc(100dvh - 24px); align-self: end; }
  .wt-stage { width: 120px; }
  .wt-space, .wt-boq, .wt-render { grid-template-columns: 1fr; }
  .wt-src { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { .wt-ring { animation: none !important; } }

/* ---------- Lộ trình yêu cầu với từng đơn vị (stages.js) ---------- */
.stages { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 6px 0 2px; padding: 0; list-style: none; }
.stages .st { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; text-align: center; font-size: 11px; line-height: 1.25; color: var(--muted); }
.stages .st::before { content: ""; position: absolute; top: 5px; left: -50%; width: 100%; height: 2px; background: var(--line); z-index: 0; }
.stages .st:first-child::before { display: none; }
.stages .st i { position: relative; z-index: 1; width: 12px; height: 12px; border-radius: 50%; background: var(--paper); border: 2px solid var(--line); box-sizing: border-box; }
.stages .st span { overflow-wrap: anywhere; }
.stages .st time { font-size: 10px; color: var(--muted); }
.stages .st.done::before, .stages .st.cur::before, .stages .st.end::before { background: var(--ok); }
.stages .st.done i { background: var(--ok); border-color: var(--ok); }
.stages .st.done span { color: var(--navy); }
.stages .st.cur i { border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.stages .st.cur span { color: var(--ok); font-weight: 600; }
.stages .st.won i { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.stages .st.won span { color: var(--ok); font-weight: 600; }
.stages .st.end.lost i { background: var(--danger); border-color: var(--danger); }
.stages .st.end.lost span { color: var(--danger); font-weight: 600; }
.stages .st.end.off::before { background: var(--line); }
.stages .st.end.off i { background: var(--muted); border-color: var(--muted); }
.lead-panel .pcard .ptrack, .pcard .ptrack { grid-column: 1 / -1; }
.lead-panel .pcard .pact { grid-column: auto; }   /* nút Bỏ nằm cùng hàng tên cả trên điện thoại; hàng dưới dành cho lộ trình */
.rtracks { display: grid; gap: 10px; margin: var(--space-2) 0; }
.rtrack { padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.rtrack > b { font-size: 13px; }
.stage-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.stage-acts .fine { margin: 0; }

/* ---------- Hồ sơ nhà: box Yêu cầu báo giá ---------- */
.req-box { border: 1.5px solid var(--brand); }
.req-box h3 { margin: 0; }
.req-row { display: flex; gap: 10px; align-items: center; padding: var(--space-2) 0; border-top: 1px solid #f0eee9; color: inherit; text-decoration: none; }
.req-row:first-of-type { margin-top: var(--space-2); }
.req-row > div { flex: 1; min-width: 0; }
.req-row b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-row small { display: block; color: var(--muted); }
.req-row:hover b { color: var(--brand); }
.req-row.cancelled { opacity: .55; }
/* Đã lưu: tên mục co lại thay vì bóp chữ trạng thái thành từng mảnh */
.lib-row { flex-wrap: nowrap; }
.lib-row b { min-width: 0; flex: 0 0 auto; width: 110px; white-space: nowrap; }
.lib-row small { flex: 1 1 0; }
.lib-row small { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-row .button, .lib-row button, .lib-row .tag { flex-shrink: 0; }

/* ---------- Màn chào: ảnh thật, giữ nguyên các lối vào ---------- */
.logo img { height: 24px; width: auto; display: block; }
/* Nền tối: chữ JEGA màu đen sẽ chìm — đổi sang bản chữ sáng */
@media (prefers-color-scheme: dark) { .logo img, .wk-logo { content: url(../assets/brand/jega-logo-light.png); } }
.welcome { display: none; }
body.welcoming .welcome { display: block; position: fixed; inset: 0; z-index: 90; overflow-y: auto; overscroll-behavior: contain; background: var(--cream); }
.wk-in { max-width: 1160px; margin: auto; padding: 20px 32px calc(20px + env(safe-area-inset-bottom, 0px)); }
.wk-top { margin-bottom: 8px; }
.wk-logo { display: block; width: auto; height: 32px; margin: 0; }
.wk-head { max-width: 820px; margin: 0 auto 24px; text-align: center; }
.wk-head h1 { font-size: clamp(26px, 3vw, 36px); line-height: 1.25; letter-spacing: -.035em; text-wrap: balance; margin: 0 0 12px; }
.wk-head p { margin: 0; font-size: 16px; color: var(--muted); text-wrap: balance; }
.wk-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.wk-card { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 42% minmax(0,1fr); overflow: hidden; cursor: pointer; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--paper); transition: border-color .18s, box-shadow .18s; }
.wk-card:hover { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.wk-card:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.wk-img { display: block; position: relative; min-height: 220px; overflow: hidden; background: var(--surface-soft); }
.wk-bg { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: cover; }
.wk-style .wk-bg { object-position: center top; }
.wk-space .wk-bg, .wk-budget .wk-bg { object-position: left top; }
.wk-body { display: flex; flex-direction: column; align-items: flex-start; padding: 24px; gap: 10px; }
.wk-tag { font-style: normal; font-size: 12px; color: var(--muted); }
.wk-body b { font-size: 21px; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; }
.wk-body small { font-size: 13px; line-height: 1.65; color: var(--muted); }
.wk-cta { margin-top: auto; padding-top: 8px; font-size: 13px; font-weight: 700; color: var(--brand-ink); }
.wk-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 20px; }
.wk-foot button { border: 1px solid #cfd3d0; background: var(--paper); }
.wk-foot button:hover { border-color: var(--brand); }
/* Máy tính: gói gọn trong 1 màn, không cuộn — lưới 2 hàng chia đều phần cao còn lại. */
@media (min-width: 821px) and (min-height: 600px) {
 /* Màn cao/lớn: nới bề ngang theo chiều cao để thẻ giữ dáng ngang (~2:1), ảnh không bị cắt; vẫn thiếu ngang thì chặn chiều cao hàng. */
 .wk-in { --wk-w: clamp(1160px, calc(2.1 * (100dvh - 314px) + 84px), 1600px); max-width: var(--wk-w); height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; }
 .wk-grid { flex: 1; min-height: 0; align-content: center; grid-template-rows: repeat(2, minmax(0, calc((min(100vw, var(--wk-w)) - 84px) / 4.2))); }
 .wk-img { min-height: 0; }
 .wk-body { overflow: hidden; }
}
@media (min-width: 821px) and (max-height: 820px) {
 .wk-head { margin-bottom: 16px; }
 .wk-head h1 { font-size: 28px; margin-bottom: 8px; }
 .wk-head p { font-size: 14px; }
 .wk-body { padding: 18px 20px; gap: 6px; }
 .wk-body b { font-size: 18px; }
 .wk-foot { margin-top: 14px; }
}
@media (min-width: 821px) and (max-height: 700px) { .wk-body small { display: none; } }
@media (max-width: 820px) {
 .wk-in { padding: 24px 20px calc(24px + env(safe-area-inset-bottom, 0px)); }
 .wk-head { margin-bottom: 24px; }
 .wk-grid { gap: 16px; }
 .wk-card { display: flex; flex-direction: column; }
 .wk-img { width: 100%; min-height: 0; aspect-ratio: 16 / 10; }
 .wk-body { padding: 20px; flex: 1; }
 .wk-body b { font-size: 19px; }
 .wk-body small { display: none; }
}
@media (max-width: 480px) {
 .wk-in { padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px)); }
 .wk-head { text-align: left; margin-bottom: 20px; }
 .wk-top { margin-bottom: 16px; }
 .wk-logo { height: 26px; }
 .wk-head h1 { font-size: 24px; margin-bottom: 8px; }
 .wk-head p { font-size: 14px; line-height: 1.5; }
 .wk-grid { grid-template-columns: 1fr; gap: 12px; }
 .wk-card { display: grid; grid-template-columns: 104px minmax(0,1fr); min-height: 104px; }
 .wk-img { aspect-ratio: auto; height: 100%; min-height: 104px; }
 .wk-space .wk-bg { object-fit: cover; }
 .wk-body { padding: 12px 16px; gap: 4px; justify-content: center; }
 .wk-tag { font-size: 12px; }
 .wk-body b { font-size: 16px; line-height: 1.35; }
 .wk-cta { margin-top: 4px; padding-top: 0; }
 .wk-foot { gap: 4px; margin-top: 16px; }
}

/* Tính năng chưa cần cho luồng khách chọn: mờ đi, bấm vào thì mời đăng nhập. */
.need-card.locked { opacity: .55; filter: grayscale(.7); }
.need-card.locked:hover { opacity: .8; filter: grayscale(.3); }
.nc-lock { align-self: flex-start; display: inline-block; margin-top: 4px; font-style: normal; font-size: var(--text-xs); font-weight: 700; background: var(--navy); color: #fff; padding: 1px 10px; border-radius: 999px; }
.jp-list li.locked { opacity: .5; filter: grayscale(.7); }
.unlock-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; margin-bottom: 16px; border-radius: var(--r); background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }

/* ---------- Ngày sinh gia chủ + Bản đồ tổ ấm (dashboard theo ngày sinh dưới kết quả phong cách) ---------- */
.dob { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-top: var(--space-2); }
.dob-row { display: flex; align-items: center; gap: 6px; width: 100%; max-width: 300px; }
.dob-row span { color: var(--muted); font-size: 18px; }
.dob-row input { width: 0; flex: 1; min-width: 0; min-height: 46px; font-size: 17px; text-align: center; padding: 6px 8px; }
.dob-g .chip { min-height: 44px; padding: 6px 18px; font-size: 15px; }
.hm { margin: var(--space-4) 0; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.hm-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); padding: var(--space-5); color: #fff;
  background: radial-gradient(120% 140% at 100% 0%, #5a2a3a 0%, #2a2230 45%, #1d2421 100%); }
.hm-hero .eyebrow { color: #f3c3cf; }
.hm-hero h3 { margin: 4px 0 2px; font-size: 26px; color: #fff; }
.hm-hero h3 span { font-weight: 500; color: #f3d9a8; }
.hm-sub { margin: 0 0 var(--space-3); font-size: 13.5px; opacity: .85; }
.hm-hero .chip { background: #ffffff1a; border-color: #ffffff33; color: #fff; }
.hm-hero .ghost { color: #fff; border-color: #ffffff55; }
.hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding: var(--space-3); background: var(--surface-soft); }
.hm-tile { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: var(--space-4); min-width: 0; }
.hm-tile h4 { margin: 0 0 var(--space-3); font-size: 15px; }
.hm-dir { grid-column: 1 / -1; }
.hm-dir-in { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-4); align-items: center; }
.hm-compass { width: 100%; max-width: 220px; height: auto; display: block; margin: 0 auto; }
.hm-compass path { stroke: #fff; stroke-width: 2; }
.hm-compass .good path { fill: #cfe6d6; }
.hm-compass .bad path { fill: #f6d9d9; }
.hm-compass text { text-anchor: middle; dominant-baseline: middle; }
.hm-compass .cd { font-size: 15px; font-weight: 700; fill: var(--navy); }
.hm-compass .cs { font-size: 8.5px; fill: var(--navy2); }
.hm-compass .good .cs { fill: var(--ok); }
.hm-compass .bad .cs { fill: var(--danger); }
.hm-compass .hub { fill: var(--navy); }
.hm-compass .hubt { fill: #fff; font-size: 11px; font-weight: 700; }
.hm-place { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
.hm-place li { display: grid; gap: 2px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ok-bg); }
.hm-place li span { font-size: 12.5px; color: var(--navy2); }
.hm-place li b { font-size: 16px; color: var(--ok); }
.hm-place li.bad { background: #fbeeee; }
.hm-place li.bad b { color: var(--danger); }
.hm-year { display: flex; justify-content: space-between; align-items: center; gap: var(--space-2); padding: 10px 0; border-bottom: 1px solid var(--line); }
.hm-year b { font-size: 20px; display: block; }
.hm-year small { color: var(--muted); font-size: 12px; }
.hm-badge { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; text-align: right; }
.hm-year.ok .hm-badge { background: var(--ok-bg); color: var(--ok); }
.hm-year.warn .hm-badge { background: var(--warn-bg); color: var(--warn); }
.hm-years .fine { margin: var(--space-2) 0; }
.hm-cta { width: 100%; min-height: 44px; background: var(--brand); color: #fff; border: 0; border-radius: var(--radius-sm); font-weight: 600; }
.hm-cta:hover { background: var(--brand-hover); }
.hm-mat .sw { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin-bottom: var(--space-3); }
.hm-mat .sw i { flex: 1; }
.hm-mat dl { margin: 0; display: grid; gap: var(--space-2); }
.hm-mat dl div { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: var(--space-2); }
.hm-mat dt { color: var(--muted); font-size: 12.5px; }
.hm-mat dd { margin: 0; font-size: 13.5px; }
.hm-nums { display: flex; gap: 6px; }
.hm-nums b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 14px; }
.hm-life-in { display: flex; gap: var(--space-3); align-items: center; }
.hm-num { flex: none; width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; font-size: 34px; color: #fff; background: linear-gradient(135deg, var(--brand), #6d2a4a); }
.hm-life-in strong { font-size: 16px; }
.hm-life-in p { margin: 4px 0 0; font-size: 13.5px; color: var(--navy2); }
.hm-note { padding: 0 var(--space-4) var(--space-3); margin: 0; background: var(--surface-soft); }
.hm-dir.need p { margin: 0 0 var(--space-2); }
.hm-invite { display: grid; gap: var(--space-3); padding: var(--space-5); color: #fff; background: radial-gradient(120% 140% at 100% 0%, #5a2a3a 0%, #2a2230 45%, #1d2421 100%); }
.hm-invite h3 { margin: 4px 0 2px; color: #fff; font-size: 22px; }
.hm-invite .eyebrow { color: #f3c3cf; }
.hm-invite .hm-sub { margin: 0; }
.hm-invite input { background: #fff; color: var(--navy); }
.hm-invite .chip { background: #ffffff1a; border-color: #ffffff44; color: #fff; }
.hm-invite .chip.on { background: #fff; color: var(--navy); }
@media (max-width: 820px) {
  .hm-grid { grid-template-columns: 1fr; }
  .hm-dir-in { grid-template-columns: 1fr; }
  .hm-hero { padding: var(--space-4); }
  .hm-hero h3 { font-size: 22px; }
}

/* Thử đồ toàn màn hình: lớp phủ cố định, nút đóng đỏ nổi ở góc phải */
.tryon-embed { position: relative; }
.tryon-expand { position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px;
  border-radius: 999px; border: 1px solid var(--line); background: #ffffffee; color: var(--navy); font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-sm); }
.tryon-expand span { font-size: 16px; }
.tryon-embed.full { position: fixed; inset: 0; z-index: 2000; border: 0; border-radius: 0; }
.tryon-embed.full iframe { flex: 1; height: auto; min-height: 0; }
.tryon-embed.full .tryon-cta { padding: 10px 18px calc(10px + env(safe-area-inset-bottom, 0px)); }
body:has(.tryon-embed.full) { overflow: hidden; }
.tryon-close { position: absolute; top: 14px; right: 14px; z-index: 5; width: 54px; height: 54px; border-radius: 50%; border: 3px solid #fff; padding: 0;
  background: #e0242f; color: #fff; font-size: 24px; font-weight: 700; line-height: 1; display: grid; place-items: center;
  box-shadow: 0 6px 18px #e0242f66, 0 2px 6px #0004; cursor: pointer; transition: transform .15s; }
.tryon-close:hover { transform: scale(1.08); background: #c81a24; }
@media (max-width: 820px) { .tryon-embed.full .tryon-cta { flex-direction: row; align-items: center; } .tryon-embed.full .tryon-cta > div { display: none; } }

/* JEGA Pro — ảnh phong cách khách đã tick ♥ trong hồ sơ lead */
.lliked { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin: 6px 0 var(--space-3); }
.lliked a { position: relative; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-soft); }
.lliked img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lliked span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 6px; font-size: 11px; color: #fff; background: linear-gradient(transparent, #000b); }
.ltaste { margin-bottom: var(--space-3); }
.ltaste .lsw { vertical-align: middle; }
.dob-g label.chip { position: relative; display: inline-flex; align-items: center; cursor: pointer; min-height: 40px; padding: 6px 18px; font-size: 15px; }
.dob-g label.chip input { position: absolute; opacity: 0; pointer-events: none; }
.dob-g label.chip:has(input:checked) { background: var(--navy); color: #fff; border-color: var(--navy); }
.hm-invite .dob-g label.chip:has(input:checked) { background: #fff; color: var(--navy); }
.dob .primary { min-height: 44px; padding: 8px 20px; }
.hm-life { grid-column: 1 / -1; }
.hm-hero > button { flex: none; white-space: nowrap; }
.ltaste .wide { grid-column: 1 / -1; }
