@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&family=Montserrat:wght@400;500;600;700&display=swap");

:root {
  color-scheme: light;
  /* Dimensions - Removed fixed app width/height for responsiveness */
  --palette-scroll-height: clamp(260px, 46vh, 520px);

  /* Colors - Luxury Palette */
  --app-bg: #f8f9fa;
  /* Off-white background */
  --ink: #121212;
  /* Rich Black */
  --muted: #5f646d;
  --fog: #ffffff;
  --sand: #e8e0d6;
  --gold: #d4af37;
  /* Champagne Gold */
  --gold-light: #f3e5ab;
  --navy: #0a192f;

  --accent-color: var(--gold);
  --text-main: var(--ink);
  --text-muted: var(--muted);

  /* Borders & Shadows */
  --line: rgba(18, 18, 18, 0.08);
  --shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.08);
  /* Soft shadow */
  --glass-bg: rgba(255, 255, 255, 0.85);
  /* Increased opacity for cleaner look */
  --glass-border: rgba(255, 255, 255, 0.4);
  --blur: 16px;

  /* Square Design */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;

  /* Typography */
  --font-serif: "Montserrat", sans-serif;
  --font-sans: "Montserrat", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

html {
  height: 100%;
  overflow-y: auto;
  /* Allow scrolling */
  display: block;
  background: var(--app-bg);
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  color: var(--text-main);
  background: transparent;
  overflow-x: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  font-size: 16px;
  line-height: 1.6;
}

/* Layout Container */
main {
  width: 100%;
  max-width: 1320px;
  /* Constrained width for "fit screen" feel */
  margin: 0 auto;
  padding: 20px clamp(20px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 20px;
}


.topbar {
  background: #fff;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  padding: 6px 16px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 16px clamp(16px, 4vw, 48px) 4px;
}

.brand {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 20px;
}

.tabs {
  display: inline-flex;
  gap: 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  justify-content: center;
}

.tabs .tab-btn {
  background: none;
  border: none;
  padding: 6px 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  position: relative;
  text-decoration: none;
}

.tabs .tab-btn.active {
  color: var(--ink);
}

.tabs .tab-btn.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--gold);
}

.header-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Refined Buttons */
.btn {
  border: 1px solid var(--line);
  background: var(--glass-bg);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 4px;
  /* Bo nhẹ 4px thay vì 0px để trông hiện đại hơn */
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

.btn-primary {
  background: var(--ink);
  /* Đảo ngược sang màu tối để tạo điểm nhấn mạnh */
  color: #fff;
  border-color: var(--ink);
}

.btn-primary:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: #fff;
}

.icon-btn {
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-btn img {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 10px 22px rgba(179, 139, 75, 0.25);
  background: #fffaf1;
}

main {
  padding: 10px clamp(18px, 3vw, 52px) 20px;
  display: grid;
  gap: 20px;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  grid-template-rows: auto 1fr;
  align-content: stretch;
}

.scene-card {
  background: #ffffff00;
  border-radius: 18px;
  padding: clamp(14px, 2vw, 24px);
  display: grid;
  gap: 0px;
  min-height: 0;
  height: 100%;
}

.scene-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.scene-actions {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.scene-title {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 18px;
  letter-spacing: 0.02em;
}

.swdc-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.swdc-switch__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.swdc-switch__control {
  width: 70px;
  height: 36px;
  border-radius: 999px;
  background: #ebe7e0;
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  position: relative;
  cursor: pointer;
  padding: 4px;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.swdc-switch__control::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
  transform: translateX(2px);
  transition: transform 0.2s ease;
}

.swdc-switch__icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #7a756e;
  z-index: 1;
}

.swdc-switch__icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.swdc-switch__input:checked+.swdc-switch__control {
  background: #1b2c4b;
  border-color: rgba(27, 44, 75, 0.4);
}

.swdc-switch__input:checked+.swdc-switch__control::after {
  transform: translateX(34px);
}

.swdc-switch__input:checked+.swdc-switch__control .swdc-switch__icon--left {
  color: rgba(255, 255, 255, 0.6);
}

.swdc-switch__input:checked+.swdc-switch__control .swdc-switch__icon--right {
  color: #f7f3ed;
}

.scene-body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 22px;
  align-items: stretch;
  min-height: 0;
  height: 100%;
}

.scene-side,
.canvas-wrap {
  height: 100%;
}

.scene-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-content: stretch;
  min-height: 0;
}

.canvas-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  background-color: #f0f0f0;
  border: none;
  cursor: grab;
  touch-action: none;
}

.canvas-wrap canvas {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.canvas-compare {
  position: relative;
  width: 100%;
  display: grid;
  place-items: center;
  --compare-pos: 50%;
  aspect-ratio: 16 / 9;
}

.canvas-daynight-box {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 8;
  padding: 6px;
  border-radius: 0;
}

.canvas-daynight-box .swdc-switch {
  margin: 0;
}

.canvas-addscene-box {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 8;
  background: rgba(255, 255, 255, 0.7);
  /* border: 1px solid rgba(255, 255, 255, 0.28); */
  /* padding: 6px; */
  border-radius: 0;
  /* box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); */
}

.canvas-addscene-box .btn {
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
}

.canvas-compare-box {
  position: absolute;
  bottom: 12px;
  right: 12px;
  z-index: 8;
  background: rgb(255 255 255 / 52%);
  /* border: 1px solid rgba(255, 255, 255, 0.28); */
  /* padding: 4px; */
  /* border-radius: 0; */
  /* box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25); */
}

.canvas-compare-box .icon-btn {
  border-radius: 0;
  background: rgb(179 139 75 / 13%);
  border: 1px solid rgb(239 163 112 / 60%);
}

.canvas-compare-box .icon-btn img {
  filter: brightness(0) invert(1);
}

.canvas-wrap .control-card {
  width: 100%;
}

.canvas-compare canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  display: block;
  box-shadow: 0 14px 40px rgba(16, 22, 32, 0.2);
}

.texture-hover-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

.texture-hit-path {
  fill: rgba(0, 0, 0, 0.01);
  stroke: none;
  pointer-events: visiblePainted;
}

.texture-highlight-group {
  opacity: 0;
  pointer-events: none;
}

.texture-highlight-group.is-active {
  opacity: 1;
}

.texture-highlight-path {
  fill: none;
  stroke: rgba(0, 0, 0, 0.9);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
  filter: url(#textureGlow);
}

#cvBase {
  opacity: 0;
  pointer-events: none;
}

.compare-painted {
  position: absolute;
  inset: 0;
  overflow: hidden;
  width: var(--compare-pos);
  height: 100%;
}

.canvas-wrap:not(.compare-on) .compare-painted {
  width: 100%;
}

.compare-painted #cv {
  box-shadow: 0 14px 40px rgba(16, 22, 32, 0.2);
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(179, 139, 75, 0.5);
  z-index: 10;
  cursor: e-resize;
  transform: translateX(-50%);
}

.compare-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: var(--ink);
  border: 2px solid var(--gold);
  border-radius: 50%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23b38b4b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 8L22 12L18 16'/%3E%3Cpath d='M6 8L2 12L6 16'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  z-index: 10;
}

.compare-slider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  pointer-events: none;
}

.canvas-wrap.compare-on #cvBase,
.canvas-wrap.compare-on .compare-divider,
.canvas-wrap.compare-on .compare-slider {
  opacity: 1;
}

.canvas-wrap.compare-on .compare-slider {
  pointer-events: auto;
}

canvas {
  width: min(100%, 900px);
  height: auto;
  border-radius: 0;
  display: block;
}

.control-card {
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 14px;
  background: #fff;
  display: grid;
}

.control-card--wide {
  grid-column: 2 / 3;
  justify-self: stretch;
}

