:root {
  --paper: #fffefb;
  --paper-deep: #faf7f2;
  --surface: rgba(255, 255, 255, 0.9);
  --line: rgba(88, 63, 46, 0.18);
  --line-soft: rgba(88, 63, 46, 0.08);
  --ink: #2f221b;
  --text: #655143;
  --muted: #907d6d;
  --head-step: rgba(246, 238, 181, 0.66);
  --heart-step: rgba(243, 207, 188, 0.68);
  --base-step: rgba(226, 218, 230, 0.74);
  --bianca: #e6d8ca;
  --amber: #c89a70;
  --raw: #816154;
  --skin: #dfc1a8;
  --radius-sm: 8px;
  --radius-md: 12px;
  --shadow-soft:
    0 28px 80px rgba(75, 53, 37, 0.08),
    0 10px 24px rgba(75, 53, 37, 0.04);
  --control-shadow:
    0 10px 22px rgba(75, 53, 37, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  --max-width: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.98), transparent 42%),
    radial-gradient(circle at 50% 12%, rgba(246, 240, 233, 0.28), transparent 52%),
    linear-gradient(180deg, #fffdfa 0%, #ffffff 38%, #fffefc 100%);
  color: var(--text);
  font-family: "Manrope", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

.sheet-app {
  width: min(calc(100% - 48px), var(--max-width));
  margin: 0 auto;
  padding: 10px 0 40px;
}

.brand-strip {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.72);
}

.brand-logo {
  width: 72px;
  height: 72px;
  margin-top: -2px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(76, 55, 41, 0.08));
}

.brand-copy p,
.library-copy p,
.search-box span,
.sheet-bottle-copy small {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.meta-field span {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.brand-copy h1,
.library-copy h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.35rem, 2.9vw, 3.2rem);
  line-height: 0.9;
  font-weight: 600;
}

.brand-copy {
  min-width: 0;
}

.brand-title-row {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.brand-subcopy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: clamp(2.35rem, 2.9vw, 3.2rem);
  padding-top: 6px;
}

.brand-subcopy span {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.05;
  white-space: nowrap;
}

.sheet-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 250px)) minmax(0, 1fr);
  gap: 6px 22px;
  align-items: end;
  padding: 8px 0 4px;
}

.sheet-actions {
  display: grid;
  grid-template-columns: repeat(4, max-content);
  column-gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-start;
  align-items: center;
  padding-top: 2px;
}

.meta-field,
.search-box {
  display: grid;
  gap: 4px;
}

.meta-field input,
.search-box input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 0 0 4px;
  min-height: 22px;
  font-size: 0.96rem;
  outline: 0;
}

.meta-field input:focus,
.search-box input:focus {
  border-bottom-color: rgba(62, 43, 31, 0.56);
}

.download-button,
.ghost-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  min-height: 34px;
  padding: 0 13px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--control-shadow);
  white-space: nowrap;
}

.download-button:disabled,
.ghost-button:disabled {
  opacity: 0.48;
  cursor: default;
}

.ghost-button.is-active {
  border-color: rgba(74, 56, 44, 0.32);
  background: rgba(255, 252, 247, 0.96);
  box-shadow: 0 12px 28px rgba(75, 53, 37, 0.08);
}

.saved-sheets {
  display: block;
  padding: 0 0 10px;
}

.composition-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 12px;
}

.customer-library,
.layers-panel,
.zone-editor {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 28px rgba(75, 53, 37, 0.04);
  padding: 14px 16px;
}

.customer-library {
  order: 1;
}

.zone-editor {
  order: 2;
  margin-top: 0;
}

.layers-panel {
  order: 2;
}

.zone-editor {
  order: 3;
}

.layers-panel {
  padding: 10px 14px;
}

.layers-panel .panel-intro {
  align-items: center;
  gap: 10px;
}

.layers-panel .panel-copy p {
  font-size: 0.6rem;
}

.layers-panel .panel-copy h2 {
  font-size: 1.18rem;
  line-height: 0.92;
}

.layers-panel .panel-count {
  font-size: 0.58rem;
}

.layers-panel .panel-header-action {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.66rem;
}

.panel-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
}

.panel-copy {
  min-width: 0;
}

.panel-copy p,
.panel-copy span {
  margin: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.panel-copy h2 {
  margin: 4px 0 0;
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.52rem;
  line-height: 0.94;
  font-weight: 600;
}

.panel-count {
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.panel-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-header-action {
  min-height: 28px;
  padding: 0 11px;
  font-size: 0.72rem;
}

.layers-stack {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 8px;
}

.layer-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.82);
  min-height: 42px;
  padding: 7px 10px;
  box-shadow: 0 6px 14px rgba(75, 53, 37, 0.025);
}

.layer-chip-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.layer-chip strong,
.layer-chip-main strong {
  color: var(--ink);
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 700;
  white-space: nowrap;
}

.layer-chip span,
.layer-chip-main span {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.layer-chip.is-active {
  border-color: rgba(67, 50, 39, 0.26);
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 8px 18px rgba(75, 53, 37, 0.05);
}

.layer-chip-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  padding-top: 0;
}

