/* ร้านผ้าอบอุ่น: สีทึบล้วน ไม่มีสีโปร่งแสงทับกัน
   พื้นแดงอิฐใช้กับงานด่วนเท่านั้น ส่วนงานเลยนัด/ใกล้นัดใช้แค่ตัวหนังสือแดง */
:root {
  --bg: #F6EEDF;
  --card: #FFFBF3;
  --brand: #8A5A33;
  --brand-dark: #74492A;
  --ink: #4A2E1A;
  --ink-2: #9C7E62;
  --chip: #EADBC2;
  --chip-ink: #6B4426;
  --line: #EADBC2;
  --lip: #E6D4B8;
  --red: #B5432F;
  --red-dark: #9A3826;
  --on-dark: #FFFBF3;
  --radius: 20px;
  --font: "Noto Sans Thai", "Noto Sans Thai UI", "Sukhumvit Set", "Leelawadee UI", "Tahoma", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; }

#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
#view { padding: 0 16px; }
body.has-tabbar #view { padding-bottom: 170px; }

.page { padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: 32px; animation: rise .28s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* การกด: ยุบลงนิดหน่อย */
.press { transition: transform .12s ease, background-color .15s ease, color .15s ease; }
.press:active:not(:disabled) { transform: scale(.96); }

/* ---------- หัวหน้า ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 8px 0 18px; }
.page-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.page-head .sub { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }

.top-bar { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; min-height: 48px; }
.top-bar h1 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; }
.top-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center;
  background: var(--card); color: var(--ink); border: 1.5px solid var(--line); flex: none;
}
.icon-btn .ic { width: 22px; height: 22px; }
.icon-btn.small { width: 36px; height: 36px; border-radius: 12px; }
.icon-btn.small .ic { width: 18px; height: 18px; }

/* ---------- การ์ด ---------- */
.card {
  background: var(--card); border-radius: var(--radius); border: 1.5px solid var(--line);
  box-shadow: 0 3px 0 var(--lip);
}

.chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px;
  background: var(--chip); color: var(--chip-ink); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.chip-strong { background: var(--brand); color: var(--on-dark); font-size: 14px; padding: 5px 12px; }
.chip.st-received { background: var(--chip); color: var(--chip-ink); }
.chip.st-done { background: var(--brand); color: var(--on-dark); }
.chip.st-picked { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

.warn { color: var(--red) !important; font-weight: 700; }
.muted { color: var(--ink-2); }

/* ---------- ปุ่ม ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 16px; font-weight: 700; font-size: 16px;
}
.btn .ic { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); color: var(--on-dark); box-shadow: 0 3px 0 var(--brand-dark); }
.btn-primary:active { background: var(--brand-dark); }
.btn-danger { background: var(--red); color: var(--on-dark); box-shadow: 0 3px 0 var(--red-dark); }
.btn-ghost { background: var(--card); color: var(--ink); border: 1.5px solid var(--line); }
.btn-text { background: none; color: var(--ink-2); min-height: 44px; font-weight: 600; }
.btn-danger-text { color: var(--red); width: 100%; margin-top: 18px; }
.btn-big { min-height: 56px; font-size: 17px; border-radius: 18px; width: 100%; }
.btn-small { min-height: 38px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.btn-dashed {
  width: 100%; min-height: 52px; border: 2px dashed var(--ink-2); color: var(--brand);
  background: var(--bg); border-radius: 18px; margin: 4px 0 14px;
}
.btn:disabled { opacity: 1; background: var(--chip); color: var(--ink-2); box-shadow: none; }

/* ---------- ตัวเลขสรุป ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.stat {
  background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: 0 3px 0 var(--lip);
  padding: 12px 8px 10px; display: flex; flex-direction: column; align-items: center; gap: 0;
}
.stat b { font-size: 30px; font-weight: 800; line-height: 1.15; color: var(--brand); }
.stat span { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.stat-hot b { color: var(--red); }

/* ---------- แถบเตือน ---------- */
.banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; margin-bottom: 12px;
  background: var(--chip); color: var(--chip-ink); border-radius: 18px;
}
.banner > .ic { width: 24px; height: 24px; }
.banner div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.banner b { font-size: 15px; }
.banner span { font-size: 13px; }
.banner-plain { background: var(--card); border: 1.5px dashed var(--line); color: var(--ink-2); }
.banner-plain b { color: var(--ink); }

/* ---------- รายการงาน ---------- */
.sec-title { font-size: 17px; font-weight: 800; margin: 22px 2px 10px; display: flex; align-items: baseline; gap: 8px; }
.sec-title span { font-size: 14px; color: var(--ink-2); font-weight: 600; }
.list { display: flex; flex-direction: column; gap: 10px; }

.job-card { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 12px; }
.qbox {
  width: 56px; height: 60px; border-radius: 16px; background: var(--chip); color: var(--chip-ink);
  display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1;
}
.qbox small { font-size: 11px; font-weight: 700; margin-bottom: 3px; }
.qbox b { font-size: 24px; font-weight: 800; }
.qbox.urgent { background: var(--red); color: var(--on-dark); }
.qbox.big { width: 76px; height: 82px; border-radius: 20px; }
.qbox.big b { font-size: 34px; }
.qbox.big small { font-size: 13px; }

.jc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.jc-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.jc-name { font-weight: 800; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc-items { font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.jc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--ink-2); align-items: center; }
.jc-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.jc-meta .ic { width: 14px; height: 14px; }
.jc-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; color: var(--ink-2); flex: none; }
.jc-side b { color: var(--ink); font-size: 15px; }
.jc-side .ic { width: 18px; height: 18px; }