.control-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.surface-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.surface-pills__list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.surface-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.control-card--inline .surface-btn {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  gap: 8px;
}

.control-card--inline .color-dot {
  width: 12px;
  height: 12px;
}

.surface-btn {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.surface-btn.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
}

.color-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.control-row {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
}

.control-row input[type="range"] {
  width: 100%;
}

.control-row input[type="color"] {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
  background: #fff;
}

.my-colors {
  background: #fff;
  border-radius: 4px;
  border-left: 4px solid var(--gold);
  /* Tạo dải màu nhận diện thương hiệu */
  box-shadow: var(--shadow);
  padding: clamp(16px, 2.4vw, 22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
  flex: 1 1 auto;
  min-height: 0;
}

.my-colors-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0px;
}

.my-colors-title {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 24px;
}

.my-colors-body {
  display: grid;
  gap: 14px;
  grid-template-rows: auto 1fr;
  height: auto;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
}

#paletteCount {
  display: none !important;
}

.slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  /* Revert to 2 columns as requested */
  gap: 12px;
  overflow-y: auto;
  max-height: 480px;
  /* Tăng chiều cao vùng hiện thị */
  padding-right: 4px;
}

.slot {
  transition: all 0.2s ease;
  border: 1px solid var(--line);
  background: #fdfdfd;
  border-radius: 0px;
  padding: 6px 8px;
  min-height: 44px;
  display: grid;
  gap: 4px;
  align-content: center;
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.slot--hidden {
  display: none;
}

.slot.filled {
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.98);
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  padding: 14px 16px;
  min-height: 72px;
  align-content: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-radius: 0px;
  /* Slightly rounded for modern look */
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.slot.filled:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  z-index: 2;
}

.slot.filled::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.15) 0%, rgba(0, 0, 0, 0.05) 100%);
  pointer-events: none;
}

.slot.filled.is-active {
  border-color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 8px 16px rgba(0, 0, 0, 0.2);
}

.slot-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
  width: 100%;
}

.slot-label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  overflow: hidden;
  flex: 1;
}

.slot-code {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.slot-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font-serif);
  letter-spacing: 0.02em;
}

.slot-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  opacity: 0;
  /* Hide by default */
  transform: translateX(10px);
  transition: all 0.3s ease;
}

.slot.filled:hover .slot-actions {
  opacity: 1;
  transform: translateX(0);
}

.slot-info,
.slot-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  /* Circular buttons */
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.slot-info:hover,
.slot-remove:hover {
  background: #fff;
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.slot-info img,
.slot-remove img {
  width: 16px;
  height: 16px;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter 0.2s;
}

.slot-info:hover img,
.slot-remove:hover img {
  filter: brightness(0);
  /* Black icon on white background */
}

.slot-info,
.slot-remove {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.slot-info:hover,
.slot-remove:hover {
  background: rgba(0, 0, 0, 0.4);
  transform: translateY(-1px);
}

.slot-info img,
.slot-remove img {
  width: 14px;
  height: 14px;
  display: block;
  filter: brightness(0) invert(1);
}

.palette-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.palette-controls input {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 10px 12px;
  font-size: 12px;
}

.palette-controls .note {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 12px;
  border-radius: 0;
  background: #fff;
  white-space: nowrap;
}

.palette {
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  grid-auto-columns: initial;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 6px;
  min-height: 0;
  max-height: var(--palette-scroll-height);
  align-content: start;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.combo-panel {
  box-shadow: var(--shadow);
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 0px;
  padding: 14px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
}

.combo-panel__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.combo-panel__title {
  font-size: 26px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  /* color: var(--muted); */
  /* font-weight: 600; */
}

.combo-panel__hint {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}

.combo-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 6px;
  max-height: none;
  flex: 1;
  min-height: 0;
}

.combo-custom {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 0;
}

.combo-custom__row {
  display: grid;
  gap: 6px;
}

.combo-custom__label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.combo-custom__field {
  display: flex;
  gap: 8px;
  align-items: center;
}

.combo-custom__field input {
  flex: 0 1 200px;
  border: 1px solid var(--line);
  border-radius: 0px;
  padding: 8px 10px;
  font-size: 13px;
}

.combo-custom__swatch {
  width: 26px;
  height: 26px;
  border-radius: 0px;
  border: 1px solid rgba(17, 18, 22, 0.1);
  background: #f2f2f2;
}

.combo-custom__pick {
  padding: 8px 10px;
  font-size: 12px;
  border-radius: 0px;
  border: 1px solid var(--line);
  background: #fff;
}

.combo-custom__launch {
  width: 100%;
  padding: 12px 14px;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: #fff;
  border-color: #ffffff;
  background: linear-gradient(180deg, #000000 0%, #000000 100%);
  box-shadow: 0 12px 20px rgba(179, 139, 75, 0.28);
}

.combo-custom__launch:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 24px rgba(179, 139, 75, 0.34);
}

.combo-custom__preview-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  flex: 1 1 auto;
  height: auto;
  max-height: none;
  align-content: stretch;
  grid-auto-rows: 1fr;
}

.combo-custom__fields {
  display: none;
}

.combo-preview-card {
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: #fff;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 0;
  align-items: stretch;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  min-height: 86px;
  overflow: hidden;
}

.combo-preview-card:hover {
  border-color: rgba(17, 18, 22, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(16, 22, 32, 0.12);
}

.combo-preview-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(166, 123, 57, 0.35);
}

.combo-preview-card__image {
  width: 100%;
  height: 100%;
  border-radius: 0px;
  border: 0;
  background-size: cover;
  background-position: center;
}

.combo-preview-card__label {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
}

.combo-picker {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.combo-picker.is-open {
  display: flex;
}

.combo-picker__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.5);
}

.combo-picker__panel {
  position: relative;
  width: min(980px, 96vw);
  max-height: 88%;
  background: #fff;
  border-radius: 0px;
  padding: 18px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 1;
}

.combo-picker__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.combo-picker__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.combo-picker__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  justify-content: flex-end;
}

.combo-picker__actions input {
  flex: 1 1 220px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
}

.combo-picker__close {
  border: none;
  background: rgba(17, 18, 22, 0.05);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  transition: background 0.2s ease;
  background: rgba(17, 18, 22, 0.1);
}

.combo-picker__targets {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  background: #faf8f4;
}

.combo-picker__targets-title {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.combo-picker__targets-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.combo-target {
  border: 1px dashed rgba(17, 18, 22, 0.2);
  background: #fff;
  border-radius: 0px;
  padding: 10px;
  display: grid;
  gap: 6px;
  text-align: left;
  min-height: 92px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.combo-target.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(166, 123, 57, 0.35);
}

.combo-target.is-dragover {
  border-color: rgba(166, 123, 57, 0.7);
  background: #fffaf1;
}

.combo-target__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8a7a61;
}

.combo-target__swatch {
  width: 100%;
  height: 36px;
  border-radius: 0px;
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: #f2f2f2;
}

.combo-target__text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  min-height: 16px;
}

.combo-picker__targets-actions {
  display: flex;
  justify-content: flex-end;
}


.combo-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  overflow: auto;
  min-height: 0;
  padding-right: 6px;
}

.combo-picker__item {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 0px;
  padding: 8px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
  background: #fff;
}

.combo-picker__item[draggable="true"] {
  cursor: grab;
}

.combo-picker__item[draggable="true"]:active {
  cursor: grabbing;
}

.combo-picker__item:hover {
  border-color: rgba(17, 18, 22, 0.25);
  transform: translateY(-1px);
}

.combo-picker__swatch {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 0px;
  border: 1px solid rgba(17, 18, 22, 0.08);
}

.combo-picker__meta {
  font-size: 11px;
  color: var(--muted);
  display: grid;
  gap: 2px;
}

