:root {
  color-scheme: light;
  --orange: #ee4d2d;
  --orange-600: #d73211;
  --orange-700: #a8290f;
  --orange-50: #fff4f0;
  --orange-100: #ffe3d9;
  --header: linear-gradient(-180deg, #f53d2d 0%, #ff6633 100%);
  --banner: linear-gradient(118deg, #f53d2d 0%, #ff6633 58%, #ff8f52 100%);
  --yellow: #ffd424;
  --mall: #d0011b;
  --teal: #00897b;
  --teal-50: #e6f6f3;
  --star: #ffb400;
  --bg: #f5f5f5;
  --surface: #ffffff;
  --text: #222222;
  --muted: #757575;
  --line: #ebebeb;
  --input: #dcdcdc;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.05);
  --shadow: 0 4px 16px rgb(238 77 45 / 0.16);
  --font: "Noto Sans Thai", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Kanit", "Noto Sans Thai", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 128px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: var(--orange);
}

h1,
h2,
h3 {
  line-height: 1.3;
}

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: none;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 8px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: 8px;
  background: #fff;
}

:focus-visible {
  outline: 3px solid rgb(238 77 45 / 0.45);
  outline-offset: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header);
  color: #fff;
  box-shadow: 0 1px 8px rgb(0 0 0 / 0.12);
}

.header-main {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 14px;
  padding-bottom: 12px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 9px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 12px;
  background: #fff;
  color: var(--orange);
  box-shadow: 0 2px 6px rgb(120 20 0 / 0.2);
}

.brand-mark .icon {
  width: 26px;
  height: 26px;
  stroke-width: 3.2;
}

.brand-name {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1;
}

.brand-name em {
  color: var(--yellow);
  font-style: normal;
}

.search {
  display: flex;
  flex: 1;
  min-width: 0;
  max-width: 760px;
  padding: 3px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.12);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
}

.search input:focus {
  outline: none;
}

.search button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 20px;
  border: 0;
  border-radius: 4px;
  background: var(--orange);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

.search button:hover {
  background: var(--orange-600);
}

.header-nav {
  display: flex;
  gap: 22px;
  padding-bottom: 10px;
  overflow-x: auto;
  font-size: 0.88rem;
  scrollbar-width: none;
}

.header-nav a {
  color: rgb(255 255 255 / 0.92);
  text-decoration: none;
  white-space: nowrap;
}

.header-nav a:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- Hero ---------- */
main.wrap {
  padding-top: 16px;
}

.hero {
  display: grid;
  gap: 12px;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr);
  }
}

.banner {
  position: relative;
  display: grid;
  min-height: 250px;
  overflow: hidden;
  padding: 26px 22px;
  border-radius: 12px;
  background: var(--banner);
  color: #fff;
}

.banner::before,
.banner::after {
  position: absolute;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.1);
  content: "";
}

.banner::before {
  top: -90px;
  right: -60px;
  width: 300px;
  height: 300px;
}

.banner::after {
  bottom: -120px;
  left: 35%;
  width: 240px;
  height: 240px;
}

.banner-copy {
  position: relative;
  z-index: 1;
}

.banner-kicker {
  display: inline-block;
  margin: 0 0 12px;
  padding: 2px 12px;
  border: 1px solid rgb(255 255 255 / 0.45);
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  font-size: 0.85rem;
  font-weight: 600;
}

.banner h1 {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4.4vw, 2.55rem);
  font-weight: 600;
  line-height: 1.22;
}

.banner-copy > p:not(.banner-kicker) {
  max-width: 30rem;
  margin: 0 0 18px;
  opacity: 0.95;
}

.banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
}

.btn-light {
  background: #fff;
  color: var(--orange);
  box-shadow: 0 4px 12px rgb(120 20 0 / 0.2);
}

.btn-light:hover {
  background: var(--orange-50);
}

.btn-ghost {
  border: 1px solid rgb(255 255 255 / 0.7);
  background: rgb(255 255 255 / 0.12);
  color: #fff;
}

.btn-ghost:hover {
  background: rgb(255 255 255 / 0.22);
}

.banner-art {
  position: relative;
  display: none;
}

@media (min-width: 640px) {
  .banner {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    padding: 34px 34px;
  }

  .banner-art {
    display: block;
  }
}