.panel-mini-action {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  cursor: pointer;
  font-size: 0.56rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease, opacity 160ms ease;
}

.layers-panel .panel-mini-action {
  min-height: 20px;
  padding: 0 7px;
  font-size: 0.5rem;
}

.panel-mini-action:hover:not(:disabled) {
  border-color: rgba(67, 50, 39, 0.22);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.panel-mini-action:disabled,
.panel-mini-action.is-disabled {
  opacity: 0.42;
  cursor: default;
}

.panel-mini-action-danger:hover:not(:disabled) {
  border-color: rgba(124, 82, 67, 0.28);
}

.library-owned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 220px));
  justify-content: flex-start;
  gap: 14px;
  overflow: visible;
  padding-top: 12px;
}

.owned-card,
.owned-empty {
  min-height: 110px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(75, 53, 37, 0.04);
}

.owned-card {
  display: grid;
  width: 220px;
  max-width: 220px;
  position: relative;
  align-content: start;
  gap: 10px;
  padding: 14px;
  text-align: left;
  overflow: visible;
}

.owned-card-select {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  align-items: start;
  column-gap: 12px;
  width: 100%;
  padding: 8px 0 0;
  border: 0;
  background: transparent;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: none;
  outline: none;
  color: inherit;
  text-align: left;
  cursor: grab;
}

.owned-card-select:active {
  cursor: grabbing;
}

.owned-card.is-pending {
  border-color: rgba(59, 42, 31, 0.5);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 28px rgba(75, 53, 37, 0.06);
}

.owned-card.is-level-open {
  z-index: 6;
}

.owned-card.is-active-product {
  border-color: rgba(88, 63, 46, 0.32);
  background: rgba(255, 255, 255, 0.98);
  box-shadow:
    0 14px 28px rgba(75, 53, 37, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.owned-card strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.08;
  font-weight: 700;
  text-wrap: balance;
}

.owned-card-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-content: start;
}