.ai-panel {
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 0px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.ai-panel__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.ai-panel__title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ai-panel__subtitle {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.ai-panel__status {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.ai-panel__body {
  display: grid;
  gap: 12px;
}

.ai-section {
  display: grid;
  gap: 8px;
}

.ai-section__title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.ai-areas {
  display: grid;
  gap: 8px;
}

.ai-area {
  border: 1px solid rgba(17, 18, 22, 0.1);
  border-radius: 8px;
  padding: 10px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: center;
  transition: background 0.2s;
}

.ai-area:hover {
  background: var(--fog);
}

.ai-area__swatch {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f2f1ee;
}

.ai-area__meta {
  display: grid;
  gap: 4px;
}

.ai-area__label {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.ai-area__value {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}

.ai-area__confidence {
  font-size: 11px;
  color: var(--muted);
}

.ai-combos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.ai-combo-card {
  border: 1px solid rgba(17, 18, 22, 0.12);
  border-radius: 0px;
  padding: 12px;
  background: #fff;
  display: grid;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(16, 22, 32, 0.08);
}

.ai-combo-card.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 12px 28px rgba(179, 139, 75, 0.2);
}

.ai-combo-swatches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 6px;
}

.ai-combo-swatch {
  border-radius: 0px;
  height: 42px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: grid;
  align-content: end;
  padding: 6px;
  font-size: 9px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.ai-combo-meta {
  display: grid;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.ai-combo-apply {
  justify-self: start;
}

.ai-toast {
  font-size: 12px;
  color: #7a3b2f;
  background: #fff4ef;
  border: 1px solid rgba(122, 59, 47, 0.2);
  padding: 8px 10px;
  border-radius: 0px;
  display: none;
}

.ai-toast.is-visible {
  display: block;
}

.ai-detect {
  position: absolute;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  display: grid;
  place-items: center;
}

.ai-detect.is-open {
  opacity: 1;
  pointer-events: auto;
}

.ai-detect__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 27, 47, 0.6);
  backdrop-filter: blur(6px);
}

.ai-detect__panel {
  position: relative;
  width: min(1200px, calc(100% - 48px));
  max-height: 90%;
  background: #fff;
  border-radius: 16px;
  border-top: 6px solid var(--gold);
  padding: 24px;
  box-shadow: 0 24px 70px rgba(15, 27, 47, 0.35);
  display: grid;
  gap: 16px;
  overflow: auto;
}

.ai-detect__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.ai-detect__eyebrow {
  font-size: 11px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.ai-detect__title {
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 22px;
  margin-top: 4px;
}

.ai-detect__status {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 6px;
}

.ai-detect__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-detect__close {
  border: none;
  background: rgba(17, 18, 22, 0.08);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}

.ai-detect__body {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 18px;
  align-items: start;
}

.ai-detect__left {
  display: grid;
  gap: 12px;
  align-content: start;
  border: 1px solid rgba(17, 18, 22, 0.08);
  background: #faf9f7;
  box-shadow: none;
}

.ai-detect__left.ai-panel {
  box-shadow: none;
  border-radius: 0px;
}

.ai-detect__right {
  display: grid;
  gap: 12px;
  align-content: start;
}

.ai-card {
  border: 1px solid rgba(17, 18, 22, 0.12);
  border-radius: 0px;
  padding: 14px;
  background: #fff;
  display: grid;
  gap: 10px;
}

.ai-card__header {
  display: grid;
  gap: 2px;
}

.ai-card__title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.ai-card__hint {
  font-size: 12px;
  color: var(--muted);
}

.ai-card--combos {
  max-height: 360px;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.ai-card--combos .ai-card__header {
  position: sticky;
  top: 0;
  background: #fff;
  padding-bottom: 8px;
  z-index: 1;
}

.ai-card--combos .ai-combos {
  overflow-y: auto;
  padding-right: 4px;
}

.ai-card--combos .ai-combos::-webkit-scrollbar {
  width: 6px;
}

.ai-card--combos .ai-combos::-webkit-scrollbar-thumb {
  background: rgba(17, 18, 22, 0.25);
  border-radius: 999px;
}

.ai-panel.is-loading {
  position: relative;
  opacity: 0.75;
}

.ai-panel.is-loading::after {
  content: "Đang phân tích...";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  pointer-events: none;
}

.combo-strip::-webkit-scrollbar {
  height: 6px;
}

.combo-strip::-webkit-scrollbar-thumb {
  background: rgba(17, 18, 22, 0.25);
  border-radius: 999px;
}

.combo-btn {
  flex: 0 0 280px;
  /* Fixed width for scrolling */
  width: 280px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 0px;
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.combo-btn.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(166, 123, 57, 0.35);
}

.combo-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 18, 22, 0.2);
  box-shadow: 0 6px 16px rgba(16, 22, 32, 0.12);
}

.combo-btn__swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.combo-btn__swatch {
  width: 100%;
  height: 38px;
  border-radius: 0px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.combo-btn__swatch.is-dark {
  color: #fff;
}

.combo-btn__swatch.is-light {
  color: #2b2b2b;
}

.combo-btn__swatch-code {
  display: block;
}

.combo-btn__lines {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.25;
}

.combo-btn__apply {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 16px;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
}



.palette--grid {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  grid-auto-columns: initial;
  overflow: visible;
}

.swatch {
  border-radius: 0px;
  height: 110px;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #1b1b1b;
  text-shadow: none;
}

.swatch-code {
  position: static;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  pointer-events: none;
}

.swatch-name {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
}

.swatch span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.swatch.is-dark {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.note {
  font-size: 12px;
  color: var(--muted);
}

.scene-gallery {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scene-gallery.is-open {
  opacity: 1;
  pointer-events: auto;
}

.scene-gallery.is-ui .scene-gallery__content {
  display: none !important;
}

.scene-gallery.is-ui .scene-gallery__ui {
  display: grid;
}

.scene-gallery.is-ui .scene-gallery__ui[hidden] {
  display: grid !important;
}

.scene-gallery__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(179, 139, 75, 0.18), rgba(179, 139, 75, 0) 62%),
    radial-gradient(900px 600px at 90% 35%, rgba(17, 18, 22, 0.22), rgba(17, 18, 22, 0) 60%),
    rgba(10, 12, 16, 0.66);
  backdrop-filter: blur(10px);
}

.scene-gallery__panel {
  position: relative;
  width: min(1320px, calc(100% - 24px));
  max-height: 70%;
  height: 90%;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.30);
  border-radius: 0px;
  padding: 24px;
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.38),
    0 10px 34px rgba(16, 22, 32, 0.22);
  display: grid;
  gap: 14px;
}

.scene-gallery__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 10px;
  /* border-bottom: 1px solid rgba(17, 18, 22, 0.08); */
}

.scene-picker-back {
  margin-bottom: 10px;
  /*padding: 6px 10px;*/
  font-size: 10px;
  letter-spacing: 0.16em;
}

.scene-gallery__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: rgba(17, 18, 22, 0.62);
  font-weight: 700;
}

.scene-gallery__title {
  font-size: clamp(22px, 2.2vw, 30px);
  font-family: "Montserrat", "Segoe UI", sans-serif, "Segoe UI", sans-serif;
  color: var(--ink);
  margin: 4px 0 6px;
  letter-spacing: -0.02em;
}

.scene-gallery__intro {
  font-size: 13px;
  color: var(--muted);
  max-width: 520px;
  line-height: 1.45;
}

.scene-gallery__close {
  border: none;
  background: rgba(17, 18, 22, 0.06);
  width: 38px;
  height: 38px;
  border-radius: 0;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
  transition: background 0.2s ease, transform 0.2s ease;
  border: 1px solid rgba(17, 18, 22, 0.10);
}

