@font-face { font-family: 'Taiga Sans'; src: url('/assets/fonts/Manrope-Regular.ttf') format('truetype'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Taiga Sans'; src: url('/assets/fonts/Manrope-Semibold.ttf') format('truetype'); font-weight: 600 700; font-display: swap; }
@font-face { font-family: 'Taiga Display'; src: url('/assets/fonts/Prata-Regular.ttf') format('truetype'); font-display: swap; }

:root {
  --pine: #16362b;
  --pine-deep: #0d261f;
  --paper: #f6f4ee;
  --cream: #fffcf6;
  --ink: #1c2d23;
  --muted: #506256;
  --soft: #e7ecdf;
  --line: #d5dcd1;
  --display: 'Taiga Display', Georgia, serif;
  --edge: clamp(14px, 4vw, 36px);
}
* { box-sizing: border-box; }
[hidden], .app-live:empty { display: none !important; }
html { color-scheme: light; scroll-padding-bottom: calc(102px + env(safe-area-inset-bottom)); }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.5 'Taiga Sans', Arial, sans-serif; }
a, button { color: inherit; -webkit-tap-highlight-color: transparent; }
button, select, input { font: inherit; }
button, select { cursor: pointer; }
img { display: block; max-width: 100%; }
i[data-glyph], .app-tabs i { display: inline-flex; flex: 0 0 auto; }
.app-ui, .app-tabs svg, .app-icon svg, .app-button svg { width: 21px; height: 21px; }
:focus-visible { outline: 2px solid #536e53; outline-offset: 3px; }
.app-skip, .app-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.app-skip:focus { z-index: 5; top: 8px; left: 14px; width: auto; height: auto; padding: 10px 14px; clip-path: none; background: var(--cream); border-radius: 20px; }
.app-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px;
  max-width: 1160px; margin-inline: auto; padding: max(8px, env(safe-area-inset-top)) var(--edge) 8px;
}
.app-brand {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; text-decoration: none;
  color: var(--pine-deep); font: clamp(21px, 4.8vw, 27px)/1.1 var(--display); letter-spacing: .17em;
}
.app-brand span { width: 19px; height: 27px; background: currentColor; mask: url('/assets/brand-pine.svg') center/contain no-repeat; }
.app-header-actions { display: flex; align-items: center; gap: clamp(4px, 2vw, 12px); flex: 0 0 auto; }
.app-icon, .app-favorite, .app-install {
  min-height: 44px; min-width: 44px; border: 0; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center; background: var(--soft); color: var(--pine-deep);
}
.app-install { gap: 6px; background: var(--cream); padding: 6px 12px; font-size: 12px; font-weight: 700; }
.app-install svg { width: 17px; height: 17px; }
.app-main {
  max-width: 1160px; min-height: calc(100dvh - 140px); margin-inline: auto;
  padding: 0 var(--edge) calc(116px + env(safe-area-inset-bottom));
}
.app-main:focus, .app-main h1:focus { outline: none; }
.app-main h1, .app-main h2, .app-dialog h2 { margin: 0; font: 400 1em/1.15 var(--display); }
.app-main h1 { font-size: clamp(31px, 5.6vw, 56px); margin: 8px 0 19px; }
.app-main h2, .app-dialog h2 { font-size: clamp(20px, 3.4vw, 28px); }
.app-hero {
  isolation: isolate; position: relative; min-height: clamp(335px, 43vw, 495px);
  display: grid; align-items: end; overflow: hidden; border-radius: clamp(24px, 4.2vw, 46px);
  color: #fffaf0; background: var(--pine-deep);
}
.app-hero img, .app-hero::after { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.app-hero img { object-fit: cover; object-position: center 46%; }
.app-hero::after { content: ''; background: linear-gradient(90deg,#0b221cee 0%,#0b221c86 48%,#0b221c12 80%); }
.app-hero-copy { padding: clamp(23px, 5vw, 62px); }
.app-hero h1 { margin: 0; font-size: clamp(39px, 8vw, 78px); line-height: 1.4; letter-spacing: -.045em; }
.app-hero p { margin: 10px 0 20px; color: #fff8e9; font-size: clamp(13px, 2vw, 17px); }
.app-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 46px;
  max-width: 100%; padding: 8px 17px; border: 1px solid transparent; border-radius: 999px;
  text-decoration: none; text-align: center; font-size: 13px; font-weight: 700; line-height: 1.25;
}
.app-button-light { color: var(--pine-deep); background: #fff8e9; }
.app-button-glass { color: #fffaf0; background: #0c261cbb; border-color: #ede8db8f; }
.app-button-dark { color: #fffdf5; background: var(--pine); }
.app-button-outline { color: var(--pine); background: transparent; border-color: #65786b; }
.app-entryways { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; margin-block: 14px 26px; }
.app-categories { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.app-categories a, .app-card-link {
  display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 61px; padding: 10px; border-radius: 20px;
  background: var(--cream); text-decoration: none; font-weight: 700;
}
.app-categories a:nth-child(2) { background: #eee5d8; }
.app-card-link { justify-content: flex-start; padding: 12px 16px; background: var(--soft); }
.app-card-link h2 { margin-bottom: 3px; font-size: 20px; }
.app-card-link p { margin: 0; color: var(--muted); font-size: 12px; font-weight: 400; }
.app-card-arrow { margin-left: auto; }
.app-section-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 12px; }
.app-section-heading a { display: inline-flex; align-items: center; gap: 3px; min-height: 44px; font-weight: 700; text-decoration: none; }
.app-section-heading a svg { width: 16px; }
.app-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2vw, 15px); }
.app-product { position: relative; min-width: 0; border-radius: 22px; background: var(--cream); }
.app-product-open {
  display: grid; width: 100%; min-width: 0; grid-template-rows: auto minmax(25px, auto) auto;
  gap: 4px; padding: 9px 10px 14px; border: 0; border-radius: inherit; background: transparent; text-align: left;
}
.app-product-open img { width: 100%; height: clamp(80px, 13vw, 135px); object-fit: contain; margin-bottom: 7px; border-radius: 15px; background: #f2efe8; }
.app-model-name { font-weight: 700; font-size: clamp(13px, 1.55vw, 17px); overflow-wrap: anywhere; }
.app-price { font-weight: 600; color: var(--muted); white-space: nowrap; }
.app-model-name, .app-price { margin-inline-end: 37px; padding-inline-start: 2px; }
.app-favorite { padding: 0; }
.app-product .app-favorite { position: absolute; bottom: 7px; right: 7px; }
.app-favorite[aria-pressed="true"] svg { fill: #843f35; stroke: #843f35; }
.app-search {
  display: flex; align-items: center; gap: 7px; max-width: 590px; min-height: 53px; padding: 3px 5px 3px 16px;
  margin-bottom: 12px; border: 1px solid #96a498; border-radius: 999px; background: var(--cream);
}
.app-search:focus-within { outline: 2px solid #536e53; outline-offset: 1px; }
.app-search input { min-width: 0; flex: 1; min-height: 44px; border: 0; background: transparent; font-size: 16px; color: inherit; outline: none; }
.app-search input::-webkit-search-cancel-button { display: none; }
.app-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.app-filters button {
  min-height: 44px; padding: 6px 15px; border: 1px solid transparent; border-radius: 999px;
  color: var(--pine-deep); background: var(--soft); font-weight: 700;
}
.app-filters button[aria-pressed="true"] { background: var(--pine); color: #fff; }
.app-results-bar { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 3px 8px; margin: 9px 0 6px; }
.app-count, .app-catalog-note { color: var(--muted); }
.app-count { margin: 0; }
.app-sort select { min-height: 44px; max-width: 100%; padding-inline: 8px; border: 0; border-radius: 12px; color: var(--pine-deep); background: transparent; }
.app-catalog-note { margin: 17px 0 0; font-size: 12px; }
.app-empty { display: grid; justify-items: start; gap: 10px; padding: clamp(22px, 6vw, 44px); border-radius: 26px; background: var(--cream); }
.app-empty p { margin: 0; color: var(--muted); }
.app-empty svg { width: 34px; height: 34px; color: var(--pine); }
.app-terms { margin-top: 15px; padding: 5px 16px 10px; border-radius: 18px; background: var(--cream); }
.app-terms summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.app-terms p { margin: 0 0 8px; }
.app-terms a { display: inline-flex; align-items: center; min-height: 44px; }
.app-tabs {
  position: fixed; z-index: 2; left: 50%; bottom: max(8px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); width: min(520px, calc(100% - 22px));
  padding: 4px; border: 1px solid var(--line); border-radius: 26px; background: #fdfbf6; box-shadow: 0 5px 27px #20382b23;
}
.app-tabs a {
  display: grid; align-content: center; justify-items: center; gap: 2px; min-width: 0; min-height: 60px;
  color: var(--muted); text-decoration: none; text-align: center; font-size: clamp(11px, 2.55vw, 13px); overflow-wrap: anywhere;
}
.app-tabs i { display: grid; place-items: center; width: 47px; height: 28px; border-radius: 999px; }
.app-tabs a[aria-current="page"] { color: var(--pine-deep); font-weight: 700; }
.app-tabs a[aria-current="page"] i { color: #fff7e8; background: var(--pine); }
.app-dialog {
  width: min(520px, calc(100% - 24px)); max-height: min(88dvh, 800px); padding: clamp(15px, 4.7vw, 26px);
  border: 0; border-radius: 29px; background: var(--cream); color: var(--ink); box-shadow: 0 16px 60px #091b2152;
}
.app-dialog::backdrop { background: #071a14a6; }
.app-dialog .app-section-heading { flex-wrap: nowrap; }
.app-dialog h2 { min-width: 0; overflow-wrap: anywhere; }
.app-dialog .app-icon { flex: 0 0 44px; }
.app-dialog :is(img, canvas) { width: 100%; height: clamp(112px, 36vw, 190px); object-fit: contain; border-radius: 17px; background: #f2efe8; }
.app-model-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.app-model-meta strong { font: 400 25px/1.2 var(--display); }
.app-model-meta small { color: var(--muted); }
.app-swatch-list { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 5px 0 10px; }
.app-swatch-list button {
  width: 44px; height: 44px; border-radius: 50%; border: 2px solid transparent; background: none; display: grid; place-items: center; padding: 0;
}
.app-swatch-list button::before { content: ''; width: 29px; height: 29px; border-radius: 50%; background: var(--tint); border: 1px solid #35433981; }
.app-swatch-list button[aria-pressed="true"] { border-color: var(--pine); }
.app-model-data { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.app-model-data span { border-radius: 999px; padding: 5px 10px; background: var(--soft); color: var(--pine); }
.app-model-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.app-live, .app-update {
  position: fixed; z-index: 3; left: 50%; bottom: calc(79px + max(8px, env(safe-area-inset-bottom))); transform: translateX(-50%);
  max-width: calc(100% - 24px); width: max-content; padding: 10px 16px; background: var(--pine); color: #fff;
  text-align: center; border: 0; border-radius: 20px; margin: 0;
}
.app-update { min-height: 44px; }
.app-update:not([hidden]) + .app-live { bottom: calc(132px + max(8px, env(safe-area-inset-bottom))); }
@media (max-width: 730px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-entryways { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .app-hero img { object-position: 43% 37%; }
  .app-hero::after { background: linear-gradient(0deg,#0b221cf5 2%,#0b221ca3 37%,#0b221c12 79%); }
  .app-hero h1 { line-height: 1.24; }
  .app-hero-copy { padding: 21px 18px; }
  .app-card-link { min-height: 71px; }
  .app-dialog { margin: auto auto 0; border-radius: 29px 29px 0 0; padding-bottom: max(18px, env(safe-area-inset-bottom)); width: min(100%,520px); }
}
@media (max-width: 360px) {
  .app-main { --edge: 12px; }
  .app-hero h1 { font-size: 36px; }
  .app-hero-actions .app-button { padding-inline: 11px; font-size: 12px; }
  .app-header-actions { gap: 3px; }
}
@media (prefers-reduced-motion: no-preference) {
  .app-tabs i, .app-button, .app-favorite { transition: background-color .16s ease; }
}

.app-fitting .app-main { padding-bottom: 28px; }
.app-fitting .ui-icon { width: 20px; height: 20px; }
.fit-head, .fit-start { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fit-head { justify-content: space-between; margin-bottom: 14px; }
.fit-head h1 { margin: 6px 0; }
.fit-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .8fr); gap: 15px; align-items: start; }
.fit-layout #fitting { overflow: hidden; border-radius: 28px; background: var(--pine-deep); color: #fffaf0; }
.app-fitting .camera-view { position: relative; height: clamp(270px, 39vw, 510px); display: grid; place-items: center; }
.app-fitting .camera-placeholder { position: absolute; inset: 0; background: url('/assets/app/fitting-demo.webp') center/cover; }
.app-fitting canvas { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.app-fitting video { position: absolute; width: 1px; height: 1px; pointer-events: none; opacity: 0; }
.fit-controls { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; padding: 9px 11px;}
.fit-controls strong { flex: 1 1 90px; min-width: 0; overflow-wrap: anywhere; }
.fit-controls .app-icon:disabled { opacity: .5; }
.fit-options { padding: clamp(14px, 3vw, 24px); display: grid; gap: 11px; border-radius: 23px; background: var(--cream); }
.fit-options p { margin: 0; }
.fit-options .app-button { justify-self: start; }
.fit-options small { color: var(--muted); }
#fitting-colors { display: flex; flex-wrap: wrap; gap: 5px; }
#fitting-colors button {
  width: 44px; height: 44px; padding: 0; border: 2px solid transparent; border-radius: 50%; background: transparent;
  display: grid; place-items: center;
}
#fitting-colors button::before { content: ''; width: 28px; height: 28px; border-radius: 50%; background: var(--swatch); }
#fitting-colors button[aria-pressed="true"] { border-color: var(--pine); }
.fit-options summary { font-weight: 700; cursor: pointer; padding-block: 9px; }
.fit-options label { display: grid; gap: 4px; margin-block: 5px; }
.fit-options .fit-check { display: flex; align-items: center; min-height: 40px; }
.fit-options input { accent-color: var(--pine); min-width: 0; }
.fit-models { margin-top: 21px; }
.fit-models .app-filters { margin: 10px 0 14px; }
.fit-models .product-card { position: relative; min-width: 0; border-radius: 20px; background: var(--cream); }
.fit-models .model-pick {
  width: 100%; padding: 8px 9px 14px; text-align: left; border: 2px solid transparent; background: transparent; border-radius: inherit;
}
.fit-models .model-pick[aria-pressed="true"] { border-color: #527d5b; }
.fit-models .model-pick h3 { margin: 8px 37px 2px 2px; font-size: 14px; overflow-wrap: anywhere; }
.fit-models .model-pick img { width: 100%; height: clamp(75px, 13vw, 124px); object-fit: contain; border-radius: 14px; background: #f2efe8; }
.fit-models .card-meta { padding-inline-start: 2px; padding-inline-end: 37px; color: var(--muted); }
.fit-models .product-dots { display: none; }
.fit-models .heart {
  position: absolute; right: 7px; bottom: 7px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  display: grid; place-items: center; color: var(--pine); background: var(--soft);
}
.fit-models .heart[aria-pressed="true"] svg { fill: #843f35; stroke: #843f35; }
@media (max-width: 730px) {
  .fit-layout { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .fit-start { gap: 6px; }
  .fit-start .app-button { padding-inline: 11px; }
  .app-fitting .camera-view { height: min(61vw, 420px); min-height: 210px; }
  .app-fitting #fitting[data-mode="sample"] .camera-view { height: auto; max-height: 500px; aspect-ratio: 960 / 1057; }
}
