/* ANXIN tablet kiosk viewport adjustments. Visual only; no order/payment logic. */
@media (min-width: 700px) and (max-width: 1599px) and (pointer: coarse) {
  .page {
    max-width: 1100px;
    padding: 16px 20px calc(122px + env(safe-area-inset-bottom,0px));
  }
  #menu.grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
  }
  #menu .dish {
    min-width: 0;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
  }
  #menu .pic {
    height: auto;
    aspect-ratio: 4 / 3;
    width: 100%;
    overflow: hidden;
    background: #eef2f5;
  }
  #menu .pic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: none;
  }
  #menu .body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 14px;
  }
  #menu .name {
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    line-height: 1.35;
    overflow-wrap: anywhere;
  }
  #menu .bottom { margin-top: auto; padding-top: 10px; }
  #menu .dish .add { min-width: 48px; min-height: 48px; }
  .cats button, .langs button, .modeBtn { min-height: 44px; }
  .footer { padding: 10px 20px calc(10px + env(safe-area-inset-bottom,0px)); }
  .cartBtn { min-height: 58px; }
  #cartOverlay .sheet {
    width: min(850px, calc(100% - 40px));
    max-height: min(88dvh, 880px);
    border-radius: 24px 24px 0 0;
    padding: 22px;
  }
  #cartOverlay .cart-close-x { min-width: 48px; min-height: 48px; }
  #cartOverlay .cart-line-photo {
    width: 88px;
    height: 88px;
    flex: 0 0 88px;
    object-fit: cover;
    border-radius: 14px;
  }
  #cartOverlay .cart-line-detail { min-width: 0; font-size: 1.1rem; line-height: 1.4; }
  #cartOverlay .cart-line-detail b { font-size: 1.18rem; }
  #cartOverlay .qty button { min-width: 48px; min-height: 48px; }
  #cartOverlay .actions .btn { min-height: 54px; font-size: 1.12rem; }
  #cartOverlay .cart-rec-img { width: 72px; height: 66px; }
  #cartOverlay .cart-recs-title { font-size: 1.12rem; }
  #cartOverlay .sheet h2 { font-size: 1.65rem; }
  #cartOverlay textarea { font-size: 1.1rem; }
}
@media (min-width: 700px) and (max-width: 900px) and (orientation: portrait) and (pointer: coarse) {
  #menu.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #menu .pic { aspect-ratio: 5 / 4; }
}
@media (prefers-reduced-motion: reduce) {
  #menu .dish, #menu .pic img { animation: none !important; transition: none !important; }
}

/* Yoshi modern-glass large basket: scoped to the real /customer-kiosk and
   /store-kiosk page. The QR table ordering page is intentionally unchanged.
   iPad 12.9/13-inch landscape widths are included above. */
@media (min-width:700px) and (pointer:coarse) {
  #cartOverlay {
    background:rgba(17,30,49,.52);
    -webkit-backdrop-filter:blur(8px);
    backdrop-filter:blur(8px);
  }
  #cartOverlay .sheet {
    width:min(1020px,calc(100% - 36px));
    max-height:min(94dvh,960px);
    padding:clamp(22px,3vw,38px);
    border:1px solid rgba(255,255,255,.75);
    border-radius:26px 26px 0 0;
    background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(237,246,255,.91));
    -webkit-backdrop-filter:blur(25px) saturate(145%);
    backdrop-filter:blur(25px) saturate(145%);
    box-shadow:0 24px 70px rgba(13,39,62,.22);
  }
  #cartOverlay .cart-line-main {min-width:0;display:flex;gap:18px;align-items:center}
  #cartOverlay .cart-line-photo,
  #cartOverlay .cart-line-placeholder {
    width:112px;height:112px;min-width:112px;flex:0 0 112px;
    border-radius:18px;object-fit:cover;
  }
  #cartOverlay .cart-line-detail {font-size:1.23rem;line-height:1.48;min-width:0}
  #cartOverlay .cart-line-detail b {font-size:1.3rem}
  #cartOverlay .cartRow {padding:18px 0;gap:18px;align-items:center}
  #cartOverlay .qty {gap:12px}
  #cartOverlay .qty button {min-width:56px;min-height:56px;font-size:1.6rem}
  #cartOverlay .qty b {font-size:1.23rem;min-width:25px;text-align:center}
  #cartOverlay .cart-close-x {width:60px;height:60px;font-size:35px}
  #cartOverlay .cart-dialog-head h2 {font-size:clamp(1.7rem,2.4vw,2.2rem)}
  #cartOverlay .actions .btn {min-height:66px;font-size:1.23rem}
  #cartOverlay .cart-rec-img {width:92px;height:84px}
  #cartOverlay .cart-rec {grid-template-columns:92px minmax(0,1fr) auto}
  #cartOverlay .cart-note-field textarea {font-size:1.18rem}
}
@media (min-width:700px) and (max-width:850px) and (pointer:coarse) {
  #cartOverlay .cart-line-photo,
  #cartOverlay .cart-line-placeholder {width:90px;height:90px;min-width:90px;flex-basis:90px}
  #cartOverlay .cart-line-main {gap:12px}
  #cartOverlay .cartRow {gap:10px}
}
@media (max-width:699px) {
  #cartOverlay .cart-close-x {min-width:48px;min-height:48px}
  #cartOverlay .cart-line-photo {object-fit:cover}
}
@media (prefers-reduced-transparency:reduce), (forced-colors:active) {
  #cartOverlay .sheet {background:#fff;-webkit-backdrop-filter:none;backdrop-filter:none}
}

/*
 * Tablet scroll performance (Teclast T70 and similar Android touch tablets).
 * This stylesheet is loaded by the customer kiosk only; do not touch POS,
 * payment, menu data or the printer path. Large per-card backdrop filters,
 * sticky header/footer filters and fixed radial backgrounds cause expensive
 * full-screen repaints on midrange Android GPUs while scrolling.
 */
@media (min-width:700px) and (max-width:1599px) and (pointer:coarse) {
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) {
    background:#edf2fa;
    background-attachment:scroll!important;
  }
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) :is(
    .top,.footer,.dish,.cat,.modeBtn,.cartBtn,.add,.btn,.control,.kiosk-fullscreen-btn,
    .kiosk-theme-btn,.customer-language-menu,.qty button,#cats button,#categories button
  ),
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) #cartOverlay,
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) #cartOverlay .sheet {
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
  }
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) .dish {
    background:rgba(255,255,255,.95);
    box-shadow:0 2px 7px rgba(30,62,104,.09)!important;
    transition:none!important;
    transform:none!important;
  }
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) :is(.top,.footer) {
    background:rgba(247,251,255,.97);
    box-shadow:0 1px 5px rgba(20,54,100,.06)!important;
  }
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) #menu .pic img {
    animation:none!important;
    transition:none!important;
    transform:none!important;
  }
  html.yoshi-restaurant-skin:not([data-theme="dark"]) body:has(#cartOverlay) #cartOverlay .sheet {
    background:rgba(249,252,255,.98);
  }
}