.scene-gallery__close:hover {
  background: rgba(17, 18, 22, 0.12);
  transform: translateY(-1px);
}

.scene-gallery__content {
  display: grid;
  gap: 26px;
  overflow-y: auto;
  max-height: calc(88% - 130px);
  padding-right: 6px;
}

.scene-gallery__section-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: #4a4f58;
}

.scene-gallery__section {
  display: grid;
  gap: 14px;
}

#view-scenePicker {
  padding: 0;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

#view-scenePicker .scene-gallery__panel {
  width: 92%;
  height: 100%;
  max-height: 100%;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* Prevent scroll on the panel itself */
  gap: 0;
  transform: scale(0.96);
  /* Zoom level 96% */
  transform-origin: center center;
}

#view-scenePicker .scene-gallery__header {
  flex: 0 0 auto;
  padding: 20px 0 10px;
  /* Adjust padding as needed */
}

#view-scenePicker .scene-gallery__content {
  flex: 0 0 auto;
  /* Allow content (thumbnails) to take natural height */
  max-height: 220px;
  /* Cap height just in case, but let it be flexible */
  overflow-y: hidden;
  /* Thumbnails scroll horizontally usually */
  padding-bottom: 10px;
}

#view-scenePicker .scene-gallery__ui {
  flex: 1;
  /* Take remaining space */
  min-height: 0;
  /* Important for grid/flex inside to work */
  height: auto;
  /* Override calc */
  overflow: hidden;
}

#scenePickerUIHost {
  display: grid;
}

.scene-gallery__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Shared horizontal scroll styles */
.scene-gallery__row,
.combo-strip {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
}

.scene-gallery__row::-webkit-scrollbar {
  height: 6px;
}

.scene-gallery__row::-webkit-scrollbar-thumb {
  background: rgba(17, 18, 22, 0.3);
  border-radius: 0;
}

.scene-gallery__card {
  flex: 0 0 220px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 0px;
  background: rgba(255, 255, 255, 0.92);
  color: inherit;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow:
    0 14px 34px rgba(16, 22, 32, 0.14),
    0 1px 0 rgba(17, 18, 22, 0.06);
  scroll-snap-align: start;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.scene-gallery__card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 139, 75, 0.55);
  box-shadow:
    0 18px 46px rgba(16, 22, 32, 0.16),
    0 1px 0 rgba(17, 18, 22, 0.06);
}

.scene-gallery__card:focus-visible {
  outline: none;
  border-color: rgba(179, 139, 75, 0.72);
  box-shadow:
    0 0 0 4px rgba(179, 139, 75, 0.18),
    0 18px 46px rgba(16, 22, 32, 0.18);
  transform: translateY(-3px);
}

.scene-gallery__card--active {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.scene-gallery__card--active .scene-gallery__card-image img {
  border-radius: 0;
}

.scene-gallery__card-image img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
}

.scene-gallery__card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-gallery__card-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.scene-gallery__card-caption {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

/* Scene gallery redesign (tabs + carousel stage) */
.scene-gallery__content[hidden] {
  display: none !important;
}

.scene-gallery__ui {
  display: grid;
  gap: 12px;
  min-height: 0;
  grid-template-rows: auto minmax(0, 1fr);
}

.scene-gallery__tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  width: 100%;
  border: 1px solid rgba(17, 18, 22, 0.16);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.70);
}

.scene-gallery__tab {
  border: none;
  border-right: 1px solid rgba(17, 18, 22, 0.12);
  background: transparent;
  color: rgba(17, 18, 22, 0.76);
  padding: 12px 12px;
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
  width: 100%;
  font-weight: 800;
  transition: background 0.2s ease, color 0.2s ease;
}

.scene-gallery__tab:last-child {
  border-right: none;
}

.scene-gallery__tab[aria-selected="true"] {
  background: #111216;
  color: #fff;
}

.scene-gallery__tab:hover {
  background: rgba(17, 18, 22, 0.06);
}

.scene-gallery__stage {
  position: relative;
  border-radius: 0px;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92) 0%, rgba(250, 248, 244, 0.92) 100%);
  overflow: hidden;
  min-height: 0;
  /* Changed from clamp to 0 to fit flex container */
  height: 100%;
  width: 100%;
  display: block;
}

.scene-gallery__caption {
  position: absolute;
  inset: auto 16px 16px 16px;
  padding: 16px 18px;
  background: linear-gradient(180deg,
      rgba(17, 18, 22, 0) 0%,
      rgba(17, 18, 22, 0.55) 45%,
      rgba(17, 18, 22, 0.78) 100%);
  color: #fff;
  border-radius: 0;
  z-index: 2;
  pointer-events: none;
  max-width: min(520px, 80%);
}

.scene-gallery__preview {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0px;
  overflow: hidden;
  display: block;
  place-items: center;
  background:
    radial-gradient(900px 300px at 15% 10%, rgba(179, 139, 75, 0.10), rgba(179, 139, 75, 0) 60%),
    #f6f6f8;
}

.scene-gallery__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  -webkit-user-drag: none;
  user-select: none;
  transition: transform 0.35s ease;
}

.scene-gallery__stage:hover .scene-gallery__preview img {
  transform: scale(1.01);
}

.scene-gallery__card-image img {
  -webkit-user-drag: none;
  user-select: none;
}

.scene-gallery__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #9aa0a8;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: rgba(255, 255, 255, 0.9);
}

.scene-gallery__fallback[aria-hidden="true"] {
  display: none;
}

.scene-gallery__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: rgba(255, 255, 255, 0.92);
  color: #111216;
  font-size: 22px;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 2;
  border-radius: 0;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.scene-gallery__arrow:hover {
  transform: translateY(-50%) translateY(-1px);
  border-color: rgba(179, 139, 75, 0.55);
  background: rgba(255, 255, 255, 0.98);
}

.scene-gallery__arrow[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.scene-gallery__arrow--left {
  left: 12px;
}

.scene-gallery__arrow--right {
  right: 12px;
}

.scene-gallery__dots {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 2;
}

.scene-gallery__dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  border: 1px solid rgba(17, 18, 22, 0.18);
  background: #c9ced6;
  cursor: pointer;
}

.scene-gallery__dot[aria-current="true"] {
  background: #111216;
  border-color: #111216;
}

.scene-gallery__cta {
  position: absolute;
  left: 50%;
  bottom: 48px;
  transform: translateX(-50%);
  border: 1px solid #111216;
  background: #111216;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 16px;
  cursor: pointer;
  z-index: 2;
  border-radius: 0;
  box-shadow: 0 18px 40px rgba(17, 18, 22, 0.22);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.scene-gallery__cta:hover {
  transform: translateX(-50%) translateY(-2px);
  box-shadow: 0 24px 60px rgba(17, 18, 22, 0.26);
  background: #0c0d10;
}

.scene-gallery__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 13px;
  color: #6b7280;
  background: #fff;
}

.scene-gallery__caption {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.scene-gallery__name {
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
}

.scene-gallery__desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.4;
}

.scene-gallery__tab:focus,
.scene-gallery__arrow:focus,
.scene-gallery__cta:focus,
.scene-gallery__dot:focus,
.scene-gallery__close:focus {
  outline: none;
}

.scene-gallery__tab:focus-visible,
.scene-gallery__arrow:focus-visible,
.scene-gallery__cta:focus-visible,
.scene-gallery__dot:focus-visible,
.scene-gallery__close:focus-visible {
  outline: 2px solid #111216;
  outline-offset: 2px;
}

.explore,
.inspire {
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(17, 18, 22, 0.12);
  padding: clamp(18px, 3vw, 34px);
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
}

.explore::before {
  content: "";
  position: absolute;
  inset: 0;
  background: none;
  pointer-events: none;
}

