@font-face {
  font-family: Noto; src: url(fonts/noto-sans-thai-thai.woff2) format('woff2');
  font-weight: 400 700; font-display: swap; unicode-range: U+0E01-0E5B,U+25CC;
}
@font-face {
  font-family: Noto; src: url(fonts/noto-sans-thai-latin.woff2) format('woff2');
  font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF,U+2000-206F;
}
:root {
  --paper: #f5f2ed; --surface: #fffdf9; --ink: #191613; --line: #ded7cc;
  --muted: #625850; --dark: #14110f; --accent: #ff6339; --hot: #9b2b0d;
  --mono: ui-monospace, monospace; --radius: 12px; --control: 44px;
  --gutter: clamp(16px,4.5vw,70px); --gap: clamp(12px,1.6vw,24px);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font: 15px/1.6 Noto,system-ui,sans-serif; }
h1,h2,h3,p,figure,dl { margin: 0; }
button,input,select { color: inherit; font: inherit; }
button,summary { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid #c74a22; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { width: min(1320px,calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.skip { position: fixed; top: -200px; left: 16px; z-index: 10; background: white; padding: 10px; }
.skip:focus { top: 12px; }

/* Header and hero */
.top,.hero,.footer { background: var(--dark); color: #fffaf4; }
.top { border-bottom: 1px solid #ffffff24; }
.top-inner,.top nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.top-inner { min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; font: 800 25px/1 system-ui,sans-serif; letter-spacing: -.06em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; inline-size: 34px; block-size: 34px; border-radius: 8px; background: var(--accent); color: var(--dark); }
.brand-mark svg { width: 26px; }
.brand-period { color: var(--accent); }
.top nav a { text-decoration: none; font-size: 14px; color: #ebe2d9; }
.top nav a:hover,.hero-link:hover { color: #ff987c; }
.top nav button { min-height: var(--control); padding: 6px 12px; border: 1px solid #ffffff41; border-radius: 8px; background: transparent; white-space: nowrap; }
.top nav b { color: #ffac93; font-variant-numeric: tabular-nums; margin-inline-start: 4px; }
.top nav button[aria-pressed=true] { background: var(--accent); color: var(--dark); }
.top nav button[aria-pressed=true] b { color: inherit; }
.hero { overflow: hidden; }
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0,1fr); isolation: isolate; }
.hero-copy { position: relative; z-index: 1; width: max-content; max-width: 100%; padding-block: clamp(66px,8vw,116px) clamp(52px,6vw,88px); animation: slide-in .55s ease both; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .085em; color: var(--hot); }
.hero .eyebrow { color: #ffc3b2; font-family: var(--mono); }
.eyebrow i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; }
.hero h1 { font-size: clamp(52px,6.4vw,94px); line-height: 1.13; letter-spacing: -.048em; margin: 18px 0; }
.hero em { color: #ff805d; font-style: normal; }
.intro { color: #e0d5ca; font-size: clamp(14px,1.45vw,18px); }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.hero-link { font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
.art { position: absolute; z-index: -1; inset: 0 calc(-1 * var(--gutter)) 82px auto; width: min(79vw,1180px); overflow: hidden; }
.art picture { display: block; height: 100%; mask-image: linear-gradient(90deg,transparent,#000 32%); }
.art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 61%; animation: reveal-rig .85s ease both; }
.art::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg,var(--dark),transparent 25%); }
.art figcaption { position: absolute; z-index: 1; right: var(--gutter); bottom: 14px; padding: 3px 7px; border-radius: 4px; background: #14110fe8; font-size: 11px; color: #f5d8cb; }
.hero-specs { z-index: 1; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); min-height: 82px; border-top: 1px solid #ffffff38; }
.hero-specs div { display: grid; align-content: center; gap: 3px; padding: 12px clamp(8px,2.3vw,28px); min-width: 0; }
.hero-specs div + div { border-left: 1px solid #ffffff38;  }
.hero-specs small { color: #e7c9be; font-size: 12px; }
.hero-specs strong { font-size: clamp(12px,1.4vw,16px); }

/* Shared controls */
.primary,.outline,.quick-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: var(--control); padding: 8px 14px; border-radius: 8px; border: 1px solid transparent; text-decoration: none; font-weight: 700; transition: background .18s,border-color .18s,transform .18s; }
.primary { background: var(--accent); color: var(--dark); }
.primary:hover:not(:disabled) { background: #ff8c6e; }
.primary:active:not(:disabled),.outline:active { transform: translateY(2px); }
.outline { background: transparent; border-color: var(--line); }
.outline:hover,.quick-bar button:hover { background: #f9e8dd; border-color: #b8836f; }
.text-button { background: none; border: 0; padding: 4px 0; min-height: var(--control); font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
.text-button:hover { text-decoration: underline; }

/* Catalog, filters and results */
.catalog { padding-block: clamp(30px,5vw,68px); scroll-margin-top: 16px; }
h2 { font-size: clamp(30px,4vw,51px); line-height: 1.2; letter-spacing: -.04em; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-top h2,.buying-guide h2 { margin-top: 6px; }
.csv-link { font-size: 13px; flex-shrink: 0; }
.quick-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 0; margin-bottom: 16px; border-block: 1px solid var(--line); }
.quick-bar > span { font-size: 13px; font-weight: 700; margin-inline-end: 8px; }
.quick-bar button { min-height: 38px; border-color: var(--line); background: var(--surface); font-size: 13px; font-variant-numeric: tabular-nums; }
.quick-bar button[aria-pressed=true] { background: #ffe2d7; border-color: #a03b22; color: #73240d; }
.layout { display: grid; grid-template-columns: 238px minmax(0,1fr); align-items: start; gap: var(--gap); }
.filters { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.filters summary { font-size: 16px; font-weight: 700; }
.filter-body > .text-button { color: var(--hot); }
.filters fieldset { border: 0; padding: 0; margin: 6px 0 0; min-width: 0; }
.filters legend,.filter-field { font-size: 13px; font-weight: 700; }
.check { display: flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; }
.check small { margin-inline-start: auto; font: 12px var(--mono); color: var(--muted); }
input[type=checkbox] { accent-color: #a23818; width: 17px; height: 17px; }
.filter-field { display: grid; min-width: 0; gap: 4px; margin-top: 14px; }
.filter-field input,.filter-field select,.toolbar select,.search { min-width: 0; width: 100%; min-height: var(--control); padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.filter-pair { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.filter-hint { display: block; color: var(--muted); margin-top: 12px; font-size: 11px; }
.toolbar { display: grid; grid-template-columns: minmax(0,1fr) minmax(144px,max-content); gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; padding-inline: 12px; }
.search svg { flex: none; color: var(--hot); }
.search input { width: 100%; min-width: 0; border: 0; background: transparent; }
.search:focus-within { border-color: #a23818; }
.result-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.result-line button { min-height: 36px; margin-block: 4px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); }
.result-line button[aria-pressed=true] { color: var(--hot); background: #ffe2d7; border-color: #a03b22; }
.grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--gap); }
.card { min-width: 0; display: grid; grid-template-rows: auto auto auto 1fr auto auto; padding: clamp(12px,1.3vw,18px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s,box-shadow .2s; }
.card:hover,.card:focus-within { border-color: #bc9d8d; box-shadow: 0 10px 24px #5b2c1110; }
.card-head,.card-actions { display: grid; align-items: center; gap: 6px; }
.card-head { grid-template-columns: minmax(0,1fr) auto; margin-bottom: 9px; }
.shop-badge { width: fit-content; max-width: 100%; padding: 4px 8px; background: #f3ece3; border-radius: 5px; font: 700 11px/1.4 var(--mono); }
.shop-banana { background: #f8e7aa; }.shop-jib { background: #dce8fc; }.shop-itcity { background: #eee4f7; }.shop-speed { background: #f8e0d8; }
.heart { background: transparent; border: 1px solid var(--line); border-radius: 8px; width: var(--control); height: var(--control); font: 24px/1 system-ui; }
.heart:hover,.heart[aria-pressed=true] { color: #922840; background: #fae7eb; }
.card h3,.specs .spec-value { overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.card h3 { height: 2.8em; font-size: 15px; line-height: 1.4; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; min-height: 40px; padding-bottom: 4px; font-size: clamp(19px,2vw,27px); font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.price del { color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 0; }
.specs { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; align-content: start; min-height: 115px; padding: 10px; border-radius: 8px; background: #f4eee7; }
.specs b { display: block; margin-bottom: 3px; color: var(--hot); font: 700 10px/1.2 var(--mono); letter-spacing: .04em; }
.specs .spec-value { color: #3e342c; font-size: 12px; line-height: 1.35; min-height: 2.7em; }
.source-link { display: inline-block; width: fit-content; margin: 10px 0 4px; font-size: 12px; font-weight: 700; color: var(--hot); text-underline-offset: 3px; }
.card-actions { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 6px; padding-top: 9px; border-top: 1px solid var(--line); }
.card-actions button { padding-inline: 4px; font-size: 12px; }
.card-actions [aria-pressed=true] { background: #ffe1d5; border-color: #a03b22; }
.more,.empty { text-align: center; margin-top: 20px; }
.empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 24px; }
.empty p { margin: 5px 0 12px; }

/* Guide, footer and transient layers */
.buying-guide { padding-block: 23px 64px; border-top: 1px solid var(--line); }
.guide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--gap); margin-top: 18px; }
.guide-grid article { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid #cb4e2a; border-radius: var(--radius); padding: 16px; }
.guide-grid h3 { margin-bottom: 7px; font-size: 16px; }
.guide-grid p { color: var(--muted); font-size: 13px; }
.footer { padding: 30px 0 96px; }
.footer-inner { display: flex; justify-content: space-between; gap: var(--gap); }
.footer-inner p,.footer-inner a { color: #ddd0c4; font-size: 13px; }
.footer-inner p { margin-top: 10px; }
.footer-inner a { display: block; margin-bottom: 6px; }
.compare-bar { position: fixed; z-index: 3; bottom: max(10px,env(safe-area-inset-bottom)); left: 50%; translate: -50% 0; display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; width: min(660px,calc(100% - 2 * var(--gutter))); padding: 10px 12px; background: var(--dark); color: white; border-radius: var(--radius); box-shadow: 0 10px 32px #271b1655; animation: slide-in .23s ease both; }
.compare-bar small { display: block; color: #d9c2b6; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.compare-bar .primary:disabled { opacity: .62; cursor: not-allowed; }
.notice { position: fixed; z-index: 4; bottom: 100px; left: 50%; translate: -50% 0; background: var(--dark); color: white; padding: 10px; border-radius: 8px; width: max-content; max-width: 90vw; }
dialog { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); width: min(850px,calc(100% - 24px)); max-height: 88dvh; padding: clamp(14px,3vw,28px); box-shadow: 0 24px 80px #23171155; }
dialog[open] { animation: slide-in .24s ease both; }
dialog::backdrop { background: #170d09bb; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.dialog-head h2 { font-size: clamp(20px,4vw,32px); overflow-wrap: anywhere; }
.dialog-head button { flex: none; }
.detail-list { display: grid; grid-template-columns: 85px minmax(0,1fr); gap: 7px 12px; margin-block: 12px; }
.detail-list dt { font-weight: 700; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.detail-section { margin-top: 14px; }
.detail-section ul { margin: 4px 0; padding-inline-start: 25px; }
@keyframes slide-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes reveal-rig { from { opacity: 0; transform: scale(1.035); } to { opacity: 1; transform: none; } }

@media (max-width: 1110px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0,1fr); }
  .filter-body { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 14px; }
  .filter-field { margin-top: 0; }
  .filter-body > .text-button,.filter-body fieldset,.filter-hint { grid-column: 1/-1; }
  .filter-body > .text-button { justify-self: start; }
  .filters fieldset { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 16px; margin-bottom: 8px; }
}
@media (max-width: 720px) {
  .top-inner { min-height: 62px; }
  .top nav a { display: none; }
  .hero-copy { padding-block: 34px 12px; }
  .hero h1 { font-size: clamp(36px,8.6vw,61px); margin: 12px 0; }
  .hero-actions { margin-top: 18px; }
  .art { position: relative; inset: auto; width: 100%; height: clamp(160px,42vw,280px); }
  .art picture { mask-image: linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent); }
  .art img { object-fit: contain; object-position: center; }
  .art figcaption { bottom: 2px; right: 0; font-size: 11px; color: #fcece5; background: #14110f; }
  .hero-specs { min-height: 73px; }
  .hero-specs div { padding-inline: 7px; }
  .hero-specs strong { font-size: clamp(12px,3.2vw,15px); }
  .guide-grid { grid-template-columns: 1fr; }
  .footer-inner { display: grid; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: minmax(0,1fr); }
  .toolbar { grid-template-columns: minmax(0,1fr); }
  .csv-link { padding-inline: 9px; font-size: 12px; }
  .section-top h2 { font-size: clamp(25px,7vw,36px); }
  .quick-bar > span { flex-basis: 100%; }
  .quick-bar button { flex: 1 0 auto; padding-inline: 6px; }
  .compare-bar { font-size: 12px; }
  .compare-bar .primary { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
