:root{
  --cream:#F6F1E9; --cream2:#EFE6D8; --red:#7E2B25; --red2:#9A3B33;
  --ink:#2C2320; --mute:#8A7B72; --line:#E4D9CB; --green:#06C755;
  --card:#FFFFFF; --ok:#2E7D4F; --warn:#B4761B;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:"Noto Sans Thai","Sarabun",-apple-system,"Helvetica Neue",Arial,sans-serif;
  background:#2a2320; color:var(--ink); display:flex; justify-content:center;
  min-height:100vh;
}
.phone{
  width:100%; max-width:430px; background:var(--cream); min-height:100vh;
  display:flex; flex-direction:column; position:relative; box-shadow:0 0 40px rgba(0,0,0,.5);
}
.topbar{
  background:var(--red); color:#fff; padding:14px 16px 12px; position:sticky; top:0; z-index:20;
  border-bottom-left-radius:18px; border-bottom-right-radius:18px;
}
.topbar h1{margin:0; font-size:17px; font-weight:700; letter-spacing:.2px}
.topbar .sub{font-size:11px; opacity:.75; margin-top:2px}
.topbar .me{position:absolute; right:14px; top:14px; font-size:11px; background:rgba(255,255,255,.16);
  padding:5px 9px; border-radius:20px; cursor:pointer}
.body{padding:14px 14px 96px; flex:1}
.card{background:var(--card); border-radius:16px; padding:14px; margin-bottom:12px;
  box-shadow:0 1px 3px rgba(70,50,40,.07)}
.card h3{margin:0 0 10px; font-size:14px}
.label{font-size:12px; color:var(--mute); margin:0 0 6px}
.row{display:flex; gap:8px; align-items:center}
.row.wrap{flex-wrap:wrap}
.seg{display:flex; background:var(--cream2); border-radius:12px; padding:3px; margin-bottom:12px}
.seg button{flex:1; border:0; background:transparent; padding:9px 0; font-size:13px; font-weight:600;
  color:var(--mute); border-radius:9px; font-family:inherit; cursor:pointer}