.explore[aria-hidden="true"],
.inspire[aria-hidden="true"],
#tab-paint[aria-hidden="true"] {
  display: none;
}

.explore-hero {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 22px;
  align-items: center;
  padding: 20px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid rgba(17, 18, 22, 0.08);
  box-shadow: 0 12px 32px rgba(16, 22, 32, 0.12);
  backdrop-filter: none;
}

.explore-kicker {
  font-size: 11px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.explore-title {
  font-family: "Montserrat", "Segoe UI", sans-serif, "Segoe UI", sans-serif;
  font-size: clamp(26px, 3.2vw, 36px);
  margin: 6px 0;
}

.explore-subtitle {
  font-size: 14px;
  color: var(--muted);
  max-width: 520px;
}

.explore-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.explore-badges span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid rgba(17, 18, 22, 0.12);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
}

.explore-hero__glass {
  height: 180px;
  border-radius: 18px;
  background: #fff;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(17, 18, 22, 0.08);
}

.hero-swatch {
  border-radius: 14px;
  box-shadow: 0 10px 20px rgba(16, 22, 32, 0.2);
}

.hero-swatch--a {
  background: #f5f1e8;
}

.hero-swatch--b {
  background: #c56a4a;
}

.hero-swatch--c {
  background: #2c3e57;
}

.hero-swatch--d {
  background: #9aa38e;
}

.hero-swatch--e {
  background: #d2a14a;
}

.explore-cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.explore-card {
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 6px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.explore-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 26px rgba(16, 22, 32, 0.12);
}

.explore-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 16px 32px rgba(179, 139, 75, 0.2);
  background: #fff;
}

.explore-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.explore-card__text {
  font-size: 12px;
  color: var(--muted);
}

.explore-panels {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
}

.explore-panel {
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 20px;
  padding: 18px;
  display: none;
  background: rgba(255, 255, 255, 0.95);
  gap: 12px;
}

.explore-panel.is-active {
  display: grid;
}

.panel-title {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.trend-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.trend-card {
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 14px;
  display: grid;
  gap: 10px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(16, 22, 32, 0.12);
}

.trend-swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  height: 60px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.trend-meta {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

.match-tool {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 16px;
  align-items: start;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.combo-card {
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 10px;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 22, 32, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.combo-card:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 18, 22, 0.2);
  box-shadow: 0 14px 28px rgba(16, 22, 32, 0.12);
}

.combo-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}

.combo-swatches {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.combo-swatch {
  border-radius: 12px;
  height: 52px;
  display: grid;
  align-content: end;
  padding: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.combo-label {
  font-size: 11px;
  color: var(--muted);
}

.match-canvas-wrap {
  border-radius: 20px;
  background: #fff;
  padding: 14px;
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 1px solid rgba(17, 18, 22, 0.08);
}

#matchCanvas {
  width: min(100%, 860px);
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 14px 30px rgba(16, 22, 32, 0.2);
  cursor: crosshair;
}

.match-result {
  display: grid;
  gap: 12px;
}

.match-chip {
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 22, 32, 0.08);
}

.match-chip__swatch {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: #f3f2ef;
}

.match-chip__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.match-chip__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.match-chip__sub {
  font-size: 12px;
  color: var(--muted);
}

.color-detail {
  position: absolute;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
  display: grid;
  place-items: center;
}

.color-detail.is-open {
  opacity: 1;
  pointer-events: auto;
}

.color-detail__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 18, 28, 0.7);
  backdrop-filter: blur(8px);
}

.color-detail__panel {
  position: relative;
  width: min(1200px, calc(100% - 48px));
  max-height: 90%;
  background: #fff;
  border-radius: 0;
  padding: 28px;
  box-shadow: 0 24px 70px rgba(15, 27, 47, 0.35);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 18px;
  overflow: hidden;
}

.color-detail__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.color-detail__headline {
  display: grid;
  gap: 6px;
}

.color-detail__code {
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}

.color-detail__name {
  font-family: "Montserrat", "Segoe UI", sans-serif, "Segoe UI", sans-serif;
  font-size: 28px;
}

.color-detail__meta {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.color-detail__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.color-detail__close {
  border: none;
  background: rgba(17, 18, 22, 0.08);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--ink);
}

.color-detail__body {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: stretch;
  min-height: 0;
}

.color-detail__left {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
  min-height: 0;
}

.color-detail__card {
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 16px;
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 14px;
  align-items: center;
  background: #fff;
}

.color-detail__swatch {
  width: 60px;
  height: 60px;
  border-radius: 0px;
  border: 1px solid rgba(0, 0, 0, 0.12);
}

.color-detail__info {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.color-detail__value {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.color-detail__section {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.color-detail__left .color-detail__section {
  grid-template-rows: auto auto 1fr;
}

.color-detail__label {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.color-detail__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
}

.color-detail__room {
  display: grid;
  grid-template-rows: minmax(84px, 7fr) minmax(34px, 3fr);
  gap: 0;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0;
  padding: 0;
  min-width: 140px;
  height: 140px;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.color-detail__room.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(166, 123, 57, 0.35);
}

.color-detail__room canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background-size: cover;
  background-position: center;
}

.color-detail__room-name {
  font-size: 12px;
  color: var(--ink);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6px 8px;
}

.color-detail__tone {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 10px;
}

.color-detail__tone-swatch {
  width: 100%;
  height: 28px;
  border: 1px solid rgba(17, 18, 22, 0.18);
  background: #fff;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.2s ease;
}

.color-detail__tone-swatch:hover {
  transform: translateY(-1px);
  border-color: rgba(17, 18, 22, 0.4);
}

.color-detail__tone-swatch.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px rgba(166, 123, 57, 0.4);
}

.color-detail__suggest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  padding: 8px;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
}

.color-detail__right {
  display: grid;
  gap: 10px;
  min-height: 0;
}

.color-detail__preview {
  border-radius: 22px;
  background: #fff;
  padding: clamp(12px, 2vw, 22px);
  display: grid;
  gap: 12px;
  align-content: start;
}

.color-detail__section--rooms {
  width: min(100%, 760px);
  margin: 4px auto 0;
}

#colorDetailCanvas {
  width: min(100%, 760px);
  height: auto;
  display: block;
  margin: 0 auto;
}

.color-detail__preview-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.color-detail__section--rooms {
  margin-top: 4px;
}

.ai-preview-card {
  display: grid;
  gap: 12px;
}

.ai-preview {
  display: grid;
  gap: 12px;
}

.ai-preview__canvas {
  position: relative;
  border: 1px solid rgba(17, 18, 22, 0.12);
  border-radius: 0px;
  background: #f7f7f8;
  min-height: 220px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

#aiCanvas {
  width: 100%;
  height: auto;
  display: block;
}

.ai-preview__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.45;
}

.ai-mask-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.ai-preview__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #9aa0a8;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.7);
}

