/* ============================================================
   CHILDCARE PRO — Glass Theme (โปร่งใสทันสมัย)
   มือถือ = แอปแท้: bottom tab bar กระจกฝ้า + พื้นหลังไล่สีพาสเทล
   เดสก์ท็อป = sidebar + การ์ดแก้ว
   ============================================================ */
:root {
  --teal: #57b3a6;
  --teal-dark: #2f7d72;
  --coral: #f2907d;
  --coral-dark: #d9725f;
  --sun: #f7c873;
  --lilac: #a3b1e9;
  --ink: #2f2d38;
  --muted: #837f8e;
  --line: rgba(255, 255, 255, .65);
  --ok: #3f9d6d;
  --warn: #d98f22;
  --danger: #d9534f;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(93, 76, 66, .10);
  --glass: rgba(255, 255, 255, .66);
  --glass-strong: rgba(255, 255, 255, .8);
  --glass-border: 1px solid rgba(255, 255, 255, .7);
  --blur: saturate(170%) blur(14px);
  --tabbar-h: 64px;
  --font: 'Sarabun', 'Noto Sans Thai', 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink);
  background: linear-gradient(165deg, #e3f4f0 0%, #fdeee4 42%, #e9edfb 78%, #fdeef0 100%) fixed;
  line-height: 1.55; min-height: 100vh;
}
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3 { line-height: 1.3; }
img { max-width: 100%; }

/* ---------- เดสก์ท็อป: sidebar ---------- */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 244px; flex-shrink: 0; margin: 12px 0 12px 12px; border-radius: 22px;
  background: var(--glass); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border); box-shadow: var(--shadow); padding: 16px 12px;
}
.sidebar .brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.sidebar .brand img { height: 46px; width: auto; object-fit: contain; }
.sidebar .brand b { font-size: 1.02rem; color: var(--teal-dark); }
.sidebar nav a {
  display: flex; gap: 10px; align-items: center; padding: 9px 12px; margin: 2px 0;
  border-radius: 12px; color: var(--ink); font-size: .95rem;
}
.sidebar nav a:hover { background: rgba(255, 255, 255, .8); box-shadow: var(--shadow); }
.sidebar nav a.active { background: linear-gradient(135deg, var(--teal), #7ccdc0); color: #fff; box-shadow: 0 6px 16px rgba(87, 179, 166, .35); }
.sidebar nav .group { font-size: .73rem; color: var(--muted); margin: 14px 8px 4px; letter-spacing: .06em; }
.main { flex: 1; min-width: 0; padding: 20px 24px 60px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin: 0; font-size: 1.45rem; }
.userbox { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .9rem; }

/* ---------- มือถือ: glass appbar + bottom tab bar ---------- */
.mobile-only { display: none !important; }
.appbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .6); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
}
.appbar img { height: 40px; width: auto; object-fit: contain; }
.appbar .ttl { flex: 1; min-width: 0; }
.appbar .ttl b { display: block; color: var(--teal-dark); font-size: 1rem; line-height: 1.2; letter-spacing: .01em; }
.appbar .ttl span { color: var(--muted); font-size: .76rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mobile-tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; justify-content: space-around; align-items: stretch;
  background: rgba(255, 255, 255, .62); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border); border-radius: 24px;
  padding: 7px 6px; box-shadow: 0 12px 32px rgba(93, 76, 66, .18);
}
.mobile-tabbar a, .mobile-tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 50px; border: 0; background: none; cursor: pointer; font-family: var(--font);
  color: var(--muted); font-size: .68rem; border-radius: 17px; padding: 4px 2px;
  transition: background .18s, color .18s, transform .12s;
}
.mobile-tabbar .ico { font-size: 1.38rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(93, 76, 66, .18)); }
.mobile-tabbar .active {
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--teal), #7ccdc0);
  box-shadow: 0 8px 20px rgba(87, 179, 166, .45);
}
.mobile-tabbar a:active { transform: scale(.94); }

/* เมนูเต็มจอ (☰) — แก้วนวล */
.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(253, 250, 245, .82); backdrop-filter: saturate(160%) blur(20px); -webkit-backdrop-filter: saturate(160%) blur(20px);
  display: none; flex-direction: column; overflow-y: auto;
  padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.mobile-menu.open { display: flex; }