.badge-urgent {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px 8px 2px 6px; border-radius: 999px;
  background: var(--red); color: var(--on-dark); font-size: 12px; font-weight: 800; flex: none;
}
.badge-urgent .ic { width: 13px; height: 13px; fill: currentColor; }

.empty { text-align: center; padding: 28px 20px; margin-top: 8px; }
.empty h2 { margin: 10px 0 4px; font-size: 20px; }
.empty p { margin: 0 0 16px; color: var(--ink-2); }
.empty-icon { width: 72px; height: 72px; border-radius: 24px; background: var(--chip); color: var(--brand); display: inline-grid; place-items: center; }
.empty-icon .ic { width: 36px; height: 36px; }
.empty-mini {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 18px; color: var(--ink-2);
  border: 1.5px dashed var(--line); border-radius: 18px; font-size: 14px; text-align: center;
}

/* ---------- แถบล่าง + ปุ่มรับงาน ---------- */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom));
  width: calc(100% - 32px); max-width: 448px; height: 66px; z-index: 20;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 6px;
  background: var(--ink); border-radius: 24px;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--ink-2); font-size: 12px; font-weight: 700; border-radius: 18px; transition: background-color .2s, color .2s;
}
.tab .ic { width: 22px; height: 22px; }
.tab.active { background: var(--brand); color: var(--on-dark); }
.tab:active { transform: scale(.95); }

.fab {
  position: fixed; z-index: 21; right: max(16px, calc(50% - 224px));
  bottom: calc(max(12px, env(safe-area-inset-bottom)) + 80px);
  display: inline-flex; align-items: center; gap: 8px; height: 60px; padding: 0 24px 0 18px; border-radius: 22px;
  background: var(--brand); color: var(--on-dark); font-weight: 800; font-size: 18px;
  box-shadow: 0 4px 0 var(--brand-dark);
}
.fab .ic { width: 26px; height: 26px; stroke-width: 2.6; }