.ai-preview__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.color-detail__preview-label {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.swatch {
  position: relative;
}

.swatch-info {
  position: absolute;
  bottom: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0px solid rgba(0, 0, 0, 0.25);
  background: rgb(255 255 255 / 0%);
  color: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 2;
  line-height: 1;
}

.swatch-info img {
  width: 16px;
  height: 16px;
  display: block;
}

.swatch-add {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 0px solid rgba(0, 0, 0, 0.25);
  background: rgb(255 255 255 / 0%);
  color: inherit;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  z-index: 2;
  line-height: 1;
}

.swatch-add svg {
  width: 16px;
  height: 16px;
  display: block;
}

.swatch-add .check-icon {
  display: none;
}

.swatch.is-added .swatch-add .add-icon {
  display: none;
}

.swatch.is-added .swatch-add .check-icon {
  display: block;
}

.swatch.is-dark .swatch-info,
.swatch.is-dark .swatch-add {
  border-color: rgba(255, 255, 255, 0.6);
  background: rgb(0 0 0 / 0%);
}

.swatch.is-dark .swatch-info img {
  filter: brightness(0) invert(1);
}

.slot-info {
  border: none;
  background: transparent;
  border-radius: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
}

.slot-info img {
  width: 15px;
  height: 15px;
  display: block;
}

.slot button.slot-remove {
  border: none;
  background: transparent;
  border-radius: 0;
  width: 18px;
  height: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: none;
  padding: 0;
}

.slot button.slot-remove img {
  width: 18px;
  height: 18px;
  display: block;
}

.is-hidden {
  display: none !important;
}

.menu-page {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 0 0 60px;
  width: 100%;
}

.menu-page__scenery {
  border: 1px solid rgba(17, 18, 22, 0.08);
  background: #fff;
  border-radius: 10px;
  padding: clamp(14px, 2vw, 22px);
  display: grid;
  gap: 14px;
  box-shadow: 0 12px 26px rgba(17, 18, 22, 0.08);
}

.menu-page__scenery-title {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #695026;
  font-weight: 700;
}

.menu-page__scenery-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.scenery-card {
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: #faf8f4;
  border-radius: 8px;
  padding: 18px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.scenery-card__title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.scenery-card__desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.scenery-card.is-active {
  border-color: rgba(179, 139, 75, 0.6);
  box-shadow: 0 12px 24px rgba(179, 139, 75, 0.2);
  background: #fffdf8;
}

.menu-page__tools[hidden] {
  display: none;
}

.view {
  display: grid;
  gap: 0px;
  padding: 20px 0 0px;
  min-height: 0;
}

#view-spaceType,
#view-scenePicker,
#view-toolPicker {
  overflow: auto;
}

/* Space type selection (premium layout) */
#view-spaceType {
  padding: 80px 0 140px;
  gap: clamp(10px, 2.2vw, 22px);
  background:
    radial-gradient(1200px 520px at 15% 0%, rgba(179, 139, 75, 0.10), rgba(179, 139, 75, 0) 62%),
    radial-gradient(900px 420px at 95% 15%, rgba(17, 18, 22, 0.06), rgba(17, 18, 22, 0) 58%),
    linear-gradient(180deg, #fbfaf8 0%, #f5f2ec 100%);
}

#view-spaceType>* {
  width: min(1120px, 100%);
  margin-inline: auto;
}

.menu-page__hero {
  position: relative;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  padding: clamp(40px, 8vw, 80px) 20px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.menu-page__hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 240px at 78% 30%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0) 55%);
  opacity: 0.9;
}

.menu-page__hero>* {
  position: relative;
  z-index: 1;
}

.menu-page__hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: rgba(17, 18, 22, 0.92);
}

.menu-page__hero p {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
  line-height: 1.5;
}

.view-header {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  padding: 24px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.view-header>div:last-child {
  min-width: 0;
}

.view-header__title {
  font-size: clamp(20px, 2.1vw, 28px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: #5d4520;
  line-height: 1.15;
}

.view-header__subtitle {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  max-width: 72ch;
}

#btnBackToScenePicker {
  padding: 8px 14px;
  border-radius: 0px;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  background: #fff;
  border: 1px solid rgba(17, 18, 22, 0.14);
  box-shadow: 0 4px 12px rgba(17, 18, 22, 0.08);
}

#btnBackToScenePicker:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 14px rgba(17, 18, 22, 0.1);
}

#view-toolPicker {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

#view-toolPicker .tool-picker-grid {
  min-height: 0;
  align-content: stretch;
  grid-auto-rows: minmax(0, 1fr);
}

.space-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
  width: 100%;
}

.space-type-card {
  border-radius: 12px;
  /* Bo góc lớn tạo cảm giác thân thiện */
  border: 1px solid var(--line);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  padding: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  aspect-ratio: auto;
  min-height: 320px;
  overflow: hidden;
  position: relative;
}

/* Hiệu ứng focus cho người dùng dùng phím */
.space-type-card:focus-within {
  box-shadow: 0 0 0 3px rgba(179, 139, 75, 0.3);
}

.space-type-card:focus-visible {
  outline: none;
  border-color: rgba(179, 139, 75, 0.72);
  box-shadow:
    0 0 0 4px rgba(179, 139, 75, 0.18),
    0 18px 44px rgba(17, 18, 22, 0.14);
  transform: translateY(-2px);
}

.space-type-card:hover {
  transform: translateY(-6px);
  border-color: rgba(179, 139, 75, 0.6);
  box-shadow:
    0 22px 52px rgba(17, 18, 22, 0.16),
    0 1px 0 rgba(17, 18, 22, 0.06);
}

.space-type-card.is-active {
  border-color: rgba(179, 139, 75, 0.85);
  box-shadow:
    0 0 0 4px rgba(179, 139, 75, 0.14),
    0 22px 52px rgba(17, 18, 22, 0.16);
}

.space-type-card.is-disabled {
  opacity: 0.72;
  cursor: not-allowed;
  background: #f6f4f0;
  border-style: dashed;
}

.space-type-card.is-disabled:hover {
  transform: none;
  border-color: rgba(17, 18, 22, 0.10);
  box-shadow:
    0 16px 38px rgba(17, 18, 22, 0.10),
    0 1px 0 rgba(17, 18, 22, 0.06);
}

.space-type-card.is-disabled::after {
  content: "Sắp có";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(17, 18, 22, 0.10);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(17, 18, 22, 0.10);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(17, 18, 22, 0.70);
  backdrop-filter: blur(8px);
}

.space-type-card__media {
  flex: 1;
  width: 100%;
  background: #f3efe8;
  border-radius: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: none;
  min-height: 200px;
}

.space-type-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid rgba(17, 18, 22, 0.12);
  display: grid;
  place-items: center;
  font-size: 14px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: #6a5532;
  background: #fff;
}

.space-type-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.001);
  transition: transform 0.35s ease;
}

.space-type-card:hover .space-type-card__media img {
  transform: scale(1.045);
}

.space-type-card__body {
  position: relative;
  width: 100%;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--ink);
}

.space-type-card__title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.space-type-card__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.5;
}

.scene-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.scene-picker-card {
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  text-align: left;
  cursor: pointer;
  display: grid;
  grid-template-rows: 160px 1fr;
  box-shadow: 0 10px 22px rgba(17, 18, 22, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.scene-picker-card:hover {
  transform: translateY(-3px);
  border-color: rgba(179, 139, 75, 0.6);
  box-shadow: 0 16px 30px rgba(17, 18, 22, 0.18);
}

.scene-picker-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scene-picker-card__body {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.scene-picker-card__title {
  font-size: 16px;
  font-weight: 700;
}

.scene-picker-card__desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

.tool-picker-grid {
  /* Inherits responsivess from menu-page__grid or handled via grid-template-columns above */
  gap: 20px;
}

.global-toast {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: rgba(17, 18, 22, 0.92);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 120;
}

.global-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-6px);
}

.menu-page__eyebrow {
  margin: 0;
  color: #786948;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 600;
}

.menu-page__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.menu-page,
.menu-page * {
  user-select: none;
  -webkit-user-select: none;
  font-family: "Montserrat", "Segoe UI", sans-serif;
}

.menu-page img {
  -webkit-user-drag: none;
  /* user-drag removed: unsupported CSS property - replaced with a comment */
}

.menu-card {
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--blur));
  -webkit-backdrop-filter: blur(var(--blur));
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
}

.menu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(179, 139, 75, 0.5);
  box-shadow: 0 16px 30px rgba(17, 18, 22, 0.15);
}

