:root {
  --ink: #1b1815;
  --muted: #6f675d;
  --line: #ded4c3;
  --paper: #f4efe6;
  --panel: #fffdf8;
  --charcoal: #211f1b;
  --wine: #642f34;
  --wine-deep: #442025;
  --gold: #b98b45;
  --gold-soft: #ead8b8;
  --green: #31584c;
  --shadow: 0 18px 42px rgba(35, 27, 18, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(33, 31, 27, 0.92) 0 330px, transparent 330px),
    linear-gradient(135deg, rgba(185, 139, 69, 0.13), transparent 34%),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 32px;
  width: min(1460px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 32px 0;
}

.finder-panel {
  align-self: start;
  position: sticky;
  top: 28px;
  max-height: calc(100vh - 56px);
  overflow: auto;
  padding: 26px;
  background: var(--panel);
  border: 1px solid rgba(222, 212, 195, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 15px;
  align-items: center;
  margin-bottom: 26px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  color: #fff8ea;
  background:
    linear-gradient(145deg, #3b2720, #173d35 54%, #8f6732);
  border: 1px solid rgba(234, 216, 184, 0.72);
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(27, 24, 21, 0.18);
  font-size: 14px;
  font-weight: 900;
}

h1 {
  color: #181512;
  font-size: 31px;
  line-height: 1.02;
}

.brand-row p {
  margin-top: 7px;
  color: var(--muted);
  line-height: 1.48;
}

.finder-form {
  display: grid;
  gap: 20px;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.optional-grid label > span,
.preference-block > span {
  display: block;
  margin-bottom: 10px;
  color: #3b342c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.budget-pair,
.segmented-grid,
.segmented-row,
.optional-grid {
  display: grid;
  gap: 8px;
}

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

.budget-pair label > span,
.measurement-row label > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.budget-note,
.question-help,
.measurement-help p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.budget-note {
  margin-top: 8px;
}

.question-help {
  margin: -4px 0 10px;
}

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

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

.segmented-grid label,
.segmented-row label {
  display: block;
  min-width: 0;
}

.segmented-grid input,
.segmented-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segmented-grid span,
.segmented-row span {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 5px;
  min-height: 64px;
  height: 100%;
  padding: 11px 12px 10px;
  color: #332c25;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), transparent 58%),
    #fbf6ed;
  border: 1px solid rgba(185, 139, 69, 0.28);
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.segmented-grid span::before,
.segmented-row span::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--gold);
  opacity: 0.55;
}

.segmented-grid span:hover,
.segmented-row span:hover {
  border-color: rgba(185, 139, 69, 0.54);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.5),
    0 10px 20px rgba(35, 27, 18, 0.08);
  transform: translateY(-1px);
}

.segmented-grid strong,
.segmented-row strong {
  font-size: 14px;
  line-height: 1.1;
}

.segmented-grid small,
.segmented-row small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.28;
}

.type-grid span {
  min-height: 68px;
}

.segmented-grid input:checked + span,
.segmented-row input:checked + span {
  color: #fff7e8;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 58%),
    linear-gradient(135deg, var(--wine-deep), var(--green));
  border-color: rgba(185, 139, 69, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(234, 216, 184, 0.2),
    0 12px 24px rgba(35, 27, 18, 0.16);
}

.segmented-grid input:checked + span::before,
.segmented-row input:checked + span::before {
  background: var(--gold-soft);
  opacity: 0.9;
}

.segmented-grid input:checked + span small,
.segmented-row input:checked + span small {
  color: rgba(255, 247, 232, 0.78);
}

select,
input[type="text"],
input[type="number"] {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fffaf1;
  border: 1px solid #dbcfbb;
  border-radius: 8px;
}

select:focus,
input:focus {
  outline: 2px solid rgba(185, 139, 69, 0.32);
  outline-offset: 2px;
}

.measurement-row {
  display: grid;
  grid-template-columns: 1fr 48px;
  gap: 10px;
  align-items: end;
}

.unit-label {
  display: grid;
  place-items: center;
  min-height: 44px;
  color: #3b342c;
  background: #fbf6ed;
  border: 1px solid #dfd3bf;
  border-radius: 8px;
  font-weight: 900;
}

.measurement-help {
  margin-top: 9px;
}

.measurement-help summary {
  color: var(--wine);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.measurement-help p {
  margin-top: 8px;
}

.simple-check {
  display: block;
  margin-top: 10px;
}

.simple-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.simple-check span {
  display: grid;
  gap: 3px;
  min-height: 44px;
  padding: 9px 11px;
  color: #3b342c;
  background: #fbf6ed;
  border: 1px solid rgba(185, 139, 69, 0.28);
  border-radius: 8px;
  cursor: pointer;
}

.simple-check strong {
  font-size: 13px;
  line-height: 1.15;
}

.simple-check small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.simple-check input:checked + span {
  color: #fff7e8;
  background: linear-gradient(135deg, var(--wine-deep), var(--green));
  border-color: rgba(185, 139, 69, 0.62);
}

.simple-check input:checked + span small {
  color: rgba(255, 247, 232, 0.78);
}

.optional-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.preference-grid {
  align-items: start;
}

.preference-block {
  min-width: 0;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-grid span {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 7px 10px;
  color: #3b342c;
  background: #fffaf1;
  border: 1px solid rgba(185, 139, 69, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.1;
  cursor: pointer;
}

.choice-grid input:checked + span {
  color: #fff7e8;
  background: linear-gradient(135deg, var(--wine-deep), var(--green));
  border-color: rgba(185, 139, 69, 0.62);
}

.brand-picker {
  grid-column: 1 / -1;
  min-width: 0;
}

.brand-picker summary {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 12px;
  color: #3b342c;
  background: #fbf6ed;
  border: 1px solid #dfd3bf;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

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

.brand-picker summary span {
  margin: 0;
  color: #3b342c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-picker summary strong {
  max-width: 210px;
  overflow: hidden;
  color: #5c421f;
  font-size: 12px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-picker summary::after {
  content: "+";
  color: var(--gold);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.brand-picker[open] summary::after {
  content: "-";
}

.brand-options {
  display: grid;
  gap: 10px;
  margin-top: 9px;
  padding: 10px;
  background: rgba(251, 246, 237, 0.78);
  border: 1px solid rgba(185, 139, 69, 0.22);
  border-radius: 8px;
}

.brand-group {
  display: grid;
  gap: 7px;
}

.brand-group-title {
  color: #6f675d;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.all-brands-panel {
  display: grid;
  gap: 8px;
}

.all-brands-panel summary {
  color: #5c421f;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

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

.brand-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.brand-options .brand-choice span {
  display: grid;
  place-items: center;
  min-height: 34px;
  margin: 0;
  padding: 7px 9px;
  overflow: hidden;
  color: #3b342c;
  background: #fffaf1;
  border: 1px solid rgba(185, 139, 69, 0.24);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
  cursor: pointer;
}

.brand-options .brand-choice input:checked + span {
  color: #fff7e8;
  background: linear-gradient(135deg, var(--wine-deep), var(--green));
  border-color: rgba(185, 139, 69, 0.62);
}

.selected-brand-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selected-brand-chips[hidden] {
  display: none;
}

.selected-brand-chip {
  min-height: 30px;
  padding: 0 10px;
  color: #fff7e8;
  background: linear-gradient(135deg, var(--wine-deep), var(--green));
  border: 1px solid rgba(234, 216, 184, 0.34);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
}

.selected-brand-chip::after {
  content: "x";
  margin-left: 7px;
  color: rgba(255, 247, 232, 0.78);
}

.primary-action,
.ghost-button,
.shop-link {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 900;
  cursor: pointer;
}

.primary-action {
  color: #fff8ea;
  background: linear-gradient(135deg, var(--charcoal), var(--wine-deep));
  border: 1px solid rgba(234, 216, 184, 0.36);
  box-shadow: 0 14px 24px rgba(35, 27, 18, 0.18);
}

.ghost-button {
  padding: 0 15px;
  color: #fff8ea;
  background: rgba(255, 248, 234, 0.08);
  border: 1px solid rgba(234, 216, 184, 0.32);
}

.results-panel {
  min-width: 0;
  padding: 8px 0 24px;
}

.results-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  min-height: 128px;
  margin-bottom: 14px;
  color: #fff8ea;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h2 {
  max-width: 720px;
  font-size: 42px;
  line-height: 1.04;
}

.match-summary {
  max-width: 850px;
  margin: -42px 0 22px;
  color: #efe3d0;
  line-height: 1.55;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 14px;
  padding: 44px;
  color: #fff7e8;
  background:
    linear-gradient(135deg, rgba(100, 47, 52, 0.88), rgba(49, 88, 76, 0.88)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent);
  border: 1px solid rgba(234, 216, 184, 0.28);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.empty-state h3 {
  max-width: 620px;
  font-size: 34px;
  line-height: 1.05;
}

.empty-state p:last-child {
  max-width: 620px;
  color: rgba(255, 247, 232, 0.78);
  line-height: 1.6;
}

.watch-card {
  display: grid;
  grid-template-rows: 280px 1fr;
  min-height: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid rgba(222, 212, 195, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.watch-image-link {
  display: grid;
  min-width: 0;
  min-height: 280px;
  color: inherit;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, #eee2ce, #fbf8ef 48%, #d8c7a8);
  text-decoration: none;
}

.product-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100%;
  overflow: hidden;
  padding: 26px;
}

.product-stage::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(185, 139, 69, 0.32);
  border-radius: 8px;
}

.product-stage::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 30px;
  left: 22px;
  height: 34px;
  background: rgba(35, 27, 18, 0.16);
  border-radius: 50%;
  filter: blur(18px);
}

.product-halo {
  position: absolute;
  width: min(72%, 230px);
  aspect-ratio: 1;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.88), rgba(234, 216, 184, 0.34) 43%, transparent 70%);
  border-radius: 50%;
}

.watch-image {
  position: relative;
  z-index: 1;
  width: min(88%, 250px);
  height: 255px;
  object-fit: contain;
  object-position: 50% 38%;
  filter: drop-shadow(0 18px 20px rgba(35, 27, 18, 0.24));
  mix-blend-mode: multiply;
  transform: translateY(-5%) scale(1.08);
}

.product-stage.is-image-missing .watch-image {
  display: none;
}

.product-stage.is-image-missing .product-halo {
  width: 168px;
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.92), rgba(234, 216, 184, 0.54) 52%, transparent 72%);
}

.product-stage.is-image-missing::after {
  content: attr(data-brand);
  right: auto;
  bottom: auto;
  left: auto;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 154px;
  height: 154px;
  padding: 18px;
  color: #352b21;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), transparent),
    #efe1c5;
  border: 1px solid rgba(185, 139, 69, 0.48);
  border-radius: 50%;
  box-shadow: 0 18px 34px rgba(35, 27, 18, 0.16);
  filter: none;
  font-size: 18px;
  font-weight: 950;
  line-height: 1.05;
  text-align: center;
}

.watch-card-body {
  position: relative;
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 20px 22px 22px;
}

.match-label {
  justify-self: start;
  padding: 6px 10px;
  color: #583b16;
  background: #f4e7cc;
  border: 1px solid rgba(185, 139, 69, 0.34);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

h3 {
  color: #171310;
  font-size: 21px;
  line-height: 1.12;
}

.brand {
  color: var(--wine);
  font-size: 15px;
  font-weight: 900;
}

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

.spec-row span {
  padding: 5px 9px;
  color: #40372e;
  background: #fbf6ed;
  border: 1px solid #dfd3bf;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.match-cautions span {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.match-cautions {
  display: grid;
  gap: 6px;
}

.match-cautions span {
  color: #5c421f;
  background: #fff7e6;
  border: 1px solid rgba(185, 139, 69, 0.42);
}

.match-cautions span::before {
  content: "Let op: ";
  font-weight: 950;
}

.match-cautions[hidden] {
  display: none;
}

.variant-note {
  color: #5b4d40;
  padding: 9px 11px;
  background: rgba(234, 216, 184, 0.34);
  border: 1px dashed rgba(185, 139, 69, 0.48);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.variant-note[hidden] {
  display: none;
}

.variant-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.variant-list[hidden] {
  display: none;
}

.variant-link {
  display: grid;
  grid-template-rows: 82px auto;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(122, 88, 43, 0.24);
  color: #3f342c;
  background: rgba(255, 252, 245, 0.82);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none;
}

.variant-link img {
  width: 100%;
  height: 82px;
  object-fit: contain;
  padding: 6px;
  background:
    linear-gradient(180deg, rgba(255, 248, 234, 0.55), rgba(226, 205, 172, 0.34));
}

.variant-image-placeholder {
  display: grid;
  place-items: center;
  min-width: 0;
  height: 82px;
  padding: 8px;
  color: #6d5a45;
  background:
    linear-gradient(180deg, rgba(255, 248, 234, 0.55), rgba(226, 205, 172, 0.34));
  text-align: center;
}

.variant-meta {
  display: grid;
  gap: 2px;
  padding: 7px 8px 8px;
}

.variant-meta strong,
.variant-meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.variant-meta span {
  color: #776b5f;
  font-size: 10px;
}

.variant-link:hover {
  border-color: rgba(92, 50, 45, 0.42);
  background: #fffaf0;
}

.shop-link {
  display: inline-grid;
  place-items: center;
  justify-self: start;
  margin-top: 2px;
  padding: 0 15px;
  color: #fff8ea;
  background: linear-gradient(135deg, var(--wine-deep), var(--green));
  border: 1px solid rgba(234, 216, 184, 0.34);
  text-decoration: none;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
    width: min(820px, calc(100vw - 28px));
  }

  .finder-panel {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .results-header {
    min-height: 104px;
  }

  .match-summary {
    margin-top: -26px;
  }
}

@media (max-width: 760px) {
  body {
    background:
      linear-gradient(180deg, rgba(33, 31, 27, 0.94) 0 260px, transparent 260px),
      var(--paper);
  }

  .app-shell {
    width: min(100vw - 20px, 560px);
    padding: 12px 0 22px;
  }

  .finder-panel,
  .watch-card-body {
    padding: 18px;
  }

  .brand-row,
  .optional-grid,
  .budget-pair,
  .results-grid,
  .watch-card {
    grid-template-columns: 1fr;
  }

  .segmented-row {
    grid-template-columns: 1fr;
  }

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

  .results-header {
    min-height: 110px;
  }

  .match-summary {
    margin-top: -22px;
  }

  .watch-image-link,
  .product-stage {
    min-height: 260px;
  }

  .watch-image {
    height: 220px;
    transform: translateY(-4%) scale(1.05);
  }

  h1 {
    font-size: 27px;
  }

  h2 {
    font-size: 31px;
  }

  h3 {
    font-size: 21px;
  }
}