.owned-card-hint {
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.owned-card-levels-trigger {
  display: grid;
  gap: 4px;
  align-content: start;
  justify-items: start;
  width: 100%;
  margin-left: 0;
  margin-top: 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.owned-card-levels-trigger:hover {
  opacity: 0.92;
}

.owned-card-levels-trigger[aria-expanded="true"] {
  opacity: 1;
}

.owned-card-levels-label {
  color: var(--muted);
  font-size: 0.5rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}

.owned-card-levels-summary {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  width: 100%;
  color: var(--ink);
  font-size: 0.72rem;
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow: hidden;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.owned-card-level-token {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 20px;
  padding: 0 9px 0 7px;
  border: 1px solid rgba(88, 63, 46, 0.09);
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 2px 5px rgba(75, 53, 37, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
  white-space: nowrap;
}

.owned-card-level-token--high {
  background: rgba(246, 237, 178, 0.92);
}

.owned-card-level-token--middle {
  background: rgba(245, 213, 196, 0.92);
}

.owned-card-level-token--low {
  background: rgba(227, 220, 233, 0.94);
}

.owned-card-level-token--empty {
  color: var(--muted);
  font-weight: 600;
  background: rgba(255, 255, 255, 0.82);
}

.owned-card-placed {
  display: grid;
  gap: 6px;
  width: calc(100% - 62px);
  margin-left: 62px;
}

.owned-card-placed-label {
  color: var(--muted);
  font-size: 0.54rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.owned-card-placed-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.owned-card-placed-chip {
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--muted);
  box-shadow:
    0 2px 5px rgba(75, 53, 37, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 0.6rem;
  line-height: 1.2;
  letter-spacing: 0.03em;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.owned-card-placed-chip.is-active {
  border-color: rgba(88, 63, 46, 0.24);
  background: rgba(255, 252, 246, 0.98);
  color: var(--ink);
  box-shadow:
    0 6px 14px rgba(75, 53, 37, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.product-level-badges-library-current {
  align-self: flex-start;
  gap: 5px;
  margin-top: 0;
}

.product-level-badge-library-current {
  min-height: 24px;
  padding: 0 9px;
  border-width: 1px;
  font-size: 0.54rem;
  letter-spacing: 0.13em;
  box-shadow:
    0 2px 5px rgba(75, 53, 37, 0.03),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.library-level-popover {
  position: absolute;
  left: 64px;
  top: calc(100% - 2px);
  z-index: 12;
  display: grid;
  gap: 10px;
  width: 248px;
  max-width: min(248px, calc(100vw - 48px));
  padding: 14px;
  border: 1px solid rgba(116, 96, 78, 0.14);
  border-radius: 18px;
  background: rgba(252, 248, 244, 0.98);
  box-shadow: 0 18px 40px rgba(72, 52, 34, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.library-level-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 28px;
  width: 14px;
  height: 14px;
  background: rgba(252, 248, 244, 0.98);
  border-top: 1px solid rgba(116, 96, 78, 0.14);
  border-left: 1px solid rgba(116, 96, 78, 0.14);
  transform: rotate(45deg);
}

.library-level-popover-title {
  margin: 0;
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.library-level-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.library-level-chip {
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  min-height: 42px;
  padding: 0 10px;
  border-radius: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  cursor: pointer;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
  text-align: center;
}

.library-level-chip--high {
  border-color: rgba(198, 177, 82, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 252, 238, 0.96), rgba(247, 239, 190, 0.9)),
    linear-gradient(90deg, rgba(250, 242, 196, 0.52), rgba(250, 242, 196, 0.18));
  color: rgba(96, 77, 36, 0.84);
}

.library-level-chip--middle {
  border-color: rgba(196, 140, 108, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.96), rgba(245, 219, 205, 0.9)),
    linear-gradient(90deg, rgba(246, 216, 199, 0.52), rgba(246, 216, 199, 0.18));
  color: rgba(104, 63, 44, 0.84);
}

.library-level-chip--low {
  border-color: rgba(161, 148, 191, 0.18);
  background:
    linear-gradient(180deg, rgba(252, 249, 253, 0.96), rgba(229, 223, 234, 0.92)),
    linear-gradient(90deg, rgba(231, 223, 237, 0.54), rgba(231, 223, 237, 0.2));
  color: rgba(79, 66, 101, 0.84);
}

.library-level-chip.is-active {
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(75, 53, 37, 0.08);
}

.library-level-chip--high.is-active {
  border-color: rgba(190, 165, 62, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 251, 232, 0.98), rgba(246, 235, 170, 0.94)),
    linear-gradient(90deg, rgba(248, 238, 177, 0.58), rgba(248, 238, 177, 0.28));
}

.library-level-chip--middle.is-active {
  border-color: rgba(192, 126, 92, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 249, 245, 0.98), rgba(244, 212, 194, 0.94)),
    linear-gradient(90deg, rgba(244, 210, 192, 0.58), rgba(244, 210, 192, 0.28));
}

.library-level-chip--low.is-active {
  border-color: rgba(149, 132, 186, 0.28);
  background:
    linear-gradient(180deg, rgba(252, 249, 253, 0.98), rgba(228, 220, 232, 0.95)),
    linear-gradient(90deg, rgba(226, 218, 230, 0.6), rgba(226, 218, 230, 0.3));
}

.owned-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  min-height: 16px;
  padding: 0 6px;
  font-size: 0.46rem;
  letter-spacing: 0.1em;
}

.library-owned-bottle {
  width: 46px;
  height: 68px;
  border-radius: 12px 12px 9px 9px;
}

.owned-empty {
  display: grid;
  place-items: center;
  padding: 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.saved-sheets-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.saved-sheets-head p,
.saved-sheets-head span,
.saved-sheets-utility p,
.saved-sheets-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.saved-sheets-utility {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 24px;
}

.saved-sheets-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.saved-sheet-pill {
  display: grid;
  gap: 2px;
  min-width: 116px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.62);
  padding: 7px 10px;
  color: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(75, 53, 37, 0.02);
}

.saved-sheet-pill strong {
  color: var(--ink);
  font-size: 0.76rem;
  line-height: 1.2;
  font-weight: 600;
}

.saved-sheet-pill span {
  color: var(--muted);
  font-size: 0.56rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.saved-sheet-pill.is-active {
  border-color: rgba(67, 50, 39, 0.28);
  background: rgba(255, 252, 246, 0.96);
  box-shadow: 0 12px 24px rgba(75, 53, 37, 0.06);
}

.sheet-document {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(253, 250, 246, 0.95)),
    var(--paper);
  box-shadow: var(--shadow-soft);
  overscroll-behavior: contain;
  touch-action: pan-x;
  position: relative;
}

.sheet-document.is-paper-locked {
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.sheet-document::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), transparent 18%),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.5), transparent 48%);
  opacity: 0.85;
}

.sheet-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(914px, 1fr);
  min-width: 914px;
  min-height: 760px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0)),
    linear-gradient(
      to bottom,
      transparent calc(33.333% - 0.5px),
      var(--line) calc(33.333% - 0.5px),
      var(--line) calc(33.333% + 0.5px),
      transparent calc(33.333% + 0.5px),
      transparent calc(66.666% - 0.5px),
      var(--line) calc(66.666% - 0.5px),
      var(--line) calc(66.666% + 0.5px),
      transparent calc(66.666% + 0.5px)
    );
}

.document-stage {
  position: relative;
  min-height: 760px;
  overflow: hidden;
}

.stage-steps {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.stage-step {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
  padding-left: 30px;
  border-radius: 0 20px 20px 0;
  border: 1px solid rgba(120, 98, 78, 0.05);
  box-shadow:
    0 10px 24px rgba(75, 53, 37, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.82);
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 78%, rgba(0, 0, 0, 0.72) 88%, rgba(0, 0, 0, 0.18) 96%, transparent 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 1) 78%, rgba(0, 0, 0, 0.72) 88%, rgba(0, 0, 0, 0.18) 96%, transparent 100%);
}

