/* TWP LINE app: the shop and team app inside LINE. Mobile first, "Exotic Thailand" palette. */
:root {
	--coral: #F05A64;
	--coral-d: #D9434E;
	--teal: #22B89A;
	--teal-d: #1A9A80;
	--yellow: #EDD55E;
	--orange: #F26522;
	--sky: #1EB5EA;
	--red: #D92B2B;
	--line: #06C755;
	--ink: #1F2430;
	--ink-2: #5A6170;
	--ink-3: #8B92A0;
	--bg: #F6F4F1;
	--card: #FFFFFF;
	--bd: #E7E3DE;
	--soft: #FFF1F2;
	--r: 14px;
	--sh: 0 1px 2px rgba(31, 36, 48, .06), 0 4px 14px rgba(31, 36, 48, .06);
	--safe-b: env(safe-area-inset-bottom, 0px);
	--hd: 'Kanit', 'Sarabun', system-ui, sans-serif;
	--bd-f: 'Sarabun', 'Kanit', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--bd-f); }
h1, h2, h3, h4, b, strong, .btn, .tab span, .chip, .bdg, .st { font-family: var(--hd); }
h1, h2, h3, h4 { margin: 0 0 .4em; line-height: 1.3; font-weight: 600; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
b, strong { font-weight: 500; }
p { margin: 0 0 .6em; }
a { color: var(--sky); }
img { max-width: 100%; display: block; }
small { font-size: .84rem; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: .86rem; text-align: center; margin: .5em 0; }
.ok { color: var(--teal-d); background: #E8F8F4; border-radius: 10px; padding: .55em .8em; font-size: .92rem; }
.mcode { text-align: center; margin: .6em 0 .3em; color: var(--ink-3); }
.mcode b { display: block; font-size: 2.6rem; letter-spacing: .12em; color: var(--ink); line-height: 1.1; }
.warn { color: #9A3B00; background: #FFF4E5; border-left: 3px solid var(--orange); border-radius: 8px; padding: .55em .8em; font-size: .92rem; }
.note { background: #F1FAFD; border-left: 3px solid var(--sky); border-radius: 8px; padding: .65em .85em; margin: .9em 0; font-size: .92rem; color: var(--ink-2); }
.okc { color: var(--teal-d); }

/* ------------------------------------------------------------ boot */
.boot { min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--ink-3); }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #F6D3D6; border-top-color: var(--coral); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ frame */
#app { min-height: 100vh; display: flex; flex-direction: column; }
.hd { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 12px; background: var(--coral); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, .06); }
.mode-team .hd { background: var(--ink); }
.mode-buy .hd { background: var(--teal-d); }
.mode-buy .tab.is-on { color: var(--teal-d); }
.hd h1 { flex: 1; margin: 0; font-size: 1.08rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hd__back { width: 36px; height: 36px; margin-left: -6px; border: 0; background: none; display: grid; place-items: center; cursor: pointer; }
.hd__back svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.hd__r { border: 1px solid rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .12); color: #fff; border-radius: 99px; padding: 4px 12px; font-size: .86rem; font-family: var(--hd); cursor: pointer; }
.main { flex: 1; padding-bottom: calc(76px + var(--safe-b)); }
.pad { padding: 14px 14px 8px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--card); border-top: 1px solid var(--bd); padding-bottom: var(--safe-b); }
.tab { flex: 1; border: 0; background: none; padding: 7px 2px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-3); cursor: pointer; }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.tab span { font-size: .72rem; position: relative; }
.tab span i { position: absolute; top: -30px; right: -14px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--red); color: #fff; font: 600 .68rem/18px var(--hd); font-style: normal; text-align: center; }
.tab.is-on { color: var(--coral); }
.mode-team .tab.is-on { color: var(--teal-d); }

/* ------------------------------------------------------------ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--bd); background: var(--card); color: var(--ink); font-size: .95rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: transform .08s, filter .15s; user-select: none; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn.is-busy { opacity: .55; pointer-events: none; }
.btn--primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn--teal { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn--line { background: var(--line); border-color: var(--line); color: #fff; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--ghost { background: transparent; }
.btn--sm { min-height: 34px; padding: 0 12px; font-size: .86rem; border-radius: 10px; }
.btn--lg { min-height: 52px; font-size: 1.05rem; border-radius: 14px; }
.btn--block { display: flex; width: 100%; margin: 8px 0; }
.btn--google { background: #fff; border-color: #c7c7c7; color: #1f1f1f; font-weight: 600; gap: 10px; }
.btn--google .g-logo { flex: none; }
.lnk { background: none; border: 0; padding: 7px 9px; margin: -7px -9px; color: var(--teal-d); text-decoration: underline; font: inherit; cursor: pointer; }
.lrow { display: flex; justify-content: space-between; gap: 8px; margin: .35em 0; }
.lrow span { overflow-wrap: anywhere; text-align: right; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.row--end { justify-content: flex-end; }
.wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.who { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 12px; }

/* ------------------------------------------------------------ toast, modal, lightbox */
.toast { position: fixed; left: 50%; bottom: calc(88px + var(--safe-b)); z-index: 60; transform: translate(-50%, 20px); max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: .92rem; box-shadow: var(--sh); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--bad { background: var(--red); }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; background: rgba(20, 22, 28, .45); padding: 12px; }
.modal__box { width: 100%; max-width: 480px; max-height: 88vh; overflow: auto; background: var(--card); border-radius: 18px; padding: 18px 16px calc(14px + var(--safe-b)); box-shadow: var(--sh); animation: up .18s ease-out; }
.modal__text { margin-bottom: 8px; white-space: pre-line; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.lightbox { width: 100%; max-height: 70vh; object-fit: contain; border-radius: 10px; background: #111; }

/* ------------------------------------------------------------ shop */
.hello { margin: 12px 14px 0; padding: 14px; border-radius: var(--r); background: linear-gradient(120deg, var(--coral), var(--orange)); color: #fff; display: grid; gap: 4px; box-shadow: var(--sh); }
.hello b { font-size: 1.1rem; }
.hello span { font-size: .9rem; opacity: .95; }
.hello .btn { justify-self: start; margin-top: 6px; background: #fff; color: var(--coral-d); border-color: #fff; }
.hello--team { background: linear-gradient(120deg, var(--teal), var(--sky)); }
.search { margin: 12px 14px 0; }
.search input { width: 100%; height: 44px; border: 1px solid var(--bd); border-radius: 12px; padding: 0 14px 0 40px; font: inherit; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238B92A0' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 12px center / 20px no-repeat; outline: none; }
.search input:focus { border-color: var(--coral); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 14px 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--bd); background: var(--card); color: var(--ink-2); border-radius: 99px; padding: 6px 14px; font-size: .88rem; cursor: pointer; white-space: nowrap; }
.chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chips--sm .chip { padding: 4px 12px; font-size: .82rem; }
.chip i { font-style: normal; margin-left: 4px; background: var(--red); color: #fff; border-radius: 99px; padding: 0 6px; font-size: .72rem; }
/* Catalog: two sections (souvenirs to resell / raw materials for hotels and restaurants), category tiles */
/* Catalog: two zones side by side (souvenirs to resell / imported raw materials), category tiles in a grid */
.csecs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 12px 14px 0; padding: 4px; border-radius: 14px; background: #EFE9E2; }
.csec { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; min-height: 42px; padding: 6px 8px; border: 0; border-radius: 11px; background: transparent; color: var(--ink-2); font: 500 .92rem var(--hd); line-height: 1.25; text-align: center; cursor: pointer; }
.csec__i { flex: none; display: grid; place-items: center; font-size: 1.1rem; line-height: 1; }
.csec__i .twp-ic { width: 19px; height: 19px; }
.csec__t { min-width: 0; }
.nw { white-space: nowrap; }
.csec.is-on { background: var(--card); color: var(--coral-d); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.csec--raw.is-on { color: var(--teal-d); }
@media (max-width: 359px) { .csec { gap: 4px; padding: 6px 4px; font-size: .84rem; } .csec__i { font-size: 1rem; } .csec__i .twp-ic { width: 17px; height: 17px; } }
.ctiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 10px 14px 4px; }
.ctiles--raw { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ctile { min-width: 0; display: grid; justify-items: center; align-content: start; gap: 3px; padding: 8px 4px 6px; border: 1px solid var(--bd); border-radius: 14px; background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.ctile__i { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1.35rem; line-height: 1; background: var(--soft); color: var(--coral-d); }
.ctile__i .twp-ic { width: 24px; height: 24px; }
.ctiles--raw .ctile__i { width: 36px; height: 36px; font-size: 1.2rem; background: #E6F6F1; color: var(--teal-d); }
.ctiles--raw .ctile__i .twp-ic { width: 22px; height: 22px; }
.ctile__n { font-size: .74rem; line-height: 1.3; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; word-break: break-word; }
.ctiles--raw .ctile__n { font-size: .7rem; -webkit-line-clamp: 3; min-height: 3.9em; }
.ctile em { font-style: normal; font-size: .75rem; line-height: 1.2; color: var(--ink-3); }
.chips--nav .chip { padding: 7px 14px; }
.ctile.is-on { border-color: var(--coral); box-shadow: inset 0 0 0 1px var(--coral); background: var(--soft); }
.ctiles--raw .ctile.is-on { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal); background: #EAF8F4; }
@media (min-width: 560px) { .ctiles, .ctiles--raw { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); } }
/* Shortcut chips per customer type: wrap, no sideways scroll */
.chips--short { flex-wrap: wrap; overflow: visible; }
.chips--short .chip { padding: 6px 12px; font-size: .84rem; }
.chip--both:not(.is-on) { background: #EAF8F4; border-color: #BFE9DD; color: var(--teal-d); }
/* "สำหรับโรงแรม" in the header; raw materials get the teal header */
.hd__who { flex: none; max-width: 56%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 99px; padding: 4px 11px; background: rgba(255, 255, 255, .2); font: 500 .8rem var(--hd); }
.sec-raw .hd { background: var(--teal); }
/* Visitors: pick a business type */
.hello__types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.hello__types button { border: 1px solid rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .16); color: #fff; border-radius: 99px; padding: 5px 11px; font: 500 .84rem var(--hd); cursor: pointer; }
.hello .hello__who { font: 500 .8rem var(--hd); opacity: 1; }
.hello .nw { font-size: inherit; opacity: 1; }
.hello__chg { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; font: inherit; cursor: pointer; }
.hello--raw { background: linear-gradient(120deg, var(--teal), var(--sky)); }
.hello--raw .btn { color: var(--teal-d); }
/* "เคยจอง": reserve again in one tap */
.again { margin: 12px 0 0; }
.again__h { display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.again__h b { font-size: .98rem; }
.again__h .lnk { color: var(--coral-d); text-decoration: none; font-size: .86rem; padding: 8px 0; margin: -4px 0; }
.again__row { display: flex; gap: 8px; overflow-x: auto; padding: 8px 14px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
.again__row::-webkit-scrollbar { display: none; }
.ag { flex: 0 0 min(74%, 232px); display: flex; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--bd); border-radius: 12px; background: var(--card); scroll-snap-align: start; }
.ag__img { flex: none; display: block; width: 52px; height: 52px; border-radius: 10px; overflow: hidden; background: #F6F1EC; cursor: pointer; }
.ag__img img { width: 100%; height: 100%; object-fit: cover; }
.ag__b { display: grid; gap: 1px; min-width: 0; }
.ag__b b { font-size: .84rem; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.ag__b small { font-size: .72rem; color: var(--ink-3); }
.ag__btn { justify-self: start; margin-top: 3px; border: 0; border-radius: 99px; padding: 5px 12px; background: var(--teal); color: #fff; font: 500 .76rem var(--hd); cursor: pointer; }
.ag__btn.is-in { background: #DDF5EF; color: var(--teal-d); }
.ag__btn:disabled:not(.is-in) { background: #EEE; color: var(--ink-3); }
.card__last { font-size: .76rem !important; }
/* Search suggestions while typing */
.search { position: relative; }
.sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 15; max-height: 70vh; overflow-y: auto; padding: 6px 0; border: 1px solid var(--bd); border-radius: 14px; background: var(--card); box-shadow: 0 10px 30px rgba(31, 36, 48, .16); }
.sugg[hidden] { display: none; }
.sugg__h { margin: 6px 14px 2px; font: 500 .74rem var(--hd); color: var(--ink-3); }
.sugg__r { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 14px; border: 0; background: none; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.sugg__r:hover, .sugg__r:active { background: var(--soft); }
.sugg__i { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; overflow: hidden; font-size: 1.2rem; background: #F6F1EC; }
.sugg__i img { width: 100%; height: 100%; object-fit: cover; }
.sugg__t { display: grid; min-width: 0; }
.sugg__t b { font-size: .9rem; font-weight: 500; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg__t small { font-size: .74rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg mark { background: none; color: var(--coral-d); font-weight: 600; }
.sugg__all { display: block; width: 100%; margin-top: 4px; padding: 10px 14px; border: 0; border-top: 1px solid var(--bd); background: none; text-align: left; color: var(--coral-d); font: 500 .88rem var(--hd); cursor: pointer; }
.sres { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 10px 14px 0; font-size: .9rem; }
.sres .lnk { font-size: .88rem; padding: 6px 0; margin: 0; }
.card__from { color: var(--teal-d) !important; }
.empty p { margin: 0 0 6px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; }
@media (min-width: 560px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.grid > .boot, .grid > .empty { grid-column: 1 / -1; }
.card { background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--sh); display: flex; flex-direction: column; }
.card__img { display: block; aspect-ratio: 1; background: #F3EFEA; cursor: pointer; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 9px 10px 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card__body h3 { font-size: .92rem; font-weight: 500; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; cursor: pointer; }
.card__body .muted { font-size: .78rem; margin: 0; }
.card__act { margin-top: auto; padding-top: 4px; }
.card__act .btn { width: 100%; }
.noimg { display: block; width: 100%; height: 100%; min-height: 60px; background: linear-gradient(135deg, #FBE3E5, #E1F5F0); }
.bdgs { display: flex; flex-wrap: wrap; gap: 4px; }
.bdg { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .7rem; font-weight: 500; line-height: 1.7; }
.bdg--buy { background: #FFF3D6; color: #8A6A00; }
.bdg--both { background: #DDF5EF; color: var(--teal-d); }
.bdg--promo { background: var(--red); color: #fff; }
.bdg--ready { background: var(--teal); color: #fff; }
.bdg--wait { background: #E1F4FC; color: #0B6E91; }
.bdg--out { background: #E6E3DF; color: #6B655E; }
.empty { text-align: center; color: var(--ink-3); padding: 48px 20px; }
.empty .btn { margin-top: 10px; }

.step { display: flex; align-items: center; border: 1px solid var(--bd); border-radius: 12px; overflow: hidden; background: var(--card); height: 38px; }
.step button { width: 40px; height: 100%; border: 0; background: #FBF7F4; font-size: 1.2rem; cursor: pointer; color: var(--coral-d); }
.step input { flex: 1; min-width: 0; width: 40px; height: 100%; border: 0; text-align: center; font: 500 1rem var(--hd); background: none; -moz-appearance: textfield; outline: none; }
.step input::-webkit-outer-spin-button, .step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* product */
.gallery { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; background: #fff; scrollbar-width: none; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: none; width: 100%; aspect-ratio: 1; object-fit: contain; scroll-snap-align: center; cursor: zoom-in; }
.buybar { position: sticky; bottom: calc(64px + var(--safe-b)); z-index: 5; background: var(--bg); padding: 8px 0; }
.buybar .step { height: 48px; }
.html { color: var(--ink-2); font-size: .95rem; overflow-wrap: anywhere; }
.html img { height: auto; border-radius: 10px; margin: 8px 0; }
.html table { width: 100%; border-collapse: collapse; }
.html td, .html th { border: 1px solid var(--bd); padding: 4px 6px; }

/* list */
.li { display: flex; gap: 10px; padding: 10px; margin-bottom: 8px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.li > img, .li > .noimg { width: 72px; height: 72px; min-height: 0; flex: none; border-radius: 10px; object-fit: cover; }
.li__b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.li__b b { font-size: .95rem; }
.li__b .step { max-width: 170px; }
.sec { margin: 18px 0 8px; font-size: 1rem; }
.model { display: flex; gap: 10px; padding: 12px; margin-bottom: 8px; background: var(--card); border: 2px solid var(--bd); border-radius: var(--r); cursor: pointer; }
.model input { margin-top: 4px; accent-color: var(--coral); width: 18px; height: 18px; flex: none; }
.model span { display: grid; gap: 2px; }
.model small { color: var(--ink-2); }
.model:has(input:checked) { border-color: var(--coral); background: var(--soft); }
.model.is-locked { opacity: .92; cursor: default; }
.model.is-locked b { color: var(--ink-3); }
.lock { margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: #F6F6F8; font-size: .85rem; color: var(--ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lock::before { content: "🔒"; }
.seg { display: flex; gap: 6px; background: #EEEAE5; padding: 4px; border-radius: 12px; margin-bottom: 10px; }
.seg label { flex: 1; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 6px; border-radius: 9px; font: 500 .92rem var(--hd); color: var(--ink-2); }
.seg input:checked + span { background: var(--card); color: var(--coral-d); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
.seg input:disabled + span { opacity: .4; cursor: not-allowed; }
.req { color: var(--red); font-weight: 600; margin-left: 3px; }
.seg--big span { padding: 12px 6px; font-size: 1rem; }

/* forms */
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--bd); border-radius: 12px; background: var(--card); font: inherit; color: var(--ink); outline: none; }
textarea.input { resize: vertical; min-height: 64px; }
.input:focus { border-color: var(--coral); box-shadow: 0 0 0 3px rgba(240, 90, 100, .15); }
.lbl { display: grid; gap: 4px; margin-bottom: 10px; font-size: .88rem; color: var(--ink-2); }
.form .seg { margin-bottom: 14px; }
.g2 { display: grid; grid-template-columns: 1fr; gap: 0 10px; }
@media (min-width: 400px) { .g2 { grid-template-columns: 1fr 1fr; } }
.g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.g4 label { display: grid; gap: 2px; font-size: .78rem; color: var(--ink-3); }
.g4 .input { min-height: 38px; padding: 6px 10px; }
.fs { border: 1px solid var(--bd); border-radius: 12px; padding: 8px 12px 6px; margin: 0 0 12px; background: var(--card); }
.fs legend { padding: 0 6px; font: 500 .88rem var(--hd); color: var(--ink-2); }
.chk { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: .92rem; cursor: pointer; }
.chk input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--coral); flex: none; }
.chk--pdpa { background: var(--card); border: 1px solid var(--bd); border-radius: 12px; padding: 10px 12px; font-size: .84rem; color: var(--ink-2); margin: 10px 0; }
.form.type-company .only-guide, .form.type-guide .only-company { display: none; }
.form.seg-none .segpick ~ *:not([data-seghint]) { display: none; }
.form:not(.seg-tat) .only-tat, .form.seg-use .only-resell { display: none; }
.segpick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 2px; }
.segpick label { position: relative; }
.segpick input { position: absolute; opacity: 0; pointer-events: none; }
.segpick span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 44px; padding: 6px 4px; border: 1.5px solid #dfe5e3; border-radius: 10px; font-weight: 600; font-size: 14px; background: #fff; }
.segpick input:checked + span { border-color: #22B89A; background: #eafaf5; color: #0e6e5a; }
.errs:empty { display: none; }
.errs { background: #FDECEC; color: var(--red); border-radius: 10px; padding: 8px 12px; font-size: .9rem; margin: 8px 0; }
.errs p { margin: 2px 0; }

/* done */
.done { text-align: center; padding: 36px 20px; }
.done__icon { width: 76px; height: 76px; margin: 0 auto 14px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 2.4rem; line-height: 76px; box-shadow: 0 6px 20px rgba(34, 184, 154, .35); }
.done p { color: var(--ink-2); margin: 12px 0; }

/* quotes */
.qrow { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; padding: 12px; margin: 0 0 8px; border: 0; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); cursor: pointer; }
.qrow > div { min-width: 0; }
.qrow small { display: block; color: var(--ink-3); margin-top: 2px; }
.qrow__amt { text-align: right; font: 500 .95rem var(--hd); white-space: nowrap; }
.qrow__amt em { display: block; font-style: normal; font-size: .72rem; color: #fff; background: var(--orange); border-radius: 99px; padding: 0 8px; margin-top: 4px; }
[data-q] { padding: 10px 14px; }
.st { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .74rem; font-weight: 500; line-height: 1.7; vertical-align: middle; }
.st--coral { background: #FDE4E6; color: var(--coral-d); }
.st--sky { background: #DDF3FC; color: #0C7FA8; }
.st--orange { background: #FFE8DA; color: #B4470F; }
.st--yellow { background: #FBF3C8; color: #806A00; }
.st--teal { background: #DDF5EF; color: var(--teal-d); }
.st--grey { background: #ECECEF; color: var(--ink-2); }
.st--red { background: #FBE0E0; color: var(--red); }
.qhead { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 10px; }
.qhead h2 { margin: 0; }
.qhead small { width: 100%; color: var(--ink-3); }
.steps { list-style: none; display: flex; margin: 6px 0 16px; padding: 0; counter-reset: s; }
.steps li { flex: 1; position: relative; text-align: center; font-size: .72rem; line-height: 1.3; color: var(--ink-3); }
.steps li i { display: block; width: 14px; height: 14px; margin: 0 auto 4px; border-radius: 50%; background: #DDD8D2; position: relative; z-index: 1; }
.steps li::before { content: ""; position: absolute; top: 6px; left: -50%; width: 100%; height: 2px; background: #DDD8D2; }
.steps li:first-child::before { display: none; }
.steps li.is-done i, .steps li.is-done::before, .steps li.is-on::before { background: var(--teal); }
.steps li.is-on i { background: var(--coral); box-shadow: 0 0 0 4px rgba(240, 90, 100, .2); }
.steps li.is-on { color: var(--ink); font-weight: 600; }
.items { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 10px; }
.items__r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #F1EDE8; }
.items__r:last-child { border-bottom: 0; }
.items__r img { width: 46px; height: 46px; border-radius: 8px; object-fit: cover; flex: none; }
.items__r > div { flex: 1; min-width: 0; }
.items__r b { display: block; font-size: .92rem; }
.items__r small { display: block; color: var(--ink-3); }
.items__p { text-align: right; font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.items__p b { display: block; font-size: .95rem; color: var(--ink); }
.items__p small { white-space: normal; max-width: 140px; }
.tot { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; margin: 0 0 12px; padding: 12px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); }
.tot dt { color: var(--ink-2); font-size: .92rem; }
.tot dd { margin: 0; text-align: right; font-family: var(--hd); }
.tot dd.b { font-weight: 600; color: var(--coral-d); font-size: 1.05rem; }
.msg { padding: 10px 12px; border-radius: 12px; background: #FFF8E1; margin: 0 0 12px; font-size: .92rem; }
.msg--ship { background: #E6F6FD; }
.msg--warn { background: #FFF0E6; }
.box { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding: 14px; margin: 0 0 12px; }
.box h3 { display: flex; align-items: center; gap: 6px; }
.box > .tot { box-shadow: none; padding: 0; }
.box summary { cursor: pointer; font: 500 .95rem var(--hd); padding: 10px 0; margin: -6px 0; }
details.box > p { margin: 6px 0 0; font-size: .88rem; }
.box--pay { border: 2px solid var(--teal); }
.qr { width: 220px; height: 220px; margin: 10px auto 0; border-radius: 12px; background: #fff; padding: 8px; border: 1px solid var(--bd); image-rendering: pixelated; }
.acct { display: grid; justify-items: center; gap: 2px; text-align: center; padding: 12px; margin: 10px 0; border-radius: 12px; background: #F2FBF8; }
.acct b { font-size: 1.35rem; letter-spacing: .04em; }
.acct span { color: var(--ink-2); font-size: .9rem; }
.acct .btn { margin-top: 6px; }
.or { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: .82rem; margin: 10px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--bd); }
.upload { cursor: pointer; }
.tbl { width: 100%; border-collapse: collapse; font-size: .82rem; margin: 8px 0; }
.tbl th, .tbl td { padding: 6px 4px; border-bottom: 1px solid #F1EDE8; text-align: right; }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl th { color: var(--ink-3); font-weight: 500; }

/* me */
.me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.me img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #EEE; flex: none; }
.me b { display: block; font-size: 1.05rem; }
.me small { color: var(--ink-3); }
.bar { height: 10px; border-radius: 99px; background: #EEEAE5; overflow: hidden; margin: 6px 0 6px; }
.bar i { display: block; height: 100%; background: var(--teal); border-radius: 99px; }
.bar--bad i { background: var(--orange); }

/* team */
.cnt { margin-left: auto; min-width: 26px; padding: 0 8px; border-radius: 99px; background: var(--coral); color: #fff; font-size: .8rem; text-align: center; }
.box .qrow { box-shadow: none; border: 1px solid #F1EDE8; }
.crow { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 0; border-bottom: 1px solid #EFEBE6; background: var(--card); text-align: left; cursor: pointer; }
.crow img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: #EEE; flex: none; }
.crow > div { flex: 1; min-width: 0; }
.crow b { display: block; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow b em { font-style: normal; font-size: .7rem; color: var(--orange); border: 1px solid var(--orange); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.crow small { display: block; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crow > span { text-align: right; flex: none; display: grid; justify-items: end; gap: 4px; }
.crow > span i { font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--line); color: #fff; font: 600 .72rem/20px var(--hd); text-align: center; }
[data-list] { margin-top: 10px; }
.chat { padding: 12px 12px 210px; display: flex; flex-direction: column; }
.bb { display: flex; flex-direction: column; max-width: 82%; margin: 4px 0; }
.bb__c { padding: 8px 12px; border-radius: 16px; font-size: .94rem; overflow-wrap: anywhere; position: relative; }
.bb small { font-size: .7rem; color: var(--ink-3); margin: 2px 6px 0; }
.bb--in { align-self: flex-start; }
.bb--in .bb__c { background: var(--card); border-top-left-radius: 4px; box-shadow: var(--sh); }
.bb--out { align-self: flex-end; align-items: flex-end; }
.bb--out .bb__c { background: #C6F3D6; border-top-right-radius: 4px; }
.bb--sys { align-self: center; align-items: center; max-width: 92%; }
.bb--sys .bb__c { background: #EAE6E1; color: var(--ink-2); font-size: .8rem; border-radius: 10px; text-align: center; }
.stk { width: 110px; height: 110px; object-fit: contain; }
.pic { max-width: 220px; max-height: 260px; border-radius: 10px; cursor: zoom-in; }
.pic--big { max-width: 100%; max-height: none; }
.file { display: inline-block; padding: 6px 10px; border-radius: 10px; background: rgba(0, 0, 0, .05); text-decoration: none; color: var(--ink); word-break: break-all; }
.tg { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 99px; font-style: normal; font-size: .68rem; font-family: var(--hd); vertical-align: middle; }
.tg--slip { background: var(--teal); color: #fff; }
.tg--doc { background: var(--sky); color: #fff; }
.tg--bad { background: var(--red); color: #fff; }
.composer { position: fixed; left: 0; right: 0; bottom: calc(60px + var(--safe-b)); z-index: 15; background: var(--card); border-top: 1px solid var(--bd); padding: 8px 10px 6px; }
.composer form { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; min-height: 42px; max-height: 120px; padding: 10px 12px; border: 1px solid var(--bd); border-radius: 12px; font: inherit; resize: none; outline: none; }
.composer textarea:focus { border-color: var(--teal); }
.composer small { display: block; margin-top: 4px; font-size: .74rem; }
.qk { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
.qk::-webkit-scrollbar { display: none; }
.qk button { flex: none; border: 1px solid var(--teal); color: var(--teal-d); background: #F2FBF8; border-radius: 99px; padding: 4px 12px; font: 500 .8rem var(--hd); cursor: pointer; white-space: nowrap; }
.ed { padding: 10px 12px; border-bottom: 1px solid #F1EDE8; }
.ed:last-child { border-bottom: 0; }
.ed > b { display: block; font-size: .92rem; }
.ed > small { display: block; }
.rm { align-self: end; display: flex !important; align-items: center; gap: 6px; padding: 8px 0; font-size: .86rem !important; color: var(--red) !important; }
.rm input { accent-color: var(--red); }
.docs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.docs figure { margin: 0; }
.docs img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in; background: #EEE; }
.docs figcaption { font-size: .72rem; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs .file { grid-column: 1 / -1; }
[data-res] { padding: 10px 14px; }

@media (min-width: 720px) {
	.main, .tabs, .composer { max-width: 720px; margin-left: auto; margin-right: auto; }
	.tabs, .composer { left: 50%; transform: translateX(-50%); width: 100%; }
	.hd { padding-left: max(12px, calc(50% - 348px)); padding-right: max(12px, calc(50% - 348px)); }
}
.av--txt { width: 56px; height: 56px; border-radius: 50%; flex: none; display: grid; place-items: center; background: linear-gradient(135deg, var(--coral), var(--orange)); color: #fff; font: 600 1.4rem var(--hd); }
.crow .av--txt { width: 46px; height: 46px; font-size: 1.1rem; background: linear-gradient(135deg, var(--teal), var(--sky)); }

/* ------------------------------------------------------------ purchasing in a normal browser (computer / phone) */
.hd__save { background: #fff; color: var(--teal-d); border-color: #fff; font-weight: 600; }
/* Purchasing form: who buys the product (souvenirs to resell / raw materials hotels use) */
.pathline { display: grid; gap: 2px; margin: -2px 0 12px; padding: 8px 10px; border-radius: 10px; font-size: .86rem; line-height: 1.45; background: #F4F1EC; color: var(--ink-2); }
.pathline b { font-size: .78rem; font-weight: 600; opacity: .8; }
.pathline--resale { background: #E8F8F4; color: var(--teal-d); }
.pathline--use { background: #FFF1E8; color: #A8460F; }
.modelock { display: block; padding: 8px 10px; border-radius: 10px; background: #FFF1E8; color: #A8460F; font-weight: 600; font-size: .9rem; }
/* Top up %: the price it makes, under the % box */
.mk-out { display: block; margin-top: 6px; padding: 6px 10px; border-radius: 10px; background: #E8F8F4; color: var(--teal-d); font-weight: 600; font-size: .9rem; }
.mk-out.warn { background: #FFF1E8; color: #A8460F; }
.gate { min-height: 70vh; padding: 16px; }
.gate__card { width: 100%; max-width: 440px; text-align: center; padding: 26px 20px; color: var(--ink); }
.gate__card h2 { margin: 6px 0 10px; font: 600 1.15rem var(--hd); }
.gate__card .btn { margin: 14px 0 6px; }
.gate__help { font-size: .84rem; line-height: 1.55; }
.gate__logo { width: 64px; height: 64px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--sky)); }
.gate__logo svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (min-width: 1000px) {
	.mode-buy .main, .mode-buy .tabs { max-width: 1120px; }
	.mode-buy .hd { padding-left: max(12px, calc(50% - 548px)); padding-right: max(12px, calc(50% - 548px)); }
	.buy-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 14px; padding: 0 14px; }
	.buy-cols .box { margin-bottom: 14px; }
	.buy-calc { position: sticky; top: 64px; }
	.mode-buy .errs { margin: 8px 14px; }
	.mode-buy .main > section.box { margin-left: 14px; margin-right: 14px; }
}

/* ------------------------------------------------------------ customer cards (CRM) */
.mode-rep .hd { background: var(--teal-d); }
.mode-rep .tab.is-on { color: var(--teal-d); }
.crm-acts { padding: 10px 14px 0; }
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0 0 12px; }
.work { display: grid; justify-items: start; gap: 4px; text-align: left; padding: 14px; border: 0; border-radius: var(--r); color: #fff; font: inherit; cursor: pointer; box-shadow: var(--sh); min-height: 120px; }
.work svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.work b { font-size: 1.02rem; line-height: 1.3; }
.work small { font-size: .8rem; opacity: .92; line-height: 1.35; }
.work--coral { background: linear-gradient(135deg, var(--coral), #E8485A); }
.work--teal { background: linear-gradient(135deg, var(--teal), #1A9C83); }
.work--orange { background: linear-gradient(135deg, var(--orange), #E0551A); }
.work--sky { background: linear-gradient(135deg, var(--sky), #1597C8); }
.work--yellow { background: linear-gradient(135deg, #EDD55E, #E2C23A); color: #3A2F00; }
.work--grey { background: #fff; color: var(--ink); }
@media (min-width: 760px) { .works { grid-template-columns: repeat(3, 1fr); } }
.rmine { padding-bottom: 0; }
.rmine .box { margin: 0; }
.rmine__link { font-size: .84rem; color: var(--ink-2); word-break: break-all; background: #F2FBF8; border-radius: 8px; padding: 6px 10px; margin: 6px 0 8px; }
.rmine__nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 10px 0 4px; }
.rmine__nums div { background: #F6F7F9; border-radius: 10px; padding: 6px 8px; display: grid; }
.rmine__nums small { color: var(--ink-3); font-size: .74rem; }
.rmine__nums b { font-size: .98rem; }
.rmine__note { font-size: .82rem; margin: 6px 0 0; }
.rmine .warn { margin: 6px 0 0; }
.crm-f { display: grid; gap: 8px; padding: 8px 14px 0; }
.crm-f--2 { grid-template-columns: 1fr 1fr; }
.crm-f .input { min-height: 38px; padding: 6px 10px; font-size: .88rem; }
.qrow .due, b.due { color: #fff; background: var(--orange); border-radius: 99px; padding: 0 8px; }
.qrow small.due { display: inline-block; margin-top: 0; }
.who-rep { font-weight: 500; color: var(--ink-2); }
.qrow--flat { box-shadow: none; border: 1px solid #EFEBE6; padding: 10px; }
.crm-next p { margin: 4px 0 8px; }
.crm-acts2 { margin: 0 0 12px; }
.crm-p { display: flex; align-items: center; gap: 6px; padding: 8px 0; border-top: 1px solid #EFEBE6; }
.crm-p:first-of-type { border-top: 0; }
.crm-p > div { flex: 1; min-width: 0; }
.crm-p small { display: block; color: var(--ink-3); }
.crm-tl { display: grid; gap: 8px; }
.crm-n { padding: 8px 10px; border-radius: 10px; background: #FFF8E1; }
.crm-n p { margin: 2px 0 0; font-size: .92rem; }
.crm-n small { color: var(--ink-3); font-size: .76rem; }
.crm-n--sys { background: #F4F1EC; }
.crm-n--sys p { color: var(--ink-2); font-size: .86rem; }
.crm-o { margin: 4px 0; font-size: .92rem; }
.crm-o small { display: block; color: var(--ink-3); font-size: .76rem; }
.segpick--crm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

/* ------------------------------------------------------------ app feel (1.10.0): skeletons, live refresh, home screen */
html, body { overscroll-behavior-y: none; }
body { -webkit-font-smoothing: antialiased; }
.card, .qrow, .crow, .chip, .tab, .hd__back, .hd__r, .li { touch-action: manipulation; }
.card { transition: transform .12s ease; }
.card:active, .qrow:active, .crow:active { transform: scale(.985); }
.chip:active, .tab:active { opacity: .7; }
.main.is-in { animation: twp-in .18s ease-out; }
@keyframes twp-in { from { opacity: .3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .main.is-in, .sk, .sk i, .sk b { animation: none !important; } .card:active, .qrow:active, .crow:active { transform: none; } }

/* Skeleton: the shape of the screen while its data comes. */
.sk { position: relative; overflow: hidden; }
.sk i, .sk b, .sk--bar { display: block; background: #ECE7E1; border-radius: 8px; }
.sk i::after, .sk b::after, .sk--bar::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: twp-sk 1.2s ease-in-out infinite; }
@keyframes twp-sk { to { transform: translateX(100%); } }
.sk--card { background: var(--card); border-radius: var(--r); box-shadow: var(--sh); padding-bottom: 12px; }
.sk--card i { aspect-ratio: 1; border-radius: 0; margin-bottom: 10px; position: relative; overflow: hidden; }
.sk--card b { height: 12px; margin: 8px 10px 0; position: relative; overflow: hidden; }
.sk--card b + b { width: 55%; }
.sk--row { display: grid; grid-template-columns: 46px 1fr; grid-template-rows: auto auto; column-gap: 12px; row-gap: 8px; align-items: center; background: var(--card); border-radius: 12px; padding: 12px; margin-bottom: 10px; box-shadow: var(--sh); }
.sk--row i { grid-row: 1 / 3; width: 46px; height: 46px; border-radius: 50%; position: relative; overflow: hidden; }
.sk--row b { height: 12px; position: relative; overflow: hidden; }
.sk--row b + b { width: 60%; }
.sk--text { margin-top: 16px; }
.sk--text b { height: 12px; margin-bottom: 10px; position: relative; overflow: hidden; }
.sk--text b:last-child { width: 70%; }
.sk--bar { height: 42px; margin: 12px 14px 0; border-radius: 12px; position: relative; overflow: hidden; }
.tabs--sk { height: calc(56px + var(--safe-b)); }

/* "New data" pill: the screen changed while someone was typing. */
.pill { position: fixed; left: 50%; top: calc(60px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); z-index: 40; border: 0; border-radius: 99px; padding: 8px 16px; background: var(--ink); color: #fff; font: 500 .86rem var(--hd); box-shadow: 0 6px 18px rgba(0, 0, 0, .18); cursor: pointer; animation: twp-in .2s ease-out; }

/* Add to home screen (phone browsers, not inside LINE). */
.inst { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; padding: 10px 12px; border-radius: 12px; background: #fff; box-shadow: var(--sh); }
.inst span { flex: 1; display: flex; flex-direction: column; line-height: 1.35; }
.inst small { color: var(--ink-3); }
.inst__x { border: 0; background: none; font-size: 1.4rem; line-height: 1; color: var(--ink-3); cursor: pointer; padding: 0; min-width: 40px; min-height: 40px; margin: -8px -8px -8px 0; }

/* Opened from the home screen: room for the phone's status bar. */
@media (display-mode: standalone) { .hd { padding-top: env(safe-area-inset-top, 0px); min-height: calc(52px + env(safe-area-inset-top, 0px)); } }

/* ------------------------------------------------------------ suppliers (brands / importers) */
.mode-sup .hd { background: #0C7FA8; }
.mode-sup .tab.is-on { color: #0C7FA8; }
.hello--sup { background: linear-gradient(120deg, var(--sky), var(--teal)); }
.sup-steps { margin: 12px 14px; }
.sup-steps ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; font-size: .92rem; }
.crow small.sup-why { white-space: normal; color: var(--red); }
.sup-pct { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 10px; font-size: .84rem; color: var(--ink-2); }
.sup-pct .input { width: 90px; min-height: 36px; padding: 4px 10px; }
.pf--lock .input { background: #F1EFEC; color: var(--ink-3); }
.pf--lock .seg { opacity: .6; }
.note--ok { background: #E8F8F4; border-left-color: var(--teal); }
.note--wait { background: #FFF1E8; border-left-color: var(--orange); }
.errs.sup-no { margin: .9em 0; }
.sup-rev { border: 2px solid var(--orange); }
.sup-rev .tot dd { white-space: normal; }
.sup-from { padding: 0 14px; font-size: .86rem; }
@media (min-width: 1000px) {
	.mode-sup .main, .mode-sup .tabs { max-width: 1120px; }
	.mode-sup .hd { padding-left: max(12px, calc(50% - 548px)); padding-right: max(12px, calc(50% - 548px)); }
	.mode-sup .errs { margin: 8px 14px; }
	.mode-buy .main > section.sup-rev { margin-left: 14px; margin-right: 14px; }
}

/* ------------------------------------------------------------ product form: pictures first (purchasing + suppliers) */
.ped { display: flex; flex-direction: column; padding: 10px 10px 0; }
.ped__side, .ped__main { display: contents; }
.ped__top { min-width: 0; }
.ped__name { margin: 2px 4px 10px; font-size: .95rem; }
.ped__more { margin: 0 0 12px; }
.ped .errs { margin: 0 0 10px; }
.ped .buy-calc { position: static; }
.gal h3 { display: flex; align-items: baseline; gap: 6px; }
.gal__n { font: 400 .8rem var(--bd-f); }
.gal__main { position: relative; margin: 0; width: 100%; aspect-ratio: 1 / 1; display: grid; place-items: center; background: #fff; border: 1px solid var(--bd); border-radius: 14px; overflow: hidden; }
.gal__main img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.gal__tag { position: absolute; left: 10px; top: 10px; padding: 2px 10px; border-radius: 99px; background: rgba(31, 36, 48, .72); color: #fff; font: 500 .74rem var(--hd); }
.gal__x { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(31, 36, 48, .72); color: #fff; font-size: 1.15rem; line-height: 1; cursor: pointer; }
.gal__empty { aspect-ratio: 4 / 3; cursor: pointer; border: 2px dashed #CFC8BF; background: #FBFAF8; text-align: center; align-content: center; gap: 8px; padding: 16px; color: var(--ink-2); }
.gal__empty b { font: 600 1.1rem var(--hd); color: var(--ink); }
.gal__empty small { font-size: .84rem; }
.gal__cam { width: 72px; height: 72px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--teal), var(--sky)); box-shadow: var(--sh); }
.gal__cam svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gal__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px 2px; scrollbar-width: thin; }
.gal__th { position: relative; flex: none; width: 76px; height: 76px; margin: 0; border: 2px solid var(--bd); border-radius: 12px; background: #fff; overflow: hidden; cursor: pointer; }
.gal__th.is-main { border-color: var(--teal); }
.gal__th img { width: 100%; height: 100%; object-fit: contain; }
.gal__th .gal__x { top: 3px; right: 3px; width: 22px; height: 22px; font-size: .8rem; }
.gal__add { display: grid; place-items: center; align-content: center; border-style: dashed; color: var(--ink-2); background: #FBFAF8; }
.gal__add span { font-size: 1.5rem; line-height: 1; }
.gal__add small { font-size: .7rem; }
.gal__th.is-busy { cursor: default; background: linear-gradient(90deg, #EEE, #F8F8F8, #EEE); background-size: 200% 100%; animation: galbusy 1s linear infinite; }
@keyframes galbusy { to { background-position: -200% 0; } }
.gal.is-drop .gal__main { outline: 3px dashed var(--teal); outline-offset: 2px; }
.gal__hint { margin: 10px 0 0; font-size: .8rem; line-height: 1.5; color: var(--ink-3); }
.gal [data-err="images"] { display: block; padding: 4px 6px 0; }
@media (hover: none) { .gal__pc { display: none; } }
.actbar { position: sticky; bottom: calc(56px + var(--safe-b)); z-index: 15; display: flex; gap: 8px; padding: 10px 12px; margin-top: 4px; background: rgba(246, 244, 241, .95); border-top: 1px solid var(--bd); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.actbar .btn { flex: 1; min-height: 46px; }
.actbar .actbar__2 { flex: 0 0 auto; }
@media (min-width: 900px) {
	.ped { display: grid; grid-template-columns: minmax(320px, 430px) minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 14px 0; }
	.ped__side { display: block; position: sticky; top: 64px; max-height: calc(100vh - 150px); overflow-y: auto; scrollbar-width: thin; }
	.ped__main { display: block; }
	.ped .box { margin-bottom: 14px; }
	.actbar { justify-content: flex-end; padding: 10px 14px; }
	.actbar .btn { flex: 0 0 auto; min-width: 200px; }
	.mode-buy .ped__name, .mode-sup .ped__name { margin-top: 0; }
}

/* ------------------------------------------------------------ product lists: picture cards or table */
.lbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px 0; font-size: .86rem; }
.vsw { display: inline-flex; border: 1px solid var(--bd); border-radius: 10px; overflow: hidden; background: var(--card); flex: none; }
.vsw button { border: 0; background: none; padding: 6px 12px; font: 500 .84rem var(--hd); color: var(--ink-2); cursor: pointer; }
.vsw button.is-on { background: var(--ink); color: #fff; }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 10px 12px; }
.pcard { display: flex; flex-direction: column; min-width: 0; background: var(--card); border: 1px solid var(--bd); border-radius: 14px; overflow: hidden; box-shadow: var(--sh); }
.pcard__pic { position: relative; display: block; width: 100%; aspect-ratio: 1 / 1; padding: 0; border: 0; border-bottom: 1px solid #EFEBE6; background: #fff; cursor: pointer; }
.pcard__pic img { width: 100%; height: 100%; object-fit: contain; padding: 6%; }
.pcard__none { height: 100%; display: grid; place-items: center; align-content: center; gap: 4px; color: var(--ink-3); background: linear-gradient(135deg, #FBE3E5, #E1F5F0); }
.pcard__none svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.pcard__tl, .pcard__tr { position: absolute; top: 8px; max-width: calc(100% - 16px); }
.pcard__tl { left: 8px; }
.pcard__tr { right: 8px; }
.pcard__tl + .pcard__tr { max-width: 45%; }
.pcard__tr .st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pcard__b { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; }
.pcard__name { padding: 0; border: 0; background: none; text-align: left; font: 600 .95rem/1.35 var(--hd); color: var(--ink); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.7em; }
.pcard__sku { color: var(--ink-3); font-size: .76rem; }
.pcard__f { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; margin: 8px 0 0; }
.pcard__f div { min-width: 0; }
.pcard__f dt { font-size: .72rem; color: var(--ink-3); }
.pcard__f dd { margin: 0; font: 600 .9rem/1.35 var(--hd); overflow-wrap: break-word; }
.pcard__f dd.is-warn { color: var(--red); }
.pcard__f dd.is-ok { color: var(--teal-d); }
.pcard__note { margin: 6px 0 0; font-size: .78rem; color: var(--red); }
.pcard__a { display: grid; gap: 6px; margin-top: auto; padding-top: 10px; }
.pcard__a .btn { width: 100%; }
@media (min-width: 640px) { .pgrid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) {
	.pgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 12px 14px; }
	.pcard__name { font-size: 1rem; }
	.pcard__f dd { font-size: .98rem; }
}

/* Sales manual (คู่มือเซลส์): its own styles come with it (scoped to .man) */
@media (min-width: 1000px) {
	.is-wide .main, .is-wide .tabs { max-width: 1120px; }
	.is-wide .hd { padding-left: max(12px, calc(50% - 548px)); padding-right: max(12px, calc(50% - 548px)); }
}
.tab span i.i--new { min-width: 0; padding: 0 6px; right: -24px; font-size: .69rem; }
.mtop { margin: 12px 14px 0; padding: 12px 14px; background: var(--card); border-radius: var(--r); box-shadow: var(--sh); display: grid; gap: 8px; }
.mtop__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mtop__v { display: grid; gap: 1px; }
.mtop__v b { font-size: 1rem; }
.mtop__v span { font-size: .84rem; color: var(--ink-3); }
.mtop__v i { font: 600 .7rem/1 var(--hd); font-style: normal; color: #fff; background: var(--red); border-radius: 99px; padding: 3px 7px; margin-left: 4px; vertical-align: 1px; }
.mtop__new { background: #FBF4CF; border-radius: 10px; padding: 8px 12px; font-size: .92rem; }
.mtop__new summary { cursor: pointer; font: 500 .92rem var(--hd); padding: 9px 0; margin: -6px 0; }
.mtop__new ul { margin: 6px 0 2px; padding-left: 20px; }
.mtop__new li { margin: 2px 0; }
.man { margin-top: 12px; }
.man .m-nav { top: 52px; z-index: 6; }
.man img { cursor: zoom-in; }
.work { position: relative; }
.work--man { background: #fff; color: var(--ink); border: 2px solid var(--teal); }
.work--man svg { color: var(--teal-d); }
.work__new { position: absolute; top: 10px; right: 10px; font: 600 .7rem/1 var(--hd); font-style: normal; color: #fff; background: var(--red); border-radius: 99px; padding: 4px 8px; }
.mnew { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 10px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 0; border-radius: var(--r); background: #FBF4CF; color: var(--ink); text-align: left; font: inherit; cursor: pointer; box-shadow: var(--sh); }
.mnew b { font: 600 .98rem var(--hd); }
.mnew span { grid-column: 1; font-size: .84rem; color: var(--ink-2); }
.mnew i { grid-row: 1 / span 2; grid-column: 2; font: 500 .86rem var(--hd); font-style: normal; color: #fff; background: var(--teal-d); border-radius: 10px; padding: 8px 12px; }
/* 1.22.0 icons: one SVG set from TWP Guide Wholesale instead of emoji (DESIGN.md), line style on a soft tint */
.twp-ic { display: block; flex: none; width: 24px; height: 24px; overflow: visible; }
.twp-ic__t { fill: none; }
.sugg__i--cat { background: var(--soft); color: var(--coral-d); }
.sugg__i--raw { background: #E6F6F1; color: var(--teal-d); }
.sugg__i .twp-ic { width: 22px; height: 22px; }

/* Button icons and flags (TWP LINE 1.23.0): the same SVG set as the website, flag pictures instead of emoji (DESIGN.md) */
.flag { display: inline-block; width: 20px; height: 15px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(17, 24, 39, .14); vertical-align: -2px; object-fit: cover; background: #f3f4f6; }
.flag--s { width: 16px; height: 12px; border-radius: 2px; vertical-align: -1px; }
.chips--short .chip { display: inline-flex; align-items: center; gap: 6px; }
.chip .twp-ic { width: 16px; height: 16px; color: var(--coral-d); }
.sec-raw .chip .twp-ic, .chip--from .twp-ic, .chip--both .twp-ic { color: var(--teal-d); }
.chip.is-on .twp-ic { color: currentColor; }
.chip .flag { width: 18px; height: 13.5px; vertical-align: 0; }
.hello__types button { display: inline-flex; align-items: center; gap: 6px; }
.hello__types .twp-ic { width: 16px; height: 16px; }
.hello .hello__who { display: inline-flex; align-items: center; gap: 6px; }
.hello__who .twp-ic { width: 15px; height: 15px; }
.hd__who .twp-ic { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 5px; }
.again__h b { display: inline-flex; align-items: center; gap: 7px; }
.again__h .twp-ic { width: 18px; height: 18px; color: var(--coral-d); }
.sec-raw .again__h .twp-ic { color: var(--teal-d); }
.hello__types button span, .hello .hello__who span { font-size: inherit; opacity: 1; }