.mobile-menu .mm-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.mobile-menu .mm-head img { height: 44px; width: auto; object-fit: contain; }
.mobile-menu .mm-head b { flex: 1; color: var(--teal-dark); font-size: 1.05rem; }
.mobile-menu .mm-close {
  border: 0; width: 42px; height: 42px; border-radius: 50%; font-size: 1.05rem; cursor: pointer;
  background: rgba(255, 255, 255, .75); box-shadow: var(--shadow); color: var(--ink);
}
.mobile-menu .group { color: var(--muted); font-size: .74rem; margin: 16px 6px 8px; letter-spacing: .05em; }
.mobile-menu a {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 4px 0;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: var(--glass-border); border-radius: 16px; color: var(--ink); font-size: .95rem; box-shadow: 0 4px 14px rgba(93, 76, 66, .07);
}
.mobile-menu a:active { background: rgba(87, 179, 166, .16); }
.mobile-menu a.active { background: linear-gradient(135deg, var(--teal), #7ccdc0); color: #fff; }

/* ---------- Parent / อสม. shell ---------- */
.mobi-shell { max-width: 640px; margin: 0 auto; padding-bottom: calc(var(--tabbar-h) + 34px); }
.mobi-head {
  display: flex; align-items: center; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: rgba(255, 255, 255, .6); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border-bottom: 1px solid rgba(255, 255, 255, .55);
  position: sticky; top: 0; z-index: 40;
}
.mobi-head img { height: 42px; width: auto; object-fit: contain; }
.mobi-head b { color: var(--teal-dark); }

.tabbar {
  position: fixed; left: 10px; right: 10px; bottom: calc(8px + env(safe-area-inset-bottom)); z-index: 50;
  display: flex; justify-content: space-around;
  background: rgba(255, 255, 255, .62); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur);
  border: var(--glass-border); border-radius: 24px;
  padding: 7px 6px; box-shadow: 0 12px 32px rgba(93, 76, 66, .18);
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; color: var(--muted); font-size: .68rem; border-radius: 17px; min-width: 52px; padding: 4px 4px;
  transition: background .18s, color .18s, transform .12s;
}
.tabbar a.active {
  color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--teal), #7ccdc0);
  box-shadow: 0 8px 20px rgba(87, 179, 166, .45);
}
.tabbar a:active { transform: scale(.94); }
.tabbar .ico { font-size: 1.38rem; line-height: 1; filter: drop-shadow(0 3px 6px rgba(93, 76, 66, .18)); }

