/* Consolidated responsive behavior for the embedded application. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
html body {
  min-width: 0;
  overflow-wrap: anywhere;
}
html body button,
html body input {
  min-width: 0;
  max-width: 100%;
}
html body button {
  min-height: 44px;
  white-space: normal;
  line-height: 1.35;
  touch-action: manipulation;
}
html body button:focus-visible,
html body input:focus-visible {
  outline: 3px solid #9b7600;
  outline-offset: 3px;
}
html body img {
  max-width: 100%;
  height: auto;
}
html body .home,
html body .hero,
html body .layout {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
}
html body .hero,
html body .side,
html body .content,
html body .quizcontent,
html body .opts {
  min-width: 0;
}
html body .nav {
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
html body .nav > div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
}
html body .nav button {
  margin: 0;
}
html body .opt {
  width: 100%;
  overflow-wrap: anywhere;
  line-height: 1.45 !important;
}
html body .qimg,
html body .ref {
  width: auto;
  height: auto;
  max-width: 100% !important;
  object-fit: contain;
}
html body .feedback,
html body .fb {
  overflow-wrap: anywhere;
}
@media (max-width: 820px) {
  html body .home,
  html body #home.card.hero {
    grid-template-columns: minmax(0, 1fr) !important;
    min-height: 0 !important;
  }
  html body .hero,
  html body .side,
  html body #home.hero > div:first-child,
  html body #home .yellow {
    padding: 28px 22px !important;
  }
  html body .hero h1,
  html body #home h1 {
    font-size: clamp(32px, 7vw, 52px) !important;
    line-height: 1.08 !important;
  }
}
@media (max-width: 480px) {
  html body .nav > div {
    flex: 1 1 100%;
  }
  html body .nav button {
    flex: 1 1 130px;
  }
  html body .hero,
  html body .side,
  html body #home.hero > div:first-child,
  html body #home .yellow {
    padding: 24px 18px !important;
  }
  html body .opt,
  html body #opts .opt {
    font-size: 16px !important;
    padding: 14px 14px 14px 48px !important;
  }
  html body .opt:before {
    left: 16px !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  html body *,
  html body *:before {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

html body .home {
  width: calc(100% - 28px);
  margin: 24px auto;
}
html body .app {
  width: calc(100% - 28px);
  margin: 18px auto;
  padding: 18px;
}
html body .layout {
  grid-template-columns: 280px minmax(0, 1fr);
}
html body .panel {
  min-width: 0;
  min-height: 0;
  max-height: min(650px, 80vh);
  overscroll-behavior: contain;
}
html body .contentTop {
  flex-wrap: wrap;
  min-width: 0;
}
html body .topActions {
  min-width: 0;
  max-width: 100%;
}
html body .topActions .reviewLauncher {
  white-space: normal !important;
  text-align: left;
}
html body .reviewCount {
  flex-shrink: 0;
}
html body .groupBadge {
  width: auto;
  max-width: 100%;
}
html body .reviewModal {
  padding: 12px;
}
html body .reviewDialog {
  max-width: 100%;
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  overscroll-behavior: contain;
}
html body .reviewHeader {
  gap: 12px;
  flex-wrap: wrap;
}
html body .reviewHeader > div {
  flex: 1 1 180px;
  min-width: 0;
}
html body .errorTop {
  flex-wrap: wrap;
}
.errorStatus {
  max-width: 100%;
}
html body .moduleTabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 820px) {
  html body .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
  html body .panel {
    max-height: 240px;
    max-height: min(240px, 35dvh);
    min-height: 0;
    padding: 12px !important;
  }
  html body .content {
    padding: 0 4px;
    min-height: 0;
  }
  html body .nums {
    grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
  }
  html body .homeLogo {
    width: 160px;
  }
}
@media (max-width: 480px) {
  html body .app {
    width: calc(100% - 20px);
    padding: 12px;
    margin: 10px auto;
  }
  html body .content h2 {
    font-size: 21px;
    line-height: 1.35 !important;
  }
  html body .topActions {
    width: 100%;
    align-items: stretch;
  }
  html body .topActions .reviewLauncher {
    flex-basis: 100%;
  }
  html body .reviewBody {
    padding: 12px;
  }
  .reviewHeader {
    padding: 14px;
  }
  html body .moduleTabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  html body .errorDetail {
    grid-template-columns: minmax(0, 1fr);
  }
  html body .errorActions button,
  html body .reviewTools button {
    flex: 1 1 100%;
  }
}

@media print {
  html body .reviewDialog {
    max-height: none;
    overflow: visible;
  }
  html body .tap-review {
    overflow: visible !important;
  }
  html body .tap-review-table {
    min-width: 0 !important;
  }
}