.art-card {
  position: absolute;
  top: 50%;
  right: 6%;
  width: 210px;
  padding: 16px 16px 14px;
  border-radius: 14px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 16px 34px rgb(120 20 0 / 0.28);
  transform: translateY(-50%) rotate(3deg);
}

.art-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.85rem;
}

.art-row span {
  width: 74px;
  height: 8px;
  border-radius: 4px;
  background: #eeeeee;
}

.art-row.save b {
  color: var(--teal);
}

.art-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-top: 10px;
  font-size: 0.85rem;
  font-weight: 600;
}

.art-total b {
  color: var(--orange);
  font-size: 1.3rem;
}

.art-badge {
  position: absolute;
  top: -14px;
  right: -14px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--orange-700);
  box-shadow: 0 6px 14px rgb(120 20 0 / 0.25);
}

.art-badge .icon {
  stroke-width: 3.2;
}

.coin {
  position: absolute;
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: var(--yellow);
  color: #b45d00;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow:
    inset 0 -4px 0 rgb(0 0 0 / 0.1),
    0 8px 18px rgb(120 20 0 / 0.25);
}

.coin-a {
  top: 6%;
  left: 2%;
  transform: rotate(-14deg);
}

.coin-b {
  bottom: 4%;
  left: 18%;
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
  transform: rotate(10deg);
}

.side-promos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 900px) {
  .side-promos {
    grid-template-columns: 1fr;
  }
}

.promo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.promo:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
}

.promo .icon {
  width: 48px;
  height: 48px;
  padding: 11px;
  border-radius: 14px;
  background: var(--orange-50);
  color: var(--orange);
}

.promo b {
  display: block;
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 500;
}

.promo small {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.promo em {
  display: inline-block;
  margin-top: 6px;
  color: var(--orange);
  font-size: 0.85rem;
  font-style: normal;
  font-weight: 600;
}

.trust {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  list-style: none;
}

@media (min-width: 760px) {
  .trust {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.trust li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555555;
  font-size: 0.88rem;
}

.trust .icon {
  color: var(--orange);
}

/* ---------- Panels ---------- */
.panel {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  margin-bottom: 16px;
}

.panel-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 500;
}

.head-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  background: var(--orange);
  color: #fff;
}

.panel-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.sub-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 10px;
  padding-left: 10px;
  border-left: 4px solid var(--orange);
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 500;
}

.sub-head small {
  color: var(--muted);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 400;
}

.fineprint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* ---------- Category chips ---------- */
.cats {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  padding: 2px 2px 10px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.cat {
  display: flex;
  flex: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 92px;
  padding: 10px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  line-height: 1.3;
  text-align: center;
}

.cat .icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange);
}

.cat:hover {
  border-color: var(--orange-100);
}

.cat[aria-selected="true"] {
  border-color: var(--orange);
  background: var(--orange-50);
  color: var(--orange-700);
  font-weight: 600;
}

.cat[aria-selected="true"] .icon {
  background: var(--orange);
  color: #fff;
}

/* ---------- Product grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@media (min-width: 620px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (min-width: 920px) {
  .grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.grid > .notice,
.grid > .empty {
  grid-column: 1 / -1;
}

.product {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition:
    border-color 0.12s ease,
    box-shadow 0.12s ease,
    transform 0.12s ease;
}

.product:hover {
  border-color: var(--orange);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.product a {
  display: flex;
  flex-direction: column;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.thumb {
  position: relative;
  aspect-ratio: 1;
  background: #f3f3f3;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tag-off {
  position: absolute;
  top: 0;
  right: 0;
  display: grid;
  min-width: 40px;
  padding: 3px 4px 9px;
  background: var(--yellow);
  color: var(--orange-600);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.05;
  text-align: center;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}

.tag-off small {
  color: var(--orange-700);
  font-size: 0.68rem;
  font-weight: 600;
}

.ribbon {
  position: absolute;
  top: 10px;
  left: 0;
  padding: 2px 10px 2px 8px;
  border-radius: 0 4px 4px 0;
  background: var(--orange);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 2px 6px rgb(120 20 0 / 0.25);
}

.ribbon.teal {
  background: var(--teal);
}

.p-body {
  display: grid;
  flex: 1;
  align-content: start;
  gap: 4px;
  padding: 8px 10px 10px;
}

.p-name {
  display: -webkit-box;
  min-height: 2.8em;
  margin: 0;
  overflow: hidden;
  font-size: 0.86rem;
  font-weight: 400;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge-mall,
.badge-pref {
  display: inline-block;
  margin-right: 4px;
  padding: 2px 4px;
  border-radius: 2px;
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.2;
  vertical-align: 1px;
}

.badge-mall {
  background: var(--mall);
}

.badge-pref {
  background: var(--orange);
}

.p-price {
  color: var(--orange);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.p-price small {
  margin-right: 1px;
  font-size: 0.72em;
}

.p-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
}

.stars {
  color: var(--star);
  white-space: nowrap;
}

.stars span {
  color: var(--muted);
}

.p-shop {
  overflow: hidden;
  color: #9e9e9e;
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.p-cta {
  display: none;
}

@media (hover: hover) {
  .product .p-cta {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 7px;
    background: var(--orange);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    transform: translateY(100%);
    transition: transform 0.15s ease;
  }

  .product:hover .p-cta {
    transform: translateY(0);
  }
}

/* ---------- Compare results ---------- */
.results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.refine {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  font-size: 0.85rem;
}

