/* Mobile reflow belongs to each component; never hide page overflow to mask it. */
.public-portal-icons :is(main, section, form, #activeThemeGrid, #authorEventGrid) { min-width: 0; }
.public-portal-icons :is(h1, h2, h3, h4, #portalErrorMsg, #authorResultName, [id^="tk_info"], #tk_currentSubStatus, #tk_picName) { overflow-wrap: anywhere; }
.public-portal-icons :is(#activeThemeGrid, #authorEventGrid) :is(div, strong, span) { min-width: 0; overflow-wrap: anywhere; }
.public-portal-icons :is(#activeThemeGrid, #authorEventGrid) > div > div:first-child > div:first-child { flex-wrap: wrap; }
.public-portal-icons :is(#tk_infoTema, #tk_infoJudulBuku) { display: block; overflow: visible; -webkit-line-clamp: unset; }
.public-portal-icons > header { z-index: 60; }
.portal-hero > .relative { z-index: auto; }
.portal-search-modes > :is(button, a) { min-height: 44px; padding-inline: 6px; line-height: 1.4; }
#portalSearchInput { font-size: 16px; min-height: 48px; padding-right: 44px; }
#btnClearSearch { width: 44px; justify-content: center; padding: 0; }
#btnSubmitSearch { min-height: 48px; }
#suggestDropdown { max-height: min(320px, 45dvh); overscroll-behavior: contain; }
#suggestDropdown button { min-height: 48px; white-space: normal; }
#suggestDropdown button > div { min-width: 0; overflow-wrap: anywhere; }
#suggestDropdown button > span { flex-shrink: 0; }
#catalogPageButtons { flex-wrap: wrap; justify-content: center; }
#catalogPageButtons button { min-width: 44px; min-height: 44px; }
.public-portal-icons :is(#activeThemeGrid, #authorEventGrid) :is(a, button), #tk_waBtnLink { min-height: 44px; }
.public-portal-icons :is(button, a):focus-visible { outline: 3px solid #38bdf8; outline-offset: 3px; }
.public-portal-icons #portalErrorAlert > div { min-width: 0; }
.public-portal-icons #portalErrorAlert > button { flex-shrink: 0; min-width: 36px; min-height: 36px; }
@media (max-width: 1100px) {
  .admin-dashboard .admin-nav { flex-wrap: wrap; justify-content: center; gap: 4px; overflow: visible; }
}
@media (max-width: 767px) {
  .admin-dashboard .admin-nav > button { flex: 1 1 calc(33.333% - 4px); min-width: 0; justify-content: center; padding: 8px 4px !important; white-space: normal; font-size: 11px; line-height: 1.4; }
  .admin-dashboard .admin-nav > button > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .admin-dashboard .admin-nav > button > span[id] { flex-shrink: 0; }
  .admin-dashboard :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) { font-size: 16px !important; }
  .admin-dashboard :is(.admin-toolbar button, .admin-toolbar summary, .admin-toolbar a) { min-height: 44px; }
  .admin-dashboard .dashboard-hero h1 { font-size: clamp(22px, 5vw, 30px) !important; line-height: 1.25; }
  .admin-dashboard :is(.role-card h3, .role-card p) { overflow-wrap: anywhere; }
  .admin-dashboard .role-card { min-width: 0; }
}
@media (max-width: 639px) {
  .public-portal-icons .portal-header-bar { gap: 8px; }
  .public-portal-icons .portal-header-badge { max-width: calc(100% - 124px); line-height: 1.5; }
  .portal-hero { padding-block: 28px 30px; }
  .portal-hero h1 { font-size: clamp(26px, 7.1vw, 34px); line-height: 1.16; }
  .portal-hero p { font-size: 13px; line-height: 1.7; }
  .portal-search-modes > a { grid-column: 1 / -1; }
  .portal-search-modes > :is(button, a) { font-size: 11px; gap: 5px; }
  #portalSearchForm + div { align-items: flex-start; font-size: 11px; line-height: 1.6; }
  .portal-quick-nav > div { overflow: visible; padding-block: 6px; }
  .portal-quick-nav > div > div { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; white-space: normal; }
  .portal-quick-nav > div > div > span { display: none; }
  .portal-quick-nav button { min-height: 44px; padding: 7px 4px; font-size: 11px; line-height: 1.4; }
  .public-portal-icons main { padding-top: 24px; }
  #sectionTrackingDetail > div { padding: 18px 14px; border-radius: 20px; }
  #tk_bookTitle { font-size: clamp(20px, 5.6vw, 25px); line-height: 1.3; }
  #tk_percentageText { font-size: 10px; text-align: right; max-width: 43%; }
  #tk_currentStatusTitle { font-size: 15px; }
  #tk_infoGroupCode { font-size: 12px; }
  .portal-stepper { min-width: 0; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 8px; padding: 5px; }
  .portal-stepper > .absolute { display: none; }
  .portal-stepper [id^="step_node_"] { min-width: 0; }
  .portal-stepper [id^="step_node_"] > span { font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
  .portal-stepper .step-bubble { width: 28px; height: 28px; font-size: 11px; }
  #sectionCatalog h2, #sectionAuthorResults h2 { font-size: 22px; line-height: 1.3; }
  #sectionCatalog > div:has(> button) { flex-wrap: wrap; }
  #sectionCatalog > div > button { min-height: 44px; }
  #activeThemeGrid, #authorEventGrid { gap: 14px; }
  :is(#activeThemeGrid, #authorEventGrid) > div { padding: 16px; }
  :is(#activeThemeGrid, #authorEventGrid) h4 { font-size: 16px; line-height: 1.5; }
  .public-portal-icons footer { margin-top: 32px; padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  #floatingCsButton > span:last-child { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  .public-portal-icons .floating-book, .public-portal-icons .animate-ping, .public-portal-icons .animate-pulse { animation: none !important; }
}
@media (max-height: 500px) and (orientation: landscape) {
  .public-portal-icons > header, .public-portal-icons .portal-quick-nav { position: relative; top: auto; }
}
