/* Final responsive pass shared by every page. */
html,
body {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.shell,
.shell > *,
.shell :is(section, article, aside, form, fieldset, header, footer),
.shell :is([class*="grid"], [class*="layout"]) > * {
  min-width: 0;
}

img,
video,
iframe,
canvas {
  max-width: 100%;
}

.support-fab::before {
  position: absolute;
  right: 12%;
  bottom: 10%;
  left: 12%;
  height: 24px;
  border-radius: 50%;
  background: rgba(48, 34, 21, .3);
  content: "";
  filter: blur(12px);
  transform: translateY(7px);
}

.support-fab > .support-favo {
  z-index: 1;
  filter: drop-shadow(0 7px 9px rgba(48, 34, 21, .3))
    drop-shadow(0 2px 3px rgba(48, 34, 21, .22));
}

canvas[id*="bezz"],
canvas[class*="bezz"],
canvas[data-bezz-item-preview],
canvas[data-bezz-item-live-preview] {
  filter: drop-shadow(0 5px 8px rgba(48, 34, 21, .28))
    drop-shadow(0 1px 3px rgba(48, 34, 21, .18));
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .site-nav,
  .nav-admin-menu,
  .notification-panel,
  .support-panel {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

}

@media (max-width: 760px) {
  .shell {
    width: 100%;
    padding: 24px 14px max(56px, env(safe-area-inset-bottom));
  }

  .page-header,
  .section-heading,
  .card-heading,
  .admin-header {
    min-width: 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .page-header > *,
  .section-heading > *,
  .card-heading > * {
    min-width: 0;
    max-width: 100%;
  }

  h1 {
    font-size: clamp(32px, 8vw, 54px);
    overflow-wrap: anywhere;
  }

  h2,
  h3,
  p,
  small,
  strong,
  a {
    overflow-wrap: anywhere;
  }

  input,
  select,
  textarea {
    min-width: 0;
    max-width: 100%;
    font-size: 16px;
  }

  button,
  .button {
    min-height: 44px;
    max-width: 100%;
    white-space: normal;
    touch-action: manipulation;
  }

  table {
    max-width: 100%;
  }

  :is(.table-responsive, .table-scroll, .transaction-table, [class*="table-scroll"]) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  dialog[open] {
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: auto;
    overflow: auto;
    overscroll-behavior: contain;
  }

  .site-footer {
    padding-bottom: max(24px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 600px) {
  .ambient {
    display: none;
  }

  .card,
  .admin-panel,
  .auth-card,
  .leaderboard-card,
  .seasonal-theme-card {
    box-shadow: 0 10px 26px rgba(65, 46, 28, .075);
  }
}

@media (max-width: 380px) {
  .shell {
    padding-inline: 11px;
  }

  .button,
  button {
    padding-inline: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