.seg button.on{background:var(--red); color:#fff}
.chips{display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; -webkit-overflow-scrolling:touch}
.chip{border:1px solid var(--line); background:#fff; color:var(--ink); border-radius:20px;
  padding:7px 13px; font-size:12px; white-space:nowrap; font-family:inherit; cursor:pointer}
.chip.on{background:var(--red); border-color:var(--red); color:#fff; font-weight:600}
.round{border:1.5px solid var(--line); border-radius:14px; padding:12px; margin-top:8px; cursor:pointer;
  display:flex; justify-content:space-between; align-items:center; background:#fff}
.round.on{border-color:var(--red); background:#FDF6F1; box-shadow:0 0 0 3px rgba(126,43,37,.08)}
.round .t{font-size:15px; font-weight:700}
.round .c{font-size:11px; color:var(--mute); margin-top:2px}
.round .left{font-size:11px; color:var(--warn); font-weight:600}
.round.full{opacity:.5; pointer-events:none}
select,input,textarea{width:100%; font-family:inherit; font-size:13px; padding:11px 12px; border-radius:11px;
  border:1px solid var(--line); background:#fff; color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:none; border-color:var(--red2)}
.dots{display:flex; gap:7px; flex-wrap:wrap}
.dot{border:1px solid var(--line); background:#fff; border-radius:10px; padding:8px 0; min-width:52px;
  text-align:center; font-size:12.5px; font-family:inherit; cursor:pointer}
.dot.on{background:var(--red); color:#fff; border-color:var(--red); font-weight:700}
.item{display:flex; gap:11px; align-items:center; padding:10px 0; border-bottom:1px solid #F3EDE5}
.item:last-child{border-bottom:0}
.thumb{width:52px; height:52px; border-radius:13px; flex:0 0 52px; display:flex; align-items:center;
  justify-content:center; font-size:24px; background:linear-gradient(150deg,#F2E3D5,#E7CDB8)}
.item .n{font-size:13.5px; font-weight:600; line-height:1.3}
.item .p{font-size:13px; color:var(--red); font-weight:700; margin-top:3px}
.add{margin-left:auto; border:0; background:var(--red); color:#fff; width:32px; height:32px; border-radius:50%;
  font-size:19px; line-height:1; cursor:pointer; flex:0 0 32px}
.qty{display:flex; align-items:center; gap:10px; margin-left:auto}
.qty button{width:28px; height:28px; border-radius:50%; border:1px solid var(--line); background:#fff;
  font-size:16px; cursor:pointer; line-height:1; font-family:inherit}
.price{font-size:19px; font-weight:800; color:var(--red)}
.total{display:flex; justify-content:space-between; font-size:13px; padding:5px 0; color:#5A4A43}
.total.big{border-top:1px dashed var(--line); margin-top:8px; padding-top:10px; font-size:15px;
  font-weight:800; color:var(--ink)}
.btn{display:block; width:100%; border:0; border-radius:13px; padding:15px; font-size:14.5px; font-weight:700;
  font-family:inherit; cursor:pointer}
.btn.primary{background:var(--red); color:#fff}
.btn.green{background:var(--green); color:#fff}
.btn.ghost{background:#fff; color:var(--red); border:1.5px solid var(--red)}
.btn:disabled{opacity:.45}
.cartbar{position:fixed; bottom:0; width:100%; max-width:430px; padding:12px 14px calc(12px + env(safe-area-inset-bottom));
  background:#fff; border-top:1px solid var(--line); display:none; gap:12px; align-items:center; z-index:30}
.cartbar.show{display:flex}
.placelist{display:none; position:absolute; left:0; right:0; top:calc(100% + 4px); background:#fff;
  border:1px solid #EADFD2; border-radius:12px; box-shadow:0 10px 24px rgba(60,40,30,.16); z-index:30;
  max-height:196px; overflow:auto}
.placelist div{padding:12px 14px; font-size:14px; color:var(--ink); border-bottom:1px solid #F6F0E7; cursor:pointer}
.placelist div:last-child{border-bottom:0}
.placelist div:active{background:#FBF6EF}
.sheet{position:fixed; inset:0; background:rgba(35,25,20,.45); display:none; z-index:40; align-items:flex-end;
  justify-content:center}
.sheet.show{display:flex}
.sheet .panel{background:var(--cream); width:100%; max-width:430px; border-radius:20px 20px 0 0; padding:16px;
  max-height:88vh; overflow-y:auto}
.sheet .panel .btn.primary{position:sticky; bottom:0; box-shadow:0 -8px 16px rgba(60,40,30,.08)}
.pill{display:inline-block; font-size:11px; padding:3px 9px; border-radius:20px; background:var(--cream2);
  color:#6B5A52; font-weight:600}
.pill.ok{background:#E4F4E9; color:var(--ok)}
.pill.warn{background:#FBF0DA; color:var(--warn)}
.small{font-size:11.5px; color:var(--mute); line-height:1.6}
.hr{height:1px; background:var(--line); margin:12px 0}
.toast{position:fixed; bottom:88px; left:50%; transform:translateX(-50%); background:#2C2320; color:#fff;
  padding:10px 16px; border-radius:22px; font-size:12.5px; z-index:60; opacity:0; transition:.25s; pointer-events:none}
.toast.show{opacity:1}
.sheet.show ~ .toast{bottom:auto; top:72px}
.emoji-hd{font-size:30px}
a{color:var(--red2)}
/* LINE chat mock */
.chat{background:#8CABD8; min-height:100vh; width:100%; max-width:430px; display:flex; flex-direction:column}
.chat .hd{position:sticky; top:0; background:#fff; padding:12px 14px; display:flex; align-items:center; gap:9px; z-index:5;
  box-shadow:0 1px 2px rgba(0,0,0,.08)}
.chat .hd .av{width:30px; height:30px; border-radius:50%; background:linear-gradient(140deg,#7E2B25,#B4593F);
  display:flex; align-items:center; justify-content:center; color:#fff; font-size:15px}
.chat .hd .nm{font-size:13.5px; font-weight:700}
.chat .hd .sb{font-size:10.5px; color:var(--mute)}
.msgs{padding:14px; display:flex; flex-direction:column; gap:10px; flex:1}
.bub{background:#fff; border-radius:16px; padding:12px 13px; max-width:96%; font-size:13px; line-height:1.6;
  box-shadow:0 1px 2px rgba(0,0,0,.1); align-self:flex-start; white-space:pre-line}
.bub.me{background:#C8F5C4; align-self:flex-end}
.bub .who{font-size:10.5px; color:var(--mute); margin-bottom:5px}
.ordercard{background:#fff; border-radius:16px; padding:16px; align-self:flex-start; max-width:96%;
  box-shadow:0 1px 3px rgba(0,0,0,.12); font-size:12.5px; line-height:1.7; width:96%}
.ordercard .ttl{text-align:center; font-size:14.5px; font-weight:800; color:var(--red)}
.ordercard .st{text-align:center; font-size:11.5px; color:var(--mute); margin-bottom:10px}
.ordercard .sec{font-weight:700; font-size:12px; margin:12px 0 4px; color:var(--red)}
.ordercard .kv{display:flex; justify-content:space-between; gap:10px}
.ordercard .kv .k{color:var(--mute)}
.ordercard .it{display:flex; justify-content:space-between; gap:10px; align-items:baseline}
.ordercard .it .opt{font-size:11px; color:var(--mute); font-style:italic; padding-left:16px}
.ordercard .notice{font-size:11px; color:#8A5A4A; background:#FBF3EC; border-radius:10px; padding:9px 10px; margin-top:10px}
.ordercard .tot{display:flex; justify-content:space-between; font-weight:800; font-size:14px; color:var(--red);
  border-top:1px solid var(--line); margin-top:9px; padding-top:9px}
.quick{display:flex; gap:8px; padding:0 14px 12px; flex-wrap:wrap}
.quick button{border:0; background:#fff; border-radius:12px; padding:9px 13px; font-size:11.5px; font-weight:700;
  color:var(--red); font-family:inherit; cursor:pointer; box-shadow:0 1px 2px rgba(0,0,0,.1)}
.shopbar{background:#7E2B25; color:#fff; text-align:center; font-size:11.5px; padding:9px; letter-spacing:.3px}
/* admin */
.admin{width:100%; max-width:940px; background:var(--cream); min-height:100vh; padding:18px}
.kpis{display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:12px; margin-bottom:18px}
.kpi{background:#fff; border-radius:14px; padding:14px}
.kpi .k{font-size:11.5px; color:var(--mute)}
.kpi .v{font-size:23px; font-weight:800; color:var(--red); margin-top:5px}
table{width:100%; border-collapse:collapse; background:#fff; border-radius:14px; overflow:hidden; font-size:12.5px}
th,td{padding:10px 12px; text-align:left; border-bottom:1px solid #F3EDE5}
th{background:#F1E8DD; font-size:11.5px; color:#6B5A52}
tr:last-child td{border-bottom:0}

/* ---------------- ไทม์ไลน์ติดตามพัสดุ (หน้า LIFF) ---------------- */
.tl-step{display:flex; gap:10px; align-items:flex-start; opacity:.45}
.tl-step.done{opacity:1}
.tl-dot{width:26px; height:26px; border-radius:50%; background:#F1EAE5; display:flex;
        align-items:center; justify-content:center; font-size:14px; flex:0 0 26px}
.tl-step.done .tl-dot{background:#E6F4EC}
.tl-title{font-weight:600; font-size:14px}
.tl-line{width:2px; height:14px; background:#E6DDD6; margin:2px 0 2px 12px}
.tl-line.done{background:#B7E0C8}
