:root {
  --paper: #f7f3ea;
  --card: #fffdf8;
  --ink: #1d2a24;
  --muted: #5d6a62;
  --line: #e4dccb;
  --green: #1f4d3a;
  --green-2: #2f6b52;
  --saffron: #e9a726;
  --saffron-soft: #fbefd2;
  --exact: #1f6b4a;
  --strong: #2a7d8a;
  --related: #b07a17;
  --not: #9b3b2f;
  --up: #1f7a4d;
  --down: #a8432f;
  --warn: #9a6a00;
  --shadow: 0 1px 0 rgba(29, 42, 36, 0.04), 0 6px 18px rgba(29, 42, 36, 0.06);
  --radius: 14px;
  --font: "Inter", "Noto Sans Thai", system-ui, sans-serif;
  --display: "Fraunces", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #121815; --card: #1a221e; --ink: #e9efe9; --muted: #9fb0a6; --line: #2c3832;
    --green: #8fd1ad; --green-2: #6fbf94; --saffron: #f2b63d; --saffron-soft: #3a3020;
    --exact: #6fd1a0; --strong: #6cc5d2; --related: #e6b45a; --not: #ef8c7c; --up: #6fd1a0; --down: #ef8c7c; --warn: #f2c35d;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 8px 20px rgba(0, 0, 0, 0.25);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 var(--font); }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { font-family: var(--display); font-weight: 650; letter-spacing: -0.01em; margin: 0; }
button { font: inherit; color: inherit; }
input, select { font: inherit; color: var(--ink); }
:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

/* header */
.top { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 88%, transparent); position: sticky; top: 0; z-index: 6; backdrop-filter: blur(8px); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 18px; font-weight: 650; color: var(--green); white-space: nowrap; text-decoration: none; }
.brand em { color: var(--saffron); font-style: normal; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--green); position: relative; flex: none; }
.mark::after { content: ""; position: absolute; inset: 6px 8px 8px 6px; border: 3px solid var(--saffron); border-radius: 50%; }
.top-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status { font-size: 12.5px; color: var(--muted); text-align: right; }
.status b { color: var(--green-2); font-weight: 600; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--up); margin-right: 6px; vertical-align: 1px; }
.lang { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 8px; font-size: 13px; max-width: 110px; }
.basket-btn { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.basket-btn b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 999px; background: var(--saffron); color: #1d2a24; margin-left: 4px; font-size: 12px; }

/* hero */
.hero { padding: 32px 0 10px; }
.hero h1 { font-size: clamp(28px, 4.4vw, 48px); line-height: 1.06; max-width: 17ch; color: var(--green); }
.lede { color: var(--muted); max-width: 66ch; margin: 10px 0 18px; }
.search { display: flex; gap: 8px; max-width: 760px; }
.search input { flex: 1; min-width: 0; font-size: 17px; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.search input:focus { outline: none; border-color: var(--saffron); }
.search button { font-weight: 600; font-size: 16px; padding: 0 22px; border-radius: 12px; border: 0; background: var(--green); color: var(--paper); cursor: pointer; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chip { font-weight: 500; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.chip:hover { border-color: var(--saffron); }
.chips.small .chip { font-size: 12.5px; padding: 4px 10px; }
.chip[aria-pressed="true"] { background: var(--saffron-soft); border-color: var(--saffron); color: var(--warn); font-weight: 600; }
.stories { display: flex; gap: 8px; margin-top: 16px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.stories-h { align-self: center; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); flex: none; }
.story { flex: none; width: 214px; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--saffron); border-radius: 12px; padding: 8px 12px; cursor: pointer; scroll-snap-align: start; }
.story b { display: block; font-size: 13.5px; line-height: 1.3; }
.story span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.story:hover { border-color: var(--saffron); }

/* sections */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin: 22px 0 12px; }
.section-head h2 { font-size: 22px; }
.muted-h { font: 500 13px var(--font); color: var(--muted); margin-left: 6px; }
.section-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.muted { color: var(--muted); font-size: 13px; }

/* context */
.persona-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.persona { text-align: left; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; display: grid; grid-template-columns: 34px 1fr; gap: 2px 10px; align-items: center; }
.persona[aria-checked="true"] { border-color: var(--green-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green-2) 18%, transparent); }
.avatar { grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 600; color: #fff; background: var(--green-2); }
.persona .nm { font-weight: 600; }
.persona .tg { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ctx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 12px; }
.ctx-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: grid; gap: 8px; align-content: start; }
.ctx-card h3 { font-size: 15.5px; color: var(--green); display: flex; align-items: center; gap: 8px; }
.auto { font: 600 11px var(--font); color: var(--up); background: color-mix(in srgb, var(--up) 12%, transparent); padding: 2px 8px; border-radius: 999px; }
.auto.off { color: var(--warn); background: var(--saffron-soft); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ctx-card label { display: grid; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 500; }
.ctx-card input, .ctx-card select { width: 100%; font-size: 14px; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--line); background: var(--paper); }
.lbl { font-size: 12px; color: var(--muted); font-weight: 500; display: block; }
.safety-pick { display: grid; gap: 4px; }
.safety-pick .chips { margin-top: 0; margin-bottom: 4px; }
.list-field ul { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 5px; }
.list-field li { font-size: 12.5px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; }
.list-field li span { overflow-wrap: anywhere; }
.list-field li button { border: 0; background: none; cursor: pointer; color: var(--muted); padding: 0 4px; font-size: 13px; line-height: 1; }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button, .ghost { font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 11px; cursor: pointer; }
.quick button[aria-pressed="true"] { border-color: var(--green-2); color: var(--green-2); }
.ctx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.toggle input { width: 18px; height: 18px; accent-color: var(--green-2); }
.sent summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-2); }
.sent pre { max-height: 260px; overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: 11.5px; white-space: pre-wrap; overflow-wrap: anywhere; }