.menu-card__media {
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f5f5f5;
  /* Light neutral background */
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  /* Padding to make image appear smaller/contained */
}

.menu-card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Ensure full image is visible */
  display: block;
  transition: transform 0.3s ease;
}

.menu-card:hover .menu-card__media img {
  transform: scale(1.05);
}

.menu-card__body p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.menu-card__title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
}

.page-toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-start;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-bottom: 2px solid var(--gold);
  /* Nhấn mạnh bằng đường line gold */
  padding: clamp(14px, 2vw, 20px);
  border-radius: 4px;
  /* Updated to match new button radius */
  margin-bottom: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.page-toolbar[aria-hidden="true"] {
  display: none;
}

.page-toolbar__title {
  font-size: 22px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
  color: #695026;
}

.route-tool-only,
.route-classic-only,
.route-custom-only,
.route-preview-only {
  display: none;
}

body.route-tool .route-tool-only,
body.route-classic .route-classic-only,
body.route-custom .route-custom-only,
body.route-tool .route-preview-only,
body.route-classic .route-preview-only,
body.route-custom .route-preview-only {
  display: grid;
}

body.route-tool #exteriorComboPanel,
body.route-tool #customComboPanel,
body.route-classic #customComboPanel,
body.route-classic .route-tool-only,
body.route-custom #exteriorComboPanel,
body.route-custom .route-tool-only {
  display: none !important;
}

.note-block {
  border: 1px solid var(--line);
  background: #f7f5f1;
  border-radius: 0;
  padding: 12px;
  gap: 8px;
}

.note-block h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.note-block p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.note-block a {
  color: #8b6631;
  font-weight: 600;
}

.quick-actions {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: 10px;
  background: #fff;
}

.quick-actions .btn {
  padding: 9px 12px;
}

.surface-actions #btnMoreScenes,
.surface-actions>.swdc-switch {
  display: none;
}

.palette,
.swatch,
.slot,
.slot * {
  user-select: none;
  -webkit-user-select: none;
}

.palette .swatch {
  position: relative;
  min-height: 110px;
}

.combo-custom__field input {
  flex: 1 1 auto;
  max-width: 180px;
  min-width: 110px;
  padding: 7px 10px;
  font-size: 12px;
}

.combo-custom__expand {
  width: 30px;
  height: 30px;
  padding: 0;
  font-size: 16px;
  line-height: 1;
}

.combo-custom__pick {
  min-width: 64px;
  font-size: 11px;
  letter-spacing: 0.12em;
}

/* Scene Picker Header Refactor */
.scene-gallery__header {
  padding: 20px 0;
  width: 100%;
}

.scene-gallery__header-inner {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  /* Space between button and text */
}

.scene-gallery__text-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 4px;
  /* Align text visually with button */
}

.scene-gallery__eyebrow {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.scene-gallery__title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}

.scene-gallery__intro {
  font-size: 14px;
  color: var(--muted);
}

.combo-custom__dropdown {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 0;
  max-height: 190px;
  overflow: auto;
  display: grid;
  gap: 0;
}

.combo-custom__dropdown-item {
  border: 0;
  border-bottom: 1px solid rgba(17, 18, 22, 0.06);
  background: #fff;
  text-align: left;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  font-size: 12px;
}

.combo-custom__dropdown-item:hover {
  background: #f8f4ec;
}

.combo-custom__dropdown-chip {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(17, 18, 22, 0.12);
}

body.route-custom #customComboPanel {
  box-shadow: var(--shadow);
  background: #faf8f4;
  border: 1px solid rgba(166, 123, 57, 0.2);
}

body.route-custom #customComboPanel .combo-panel__title {
  font-size: 26px;
  letter-spacing: 0.14em;
  color: #6f5a37;
}

body.route-custom #customComboPanel .combo-panel__hint {
  font-size: 11px;
  color: #8a7a61;
}

body.route-custom #customComboPanel .combo-panel__header {
  gap: 2px;
  margin-bottom: 2px;
}

body.route-custom #customComboPanel .combo-custom__row {
  border: 1px solid rgba(17, 18, 22, 0.08);
  background: #fff;
  padding: 10px;
  gap: 10px;
}

body.route-custom #customComboPanel .combo-custom__label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  color: #8a7a61;
}

body.route-custom #customComboPanel .combo-custom__field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px auto;
  gap: 10px;
  align-items: center;
}

body.route-custom #customComboPanel .combo-custom__field input {
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid rgba(17, 18, 22, 0.16);
  background: #fff;
  font-size: 13px;
}

body.route-custom #customComboPanel .combo-custom__swatch {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(17, 18, 22, 0.18);
  background: #f4f3f0;
}

body.route-custom #customComboPanel .combo-custom__expand {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: #fff;
  display: grid;
  place-items: center;
}

body.route-custom #customComboPanel .combo-custom__pick {
  min-width: 90px;
  height: 34px;
  border: 1px solid rgba(166, 123, 57, 0.45);
  color: #8b6631;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #fff;
}

body.route-custom #customComboPanel .combo-custom__dropdown {
  max-height: 320px;
  border-radius: 0;
  overflow: auto;
}

body.route-custom #customComboPanel .combo-custom__dropdown-item {
  padding: 10px 12px;
  font-size: 12px;
}

.combo-picker__targets-actions #customComboApply {
  width: 100%;
  padding: 12px 16px;
  border-radius: 0;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.combo-picker__item {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: center;
}

.combo-picker__grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.combo-picker__item-actions {
  display: inline-flex;
  gap: 6px;
}

.combo-picker__item-btn {
  padding: 6px 8px;
  font-size: 10px;
  letter-spacing: 0.08em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.combo-picker__item-btn img {
  width: 12px;
  height: 12px;
  display: block;
}

.slot-limit-modal {
  position: absolute;
  inset: 0;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: center;
}

.slot-limit-modal.is-open {
  display: flex;
}

.slot-limit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 12, 16, 0.5);
}

.slot-limit-modal__panel {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 24px));
  background: #fff;
  border-radius: 0;
  padding: 18px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}

.slot-limit-modal__panel h3 {
  margin: 0;
  font-size: 18px;
}

.slot-limit-modal__panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.slot-limit-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.color-detail__suggest {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid rgba(17, 18, 22, 0.08);
  padding: 8px;
  height: 100%;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  align-content: start;
}

.color-detail__suggest-item {
  border: 1px solid rgba(17, 18, 22, 0.12);
  background: var(--swatch, #ece7dc);
  display: flex;
  align-items: flex-end;
  text-align: left;
  padding: 10px;
  min-height: 92px;
  font-size: 12px;
  cursor: pointer;
  color: var(--ink);
  border-radius: 0;
  position: relative;
  overflow: hidden;
}

.color-detail__suggest-item:hover {
  border-color: rgba(166, 123, 57, 0.45);
  transform: translateY(-1px);
}

.color-detail__suggest-item::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.color-detail__suggest-item.is-dark::before {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.52) 100%);
}

.color-detail__suggest-item.is-light::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.56) 100%);
}

.color-detail__suggest-chip {
  display: none;
}

.color-detail__suggest-content {
  width: 100%;
  min-width: 0;
  display: grid;
  gap: 2px;
  position: relative;
  z-index: 1;
}