/* ---------- ปฏิทิน ---------- */
.cal { padding: 12px 12px 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal-title { font-size: 18px; font-weight: 800; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow div { text-align: center; font-size: 12px; color: var(--ink-2); font-weight: 700; padding: 4px 0; }
.cal-cell { min-width: 0;
  aspect-ratio: 1 / 1.08; border-radius: 12px; display: flex; flex-direction: column; align-items: center;
  justify-content: flex-start; padding-top: 5px; gap: 2px; background: var(--card); border: 1.5px solid transparent;
}
.cal-cell.blank { background: none; }
.cal-num { font-size: 15px; font-weight: 600; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 999px; }
.cal-cell.today .cal-num { background: var(--brand); color: var(--on-dark); font-weight: 800; }
.cal-cell.selected { border-color: var(--brand); background: var(--bg); }
.cal-badge {
  min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: var(--chip); color: var(--chip-ink); display: grid; place-items: center; line-height: 1;
}
.cal-badge.all-done { background: var(--bg); color: var(--ink-2); }
.cal-badge.late { color: var(--red); }
.cal-today { margin: 10px auto 0; display: flex; }

/* ---------- ค้นหา ---------- */
.search-box {
  display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 56px; background: var(--card);
  border: 1.5px solid var(--line); border-radius: 18px; box-shadow: 0 3px 0 var(--lip); color: var(--ink-2);
}
.search-box:focus-within { border-color: var(--brand); }
.search-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--ink); }
.search-box input::placeholder { color: var(--ink-2); }

/* ---------- ฟอร์มรับงาน (แต่งให้เหมือนแอป ไม่เหมือนกระดาษฟอร์ม) ---------- */
.page-form { padding-bottom: 120px; }
.fcard { padding: 14px; margin-bottom: 14px; }
.fcard-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; margin-bottom: 10px; }
.fcard-title .ic { color: var(--brand); }
.fcard-title.outside { margin: 4px 2px 10px; }

.field { display: block; margin-top: 10px; }
.field:first-of-type { margin-top: 0; }
.field-label { display: block; font-size: 13px; color: var(--ink-2); font-weight: 700; margin: 0 0 4px 4px; }
.input-wrap {
  display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 14px; border-radius: 16px;
  background: var(--bg); color: var(--ink-2); border: 2px solid var(--bg); transition: border-color .15s, background-color .15s;
}
.input-wrap:focus-within { border-color: var(--brand); background: var(--card); }
.input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 17px; color: var(--ink); }
input::placeholder { color: var(--ink-2); opacity: 1; }
.field.error .input-wrap, .date-tile.error, .item-card.error { border-color: var(--red); }

.suggest { display: flex; flex-direction: column; gap: 6px; }
.suggest:not(:empty) { margin-top: 8px; }
.suggest-item {
  display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 14px;
  background: var(--chip); color: var(--chip-ink); animation: rise .2s ease-out;
}
.avatar {
  width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: var(--on-dark);
  display: grid; place-items: center; font-weight: 800; flex: none;
}
.s-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.s-text b { color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-text small { font-size: 13px; }
.suggest-item .chip { background: var(--card); }

.date-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.date-tile {
  position: relative; display: flex; flex-direction: column; padding: 10px 14px; border-radius: 16px;
  background: var(--bg); border: 2px solid var(--bg); min-height: 70px; justify-content: center; overflow: hidden;
}
.date-tile .field-label { margin: 0; }
.date-tile b { font-size: 17px; font-weight: 800; }
/* ช่องเลือกวันที่ของระบบซ่อนไว้ข้างใต้ แตะที่กล่องแล้วเปิดตัวเลือกวัน */
.date-tile input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.quick-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.chip-btn {
  padding: 6px 12px; border-radius: 999px; background: var(--chip); color: var(--chip-ink); font-size: 14px; font-weight: 700;
}

.item-card { padding: 12px 14px 14px; margin-bottom: 10px; animation: rise .22s ease-out; }
.item-head { display: flex; align-items: center; justify-content: space-between; min-height: 36px; margin-bottom: 6px; }
.item-no { font-weight: 800; font-size: 15px; }
.type-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; margin-bottom: 10px; }
.type-chip {
  height: 42px; padding: 0 2px; border-radius: 14px; white-space: nowrap; overflow: hidden; font-size: 14px !important; background: var(--bg); color: var(--chip-ink); font-weight: 700; font-size: 15px;
  border: 1.5px solid var(--line);
}
.type-chip.on { background: var(--brand); color: var(--on-dark); border-color: var(--brand); }
.item-fields { display: grid; grid-template-columns: 1fr 108px; gap: 8px; }
.plain-input, .price-input {
  height: 50px; border-radius: 14px; background: var(--bg); border: 2px solid var(--bg); padding: 0 12px;
  font-size: 16px; color: var(--ink); outline: 0; min-width: 0; width: 100%;
}
.plain-input:focus, .price-input:focus-within { border-color: var(--brand); background: var(--card); }
.price-input { display: flex; align-items: center; gap: 4px; padding: 0 10px; }
.price-input span { color: var(--ink-2); font-weight: 700; }
.price-input input { border: 0; outline: 0; background: none; width: 100%; min-width: 0; font-size: 16px; font-weight: 700; }

