:root {
  color-scheme: light;
  --paper: #f9f7f5;
  --ink: #121212;
  --muted: #585453;
  --line: #e2dcd8;
  --accent: #7f212a;
  --accent-hover: #651921;
  --white: #fff;
  font-family: -apple-system, system-ui, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:not(:disabled), select { cursor: pointer; }
button:disabled { opacity: .65; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
img { display: block; width: 100%; object-fit: cover; }
.wrap { width: min(1100px, calc(100% - 80px)); margin-inline: auto; }
.header { background: var(--white); }
.header-inner { min-height: 105px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.header-inner > .button { justify-self: end; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: 13px; white-space: nowrap; font-size: 1.04rem; font-weight: 600; letter-spacing: -.02em; }
.brand img { width: 50px; height: 50px; object-fit: contain; }
.brand span { border-left: 1px solid var(--line); padding-left: 13px; line-height: 1.25; }
nav { display: flex; align-items: center; justify-content: center; gap: clamp(17px, 3vw, 32px); font-size: .9rem; white-space: nowrap; }
nav a:hover, .nav-button:hover { text-decoration: underline; text-underline-offset: 5px; }
.nav-button { border: 0; background: transparent; padding: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: .94rem; min-height: 44px; border: 1px solid transparent; border-radius: 999px; padding: 10px 20px; line-height: 1.3; white-space: nowrap; }
.primary { background: var(--accent); color: #fff; }
.primary:hover { background: var(--accent-hover); }
.outline { background: transparent; border-color: #bdb4b0; }
.outline:hover { background: #f3eded; }
.hero { display: grid; place-items: center; text-align: center; position: relative; isolation: isolate; min-height: clamp(390px, 43.5vw, 565px); background: #201410; color: var(--white); overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-position: center 53%; z-index: -2; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #110909b8, #150b0c9c 48%, #170a09a5); }
.hero-copy { width: min(680px, calc(100% - 36px)); padding-block: 52px; }
.hero h1 { font-size: clamp(3rem, 5.3vw, 4.5rem); font-weight: 600; letter-spacing: -.045em; line-height: 1.04; }
.hero-description { font-size: clamp(1rem, 1.7vw, 1.16rem); line-height: 1.47; margin: 16px auto 23px; text-wrap: balance; }
.search { display: flex; align-items: center; width: min(540px, 100%); height: 52px; margin: 0 auto; border-radius: 999px; overflow: hidden; background: #fffdfb; color: var(--ink); }
.search:focus-within { outline: 3px solid #fff; outline-offset: 4px; }
.search input { background: transparent; border: 0; min-width: 0; width: 100%; height: 100%; padding: 0 8px 0 24px; font-size: max(16px, .94rem); color: var(--ink); }
.search input:focus { outline: none; }
.search button { flex: 0 0 56px; height: 100%; display: grid; place-items: center; background: transparent; border: 0; }
.search button:hover, .search button:focus-visible { background: #f2ebea; outline: none; }
.hero-browse { margin-top: 17px; color: var(--white); background: #21141477; border-color: #ffffffb8; }
.hero-browse:hover { background: #281818; }
.hero-browse:focus-visible { outline-color: #fff; }
.market { padding-top: 54px; scroll-margin-top: 20px; }
.market h2 { font-size: clamp(2rem, 4vw, 2.4rem); letter-spacing: -.045em; font-weight: 600; line-height: 1.08; }
.market-title p { color: var(--muted); line-height: 1.5; margin-top: 9px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 25px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.filters, .sorts { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { min-height: 40px; background: transparent; border-radius: 999px; border: 1px solid #d9d1cd; padding: 8px 15px; font-size: .88rem; font-weight: 600; }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filters button:not([aria-pressed="true"]):hover { background: #f3eded; }
select { appearance: none; color: var(--ink); background: var(--white); border: 1px solid #d9d1cd; border-radius: 5px; min-height: 40px; padding: 7px 30px 7px 11px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) center, calc(100% - 10px) center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.sorts select { font-size: .88rem; }
.result-line { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin: 14px 0; font-size: .88rem; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.card { text-align: left; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; min-width: 0; padding: 0; width: 100%; background: transparent; border: 0; border-radius: 0; }
.card:hover .card-title { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.card-photo { background: var(--white); position: relative; aspect-ratio: 1; overflow: hidden; }
.card-photo img { height: 100%; }
.badge { display: inline-flex; padding: 5px 10px; border-radius: 999px; line-height: 1.3; font-size: .77rem; font-weight: 600; background: #fff; color: var(--ink); border: 1px solid #e7e0dc; }
.badge.certified { background: var(--accent); border-color: transparent; color: #fff; }
.card-photo .badge { position: absolute; top: 10px; left: 10px; }
.card-body { padding: 13px 0 6px; display: grid; gap: 7px; }
.card-title { font-size: 1.12rem; font-weight: 600; line-height: 1.32; overflow-wrap: anywhere; }
.price { font-size: 1.06rem; font-weight: 600; }
.card-meta { color: var(--muted); font-size: .84rem; line-height: 1.45; overflow-wrap: anywhere; }
/* Share tracks across cards so wrapped text never shifts a neighboring price. */
@supports (grid-template-rows: subgrid) {
  .card { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 0; align-items: start; }
  .card-body { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 0; padding: 0; align-self: stretch; align-items: start; min-width: 0; }
  .card-body .card-title { padding-top: 13px; padding-bottom: 7px; }
  .card-body .price { padding-bottom: 7px; }
  .card-body .card-meta { padding-bottom: 6px; }
}
.empty { grid-column: 1 / -1; border: 1px dashed #c2b8b4; border-radius: 8px; text-align: center; color: var(--muted); padding: 29px 16px; line-height: 1.5; }
.trust { display: grid; grid-template-columns: 1fr 1fr; margin-block: 45px 60px; border-block: 1px solid var(--line); }
.trust article { display: flex; align-items: start; gap: 15px; padding: 24px 16px 24px 0; }
.trust article + article { border-left: 1px solid var(--line); padding-left: 25px; }
.trust-icon { font-size: 1.25rem; font-weight: 700; color: var(--accent); background: #f0e0e2; border-radius: 50%; display: grid; place-items: center; width: 39px; height: 39px; flex: none; }
.community-icon { background: #eae5e1; color: #4f4240; }
.trust h3 { font-size: 1rem; font-weight: 600; }
.trust p { color: var(--muted); line-height: 1.57; margin-top: 5px; font-size: .94rem; }
.footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 15px 25px; align-items: center; min-height: 94px; font-size: .89rem; }
.footer-inner > a:last-child { margin-left: auto; text-decoration: underline; text-underline-offset: 3px; }
dialog { border: 1px solid #ded9d6; border-radius: 14px; padding: 0; max-width: min(700px, calc(100% - 28px)); width: 100%; max-height: min(88dvh, 870px); color: var(--ink); background: var(--white); box-shadow: 0 24px 80px #21151766; }
dialog::backdrop { background: #190c0d88; }
.dialog-shell { padding: 29px; position: relative; }
.close { position: absolute; top: 14px; right: 14px; background: var(--white); border: 1px solid var(--line); width: 36px; height: 36px; border-radius: 50%; font-size: 1.45rem; line-height: 1; z-index: 1; }
.dialog-title { font-family: inherit; font-size: clamp(1.85rem, 5vw, 2.7rem); font-weight: 500; letter-spacing: -.045em; padding-right: 38px; line-height: 1.05; overflow-wrap: anywhere; }
.dialog-lead, .detail p { color: var(--muted); margin-top: 8px; line-height: 1.5; }
.detail-photo { aspect-ratio: 1.75; background: #eae9df; border-radius: 9px; margin-block: 15px 8px; overflow: hidden; }
.detail-photo img { height: 100%; object-fit: contain; }
.thumbnails { display: flex; gap: 7px; margin: 8px 0 15px; }
.thumbnails button { background: #fff; border: 2px solid transparent; border-radius: 6px; padding: 2px; width: 59px; height: 52px; }
.thumbnails button[aria-pressed="true"] { border-color: #7f212a; }
.thumbnails img { width: 100%; height: 100%; border-radius: 4px; }
.detail-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
.detail-box { padding: 14px; background: #f7eeef; margin-block: 14px; border-radius: 7px; }
.break-lines { white-space: pre-line; overflow-wrap: anywhere; }
.form { display: grid; gap: 14px; margin-top: 19px; }
.form label { display: grid; gap: 5px; font-weight: 650; font-size: .91rem; }
.form small { line-height: 1.4; color: var(--muted); font-size: .84rem; font-weight: 440; }
.form input, .form textarea, .form select { min-width: 0; border: 1px solid #d1cac6; border-radius: 6px; width: 100%; padding: 9px 10px; background-color: var(--white); color: var(--ink); font-weight: 480; }
.form textarea { resize: vertical; min-height: 90px; }
.form select { padding-right: 26px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions, .record-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.detail .form-actions { margin-top: 15px; }
.form-error { color: #8e3221; font-weight: 650; line-height: 1.4; }
.dash-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.dash-nav button { min-height: 36px; border-radius: 30px; border: 1px solid #ddd6d2; padding: 7px 11px; background: transparent; font-size: .86rem; font-weight: 680; }
.dash-nav button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.records { display: grid; gap: 10px; }
.record { border: 1px solid var(--line); border-radius: 7px; padding: 11px; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: start; gap: 11px; }
.record.text-record { display: block; }
.record img { height: 65px; width: 72px; border-radius: 4px; background: #ebe9df; }
.record h3, .record p { overflow-wrap: anywhere; }
.record h3 { font-size: 1rem; }
.record p { color: var(--muted); margin-top: 3px; line-height: 1.48; }
.record .record-actions { margin-top: 8px; }
.record-actions .button { font-size: .83rem; min-height: 36px; padding: 7px 10px; }
.record .plain-link { color: #7f212a; text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; z-index: 5; right: 18px; bottom: 18px; max-width: min(390px, calc(100vw - 36px)); background: var(--accent); color: white; border-radius: 8px; padding: 14px 18px; box-shadow: 0 8px 17px #21151744; line-height: 1.4; }
@media (max-width: 900px) {
  .wrap { width: calc(100% - 48px); }
  .header-inner { min-height: 84px; gap: 17px; }
  nav { gap: 16px; }
}
@media (max-width: 800px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; }
  .market { padding-top: 38px; }
}
@media (max-width: 640px) {
  .wrap { width: calc(100% - 30px); }
  .header-inner { grid-template-columns: 1fr auto auto; min-height: 72px; gap: 12px; }
  .header-inner .button { font-size: .82rem; padding-inline: 12px; }
  nav { font-size: .83rem; }
  nav .nav-browse, nav .nav-store { display: none; }
  .brand { font-size: .91rem; gap: 7px; }
  .brand img { width: 39px; height: 39px; }
  .brand span { padding-left: 7px; }
  .hero { min-height: 372px; }
  .hero h1 { font-size: clamp(2.6rem, 9.5vw, 3.5rem); }
  .hero-photo { object-position: 57% 53%; }
  .hero-description { margin: 14px auto 19px; }
  .toolbar { margin-top: 15px; }
  .filters { gap: 5px; }
  .filters button { padding-inline: 9px; min-height: 38px; }
  .result-line { flex-direction: column; gap: 3px; }
  .card-title { font-size: .98rem; }
  .card-photo .badge { top: 6px; left: 6px; }
  .badge { font-size: .73rem; padding: 4px 6px; }
  .trust { grid-template-columns: 1fr; margin-bottom: 36px; }
  .trust article + article { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .footer-inner { min-height: 77px; }
  .dialog-shell { padding: 21px 17px; }
}
@media (max-width: 350px) {
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; row-gap: 0; padding-block: 8px; }
  .header-inner nav { grid-column: 1 / -1; grid-row: 2; justify-content: start; }
  .header-inner > .button { grid-column: 2; grid-row: 1; }
  .brand img { width: 32px; height: 32px; }
  .brand span { font-size: .79rem; }
  .header-inner .button { padding-inline: 9px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