.stage-step span {
  color: rgba(47, 34, 27, 0.92);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.5rem, 3.8vw, 3.95rem);
  line-height: 0.92;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stage-step-head {
  top: 4.1%;
  width: 32%;
  height: 23.2%;
  background:
    linear-gradient(180deg, rgba(255, 253, 241, 0.98), rgba(247, 238, 186, 0.88)),
    linear-gradient(90deg, rgba(255, 250, 223, 0.9), rgba(255, 247, 207, 0.62) 82%, rgba(255, 247, 207, 0.38) 100%);
}

.stage-step-heart {
  top: 31.5%;
  width: 46.5%;
  height: 28.5%;
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.98), rgba(244, 210, 192, 0.87)),
    linear-gradient(90deg, rgba(249, 230, 220, 0.9), rgba(245, 220, 206, 0.64) 84%, rgba(245, 220, 206, 0.38) 100%);
}

.stage-step-base {
  top: 63.1%;
  width: 60.5%;
  height: 28.9%;
  background:
    linear-gradient(180deg, rgba(251, 247, 252, 0.98), rgba(228, 220, 232, 0.88)),
    linear-gradient(90deg, rgba(236, 230, 240, 0.9), rgba(231, 225, 236, 0.66) 84%, rgba(231, 225, 236, 0.4) 100%);
}

.placement-target {
  position: absolute;
  left: 0;
  right: 0;
  border: 0;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: background-color 160ms ease;
}

.placement-target-high {
  top: 0;
  height: 33.333%;
}

.placement-target-middle {
  top: 33.333%;
  height: 33.333%;
}

.placement-target-low {
  top: 66.666%;
  height: 33.334%;
}

.document-stage.is-actionable .placement-target {
  opacity: 1;
  pointer-events: auto;
}

.document-stage.is-dragging-catalog .placement-target {
  opacity: 1;
  pointer-events: auto;
  background: rgba(103, 82, 66, 0.03);
}

.document-stage.is-bottle-dragging .placement-target {
  opacity: 0;
  pointer-events: none;
}

.document-stage.is-actionable .placement-target:hover {
  background: rgba(103, 82, 66, 0.04);
}

.placement-target.is-level-allowed {
  background: rgba(103, 82, 66, 0.035);
}

.document-stage.is-actionable .placement-target.is-level-allowed:hover,
.placement-target.is-drop-target {
  background: rgba(103, 82, 66, 0.08) !important;
}

.placement-target.is-level-blocked {
  background: rgba(103, 82, 66, 0.01);
}

.placement-target.is-level-blocked:hover {
  background: rgba(103, 82, 66, 0.01) !important;
}

.level-row {
  position: absolute;
  left: 0;
  right: 0;
  height: 33.333%;
  pointer-events: none;
}

.level-row-high {
  top: 0;
}

.level-row-middle {
  top: 33.333%;
}

.level-row-low {
  top: 66.666%;
}

.level-row.is-selected-level::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(126, 100, 82, 0.04);
  pointer-events: none;
}

.level-row.is-allowed-level::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(126, 100, 82, 0.14);
  pointer-events: none;
}

.level-row.is-blocked-level::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.slot {
  position: absolute;
  display: grid;
  gap: 16px;
  width: min(172px, 17.2%);
  pointer-events: auto;
}

.slot-left {
  left: 24%;
  top: 50.5%;
  transform: translate(-50%, -50%);
}

.slot-right-top {
  left: 70.3%;
  top: 17.4%;
  transform: translate(-50%, -50%);
}

.slot-right-bottom {
  left: 70.3%;
  top: 51.5%;
  transform: translate(-50%, -50%);
}

.body-map,
.zone-layer {
  position: absolute;
  left: 47.5%;
  top: -116px;
  height: calc(100% - 10px);
  width: auto;
  aspect-ratio: 160 / 1170;
  transform: translateX(-50%) scale(1.2);
  transform-origin: center top;
}

.body-map {
  z-index: 1;
  pointer-events: none;
}

.body-sketch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  animation: none;
  transition: none;
  mix-blend-mode: multiply;
  opacity: 0.98;
  filter: contrast(1.04) saturate(0.86);
}

.bottle-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.zone-layer {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 4;
}

.zone-layer.is-active {
  opacity: 1;
  pointer-events: auto;
}

.zone-hit {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0;
  background: transparent;
  padding: 0;
  transform: translate(calc(-50% + var(--zone-offset-x, 0px)), calc(-50% + var(--zone-offset-y, 0px)));
  pointer-events: auto;
  cursor: pointer;
  z-index: 1;
}

.zone-cluster {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  padding: 0;
  transform: translate(calc(-5px + var(--zone-offset-x, 0px)), calc(-50% + var(--zone-offset-y, 0px)));
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: none;
  z-index: 3;
  isolation: isolate;
}

.zone-cluster.is-dragging {
  cursor: grabbing;
}

.zone-cluster-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(63, 46, 35, 0.54);
  background: rgba(63, 46, 35, 0.92);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
}