.refine input[type="text"] {
  width: 190px;
  padding: 7px 10px;
  border: 1px solid var(--input);
  border-radius: 6px;
  font: inherit;
}

.refine label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.refine input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--orange);
}

.btn-sm {
  padding: 7px 14px;
  border-radius: 6px;
  background: var(--orange);
  color: #fff;
  font-size: 0.85rem;
}

.price-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.stat {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fafafa;
}

.stat span {
  color: var(--muted);
  font-size: 0.8rem;
}

.stat b {
  display: block;
  font-size: clamp(1.02rem, 3.2vw, 1.3rem);
  font-variant-numeric: tabular-nums;
}

.stat.best {
  border-color: var(--orange-100);
  background: var(--orange-50);
}

.stat.best b {
  color: var(--orange);
}

.range {
  margin-top: 14px;
}

.range-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #eeeeee;
}

.range-iqr {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--from, 0%);
  width: var(--width, 100%);
  border-radius: 999px;
  background: linear-gradient(90deg, #ffb199, var(--orange));
}

.range-median {
  position: absolute;
  top: -4px;
  left: var(--at, 50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--text);
  transform: translateX(-50%);
}

.range-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.warn {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  padding: 14px 16px;
  border: 1px solid #ffd59a;
  border-radius: 10px;
  background: #fff8e8;
}

.warn > .icon {
  margin-top: 2px;
  color: #d97706;
}

.warn p {
  margin: 2px 0 6px;
  color: #6b5320;
  font-size: 0.86rem;
}

.warn ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.86rem;
}

/* ---------- Forms ---------- */
.split {
  display: grid;
  gap: 22px;
}

@media (min-width: 880px) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
  }
}

.form {
  display: grid;
  align-content: start;
  gap: 14px;
}

.field {
  display: grid;
  gap: 5px;
  color: #333333;
  font-size: 0.88rem;
  font-weight: 500;
}

.field small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 400;
}

.field input {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--input);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
}

.field input:focus {
  border-color: var(--orange);
  outline: none;
  box-shadow: 0 0 0 3px rgb(238 77 45 / 0.15);
}

.duo {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 10px;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
}

legend .icon {
  color: var(--orange);
}

.more summary {
  color: var(--orange);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
}

.more .trio {
  margin-top: 10px;
}

/* ---------- Results ---------- */
.result {
  min-width: 0;
}

.ship-summary {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--orange-50);
}

.ship-summary span {
  color: #8a3a26;
  font-size: 0.85rem;
}

