:root {
  --bg: #f6f7f9; --card: #fff; --text: #1c2430; --muted: #6b7684; --line: #e3e7ec;
  --accent: #06c755; --accent-dark: #05a647; --danger: #d64545; --warn: #c98a00;
  font-family: system-ui, -apple-system, "Segoe UI", "Noto Sans Myanmar", "Hiragino Sans", sans-serif;
  color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.45;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* elements with their own display (modal, bars) must still hide */
body { margin: 0; }
main { max-width: 960px; margin: 0 auto; padding: 16px; overflow-wrap: anywhere; }
.grid2 > *, .grid3 > * { min-width: 0; }
h1 { font-size: 1.4rem; margin: .4rem 0 1rem; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
a { color: #1565c0; }
code, .mono { font-family: ui-monospace, Menlo, monospace; font-size: .9em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }

.top { position: sticky; top: 0; z-index: 5; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px; padding: 8px 16px; flex-wrap: wrap; }
.brand { font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 700px) { .brand { flex: 0 1 auto; } }
.top nav { display: flex; gap: 4px; flex: 1 1 100%; min-width: 0; overflow-x: auto; order: 3; }
@media (min-width: 700px) { .top nav { flex: 1 1 auto; order: 0; } }
.top nav a { padding: 6px 10px; border-radius: 8px; text-decoration: none; color: var(--text); white-space: nowrap; }
.top nav a.on { background: #e8f8ee; color: var(--accent-dark); font-weight: 600; }
.logout { margin: 0; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 16px; }
.card.narrow { max-width: 380px; margin: 10vh auto; }
.grid2, .grid3 { display: grid; gap: 0 16px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }
.head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

label { display: block; margin-bottom: 12px; font-weight: 500; }
label small { display: block; font-weight: 400; }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; font: inherit;
  border: 1px solid #cfd6de; border-radius: 8px; background: #fff; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid #9be3b8; border-color: var(--accent); }
label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
label.check input { width: auto; margin: 0; }
label.check.inline { display: inline-flex; margin-right: 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 500; margin-bottom: 6px; }

button, .button { display: inline-block; padding: 9px 16px; border: 0; border-radius: 8px; font: inherit; font-weight: 600;
  background: var(--accent); color: #fff; cursor: pointer; text-decoration: none; white-space: nowrap; overflow-wrap: normal; }
button:hover, .button:hover { background: var(--accent-dark); }
button.secondary, .button.secondary { background: #eef1f4; color: var(--text); }
button.danger { background: #fbeaea; color: var(--danger); }
button.link { background: none; color: var(--muted); padding: 6px; font-weight: 400; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; background: #e8f8ee; color: #135c2f; }
.flash.error { background: #fdecec; color: #8a1f1f; }

.tabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 4px; }
.tabs a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  text-decoration: none; color: var(--text); white-space: nowrap; }
.tabs a.on { background: var(--text); color: #fff; border-color: var(--text); }
.count { background: var(--accent); color: #fff; border-radius: 999px; padding: 0 7px; font-size: .8rem; margin-left: 2px; }

.list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.row { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px;
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap; text-decoration: none; color: var(--text); }
.row small { display: block; color: var(--muted); font-weight: 400; }
.row .who { flex: 1 1 200px; font-weight: 600; text-decoration: none; color: var(--text); min-width: 0; }
.row.order .no { font-weight: 700; color: var(--muted); }
.row.order .amt { font-weight: 600; text-align: right; }
.row.order:hover { border-color: #b9c3cf; }
.row.inactive, .card.inactive { opacity: .6; }
.row.product label.mini { margin: 0; width: 90px; font-size: .8rem; color: var(--muted); }
.row.product label.mini.check { width: auto; color: var(--text); }
.row.product input.zero { border-color: var(--danger); color: var(--danger); }

.badges { display: flex; gap: 4px; }
.badge { font-size: .75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: #eef1f4; color: #3c4653; }
.s-new { background: #e3f0ff; color: #0b5cad; }
.s-confirmed { background: #efe7ff; color: #5b2eb8; }
.s-delivering { background: #fff4d6; color: #8a5d00; }
.s-done { background: #e8f8ee; color: #13703a; }
.s-cancelled { background: #f1f1f1; color: #777; text-decoration: line-through; }
.p-unpaid { background: #fdecec; color: #a32020; }
.p-paid { background: #e8f8ee; color: #13703a; }

table.items { width: 100%; border-collapse: collapse; }
table.items td { padding: 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.items td small { display: block; color: var(--muted); }
table.items .num { text-align: right; white-space: nowrap; padding-left: 12px; }
table.items tr.sub td { color: var(--muted); border: 0; padding: 2px 0; }
table.items tr.total td { font-weight: 700; border: 0; padding-top: 6px; }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { margin: 0; }
form.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
form.inline input[type=file] { width: auto; flex: 1 1 200px; }
.thumb { max-width: 160px; border-radius: 8px; margin-bottom: 12px; display: block; }
.post .body { white-space: pre-wrap; margin: 6px 0; }
.post .actions { display: flex; gap: 8px; margin-top: 8px; }
.post .actions form { margin: 0; }

.code { font-family: ui-monospace, Menlo, monospace; font-weight: 700; background: #eef1f4; border-radius: 6px; padding: 2px 8px; }
.row.cat .amt { text-align: right; font-weight: 600; }
input.upper { text-transform: uppercase; }
.search select { width: auto; max-width: 40%; margin: 0; }
.row.product .quick { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.thumb-sm { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: flex; align-items: center;
  justify-content: center; background: #eef1f4; color: var(--muted); font-size: .65rem; text-align: center; }
.image-box { border: 1px dashed var(--line); border-radius: 10px; padding: 12px; margin-bottom: 12px; }
details summary { cursor: pointer; color: #1565c0; margin-bottom: 8px; }

.filters .presets { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-weight: 500; }
.chip:hover { background: #eef1f4; }
.chip.on { background: var(--text); color: #fff; border-color: var(--text); }
@media (min-width: 700px) { .span2 { grid-column: span 2; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 12px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stats span { display: block; font-size: .8rem; color: var(--muted); }
.stats strong { display: block; font-size: 1.25rem; }
.stats small { color: var(--muted); }
.warn { color: var(--danger); }
.downloads { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.bars { display: flex; flex-direction: column; gap: 4px; }
.bar-row { display: grid; grid-template-columns: 78px 1fr 92px; gap: 8px; align-items: center; font-size: .85rem; }
.bar-label { color: var(--muted); white-space: nowrap; }
.bar-track { background: #eef1f4; border-radius: 4px; height: 14px; overflow: hidden; }
.bar { display: block; height: 100%; background: var(--accent); border-radius: 4px; min-width: 2px; }
.bar-value { text-align: right; font-weight: 600; white-space: nowrap; }
.bar-value small { color: var(--muted); font-weight: 400; margin-left: 4px; }
.code.small { font-size: .75rem; padding: 1px 5px; }
table.history td { font-size: .85rem; }
details.more { margin-bottom: 8px; }
details.more summary { margin-bottom: 10px; }

/* products: one line per product */
.views { margin-bottom: 10px; }
.chip .n { display: inline-block; min-width: 1.4em; text-align: center; font-size: .75rem; border-radius: 999px;
  background: #eef1f4; color: var(--text); padding: 0 6px; margin-left: 2px; }
.chip.on .n { background: rgba(255,255,255,.25); color: #fff; }
.chip.v-low .n { background: #fff4d6; color: #8a5d00; }
.chip.v-out .n { background: #fdecec; color: #a32020; }
.listing { margin: 4px 0 8px; }
.plist { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.pline { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto 3.2em 12px; gap: 10px; align-items: center;
  padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.pline:last-child { border-bottom: 0; }
.pline:hover { background: #f8faf9; }
.pline.inactive { opacity: .55; }
.pthumb { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: #eef1f4; display: block; }
.pname { min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pname small { display: block; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.pprice { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pstock { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pstock.low { color: #c77700; }
.pstock.out { color: var(--danger); }
.pdot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #9aa5b1; }
.pdot.on { background: var(--accent); border-color: var(--accent); }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-bottom: 16px; }
@media (max-width: 420px) { .pname small { display: none; } .pline { gap: 8px; padding: 8px 10px; } }
a.chip { display: inline-flex; align-items: center; gap: 2px; text-decoration: none; line-height: 1.4; white-space: nowrap; }
.views { display: flex; flex-wrap: wrap; gap: 6px; }
.logout { display: flex; align-items: center; gap: 2px; }
.logout a.link { color: var(--muted); text-decoration: none; padding: 6px; max-width: 12em; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }

/* POS */
.pos { display: grid; gap: 16px; grid-template-columns: 1fr; padding-bottom: 72px; }
@media (min-width: 900px) {
  main:has(.pos) { max-width: 1280px; }
  .pos { grid-template-columns: minmax(0, 1.4fr) minmax(340px, 1fr); align-items: start; padding-bottom: 0; }
  .pos-order { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; }
  .pos-bar { display: none !important; }
}
.pos-search input { font-size: 1.05rem; padding: 12px; }
.pos-cats { margin: 10px 0; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; background: var(--card); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; text-align: left; font-weight: 400; cursor: pointer; white-space: normal; }
.tile:hover { border-color: var(--accent); background: #f6fdf9; }
.tile img, .tile .noimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: #eef1f4; display: block; }
.tile .tname { font-size: .85rem; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.tile .tmeta { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.tile .tmeta b { color: var(--text); }
.tile.out { opacity: .6; }
.tile .zero { color: var(--danger); font-weight: 700; }
.cline { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cline .cname { font-weight: 600; min-width: 0; }
.cline .cname small { display: block; font-weight: 400; color: var(--muted); }
.cline .camt { grid-column: 2; text-align: right; font-weight: 600; }
.cline .cqty { display: flex; gap: 4px; align-items: center; grid-row: span 2; }
.cline .cqty button { padding: 6px 10px; }
.cline .cqty input { width: 3.2em; text-align: center; margin: 0; padding: 6px; }
.cline.short { background: #fff8e8; }
.cline .warn { color: #a35b00; }
.pos-row { display: flex; gap: 8px; align-items: flex-end; }
.pos-row label { flex: 1; }
.pos-row button { margin-bottom: 12px; }
#custinfo { margin: -4px 0 10px; }
.seg { display: flex; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button { flex: 1; background: #fff; color: var(--text); border-radius: 0; font-weight: 500; }
.seg button.on { background: var(--text); color: #fff; }
button.big { width: 100%; padding: 14px; font-size: 1.05rem; }
button:disabled { opacity: .45; cursor: not-allowed; }
.pos-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: space-between;
  align-items: center; gap: 8px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff;
  border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.06); font-weight: 600; }
.pos-done { grid-column: 1 / -1; border-color: var(--accent); background: #f2fcf6; }
h2 .link.small { float: right; font-size: .8rem; }
.badge.ch { background: #e8eefc; color: #2b4aa0; }

/* loading feedback */
.busybar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 50; overflow: hidden; background: #d8f5e4; }
.busybar::after { content: ""; position: absolute; top: 0; bottom: 0; width: 35%; background: var(--accent);
  animation: busybar 1s ease-in-out infinite; }
@keyframes busybar { from { left: -35%; } to { left: 100%; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin, button.busy::before { content: ""; display: inline-block; width: 1em; height: 1em; vertical-align: -2px;
  border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
button.busy { opacity: .85; cursor: progress; }
button.busy::before { margin-right: 8px; }
.pos-grid.loading { opacity: .55; transition: opacity .15s; }
#totals.updating { opacity: .5; }
@media (prefers-reduced-motion: reduce) {
  .busybar::after, .spin, button.busy::before { animation-duration: 3s; }
}

/* review window */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(20, 28, 38, .55); display: flex;
  align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.modal-box { background: var(--card); border-radius: 14px; width: 100%; max-width: 560px; padding: 18px 18px 14px;
  box-shadow: 0 16px 48px rgba(0,0,0,.25); }
.modal-box h2 { font-size: 1.15rem; }
.modal-actions { display: flex; gap: 8px; justify-content: space-between; margin-top: 12px; position: sticky; bottom: 0;
  background: var(--card); padding-top: 8px; }
.modal-actions button { flex: 1; padding: 12px; }
body.modal-open { overflow: hidden; }
body.modal-open .pos-bar { display: none !important; }
.flash.warnbox { background: #fff4d6; color: #6b4a00; }
.rv-cust .badge { margin-left: 6px; }

/* ---------- new-order alerts ---------- */
.nbadge { display: inline-block; min-width: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: #d93025; color: #fff; font-size: .72rem; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
#alertsToggle { font-size: 1rem; text-decoration: none; }
.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: #1f2a37; color: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: toast-in .25s ease-out; }
.toast a.button { padding: 6px 12px; }
.toast .x { background: none; border: 0; color: #cfd6de; font-size: 1.1rem; cursor: pointer; padding: 0 2px; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }
.row.unseen { border-left: 4px solid #d93025; }
.badge.new { background: #d93025; color: #fff; }
.tg-steps { padding-left: 1.2em; }
.tg-steps li { margin: 8px 0; }
.tg-qr { list-style: none; }
.tg-qr svg { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; }
@media (max-width: 700px) { .toasts { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; right: 12px; left: 12px; } }

/* ---------- web chat (Chats page) ---------- */
.small-btn { font-size: .8rem; padding: 4px 10px; vertical-align: middle; margin-left: 8px; }
.chatlog { background: #dde6ee; border-radius: 12px; padding: 12px; max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cl { max-width: 80%; padding: 6px 10px; border-radius: 12px; background: #fff; white-space: pre-wrap; word-break: break-word; }
.cl small { display: block; color: #6b7684; font-size: .7rem; }
.cl.customer { align-self: flex-end; background: #1D9E75; color: #fff; }
.cl.customer small { color: #d6f2e8; }
.cl.staff { background: #fff8e1; }
.cl.note { align-self: center; background: #f1f4f7; color: #6b7684; font-size: .85rem; }
.chat-reply textarea { width: 100%; }
.linkrow { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.linkrow .qr svg { width: 160px; height: 160px; background: #fff; padding: 6px; border-radius: 8px; }
.linkinfo { flex: 1; min-width: 240px; display: flex; flex-direction: column; gap: 6px; }
.linkinfo input, .linkinfo textarea { width: 100%; }

/* ---------- payment accounts (Settings) ---------- */
.account-row { display: grid; grid-template-columns: 1fr 1.1fr 1.3fr 1.3fr auto auto auto; gap: 6px; align-items: center;
               padding: 8px 0; border-bottom: 1px solid #eef1f4; }
.account-row.add { border-bottom: 0; }
.account-row > * { min-width: 0; margin: 0; }
.account-row .check { white-space: nowrap; font-size: .85rem; }
@media (max-width: 800px) { .account-row { grid-template-columns: 1fr 1fr; } }
.device-printing { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 12px; }
.device-printing label { margin: 0; }
.device-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.device-row > div { flex: 1 1 260px; min-width: 0; }
.device-row small { display: block; }

/* ---------- Areas & fees ---------- */
.area-region summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.area-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0; }
.area-head label:not(.check) input { max-width: 10rem; }
.area-towns input:not([type=checkbox]) { max-width: 8rem; }
.area-towns td, .area-towns th { padding: 4px 6px; }
.area-towns input.area-my { max-width: 12rem; }

/* payment screenshots (order page) */
.proof { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-top: 1px solid #eef1f4; }
.proof:first-of-type { border-top: 0; }
.proof img { width: 120px; max-height: 240px; object-fit: contain; border: 1px solid #e3e8ee; border-radius: 8px; background: #f7f9fb; }
.proof .gone { width: 120px; padding: 30px 6px; text-align: center; border: 1px dashed #d5dbe2; border-radius: 8px; }
.proof p { margin: 0 0 6px; }
.proof .reasons { margin: 0 0 6px; padding-left: 18px; color: #8a4b00; }
.proofs form.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.badge.v-ok { background: #e8f8ee; color: #13703a; }
.badge.v-check { background: #fff4e0; color: #8a4b00; }
.badge.v-used { background: #fdecec; color: #a32020; }
.badge.v-unread { background: #eef1f4; color: #3c4653; }
@media (max-width: 520px) { .proof { flex-direction: column; } .proof img, .proof .gone { width: 100%; max-height: 360px; } }
input[type="color"] { height: 42px; padding: 4px; cursor: pointer; }
/* 🤖 AI switch (Chats) and the AI's reply waiting for staff */
.aipanel summary .badge { margin-left: 4px; }
.aimodes { margin: 10px 0; border-collapse: collapse; }
.aimodes td { padding: 4px 12px 4px 0; vertical-align: middle; }
.aimodes .seg { margin: 0; min-width: 15rem; }
.aipanel form { margin-top: 10px; }
.aipanel .inline label { white-space: nowrap; }
.draftbox { border: 2px solid #2b4aa0; }
.draftbox textarea { width: 100%; margin-top: 8px; }

/* ✨ AI product import: the check table */
.imp-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }
.imp-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.imp-table th, .imp-table td { padding: 6px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.imp-table th { font-size: .8rem; color: var(--muted); font-weight: 600; }
.imp-table input:not([type=checkbox]) { width: 100%; min-width: 8em; padding: 4px 6px; }
.imp-table input.short { min-width: 4em; width: 5em; }
.imp-table input.num { text-align: right; }
.imp-table td small { display: block; color: var(--muted); }
.imp-table tr.imp-check td { background: #fff8e6; }
.imp-table tr.imp-fix td, .imp-table tr.need td { background: #fdecec; }
.imp-actions { position: sticky; bottom: 0; background: var(--bg); padding: 10px 0; margin: 0; }
#impSaveError { white-space: pre-line; }

/* ✨ Help panel (help.js): a side panel; full screen on a phone */
.help-open { font-weight: 600; color: #6d28d9; }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); background: #f4f6f5; z-index: 60;
  box-shadow: -6px 0 24px rgba(0,0,0,.15); display: flex; flex-direction: column; }
.help-panel[hidden] { display: none; }
.help-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.help-head b { font-size: 1.1rem; }
.help-head .link { margin-left: auto; font-size: 1.2rem; }
.help-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.help-suggest { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.help-q { text-align: left; background: #fff; color: var(--text); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; white-space: normal; line-height: 1.5; font-weight: 400; }
.help-msg { border-radius: 12px; padding: 10px 12px; margin: 8px 0; line-height: 1.6; white-space: normal; word-break: break-word; }
.help-msg.me { background: #e7f5ef; margin-left: 15%; }
.help-msg.ai { background: #fff; border: 1px solid var(--line); }
.help-tag { font-size: .7rem; color: #6d28d9; margin-bottom: 4px; }
.help-rate { text-align: right; }
.help-rate .link { font-size: 1.2rem; padding: 4px 8px; opacity: .6; }
.help-rate .link.on { opacity: 1; }
.help-talk { background: #e8eefd; border: 1px solid #dce6fb; border-radius: 12px; padding: 12px; margin: 8px 0;
  display: flex; flex-direction: column; gap: 8px; font-weight: 600; }
.help-talk textarea { font-weight: 400; }
.help-talk button { background: #1d4ed8; }
.help-input { background: #fff; border-top: 1px solid var(--line); padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
.help-shot { font-size: .85rem; margin-bottom: 6px; }
.help-row { display: flex; align-items: flex-end; gap: 8px; }
.help-row textarea { flex: 1; resize: none; min-height: 44px; border-radius: 22px; padding: 11px 14px; background: #f4f6f5;
  border: 1px solid #d1d5db; font-size: 1rem; margin: 0; }
.help-file { font-size: 1.4rem; cursor: pointer; padding: 6px; margin: 0; }
#helpSend { width: 44px; height: 44px; border-radius: 50%; padding: 0; font-size: 1.1rem; flex: none; }
#helpSend:disabled { background: #d1d5db; }
@media (max-width: 640px) { .help-panel { width: 100vw; } }

/* 🏪 an owner's shops (base.html) */
.shop-switch select { font: inherit; font-weight: 700; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; background: #fff; max-width: 14rem; }
code.big, strong.big { font-size: 1.15rem; }
