
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
button, a, summary, label, select, [role="button"] { touch-action: manipulation; }
body { -webkit-touch-callout: none; }
input, textarea, select { -webkit-touch-callout: default; }
:root { --m-safe-top: env(safe-area-inset-top, 0px); --m-safe-bottom: env(safe-area-inset-bottom, 0px); --m-tab-h: 62px; }

.m-tabbar, .m-sheet, .m-scrim, .m-admin-scrim, .m-admin-bottom, .m-chat-back, .m-install-tip, .m-cortes-view, .m-admin-menu-search { display: none; }

@media (max-width: 820px) {

  input, select, textarea, .search-box input { font-size: 16px !important; }

  .modal-overlay, .cart-overlay, .admin-drawer-overlay, .perm-overlay.is-open, .cc-overlay, .site-header, .modal, .cart-drawer, .client-auth-card { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
  .hero-glow { display: none; }
  .hero-ing { display: block !important; }
  .section, .footer, .site-footer { content-visibility: auto; contain-intrinsic-size: auto 720px; }
  img { image-rendering: auto; }

  .modal {
    top: auto; bottom: 0; left: 0; right: 0;
    width: 100% !important; max-width: none; max-height: 92dvh;
    border-radius: 24px 24px 0 0; border-bottom: none;
    padding: 1.5rem 1.2rem calc(1.4rem + var(--m-safe-bottom));
    transform: translateY(100%);
  }
  .modal::before { content: ""; display: block; width: 42px; height: 4px; border-radius: 4px; background: var(--color-line); margin: -0.6rem auto 1rem; }
  .modal.is-open { animation: m-sheet-up 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
  .modal.is-closing { animation: m-sheet-down 0.26s ease-in forwards; }
  @keyframes m-sheet-up { from { transform: translateY(100%); opacity: 1; } to { transform: translateY(0); opacity: 1; } }
  @keyframes m-sheet-down { from { transform: translateY(0); opacity: 1; } to { transform: translateY(100%); opacity: 1; } }
  .modal--account { width: 100% !important; }

  .cart-drawer { padding-top: var(--m-safe-top); }
  .cart-footer, .cart-summary { padding-bottom: calc(1rem + var(--m-safe-bottom)); }
}

@media (max-width: 820px) {
  .site-header { display: none !important; }
  body.has-tabbar { padding-bottom: calc(var(--m-tab-h) + var(--m-safe-bottom)); }

  .site-header .header-inner { padding: calc(0.5rem + var(--m-safe-top) * 0) 0.8rem; gap: 0.7rem; }
  body.has-tabbar .site-header { display: none; }
  body.has-tabbar .header-actions, body.has-tabbar #menuToggle { display: none; }
  .site-header { padding-top: var(--m-safe-top); background: #000; }

  body.has-tabbar .hero {
    --hero-h: calc(100vh - var(--m-tab-h) - var(--m-safe-bottom));
    --hero-h: calc(100svh - var(--m-tab-h) - var(--m-safe-bottom));
    --hero-h: calc(100dvh - var(--m-tab-h) - var(--m-safe-bottom));
    height: var(--hero-h); min-height: 0; max-height: var(--hero-h);
    padding: 0;
  }
  body.has-tabbar .hero .hero-text-col { padding: 0.8rem 0.9rem; }
  body.has-tabbar .hero-content { gap: 0.15rem; }
  body.has-tabbar .hero-brand .logo-img { height: 1.7rem !important; }
  body.has-tabbar .hero-bg-text span { font-size: clamp(3.2rem, 21vw, 5.6rem); }
  body.has-tabbar .hero-tagline { font-size: 1.4rem; margin: 0.3rem 0 0; }
  .search-box { border-radius: 999px; }

  .hero-brand .logo-img { height: 2.3rem !important; }

  .whatsapp-float { right: 0.9rem; bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 0.9rem); width: 62px; height: 62px; }
  .whatsapp-float svg, .whatsapp-float img { width: 42px !important; height: 42px !important; }

  .toast { bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 0.8rem) !important; }

  .menu-grid-flat { grid-template-columns: repeat(2, 1fr) !important; gap: 0.6rem !important; }
  .menu-card-body h4 { font-size: 0.88rem !important; min-height: 0 !important; }
  .menu-card-ingredients { display: block !important; -webkit-line-clamp: unset !important; overflow: visible !important; text-overflow: clip !important; max-height: none !important; font-size: 0.7rem !important; min-height: 0 !important; }
  .menu-card-price-old { font-size: 0.75rem; }

  .m-cortes-view {
    display: flex; flex-direction: column; position: fixed; inset: 0; z-index: 65;
    background: var(--color-bg); transform: translateX(102%); opacity: 0;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.34s ease;
  }
  .m-cortes-view.is-open { transform: none; opacity: 1; }
  .m-cortes-topbar {
    display: flex; align-items: center; gap: 0.6rem; flex: none;
    padding: calc(0.6rem + var(--m-safe-top)) 0.8rem 0.6rem; background: #000; border-bottom: 1px solid var(--color-line);
  }
  .m-cortes-topbar .header-search-inline { flex: 1 1 auto; min-width: 0; }
  .m-cortes-body { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 1rem); -webkit-overflow-scrolling: touch; }
  .m-cortes-body .menu-categories { margin-top: 0.4rem; gap: 1.4rem; }
  .m-cortes-body .menu-category-head { margin-bottom: 0.6rem; justify-content: flex-start; }
  .m-cortes-body .menu-category-head .section-title { font-size: 1.9rem !important; }
  .m-cortes-body .menu-card .btn-add { font-size: 0.85rem !important; padding: 0.7rem 0.3rem !important; }
  .m-cortes-body .menu-card .price-now { font-size: 1.35rem !important; }
  .m-cortes-body .menu-card-price-old { font-size: 0.85rem; }
  .m-cortes-body #cortes.section, .m-cortes-body #produtos.section { padding: 0.9rem 0.8rem 0; }
  .m-cortes-body #produtos.section { padding-top: 1.6rem; margin-top: 0.6rem; border-top: 1px solid var(--color-line); }
  .m-cortes-body .section-inner { padding-top: 0; }
  .m-cortes-body #cortes > .section-inner > .section-title,
  .m-cortes-body #cortes > .section-inner > .section-lead,
  .m-cortes-body #cortes > .section-inner > .title-divider,
  .m-cortes-body #produtos > .section-inner > .section-title,
  .m-cortes-body #produtos > .section-inner > .section-lead,
  .m-cortes-body #produtos > .section-inner > .title-divider { display: none; }

  .m-cortes-view .search-box { width: 100%; }
  .m-cortes-view .search-live-results {
    position: fixed; left: 0; right: 0; top: calc(3.6rem + var(--m-safe-top)); bottom: 0; z-index: 2;
    max-height: none; margin: 0; border-radius: 0; border: none; background: var(--color-bg);
    padding: 0.8rem 0.8rem calc(var(--m-tab-h) + var(--m-safe-bottom) + 1rem);
    display: grid !important; grid-template-columns: 1fr; gap: 0.6rem; align-content: start; overflow-y: auto;
    overscroll-behavior: contain;
  }
  .m-cortes-view .search-live-results[hidden] { display: none !important; }
  .m-cortes-view .search-live-empty { padding: 3rem 0; }
  .m-cortes-view .search-result-item {
    display: grid; grid-template-columns: 84px minmax(0, 1fr) auto; align-items: center; gap: 0.8rem;
    padding: 0.6rem; border-radius: 16px; background: var(--color-surface-2); border: 1px solid var(--color-line);
  }
  .m-cortes-view .search-result-media { width: 84px; height: 84px; border-radius: 12px; }
  .m-cortes-view .search-result-info { display: flex; flex-direction: column; gap: 0.1rem; }
  .m-cortes-view .search-result-info br { display: none; }
  .m-cortes-view .search-result-name { font-size: 0.95rem; }
  .m-cortes-view .search-result-price { font-size: 0.95rem; }
  .m-cortes-view .search-result-ing { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; }
  .m-cortes-view .search-result-add { position: static; width: 40px; height: 40px; }

  .slideshow-track { touch-action: pan-y; }
  .slideshow-arrow { display: none; }
  .slideshow-track img { height: auto; aspect-ratio: 1600 / 420; }

  .localizacao-map { justify-content: center; }
  .localizacao-map-frame { height: auto; width: 100%; max-width: 360px; aspect-ratio: 1 / 1; margin: 0 auto; }

  .m-tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 95;
    height: calc(var(--m-tab-h) + var(--m-safe-bottom));
    padding: 0.35rem 0.4rem var(--m-safe-bottom);
    background: #060606;
    border-top: 1px solid var(--color-line);
    box-shadow: 0 -12px 30px -16px rgba(0, 0, 0, 0.8);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .m-tabbar button {
    position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.18rem;
    background: none; border: none; color: var(--color-cream-dim);
    font-size: 0.66rem; font-weight: 700; letter-spacing: 0.01em;
    border-radius: 14px; transition: color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  }
  .m-tabbar button[hidden] { display: none; }
  .m-tabbar button:active { transform: scale(0.92); }
  .m-tabbar button .ldc-icon, .m-tabbar button svg { width: 22px; height: 22px; }
  .m-tabbar button.is-active { color: #fff; }
  .m-tab-ico { position: relative; display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; }
  .m-tab-ico .kc-avatar-img, .m-tab-ico .kc-avatar-initials, .m-tab-ico > span { width: 26px !important; height: 26px !important; border-radius: 50%; font-size: 0.7rem !important; }
  .m-tab-badge { position: absolute; top: -5px; right: -9px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: linear-gradient(100deg, var(--color-gold), var(--color-ember)); color: var(--color-bg, #0A0A0A); font-size: 0.62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; }
  .m-tab-badge.is-zero, .m-tab-badge[hidden] { display: none !important; }
  .m-tab-badge--notif { top: 5px; right: auto; left: calc(50% + 5px); background: var(--color-accent); color: #1a1205; box-shadow: 0 0 0 2px #060606; }

  body.has-tabbar .cart-drawer { bottom: calc(var(--m-tab-h) + var(--m-safe-bottom)); padding-top: var(--m-safe-top); overscroll-behavior: contain; }
  body.has-tabbar .cart-body { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  body.has-tabbar .cart-footer, body.has-tabbar .cart-summary { padding-bottom: 1rem; }
  .cart-overlay, .modal-overlay { touch-action: none; }

  body.ldc-scroll-lock { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }
  .m-cortes-body { overscroll-behavior: contain; }
  body.m-kb .m-tabbar, body.m-kb .whatsapp-float { transform: translateY(140%); }

  .m-scrim { display: block; position: fixed; inset: 0; z-index: 130; background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
  .m-scrim.is-open { opacity: 1; pointer-events: auto; }
  .m-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 131;
    max-height: 86dvh; overflow-y: auto;
    padding: 0.7rem 1rem calc(1.2rem + var(--m-safe-bottom));
    background: var(--color-surface); border-top: 1px solid var(--color-line); border-radius: 24px 24px 0 0;
    transform: translateY(105%); transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    overscroll-behavior: contain;
  }
  .m-sheet.is-open { transform: none; }
  .m-sheet-grip { width: 42px; height: 4px; border-radius: 4px; background: var(--color-line); margin: 0 auto 0.9rem; }
  .m-sheet h3 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--color-cream-dim); margin: 0.2rem 0.3rem 0.7rem; font-family: var(--font-body); font-weight: 700; }
  .m-sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
  .m-sheet-item {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.45rem; text-align: center;
    padding: 0.95rem 0.4rem; border-radius: 16px; background: var(--color-surface-2); border: 1px solid var(--color-line);
    color: var(--color-cream); font-size: 0.76rem; font-weight: 700; text-decoration: none; transition: transform 0.15s ease, border-color 0.2s;
  }
  .m-sheet-item:active { transform: scale(0.95); border-color: var(--color-accent); }
  .m-sheet-item .ldc-icon, .m-sheet-item svg { width: 24px; height: 24px; color: var(--color-accent); }
  .m-sheet-item.is-wa svg { color: #2ED06C; }
  .m-install-tip { display: block; margin: 0.8rem 0.2rem 0; padding: 0.8rem 0.9rem; border-radius: 14px; background: var(--color-surface-2); border: 1px dashed var(--color-line); color: var(--color-cream-dim); font-size: 0.8rem; line-height: 1.5; }
  .m-install-tip[hidden] { display: none; }
  .m-install-tip strong { color: #fff; }
}

@media (max-width: 860px) {
  /* Login: barra de cima + card centralizado + rodapé (sem imagem lateral) */
  .client-auth-page { display: flex !important; flex-direction: column; min-height: 100dvh; }
  .client-auth-form-side { flex: 1 0 auto; align-items: center !important; justify-content: center !important; padding: 1.6rem 1rem 2rem !important; }
  .client-auth-card { width: 100% !important; max-width: 460px; margin: 0 auto; padding: 1.5rem 1.2rem !important; }
  .client-auth-card .btn, .client-auth-card .account-tab { min-height: 46px; }
}

@media (max-width: 820px) {
  .pix-qr-wrap { box-sizing: border-box; width: min(62vw, 220px); height: min(62vw, 220px); margin-left: auto; margin-right: auto; }
  .pix-qr-wrap img { width: 100%; height: 100%; margin: 0; }
}

@media (max-width: 760px) {
  .profile-wrap, .profile-card, .profile-side { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; filter: none !important; transform: none !important; }
  .profile-page { height: 100dvh; padding: 0 !important; align-items: stretch !important; }
  .profile-wrap { flex-direction: column; width: 100%; max-height: none !important; height: 100%; gap: 0; }

  .profile-side {
    width: 100% !important; flex: none; flex-direction: row !important; flex-wrap: nowrap !important; align-items: center;
    gap: 0.45rem; padding: calc(0.7rem + var(--m-safe-top)) 0.8rem 0.7rem;
    overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
    border: none !important; border-bottom: 1px solid var(--color-line) !important; border-radius: 0 !important;
  }
  .profile-side::-webkit-scrollbar { display: none; }
  .profile-side-title { display: none; }
  .profile-side-foot { display: contents; }
  .profile-side-btn { width: auto !important; flex: none !important; scroll-snap-align: start; white-space: nowrap; padding: 0.6rem 1rem; border-radius: 999px; background: var(--color-surface-2); justify-content: center; }
  .profile-side-btn.is-active { background: linear-gradient(100deg, var(--color-gold), var(--color-ember)); }
  a.profile-side-btn { display: none !important; }
  body.has-tabbar .profile-page { padding-bottom: 0 !important; }
  body.has-tabbar .profile-wrap { height: calc(100dvh - var(--m-tab-h) - var(--m-safe-bottom)); }
  body.has-tabbar .profile-chat { height: auto; bottom: calc(var(--m-tab-h) + var(--m-safe-bottom)) !important; z-index: 90; }
  body.has-tabbar .profile-chat .chat-input-row { padding-bottom: 0.7rem; }
  body.has-tabbar.m-kb .profile-chat { bottom: 0 !important; }
  .profile-card { flex: 1 1 auto; min-height: 0 !important; border-radius: 0 !important; border: none !important; box-shadow: none !important; }
  .profile-head { padding: 1rem 1rem 0.4rem; }
  .profile-scroll { padding: 0.4rem 1rem calc(1.4rem + var(--m-safe-bottom)) !important; }
  .order-actions-row { flex-direction: column; }
  .order-actions-row .btn { width: 100%; justify-content: center; }

  .profile-chat { position: fixed !important; inset: 0 !important; z-index: 300; border-radius: 0 !important; height: 100dvh; padding-top: var(--m-safe-top); }
  .profile-chat-head { padding: 0.8rem 0.9rem; }
  .profile-chat-messages { padding: 0.9rem 0.8rem; }
  .chat-msg { max-width: 88%; }
  .chat-input-row { padding: 0.7rem 0.7rem calc(0.7rem + var(--m-safe-bottom)); gap: 0.5rem; }
  .chat-send { padding: 0.65rem 0.95rem; font-size: 0; gap: 0; }
  .chat-send svg { width: 20px; height: 20px; }
  .chat-att--img img, .chat-att--video { max-height: 240px; }
  .chat-att--file { min-width: 0; }
}

@media (max-width: 900px) {
  body { overscroll-behavior-y: none; }
  .admin-shell { display: block; min-height: 100dvh; }

  .admin-sidebar {
    position: fixed !important; inset: 0 !important; z-index: 250;
    width: 100% !important; height: 100dvh !important; overflow-y: auto;
    transform: translateY(100%); transition: transform 0.36s cubic-bezier(0.22, 1, 0.36, 1);
    padding-top: var(--m-safe-top); box-shadow: none;
  }
  body.m-menu-open .admin-sidebar { transform: none; }
  body.m-menu-open .m-admin-scrim { opacity: 1; pointer-events: auto; }
  .admin-profile-btn { display: none !important; }
  .admin-nav-btn span:not(.admin-nav-badge) { display: inline !important; }
  .admin-nav-btn { justify-content: flex-start !important; padding: 0.85rem 0.9rem !important; font-size: 0.98rem; }
  .admin-nav-badge { position: static !important; margin: 0 0 0 auto !important; }
  .admin-sidebar-foot { padding-bottom: calc(1.2rem + var(--m-safe-bottom)); }

  .m-admin-menu-search { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.7rem; padding: 0.8rem 0.9rem 0.6rem 1.1rem; position: sticky; top: 0; z-index: 2; background: var(--color-surface); }
  .m-menu-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 400; }
  .m-menu-close { position: static; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--color-surface-2); border: none; color: var(--color-cream); display: flex; align-items: center; justify-content: center; }
  .m-menu-close svg { width: 20px; height: 20px; }
  body .m-admin-bottom { z-index: 270; }
  .admin-sidebar { padding-bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 1rem) !important; }
  body.m-menu-open .admin-nav { padding-bottom: 1rem; }
  .m-admin-bottom .m-tab-ico { display: flex; align-items: center; justify-content: center; }
  body.m-chat-open .admin-chat-side { display: none; }
  body.m-chat-open .admin-chat-list { display: none; }

  .admin-content { padding: calc(1rem + var(--m-safe-top)) 0.85rem calc(var(--m-tab-h) + var(--m-safe-bottom) + 1.6rem) !important; }
  .admin-panel-head { margin-bottom: 1rem; }
  .admin-panel-head h1 { font-size: 1.35rem; }
  .admin-panel-head .btn, .admin-panel-head > div > .btn { width: 100%; justify-content: center; }
  .admin-card { padding: 1rem; border-radius: 18px; }
  .admin-toolbar input, .admin-toolbar select { flex: 1 1 100%; min-height: 44px; }
  .admin-btn-icon { width: 38px; height: 38px; border-radius: 11px; margin-right: 0.35rem; }
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cfg-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -0.85rem; padding: 0 0.85rem 0.2rem; }
  .cfg-tabs::-webkit-scrollbar { display: none; }
  .cfg-tab { flex: none; white-space: nowrap; }
  .lib-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: -0.85rem; padding: 0 0.85rem 0.2rem; }
  .lib-chips::-webkit-scrollbar { display: none; }
  .lib-chip { flex: none; }
  .lib-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)) !important; }
  .website-row { gap: 0.7rem; }

  .admin-table-wrap { overflow: visible; }
  table.admin-table, table.admin-table tbody { display: block; width: 100%; }
  table.admin-table thead { display: none; }
  table.admin-table tr { display: grid; grid-template-columns: 1fr; gap: 0.4rem; padding: 0.9rem; margin-bottom: 0.7rem; background: var(--color-surface-2); border: 1px solid var(--color-line); border-radius: 18px; }
  table.admin-table tr:hover td { background: none; }
  table.admin-table td { display: flex; align-items: center; gap: 0.7rem; padding: 0 !important; border: none !important; min-width: 0; word-break: break-word; }
  table.admin-table td[data-label]::before { content: attr(data-label); flex: none; min-width: 78px; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-cream-dim); font-weight: 700; }
  table.admin-table td.admin-empty { display: block; text-align: center; padding: 2rem 0 !important; }
  table.admin-table td.admin-actions { justify-content: flex-end; flex-wrap: wrap; padding-top: 0.5rem !important; margin-top: 0.2rem; border-top: 1px solid var(--color-line) !important; }
  table.admin-table td.drag-cell { width: 100% !important; order: -1; justify-content: center; padding: 0 !important; margin: -0.3rem 0 0.1rem; }
  table.admin-table td.drag-cell:empty { display: none; }
  table.admin-table td.drag-cell .drag-handle { width: 100%; height: 30px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
  table.admin-table td.drag-cell .drag-handle svg { transform: rotate(90deg); }
  .admin-thumb { width: 52px; height: 52px; }

  .admin-drawer {
    top: auto !important; bottom: 0; left: 0 !important; width: 100% !important; max-height: 92dvh !important;
    border-radius: 24px 24px 0 0; border-bottom: none; transform: translateY(105%) !important;
    transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease !important;
  }
  .admin-drawer.is-open { transform: none !important; }
  .admin-drawer-body { padding: 1rem; }
  .admin-drawer-foot { padding: 0.9rem 1rem calc(0.9rem + var(--m-safe-bottom)); }
  .admin-drawer-foot .btn { min-height: 48px; }
  .img-choice-modal { align-items: flex-end; padding: 0; }
  .img-choice-box { width: 100% !important; max-height: 90dvh !important; border-radius: 24px 24px 0 0; }
  .perm-overlay { align-items: flex-end; padding: 0; }
  .perm-modal { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; }
  .perm-foot { padding-bottom: calc(0.9rem + var(--m-safe-bottom)); }

  .admin-chat-layout { display: block !important; height: auto !important; }
  .admin-chat-list { max-height: none; }
  .admin-chat-panel { display: none; }
  body.m-chat-open .admin-chat-list { display: none; }
  body.m-chat-open .admin-chat-panel { display: flex; position: fixed; inset: 0; z-index: 260; border-radius: 0; border: none; height: 100dvh; padding-top: var(--m-safe-top); background: var(--color-surface); }
  body.m-chat-open .m-admin-bottom, body.m-chat-open .m-admin-top { display: none; }
  .admin-chat-head { display: flex; align-items: center; gap: 0.7rem; }
  .m-chat-back { display: inline-flex; width: 38px; height: 38px; flex: none; border-radius: 12px; align-items: center; justify-content: center; background: var(--color-surface-2); border: none; color: var(--color-cream); }
  .admin-chat-messages { padding: 0.8rem 0.7rem; }
  .admin-chat-panel .chat-input-row { padding: 0.7rem 0.7rem calc(0.7rem + var(--m-safe-bottom)); gap: 0.5rem; }
  .admin-chat-panel .chat-send { font-size: 0; gap: 0; padding: 0.65rem 0.95rem; }

  .m-admin-bottom {
    display: grid; grid-template-columns: repeat(var(--m-cols, 5), 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
    height: calc(var(--m-tab-h) + var(--m-safe-bottom)); padding: 0.35rem 0.3rem var(--m-safe-bottom);
    background: #060606; border-top: 1px solid var(--color-line);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .m-admin-bottom button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.18rem; background: none; border: none; border-radius: 14px; color: var(--color-cream-dim); font-size: 0.68rem; font-weight: 700; }
  .m-admin-bottom button:active { transform: scale(0.93); }
  .m-admin-bottom button svg { width: 22px; height: 22px; }
  .m-admin-bottom button.is-active { color: #fff; }
  .m-admin-bottom .m-tab-badge { top: 4px; right: calc(50% - 22px); }
  body.m-kb .m-admin-bottom { transform: translateY(140%); }
  .m-admin-scrim { display: block; position: fixed; inset: 0; z-index: 240; background: rgba(0, 0, 0, 0.6); opacity: 0; pointer-events: none; transition: opacity 0.25s ease; }
  #toast, .admin-toast { bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 0.8rem) !important; }
}

@media (max-width: 420px) {
  .m-sheet-grid { gap: 0.45rem; }
  .m-sheet-item { padding: 0.8rem 0.3rem; font-size: 0.72rem; }
  .admin-stats-grid { gap: 0.6rem; }
  .admin-stat-card { padding: 0.8rem; }
  .admin-stat-card strong { font-size: 1.25rem; }
}

@media (display-mode: standalone) {
  body { -webkit-user-select: none; user-select: none; }
  input, textarea, .chat-text, .chat-att--file { -webkit-user-select: text; user-select: text; }
}

@media (max-width: 820px) {
  html:has(.m-tabbar), html:has(.m-admin-bottom) { scrollbar-width: none; }
  html:has(.m-tabbar)::-webkit-scrollbar, html:has(.m-admin-bottom)::-webkit-scrollbar { display: none; width: 0; height: 0; }
  .m-scrollrail {
    position: fixed; right: 0; z-index: 94; width: 14px; pointer-events: none;
    top: calc(var(--m-safe-top) + 6px); bottom: calc(var(--m-tab-h) + var(--m-safe-bottom) + 6px);
    opacity: 0; transition: opacity 0.35s ease;
  }
  .m-scrollrail.is-on, .m-scrollrail.is-drag { opacity: 1; }
  .m-scrollrail.is-drag { pointer-events: auto; }
  .m-scrollthumb { touch-action: none; position: absolute; right: 3px; width: 5px; border-radius: 999px; background: rgba(255,255,255,0.85); box-shadow: 0 0 0 1px rgba(0,0,0,0.25); transition: width 0.15s ease, right 0.15s ease; }
  .m-scrollrail.is-drag .m-scrollthumb { width: 8px; right: 2px; }
  body.m-cortes-open .m-scrollrail, body.m-menu-open .m-scrollrail { display: none; }
}
@media (min-width: 821px) { .m-scrollrail { display: none; } }

@media (max-width: 820px) { .combos-banner { margin-top: 1.4rem; } }

@media (max-width: 900px) {
  .m-admin-bottom.is-floating { left: 0.7rem; right: 0.7rem; bottom: calc(var(--m-safe-bottom) + 0.6rem); height: var(--m-tab-h); padding: 0.35rem 0.4rem; border: 1px solid var(--color-line); border-radius: 20px; box-shadow: 0 18px 36px -12px rgba(0,0,0,0.85); }
  .m-admin-bottom.no-labels button > span:not(.m-tab-ico) { display: none; }
  .m-admin-bottom.no-badges .m-tab-badge { display: none !important; }
  .m-admin-bottom.size-pequeno button svg { width: 18px; height: 18px; }
  .m-admin-bottom.size-grande button svg { width: 27px; height: 27px; }
  .m-admin-bottom.size-grande.no-labels button svg { width: 30px; height: 30px; }
}

@media (max-width: 820px) {
  .section-title, .historia-col .section-title, .section-head .section-title { font-size: clamp(2.6rem, 10.6vw, 3.4rem); line-height: 1.08; text-align: center; margin-left: auto; margin-right: auto; }
  .historia-col .section-lead, .section-head .section-lead { text-align: center; margin-left: auto; margin-right: auto; }
  .section-head { justify-content: center; text-align: center; }
  .info-stats { justify-content: center; text-align: center; }
  .info-stats > div { text-align: center; }
  .info-stats dt { font-size: clamp(2.5rem, 11vw, 3.2rem); line-height: 1.05; }
  .info-stats dd { font-size: 0.9rem; }
  .combos-banner { margin-top: 3.9rem; }
}

@media (max-width: 820px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]), select, textarea { font-size: 16px !important; }
  .m-tabbar, .m-admin-bottom { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .cc-banner { padding-bottom: env(safe-area-inset-bottom, 0px); }
}
@media (max-width: 820px) and (orientation: landscape) { .m-tabbar, .m-admin-bottom { padding-bottom: env(safe-area-inset-bottom, 0px); } }

@media (max-width: 900px) {
  .admin-drawer-overlay { z-index: 310 !important; }
  .admin-drawer { z-index: 311 !important; }
  .perm-overlay, .img-choice-modal { z-index: 320 !important; }
  .admin-drawer-foot, .perm-foot { padding: 0.8rem 1rem calc(0.8rem + var(--m-safe-bottom)) !important; gap: 0.7rem; }
  .admin-drawer-foot .btn, .perm-foot > .btn, .perm-foot > button { min-height: 50px; border-radius: 999px; font-size: 1rem; }
  .img-choice-box { display: flex; flex-direction: column; padding-bottom: calc(1rem + var(--m-safe-bottom)); }

  .admin-panel-head h1 { font-size: 1.95rem !important; line-height: 1.1; }
  .admin-panel-head p { font-size: 0.95rem; }
  .fin-section-head h2 { font-size: 1.7rem; }

  .cfg-hub { display: block !important; }
  .cfg-nav { position: sticky !important; top: calc(var(--m-safe-top) + 0.5rem); z-index: 40; margin-bottom: 1.1rem; background: var(--color-surface) !important; box-shadow: 0 12px 24px -14px rgba(0,0,0,0.85); }
  .cfg-nav .cfg-tab { padding: 0.55rem 0.9rem 0.55rem 0.55rem; }
  .cfg-nav .cfg-tab.is-active { background: var(--grad-main); }
  .lib-nav { margin-bottom: 1.1rem; }

  .cfg-triple { gap: 0.9rem 1rem; }
  .fin-cats { max-height: calc(100dvh - 15rem); }
}

@media (max-width: 820px) {
  .admin-panel-head > :not(:first-child) { width: 100% !important; align-self: stretch !important; margin: 0 !important; position: static !important; display: flex; flex-direction: column; gap: 0.6rem; }
  .admin-panel-head > .btn, .admin-panel-head > div > .btn, .admin-panel-head .admin-toolbar > .btn { width: 100% !important; flex: 1 1 100%; justify-content: center; }
  .admin-panel-head > .btn { align-self: stretch !important; }
  .admin-toolbar > .btn.btn-primary { flex: 1 1 100%; width: 100%; order: -1; justify-content: center; }
}

@media (max-width: 820px) {
  .admin-panel[data-panel="brindes"] table.admin-table td[data-label]::before { width: 7.8rem; min-width: 7.8rem; max-width: 7.8rem; box-sizing: border-box; }
}
/* Início no celular: o texto da marca fica no meio da tela, como no computador */
@media (max-width: 820px) {
  .hero .hero-row { grid-template-rows: 1fr; }
  .hero .hero-text-col, body.has-tabbar .hero .hero-text-col { align-items: center; justify-content: center; }
}