/* pipeline */
.pipe-sec { margin-top: 22px; }
.pipeline { list-style: none; margin: 0; padding: 12px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); position: relative; }
.stage { position: relative; padding: 8px 6px 6px; text-align: center; min-width: 0; }
.stage::after { content: ""; position: absolute; top: 25px; right: -8px; width: 16px; height: 2px; background: var(--line); }
.stage:last-child::after { display: none; }
.node { width: 36px; height: 36px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; border: 2px solid var(--line); background: var(--paper); color: var(--muted); transition: all 0.35s ease; }
.stage .t { font-weight: 600; font-size: 12.5px; line-height: 1.2; }
.stage .d { font-size: 11px; color: var(--muted); line-height: 1.25; margin-top: 2px; overflow-wrap: anywhere; }
.stage .m { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.stage.active .node { border-color: var(--saffron); color: var(--warn); animation: pulse 1s ease-in-out infinite; }
.stage.done .node { background: var(--green); border-color: var(--green); color: var(--paper); }
.stage.done::after { background: linear-gradient(90deg, var(--green), var(--saffron)); }
.stage.flow::after { background: linear-gradient(90deg, var(--line) 0 30%, var(--saffron) 30% 60%, var(--line) 60%); background-size: 200% 100%; animation: flow 0.8s linear infinite; }
.stage.ctx .node { background: var(--saffron-soft); border-color: var(--saffron); color: var(--warn); }
@keyframes pulse { 50% { transform: scale(1.12); box-shadow: 0 0 0 6px color-mix(in srgb, var(--saffron) 25%, transparent); } }
@keyframes flow { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .stage.active .node, .stage.flow::after { animation: none; } .node { transition: none; } }

/* results */
.results { margin-top: 18px; scroll-margin-top: 70px; }
.reading { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 14px; }
.read-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.read-card h3 { font-size: 15px; margin-bottom: 6px; }
.shelf-row { display: grid; grid-template-columns: 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; margin: 3px 0; }
.shelf-row .bar { height: 8px; }
.shelf-row .nm { overflow-wrap: anywhere; }
.shelf-row .new { color: var(--warn); font-weight: 600; }
.pillset { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); }
.pill.hot { background: var(--saffron-soft); border-color: transparent; color: var(--warn); font-weight: 600; }
.group-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 12px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--muted); }
.seg button[aria-selected="true"] { background: var(--green); color: var(--paper); }
.calls { font-size: 12px; color: var(--muted); }
.cols { display: grid; grid-template-columns: repeat(var(--n, 1), minmax(0, 1fr)); gap: 16px; }
.col { min-width: 0; }
.col-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 2px 2px 8px; }
.col-head h3 { font-size: 17px; }
.col-head small { color: var(--muted); font-size: 12px; text-align: right; }
.group-title { font: 600 12px var(--font); text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); margin: 14px 2px 6px; display: flex; justify-content: space-between; }
.grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 10px; }
.cols.two .grid { grid-template-columns: 1fr; }
.item { display: grid; grid-template-columns: 60px 1fr; gap: 10px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 10px; box-shadow: var(--shadow); cursor: pointer; position: relative; animation: rise 0.35s ease both; }
.item:hover { border-color: var(--saffron); }
.item.sponsored { border-color: var(--saffron); background: linear-gradient(0deg, var(--saffron-soft), var(--card) 70%); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .item { animation: none; } }
.rank { position: absolute; top: 6px; left: 8px; font: 700 11px var(--font); color: var(--muted); background: var(--card); border-radius: 6px; padding: 0 4px; }
.thumb { width: 60px; height: 60px; border-radius: 10px; background: #fff center/contain no-repeat; border: 1px solid var(--line); }
.thumb.none { background: var(--paper); display: grid; place-items: center; font-size: 10.5px; color: var(--muted); }
.info { min-width: 0; }
.nm2 { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.th { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.meta { font-size: 12px; color: var(--muted); margin-top: 1px; overflow-wrap: anywhere; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.tag { font-weight: 600; font-size: 10.5px; letter-spacing: 0.04em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; border: 1px solid currentColor; }
.t-EXACT { color: var(--exact); } .t-STRONG { color: var(--strong); } .t-RELATED { color: var(--related); } .t-NOT { color: var(--not); }
.tag.oos, .tag.role { color: var(--muted); } .tag.promo { color: var(--warn); } .tag.spons { color: #1d2a24; background: var(--saffron); border-color: var(--saffron); }
.why { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; font-size: 12.5px; }
.why li::before { display: inline-block; width: 15px; font-weight: 700; }
.why .up { color: var(--up); } .why .up::before { content: "↑"; }
.why .down { color: var(--down); } .why .down::before { content: "↓"; }
.why .keep { color: var(--green-2); } .why .keep::before { content: "★"; }
.why .warn, .why .spons { color: var(--warn); } .why .warn::before { content: "!"; } .why .spons::before { content: "$"; }
.add { margin-left: auto; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 1px 9px; cursor: pointer; font-weight: 700; font-size: 11.5px; color: var(--green-2); }
.add:hover { border-color: var(--green-2); }
.more { margin: 8px 0 4px; }
.note { margin: 10px 2px; font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--saffron); padding-left: 8px; }

/* recipe */
.recipe { background: var(--card); border: 1.5px solid var(--saffron); border-radius: 18px; padding: 16px; margin-bottom: 16px; box-shadow: var(--shadow); display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; animation: rise 0.4s ease both; }
.recipe h3 { font-size: 22px; color: var(--green); }
.recipe .sub { color: var(--muted); font-size: 13px; margin: 2px 0 10px; }
.ing { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ing li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 10px; background: var(--paper); }
.ing .thumb { width: 44px; height: 44px; }
.ing .what { font-size: 12px; color: var(--muted); }
.ing .pick { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.ing .miss { color: var(--muted); font-style: italic; font-size: 13px; }
.steps { margin: 0; padding-left: 20px; font-size: 13.5px; display: grid; gap: 4px; }
.recipe-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.primary { border: 0; background: var(--green); color: var(--paper); border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; }

/* hidden, drawer, toast, empty */
.hidden-box { margin-top: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.hidden-box summary { cursor: pointer; font-weight: 600; }
.hidden-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 16px; font-size: 13px; }
.hidden-list span { color: var(--down); display: block; font-size: 12.5px; }
.empty { margin: 22px 0; padding: 24px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 18px; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(380px, 100vw); background: var(--card); border-left: 1px solid var(--line); z-index: 10; padding: 16px; overflow-y: auto; box-shadow: -10px 0 30px rgba(0, 0, 0, 0.12); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.drawer-head button { border: 0; background: none; font-size: 18px; cursor: pointer; }
#basket-list { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
#basket-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 8px; align-items: center; font-size: 13px; }
#basket-list .thumb { width: 40px; height: 40px; }
#basket-list button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--green); color: var(--paper); padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 13.5px; z-index: 12; box-shadow: var(--shadow); }

/* eval */
.evalsec { margin-top: 36px; }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.chart { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); }
.chart h3 { font-size: 16px; margin-bottom: 2px; }
.chart p { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.bar-pair { display: grid; gap: 3px; }
.bar { position: relative; height: 18px; border-radius: 5px; background: color-mix(in srgb, var(--line) 60%, transparent); overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 5px; }
.bar i.today { background: color-mix(in srgb, var(--muted) 55%, transparent); }
.bar i.jev { background: var(--saffron); }
.bar i.ch { background: var(--green-2); }
.bar i.yn { background: var(--saffron); }
.bar span { position: absolute; right: 6px; top: 0; font: 600 11.5px/18px var(--font); color: var(--ink); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 10px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; margin: 6px 0; }
.stack div { display: grid; place-items: center; font: 600 11px var(--font); color: #fff; }

.rules { margin: 36px 0 12px; }
.rules h2 { font-size: 22px; margin-bottom: 12px; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.rule { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.rule h3 { font-size: 15.5px; color: var(--green); margin-bottom: 4px; }
.rule p { margin: 0; font-size: 13.5px; color: var(--muted); }
.foot { color: var(--muted); font-size: 12.5px; padding: 18px 16px 36px; }

@media (max-width: 900px) {
  .pipeline { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; }
  .stage:nth-child(4)::after { display: none; }
  .recipe { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr !important; }
  .status { display: none; }
}
@media (max-width: 480px) {
  /* 390 px phones: the brand, language menu and basket wrap instead of pushing the page sideways */
  .top-row { flex-wrap: wrap; row-gap: 6px; padding-block: 6px; }
  .brand { white-space: normal; min-width: 0; }
  .search { flex-direction: column; }
  .search button { padding: 12px; }
  .persona-row { grid-template-columns: 1fr 1fr; }
  .fields { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .stage .d { display: none; }
}

/* Simple / Advanced (nic, 2026-09-26: "so villa can test without getting very obstructed").
   Simple is a view over the same search: one box, the results as a shop shows them, TH | EN. */
body.mode-simple .adv, body.mode-advanced .simple-only { display: none !important; }
.mode-switch, .lang2 { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--card); }
.mode-switch button, .lang2 button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 32px; }
.mode-switch button[aria-pressed="true"] { background: var(--green); color: var(--paper); }
.lang2 button[aria-pressed="true"] { background: var(--saffron-soft); color: var(--ink); }
.simple-hint { color: var(--muted); font-size: 14px; margin: 10px 0 0; }
.simple-hint a { color: var(--green-2); font-weight: 600; }
#simple { padding: 8px 0 40px; }
.simple-loading { display: flex; align-items: center; gap: 12px; padding: 22px 0; font-weight: 600; color: var(--green-2); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--saffron); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; border-top-color: var(--saffron); } }
.simple-count { color: var(--muted); margin: 8px 0 12px; }
.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.shop-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: grid; grid-template-rows: auto 1fr; box-shadow: var(--shadow); }
.shop-card .pic { aspect-ratio: 1; background: #fff center / contain no-repeat; border-bottom: 1px solid var(--line); position: relative; }
.shop-card .pic.none { display: grid; place-items: center; color: var(--muted); font-size: 13px; background: var(--paper); }
.shop-card .badge { position: absolute; left: 8px; top: 8px; background: var(--saffron); color: #1d2a24; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-card .body { padding: 10px 12px 12px; display: grid; gap: 4px; align-content: start; }
.shop-card .name { font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card .name-th { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.shop-card .size { color: var(--muted); font-size: 13px; }
.shop-card .price { font-family: var(--display); font-size: 20px; font-weight: 650; color: var(--green); }
.shop-card .oos { color: var(--down); font-size: 12px; font-weight: 600; }
.simple-empty { color: var(--muted); padding: 22px 0; }
@media (max-width: 480px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .mode-switch button, .lang2 button { padding: 6px 10px; }
}
.simple-loading[hidden], .simple-count[hidden], .simple-empty[hidden] { display: none; }
.shop-card .price s { font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 4px; }
