:root {
  --ivory: #F1EEE4; --trav: #E2DECF; --seal: #F7F3EA; --white: #FFFFFF;
  --walnut: #252919; --olive: #3A3E28; --muted: #5B5F4E; --line: #D9D4C4;
  --gold: #C4A062; --gold-light: #E2C487; --gold-deep: #74602E;
  --women: #8E3B54; --women-bg: #F6E6EA; --men: #2F4C6B; --men-bg: #E3ECF4; --unisex: #4D5B2A; --unisex-bg: #E8EDD9;
  --display: "Bricolage Grotesque", Georgia, serif; --ui: "Jost", system-ui, sans-serif;
  --r: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--walnut); font: 400 17px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* top bar */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 20px; padding: 12px 24px; padding-top: max(12px, env(safe-area-inset-top));
  background: var(--walnut); color: var(--ivory); }
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.brand img { border-radius: 10px; }
.brand span { display: flex; flex-direction: column; line-height: 1.2; }
.brand strong { font: 600 18px var(--display); }
.brand small { font-size: 13px; color: var(--gold-light); }
.search { flex: 1; position: relative; max-width: 720px; margin-left: auto; }
.search svg { position: absolute; left: 16px; top: 50%; width: 22px; height: 22px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.search input { width: 100%; height: 52px; border: 0; border-radius: 26px; padding: 0 52px; font: 400 18px var(--ui); background: var(--seal); color: var(--walnut); -webkit-appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--trav); font-size: 24px; line-height: 1; }

main { padding: 28px 24px 64px; max-width: 1240px; margin: 0 auto; outline: none; }
.section { margin-top: 36px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.kicker { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); font-weight: 500; }

/* dashboard */
.welcome { display: block; }
.welcome .intro { background: var(--olive); color: var(--ivory); border-radius: var(--r); padding: 28px; }
.welcome .intro h1 { font-size: 34px; margin: 6px 0 10px; }
.welcome .intro p { margin: 0 0 16px; color: var(--trav); }
.welcome .intro .kicker { color: var(--gold-light); }
.tries { display: flex; flex-wrap: wrap; gap: 8px; }
.tries button { border: 1px solid rgba(226,196,135,.5); background: transparent; color: var(--ivory); border-radius: 20px; padding: 8px 14px; font-size: 15px; }

