:root {
  --bg: #eef6fd;
  --bg2: #e2effb;
  --card: #ffffff;
  --primary: #8ec5f0;
  --primary-2: #6fb1e8;
  --accent: #5ba8e6;
  --text: #25405a;
  --muted: #6b86a0;
  --line: #d5e8f8;
  --ok: #a8e0c5;
  --ok-text: #1d5b43;
  --warn: #ffd9a8;
  --warn-text: #7a4a07;
  --bad: #f7b7c0;
  --bad-text: #8a2336;
  --shadow: 0 2px 10px rgba(91, 168, 230, 0.14);
  --shadow-lg: 0 12px 40px rgba(37, 64, 90, 0.22);
  --r: 18px;
  --font: 'Noto Sans Lao', 'Phetsarath OT', 'Lao Sangam MN', 'Segoe UI', system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 16px; line-height: 1.45; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
input, textarea, select { -webkit-user-select: text; user-select: text; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 24px; } h2 { font-size: 19px; } h3 { font-size: 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.right { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.spacer { flex: 1; }
.hide { display: none !important; }

/* ===== layout ===== */
#app { display: flex; height: 100%; padding-top: env(safe-area-inset-top); }
#nav {
  width: 92px; flex: none; background: var(--card); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: stretch; padding: 12px 8px; gap: 6px;
  padding-left: calc(8px + env(safe-area-inset-left));
}
.brand { text-align: center; font-size: 30px; padding: 4px 0 10px; }
#nav a {
  display: flex; flex-direction: column; align-items: center; gap: 2px; text-decoration: none;
  color: var(--muted); padding: 10px 2px; border-radius: 16px; font-size: 12.5px; font-weight: 500;
  min-height: 62px; justify-content: center;
}
#nav a .ico { font-size: 24px; line-height: 1; }
#nav a.active { background: var(--primary); color: #14304c; font-weight: 700; }
#nav .nav-sp { flex: 1; }
#view { flex: 1; min-width: 0; height: 100%; overflow: hidden; display: flex; flex-direction: column; }
.page { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px 24px 40px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }

/* ===== controls ===== */
.btn {
  border: 0; border-radius: 14px; background: var(--bg2); color: var(--text);
  min-height: 46px; padding: 0 18px; font-weight: 600; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  transition: transform .06s, background .15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary { background: var(--primary); color: #14304c; }
.btn.primary:active { background: var(--primary-2); }
.btn.strong { background: var(--accent); color: #0e2a45; }
.btn.ok { background: var(--ok); color: var(--ok-text); }
.btn.danger { background: var(--bad); color: var(--bad-text); }
.btn.ghost { background: transparent; border: 1.5px solid var(--line); }
.btn.big { min-height: 58px; font-size: 18px; border-radius: 16px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13.5px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > label, .lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; border: 1.5px solid var(--line); border-radius: 12px;
  background: #fff; padding: 8px 12px; font-size: 16px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 168, 230, .2); }
textarea.input { min-height: 70px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line); background: #fff; border-radius: 999px; min-height: 40px; padding: 0 16px;
  font-weight: 500; font-size: 14.5px; display: inline-flex; align-items: center; gap: 6px;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #14304c; font-weight: 700; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--bg2); }
.badge.ok { background: var(--ok); color: var(--ok-text); }
.badge.warn { background: var(--warn); color: var(--warn-text); }
.badge.bad { background: var(--bad); color: var(--bad-text); }
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 18px; }
.card h2 { margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--bg2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; border-radius: 11px; min-height: 40px; padding: 0 16px; font-weight: 600; color: var(--muted); }
.seg button.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; }
.switch input { width: 22px; height: 22px; accent-color: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 36px 10px; }

table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== POS ===== */
.pos { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 390px; min-height: 0; }
.pos-menu { display: flex; flex-direction: column; min-height: 0; padding: 14px 16px 0 18px; }
.pos-top { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.pos-top .search { flex: 1; min-width: 160px; max-width: 280px; }
.cats { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; flex: 1; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats .chip { flex: none; min-height: 46px; font-size: 15.5px; }
.menu-grid {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 2px 24px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; align-content: start;
}
.mcard {
  position: relative; background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
  border: 0; padding: 0; text-align: left; display: flex; flex-direction: column; transition: transform .08s;
}
.mcard:active { transform: scale(0.97); }
.mcard .pic { aspect-ratio: 4 / 3; background: linear-gradient(135deg, #dcedfb, #c9e2f8); display: grid; place-items: center; font-size: 46px; overflow: hidden; }
.mcard .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mcard .info { padding: 10px 12px 12px; }
.mcard .nm { font-weight: 600; line-height: 1.3; min-height: 2.6em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard .pr { color: var(--accent); font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; filter: brightness(.78); }
.mcard.out .pic { filter: grayscale(.9) opacity(.55); }
.mcard .tag-out { position: absolute; left: 8px; top: 8px; }
.mcard .count { position: absolute; right: 8px; bottom: 56px; background: var(--accent); color: #0e2a45; font-weight: 700; min-width: 30px; height: 30px; border-radius: 15px; display: grid; place-items: center; padding: 0 8px; box-shadow: var(--shadow); }
.info-btn {
  position: absolute; right: 8px; top: 8px; width: 38px; height: 38px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .92); color: #b66a00; font-weight: 800; font-size: 20px; line-height: 1;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .18); display: grid; place-items: center; z-index: 2;
}
.info-btn::before { content: '!'; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--warn); border: 2px solid #e6a24a; font-size: 14px; color: #7a4a07; }
.info-btn:active { transform: scale(.9); }
.info-btn.inline { position: static; width: 34px; height: 34px; flex: none; background: transparent; box-shadow: none; }

.cart { background: var(--card); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; padding-right: env(safe-area-inset-right); }
.cart-head { padding: 14px 16px 10px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.shift-pill { margin: 10px 16px 0; padding: 8px 12px; border-radius: 12px; font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.shift-pill.open { background: var(--ok); color: var(--ok-text); }
.shift-pill.closed { background: var(--warn); color: var(--warn-text); }
.shift-pill .btn { margin-left: auto; min-height: 30px; padding: 0 10px; font-size: 13px; background: rgba(255, 255, 255, .7); }
.cart-lines { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 12px; }
.cline { display: grid; grid-template-columns: 1fr auto; gap: 4px 8px; padding: 10px 4px; border-bottom: 1px dashed var(--line); align-items: center; }
.cline .t { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.cline .p { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--bg2); font-size: 22px; font-weight: 700; line-height: 1; }
.stepper button:active { background: var(--primary); }
.stepper .q { min-width: 32px; text-align: center; font-weight: 700; font-size: 17px; }
.cart-foot { border-top: 1px solid var(--line); padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; background: #fbfdff; }
.sumrow { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.sumrow.total { font-size: 26px; font-weight: 800; }
.sumrow.total span:last-child { color: #1d6fb8; }
.cart-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }

/* ===== modal ===== */
.overlay { position: fixed; inset: 0; background: rgba(37, 64, 90, .42); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 24px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .18s; }
.modal.wide { width: min(820px, 100%); }
.modal.xl { width: min(980px, 100%); }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px 8px; }
.modal-head h2 { flex: 1; }
.x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg2); font-size: 20px; line-height: 1; }
.modal-body { padding: 8px 20px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; flex: 1; }
.modal-foot { padding: 12px 20px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid var(--line); }
.modal-foot .btn { flex: 0 1 auto; }

.pay-total { text-align: center; padding: 6px 0 12px; }
.pay-total .v { font-size: 40px; font-weight: 800; color: #1d6fb8; font-variant-numeric: tabular-nums; }
.pay-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.pay-tabs button { border: 2px solid var(--line); background: #fff; border-radius: 18px; min-height: 72px; font-size: 18px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pay-tabs button .e { font-size: 26px; }
.pay-tabs button.active { border-color: var(--accent); background: #eaf4fd; }
.cash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.recv { background: var(--bg); border-radius: 16px; padding: 12px 16px; text-align: right; }
.recv .v { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; min-height: 46px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.keypad button { min-height: 58px; border-radius: 14px; border: 0; background: var(--bg2); font-size: 22px; font-weight: 700; }
.keypad button:active { background: var(--primary); }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.change-box { margin-top: 10px; padding: 12px 16px; border-radius: 16px; background: var(--ok); color: var(--ok-text); display: flex; justify-content: space-between; font-size: 20px; font-weight: 800; }
.change-box.short { background: var(--warn); color: var(--warn-text); }
.qr-wrap { text-align: center; }
.qr-wrap img { width: min(340px, 70vw); height: auto; border-radius: 16px; border: 6px solid #fff; box-shadow: var(--shadow); background: #fff; image-rendering: pixelated; }

/* ===== drawer success ===== */
.done { text-align: center; padding: 8px 0; }
.done .check { width: 74px; height: 74px; border-radius: 50%; background: var(--ok); color: var(--ok-text); font-size: 42px; display: grid; place-items: center; margin: 0 auto 8px; }
.done .chg { font-size: 44px; font-weight: 800; color: #1d6fb8; font-variant-numeric: tabular-nums; }
.drawer-scene { width: 260px; height: 140px; margin: 14px auto 6px; position: relative; }
.drawer-scene .till { position: absolute; left: 0; right: 0; top: 0; height: 66px; background: linear-gradient(#9fcdf3, #7fb9ea); border-radius: 16px 16px 6px 6px; box-shadow: var(--shadow); display: grid; place-items: center; font-size: 28px; }
.drawer-scene .tray { position: absolute; left: 14px; right: 14px; top: 52px; height: 52px; background: #fff; border: 3px solid #7fb9ea; border-radius: 6px 6px 14px 14px; transform: translateY(0); display: flex; gap: 6px; padding: 8px 10px; overflow: hidden; z-index: 0; }
.drawer-scene .till { z-index: 2; }
.drawer-scene .tray i { flex: 1; border-radius: 4px; background: #cfeadb; border: 1.5px solid #8fcdb0; }
.drawer-scene .tray i:nth-child(2) { background: #cfe0f4; border-color: #8fb4de; }
.drawer-scene .tray i:nth-child(3) { background: #f6e3c4; border-color: #e0bd84; }
.drawer-scene.pop .tray { animation: tray .55s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes tray { from { transform: translateY(-34px); } to { transform: translateY(26px); } }
.drawer-scene.pop .till { animation: shake .35s; }
@keyframes shake { 30% { transform: translateY(2px); } 60% { transform: translateY(-1px); } }

/* ===== recipe popup ===== */
.recipe-head { display: flex; gap: 16px; align-items: center; }
.recipe-head .pic { width: 120px; height: 120px; border-radius: 18px; background: linear-gradient(135deg, #dcedfb, #c9e2f8); display: grid; place-items: center; font-size: 52px; overflow: hidden; flex: none; }
.recipe-head .pic img { width: 100%; height: 100%; object-fit: cover; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 10px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; font-size: 17px; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #14304c; font-weight: 800; display: grid; place-items: center; }
.ing-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 16px; }
.ing-list div { background: var(--bg); border-radius: 12px; padding: 8px 12px; display: flex; justify-content: space-between; gap: 8px; }

/* ===== forms in pages ===== */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.mrow { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; border: 0; text-align: left; padding: 0; display: flex; flex-direction: column; }
.mrow .pic { aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dcedfb, #c9e2f8); display: grid; place-items: center; font-size: 40px; overflow: hidden; }
.mrow .pic img { width: 100%; height: 100%; object-fit: cover; }
.mrow .b { padding: 10px 14px 14px; }
.mrow.off { opacity: .55; }
.photo-box { display: flex; gap: 14px; align-items: center; }
.photo-box .pic { width: 110px; height: 110px; border-radius: 16px; background: var(--bg2); display: grid; place-items: center; font-size: 40px; overflow: hidden; flex: none; }
.photo-box .pic img { width: 100%; height: 100%; object-fit: cover; }
.rec-row { display: grid; grid-template-columns: 1fr 120px 56px 44px; gap: 8px; align-items: center; margin-bottom: 8px; }
.step-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.step-row .n { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); display: grid; place-items: center; font-weight: 800; margin-top: 6px; }
.step-row .ctl { display: flex; flex-direction: column; gap: 4px; }
.step-row .ctl button { width: 36px; height: 24px; border: 0; background: var(--bg2); border-radius: 8px; line-height: 1; }
.costbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.costbar .badge { font-size: 14px; padding: 4px 12px; }

.ing-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 14px 16px; margin-bottom: 10px; }
.ing-card .top { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.ing-card .q { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.batches { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.batch { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 12px; background: var(--bg); font-size: 14px; flex-wrap: wrap; }
.batch.expired { background: #fde6ea; }
.batch.soon { background: #fff1de; }
.alert { padding: 12px 16px; border-radius: 14px; display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; font-weight: 500; }
.alert.bad { background: #fde6ea; color: var(--bad-text); }
.alert.warn { background: #fff1de; color: var(--warn-text); }

/* ===== dashboard ===== */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 14px 16px; border-top: 5px solid var(--primary); }
.kpi .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .v { font-size: 25px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.profit { border-top-color: var(--ok); }
.kpi.loss { border-top-color: var(--bad); }
.kpi.profit .v { color: #1d6e4d; }
.kpi.loss .v { color: #b02a42; }
.dash-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 16px; }
.pnl td { padding: 9px 4px; }
.pnl tr.sub td { font-weight: 700; border-top: 1.5px solid var(--line); }
.pnl tr.net td { font-weight: 800; font-size: 19px; border-top: 2px solid var(--primary); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 80px; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.hbar .tr { height: 14px; background: var(--bg2); border-radius: 7px; overflow: hidden; }
.hbar .tr i { display: block; height: 100%; background: var(--accent); border-radius: 7px; }
svg text { font-family: var(--font); }

/* ===== misc ===== */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #25405a; color: #fff; padding: 12px 22px; border-radius: 14px; box-shadow: var(--shadow-lg); z-index: 100; font-weight: 500; max-width: 90vw; animation: pop .18s; }
.toast.bad { background: #b02a42; }
.toast.ok { background: #2f8a65; }
.pinpad { max-width: 300px; margin: 0 auto; }
.pindots { display: flex; justify-content: center; gap: 12px; margin: 10px 0 16px; min-height: 22px; }
.pindots i { width: 18px; height: 18px; border-radius: 50%; background: var(--line); }
.pindots i.on { background: var(--accent); }
.danger-zone { border: 1.5px dashed var(--bad); border-radius: 16px; padding: 14px 16px; }
.pre { white-space: pre-wrap; word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; background: var(--bg); padding: 8px 10px; border-radius: 10px; }

/* ===== receipt (print) ===== */
#receipt { display: none; }
@media print {
  body > #app, .overlay, .toast { display: none !important; }
  #receipt { display: block !important; position: static; width: 72mm; margin: 0; color: #000; font-size: 12px; font-family: var(--font); }
  #receipt .c { text-align: center; }
  #receipt .line { display: flex; justify-content: space-between; gap: 6px; }
  #receipt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
  @page { size: 80mm auto; margin: 4mm; }
}

/* ===== iPad portrait / narrow ===== */
@media (max-width: 960px) {
  #nav { width: 76px; }
  .pos { grid-template-columns: minmax(0, 1fr) 340px; }
  .dash-grid { grid-template-columns: 1fr; }
  .cash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  #app { flex-direction: column-reverse; }
  #nav { width: auto; flex-direction: row; border-right: 0; border-top: 1px solid var(--line); padding: 4px 6px calc(4px + env(safe-area-inset-bottom)); overflow-x: auto; }
  #nav a { flex: 1; min-height: 54px; }
  .brand, #nav .nav-sp { display: none; }
  .pos { grid-template-columns: 1fr; grid-template-rows: 1fr 46vh; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
}
