:root {
  color-scheme: light;
  --ink: #f7f2e9;
  --ink-2: #f1e9dc;
  --ink-3: #e8dfd1;
  --line: rgba(69, 85, 74, 0.14);
  --paper: #3f4c43;
  --muted: #77827a;
  --teal: #9fb7a3;
  --teal-dark: #55735f;
  --gold: #d1a07f;
  --danger: #c9786e;
  --shadow: 0 24px 70px rgba(82, 68, 51, 0.16);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(circle at 85% 10%, rgba(159, 183, 163, 0.22), transparent 28rem),
    var(--ink);
}

button { font: inherit; }

button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  height: 100%;
}

.sidebar {
  display: flex;
  min-height: 0;
  flex-direction: column;
  padding: 28px 20px 20px;
  background: rgba(239, 230, 216, 0.96);
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 60px rgba(82, 68, 51, 0.08);
  z-index: 5;
}

.brand { display: flex; gap: 13px; align-items: center; padding: 0 6px 24px; }

.brand-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border: 1px solid rgba(85, 115, 95, 0.32);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(159, 183, 163, 0.3), rgba(209, 160, 127, 0.18));
}

.brand-mark span:first-child {
  position: absolute;
  inset: 10px;
  border: 2px solid var(--teal);
  border-radius: 50%;
}