/* ---------- Components (glass) ---------- */
.card {
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: var(--glass-border); border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card h2 { margin: 0 0 10px; font-size: 1.1rem; color: var(--teal-dark); }
.card h3 { font-size: 1rem; margin: 14px 0 6px; }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat {
  background: var(--glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: var(--glass-border); border-radius: var(--radius); padding: 14px 16px;
  box-shadow: var(--shadow); display: block; color: var(--ink);
}
.stat .num { font-size: 1.7rem; font-weight: 700; color: var(--teal-dark); }
.stat .lbl { color: var(--muted); font-size: .85rem; }
.stat.danger .num { color: var(--danger); }
.stat.warn .num { color: var(--warn); }

/* ตารางคงพื้นขาวเพื่อการอ่าน */
table.tbl { width: 100%; border-collapse: collapse; background: transparent; font-size: .92rem; }
.tbl th { background: rgba(248, 239, 231, .9); text-align: left; padding: 10px 12px; font-weight: 600; white-space: nowrap; }
.tbl td { padding: 9px 12px; border-top: 1px solid rgba(240, 228, 218, .8); vertical-align: top; }
.tbl tr:hover td { background: rgba(255, 253, 249, .8); }
.tbl-wrap {
  overflow-x: auto; border-radius: var(--radius); background: rgba(255, 255, 255, .88);
  border: var(--glass-border); box-shadow: var(--shadow);
}

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; white-space: nowrap; }
.b-ok { background: #e2f4e9; color: var(--ok); }
.b-warn { background: #fdf0d7; color: var(--warn); }
.b-danger { background: #fce4e2; color: var(--danger); }
.b-info { background: #e3f1f7; color: #2c7a9e; }
.b-muted { background: #f0edf3; color: var(--muted); }
.b-teal { background: #e0f2ef; color: var(--teal-dark); }
.b-lilac { background: #eceffb; color: #5c6bb0; }

.btn {
  display: inline-block; border: 0; cursor: pointer; font-family: var(--font); font-size: .93rem;
  padding: 10px 20px; border-radius: 999px; font-weight: 600; text-align: center; transition: .15s;
  background: linear-gradient(135deg, var(--teal), #6fc4b6); color: #fff;
  box-shadow: 0 8px 18px rgba(87, 179, 166, .35);
}
.btn:hover { box-shadow: 0 10px 22px rgba(87, 179, 166, .45); }
.btn.coral { background: linear-gradient(135deg, var(--coral), #f6a894); box-shadow: 0 8px 18px rgba(242, 144, 125, .35); }
.btn.ghost { background: rgba(255, 255, 255, .75); color: var(--teal-dark); border: 1.5px solid var(--teal); box-shadow: none; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn.ghost:hover { background: rgba(87, 179, 166, .12); }
.btn.sm { padding: 6px 14px; font-size: .82rem; }
.btn.danger { background: linear-gradient(135deg, var(--danger), #e4756f); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

form .field { margin-bottom: 14px; }
label { display: block; font-size: .88rem; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=number], input[type=date], input[type=time], input[type=email],
input[type=password], input[type=tel], select, textarea {
  width: 100%; padding: 10px 12px; min-height: 44px;
  border: 1.5px solid rgba(255, 255, 255, .8); border-radius: 12px;
  font-family: var(--font); font-size: .95rem; color: var(--ink);
  background: rgba(255, 255, 255, .78); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 3px rgba(93, 76, 66, .06);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); background: #fff; }
.hint { color: var(--muted); font-size: .8rem; }

.flash {
  padding: 12px 16px; border-radius: 14px; margin-bottom: 14px; font-size: .92rem;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .6);
}
.flash.ok { background: rgba(226, 244, 233, .82); color: #1d6641; }
.flash.err { background: rgba(252, 228, 226, .82); color: #8f231c; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0 0 0 24px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 3px; background: rgba(255, 255, 255, .9); border-radius: 3px; box-shadow: 0 0 0 1px rgba(93, 76, 66, .08); }
.timeline li { position: relative; padding: 0 0 18px 12px; }
.timeline li::before { content: ''; position: absolute; left: -24px; top: 6px; width: 13px; height: 13px; border-radius: 50%; background: var(--teal); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--teal), 0 3px 8px rgba(93, 76, 66, .2); }
.timeline li.overdue::before { background: var(--danger); box-shadow: 0 0 0 2px var(--danger), 0 3px 8px rgba(93, 76, 66, .2); }
.timeline li.completed::before { background: var(--ok); box-shadow: 0 0 0 2px var(--ok), 0 3px 8px rgba(93, 76, 66, .2); }
.timeline li.due::before { background: var(--sun); box-shadow: 0 0 0 2px var(--sun), 0 3px 8px rgba(93, 76, 66, .2); }
.timeline .tl-date { color: var(--muted); font-size: .82rem; }
.timeline .tl-title { font-weight: 600; }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal .dow { text-align: center; font-size: .78rem; color: var(--muted); padding: 4px 0; }
.cal .day { background: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .7); border-radius: 12px; min-height: 88px; padding: 6px; font-size: .8rem; }
.cal .day.today { border: 2px solid var(--teal); box-shadow: 0 4px 14px rgba(87, 179, 166, .3); }
.cal .day .d { font-weight: 700; color: var(--muted); }
.cal .ev { display: block; margin-top: 3px; padding: 2px 6px; border-radius: 7px; font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #444; }
.ev-due { background: #fdf0d7; } .ev-upcoming { background: #e0f2ef; } .ev-appt { background: #eceffb; } .ev-followup { background: #fde8ec; }

/* Progress pills */
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 3px 12px; border-radius: 999px; font-size: .8rem; border: 1.5px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .7); color: var(--muted); }
.pill.done { background: linear-gradient(135deg, var(--teal), #6fc4b6); border-color: transparent; color: #fff; }
.pill.next { background: #fdf0d7; border-color: var(--sun); color: #7a5b16; font-weight: 700; }

/* Hero */
.hero {
  border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, rgba(231, 245, 242, .9), rgba(253, 238, 230, .9));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: var(--glass-border); box-shadow: var(--shadow);
  padding: 18px; display: flex; gap: 16px; align-items: center;
}
.hero img { width: 96px; height: 96px; object-fit: contain; border-radius: 16px; filter: drop-shadow(0 8px 16px rgba(93, 76, 66, .2)); }

/* Auth */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #e3f4f0 0%, #fdeee6 45%, #e9edfb 100%); padding: 20px; }
.auth-card {
  background: rgba(255, 255, 255, .72); backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
  padding: 34px 30px; border-radius: 26px; border: var(--glass-border);
  box-shadow: 0 24px 60px rgba(93, 76, 66, .22); width: 100%; max-width: 400px;
}
.auth-card img.logo { height: 96px; width: auto; object-fit: contain; display: block; margin: 0 auto 8px; }
.auth-card h1 { text-align: center; color: var(--teal-dark); font-size: 1.3rem; margin: 4px 0 2px; }
.auth-card .sub { text-align: center; color: var(--muted); font-size: .88rem; margin-bottom: 18px; }

/* pager */
.pager { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-bottom: 12px; }
.filters .field { margin: 0; }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.empty .big { font-size: 2.2rem; }

/* ===== Searchable select (พิมพ์ค้นหาใน dropdown) ===== */
.ssearch { position: relative; }
.ssearch-input { width: 100%; padding-right: 30px !important; }
.ssearch::after {
  content: '▾'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); pointer-events: none; font-size: .8rem;
}
.ssearch-panel {
  position: absolute; z-index: 95; left: 0; right: 0; top: calc(100% + 3px);
  background: rgba(255, 255, 255, .98); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 12px;
  max-height: 260px; overflow-y: auto; box-shadow: 0 12px 30px rgba(93, 76, 66, .2); display: none;
}
.ssearch.open .ssearch-panel { display: block; }
.ssearch-item { padding: 9px 13px; cursor: pointer; font-size: .92rem; color: var(--ink); }
.ssearch-item:hover { background: rgba(87, 179, 166, .14); }
.ssearch-item.selected { background: linear-gradient(135deg, var(--teal), #6fc4b6); color: #fff; font-weight: 600; }
.ssearch-empty { padding: 10px 13px; color: var(--muted); font-size: .85rem; }

/* ===== Thai Date Picker (ปฏิทินไทย พ.ศ.) ===== */
.thdate { position: relative; z-index: 1; }
.thdate.open { z-index: 90; }
.thdate-input { width: 100%; padding-right: 32px !important; background: #fff; cursor: pointer; }
.thdate-panel {
  position: absolute; z-index: 96; left: 0; right: 0; top: calc(100% + 3px);
  background: rgba(255, 255, 255, .98); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, .8); border-radius: 14px;
  padding: 10px; box-shadow: 0 14px 34px rgba(93, 76, 66, .24); display: none;
}
.thdate.open .thdate-panel { display: block; }
.thdate-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; margin-bottom: 6px; }
.thdate-head b { color: var(--teal-dark); font-size: .92rem; flex: 1; text-align: center; }
.thdate-head button {
  border: 0; background: rgba(87, 179, 166, .12); color: var(--teal-dark); cursor: pointer;
  width: 30px; height: 30px; border-radius: 9px; font-size: .95rem; font-weight: 700;
}
.thdate-head button:hover { background: rgba(87, 179, 166, .3); }
.thdate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.thdate-dow { text-align: center; font-size: .72rem; color: var(--coral-dark); font-weight: 700; padding: 3px 0; }
.thdate-day {
  border: 0; background: none; cursor: pointer; font-family: var(--font); font-size: .85rem;
  padding: 7px 0; border-radius: 8px; color: var(--ink); text-align: center;
}
.thdate-day:hover { background: rgba(87, 179, 166, .2); }
.thdate-day.today { box-shadow: inset 0 0 0 1.5px var(--teal); font-weight: 700; }
.thdate-day.sel { background: linear-gradient(135deg, var(--teal), #6fc4b6); color: #fff; font-weight: 700; }
.thdate-foot { display: flex; justify-content: space-between; margin-top: 8px; gap: 6px; }
.thdate-foot button {
  flex: 1; border: 1.5px solid var(--teal); background: #fff; color: var(--teal-dark); cursor: pointer;
  font-family: var(--font); font-size: .82rem; padding: 6px 0; border-radius: 999px; font-weight: 600;
}
.thdate-foot button:hover { background: #edf7f5; }

/* ยกชั้นการ์ด/ฟอร์มที่เปิดปฏิทินหรือ dropdown ให้ลอยเหนือการ์ดถัดไป
   (การ์ดมี backdrop-filter สร้าง stacking context ของตัวเอง — z-index ภายในหนีไม่ออก
   จึงต้องยกชั้นที่ "ตัวการ์ด" เอง) */
.card:has(.thdate-panel), form:has(.thdate-panel), .filters:has(.thdate-panel),
.card:has(.ssearch-panel), form:has(.ssearch-panel), .filters:has(.ssearch-panel) {
    position: relative;
    z-index: 60;
}
.card:has(.thdate.open), form:has(.thdate.open), form:has(.ssearch.open) {
    z-index: 90;
}

/* ยกชั้น wrap ที่เปิดอยู่ภายในการ์ดเดียวกัน */
.thdate.open, .ssearch.open {
    position: relative;
    z-index: 90;
}
.field:has(.thdate.open), .field:has(.ssearch.open) { position: relative; z-index: 90; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
  .app-shell { flex-direction: column; display: block; }
  .main { padding: 12px 12px calc(var(--tabbar-h) + 40px); }
  .topbar h1 { font-size: 1.12rem; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cal .day { min-height: 54px; }
  .cal .ev { display: none; }
  .cal .day.has-ev::after { content: '•'; color: var(--coral); font-weight: 900; }
  .tbl th:nth-child(n+5), .tbl td:nth-child(n+5) { display: none; }
  .card { padding: 14px; }
  .btn { min-height: 46px; }
  .btn.sm { min-height: 38px; }
  input, select, textarea { font-size: 16px; }
  .hero img { width: 64px; height: 64px; }
  .hero { padding: 14px; }
}
@media (max-width: 420px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .mobile-tabbar a, .mobile-tabbar button { font-size: .64rem; }
  .tabbar a { font-size: .64rem; }
}
