:root,
html[data-theme="light"] {
  --red: #E31F26;
  --red-brand: #D2222A;
  --red-soft: #FDECEC;
  --dark: #1E1E1E;
  --light: #F7F7F7;
  --bg: #EFEFEF;
  --bg-gradient: linear-gradient(180deg, #F7F7F7 0%, #EFEFEF 55%, #E8E8E8 100%);
  --surface: #FFFFFF;
  --surface-2: #FAFAFA;
  --border: #E4E4E4;
  --border-strong: #D0D0D0;
  --text: #1E1E1E;
  --muted: #6E6E6E;
  --btn-bg: #1E1E1E;
  --btn-fg: #FFFFFF;
  --btn-hover: #2A2A2A;
  --chip-bg: #FFFFFF;
  --chip-active-bg: #1E1E1E;
  --chip-active-fg: #FFFFFF;
  --radius: 12px;
  --tap: 48px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --red: #E31F26;
  --red-brand: #E31F26;
  --red-soft: rgba(227, 31, 38, 0.18);
  --dark: #1E1E1E;
  --light: #F7F7F7;
  --bg: #242424;
  --bg-gradient: linear-gradient(180deg, #2A2A2A 0%, #242424 55%, #1F1F1F 100%);
  --surface: #2A2A2A;
  --surface-2: #303030;
  --border: #3A3A3A;
  --border-strong: #4A4A4A;
  --text: #F2F2F2;
  --muted: #9A9A9A;
  --btn-bg: #E31F26;
  --btn-fg: #FFFFFF;
  --btn-hover: #C91B21;
  --chip-bg: #303030;
  --chip-active-bg: #E31F26;
  --chip-active-fg: #FFFFFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  min-height: 100%;
}

.app {
  min-height: 100dvh;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(28px + var(--safe-bottom));
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface);
  background-image: var(--bg-gradient);
}

.header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + var(--safe-top)) 18px 12px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

html[data-theme="light"] .logo-dark,
html[data-theme="dark"] .logo-light { display: none; }

.brand-sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-left: 1px solid var(--border-strong);
  padding-left: 12px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
}

html[data-theme="light"] .icon-moon,
html[data-theme="dark"] .icon-sun { display: none; }

.main {
  padding: 20px 18px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hero .eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--red);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.subtitle, .muted {
  color: var(--muted);
}

.subtitle {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.renders {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 10px;
}

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

.render-slot {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-2);
  aspect-ratio: 16 / 10;
  min-height: 140px;
}

.render-slot--secondary { aspect-ratio: 1 / 1; }

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

.render-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 14px;
  background:
    linear-gradient(160deg, rgba(30,30,30,0.15), rgba(30,30,30,0.55)),
    linear-gradient(135deg, #3a3a3a 0%, #1E1E1E 45%, #E31F26 160%);
}

.render-placeholder--alt {
  background:
    linear-gradient(200deg, rgba(30,30,30,0.1), rgba(30,30,30,0.6)),
    linear-gradient(45deg, #2A2A2A 0%, #4a4a4a 40%, #D2222A 140%);
}

.render-placeholder .ph-label {
  color: #F7F7F7;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.9;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.panel h2 {
  margin: 0 0 14px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sku-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

@media (min-width: 560px) {
  .sku-grid { grid-template-columns: 1fr 1fr; }
}

.sku-card {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 14px 14px 12px;
  cursor: pointer;
  min-height: var(--tap);
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.sku-card:hover {
  border-color: var(--border-strong);
}

.sku-card[aria-selected="true"] {
  border-color: var(--red);
  box-shadow: inset 0 0 0 1px var(--red);
  background: var(--red-soft);
}

.sku-card .sku-code {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.sku-card[aria-selected="true"] .sku-code { color: var(--red-brand); }

.sku-card .sku-name {
  display: block;
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.25;
  margin-bottom: 6px;
}

.sku-card .sku-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 12%, transparent);
  font-weight: 600;
}

.badge--high { color: #1FA66A; background: color-mix(in srgb, #1FA66A 14%, transparent); }
.badge--low { color: #B8850A; background: color-mix(in srgb, #B8850A 16%, transparent); }

.options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.options-empty { margin: 0; font-size: 0.92rem; }

.option-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--chip-bg);
  color: var(--text);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: var(--tap);
  text-align: left;
}

.option-toggle[aria-pressed="true"] {
  border-color: var(--red);
  background: var(--red-soft);
}

.option-toggle:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.option-toggle .opt-label {
  font-weight: 600;
  font-size: 0.95rem;
}

.option-toggle .opt-delta {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.option-toggle[aria-pressed="true"] .opt-delta { color: var(--red-brand); font-weight: 700; }

.switch {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: var(--border-strong);
  position: relative;
  flex-shrink: 0;
  transition: background 0.15s;
}

.option-toggle[aria-pressed="true"] .switch { background: var(--red); }

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
}

.option-toggle[aria-pressed="true"] .switch::after { transform: translateX(18px); }

.summary-grid {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-of-type { border-bottom: none; padding-bottom: 0; }

.summary-row dt {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.summary-row dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: right;
}

.summary-row.highlight dd {
  font-size: 1.2rem;
  color: var(--red-brand);
  letter-spacing: -0.01em;
}

.price-tag {
  margin: 14px 0 0;
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.disclaimer {
  margin: 12px 0 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
}

.cta-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 8px;
}

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 14px 18px;
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background: var(--btn-hover); }
.btn-primary:active { transform: scale(0.985); }

.cta-hint {
  margin: 0;
  font-size: 0.8rem;
  text-align: center;
  line-height: 1.4;
}

.footer {
  margin-top: auto;
  padding: 24px 18px 8px;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}