.zone-cluster-label {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 5px 2px;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.96);
  box-shadow:
    0 3px 10px rgba(75, 53, 37, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.64rem;
  line-height: 1.2;
  white-space: nowrap;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-style: dashed;
  text-underline-offset: 0.18em;
}

.sheet-bottle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px;
  align-items: start;
  gap: 8px;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.sheet-bottle-free {
  position: absolute;
  width: min(178px, 19%);
  min-width: 144px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(88, 63, 46, 0.12);
  background: rgba(255, 255, 255, 0.52);
  padding: 8px 10px;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(75, 53, 37, 0.05);
  backdrop-filter: blur(10px);
  pointer-events: auto;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.sheet-bottle-free.is-selected {
  border-color: rgba(67, 50, 39, 0.24);
  background: rgba(255, 252, 247, 0.88);
  box-shadow: 0 18px 34px rgba(75, 53, 37, 0.08);
}

.sheet-bottle-free.is-dragging {
  cursor: grabbing;
  box-shadow: 0 22px 40px rgba(75, 53, 37, 0.1);
}

.sheet-bottle-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sheet-bottle-free .sheet-bottle-main {
  align-items: flex-start;
}

.sheet-bottle-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.sheet-bottle-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.08;
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.sheet-bottle-copy small {
  display: inline-flex;
  align-items: center;
  margin-top: 0;
  font-size: 0.52rem;
}

.sheet-bottle-zones-summary {
  display: grid;
  gap: 3px;
  margin-top: 5px;
  color: var(--text);
  font-size: 0.58rem;
  line-height: 1.28;
}

.sheet-bottle-zones-summary.is-empty {
  color: var(--muted);
}

.sheet-bottle-zones-label {
  color: var(--muted);
  font-size: 0.48rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.sheet-bottle-zones-list {
  display: grid;
  gap: 2px;
}

.sheet-bottle-zone-item,
.sheet-bottle-zone-more {
  display: block;
}

.sheet-bottle-zone-more {
  color: var(--muted);
}

.sheet-bottle-check {
  width: 13px;
  height: 13px;
  margin-top: 12px;
  border: 1px solid rgba(74, 56, 44, 0.48);
  background: rgba(255, 252, 247, 0.96);
}

.sheet-bottle.is-selected .sheet-bottle-check {
  background: rgba(46, 33, 25, 0.9);
  box-shadow: inset 0 0 0 2px rgba(255, 252, 247, 0.65);
}

.sheet-bottle.is-selected .sheet-bottle-copy strong {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.mini-bottle,
.product-bottle,
.library-owned-bottle,
.zone-planner-type-bottle,
.zone-planner-current-bottle,
.zone-editor-bottle,
.zone-bottle {
  --collection-tint: rgba(143, 117, 97, 0.4);
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  border: 1px solid rgba(67, 50, 39, 0.42);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  overflow: visible;
}

.mini-bottle {
  width: 32px;
  height: 44px;
  border-radius: 10px 10px 8px 8px;
}

.product-bottle {
  width: 36px;
  height: 50px;
  border-radius: 12px 12px 9px 9px;
}

.zone-editor-bottle {
  width: 34px;
  height: 48px;
  border-radius: 12px 12px 9px 9px;
}

.zone-bottle {
  width: 20px;
  height: 28px;
  border-radius: 8px 8px 6px 6px;
}

.mini-bottle::before,
.product-bottle::before,
.library-owned-bottle::before,
.zone-planner-type-bottle::before,
.zone-planner-current-bottle::before,
.zone-editor-bottle::before,
.zone-bottle::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(67, 50, 39, 0.32);
}

.mini-bottle.type-perfume::before,
.product-bottle.type-perfume::before,
.library-owned-bottle.type-perfume::before,
.zone-planner-type-bottle.type-perfume::before,
.zone-planner-current-bottle.type-perfume::before,
.zone-editor-bottle.type-perfume::before,
.zone-bottle.type-perfume::before {
  top: -7px;
  width: 12px;
  height: 9px;
  border-radius: 4px 4px 2px 2px;
}

.mini-bottle.type-oil,
.product-bottle.type-oil,
.library-owned-bottle.type-oil,
.zone-planner-type-bottle.type-oil,
.zone-planner-current-bottle.type-oil,
.zone-editor-bottle.type-oil,
.zone-bottle.type-oil {
  width: 28px;
  border-radius: 7px;
}

.mini-bottle.type-oil::before,
.product-bottle.type-oil::before,
.library-owned-bottle.type-oil::before,
.zone-planner-type-bottle.type-oil::before,
.zone-planner-current-bottle.type-oil::before,
.zone-editor-bottle.type-oil::before,
.zone-bottle.type-oil::before {
  top: -8px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
}

.mini-bottle.type-body-lotion,
.product-bottle.type-body-lotion,
.library-owned-bottle.type-body-lotion,
.zone-planner-type-bottle.type-body-lotion,
.zone-planner-current-bottle.type-body-lotion,
.zone-editor-bottle.type-body-lotion,
.zone-bottle.type-body-lotion {
  border-radius: 9px 9px 12px 12px;
}

.mini-bottle.type-body-lotion::before,
.product-bottle.type-body-lotion::before,
.library-owned-bottle.type-body-lotion::before,
.zone-planner-type-bottle.type-body-lotion::before,
.zone-planner-current-bottle.type-body-lotion::before,
.zone-editor-bottle.type-body-lotion::before,
.zone-bottle.type-body-lotion::before {
  top: -8px;
  width: 8px;
  height: 11px;
  border-radius: 4px;
  box-shadow: 8px 1px 0 -3px rgba(67, 50, 39, 0.32);
}

.mini-bottle::after,
.product-bottle::after,
.library-owned-bottle::after,
.zone-planner-type-bottle::after,
.zone-planner-current-bottle::after,
.zone-editor-bottle::after,
.zone-bottle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 55%;
  transform: translate(-50%, -50%);
  width: 58%;
  height: 28%;
  border-radius: 4px;
  border: 1px solid rgba(67, 50, 39, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.34));
}

