:root {
  --bg: #faf6ee;
  --bg2: #efe6d6;
  --card: #fff;
  --ink: #161616;
  --muted: #5e554b;
  --bd: #161616;
  --sh: #161616;
  --line: #d9cdb9;
  --khaki: #a68f7b;
  --khaki-soft: #e9ddcd;
  --maroon: #8e1f30;
  --maroon-hi: #a8283c;
  --red: #d7263d;
  --badge: #161616;
  --dot: rgba(22, 22, 22, .08);
  --line-green: #06c755;
  --chat-bg: #8aa9c9;
  --sel: #8e1f30;
  --accent-text: #8e1f30;
  --hh: 64px;
  --r: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #17150f; --bg2: #24201a; --card: #221e18; --ink: #f4eee4; --muted: #b5aa9b; --bd: #e6dccb; --sh: #000;
    --line: #3d362c; --khaki-soft: #3a3127; --dot: rgba(255, 255, 255, .06); --chat-bg: #2b3a52; --sel: #e0566b; --accent-text: #f2909e; --badge: #8e1f30;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #17150f; --bg2: #24201a; --card: #221e18; --ink: #f4eee4; --muted: #b5aa9b; --bd: #e6dccb; --sh: #000;
  --line: #3d362c; --khaki-soft: #3a3127; --dot: rgba(255, 255, 255, .06); --chat-bg: #2b3a52; --sel: #e0566b; --accent-text: #f2909e; --badge: #8e1f30;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hh); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.6 "IBM Plex Sans Thai", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1, h2, h3, .brand b, .pack-intro h2, .grp-title, .dl-count b, .stats b { font-family: "Kanit", "Mitr", sans-serif; font-weight: 800; }
.btn, .seg button, .chips button, .eyebrow, .top-nav a { font-family: "Mitr", sans-serif; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid var(--maroon-hi); outline-offset: 2px; }

/* header: black visor with a maroon band */
.top { position: sticky; top: 0; z-index: 40; background: #161616; color: #fff; border-bottom: 4px solid var(--maroon); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-badge { width: 42px; height: 42px; border-radius: 50%; background: #fff; border: 2px solid #fff; overflow: hidden; flex: none; display: grid; place-items: center; }
.brand-badge svg { width: 100%; height: 100%; }
.brand b { display: block; font-size: 21px; line-height: 1.05; letter-spacing: .01em; }
.brand small { display: block; font-size: 12px; color: #cdbfae; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { text-decoration: none; font-size: 14px; padding: 7px 12px; border-radius: 999px; white-space: nowrap; border: 2px solid transparent; }
.top-nav a:hover { border-color: #fff; }

/* hero: sticker shop banner */
.hero { position: relative; background: var(--khaki-soft); border-bottom: 3px solid var(--bd); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(var(--dot) 1.6px, transparent 2px) 0 0 / 14px 14px; pointer-events: none; }
.hero-in { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: center; padding-top: 40px; padding-bottom: 48px; }
.eyebrow { display: inline-block; margin: 0 0 14px; background: var(--maroon); color: #fff; font-size: 14px; font-weight: 500; letter-spacing: .02em; padding: 4px 14px; border-radius: 999px; border: 2px solid var(--bd); }
.hero h1 { margin: 0; font-size: clamp(52px, 8vw, 96px); line-height: .98; letter-spacing: -.01em; color: var(--ink); }
.hero h1 span {
  display: inline-block; margin-top: 10px; font-size: .5em; line-height: 1.15; color: #fff; background: var(--maroon);
  border: 3px solid var(--bd); border-radius: 14px; padding: 2px 16px 6px; transform: rotate(-2deg); box-shadow: 4px 4px 0 var(--sh);
}
.lead { font-size: 17px; max-width: 34em; color: var(--ink); margin: 22px 0 22px; }
.lead b { color: var(--accent-text); font-weight: 600; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.stats { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.stats li { background: var(--card); border: 2px solid var(--bd); border-radius: 12px; padding: 6px 14px 8px; font-size: 13px; color: var(--muted); box-shadow: 3px 3px 0 var(--sh); }
.stats b { display: block; font-size: 24px; line-height: 1.15; color: var(--ink); }
.hero-art { display: flex; flex-direction: column; align-items: center; }
.hero-stage { width: min(100%, 460px); aspect-ratio: 370 / 320; position: relative; cursor: pointer; outline: none; }
.hero-stage::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 86%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; border: 3px solid var(--bd);
  background: repeating-conic-gradient(var(--card) 0 9deg, var(--bg) 0 18deg);
}
.hero-stage:focus-visible::before { outline: 3px solid var(--maroon-hi); outline-offset: 4px; }
.hero-stage svg { position: relative; width: 100%; height: 100%; }
.hero-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2.5px solid var(--bd); border-radius: 12px;
  padding: 10px 20px; font-size: 16px; font-weight: 500; text-decoration: none; box-shadow: 3px 3px 0 var(--sh);
  transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--sh); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--sh); }
.btn-main { background: var(--maroon); color: #fff; }
.btn-main:hover { background: var(--maroon-hi); }
.btn-main:disabled { background: var(--bg2); color: var(--muted); cursor: not-allowed; box-shadow: none; transform: none; border-color: var(--line); }
.btn-ghost { background: var(--card); color: var(--ink); }
.btn.sm { padding: 6px 12px; font-size: 14px; border-width: 2px; border-radius: 10px; }

/* layout */
.main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; padding-top: 20px; padding-bottom: 32px; }
.cat-col { min-width: 0; }

.toolbar { position: sticky; top: var(--hh); z-index: 20; background: var(--bg); padding: 12px 0 10px; margin-bottom: 6px; border-bottom: 2px solid var(--bd); box-shadow: 8px 0 0 var(--bg), -8px 0 0 var(--bg); }
.tb-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; background: var(--card); border: 2px solid var(--bd); border-radius: 12px; padding: 3px; gap: 2px; max-width: 100%; }
.seg button { border: 0; background: transparent; padding: 7px 12px; border-radius: 8px; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; color: var(--muted); }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--ink); color: var(--bg); }
.seg i { width: 16px; height: 16px; display: inline-block; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ic-sound { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z'/%3E%3Cpath d='M16 8a5 5 0 0 1 0 8M19 5a9 9 0 0 1 0 14' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ic-anim { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='13' r='7'/%3E%3Cpath d='M3 6l3 2M21 6l-3 2M12 2v3' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }
.ic-static { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='4' width='16' height='16' rx='4'/%3E%3C/svg%3E"); }
.search { flex: 1 1 200px; min-width: 0; }
.search input { width: 100%; border: 2px solid var(--bd); background: var(--card); color: var(--ink); border-radius: 12px; padding: 9px 14px; font: inherit; font-size: 15px; }
.search input::placeholder { color: var(--muted); }
.search input:focus { outline: none; box-shadow: 3px 3px 0 var(--maroon); }
.chips { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; scrollbar-width: none; padding: 0 3px 3px 0; overscroll-behavior-x: contain; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; border: 2px solid var(--bd); background: var(--card); color: var(--ink); padding: 4px 12px; border-radius: 999px; font-size: 14px; white-space: nowrap; }
.chips button small { color: var(--muted); margin-left: 4px; font-family: "IBM Plex Sans Thai", sans-serif; }
.chips button.on { background: var(--maroon); color: #fff; box-shadow: 2px 2px 0 var(--sh); }
.chips button.on small { color: #f6cdd4; }

.pack-intro { margin: 16px 0 4px; }
.pack-intro h2 { margin: 0; font-size: 26px; line-height: 1.2; }
.pack-intro p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 12px; }
.grp-title { grid-column: 1 / -1; margin: 20px 0 0; font-size: 20px; line-height: 1.25; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.grp-title::before { content: ""; align-self: center; width: 12px; height: 12px; border-radius: 3px; background: var(--maroon); border: 2px solid var(--bd); flex: none; }
.grp-title small { color: var(--muted); font-family: "IBM Plex Sans Thai", sans-serif; font-size: 13px; font-weight: 400; }
.card { position: relative; background: var(--card); border-radius: var(--r); border: 2px solid var(--bd); box-shadow: 3px 3px 0 var(--sh); padding: 6px; transition: transform .12s, box-shadow .12s; min-width: 0; }
.card:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--sh); }
.card.picked { border-color: var(--sel); box-shadow: 0 0 0 2px var(--sel), 3px 3px 0 2px var(--sel); background: var(--khaki-soft); }
.card .open { display: block; width: 100%; border: 0; background: none; padding: 0; }
.card svg { width: 100%; height: auto; display: block; }
.num { position: absolute; top: 7px; left: 7px; font: 800 12px/1 "Kanit", "Mitr", sans-serif; background: var(--badge); color: #fff; border-radius: 7px; padding: 4px 7px 5px; letter-spacing: .03em; z-index: 2; pointer-events: none; }
.pick { position: absolute; top: 3px; right: 3px; width: 38px; height: 38px; border: 0; background: none; padding: 7px; z-index: 2; }
.pick span { display: block; width: 24px; height: 24px; border-radius: 7px; border: 2px solid var(--bd); background: var(--card); }
.card.picked .pick span { background: var(--sel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat; border-color: var(--bd); }
.snd { font-size: 12px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 4px; pointer-events: none; padding: 4px 0 2px; margin: 2px -6px -6px; border-top: 2px dashed var(--line); }
.snd i { width: 13px; height: 13px; flex: none; background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.mode-static .snd, .mode-anim .snd { display: none; }
.empty { text-align: center; color: var(--muted); padding: 40px 0; }

/* sticker animations: every loop shares --d so APNG frames loop cleanly */
.stk .chr, .stk .txt, .stk [class*="fx-"] { transform-box: fill-box; transform-origin: 50% 100%; }
.stk .txt { transform-origin: 50% 50%; }
.on .chr { animation: var(--a) var(--d) ease-in-out infinite; }
.on .txt { animation: txtPop var(--d) ease-in-out infinite; }
.on .a-bounce { --a: bounce; } .on .a-jump { --a: jump; } .on .a-wobble { --a: wobble; } .on .a-shake { --a: shake; }
.on .a-run { --a: run; } .on .a-nod { --a: nod; } .on .a-pulse { --a: pulse; } .on .a-float { --a: float; }
.on .a-sway { --a: sway; } .on .a-peek { --a: peek; } .on .a-zoomin { --a: zoomin; } .on .a-tremble { --a: tremble; }
.on .a-salute { --a: salute; } .on .a-sneak { --a: sneak; } .on .a-pop { --a: popIn; } .on .a-fade { --a: fade; }
.on .fx-tw { animation: tw var(--d) ease-in-out infinite; transform-origin: 50% 50%; }
.on .fx-tw.d2 { animation-delay: calc(var(--d) * -.5); }
.on .fx-spin { animation: spin calc(var(--d) * 4) linear infinite; transform-origin: 50% 50%; }
.on .fx-speed { animation: speed var(--d) linear infinite; }
.on .fx-puff { animation: puff var(--d) ease-out infinite; transform-origin: 50% 50%; }
.on .fx-drip { animation: drip var(--d) ease-in infinite; transform-origin: 50% 0; }
.on .fx-bob { animation: bob var(--d) ease-in-out infinite; }
.on .fx-rise { animation: rise var(--d) ease-out infinite; }
.on .fx-fall { animation: fall var(--d) linear infinite; }
.on .fx-pulse { animation: pulse var(--d) ease-in-out infinite; transform-origin: 50% 50%; }
.on .fx-flick { animation: flick calc(var(--d) / 2) ease-in-out infinite; }
.on .fx-siren { animation: siren calc(var(--d) / 2) steps(1) infinite; }
.on .fx-stamp { animation: stamp var(--d) ease-in infinite; }
.on .fx-pound { animation: pound calc(var(--d) / 2) ease-in-out infinite; }
.on .fx-fly { animation: fly var(--d) ease-out infinite; transform-origin: 50% 50%; }

@keyframes bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-6px); } 60% { transform: translateY(0); } }
@keyframes jump { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-14px) rotate(-1deg); } 70% { transform: translateY(0); } }
@keyframes wobble { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-3deg); } 70% { transform: rotate(3deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(3px); } }
@keyframes run { 0%, 100% { transform: translateX(-3px) translateY(0) rotate(4deg); } 50% { transform: translateX(3px) translateY(-5px) rotate(5deg); } }
@keyframes nod { 0%, 100% { transform: rotate(0) translateY(0); } 35% { transform: rotate(-2deg) translateY(3px); } 60% { transform: rotate(1deg) translateY(0); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes peek { 0%, 100% { transform: translateY(60px); opacity: 0; } 25%, 75% { transform: translateY(0); opacity: 1; } }
@keyframes zoomin { 0%, 100% { transform: scale(.97); } 35% { transform: scale(1.04); } 55% { transform: scale(1); } }
@keyframes tremble { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(-2px, 1px); } 50% { transform: translate(2px, -1px); } 75% { transform: translate(-1px, -1px); } }
@keyframes salute { 0%, 100% { transform: rotate(0) translateY(0); } 20% { transform: rotate(-1.5deg) translateY(-3px); } 40%, 80% { transform: rotate(0) translateY(0); } }
@keyframes sneak { 0%, 100% { transform: translateX(-8px) rotate(-1.5deg); } 50% { transform: translateX(8px) rotate(1.5deg); } }
@keyframes popIn { 0% { transform: scale(.9); } 25% { transform: scale(1.05); } 45%, 100% { transform: scale(1); } }
@keyframes fade { 0%, 100% { opacity: 1; transform: scale(1); } 45%, 55% { opacity: .08; transform: scale(.9); } }
@keyframes txtPop { 0%, 100% { transform: scale(1); } 20% { transform: scale(1.04); } 40% { transform: scale(1); } }
@keyframes tw { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .25; transform: scale(.6); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes speed { 0% { transform: translateX(20px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateX(-30px); opacity: 0; } }
@keyframes puff { 0% { transform: scale(.4); opacity: 0; } 30% { opacity: 1; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes drip { 0% { transform: translateY(0) scaleY(.8); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(16px) scaleY(1.1); opacity: 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes rise { 0% { transform: translateY(14px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-26px); opacity: 0; } }
@keyframes fall { 0% { transform: translateY(-20px); opacity: 0; } 20% { opacity: 1; } 100% { transform: translateY(70px); opacity: 0; } }
@keyframes flick { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.7); } }
@keyframes siren { 0% { fill: #ff3b3b; } 50% { fill: #3b7bff; } }
@keyframes stamp { 0%, 100% { transform: translateY(-24px); } 40% { transform: translateY(6px); } 55% { transform: translateY(0); } }
@keyframes pound { 0%, 100% { transform: translateY(-12px); } 50% { transform: translateY(6px); } }
@keyframes fly { 0% { transform: translate(-40px, 30px) rotate(-30deg) scale(.7); opacity: 0; } 35% { opacity: 1; } 100% { transform: translate(10px, -14px) rotate(10deg) scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .on .chr, .on .txt, .on [class*="fx-"] { animation-duration: calc(var(--d) * 3) !important; } }

/* phone chat */
.chat-col { position: sticky; top: calc(var(--hh) + 16px); }
.phone { background: #161616; border: 3px solid var(--bd); border-radius: 34px; padding: 9px; box-shadow: 5px 5px 0 var(--maroon); height: min(760px, calc(100vh - var(--hh) - 40px)); display: flex; flex-direction: column; }
.ph-head { display: flex; align-items: center; gap: 10px; background: #fff; color: #222; padding: 10px 12px; border-radius: 24px 24px 0 0; border-bottom: 2px solid #161616; }
.ph-head b { display: block; font-family: "Kanit", Mitr, sans-serif; font-weight: 800; line-height: 1.1; }
.ph-head small { font-size: 12px; color: #6b6b6b; }
.ph-avatar { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: #efe6d6; border: 2px solid #161616; flex: none; display: grid; place-items: center; }
.ph-avatar svg { width: 100%; height: 100%; }
.ph-close { display: none; border: 0; background: none; font-size: 30px; line-height: 1; padding: 0 6px 4px; color: #161616; }
.ph-body { flex: 1; overflow-y: auto; background: var(--chat-bg); padding: 12px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.day { align-self: center; font-size: 11px; background: rgba(0, 0, 0, .22); color: #fff; padding: 2px 10px; border-radius: 999px; }
.msg { display: flex; gap: 6px; align-items: flex-end; max-width: 92%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: #efe6d6; flex: none; display: grid; place-items: center; align-self: flex-start; }
.msg .av svg { width: 100%; height: 100%; }
.msg .bub { background: #fff; color: #222; border-radius: 16px; padding: 8px 12px; font-size: 14px; }
.msg.me .bub { background: #8de055; }
.msg .stkr { width: 150px; }
.msg .stkr svg { width: 100%; height: auto; display: block; }
.msg time { font-size: 10px; color: rgba(255, 255, 255, .9); white-space: nowrap; }
.ph-tray { background: #fff; border-radius: 0 0 24px 24px; color: #222; border-top: 2px solid #161616; }
.tray-tabs { display: flex; gap: 4px; padding: 6px 8px; border-bottom: 1px solid #e6e6e6; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.tray-tabs::-webkit-scrollbar { display: none; }
.tray-tabs button { flex: none; border: 1.5px solid #d6d6d6; background: #f5f5f5; border-radius: 10px; padding: 3px 10px; font-size: 12px; white-space: nowrap; color: #444; }
.tray-tabs button.on { background: #161616; border-color: #161616; color: #fff; }
.tray-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; padding: 6px; height: 196px; overflow-y: auto; overscroll-behavior: contain; }
.tray-grid button { border: 0; background: none; padding: 2px; border-radius: 10px; position: relative; }
.tray-grid button:hover { background: #f3ede3; }
.tray-grid svg { width: 100%; height: auto; display: block; }
.tray-grid em { position: absolute; top: 1px; left: 2px; font: 800 9px/1 "Kanit", Mitr, sans-serif; color: #8a8a8a; font-style: normal; }

.fab { display: none; }

/* download */
.dl { padding-bottom: 32px; }
.dl-card { background: var(--card); border: 3px solid var(--bd); border-radius: 20px; box-shadow: 6px 6px 0 var(--sh); padding: 24px; }
.dl-head h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.dl-head p { margin: 6px 0 0; color: var(--muted); }
.dl-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-top: 18px; }
.dl-sel { background: var(--khaki-soft); border: 2px dashed var(--bd); border-radius: 14px; padding: 16px; min-width: 0; }
.dl-count b { font-size: 38px; line-height: 1.1; color: var(--sel); margin-right: 4px; }
.dl-nums { font: 500 14px/1.7 Mitr, sans-serif; color: var(--muted); margin: 6px 0 12px; max-height: 120px; overflow-y: auto; overflow-wrap: anywhere; }
.dl-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.dl-opts { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dl-opts label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; flex-wrap: wrap; }
.dl-opts label input { width: 20px; height: 20px; margin: 3px 0 0; accent-color: var(--maroon); flex: none; }
.dl-opts small { flex-basis: 100%; padding-left: 30px; margin-top: -6px; color: var(--muted); font-weight: 400; }
.dl-warn { margin: 0; font-size: 14px; color: #b45309; min-height: 0; }
.dl-warn:empty { display: none; }
.progress { height: 30px; border-radius: 999px; background: var(--bg2); border: 2px solid var(--bd); position: relative; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--line-green); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; font-size: 13px; line-height: 26px; }
.spec { list-style: none; padding: 16px 0 0; margin: 18px 0 0; border-top: 2px dashed var(--line); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 6px 18px; font-size: 14px; color: var(--muted); }
.spec b { color: var(--ink); font-weight: 600; }
.foot { color: var(--muted); font-size: 13px; text-align: center; padding-bottom: 90px; }

/* modal */
.modal { border: 3px solid var(--bd); padding: 0; border-radius: 22px; width: min(460px, calc(100vw - 24px)); background: var(--card); color: var(--ink); box-shadow: 6px 6px 0 var(--sh); max-height: calc(100dvh - 24px); }
.modal::backdrop { background: rgba(22, 22, 22, .66); }
.m-in { padding: 18px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.m-x { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 2px solid var(--bd); border-radius: 50%; background: var(--card); font-size: 24px; line-height: 1; z-index: 2; }
.m-num { font: 800 16px/1 "Kanit", Mitr, sans-serif; background: var(--badge); color: #fff; align-self: flex-start; border-radius: 9px; padding: 6px 10px 7px; letter-spacing: .03em; }
.m-stage { background: repeating-conic-gradient(var(--bg) 0 25%, var(--bg2) 0 50%) 0 0 / 22px 22px; border: 2px solid var(--bd); border-radius: 14px; }
.m-stage svg { width: 100%; height: auto; display: block; }
.m-meta { font-size: 14px; color: var(--muted); text-align: center; }
.m-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.card.picked ~ .x { display: none; }
.m-nav { display: flex; justify-content: space-between; border-top: 2px dashed var(--line); padding-top: 10px; }
.m-nav button { border: 0; background: none; color: var(--muted); padding: 6px 8px; font-size: 14px; font-family: Mitr, sans-serif; }
.m-nav button:hover { color: var(--ink); }

/* responsive */
@media (max-width: 1020px) {
  .main { grid-template-columns: minmax(0, 1fr); }
  .chat-col { position: fixed; inset: 0; z-index: 60; top: 0; padding: 0; display: none; }
  .chat-col.open { display: block; }
  .phone { height: 100%; border-radius: 0; padding: 0; border: 0; box-shadow: none; background: #fff; }
  .ph-head { border-radius: 0; padding-top: max(10px, env(safe-area-inset-top)); }
  .ph-tray { border-radius: 0; padding-bottom: env(safe-area-inset-bottom); }
  .ph-close { display: block; }
  .fab {
    display: inline-flex; align-items: center; gap: 8px; position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 50;
    border: 2.5px solid #161616; border-radius: 999px; background: var(--line-green); color: #fff; font: 500 15px Mitr, sans-serif;
    padding: 5px 18px 5px 5px; box-shadow: 3px 3px 0 #161616;
  }
  .fab:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #161616; }
  .fab span { width: 38px; height: 38px; border-radius: 50%; background: #fff; border: 2px solid #161616; overflow: hidden; display: grid; place-items: center; }
  .fab span svg { width: 100%; height: 100%; }
  .hide-sm { display: none; }
}
@media (max-width: 760px) {
  .toolbar { position: static; }
  .hero-in { grid-template-columns: minmax(0, 1fr); padding-top: 20px; padding-bottom: 32px; gap: 8px; }
  .hero-art { order: -1; }
  .hero-stage { width: min(100%, 300px); }
  .hero h1 { font-size: clamp(48px, 15vw, 72px); }
  .lead { font-size: 15px; }
  .dl-body { grid-template-columns: minmax(0, 1fr); }
  .dl-card { padding: 18px; }
  .dl-head h2 { font-size: 23px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
}
@media (max-width: 420px) {
  .top-nav a { padding: 6px 8px; font-size: 13px; }
  .top-nav a:first-child { display: none; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .seg { width: 100%; }
  .seg button { flex: 1 1 0; justify-content: center; padding: 7px 6px; font-size: 13px; gap: 4px; }
  .hero-cta .btn { flex: 1 1 auto; }
  .stats li { padding: 5px 10px 7px; }
  .stats b { font-size: 21px; }
}
@media (max-width: 340px) {
  .seg i { display: none; }
}
@media (hover: none) {
  .card:hover, .btn:hover { transform: none; box-shadow: 3px 3px 0 var(--sh); }
  .card.picked:hover { box-shadow: 0 0 0 2px var(--sel), 3px 3px 0 2px var(--sel); }
  .btn-main:disabled:hover { box-shadow: none; }
}

/* sticker white border, see char.js OL_CSS */
.ol * { fill: #fff !important; stroke: #fff !important; stroke-width: 12px !important; stroke-linejoin: round !important; stroke-dasharray: none !important; opacity: 1 !important; }
.ol .no-ol, .ol text { display: none; }
.card .open { aspect-ratio: 370 / 320; }
