/* Outfit Finder — clean white catalogue, black buttons, soft grey tiles, floating search. */
:root {
  --bg: #ffffff;
  --tile: #f3f3f2;
  --tile-2: #ebebea;
  --line: #e7e7e5;
  --text: #111111;
  --sub: #6f6f6c;
  --ink: #34d9b0;      /* the game's mint accent (Config Themes.Mint.Accent) */
  --ink-deep: #0b8f70; /* mint dark enough to read as text on white */
  --ink-text: #08241e; /* dark text on mint, same as in the game */
  --ink-soft: #e3f8f2;
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 "Inter", "Noto Sans Thai", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; fill: currentColor; flex: none; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; letter-spacing: .02em; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 14px; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, transform .12s, opacity .15s;
}
.btn:active { transform: scale(.97); }
.btn.dark { background: var(--ink); color: var(--ink-text); font-weight: 600; }
.btn.dark:hover { filter: brightness(1.05); }
.btn.line { background: var(--bg); border-color: var(--line); }
.btn.line:hover { border-color: #cfcfcc; background: #fafafa; }
.btn.big { padding: 14px 22px; font-size: 15px; }

/* ---------- top ---------- */
.top { max-width: 1240px; margin: 0 auto; padding: 18px 20px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; justify-self: start; }
.mark { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); color: var(--ink-text); display: grid; place-items: center; }
.mark svg { width: 20px; height: 20px; }
.top-end { display: flex; gap: 8px; align-items: center; justify-self: end; }
/* Outfits | Store */
.tabs { position: relative; display: flex; gap: 8px; padding: 5px; background: var(--tile); border-radius: 999px; }
.tabs a { position: relative; z-index: 1; padding: 8px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--sub); transition: background .15s, color .15s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
@media (max-width: 620px) {
  .top { grid-template-columns: auto 1fr; row-gap: 12px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .tabs a { flex: 1; text-align: center; }
  .top-end .btn.dark span { display: none; } .top-end .btn.dark { padding: 9px 11px; }
}

body { position: relative; }

main { max-width: 1240px; margin: 0 auto; padding: 0 20px 120px; }

/* ---------- intro ---------- */
.intro { position: relative; text-align: left; padding: 48px 0 32px; }
.intro h1 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.2; letter-spacing: -0.025em; font-weight: 600; margin: 0 0 12px; max-width: 24ch; text-wrap: balance; }
.intro p { color: var(--sub); margin: 0; max-width: 48ch; }