.ship-summary b {
  display: block;
  color: var(--orange);
  font-size: 1.9rem;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.ship-summary small {
  color: #8a5a4d;
  font-size: 0.8rem;
}

.ship-rows {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.ship-rows li {
  display: grid;
  grid-template-areas:
    "label price"
    "chips button";
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.ship-label {
  grid-area: label;
  font-weight: 600;
}

.ship-price {
  grid-area: price;
  color: var(--orange);
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: right;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  grid-area: chips;
  gap: 6px;
}

.chip {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.use-btn {
  grid-area: button;
  justify-self: end;
  padding: 4px 12px;
  border: 1px solid var(--orange);
  border-radius: 6px;
  background: #fff;
  color: var(--orange);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.use-btn:hover {
  background: var(--orange-50);
}

.receipt {
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--orange-100);
  border-radius: 12px;
  background: #fffaf8;
}

.receipt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  color: var(--orange);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 500;
}

.receipt .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed #f1d3c9;
  font-size: 0.93rem;
  font-variant-numeric: tabular-nums;
}

.receipt .row.minus span:last-child {
  color: var(--teal);
  font-weight: 600;
}

.receipt-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}

.receipt-total span {
  font-weight: 600;
}

.receipt-total b {
  color: var(--orange);
  font-size: 1.9rem;
  font-variant-numeric: tabular-nums;
}

.saved {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--teal-50);
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 600;
}

.per-unit {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.notes {
  margin: 10px 0 0;
  padding-left: 18px;
  color: #8a5a00;
  font-size: 0.84rem;
}

.notice {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #ffe0a3;
  border-radius: 10px;
  background: #fff8e6;
  color: #6b4a00;
  font-size: 0.9rem;
}

.notice .icon {
  margin-top: 2px;
  color: #d97706;
}

.result .notice {
  margin-top: 10px;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 30px 16px;
  border: 1px dashed #f5c3b3;
  border-radius: 12px;
  background: var(--orange-50);
  text-align: center;
}

.empty > .icon {
  width: 52px;
  height: 52px;
  padding: 12px;
  border-radius: 50%;
  background: var(--orange);
  color: #fff;
}

.empty b {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 500;
}

.empty p {
  max-width: 34rem;
  margin: 0;
  color: #8a5a4d;
  font-size: 0.9rem;
}

.empty-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.empty-tags span {
  padding: 2px 10px;
  border: 1px solid var(--orange-100);
  border-radius: 999px;
  background: #fff;
  color: var(--orange-700);
  font-size: 0.8rem;
}

.skeleton {
  aspect-ratio: 3 / 4.3;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0, #fafafa, #f0f0f0);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite linear;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- Tips & about ---------- */
.tips {
  display: grid;
  gap: 10px;
}

@media (min-width: 640px) {
  .tips {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .tips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.tip {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.tip-icon {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--orange-50);
  color: var(--orange);
}

.tip h3 {
  margin: 0 0 3px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 500;
}

.tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.about h3 {
  margin: 16px 0 4px;
  font-size: 1rem;
}

.about p {
  margin: 0 0 8px;
  color: #555555;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 24px;
  padding: 26px 0 18px;
  border-top: 4px solid var(--orange);
  background: #fff;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-inner {
  display: grid;
  gap: 16px;
}

@media (min-width: 760px) {
  .footer-inner {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  }
}

.footer-inner p {
  max-width: 34rem;
  margin: 10px 0 0;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  align-content: start;
  gap: 6px 18px;
}

.footer-inner nav a {
  color: #555555;
  text-decoration: none;
}

.footer-inner nav a:hover {
  color: var(--orange);
}

.brand-dark {
  color: var(--text);
}

.brand-dark .brand-mark {
  background: var(--orange);
  color: #fff;
  box-shadow: none;
}

.brand-dark .brand-name em {
  color: var(--orange);
}

.footer-bottom {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
}

/* ---------- Mobile tab bar ---------- */
.tabbar {
  display: none;
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 118px;
  }

  body {
    padding-bottom: calc(62px + env(safe-area-inset-bottom));
  }

  .header-main {
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .brand-mark .icon {
    width: 22px;
    height: 22px;
  }

  .brand-name {
    font-size: 1.4rem;
  }

  .search {
    flex-basis: 100%;
  }

  .search button {
    padding: 0 14px;
  }

  .search button span {
    display: none;
  }

  .search button .icon {
    width: 22px;
    height: 22px;
  }

  .header-nav {
    display: none;
  }

  main.wrap {
    padding-top: 10px;
  }

  .panel {
    padding: 16px 14px;
  }

  .promo {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 14px;
  }

  .tabbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 -2px 12px rgb(0 0 0 / 0.06);
  }

  .tabbar a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    color: #8a8a8a;
    font-size: 0.68rem;
    text-decoration: none;
  }

  .tabbar .icon {
    width: 23px;
    height: 23px;
  }

  .tabbar a.active {
    color: var(--orange);
    font-weight: 600;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}