.mini-bottle.type-oil::after,
.product-bottle.type-oil::after,
.library-owned-bottle.type-oil::after,
.zone-planner-type-bottle.type-oil::after,
.zone-planner-current-bottle.type-oil::after,
.zone-editor-bottle.type-oil::after,
.zone-bottle.type-oil::after {
  width: 64%;
  height: 24%;
  top: 57%;
}

.mini-bottle.type-body-lotion::after,
.product-bottle.type-body-lotion::after,
.library-owned-bottle.type-body-lotion::after,
.zone-planner-type-bottle.type-body-lotion::after,
.zone-planner-current-bottle.type-body-lotion::after,
.zone-editor-bottle.type-body-lotion::after,
.zone-bottle.type-body-lotion::after {
  width: 48%;
  height: 20%;
  top: 48%;
  border-radius: 999px 999px 5px 5px;
}

.mini-bottle img,
.product-bottle img,
.library-owned-bottle img,
.zone-planner-type-bottle img,
.zone-planner-current-bottle img,
.zone-editor-bottle img,
.zone-bottle img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 5px 8px rgba(53, 35, 24, 0.1));
}

.mini-bottle.has-image,
.product-bottle.has-image,
.library-owned-bottle.has-image,
.zone-planner-type-bottle.has-image,
.zone-planner-current-bottle.has-image,
.zone-editor-bottle.has-image,
.zone-bottle.has-image {
  border: 0;
  background: transparent;
  box-shadow: none;
}

.mini-bottle.has-image::before,
.mini-bottle.has-image::after,
.product-bottle.has-image::before,
.product-bottle.has-image::after,
.library-owned-bottle.has-image::before,
.library-owned-bottle.has-image::after,
.zone-planner-type-bottle.has-image::before,
.zone-planner-type-bottle.has-image::after,
.zone-planner-current-bottle.has-image::before,
.zone-planner-current-bottle.has-image::after,
.zone-editor-bottle.has-image::before,
.zone-editor-bottle.has-image::after,
.zone-bottle.has-image::before,
.zone-bottle.has-image::after {
  display: none;
}

.product-bottle.has-image {
  width: 50px;
  height: 72px;
}

.library-owned-bottle.has-image {
  width: 50px;
  height: 72px;
}

.zone-planner-type-bottle {
  width: 28px;
  height: 38px;
  border-radius: 10px 10px 8px 8px;
}

.zone-planner-type-bottle.has-image {
  width: 34px;
  height: 48px;
}

.zone-planner-current-bottle {
  width: 34px;
  height: 48px;
  border-radius: 12px 12px 9px 9px;
}

.zone-planner-current-bottle.has-image {
  width: 42px;
  height: 62px;
}

.zone-editor-bottle.has-image {
  width: 46px;
  height: 66px;
}

.zone-bottle.has-image {
  width: 24px;
  height: 34px;
}

.sheet-bottle .mini-bottle.has-image {
  width: 40px;
  height: 58px;
}

.sheet-bottle .mini-bottle.has-image img {
  filter: drop-shadow(0 4px 7px rgba(53, 35, 24, 0.08));
}