/* ---------- toolbar: category chips + dropdown menus ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 28px 0 14px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; min-width: 0; max-width: 100%; }
.toolbar > * { min-width: 0; max-width: 100%; }
.chips::-webkit-scrollbar { display: none; }
.chips:empty { display: none; }
.chips.sub { margin-bottom: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; cursor: pointer;
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); font-size: 13.5px; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.chip:hover { border-color: #cfcfcc; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--ink-text); }
.chip .n { color: var(--sub); font-size: 12px; }
.chip.on .n { color: rgba(255, 255, 255, .75); }
.chip .x { width: 12px; height: 12px; opacity: .6; }
.picked .chip { background: var(--tile); border-color: transparent; }
.dot { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); flex: none; }

.menus { display: flex; gap: 6px; }
.menu { position: relative; }
.menu > .chip svg { width: 12px; height: 12px; opacity: .6; }
.pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; padding: 8px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 18px 40px rgba(0,0,0,.10);
  display: none;
}
.menu.open .pop { display: grid; gap: 2px; }
.pop.sort-pop { width: 240px; padding: 10px; }
.pop.sort-pop button { justify-content: space-between; padding: 10px 8px; color: var(--sub); font-weight: 600; }
.pop.sort-pop button.on { color: var(--text, #10211d); font-weight: 600; }
.sort-dot { width: 20px; height: 20px; flex: none; border-radius: 50%; background: #dfe3e1; }
.pop.sort-pop button.on .sort-dot { background: #fff; border: 5px solid var(--ink-deep); }
.pop.price-pop { width: 290px; padding: 14px 16px 16px; gap: 10px; }
.menu.open .pop.price-pop { display: grid; }
.price-head { display: flex; align-items: center; justify-content: space-between; font-size: 16px; }
.pop button.price-x { width: 28px; height: 28px; padding: 0; justify-content: center; font-size: 22px; color: var(--sub); }
.price-row-opt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.price-row-opt input[type="radio"] { width: 20px; height: 20px; flex: none; margin: 0; accent-color: var(--ink-deep); }
.price-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; min-width: 0; flex: 1; }
.price-in { width: 100%; min-width: 0; height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font: inherit; font-size: 16px; font-weight: 400; }
.price-in:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.pop button.price-apply { justify-content: center; width: 100%; padding: 11px 10px; background: var(--ink-deep); color: #fff; font-weight: 600; }
.pop button.price-apply:hover { background: var(--ink-deep); filter: brightness(1.08); }
@media (max-width: 760px) { .pop.sort-pop, .pop.price-pop { position: fixed; left: 16px; right: 16px; top: auto; bottom: 16px; width: auto; z-index: 60; } }
.pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; font-size: 14px; text-align: left; }
.pop button:hover { background: var(--tile); }
.pop button .n { margin-left: auto; color: var(--sub); font-size: 12px; }
.pop button .tick { width: 16px; height: 16px; opacity: 0; }
.pop button.on .tick { opacity: 1; }
.pop.swatches { grid-template-columns: repeat(6, 30px); gap: 8px; min-width: 0; }
.pop.swatches button { width: 30px; height: 30px; padding: 0; border-radius: 50%; justify-content: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.14); }
.pop.swatches button.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ink); }
.pop.swatches svg { width: 14px; height: 14px; }
@media (max-width: 700px) { .toolbar { flex-direction: column; align-items: stretch; } .menus { overflow-x: auto; } .pop { left: 0; right: auto; position: fixed; top: auto; bottom: 90px; left: 16px; right: 16px; } .pop.swatches { grid-template-columns: repeat(auto-fill, 30px); } }

/* ---------- results ---------- */
.count { color: var(--sub); font-size: 13px; margin: 10px 2px 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px 20px; }
@media (max-width: 560px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }
.card { display: block; }
.tile { position: relative; aspect-ratio: 1; border-radius: var(--radius); background: var(--tile); overflow: hidden; transition: background .2s; }
.tile .photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: transform .35s ease; }
.card:hover .tile { background: var(--tile-2); }
.tile .mosaic { position: absolute; inset: 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: center; }
.tile .mosaic img, .tile .mosaic div { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 14px; background: #fff; }
.tile.has-photo > .mosaic { display: none; }
.tile-code { position: absolute; left: 12px; top: 12px; z-index: 2; background: #fff; border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.tile .open { position: absolute; right: 12px; bottom: 12px; z-index: 2; width: 34px; height: 34px; border-radius: 50%; background: #fff; display: grid; place-items: center; opacity: 0; transform: translateY(4px); transition: opacity .2s, transform .2s; }
.card:hover .tile .open { opacity: 1; transform: none; }
.cap { padding: 12px 4px 0; }
.cap h3 { margin: 0; font-size: 15px; font-weight: 600; }
.cap .meta { color: var(--sub); font-size: 13px; margin-top: 1px; }
.by-link { color: var(--text); font-weight: 600; cursor: pointer; }
.by-link:hover, .by-link:focus-visible { text-decoration: underline; }
.lines .by .by-link, .cap .meta .by-link { color: var(--ink-deep); }
.cap .tagrow { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; align-items: center; }
.cap .tagrow.dots { margin-top: 6px; }
.cap .t { font-size: 11.5px; padding: 2px 8px; border-radius: 999px; background: var(--tile); color: #444; }
.note { color: var(--sub); text-align: center; margin: 40px 0; }
.note:empty { display: none; }
.more { display: flex; justify-content: center; margin-top: 30px; }
.skeleton { background: var(--tile); }

/* ---------- badges ---------- */
.vb { display: inline-flex; vertical-align: -2px; margin-left: 4px; }
.vb svg { width: 15px; height: 15px; }
.vb.roblox svg { fill: #1d8bff; }
.vb.ours svg { fill: var(--ink); }
h1 .vb svg { width: .7em; height: .7em; }
h3 .vb svg { width: 14px; height: 14px; }
.fxb { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; padding: 1px 7px 1px 5px; border-radius: 999px; font-size: 11px; font-weight: 600;
  color: #7a5800; background: #fff6dc; vertical-align: 1px; white-space: nowrap; }
.fxb svg { width: 12px; height: 12px; fill: #e0a100; }

/* ---------- new today ---------- */
.today { margin: 4px 0 28px; }
.today h2 { font-size: 18px; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.today h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 4px var(--ink-soft); }
.today-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 18px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.tile-new { position: absolute; right: 12px; top: 12px; z-index: 2; background: var(--ink); color: var(--ink-text); border-radius: 999px; padding: 3px 10px; font-size: 11.5px; font-weight: 600; }
@media (max-width: 560px) { .today-row { grid-auto-columns: 46%; gap: 12px; } }

/* ---------- store items ---------- */
.grid.items { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.tile.item { display: block; background: var(--tile); }
.tile.item img.pic { position: absolute; inset: 14%; width: 72%; height: 72%; object-fit: contain; transition: transform .3s ease; }
/* the tile opens the item in the game; the small ↗ on top of it goes to the Roblox page */
.grid.items .card { position: relative; }
.card > .rbx { position: absolute; right: 10px; top: 10px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--sub); }
.card > .rbx:hover { color: var(--text); }
.card > .rbx svg { width: 14px; height: 14px; }
.tile .kindtag { position: absolute; left: 12px; top: 12px; z-index: 2; background: #fff; border-radius: 999px; padding: 3px 9px; font-size: 11px; font-weight: 600; color: var(--sub); }
.cap .price-row { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.cap .price-row strong { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; }
.cap .price-row .off { color: var(--sub); font-size: 12.5px; font-weight: 500; }
.cap .in { font-size: 12px; color: var(--sub); }

.tile .kindtag.new { background: var(--ink); color: var(--ink-text); }
@media (max-width: 560px) { .grid.items, .grid.shops { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 12px; } }

/* source switch: newest / from the looks */
.seg-wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; margin: -4px 0 8px; }
.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--tile); border-radius: 999px; }
.seg button { border: 0; background: none; padding: 8px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--sub); cursor: pointer; }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* shops */
.grid.shops { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card.shop .tile img.pic { position: absolute; inset: 18%; width: 64%; height: 64%; object-fit: cover; border-radius: 24px; transition: transform .3s ease; }
.shop-head { display: flex; align-items: center; gap: 20px; margin: 6px 0 26px; flex-wrap: wrap; }
.shop-icon { width: 96px; height: 96px; border-radius: 26px; background: var(--tile); overflow: hidden; flex: none; }
.shop-icon img { width: 100%; height: 100%; object-fit: cover; }
.shop-info { flex: 1; min-width: 200px; }
.shop-info h1 { margin: 2px 0; font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -0.03em; font-weight: 600; }
.shop-info .kicker { margin: 0; }

/* ---------- floating search ---------- */
.dock {
  position: fixed; left: 50%; bottom: 22px; translate: -50% 0; z-index: 40;
  display: flex; align-items: center; gap: 10px; width: min(440px, calc(100% - 32px));
  padding: 8px 10px 8px 16px; background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 12px 34px rgba(0,0,0,.12);
}
.dock svg { width: 18px; height: 18px; color: var(--sub); }
.dock input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--text); padding: 6px 0; }
.dock kbd { font: 600 12px ui-monospace, Consolas, monospace; color: var(--sub); border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; background: #fff; }
.dock:focus-within { border-color: #bdbdba; }
@media (hover: none) { .dock kbd { display: none; } }

/* ---------- detail ---------- */
.back { display: inline-flex; align-items: center; gap: 8px; color: var(--sub); font-size: 14px; margin: 18px 0 18px; }
.back:hover { color: var(--text); }
.detail { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: start; }
@media (max-width: 880px) { .detail { grid-template-columns: 1fr; gap: 22px; } }
.tile.big { border-radius: 30px; position: sticky; top: 20px; }
@media (max-width: 880px) { .tile.big { position: relative; top: 0; } }
.tile.big .mosaic { grid-template-columns: repeat(3, 1fr); inset: 26px; }
.kicker { margin: 4px 0 6px; color: var(--sub); font-size: 14px; }
.info h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; margin: 0 0 14px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tags span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--tile); font-size: 13px; }
.price { display: flex; justify-content: space-between; align-items: baseline; margin: 26px 0 16px; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.price span { color: var(--sub); font-size: 14px; }
.price strong { font-size: 28px; font-weight: 600; display: flex; align-items: center; gap: 8px; letter-spacing: -0.02em; }
.robux { width: .9em; height: .9em; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions .btn.dark { flex: 1 1 220px; }
.btn.icon { padding: 14px; width: 50px; }
.btn.icon span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } /* label for screen readers only */
.btn.icon svg { width: 18px; height: 18px; }
.hint { color: var(--sub); font-size: 12.5px; margin: 10px 0 28px; }
.list-head { display: flex; justify-content: space-between; font-size: 13px; color: var(--sub); padding: 0 4px 8px; }
.lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.lines li { border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.lines a.row { flex: 1; min-width: 0; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 4px; border-radius: 14px; transition: background .15s; }
.lines a.row:hover { background: #f7f7f6; }
.lines a.row:hover .nm { text-decoration: underline; }
.lines a.rbx { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; color: var(--sub); }
.lines a.rbx:hover { background: var(--tile); color: var(--text); }
.lines a.rbx svg { width: 15px; height: 15px; }
.lines img, .lines .ph { width: 56px; height: 56px; border-radius: 14px; background: var(--tile); object-fit: contain; }
.lines .nm { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lines .by { color: var(--sub); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lines .pr { font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.lines .pr.off { color: var(--sub); font-weight: 500; font-size: 12.5px; }
.lines .kind { margin-left: 6px; font-size: 10.5px; font-weight: 600; color: var(--sub); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; vertical-align: 1px; }
.fine { color: var(--sub); font-size: 12px; margin: 10px 4px 0; }

.site-foot { padding: 40px 20px 22px; }
.foot-shell { max-width: 1240px; margin: 0 auto; padding: 30px 32px 18px; border-radius: 26px; background: #fff; box-shadow: 0 8px 40px rgba(16, 33, 29, .07); }
.foot-top { display: grid; grid-template-columns: minmax(200px, 1.25fr) repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.foot-side { padding-right: 18px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; }
.foot-side p { margin: 12px 0 14px; color: var(--sub); font-size: 13.5px; }
.foot-card { padding: 20px 22px; border-radius: 18px; background: #f6f8f7; }
.foot-head { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0; border: 0; background: none; font-weight: 600; font-size: 16px; text-align: left; pointer-events: none; }
.foot-head i { display: none; width: 30px; height: 30px; border-radius: 50%; background: #e4e9e7; place-items: center; font-style: normal; }
.chev { width: 18px; height: 18px; transition: transform .35s var(--spring); }
.foot-fold { display: grid; grid-template-rows: 1fr; }
.foot-list { min-height: 0; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 12px; }
.foot-list a { font-size: 14px; color: #4b5552; }
.foot-list a:hover { color: var(--ink-deep); }
.foot-base { display: flex; flex-wrap: wrap; gap: 4px 24px; justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--sub); }
.dock { transition: opacity .2s, translate .2s; }
.dock.over-foot { opacity: 0; pointer-events: none; translate: -50% 16px; }
.info-page { max-width: 720px; margin: 0 auto; padding: 30px 0 20px; }
.info-page h1 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; margin: 0 0 22px; }
.info-page h2 { font-size: 17px; margin: 24px 0 6px; }
.info-page p { margin: 0; color: #444; }
@media (max-width: 760px) {
  .foot-shell { padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .foot-top { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .foot-side { order: 4; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px; padding: 12px 4px 0; }
  .foot-side p { grid-column: 1; margin: 0; }
  .foot-side .foot-brand { grid-column: 1 / -1; }
  .foot-side .btn { grid-column: 2; grid-row: 2; }
  .foot-card { padding: 15px 18px; }
  .foot-head { pointer-events: auto; cursor: pointer; }
  .foot-head i { display: grid; }
  .foot-card.open .chev { transform: rotate(180deg); }
  .foot-fold { grid-template-rows: 0fr; transition: grid-template-rows .4s var(--spring); }
  .foot-card.open .foot-fold { grid-template-rows: 1fr; }
  .foot-list { padding-top: 0; transition: padding-top .3s; }
  .foot-card.open .foot-list { padding-top: 12px; }
  .foot-list a { font-size: 15px; padding: 3px 0; }
  .foot-base { flex-direction: column; align-items: center; text-align: center; margin-top: 14px; }
}
.toast { position: fixed; left: 50%; bottom: 84px; translate: -50% 10px; opacity: 0; pointer-events: none; background: var(--ink); color: var(--ink-text); padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; transition: opacity .2s, translate .2s; z-index: 60; }
.toast.show { opacity: 1; translate: -50% 0; }
/* ---------- hero: sakura banner ---------- */
.intro.hero { position: relative; overflow: hidden; margin-top: 8px; padding: 56px 48px; border-radius: 24px; background: var(--ink-soft); }
.intro.hero h1, .intro.hero p { position: relative; z-index: 1; }
.intro.hero p { color: #2f5f53; }
.torii { position: absolute; right: 4%; bottom: -8px; width: min(280px, 38%); height: auto; fill: #0b8f70; opacity: .1; }

/* ---------- saved heart ---------- */
.tile .fav { position: absolute; left: 10px; bottom: 10px; z-index: 3; width: 38px; height: 38px; border-radius: 50%; background: #fff; color: #c9c9c6; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.tile .fav svg { width: 18px; height: 18px; }
.tile .fav.on, .btn.on { color: var(--ink-deep); }
.cap .in.hearts { display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 600; }
.cap .in.hearts svg { width: 13px; height: 13px; }
.cap .price-row s { color: var(--sub); font-weight: 400; font-size: 12px; margin-left: 2px; }
.lines .pr.save { color: var(--ink-deep); }

.plus-sel { height: 40px; max-width: 112px; padding: 0 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text); font: 600 13.5px "Inter", "Noto Sans Thai", sans-serif; cursor: pointer; }
.plus-sel:hover { border-color: #cfcfcc; }

/* item cards: same title height, price and buttons on one line across a row */
.grid.items > .card { display: flex; flex-direction: column; height: 100%; }
.grid.items > .card > .cap { flex: 1; display: flex; flex-direction: column; }
.grid.items > .card h3 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; line-height: 1.35; min-height: 2.7em; }
.grid.items > .card .meta { min-height: 1.55em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grid.items > .card .price-row { margin-top: auto; padding-top: 6px; min-height: 30px; }
.grid.items > .card .acts { margin-top: 8px; min-height: 36px; }

.tile .fxdot { position: absolute; left: 12px; top: 44px; z-index: 2; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.10); }
.tile .fxdot svg { width: 16px; height: 16px; fill: #e0a100; }

/* ---------- motion ---------- */
:root { --spring: linear(0, .1 3%, .35 8%, .62 14%, .82 21%, .94 30%, .99 40%, 1.006 52%, 1.003 70%, 1); } /* iOS-like settle, barely any bounce */
::view-transition-group(look-hero) { animation-duration: .5s; animation-timing-function: var(--spring); border-radius: 24px; overflow: hidden; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }
::view-transition-old(look-hero), ::view-transition-new(look-hero) { height: 100%; object-fit: cover; }
.card:active .tile { scale: .97; }
.tile { transition: background .2s, transform .4s var(--spring), scale .28s var(--spring); }
.fly-ghost { position: fixed; z-index: 80; object-fit: contain; pointer-events: none; border-radius: 16px; background: #fff; box-shadow: 0 10px 28px rgba(0,0,0,.18); }
.sheet-grip { display: none; }
@media (max-width: 620px) {
  .builder { padding-bottom: 60px; }
  .builder .b-sum {
    position: fixed; top: auto; left: 0; right: 0; bottom: calc(62px + env(safe-area-inset-bottom)); z-index: 45; order: 0;
    max-height: 72vh; overflow-y: auto; padding: 0 16px 18px; border-radius: 22px 22px 0 0; border-width: 1px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,.12); transform: translateY(calc(100% - 58px));
    transition: transform .46s var(--spring); touch-action: pan-y;
  }
  .builder .b-sum.open { transform: translateY(0); }
  .builder .b-sum.dragging { transition: none; }
  .builder .b-sum > .list-head { display: none; }
  .sheet-grip { display: block; position: sticky; top: 0; z-index: 2; width: calc(100% + 32px); margin: 0 -16px 8px; padding: 8px 16px 10px; height: 58px; border: 0; background: var(--bg); touch-action: none; cursor: grab; }
  .sheet-grip i { display: block; width: 38px; height: 4px; margin: 0 auto 8px; border-radius: 4px; background: #d4d4d1; }
  .sheet-peek { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: 14.5px; }
  .sheet-peek b { display: inline-flex; align-items: center; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) { ::view-transition-group(*), ::view-transition-old(*), ::view-transition-new(*) { animation: none !important; } }

/* ---------- buy + cart ---------- */
.acts { display: flex; gap: 6px; margin-top: 8px; }
.acts .btn.mini { flex: 1; padding: 7px 8px; font-size: 13px; }
.acts .btn.mini.on { color: var(--ink-deep); border-color: var(--ink); }
.lines .acts { margin: 0; flex: none; width: 176px; }
.lines .acts .btn.mini:first-child { flex: 0 0 62px; }
.lines .acts .btn.mini:last-child { flex: 1; }
.lines .pr { min-width: 66px; justify-content: flex-end; }
.lines .acts .btn.mini { padding: 6px 10px; flex: none; }
#tabs a[data-tab="build"] { position: relative; }
.cnt { display: inline-grid; place-items: center; min-width: 17px; height: 17px; margin-left: 5px; padding: 0 4px; border-radius: 999px; background: var(--ink); color: var(--ink-text); font: 700 11px/1 Inter, sans-serif; }
.cnt[hidden] { display: none; }
@media (max-width: 620px) {
  .cnt { position: absolute; top: 0; left: 52%; margin: 0; }
  .lines li { flex-wrap: wrap; }
  .lines a.row { flex: 1 1 100%; }
  .lines .acts { flex: 1; width: auto; padding: 0 4px 10px; }
  .lines .acts .btn.mini:first-child, .lines .acts .btn.mini:last-child { flex: 1; }
}

.card > button.fav { position: absolute; right: 8px; top: 46px; z-index: 3; }
button.fav { border: 0; padding: 0; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #c9c9c6; display: inline-grid; place-items: center; cursor: pointer; flex: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
button.fav svg { width: 16px; height: 16px; }
button.fav.on { color: var(--ink-deep); }
.lines button.fav { box-shadow: none; background: none; }

/* ---------- deals / stats ---------- */
.deal { margin-bottom: 38px; }
.deal h2, .stat h2 { font-size: 18px; margin: 0 0 14px; }
.stat-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.stat ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.stat li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.stat img, .stat .ph { width: 40px; height: 40px; border-radius: 10px; background: var(--tile); object-fit: contain; }
.stat .nm { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat b { font-variant-numeric: tabular-nums; }

/* ---------- look builder ---------- */
.builder { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.b-search { width: 100%; padding: 12px 16px; border: 1px solid var(--line); border-radius: 999px; font: inherit; margin-bottom: 12px; background: var(--bg); color: var(--text); }
.b-sum { position: sticky; top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 22px; background: var(--bg); }
.b-sum .price { margin: 14px 0; }
.b-sum .actions .btn { flex: 1; }
.b-sum .hint { margin: 10px 0 0; }
.b-sum .note { margin: 18px 0; }
.unver { color: #b86a00; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.risk { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: #fff3e0; color: #8a5200; font-size: 13px; }
.card.pick .meta { display: block; color: var(--sub); font-size: 12.5px; }
.card.pick { padding: 0; border: 0; background: none; text-align: left; cursor: pointer; display: block; }
.card.pick .cap, .card.pick .price-row { display: block; }
.card.pick .tile { display: block; outline: 2px solid transparent; outline-offset: -2px; }
.card.pick.on .tile { outline-color: var(--ink); }
.check { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: var(--ink-text); display: none; place-items: center; }
.card.pick.on .check { display: grid; }
@media (max-width: 880px) { .builder { grid-template-columns: minmax(0, 1fr); } .b-sum { position: static; order: -1; min-width: 0; } .b-pick { min-width: 0; } }

/* ---------- desktop tabs: labels only ---------- */
.tabs svg { display: none; }
@media (min-width: 621px) and (max-width: 1000px) { .tabs a { padding: 8px 12px; } .top { grid-template-columns: auto 1fr auto; } }

/* ---------- phones: bottom navigation, larger tap targets ---------- */
@media (max-width: 620px) {
  .top { grid-template-columns: 1fr auto; padding: 12px 16px; }
  main { padding: 0 16px 170px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-radius: 0; background: rgba(255,255,255,.96); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
  }
  .tabs a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 6px 0; font-size: 11px; line-height: 1.2; border-radius: 12px; }
  .tabs a.on { background: none; box-shadow: none; color: var(--ink-deep); }
  .tabs svg { display: block; width: 22px; height: 22px; }
  .dock { bottom: calc(76px + env(safe-area-inset-bottom)); }
  body.on-detail .dock { display: none !important; }
  .toast { bottom: calc(136px + env(safe-area-inset-bottom)); }
  body.no-dock .toast { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.no-dock main { padding-bottom: 110px; }
  .site-foot { padding: 28px 12px 84px; }
  body.on-build .site-foot { padding-bottom: 140px; }
  .intro { padding: 26px 0 24px; }
  .intro.hero { padding: 36px 18px 34px; border-radius: 24px; }
  .chip { padding: 10px 14px; }
  .btn.line, .seg button { min-height: 42px; }
  .pop { bottom: 150px; }
  .seg { max-width: 100%; overflow-x: auto; }
  .seg button { padding: 8px 14px; white-space: nowrap; }
  .tile .fav { left: 6px; bottom: 6px; width: 36px; height: 36px; }
  .tile .open { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- motion: transform and opacity only, so it stays smooth on phones ---------- */
@media (min-width: 621px) { .tabs a.on { background: none; box-shadow: none; } }
.tab-ink { position: absolute; left: 0; top: 5px; bottom: 5px; width: 0; border-radius: 999px; background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); pointer-events: none; transition: transform .46s var(--spring), width .46s var(--spring); }
.tab-ink.still { transition: none; }
@media (max-width: 620px) { .tab-ink { display: none; } }
.card.reveal { opacity: 0; transform: translateY(16px); }
.card.reveal.in { opacity: 1; transform: none; transition: opacity .38s ease, transform .5s var(--spring); transition-delay: var(--d, 0ms); }
.page-in { animation: pageIn .36s ease both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } }
img.pic.fade { opacity: 0; }
img.pic { transition: opacity .3s ease, transform .3s ease; }
.menu.open .pop { animation: popIn .3s var(--spring) both; transform-origin: top right; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
@media (max-width: 760px) { .menu.open .pop { animation-name: sheetIn; } .intro.hero { padding: 36px 22px; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } }
.chip { transition: background .18s, color .18s, border-color .18s, transform .28s var(--spring); }
.chip:active { transform: scale(.94); }
.tabs a:active, .seg button:active { transform: scale(.96); }
.tabs a, .seg button { transition: color .18s, background .18s, transform .28s var(--spring); }
button.fav:active { transform: scale(.8); }
button.fav { transition: transform .3s var(--spring); }
.btn { transition: transform .28s var(--spring), box-shadow .2s, filter .2s, background .2s; }
#app { min-height: calc(100vh - 90px); } /* keeps the footer still while a page loads */

/* ---------- search at the top of Looks and Items ---------- */
.top-search { flex: 1 1 280px; max-width: 420px; display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); transition: border-color .15s; }
.top-search:focus-within { border-color: var(--ink-deep); }
.top-search svg { width: 17px; height: 17px; color: var(--sub); }
.top-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 16px; color: var(--text); }
.top-search input::-webkit-search-cancel-button { cursor: pointer; }
body.top-search-on .dock { opacity: 0; pointer-events: none; translate: -50% 16px; }
@media (max-width: 760px) {
  .toolbar .top-search { order: -1; }
  .top-search { flex: 1 1 100%; max-width: none; }
}

/* ---------- count on the left, filters and sort on the right ---------- */
.subbar { position: relative; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 4px 0 18px; }
.subbar .count { margin: 0 2px; }
.subbar .menus { margin-left: auto; }
@media (min-width: 761px) { .toolbar > .top-search, .seg-wrap > .top-search { flex: 0 1 420px; margin-left: auto; } }
@media (max-width: 700px) { .subbar { align-items: stretch; } .subbar .menus { margin-left: 0; width: 100%; } }

/* ---------- sliding highlight, card lean, heart pop ---------- */
.seg, #catRow, #typeRow { position: relative; }
.slide-ink { position: absolute; left: 0; top: 0; z-index: 0; border-radius: 999px; pointer-events: none; transition: transform .42s var(--spring), width .42s var(--spring), height .42s var(--spring); }
.seg > .slide-ink { background: #fff; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.chips > .slide-ink { background: var(--ink); }
.has-ink > :not(.slide-ink) { position: relative; z-index: 1; }
.has-ink > .on { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.tile.tilting { transform: perspective(800px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: background .2s, transform .1s linear, scale .28s var(--spring); }
.heart-pop { animation: heartPop .46s var(--spring); }
@keyframes heartPop { 0% { scale: .7; } 45% { scale: 1.22; } 100% { scale: 1; } }
.spark { position: fixed; z-index: 90; width: 7px; height: 7px; border-radius: 50%; background: var(--ink); pointer-events: none; }

/* ---------- phone header: name on one line ---------- */
@media (max-width: 620px) {
  .brand { gap: 7px; font-size: 15px; white-space: nowrap; }
  .brand .mark { width: 28px; height: 28px; border-radius: 8px; }
  .brand .mark svg { width: 17px; height: 17px; }
  .top-end { gap: 5px; }
  .plus-sel { height: 36px; max-width: 92px; padding: 0 5px; font-size: 12.5px; }
  .top-end #langBtn { padding: 7px 10px; font-size: 13px; }
  .top-end .btn.dark { padding: 8px 10px; }
}
@media (max-width: 340px) { .plus-sel { max-width: 74px; font-size: 11.5px; } .top-end #langBtn { padding: 7px 8px; } }
.look-price { color: var(--text); font-weight: 600; }
/* cart: remove one item */
#bLines li { flex-wrap: nowrap; }
#bLines a.row { flex: 1 1 auto; }
.lines .line-x { width: 32px; height: 32px; flex: none; border: 0; border-radius: 50%; display: grid; place-items: center; background: none; color: var(--sub); cursor: pointer; padding: 0; transition: background .15s, color .15s; }
.lines .line-x:hover { background: #fdecec; color: #d64545; }
.lines .line-x:focus-visible { outline: 2px solid var(--ink-deep); outline-offset: 2px; }
.lines .line-x svg { width: 16px; height: 16px; fill: currentColor; }

/* ---------- leaderboard (#/board): podium for the top 3, list for the rest ---------- */
.board-tabs { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 0 auto 22px; }
.board { max-width: 760px; margin: 0 auto; }
/* the whole page sits in the middle of the screen (title, tabs, podium, list, note) */
.intro:has(+ .board-tabs) { text-align: center; }
.intro:has(+ .board-tabs) h1, .intro:has(+ .board-tabs) p { margin-left: auto; margin-right: auto; }
.board + .note { text-align: center; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: end; margin-bottom: 18px; }
.pod { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px 16px; border-radius: var(--radius); background: var(--tile); text-align: center; min-width: 0; transition: background .15s; }
.pod:hover { background: var(--tile-2); }
.pod.p1 { padding-top: 30px; background: var(--ink-soft); }
.pod-pic { width: 76px; height: 76px; border-radius: 50%; background: var(--bg); overflow: hidden; display: block; }
.pod.p1 .pod-pic { width: 96px; height: 96px; box-shadow: 0 0 0 4px var(--ink); }
.pod-pic img, .rk-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod-rank { position: absolute; top: 10px; left: 12px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; background: var(--bg); }
.pod.p1 .pod-rank { background: #f5c542; color: #3a2a00; }
.pod.p2 .pod-rank { background: #d7d9dd; }
.pod.p3 .pod-rank { background: #e6b48a; color: #3a1f08; }
.pod-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; margin-top: 6px; }
.pod-amt, .rk-amt { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--ink-deep); font-size: 14px; white-space: nowrap; }
.ranks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ranks a { display: flex; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border-radius: 16px; background: var(--tile); transition: background .15s; }
.ranks a:hover { background: var(--tile-2); }
.rk { width: 30px; text-align: center; font-weight: 700; color: var(--sub); flex: none; }
.rk-pic { width: 40px; height: 40px; border-radius: 50%; background: var(--bg); overflow: hidden; flex: none; }
.rk-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
@media (max-width: 560px) {
  .podium { gap: 8px; }
  .pod { padding: 14px 6px 12px; }
  .pod.p1 { padding-top: 22px; }
  .pod-pic { width: 56px; height: 56px; }
  .pod.p1 .pod-pic { width: 70px; height: 70px; }
  .pod-name { font-size: 13px; }
  .pod-rank { width: 24px; height: 24px; font-size: 12px; top: 8px; left: 8px; }
}
