/* Mobile reading rhythm and action groups; desktop and bottom navigation unchanged. */
@media (max-width: 760px) {
  .workspace .team-design-page { font-size:16px; line-height:1.65; gap:16px; padding:20px 16px 96px; }
  .workspace .team-design-page .pagehead { margin-bottom:4px; gap:12px; }
  .workspace .team-design-page .pagehead h1 { font-size:26px; line-height:1.35; }
  .workspace .team-design-page :is(p,label,.field,.notice) { font-size:15px; line-height:1.65; }
  .workspace .team-design-page :is(small,.muted,.pagehead p,.page-description,.team-page-description) { font-size:14px; line-height:1.65; }
  .workspace .team-design-page :is(h2,.cardhead h3) { font-size:19px; line-height:1.45; }
  .workspace .team-design-page h3 { font-size:18px; line-height:1.45; }
  .workspace .team-design-page :is(input,select,textarea) { font-size:16px; }
  .workspace .team-design-page :is(.btn,.segments button,[role="tablist"] button) {
    min-height:48px; font-size:15px; line-height:1.45; padding:10px 12px;
    white-space:normal; overflow-wrap:break-word; min-width:0; border-radius:10px;
  }
  .workspace .team-design-page .btn svg { flex-shrink:0; }
  .workspace .team-design-page :is(.toolbar,.formactions) { gap:10px; }
  .workspace .page-pos .pos-top-controls { margin:0; gap:12px; }
  .workspace .page-pos .pos-mode-tabs { margin:0; padding:4px; }
  .workspace .page-pos .booking-flow-bar { margin:0 0 16px; gap:14px; }
  .workspace .page-pos .booking-flow-bar strong { font-size:16px; }
  .workspace .page-pos .booking-flow-bar small { font-size:14px; }
  .workspace .team-design-page :is(.pos-mode-tabs,.pos-delivery-toggle,.booking-flow-bar .toolbar,.scaninput .formactions),
  .workspace .page-pos .toolbar[role="tablist"],
  .workspace .page-dash .pagehead > .toolbar {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:stretch; width:100%;
  }
  .workspace .team-design-page :is(.pos-mode-tabs,.pos-delivery-toggle,.booking-flow-bar .toolbar,.scaninput .formactions) > .btn,
  .workspace .page-pos .toolbar[role="tablist"] > .btn,
  .workspace .page-dash .pagehead > .toolbar > .btn { width:100%; height:100%; margin:0; align-self:stretch; }
  .workspace .page-pos .pos-mode-tabs > .btn { min-height:64px; }
  .workspace .page-pos .booking-flow-bar .toolbar > .btn { min-height:64px; }
  .workspace .page-pos .booking-flow-bar .toolbar > .btn:not(.primary) {
    border-color:#8ca999; background:var(--sf2); color:var(--tx);
  }
  .workspace .page-dash .pagehead > .toolbar > .btn:not(.primary) { border-color:#8ca999; }
  .workspace .page-scan .scaninput .segments { display:flex; flex-wrap:wrap; gap:4px; padding:4px; }
  .workspace .page-scan .scaninput .segments > button { flex:1 1 110px; }
  .workspace .page-scan .scansymbol { margin-top:20px; margin-bottom:20px; }
  .workspace .page-scan .scaninput > h2 { font-size:22px; }
  .workspace .team-design-page .pos-section-title h3 { font-size:18px; }
  .workspace .team-design-page .pos-section-title p { font-size:14px; }
  .workspace .team-design-page :is(.btn,[role="tab"]):focus-visible { outline:3px solid #b18f46; outline-offset:3px; }

  /* A broad, contained menu sheet replaces the narrow desktop-style rail. */
  .workspace > aside, .workspace.nav-collapsed > aside {
    inset:auto auto calc(80px + env(safe-area-inset-bottom,0px)) 50%;
    width:calc(100% - 24px); max-width:520px; height:76dvh;
    max-height:calc(100dvh - 160px - env(safe-area-inset-top,0px) - env(safe-area-inset-bottom,0px));
    background:var(--sf); color:var(--tx); border:1px solid var(--ln);
    border-radius:20px; box-shadow:0 16px 48px #031e2540; overflow:hidden;
    transform:translate(-50%,calc(100% + 120px)); visibility:hidden;
    transition:transform .2s ease,visibility .2s;
  }
  .workspace > aside.open { transform:translate(-50%,0); visibility:visible; }
  .workspace > aside .brand { color:var(--tx); font-size:20px; padding:18px 18px 14px; flex-shrink:0; }
  .workspace > aside .workspace-brand-label { display:inline; }
  .workspace > aside .sidecaption, .workspace > aside .workspace-collapse { display:none; }
  .workspace > aside .workspace-menu-search { margin:0 14px 12px; background:var(--sf2); border:1px solid #8ca999; height:48px; flex-shrink:0; color:var(--green); }
  .workspace > aside .workspace-menu-search input { font-size:16px; min-width:0; width:100%; color:var(--tx); }
  .workspace > aside .workspace-menu-search input::placeholder { color:var(--mu); }
  .workspace > aside nav { padding:0 12px 12px; overscroll-behavior:contain; scrollbar-width:none; }
  .workspace > aside nav::-webkit-scrollbar { display:none; }
  .workspace > aside .workspace-nav-section { margin-top:4px; }
  .workspace > aside .workspace-nav-heading { color:var(--mu); font-size:14px; letter-spacing:0; padding:12px 10px 6px; min-height:40px; }
  .workspace > aside nav button:not(.workspace-nav-heading) { min-height:48px; padding:11px 12px; font-size:16px; color:var(--tx); gap:12px; margin:2px 0; }
  .workspace > aside nav button .workspace-nav-label { display:block; white-space:normal; text-align:left; }
  .workspace > aside nav button svg { flex-shrink:0; width:20px; height:20px; color:var(--green); }
  .workspace > aside nav button.active { background:var(--sf2); color:var(--tx); box-shadow:inset 3px 0 #b18f46; font-weight:600; }
  .workspace > aside nav button:hover { background:var(--sf2); color:var(--tx); }
  .workspace > aside .mobile-menu-settings { padding:10px 14px; border-top:1px solid var(--ln); margin:0; }
  .workspace > aside .mobile-menu-settings .btn { min-height:44px; font-size:15px; border-color:#8ca999; background:var(--sf2); color:var(--tx); }
  .workspace > aside .sidebottom { padding:10px 14px; border-color:var(--ln); }
  .workspace > aside .workspace-side-account { color:var(--tx); min-height:44px; }
  .workspace > aside .workspace-side-account small { color:var(--mu); font-size:13px; }
  .workspace > .scrim { background:#05271766; backdrop-filter:blur(2px); }
  .workspace > .scrim::after {
    content:"ปิดเมนู ×"; position:absolute; top:12px; right:16px;
    padding:8px 14px; border:1px solid var(--ln); border-radius:20px;
    background:var(--sf); color:var(--tx); font-size:15px; line-height:1.5;
  }
  @media (prefers-reduced-motion: reduce) { .workspace > aside { transition:none; } }
}