.urgent-row { display: flex; align-items: center; gap: 12px; padding: 14px; margin: 4px 0 14px; cursor: pointer; }
.urgent-icon {
  width: 44px; height: 44px; border-radius: 14px; background: var(--chip); color: var(--chip-ink);
  display: grid; place-items: center; flex: none; transition: background-color .2s, color .2s;
}
.urgent-row.on .urgent-icon { background: var(--red); color: var(--on-dark); }
.urgent-row.on .urgent-icon .ic { fill: currentColor; }
.urgent-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.urgent-text b { font-size: 16px; }
.urgent-text small { color: var(--ink-2); font-size: 13px; }

/* สวิตช์เปิดปิด */
.switch {
  appearance: none; -webkit-appearance: none; width: 54px; height: 32px; border-radius: 999px; flex: none;
  background: var(--chip); position: relative; cursor: pointer; transition: background-color .2s; margin: 0;
}
.switch::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 999px;
  background: var(--card); transition: transform .2s ease;
}
.switch:checked { background: var(--red); }
.switch:checked::after { transform: translateX(22px); }

.save-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px max(12px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1.5px solid var(--line);
}
.save-total { display: flex; flex-direction: column; line-height: 1.15; flex: none; }
.save-total small { color: var(--ink-2); font-size: 13px; font-weight: 700; }
.save-total b { font-size: 24px; font-weight: 800; }
.save-bar .btn { flex: 1; width: auto; }

/* ---------- หน้าบันทึกเสร็จ ---------- */
.page-saved { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 48px; }
.saved-check {
  width: 64px; height: 64px; border-radius: 999px; background: var(--brand); color: var(--on-dark);
  display: grid; place-items: center; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1);
}
.saved-check .ic { width: 34px; height: 34px; stroke-width: 3; }
@keyframes pop { from { transform: scale(.3); } to { transform: scale(1); } }
.saved-label { color: var(--ink-2); font-weight: 600; margin: 14px 0 10px; }
.saved-number {
  width: 220px; height: 220px; border-radius: 48px; background: var(--card); border: 3px solid var(--brand);
  display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1;
  box-shadow: 0 5px 0 var(--lip); animation: pop .45s .05s cubic-bezier(.2, 1.4, .4, 1) both;
}
.saved-number small { font-size: 20px; font-weight: 800; color: var(--ink-2); }
.saved-number b { font-size: 112px; font-weight: 800; color: var(--brand); letter-spacing: -3px; }
.saved-number.urgent { border-color: var(--red); }
.saved-number.urgent b { color: var(--red); }
.saved-info { width: 100%; margin-top: 22px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.saved-info b { font-size: 18px; }
.saved-info span { color: var(--ink-2); font-size: 14px; }
.saved-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ---------- หน้ารายละเอียด ---------- */
.hero { display: flex; align-items: center; gap: 14px; padding: 14px; }
.hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hero-text h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; word-break: break-word; }
.phone-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 700; }
.phone-link .ic { width: 16px; height: 16px; }

