/* C-Mes Apparel — site styles
   Layout concept: an editorial storefront. Forest-green bands and warm ivory pages,
   Cormorant display type over a clear Manrope body, the emblem's triangle border
   and stitch lines as the only ornaments. Brand colours from the C-Mes guide. */
:root {
  --green: #093D23;
  --green-2: #0F4D2E;
  --green-deep: #062A18;
  --gold: #C48728;
  --gold-ink: #8B5A12;      /* gold dark enough for small text on ivory */
  --gold-soft: #E6C27E;     /* gold for text on green */
  --ivory: #FCF9F2;
  --stone: #F4EFE5;
  --sage: #DCE5D9;
  --ink: #202820;
  --muted: #586152;
  --line: #E3DACA;
  --white: #FFFFFF;
  --danger: #9C2F25;
  --display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --body: "Manrope", "Lato", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 14px;
  --shadow: 0 1px 2px rgba(9, 61, 35, .06), 0 8px 24px rgba(9, 61, 35, .08);
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --header-h: 68px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--ivory); color: var(--ink);
  font: 400 17px/1.65 var(--body); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--green); line-height: 1.08; text-wrap: balance; margin: 0; letter-spacing: -0.005em; }
h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2vw, 1.6rem); }
p { margin: 0; }
.eyebrow { font: 700 .76rem/1.2 var(--body); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-ink); }
.lede { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.wrap { max-width: 1200px; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: clamp(28px, 4vw, 48px); }
.stack { display: grid; gap: 18px; }

/* signature triangle border, drawn from the emblem geometry */
.tri-rule { height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='12' viewBox='0 0 24 12'%3E%3Cpath d='M0 11.5 L6 1 L12 11.5 L18 1 L24 11.5' fill='none' stroke='%23C48728' stroke-width='1.1'/%3E%3C/svg%3E") repeat-x left center / 24px 12px; opacity: .9; }
.stitch { border: 0; border-top: 1.5px dashed var(--line); margin: 0; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: 999px; font: 700 .95rem/1 var(--body); letter-spacing: .02em; text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .2s; }
.btn-primary { background: var(--green); color: var(--ivory); }
.btn-primary:hover { background: var(--green-deep); color: var(--ivory); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--green-deep); }
.btn-gold:hover { background: #D69A3A; color: var(--green-deep); }
.btn-ghost { border-color: var(--gold); color: var(--green); background: transparent; }
.btn-ghost:hover { background: var(--stone); color: var(--green); }
.on-green .btn-ghost { color: var(--ivory); border-color: var(--gold-soft); }
.on-green .btn-ghost:hover { background: rgba(255,255,255,.08); color: var(--ivory); }
.btn-text { background: none; border: 0; padding: 6px 0; font: 600 .9rem var(--body); color: var(--green); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--ivory); }
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 50; background: rgba(252, 249, 242, .94); backdrop-filter: saturate(1.2) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--green); }
.brand-mark { width: 38px; height: 38px; border-radius: 50%; background: var(--ivory) url("../img/emblem.png") center / 112% no-repeat; box-shadow: 0 0 0 1px var(--line); flex: none; }
.brand-word { display: grid; line-height: 1; }
.brand-word b { font: 700 1.6rem/0.95 var(--display); letter-spacing: -0.01em; }
.brand-word small { font: 700 .58rem/1 var(--body); letter-spacing: .42em; color: var(--gold-ink); margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { padding: 10px 12px; font: 600 .82rem/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); text-decoration: none; border-radius: 8px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green); background: var(--stone); }
.nav .btn { margin-left: 10px; padding: 11px 18px; min-height: 42px; text-transform: none; letter-spacing: .02em; font-size: .88rem; color: var(--ivory); }
.nav .btn:hover, .nav .btn[aria-current="page"] { background: var(--green-deep); color: var(--ivory); }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 46px; height: 46px; cursor: pointer; color: var(--green); }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 920px) {
  .menu-btn { display: inline-grid; place-items: center; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; padding: 12px var(--gutter-r) 18px var(--gutter); background: var(--ivory); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav:not(.open) { display: none; }
  .nav a { padding: 14px 12px; font-size: .9rem; }
  .nav .btn { margin: 8px 0 0; }
}

/* hero */
.hero { position: relative; overflow: hidden; background: var(--ivory); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(24px, 5vw, 64px); align-items: center; padding-block: clamp(36px, 6vw, 80px); }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero h1 em { font-style: italic; color: var(--gold-ink); font-weight: 500; }
.hero-figure { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 220px 220px var(--r) var(--r); background: radial-gradient(120% 80% at 50% 20%, #FFFFFF 0%, var(--stone) 62%, #E9E0CF 100%); overflow: hidden; max-width: 520px; justify-self: center; width: 100%; box-shadow: inset 0 0 0 1px var(--line); }
.hero-figure img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.hero-figure figcaption { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: rgba(252, 249, 242, .92); border-radius: 999px; font-size: .84rem; color: var(--muted); }
.hero-figure figcaption b { color: var(--green); }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: .9rem; color: var(--muted); }
.hero-points span { display: inline-flex; align-items: center; gap: 8px; }
.hero-points span::before { content: ""; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-figure { max-width: 420px; } }

/* cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 28px); }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } }
.path-card { display: grid; gap: 12px; align-content: start; padding: 28px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); transition: border-color .2s, transform .2s; }
.path-card:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.path-card .eyebrow { margin-bottom: 4px; }
.path-card .more { margin-top: 6px; font-weight: 700; font-size: .9rem; color: var(--green); }

/* green band */
.band { background: var(--green); color: #E8EFE9; }
.band h2, .band h3 { color: var(--ivory); }
.band .eyebrow { color: var(--gold-soft); }
.band .lede { color: #C9D6CD; }
.band-split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
@media (max-width: 860px) { .band-split { grid-template-columns: 1fr; } }
.ticks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.ticks li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; align-items: start; }
.ticks li::before { content: ""; margin-top: .55em; width: 9px; height: 9px; transform: rotate(45deg); border: 1.5px solid var(--gold); }
.band .ticks li::before { border-color: var(--gold-soft); }
.studio-shot { border-radius: var(--r); overflow: hidden; background: var(--stone); box-shadow: 0 20px 50px rgba(0,0,0,.25); }

/* steps (a real sequence, so numbered) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: s; border-top: 1px solid var(--line); }
.steps li { counter-increment: s; padding: 22px 18px 4px 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.steps li::before { content: counter(s); font: 600 2.4rem/1 var(--display); color: var(--gold); }
.steps b { font-family: var(--display); font-size: 1.3rem; color: var(--green); font-weight: 600; }
.steps p { color: var(--muted); font-size: .95rem; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } .steps li { grid-template-columns: 44px 1fr; column-gap: 12px; } .steps li::before { grid-row: span 2; } }

/* collections */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.filter { border: 1px solid var(--line); background: var(--white); color: var(--ink); border-radius: 999px; padding: 9px 16px; font: 600 .88rem var(--body); cursor: pointer; min-height: 40px; }
.filter[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--ivory); }
.style-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 28px); }
.style-tile { display: grid; grid-template-rows: auto 1fr; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; color: var(--ink); text-decoration: none; transition: border-color .2s, transform .2s; }
.style-tile:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--ink); }
.style-tile .ph { aspect-ratio: 4 / 5; background: radial-gradient(110% 80% at 50% 25%, #FFFFFF, var(--stone) 70%); overflow: hidden; }
.style-tile .ph img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
.style-tile .body { display: grid; gap: 8px; padding: 18px 20px 20px; align-content: start; }
.style-tile .meta { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.style-tile h3 { font-size: 1.4rem; }
.style-tile .price { font-weight: 700; color: var(--green); white-space: nowrap; font-variant-numeric: tabular-nums; }
.style-tile p { color: var(--muted); font-size: .94rem; }
.style-tile .cta { margin-top: 4px; font-weight: 700; font-size: .9rem; color: var(--green); }
.tag { justify-self: start; font: 700 .68rem/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.swatch-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .swatch-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .style-grid { grid-template-columns: 1fr; } .swatch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swatch { display: grid; gap: 8px; }
.swatch canvas { width: 100%; aspect-ratio: 1; border-radius: 10px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.swatch b { font-size: .92rem; line-height: 1.3; }
.swatch span { font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; }

/* prices */
.price-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.price-table th, .price-table td { padding: 16px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.price-table th { font: 700 .74rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.price-table td:last-child, .price-table th:last-child { text-align: right; white-space: nowrap; }
.price-table td b { font-family: var(--display); font-size: 1.25rem; color: var(--green); font-weight: 600; }
.price-table .amt { font: 600 1.35rem var(--display); color: var(--green); }
.table-wrap { overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 56px); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.callout { padding: 22px 24px; background: var(--sage); border-radius: var(--r); color: var(--ink); }
.callout h3 { margin-bottom: 8px; }
.placeholder-note { font-size: .85rem; color: var(--muted); padding: 10px 14px; border: 1px dashed var(--gold); border-radius: 10px; background: #FFF9EC; }

/* timeline */
.timeline { display: grid; grid-template-columns: 1fr 1fr; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.timeline > div { padding: 20px 22px; background: var(--white); display: grid; gap: 4px; }
.timeline > div + div { background: var(--stone); border-left: 1px solid var(--line); }
.timeline b { font: 600 2rem/1 var(--display); color: var(--green); }
.timeline span { color: var(--muted); font-size: .92rem; }

/* faq */
.faq { display: grid; gap: 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 32px 16px 0; font: 600 1.25rem var(--display); color: var(--green); position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font: 400 1.6rem var(--body); color: var(--gold-ink); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 18px; color: var(--muted); max-width: 46em; }

/* story */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.pillars > div { padding: 22px 20px 6px 0; display: grid; gap: 8px; min-width: 0; }
.pillars b { font: 600 1.5rem var(--display); color: var(--green); }
.pillars p { color: var(--muted); font-size: .95rem; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .pillars { grid-template-columns: 1fr; } }
.logo-frame { background: var(--ivory); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(16px, 3vw, 32px); max-width: 460px; }
.quote-line { font: italic 500 clamp(1.6rem, 3vw, 2.3rem)/1.25 var(--display); color: var(--green); max-width: 26em; }

/* forms */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font: 600 .9rem var(--body); color: var(--ink); }
.field .opt-hint { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #CFC5B2; border-radius: 10px; background: var(--white); color: var(--ink); font: 400 1rem var(--body); }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.status { min-height: 1.5em; font-size: .95rem; color: var(--green); }
.contact-card { display: grid; gap: 14px; padding: 26px; background: var(--stone); border-radius: var(--r); align-content: start; }
.contact-card .addr { font: 600 1.15rem var(--body); color: var(--green); word-break: break-word; user-select: all; }

/* footer */
.site-footer { background: var(--green-deep); color: #C5D2C8; padding-bottom: env(safe-area-inset-bottom, 0px); }
.site-footer .tri-rule { opacity: .55; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; padding-block: 56px 32px; }
.foot h4 { margin: 0 0 12px; font: 700 .74rem var(--body); letter-spacing: .18em; text-transform: uppercase; color: var(--gold-soft); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: #E6EDE7; text-decoration: none; font-size: .95rem; }
.foot a:hover { color: var(--gold-soft); text-decoration: underline; }
.foot .tagline { font: italic 500 1.5rem/1.2 var(--display); color: var(--ivory); margin: 8px 0 10px; }
.foot-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding-block: 18px 26px; border-top: 1px solid rgba(255,255,255,.1); font-size: .84rem; color: #9FB1A4; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }
.foot .brand { color: var(--ivory); }
.foot .brand-word small { color: var(--gold-soft); }

.preview-ribbon { background: var(--gold); color: var(--green-deep); text-align: center; font: 600 .8rem/1.4 var(--body); padding: 6px max(16px, env(safe-area-inset-right, 0px)) 6px max(16px, env(safe-area-inset-left, 0px)); }

/* ---------------- 3D studio ---------------- */
.studio-page body, body.studio-body { background: var(--stone); }
.studio { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); min-height: calc(100vh - var(--header-h)); }
.viewer { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); height: calc(100vh - var(--header-h) - env(safe-area-inset-top, 0px)); background: radial-gradient(90% 70% at 50% 35%, #FFFFFF 0%, #F6F1E6 55%, #E8DFCD 100%); overflow: hidden; }
.viewer canvas { width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.v-top { position: absolute; top: 14px; left: 14px; right: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
.v-top > * { pointer-events: auto; }
.v-badge { display: inline-flex; gap: 8px; align-items: center; padding: 7px 12px; border-radius: 999px; background: rgba(252, 249, 242, .9); font: 600 .76rem/1.2 var(--body); color: var(--muted); box-shadow: 0 0 0 1px var(--line); }
.v-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.v-tools { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; background: rgba(252, 249, 242, .95); border-radius: 999px; box-shadow: var(--shadow), 0 0 0 1px var(--line); max-width: calc(100% - 24px); overflow-x: auto; scrollbar-width: none; }
.v-tools::-webkit-scrollbar { display: none; }
.v-tools button { flex: none; min-width: 40px; height: 38px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--green); font: 700 .8rem var(--body); cursor: pointer; display: inline-grid; place-items: center; }
.v-tools button:hover { background: var(--stone); }
.v-tools button[aria-pressed="true"] { background: var(--green); color: var(--ivory); }
.v-tools .sep { width: 1px; background: var(--line); margin: 6px 2px; flex: none; }
.v-tools svg { width: 18px; height: 18px; }
.v-hint { position: absolute; left: 0; right: 0; bottom: 66px; text-align: center; font-size: .78rem; color: var(--muted); pointer-events: none; padding-inline: 16px; }
.v-hint .touch { display: none; }
@media (hover: none) { .v-hint .mouse { display: none; } .v-hint .touch { display: inline; } }

.panel { background: var(--ivory); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.panel-head { padding: 22px 24px 8px; display: grid; gap: 6px; }
.panel-head h1 { font-size: clamp(1.9rem, 3vw, 2.4rem); }
.panel-head p { color: var(--muted); font-size: .95rem; }
.style-strip { display: flex; gap: 10px; overflow-x: auto; padding: 12px 24px 16px; scroll-snap-type: x proximity; scrollbar-width: thin; }
.style-card { flex: 0 0 168px; scroll-snap-align: start; display: grid; gap: 4px; align-content: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; position: relative; }
.style-card input { position: absolute; opacity: 0; pointer-events: none; }
.style-card:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); background: #F3F7F2; }
.style-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.s-cat { font: 700 .64rem var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-ink); }
.s-name { font: 600 1.08rem/1.15 var(--display); color: var(--green); }
.s-price { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
#style-blurb { padding: 0 24px 6px; color: var(--muted); font-size: .92rem; }
.tabs { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 5; display: flex; gap: 2px; padding: 8px 24px 0; background: var(--ivory); border-bottom: 1px solid var(--line); }
.tabs button { flex: 1; padding: 12px 8px 13px; border: 0; background: none; font: 700 .8rem var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button[aria-selected="true"] { color: var(--green); border-bottom-color: var(--gold); }
#tab-body { padding: 8px 24px 20px; display: grid; gap: 4px; }
.opt { border: 0; margin: 0; padding: 14px 0 10px; display: grid; gap: 10px; min-width: 0; border-bottom: 1px dashed var(--line); }
.opt legend, .opt .legend { padding: 0; font: 700 .74rem var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); }
.opt legend { margin-bottom: 10px; float: left; width: 100%; }
.opt legend + * { clear: both; }
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.opt output { font: 700 .9rem var(--body); color: var(--green); font-variant-numeric: tabular-nums; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 8px 14px; border: 1px solid #D8CDB9; border-radius: 999px; background: var(--white); font: 600 .86rem var(--body); color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s; user-select: none; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:hover { border-color: var(--gold); }
.chip:has(input:checked), .chip-btn.on { background: var(--green); border-color: var(--green); color: var(--ivory); }
.chip:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.chip-btn { font-family: var(--body); }
.dots { display: inline-flex; }
.dots i { width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 1.5px var(--white), 0 0 0 2.5px rgba(0,0,0,.12); }
.dots i + i { margin-left: -5px; }
.seg-tight .chip { flex: 1; justify-content: center; }
input[type="range"] { width: 100%; accent-color: var(--green); height: 28px; }
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: .92rem; }
.switch input { position: absolute; opacity: 0; }
.switch .track { width: 44px; height: 26px; border-radius: 999px; background: #D8CDB9; position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--white); transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + .track { background: var(--green); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--gold); outline-offset: 2px; }
.fabric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.fabric { position: relative; display: grid; gap: 4px; padding: 6px 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.fabric input { position: absolute; opacity: 0; }
.fabric canvas { width: 100%; aspect-ratio: 1; border-radius: 8px; }
.fabric:has(input:checked) { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.fabric:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.f-name { font: 600 .8rem/1.25 var(--body); }
.f-price { font-size: .76rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.hint { font-size: .82rem; color: var(--muted); }
.note { font-size: .86rem; color: var(--muted); padding: 12px 14px; background: var(--stone); border-radius: 10px; margin-top: 10px; }
.quote { margin: 8px 24px 24px; padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 2px; }
.q-title { font-size: 1.5rem; margin-bottom: 8px; }
.q-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: .92rem; border-bottom: 1px dotted var(--line); }
.q-row .num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.q-sub { color: var(--muted); padding-left: 12px; font-size: .86rem; }
.q-total { border-bottom: 0; padding-top: 12px; font-size: 1.05rem; font-weight: 700; color: var(--green); }
.q-total .num { font: 600 1.6rem/1 var(--display); }
.flags { list-style: none; padding: 10px 12px; margin: 8px 0; background: #FFF6E2; border-radius: 10px; display: grid; gap: 4px; font-size: .84rem; color: #6B4A10; }
.flags li::before { content: "\25C6"; color: var(--gold); margin-right: 8px; font-size: .7em; vertical-align: 2px; }
.panel-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 24px 28px; }
.mobile-bar { display: none; }

@media (max-width: 960px) {
  .studio { grid-template-columns: 1fr; min-height: 0; }
  .viewer { position: sticky; top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); z-index: 4; height: 52svh; min-height: 300px; border-bottom: 1px solid var(--line); }
  .panel { border-left: 0; padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .tabs { top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 52svh); }
  .panel-head { padding: 18px var(--gutter-r) 4px var(--gutter); }
  .style-strip { padding-left: var(--gutter); padding-right: var(--gutter-r); }
  #style-blurb, #tab-body { padding-left: var(--gutter); padding-right: var(--gutter-r); }
  .tabs { padding-left: var(--gutter); padding-right: var(--gutter-r); }
  .tabs button { font-size: .72rem; letter-spacing: .06em; padding-inline: 4px; }
  .quote { margin-left: var(--gutter); margin-right: var(--gutter-r); }
  .panel-actions { padding-left: var(--gutter); padding-right: var(--gutter-r); }
  .v-hint { display: none; }
  .v-tools { bottom: 10px; }
  .v-top { top: 10px; left: 10px; right: 10px; }
  .mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; align-items: center; justify-content: space-between; gap: 12px; padding: 12px var(--gutter-r) calc(12px + env(safe-area-inset-bottom, 0px)) var(--gutter); background: var(--green); color: var(--ivory); box-shadow: 0 -6px 20px rgba(0,0,0,.15); }
  .mobile-bar .mb-total { display: grid; line-height: 1.2; min-width: 0; }
  .mobile-bar small { font-size: .74rem; color: #BFD0C4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-bar b { font: 600 1.5rem var(--display); }
  .mobile-bar .btn { min-height: 44px; padding: 10px 18px; }
  .site-footer.studio-foot { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 960px) and (max-height: 560px) { .viewer { position: relative; top: 0; height: 70vh; } .tabs { top: calc(var(--header-h) + env(safe-area-inset-top, 0px)); } }

/* review dialog */
dialog.review { width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 0; border-radius: 18px; background: var(--ivory); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
dialog.review::backdrop { background: rgba(6, 42, 24, .55); }
.review-inner { display: grid; gap: 18px; padding: clamp(18px, 3vw, 32px); }
.review-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--green); flex: none; }
.review-grid { display: grid; grid-template-columns: 200px 1fr; gap: 20px; align-items: start; }
@media (max-width: 600px) { .review-grid { grid-template-columns: 1fr; } .review-grid img { max-width: 220px; } }
.review-grid img { border-radius: 12px; background: var(--stone); width: 100%; }
.spec { margin: 0; display: grid; gap: 0; font-size: .9rem; }
.spec-row { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px dotted var(--line); }
.spec dt { color: var(--muted); }
.spec dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.copy-fallback { width: 100%; min-height: 120px; font: .8rem/1.4 ui-monospace, monospace; margin-top: 8px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--green); color: var(--ivory); padding: 10px 16px; border-radius: 8px; }
.skip:focus { left: max(16px, env(safe-area-inset-left, 0px)); }
@media (hover: none) { #zoom-in, #zoom-out, .v-tools .sep:nth-of-type(2) { display: none; } }
#tab-body .opt, #tab-body .chip, #tab-body input, .quote, .panel-actions { scroll-margin-top: calc(var(--header-h) + 64px); scroll-margin-bottom: 24px; }
@media (max-width: 960px) {
  #tab-body .opt, #tab-body .chip, #tab-body input, .quote, .panel-actions { scroll-margin-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 52svh + 60px); scroll-margin-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
}