.brand-mark span:last-child {
  position: absolute;
  width: 12px;
  height: 3px;
  left: 15px;
  top: 20px;
  border-radius: 4px;
  background: var(--gold);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1, h2, h3, p { margin-top: 0; }
.brand h1 { margin: 0; font-size: 1.15rem; letter-spacing: -0.025em; }

.floor-nav { display: grid; gap: 7px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }

.floor-button {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px;
  color: #657168;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: 160ms ease;
}

.floor-button:hover { color: #344139; background: rgba(255,255,255,0.48); }
.floor-button.active { color: #344139; background: rgba(255,255,255,0.66); border-color: rgba(85, 115, 95, 0.24); }
.floor-number { display: grid; place-items: center; height: 30px; border-radius: 9px; color: #9a644b; background: rgba(209, 160, 127, 0.17); font-size: 0.78rem; font-weight: 800; }
.floor-button strong { font-size: 0.9rem; }
.floor-button small { color: #8b948d; }

.room-panel { display: flex; min-height: 0; flex: 1; flex-direction: column; padding-top: 21px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 12px; }
.section-heading h2 { margin: 0; font-size: 0.76rem; letter-spacing: 0.11em; text-transform: uppercase; color: #7f8b82; }
.count-pill { min-width: 26px; padding: 3px 8px; border-radius: 999px; color: var(--teal-dark); background: rgba(159,183,163,.2); text-align: center; font-size: .73rem; font-weight: 800; }
.room-list { overflow-y: auto; padding-right: 4px; scrollbar-color: #b6c4b9 transparent; scrollbar-width: thin; }

.room-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 10px 8px;
  color: #58655c;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

.room-item:hover { background: rgba(255,255,255,.58); color: #334039; }
.room-item span { display: block; }
.room-item .room-name { font-size: .86rem; font-weight: 680; }
.room-item .room-area { margin-top: 2px; color: #879088; font-size: .72rem; }
.room-item .room-options { flex: 0 0 auto; color: #a56f53; font-size: .73rem; font-weight: 800; }

.sidebar-footer { display: flex; align-items: flex-start; gap: 9px; padding: 16px 6px 0; border-top: 1px solid var(--line); color: #7f8981; font-size: .75rem; line-height: 1.45; }
.legend-dot, .pulse-dot { width: 9px; height: 9px; margin-top: 3px; border-radius: 50%; background: var(--teal-dark); box-shadow: 0 0 0 5px rgba(159,183,163,.2); flex: 0 0 auto; }

.workspace { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0,1fr) auto; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 28px 17px; border-bottom: 1px solid var(--line); }
.workspace-header h2 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.7rem); letter-spacing: -.035em; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.sync-status { color: #7d8980; font-size: .76rem; }
.sync-status.success { color: var(--teal-dark); }

.program-button { min-height: 36px; padding: 0 14px; color: #405047; background: #e4d2bf; border: 1px solid rgba(154,100,75,.18); border-radius: 11px; font-size: .78rem; font-weight: 780; cursor: pointer; transition: 150ms ease; }
.program-button:hover { background: #dcc2aa; transform: translateY(-1px); }

.zoom-controls, .viewer-tools { display: inline-flex; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.66); }
.zoom-controls button, .viewer-tools button { min-width: 38px; height: 36px; color: #4d5c52; background: transparent; border: 0; cursor: pointer; }
.zoom-controls button:hover, .viewer-tools button:hover { background: rgba(159,183,163,.16); }
.zoom-controls span, .viewer-tools span { min-width: 54px; color: #758078; text-align: center; font-size: .75rem; }
.zoom-controls .reset-button { width: auto; padding: 0 12px; border-left: 1px solid var(--line); font-size: .76rem; }

.plan-stage { overflow: auto; min-height: 0; padding: 24px; background-color: #f9f5ee; background-image: linear-gradient(rgba(111,139,117,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(111,139,117,.055) 1px, transparent 1px); background-size: 28px 28px; scrollbar-color: #bdcabe #f5efe5; }
.plan-canvas { position: relative; width: min(100%, 1500px); margin: auto; transform-origin: top left; transition: transform 180ms ease; box-shadow: var(--shadow); }
.plan-canvas > img { display: block; width: 100%; height: auto; user-select: none; background: #fff; border-radius: 3px; }
.hotspot-layer { position: absolute; inset: 0; }

.hotspot {
  position: absolute;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translate(-50%, -50%);
  color: #3e5044;
  background: var(--teal);
  border: 4px solid rgba(255,252,247,.98);
  border-radius: 50%;
  box-shadow: 0 5px 18px rgba(72,88,75,.24), 0 0 0 7px rgba(159,183,163,.22);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease;
  z-index: 2;
}
.hotspot:hover, .hotspot:focus-visible { transform: translate(-50%, -50%) scale(1.14); background: var(--gold); z-index: 4; }
.hotspot svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; }
.hotspot-label { position: absolute; left: 50%; top: calc(100% + 9px); min-width: max-content; max-width: 210px; padding: 7px 10px; transform: translateX(-50%) translateY(-4px); color: #3f4c43; background: #fffaf3; border: 1px solid rgba(85,115,95,.24); border-radius: 8px; box-shadow: 0 10px 30px rgba(79,65,50,.18); font-size: .72rem; line-height: 1.3; opacity: 0; pointer-events: none; transition: 140ms ease; }
.hotspot:hover .hotspot-label, .hotspot:focus-visible .hotspot-label { transform: translateX(-50%) translateY(0); opacity: 1; }
.hotspot-label strong, .hotspot-label span { display: block; }
.hotspot-label span { margin-top: 2px; color: #7f8982; }

.workspace-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 13px 28px; border-top: 1px solid var(--line); color: #7e8880; font-size: .76rem; }
.workspace-footer div { display: flex; align-items: center; gap: 9px; }
.workspace-footer p { margin: 0; }

.gallery-dialog { width: min(1500px, 96vw); max-width: none; height: min(930px, 94vh); max-height: none; padding: 0; color: var(--paper); background: #f8f2e8; border: 1px solid rgba(85,115,95,.22); border-radius: 18px; box-shadow: 0 30px 100px rgba(72,58,43,.34); }
.gallery-dialog::backdrop { background: rgba(64,58,50,.58); backdrop-filter: blur(8px); }
.gallery-shell { display: grid; height: 100%; grid-template-rows: auto minmax(0,1fr); }
.gallery-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 22px 17px; border-bottom: 1px solid var(--line); }
.gallery-header h2 { margin: 0; font-size: clamp(1.25rem,2vw,1.7rem); }
.gallery-meta { margin: 5px 0 0; color: #7e8880; font-size: .82rem; }
.icon-button { width: 42px; height: 42px; color: #526158; background: rgba(255,255,255,.5); border: 1px solid var(--line); border-radius: 50%; font-size: 1.7rem; line-height: 1; cursor: pointer; }
.icon-button:hover { background: rgba(159,183,163,.18); }

.gallery-body { display: grid; min-height: 0; grid-template-columns: minmax(0,1fr) 340px; }
.image-viewer { position: relative; display: grid; min-width: 0; min-height: 0; place-items: center; overflow: hidden; background: #403f3a; cursor: grab; touch-action: none; }
.image-viewer.dragging { cursor: grabbing; }
.image-pan { transform-origin: center; will-change: transform; }
.image-pan img { display: block; max-width: calc(96vw - 390px); max-height: calc(94vh - 106px); object-fit: contain; user-select: none; }
.gallery-arrow { position: absolute; top: 50%; width: 46px; height: 58px; transform: translateY(-50%); color: #fff; background: rgba(4,21,25,.7); border: 1px solid rgba(255,255,255,.2); border-radius: 13px; font-size: 2.2rem; line-height: 1; cursor: pointer; backdrop-filter: blur(7px); }
.gallery-arrow:hover { background: rgba(17,72,76,.82); }
.gallery-arrow.previous { left: 16px; }
.gallery-arrow.next { right: 16px; }
.viewer-tools { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(0,0,0,.4); }

.concept-panel { display: flex; min-height: 0; flex-direction: column; padding: 22px; border-left: 1px solid var(--line); background: var(--ink-2); overflow-y: auto; }
.concept-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.concept-position { display: block; margin-bottom: 6px; color: var(--teal-dark); font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.concept-summary h3 { margin: 0; font-size: 1.18rem; line-height: 1.25; }
.vote-total { display: grid; flex: 0 0 auto; min-width: 58px; place-items: center; padding: 8px; color: #9a644b; background: rgba(209,160,127,.12); border: 1px solid rgba(165,111,83,.2); border-radius: 11px; }
.vote-total strong { font-size: 1.1rem; }
.vote-total span { color: #7d877f; font-size: .65rem; text-transform: uppercase; }
.concept-description { margin: 14px 0 18px; color: #707b73; font-size: .86rem; line-height: 1.55; }
.room-program { margin: 0 0 18px; padding: 14px; color: #526058; background: rgba(255,250,243,.58); border: 1px solid rgba(85,115,95,.14); border-radius: 12px; }
.room-program-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.room-program-heading > span { color: var(--teal-dark); font-size: .7rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.room-program-heading strong { padding: 4px 7px; color: #8f604a; background: rgba(209,160,127,.15); border-radius: 999px; font-size: .62rem; }
.room-program-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 9px; font-size: .75rem; }
.room-program-meta span:last-child { font-weight: 760; }
.room-program p { margin: 9px 0 0; color: #68756d; font-size: .74rem; line-height: 1.45; }
.room-program ul { margin: 10px 0 0; padding-left: 17px; color: #69756d; font-size: .74rem; line-height: 1.5; }
.thumbnail-list { display: grid; gap: 9px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.thumbnail { position: relative; overflow: hidden; padding: 0; aspect-ratio: 16 / 10; background: #ddd5c9; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.thumbnail.active { border-color: var(--teal-dark); box-shadow: 0 0 0 3px rgba(85,115,95,.12); }
.thumbnail img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumbnail span { position: absolute; right: 6px; bottom: 6px; min-width: 24px; padding: 3px 6px; color: #fff; background: rgba(3,17,20,.82); border-radius: 6px; font-size: .67rem; font-weight: 800; }
.vote-box { margin-top: auto; padding-top: 22px; }
.vote-button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 48px; padding: 12px 16px; color: #344339; background: #a9c0ad; border: 0; border-radius: 12px; font-weight: 850; cursor: pointer; box-shadow: 0 10px 30px rgba(85,115,95,.15); }
.vote-button:hover { background: #b9ccbc; transform: translateY(-1px); }
.vote-button span { display: grid; width: 21px; height: 21px; place-items: center; color: var(--ink); background: rgba(255,255,255,.42); border-radius: 50%; }
.vote-box p { margin: 10px 4px 0; color: #778179; font-size: .72rem; line-height: 1.45; }

.program-dialog { width: min(1320px, 96vw); max-width: none; height: min(920px, 94vh); max-height: none; padding: 0; color: var(--paper); background: #f8f2e8; border: 1px solid rgba(85,115,95,.22); border-radius: 20px; box-shadow: 0 30px 100px rgba(72,58,43,.34); }
.program-dialog::backdrop { background: rgba(64,58,50,.58); backdrop-filter: blur(8px); }
.program-shell { display: grid; height: 100%; grid-template-rows: auto minmax(0,1fr); }
.program-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 23px 27px 19px; background: linear-gradient(115deg, rgba(159,183,163,.17), rgba(209,160,127,.1)); border-bottom: 1px solid var(--line); }
.program-header h2 { margin: 0; font-size: clamp(1.45rem,2.2vw,2rem); }
.program-header > div > p:last-child { margin: 6px 0 0; color: #727e76; font-size: .86rem; }
.program-scroll { overflow-y: auto; padding: 24px 27px 30px; scrollbar-color: #bdcabe transparent; }
.program-totals { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 10px; }
.program-total { min-height: 102px; padding: 16px; background: rgba(255,250,243,.82); border: 1px solid rgba(85,115,95,.14); border-radius: 14px; }
.program-total strong { display: block; color: #55735f; font-family: Georgia, "Times New Roman", serif; font-size: 2rem; font-weight: 600; line-height: 1; }
.program-total span { display: block; margin-top: 9px; color: #78827b; font-size: .72rem; line-height: 1.3; }
.furniture-summary { margin-top: 28px; }
.program-section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 12px; }
.program-section-heading span, .program-floor header span { color: #55735f; font-size: .67rem; font-weight: 820; letter-spacing: .09em; text-transform: uppercase; }
.program-section-heading h3, .program-floor header h3 { margin: 3px 0 0; font-size: 1.12rem; }
.program-section-heading p { max-width: 480px; margin: 0; color: #7a857d; font-size: .74rem; line-height: 1.45; text-align: right; }
.program-table-wrap { overflow-x: auto; background: rgba(255,250,243,.72); border: 1px solid rgba(85,115,95,.14); border-radius: 14px; }
.program-table-wrap table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.program-table-wrap th, .program-table-wrap td { padding: 11px 14px; border-bottom: 1px solid rgba(85,115,95,.1); text-align: left; }
.program-table-wrap thead th { color: #758078; background: rgba(159,183,163,.12); font-size: .67rem; letter-spacing: .07em; text-transform: uppercase; }
.program-table-wrap tbody th { width: 30%; color: #4d5b52; font-weight: 720; }
.program-table-wrap tbody td:nth-child(2) { width: 18%; color: #9a644b; font-weight: 820; }
.program-table-wrap tbody td:last-child { color: #7a857d; }
.program-table-wrap tbody tr:last-child > * { border-bottom: 0; }
.program-floor { margin-top: 32px; }
.program-floor > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.program-floor > header > strong { color: #9a644b; font-size: .76rem; }
.program-room-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.program-room-card { padding: 15px; background: rgba(255,250,243,.76); border: 1px solid rgba(85,115,95,.14); border-radius: 14px; }
.program-room-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.program-room-title h4 { margin: 0; font-size: .9rem; line-height: 1.25; }
.program-room-title > div > span { display: block; margin-top: 3px; color: #8a938c; font-size: .68rem; }
.program-status { flex: 0 0 auto; max-width: 120px; padding: 4px 7px; color: #805945; background: rgba(209,160,127,.14); border-radius: 999px; font-size: .57rem; font-weight: 780; line-height: 1.2; text-align: center; }
.program-room-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(85,115,95,.1); color: #67736b; font-size: .7rem; }
.program-room-meta strong { color: #55735f; text-align: right; }
.program-room-card p { margin: 10px 0 0; color: #6f7b73; font-size: .7rem; line-height: 1.45; }
.program-room-card ul { margin: 10px 0 0; padding-left: 17px; color: #707b73; font-size: .7rem; line-height: 1.5; }
.program-note { margin-top: 28px; padding: 16px 18px; color: #536159; background: rgba(159,183,163,.15); border-left: 4px solid #7d9a83; border-radius: 4px 13px 13px 4px; }
.program-note strong { font-size: .82rem; }
.program-note p { margin: 5px 0 0; font-size: .76rem; line-height: 1.5; }

.photo-preview { position: fixed; z-index: 20; width: min(320px, calc(100vw - 32px)); overflow: hidden; color: #3f4c43; background: #fffaf3; border: 1px solid rgba(85,115,95,.24); border-radius: 17px; box-shadow: 0 22px 60px rgba(75,62,47,.24); opacity: 0; pointer-events: none; transform: translateY(6px) scale(.98); transition: opacity 150ms ease, transform 150ms ease; }
.photo-preview.show { opacity: 1; transform: translateY(0) scale(1); }
.photo-preview-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #e8dfd1; }
.photo-preview-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-preview-media span { position: absolute; right: 10px; bottom: 10px; min-width: 34px; padding: 5px 8px; color: #fff; background: rgba(56,67,59,.76); border-radius: 999px; text-align: center; font-size: .68rem; font-weight: 800; }
.photo-preview-media span:empty { display: none; }
.photo-preview-copy { display: grid; gap: 3px; padding: 13px 15px 15px; }
.photo-preview-kicker { color: #55735f; font-size: .67rem; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; }
.photo-preview-copy strong { font-size: .96rem; }
.photo-preview-copy > span:last-child { color: #7b857e; font-size: .72rem; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 50; max-width: min(92vw, 460px); padding: 12px 16px; transform: translate(-50%, 20px); color: #3d493f; background: #e1b899; border-radius: 10px; box-shadow: 0 15px 45px rgba(75,62,47,.25); font-size: .84rem; font-weight: 760; opacity: 0; pointer-events: none; transition: 180ms ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .app-shell { grid-template-columns: 1fr; height: auto; min-height: 100%; }
  .sidebar { position: relative; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding-bottom: 14px; }
  .floor-nav { grid-template-columns: repeat(3, 1fr); padding-bottom: 14px; }
  .floor-button { grid-template-columns: 28px 1fr; padding: 8px; }
  .floor-button small { display: none; }
  .room-panel { display: none; }
  .sidebar-footer { display: none; }
  .workspace { min-height: calc(100vh - 146px); grid-template-rows: auto minmax(520px, 1fr) auto; }
  .workspace-header { padding: 15px 16px; }
  .sync-status { display: none; }
  .plan-stage { padding: 14px; }
  .plan-canvas { width: 1200px; }
  .workspace-footer { padding: 12px 16px; }
  .workspace-footer p { display: none; }
  .gallery-body { grid-template-columns: 1fr; grid-template-rows: minmax(50vh,1fr) auto; }
  .concept-panel { max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
  .image-pan img { max-width: 94vw; max-height: 52vh; }
  .thumbnail-list { grid-template-columns: repeat(4, minmax(90px,1fr)); overflow-x: auto; }
  .vote-box { margin-top: 14px; }
  .photo-preview { display: none; }
  .program-totals { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .program-room-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .brand-mark { width: 36px; height: 36px; }
  .floor-nav { gap: 4px; }
  .floor-button { display: block; text-align: center; font-size: .78rem; }
  .floor-number { display: none; }
  .workspace-header { align-items: flex-start; }
  .workspace-header .eyebrow { display: none; }
  .zoom-controls span { display: none; }
  .zoom-controls button { min-width: 34px; }
  .zoom-controls .reset-button { display: none; }
  .program-button { min-height: 34px; padding: 0 10px; font-size: .7rem; }
  .workspace { min-height: calc(100vh - 132px); }
  .workspace-footer { font-size: .72rem; }
  .gallery-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .gallery-header { padding: 14px 16px; }
  .gallery-meta { font-size: .74rem; }
  .gallery-body { grid-template-rows: minmax(46vh,1fr) minmax(0,44vh); }
  .concept-panel { max-height: none; padding: 16px; }
  .image-pan img { max-height: 48vh; }
  .gallery-arrow { width: 38px; height: 48px; }
  .gallery-arrow.previous { left: 8px; }
  .gallery-arrow.next { right: 8px; }
  .viewer-tools { bottom: 8px; }
  .program-dialog { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
  .program-header { padding: 17px; }
  .program-header > div > p:last-child { display: none; }
  .program-scroll { padding: 17px; }
  .program-totals { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .program-total { min-height: 88px; }
  .program-room-grid { grid-template-columns: 1fr; }
  .program-section-heading { display: block; }
  .program-section-heading p { margin-top: 7px; text-align: left; }
}

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


/* ------------------------------------------------------------------ */
/* CP2b Hub — painel, votação identificada e fichas técnicas            */
/* ------------------------------------------------------------------ */

.hub-button { min-height: 36px; padding: 0 14px; color: #33463a; background: #a9c0ad; border: 1px solid rgba(85,115,95,.2); border-radius: 11px; font-size: .78rem; font-weight: 820; cursor: pointer; transition: 150ms ease; }
.hub-button:hover { background: #b9ccbc; transform: translateY(-1px); }

.voter-bar { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 12px; background: rgba(255,250,243,.8); border: 1px solid rgba(85,115,95,.16); border-radius: 11px; font-size: .74rem; }
.voter-bar[hidden] { display: none; }
.voter-bar label { color: #78827b; font-weight: 720; }
.voter-bar input { width: 120px; min-height: 28px; padding: 0 8px; color: #3f4c43; background: #fffdf9; border: 1px solid rgba(85,115,95,.2); border-radius: 8px; font: inherit; }
.voter-save { min-height: 28px; padding: 0 10px; color: #33463a; background: #d8e2d9; border: 0; border-radius: 8px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.voter-save:hover { background: #c7d6c9; }
.voter-name { color: #55735f; }
.voter-link { padding: 0; color: #9a8a76; background: none; border: 0; font-size: .72rem; text-decoration: underline; cursor: pointer; }

/* estado da decisão */
.status-pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: .66rem; font-weight: 820; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.status-pill[data-status="frozen"] { color: #2f4a38; background: #bcd6c0; }
.status-pill[data-status="voting"] { color: #6b4a30; background: #e8cdb4; }
.status-pill[data-status="open"] { color: #6d7871; background: #e2dbd0; }
.status-pill[data-status="single"] { color: #7a6a58; background: #ece2d3; }
.status-pill[data-order] { color: #4d5b52; background: #e2dbd0; }
.status-pill[data-order="included"] { color: #2f4a38; background: #bcd6c0; }
.status-pill[data-order="excluded"] { color: #7d4a44; background: #eac9c4; }
.status-pill[data-order="deferred"] { color: #7a5b33; background: #edd9b8; }
.status-pill[data-order="validate"] { color: #6b4a30; background: #e8cdb4; }

.decision-box { display: flex; flex-direction: column; gap: 7px; margin-bottom: 10px; }
.decision-line { margin: 0; color: #78827b; font-size: .74rem; line-height: 1.45; }
.decision-line strong { color: #55735f; }
.decision-line.mine { color: #55735f; }

/* o seletor .vote-button span vira círculo: o rótulo precisa escapar disso */
.vote-button .vote-label { display: inline; width: auto; height: auto; color: inherit; background: none; border-radius: 0; }
.vote-button.is-current { background: #cfdcd0; color: #4a5a50; cursor: default; }
.vote-button.is-current:hover { transform: none; }

.freeze-button { width: 100%; min-height: 38px; margin-top: 8px; color: #6b4a30; background: #ecdcc8; border: 1px solid rgba(154,100,75,.2); border-radius: 11px; font-size: .76rem; font-weight: 800; cursor: pointer; }
.freeze-button:hover { background: #e3cfb6; }
.freeze-button.is-frozen { color: #2f4a38; background: #cfe0d2; border-color: rgba(85,115,95,.24); }
.freeze-button[hidden] { display: none; }

.vote-hint { margin: 8px 0 0; color: #8a9289; font-size: .7rem; line-height: 1.45; }
body[data-backend="db"] .gh-hint { display: none; }
body[data-backend="github"] .db-hint { display: none; }

/* ficha técnica do ambiente */
.room-specs { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.room-spec { padding: 10px 12px; background: rgba(255,250,243,.7); border: 1px solid rgba(85,115,95,.14); border-left: 3px solid var(--teal); border-radius: 10px; }
.room-spec > span { display: block; color: #8a9289; font-size: .64rem; font-weight: 820; letter-spacing: .08em; text-transform: uppercase; }
.room-spec > strong { display: block; margin-top: 3px; color: #4d5b52; font-size: .82rem; }
.room-spec > em { display: block; margin-top: 3px; color: #55735f; font-size: .72rem; font-style: normal; font-weight: 700; }
.room-spec > p { margin: 5px 0 0; color: #8a9289; font-size: .7rem; line-height: 1.4; }
.room-spec[data-order="excluded"] { border-left-color: #c9786e; }
.room-spec[data-order="deferred"] { border-left-color: #d1a07f; }
.room-spec[data-order="validate"] { border-left-color: #d1a07f; }
.room-spec[data-order="missing"] { border-left-color: #c9786e; background: rgba(233,206,200,.3); }

/* marcador de decisão na lista lateral */
.room-item[data-status="frozen"] .room-name::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; background: var(--teal-dark); border-radius: 50%; vertical-align: middle; }
.room-item[data-status="voting"] .room-name::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; background: var(--gold); border-radius: 50%; vertical-align: middle; }

/* painel do Hub */
.hub-dialog #hubTotals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hub-section { margin-top: 26px; }
.hub-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.hub-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; background: rgba(255,250,243,.72); border: 1px solid rgba(85,115,95,.14); border-radius: 11px; font-size: .78rem; }
.hub-list li span { color: #8a9289; font-size: .7rem; }
.hub-list li.empty { color: #8a9289; justify-content: center; }
.hub-room-link { padding: 0; color: #4d5b52; background: none; border: 0; font-size: .78rem; font-weight: 720; text-align: left; cursor: pointer; }
.hub-room-link:hover { color: var(--teal-dark); text-decoration: underline; }
.hub-dialog tbody tr[data-status="frozen"] { background: rgba(188,214,192,.16); }

@media (max-width: 900px) {
  .hub-dialog #hubTotals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hub-list { grid-template-columns: 1fr; }
  /* o campo de nome precisa sobreviver no celular: quebra de linha, nunca display:none */
  .header-actions { flex-wrap: wrap; row-gap: 8px; }
  .voter-bar input { width: 100%; min-width: 96px; }
}