.bottle-collection-mark {
  position: absolute;
  right: -2px;
  bottom: 4px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--collection-tint);
  box-shadow:
    0 0 0 1px rgba(67, 50, 39, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.product-bottle .bottle-collection-mark {
  right: -1px;
  bottom: 5px;
  width: 9px;
  height: 9px;
}

.mini-bottle.has-image .bottle-collection-mark,
.product-bottle.has-image .bottle-collection-mark,
.library-owned-bottle.has-image .bottle-collection-mark,
.zone-planner-current-bottle.has-image .bottle-collection-mark,
.zone-editor-bottle.has-image .bottle-collection-mark,
.zone-bottle.has-image .bottle-collection-mark {
  right: 2px;
  bottom: 6px;
}

.collection-bianca {
  --collection-tint: rgba(230, 216, 202, 0.96);
}

.collection-amber {
  --collection-tint: rgba(200, 154, 112, 0.92);
}

.collection-raw {
  --collection-tint: rgba(129, 97, 84, 0.84);
}

.collection-skin {
  --collection-tint: rgba(223, 193, 168, 0.96);
}

.product-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-meta-card {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.35;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.product-meta-sheet {
  letter-spacing: inherit;
}

.collection-mark {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--collection-tint);
  box-shadow:
    0 0 0 1px rgba(67, 50, 39, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.sheet-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 2px 0;
}

.sheet-status-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sheet-status p {
  margin: 0;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.55;
}

.zone-editor {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.sheet-app.is-reference-planner-active .sheet-document,
.sheet-app.is-reference-planner-active .sheet-status {
  display: none;
}

.sheet-app.is-reference-planner-active {
  width: min(calc(100% - 32px), 1480px);
}

.zone-editor-card {
  position: relative;
  overflow: visible;
  max-width: 780px;
  margin: 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.zone-planner-reference {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  aspect-ratio: 1159 / 829;
  container-type: inline-size;
}

.zone-planner-reference-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.zone-planner-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.zone-planner-overlay-rows {
  position: absolute;
  left: 39.05%;
  top: 37.12%;
  width: 43.99%;
  height: 60.74%;
  display: grid;
  grid-template-rows: repeat(9, 1fr);
  gap: 0;
}

.zone-planner-overlay-notes {
  position: absolute;
  left: 76.85%;
  top: 34.25%;
  width: 15.6%;
  height: 56.1%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(7px, 0.95cqi, 10px);
  pointer-events: none;
}

.zone-planner-overlay-note {
  margin: 0;
  color: rgba(67, 54, 44, 0.92);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(6.5px, 0.82cqi, 8.4px);
  line-height: 1.18;
  font-style: italic;
  font-weight: 500;
  text-align: center;
  letter-spacing: 0;
  text-wrap: balance;
  opacity: 0;
}

.zone-planner-overlay-row {
  display: grid;
  grid-template-columns: 35.5% 28.5% 12% 12% 12%;
  align-items: center;
}

.zone-planner-overlay-row.is-disabled {
  opacity: 0.84;
}

.zone-planner-overlay-area {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  justify-self: stretch;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(79, 63, 50, 0.76);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(7px, 0.94cqi, 9px);
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
}

.zone-planner-overlay-product {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: stretch;
  min-height: 100%;
  margin: 0;
  padding: 0;
  background: transparent;
  color: rgba(61, 48, 38, 0.94);
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(8.2px, 1.12cqi, 11px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: none;
  transform: none;
  opacity: 0;
}

.zone-planner-overlay-product.is-empty {
  color: transparent;
}

.zone-planner-overlay-cell {
  display: grid;
  place-items: center;
  justify-self: stretch;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.zone-planner-overlay-cell--button {
  cursor: pointer;
  pointer-events: auto;
  background: transparent;
}

.zone-planner-overlay-cell--button:focus-visible {
  outline: 1px solid rgba(88, 63, 46, 0.26);
  outline-offset: 1px;
}

.zone-planner-overlay-cell--mask,
.zone-planner-overlay-cell--disabled {
  pointer-events: none;
}

.zone-planner-overlay-checkbox {
  position: relative;
  width: clamp(12px, 1.72cqi, 16px);
  height: clamp(9px, 1.18cqi, 11px);
  border: 0;
  background: transparent;
  box-shadow: none;
  opacity: 0;
}

.zone-planner-overlay-cell--button.is-selected .zone-planner-overlay-checkbox {
  opacity: 1;
}

.zone-planner-overlay-cell--button.is-selected .zone-planner-overlay-checkbox::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 30%;
  height: 56%;
  border-right: 1.5px solid rgba(86, 63, 49, 0.92);
  border-bottom: 1.5px solid rgba(86, 63, 49, 0.92);
  transform: translate(-50%, -50%) rotate(41deg);
}

.zone-plan-groups {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.zone-plan-group {
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.82);
  box-shadow:
    0 8px 18px rgba(75, 53, 37, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.zone-plan-group--high {
  background:
    linear-gradient(180deg, rgba(255, 253, 241, 0.96), rgba(247, 238, 186, 0.32));
}

.zone-plan-group--middle {
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.96), rgba(244, 210, 192, 0.34));
}

.zone-plan-group--low {
  background:
    linear-gradient(180deg, rgba(251, 247, 252, 0.96), rgba(228, 220, 232, 0.38));
}

.zone-plan-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px 10px;
  border-bottom: 1px solid rgba(88, 63, 46, 0.08);
}

.zone-plan-level {
  color: var(--ink);
  font-family: "Cormorant Garamond", serif;
  font-size: 1.28rem;
  line-height: 1;
  font-weight: 600;
}

.zone-plan-count {
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.zone-plan-rows {
  display: grid;
}

.zone-plan-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(108px, 0.9fr) 54px;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  padding: 0 14px;
  border-top: 1px solid rgba(88, 63, 46, 0.08);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.38);
}

.zone-plan-row:first-child {
  border-top: 0;
}

.zone-plan-row.is-selected {
  background: rgba(255, 252, 246, 0.78);
}

.zone-check-input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}

.zone-plan-row-label {
  color: var(--ink);
  font-size: 0.8rem;
  line-height: 1.3;
}

.zone-plan-row-product {
  color: var(--text);
  font-size: 0.62rem;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-weight: 700;
  text-align: right;
}

.zone-plan-row-check {
  justify-self: end;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.zone-check-box {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(74, 56, 44, 0.48);
  background: rgba(255, 252, 247, 0.96);
  flex-shrink: 0;
  border-radius: 7px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 2px 6px rgba(75, 53, 37, 0.05);
}

.zone-plan-row.is-selected .zone-check-box {
  background: rgba(46, 33, 25, 0.9);
  box-shadow: inset 0 0 0 2px rgba(255, 252, 247, 0.7);
}

.zone-editor-summary {
  margin-top: 10px;
  font-size: 0.76rem;
  opacity: 0.9;
}

.library-strip {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.library-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.search-box {
  min-width: min(360px, 100%);
}

.product-scroller {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(230px, 240px);
  gap: 14px;
  overflow-x: auto;
  padding-top: 18px;
  scrollbar-width: thin;
}

.product-card,
.product-empty {
  min-height: 90px;
  border: 1px solid var(--line-soft);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px 14px;
  box-shadow: 0 10px 24px rgba(75, 53, 37, 0.04);
}

.product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: grab;
}

.product-card:active {
  cursor: grabbing;
}

.product-card.is-pending {
  border-color: rgba(59, 42, 31, 0.5);
  background: rgba(255, 252, 246, 0.98);
  box-shadow: 0 14px 28px rgba(75, 53, 37, 0.06);
}

.product-copy {
  min-width: 0;
}

.product-copy strong {
  display: block;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.25;
}

.product-copy p {
  margin: 5px 0 0;
  font-size: 0.79rem;
  line-height: 1.45;
}

.product-owned-badge {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 0.6rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.product-card-flags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.product-level-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.product-level-badges::-webkit-scrollbar,
.owned-card-levels-summary::-webkit-scrollbar,
.owned-card-placed-list::-webkit-scrollbar {
  display: none;
}

.product-level-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(88, 63, 46, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-size: 0.56rem;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  white-space: nowrap;
}

.product-level-badge--high {
  background: rgba(246, 238, 181, 0.72);
}

.product-level-badge--middle {
  background: rgba(243, 207, 188, 0.72);
}

.product-level-badge--low {
  background: rgba(226, 218, 230, 0.76);
}

.product-level-badge-library {
  align-self: flex-start;
}

.zone-bottle-marker {
  position: absolute;
  pointer-events: none;
  transform: translate(
    calc(-50% + var(--marker-dx, 0px) + var(--zone-offset-x, 0px)),
    calc(-50% + var(--marker-dy, 0px) + var(--zone-offset-y, 0px))
  );
  z-index: 1;
}

.product-empty {
  display: grid;
  place-items: center;
  color: var(--muted);
}

@media (max-width: 980px) {
  .sheet-app {
    width: min(calc(100% - 24px), var(--max-width));
    padding-top: 18px;
  }

  .library-head,
  .sheet-status {
    grid-template-columns: 1fr;
    display: grid;
  }

  .sheet-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    display: grid;
  }

  .composition-strip {
    grid-template-columns: 1fr;
  }

  .layers-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zone-editor-head {
    align-items: start;
    display: grid;
    gap: 12px;
  }

  .zone-editor-card {
    max-width: 100%;
  }

  .zone-planner-reference {
    width: min(100%, 740px);
  }

  .sheet-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }

  .download-button,
  .ghost-button {
    width: auto;
  }

  .library-head {
    align-items: start;
  }

  .panel-meta {
    justify-content: flex-start;
  }

  .layer-chip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .layer-chip-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .brand-logo {
    width: 58px;
    height: 58px;
  }

  .sheet-meta {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .saved-sheets-utility {
    align-items: flex-start;
    flex-direction: column;
  }

  .layers-stack {
    grid-template-columns: 1fr;
  }

  .zone-planner-reference {
    width: 100%;
  }

  .zone-planner-overlay-rows {
    left: 39.2%;
    top: 37.44%;
    width: 43.72%;
    height: 60.38%;
  }

  .zone-editor-summary {
    text-align: left;
  }

  .sheet-actions {
    grid-column: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .download-button,
  .ghost-button {
    width: 100%;
  }

  .layers-panel,
  .customer-library {
    padding: 14px;
  }

  .library-owned-grid {
    grid-template-columns: repeat(auto-fit, minmax(126px, 126px));
    gap: 10px;
  }

  .owned-card-levels-trigger {
    width: 100%;
    margin-left: 0;
  }

  .owned-card-levels-summary {
    gap: 4px;
  }

  .owned-card-placed {
    width: 100%;
    margin-left: 0;
  }
}

@media print {
  body {
    background: #fff;
  }

  [data-pdf-exclude] {
    display: none !important;
  }

  .sheet-app {
    width: 100%;
    padding: 0;
  }

  .sheet-document {
    box-shadow: none;
  }
}