.color-detail__suggest-name {
  font-size: 12px;
  line-height: 1.25;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-detail__suggest-meta {
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.color-detail__suggest-item.is-dark .color-detail__suggest-name,
.color-detail__suggest-item.is-dark .color-detail__suggest-meta {
  color: rgba(255, 255, 255, 0.96);
}

.color-detail__suggest-item.is-light .color-detail__suggest-name {
  color: rgba(17, 18, 22, 0.96);
}

.color-detail__suggest-item.is-light .color-detail__suggest-meta {
  color: rgba(17, 18, 22, 0.78);
}

.color-detail__suggest-empty {
  padding: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  grid-column: 1 / -1;
}

@media (max-width: 980px) {
  .scene-body {
    grid-template-columns: 1fr;
  }

  .menu-page__grid {
    grid-template-columns: 1fr;
  }

  .space-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scene-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  }

  .menu-page__scenery-options {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .site-header {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .header-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .tabs {
    order: 3;
  }

  .brand {
    order: 1;
  }

  .color-detail__body {
    grid-template-columns: 1fr;
  }

  .color-detail__thumbs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .color-detail__room {
    min-width: 0;
    height: 108px;
  }

  .color-detail__panel {
    width: min(100% - 24px, 100%);
    max-height: 94%;
  }

  .ai-detect__panel {
    width: min(100% - 24px, 100%);
    max-height: 94%;
  }

  .ai-detect__body {
    grid-template-columns: 1fr;
  }

  .ai-detect__actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .match-tool {
    grid-template-columns: 1fr;
  }

  .explore-hero {
    grid-template-columns: 1fr;
  }

  .combo-picker__targets-grid {
    grid-template-columns: 1fr;
  }

  .combo-preview-card {
    grid-template-columns: 1fr;
  }

  .combo-preview-card__image {
    height: 120px;
  }
}

@media (max-width: 640px) {
  .space-type-grid {
    grid-template-columns: 1fr;
  }
}

/* --- RESPONSIVE DESIGN SYSTEM --- */

@media (max-width: 1200px) {
  :root {
    --palette-scroll-height: 40vh;
  }

  main {
    padding: 20px 30px;
  }
}

@media (max-width: 992px) {
  .scene-body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
  }

  .scene-side {
    max-height: 400px;
    /* Limit height of controls on mobile to avoid endless scrolling */
    overflow-y: auto;
  }

  .canvas-wrap {
    min-height: 50vh;
  }

  .menu-page__grid,
  .space-type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --radius-lg: 16px;
  }

  main {
    padding: 16px;
    gap: 20px;
  }

  /* Header / Navigation */
  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .view-header__title {
    font-size: 20px;
  }

  /* Cards */
  .space-type-card {
    min-height: 240px;
  }

  .space-type-card__title {
    font-size: 20px;
  }

  .menu-page__hero {
    padding: 40px 16px;
  }

  .menu-page__hero h1 {
    font-size: 28px;
  }

  /* Grids */
  .menu-page__grid,
  .space-type-grid {
    grid-template-columns: 1fr;
  }

  /* Tools */
  .palette-controls {
    grid-template-columns: 1fr;
  }

  .my-colors-body {
    grid-template-rows: auto;
  }

  .combo-strip {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .space-type-card {
    min-height: 280px;
    /* Taller on very small screens to fit content */
  }

  .menu-page__hero h1 {
    font-size: 24px;
  }
}

/* --- Vertical Combo Layout --- */
.combo-strip {
  /* Override horizontal scroll */
  display: flex !important;
  flex-direction: column !important;
  gap: 16px !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  height: 380px !important;
  /* Fits approx 2 items (180px each) + gap */
  scroll-snap-type: y mandatory !important;
  padding: 4px !important;
  padding-right: 8px !important;
}

/* Custom Scrollbar for the strip */
.combo-strip::-webkit-scrollbar {
  width: 4px;
}

.combo-strip::-webkit-scrollbar-thumb {
  background: rgba(17, 18, 22, 0.2);
  border-radius: 4px;
}

.combo-square {
  position: relative;
  width: 100%;
  /* Full width */
  height: 180px;
  /* Shorter than square, but tall enough for text */
  background: #fff;
  border-radius: 0px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  flex: 0 0 180px;
  /* Fixed height for scroll snapping */
  display: flex;
  flex-direction: column;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.08);
  scroll-snap-align: start;
}

.combo-square:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  border-color: rgba(179, 139, 75, 0.4);
}

.combo-square.is-active {
  box-shadow: 0 0 0 2px var(--gold), 0 12px 24px rgba(179, 139, 75, 0.15);
}

.combo-square__body {
  flex: 1;
  position: relative;
  display: flex;
  /* Reduced skew for wide layout */
  transform: skewX(-10deg);
  width: 120%;
  margin-left: -10%;
  overflow: hidden;
}

.combo-slice {
  flex: 1;
  height: 100%;
  position: relative;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: flex 0.3s ease;
}

.combo-slice:last-child {
  border-right: none;
}

.combo-square__body:hover .combo-slice {
  /* On hover, let slices expand slightly? Or just keep uniform */
}

/* Un-skew content inside */
.combo-slice__info {
  transform: skewX(10deg);
  text-align: center;
  color: #fff;
  opacity: 0.95;
  padding: 8px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Center vertically is safest here */
  gap: 2px;
  width: 100%;
}

/* Diagonal Text Positioning - Subtler now */
.combo-slice--start .combo-slice__info {
  /* padding-bottom: 20px; */
}

.combo-slice--end .combo-slice__info {
  /* padding-top: 20px; */
}

.combo-slice:hover .combo-slice__info {
  opacity: 1;
  transform: skewX(10deg) scale(1.05);
}

.combo-slice__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.9;
  margin-bottom: 4px;
}

.combo-slice__code {
  font-size: 20px;
  /* Big code */
  font-weight: 800;
  display: block;
  line-height: 1.1;
  margin-bottom: 2px;
}

.combo-slice__name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  max-width: 140px;
  /* Allow wider text */
}

.combo-square__apply {
  height: 40px;
  background: #111216;
  color: #fff;
  border: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease;
  z-index: 2;
  position: relative;
}

.combo-square.is-active .combo-square__apply {
  background: var(--gold);
}

.combo-square__apply:hover {
  background: var(--gold);
}

.combo-square.is-active .combo-square__apply {
  background: var(--gold);
  color: #fff;
}

.combo-square__apply:hover {
  background: var(--gold);
}

/* --- Polished Combo Button Styles --- */
.combo-btn {
  /* Layout & Box Model */
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  width: 100%;
  min-width: 280px;

  /* Appearance */
  background: #fff;
  border: 1px solid rgba(17, 18, 22, 0.08);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);

  /* Text */
  text-align: left;
  color: var(--ink);

  /* Interaction */
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.combo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(17, 18, 22, 0.08);
  border-color: rgba(179, 139, 75, 0.4);
}

.combo-btn.is-active {
  background: #fffaf4;
  /* Subtle gold tint */
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 8px 16px rgba(179, 139, 75, 0.12);
}

/* Swatches Section */
.combo-btn__swatches {
  display: flex;
  gap: 4px;
  /* Tighter gap for modern look */
}

.combo-btn__swatch {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  /* Soft square */
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.combo-btn__swatch-code {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: rgba(0, 0, 0, 0.7);
}

.combo-btn__swatch.is-dark .combo-btn__swatch-code {
  color: rgba(255, 255, 255, 0.9);
}

/* Info Lines Section */
.combo-btn__lines {
  display: flex;
  flex-direction: column;
  gap: 3px;
  justify-content: center;
}

.combo-btn__line {
  font-size: 13px;
  line-height: 1.3;
  display: flex;
  gap: 6px;
  align-items: baseline;
}

.combo-label {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  width: 32px;
  /* Fixed width for alignment */
  flex-shrink: 0;
}

.combo-value {
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Apply Button (Hidden by default, shown on hover-intent or active) */
.combo-btn__apply {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--gold);
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.combo-btn:hover .combo-btn__apply,
.combo-btn.is-active .combo-btn__apply {
  opacity: 1;
  transform: translateX(0);
}

.combo-btn.is-active .combo-btn__apply {
  color: var(--ink);
  /* Dark text on active */
}