.steps { display: flex; align-items: flex-start; padding: 16px 10px; margin-top: 12px; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; min-width: 0; }
.step .dot {
  width: 34px; height: 34px; border-radius: 999px; display: grid; place-items: center; font-weight: 800;
  background: var(--bg); color: var(--ink-2); border: 2px solid var(--line); transition: all .25s;
}
.step .dot .ic { width: 18px; height: 18px; stroke-width: 3; }
.step b { font-size: 13px; line-height: 1.25; color: var(--ink-2); }
.step small { font-size: 12px; color: var(--ink-2); min-height: 16px; }
.step.past .dot { background: var(--chip); color: var(--chip-ink); border-color: var(--chip); }
.step.now .dot { background: var(--brand); color: var(--on-dark); border-color: var(--brand); animation: pop .35s ease-out; }
.step.now b { color: var(--ink); }
.step-line { flex: 0 0 18px; height: 2px; background: var(--line); margin-top: 17px; }

.actions { display: flex; flex-direction: column; gap: 4px; margin: 14px 0; }
.picked-note {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; border-radius: 18px;
  background: var(--chip); color: var(--chip-ink); font-weight: 700; padding: 8px 14px; text-align: center;
}

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 14px; }
.info-grid div { display: flex; flex-direction: column; min-width: 0; }
.info-grid small { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.info-grid b { font-size: 16px; }

.items-view { padding: 4px 14px; }
.iv-row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1.5px solid var(--line); }
.iv-no {
  width: 26px; height: 26px; border-radius: 9px; background: var(--bg); display: grid; place-items: center;
  font-size: 13px; font-weight: 800; color: var(--ink-2); flex: none;
}
.iv-text { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; word-break: break-word; }
.iv-total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; font-weight: 700; }
.iv-total b { font-size: 22px; font-weight: 800; color: var(--brand); }

/* ---------- เมนูตั้งค่า ---------- */
.menu { padding: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 12px 10px; border-radius: 16px; color: var(--ink-2);
}
.menu-item:active { background: var(--bg); }
.menu-item:disabled { cursor: default; }
.menu-item:disabled .menu-text b { color: var(--ink-2); }
.menu-item + .menu-item { border-top: 1.5px solid var(--line); border-radius: 0 0 16px 16px; }
.menu-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--chip); color: var(--chip-ink); display: grid; place-items: center; flex: none; }
.menu-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; }
.menu-text b { color: var(--ink); font-size: 16px; }
.menu-text small { font-size: 13px; }
.foot-note { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; color: var(--ink-2); font-size: 13px; margin-top: 28px; }

/* ---------- หน้าต่างยืนยัน (พื้นหลังทึบ ไม่โปร่งแสง) ---------- */
.dlg-backdrop {
  position: fixed; inset: 0; z-index: 50; background: var(--chip);
  display: grid; place-items: center; padding: 24px; animation: fade .18s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dlg {
  width: 100%; max-width: 360px; background: var(--card); border-radius: 26px; padding: 24px 20px 18px; text-align: center;
  box-shadow: 0 5px 0 var(--lip); animation: pop .3s cubic-bezier(.2, 1.3, .4, 1);
}
.dlg-icon { width: 56px; height: 56px; border-radius: 18px; background: var(--chip); color: var(--chip-ink); display: inline-grid; place-items: center; }
.dlg-icon.danger { background: var(--bg); color: var(--red); }
.dlg-icon .ic { width: 28px; height: 28px; }
.dlg h2 { margin: 12px 0 6px; font-size: 20px; }
.dlg p { margin: 0 0 4px; color: var(--ink-2); font-size: 15px; }
.dlg p b { color: var(--ink); }
.dlg-actions { display: flex; gap: 10px; margin-top: 18px; }
.dlg-actions .btn { flex: 1; padding: 0 10px; }

/* ---------- ข้อความแจ้งสั้น ---------- */
.toast {
  position: fixed; left: 50%; top: max(14px, env(safe-area-inset-top)); z-index: 60; transform: translate(-50%, -20px);
  max-width: calc(100% - 48px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--on-dark);
  font-weight: 600; font-size: 15px; text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