.tiles { display: grid; gap: 12px; }
.tiles.four { grid-template-columns: repeat(4, 1fr); }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.tiles.six { grid-template-columns: repeat(3, 1fr); }
.tiles.brands { grid-template-columns: repeat(4, 1fr); }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 92px; padding: 16px 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); transition: transform .08s; }
.tile:active { transform: scale(.98); }
.tile h3 { font-size: 20px; }
.tile .count { color: var(--muted); font-size: 15px; }
.tile .prices { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.tile .prices span { white-space: nowrap; }
.tile .prices b { color: var(--walnut); font-weight: 500; }
.refine { margin-top: 14px; }
.filters[hidden] { display: none; }
.mini .tag:nth-child(3) { display: none; }
.tile.tier { border-top: 4px solid var(--gold); }
.tile.tier.Signature { border-top-color: #B9B29A; } .tile.tier.Premium { border-top-color: var(--gold); }
.tile.tier.Exclusive { border-top-color: var(--olive); } .tile.tier.Prestige { border-top-color: var(--walnut); }
.tile.g-Women { background: var(--women-bg); border-color: transparent; color: var(--women); }
.tile.g-Men { background: var(--men-bg); border-color: transparent; color: var(--men); }
.tile.g-Unisex { background: var(--unisex-bg); border-color: transparent; color: var(--unisex); }
.tile.g-Women .count, .tile.g-Men .count, .tile.g-Unisex .count { color: inherit; opacity: .85; }
.tile.mood { flex-direction: row; align-items: center; gap: 14px; }
.tile.mood .dot { width: 44px; height: 44px; border-radius: 50%; flex: none; }
.tile.brand-tile { min-height: 76px; justify-content: flex-start; }
.tile.brand-tile h3 { font-size: 16px; margin-top: 10px; }
.brand-tile .logo { height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--seal); padding: 10px 16px; }
.brand-tile .logo img { max-height: 40px; max-width: 100%; width: auto; object-fit: contain; }
.brand-tile .wordmark { font: 500 15px var(--ui); letter-spacing: .16em; text-transform: uppercase; text-align: center; color: var(--walnut); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border-radius: 20px; background: var(--white); border: 1px solid var(--line); font-size: 15px; }
.chip small { color: var(--muted); font-size: 13px; }
.chip.on { background: var(--olive); color: var(--ivory); border-color: var(--olive); }
.chip.on small { color: var(--gold-light); }
.link-btn { border: 0; background: none; color: var(--gold-deep); font-weight: 500; padding: 8px 0; font-size: 15px; }

/* list */
.list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.list-head h1 { font-size: 30px; }
.list-head p { margin: 4px 0 0; color: var(--muted); }
.filters { margin-top: 18px; display: grid; gap: 10px; }
.filter-row { display: flex; align-items: center; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px; }
.filter-row::-webkit-scrollbar { display: none; }
.filter-row > span { flex: none; width: 92px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.filter-row .chip { flex: none; }
.active { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.active .chip { background: var(--trav); border-color: transparent; }
.active .chip b { font-weight: 500; }
.sort { display: flex; gap: 6px; }
.sort .chip { min-height: 36px; font-size: 14px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty h2 { color: var(--walnut); margin-bottom: 8px; }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 20px; }
.card { background: var(--white); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); display: flex; flex-direction: column; transition: transform .08s; }
.card:active { transform: scale(.98); }
.card .ph { aspect-ratio: 1000/1000; overflow: hidden; background: var(--trav); }
.card .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 19px; }
.card .orig { font-size: 14px; color: var(--muted); line-height: 1.35; }
.card .orig b { color: var(--walnut); font-weight: 500; }
.card .tags { margin-top: auto; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: 12.5px; padding: 3px 9px; border-radius: 12px; background: var(--seal); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.tag.g-Women { background: var(--women-bg); color: var(--women); border-color: transparent; }
.tag.g-Men { background: var(--men-bg); color: var(--men); border-color: transparent; }
.tag.g-Unisex { background: var(--unisex-bg); color: var(--unisex); border-color: transparent; }
.tag.tier { background: var(--walnut); color: var(--gold-light); border-color: transparent; }
.code { font-size: 13px; color: var(--gold-deep); letter-spacing: .04em; font-weight: 500; }

/* detail */
.back { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 8px 0; color: var(--muted); font-size: 16px; }
.detail { display: grid; grid-template-columns: 360px 1fr; gap: 28px; margin-top: 8px; align-items: start; }
.detail .side { position: sticky; top: 96px; display: grid; gap: 14px; }
.detail .photo { border-radius: var(--r); overflow: hidden; background: var(--trav); }
.prices-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; }
.prices-box .row { display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); }
.prices-box .row:last-child { border-bottom: 0; }
.prices-box .row b { font: 600 20px var(--display); }
.prices-box .row span { color: var(--muted); font-size: 14px; }
.head h1 { font-size: 44px; margin: 4px 0 6px; }
.impression { margin-top: 14px; background: var(--olive); color: var(--ivory); border-radius: var(--r); padding: 18px 20px; }
.impression .kicker { color: var(--gold-light); }
.impression .name { font: 600 28px var(--display); margin-top: 4px; }
.impression .name a { border-bottom: 1px solid rgba(226,196,135,.5); }
.impression .by { color: var(--trav); margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.fact { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.fact span { display: block; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.fact b { font-weight: 500; font-size: 18px; }
.fact.g-Women { background: var(--women-bg); border-color: transparent; color: var(--women); }
.fact.g-Men { background: var(--men-bg); border-color: transparent; color: var(--men); }
.fact.g-Unisex { background: var(--unisex-bg); border-color: transparent; color: var(--unisex); }
.fact.g-Women span, .fact.g-Men span, .fact.g-Unisex span { color: inherit; opacity: .8; }
.fact small { display: block; font-size: 13px; opacity: .85; }
.block { margin-top: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.block h2 { font-size: 21px; margin-bottom: 12px; }
.pyramid { display: grid; gap: 12px; }
.pyramid .tier-row { display: grid; grid-template-columns: 82px 1fr; gap: 12px; align-items: start; }
.pyramid .tier-row > span { padding-top: 9px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.note-chip { min-height: 38px; }
.pending { margin-top: 10px; font-size: 14px; color: var(--gold-deep); background: var(--seal); border-radius: 10px; padding: 8px 12px; }
.guide { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.guide li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; }
.guide li i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--seal); color: var(--gold-deep); display: grid; place-items: center; font-size: 14px; font-weight: 500; }
.mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mini .card .body { padding: 10px 12px 12px; }
.mini .card h3 { font-size: 17px; }
.mini .shared { font-size: 13px; color: var(--gold-deep); }

/* iPad portrait and smaller */
@media (max-width: 1100px) {
  .grid, .tiles.brands { grid-template-columns: repeat(3, 1fr); }
  .detail { grid-template-columns: 300px 1fr; }
  .head h1 { font-size: 38px; }
}
@media (max-width: 900px) {
  .bar { flex-wrap: wrap; gap: 12px; }
  .search { max-width: none; flex-basis: 100%; margin: 0; }
  .tiles.four { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .detail .side { position: static; grid-template-columns: 1fr 1fr; align-items: start; }
  .mini { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  main { padding: 18px 16px 48px; }
  .grid, .tiles.brands, .tiles.three, .tiles.six { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: 1fr 1fr; }
  .detail .side { grid-template-columns: 1fr; }
  .head h1 { font-size: 32px; }
}
