/* Normal-site presentation only. No access or authentication ownership. */
/* Existing guard removes this class only after membership verification. */
html.bloom-access-pending body[data-library-protected="true"] { visibility:hidden; }
.bloom-activity-loading { display:none; }
html.bloom-access-pending .bloom-activity-loading { visibility:visible;position:fixed;inset:0;z-index:10000;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:24px;background:#f4f0f9;color:#60349b;text-align:center; }
.bloom-normal-site { --bloom-purple:#60349b; --bloom-pink:#d459a8; --bloom-blue:#528dd6; }
.bloom-normal-site :is(h1,h2,h3) { font-weight:800; }
.bloom-normal-site .bloom-public-main > section { padding-block:clamp(20px,3vw,36px); }
.bloom-normal-site .bloom-public-main > section:first-child > [class*="max-w-"] { padding-block:18px; }
.bloom-normal-site .bloom-public-main :is(.py-16,.py-20,.py-24) { padding-block:clamp(20px,3vw,36px); }
.bloom-normal-site .bloom-public-main :is(.mt-16,.mt-20,.mt-24) { margin-top:28px; }
.bloom-normal-site :is(.shop-card,.bloom-category-card) { position:relative;display:flex;flex-direction:column;min-width:0;gap:10px;border:1px solid #e8def1;border-radius:20px;background:linear-gradient(145deg,#fff,#fbf6ff 75%,#edf5ff);box-shadow:0 8px 24px #60349b0d;overflow:hidden; }
.bloom-normal-site :is(.shop-card,.bloom-category-card)::before { content:"";height:3px;position:absolute;inset:0 16px auto;border-radius:0 0 999px 999px;background:linear-gradient(90deg,#8748bc,#ed9acb,#8fbbf2); }
.library-home #bloomCategoryGrid > :is(a,button) { overflow:hidden; }
.library-home #bloomCategoryGrid :is(.bloom-category-count,.bloom-category-examples) { display:none; }
.library-home #bloomCategoryGrid h3 { font-weight:800; }
.library-home #bloomCategoryGrid > a > p { display:block; }
@media(max-width:767px) { .library-home #bloomCategoryGrid > a > p { display:none; } }
.bloom-normal-site :is(.shop-card,.bloom-category-card) :is(h3,h4) { font-weight:800;line-height:1.3; }
.bloom-normal-site .bloom-category-count { margin-top:auto;font-size:.8rem;font-weight:800;color:#60349b; }
.bloom-normal-site .bloom-category-note { font-size:.75rem;color:#65566f; }
.bloom-normal-site .bloom-category-examples { font-size:.8rem;line-height:1.5;color:#65566f; }
/* Public catalogue previews are informational; paid Library tiles keep their navigation. */
.bloom-normal-site .bloom-public-category-grid { display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:stretch; }
.bloom-normal-site .bloom-category-card { box-sizing:border-box;height:auto;min-height:0;width:100%;max-width:100%;padding:18px;gap:8px;align-items:center;text-align:center;overflow:visible;cursor:default;transform:none; }
.bloom-normal-site .bloom-category-symbol { display:flex;align-items:center;justify-content:center;flex:none;min-height:44px;font-size:32px;line-height:1; }
.bloom-normal-site .bloom-category-card h3 { display:block;width:100%;margin:0;min-height:0;white-space:normal;overflow:visible;overflow-wrap:anywhere;word-break:normal;font-size:18px;line-height:1.35;color:#3f2461; }
.bloom-normal-site .bloom-category-card .bloom-category-count { margin:0;font-size:13px;line-height:1.5; }
.bloom-normal-site .bloom-category-card .bloom-category-examples { display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;margin:0;font-size:13px;line-height:1.5;max-width:100%; }
@media(min-width:640px) {
 .bloom-normal-site .bloom-public-category-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
 .bloom-normal-site .bloom-public-category-grid > .bloom-category-card { grid-column:span 2; }
 .bloom-normal-site .bloom-public-category-grid > .bloom-category-card:last-child:nth-child(odd) { grid-column:2 / span 2; }
}
@media(min-width:1024px) {
 .bloom-normal-site .bloom-public-category-grid { grid-template-columns:repeat(6,minmax(0,1fr)); }
 .bloom-normal-site .bloom-public-category-grid > .bloom-category-card:last-child { grid-column:span 2; }
 .bloom-normal-site .bloom-public-category-grid > .bloom-category-card:last-child:nth-child(3n + 1) { grid-column:3 / span 2; }
}
@media print {
 .bloom-normal-site .bloom-category-card { break-inside:avoid;page-break-inside:avoid;box-shadow:none; }
 .bloom-normal-site .bloom-public-category-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
 .bloom-normal-site .bloom-public-category-grid > .bloom-category-card { grid-column:auto !important;break-inside:avoid;page-break-inside:avoid;box-shadow:none; }
 .bloom-normal-site .bloom-category-card h3 { break-after:avoid;overflow:visible; }
 .bloom-normal-site .bloom-category-card .bloom-category-examples { display:block;overflow:visible; }
}
.resource-index-page .resource-index-root .catalogue-page-hero { padding:16px;border:1px solid #e8def1;border-radius:20px;background:linear-gradient(120deg,#fff,#fbf6ff,#f0f6ff);box-shadow:0 8px 24px #60349b0d;min-height:0; }
.resource-index-page .resource-index-root .catalogue-page-hero h1 { font-size:clamp(24px,3vw,30px);font-weight:800;line-height:1.15; }
.resource-index-page .resource-index-root .catalogue-page-hero > [aria-hidden="true"] { display:none; }
.resource-index-page .catalogue-page-hero > :first-child { align-items:flex-start;min-height:68px; }
.resource-index-page .catalogue-page-hero .catalogue-controls { margin-top:12px; }
.resource-index-page .resource-index-grid { gap:12px;align-items:stretch; }
.resource-index-page .resource-index-grid > :is(article,a) { border:1px solid #e8def1;border-radius:18px;box-shadow:0 6px 18px #60349b0c; }
.resource-index-page .resource-index-grid h3 { font-weight:800;line-height:1.3; }
.resource-index-page .resource-index-grid > * [class~="aspect-[4/3]"] { aspect-ratio:4/3; }
.resource-index-page .resource-index-grid > * [class~="aspect-[4/3]"] img { width:100%;height:100%;object-fit:contain; }
.resource-index-page .resource-index-root .catalogue-page-hero > .bloom-search-only { width:100%;margin-right:0; }
.resource-index-page .catalogue-controls:has(#storybooksSearch) { grid-template-columns:minmax(0,1fr); }
.resource-index-page #storybooksSearch { width:100%;margin-right:0; }
.resource-index-page :is(#gamesContent,.resource-index-root) .catalogue-page-hero { box-sizing:border-box;background:linear-gradient(120deg,#fff,#fbf6ff,#f0f6ff);padding:16px;min-height:236px; }
.resource-index-page .resource-index-root #storybooksHero { min-height:0; }
.resource-index-page .resource-index-root #worksheetsHero { min-height:0; padding-block:12px; }
.resource-index-page .resource-index-root #worksheetsHero > :first-child { min-height:0; }
.resource-index-page .resource-index-root #worksheetsHero .catalogue-controls { margin-top:8px; }
.worksheet-page-controls { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:6px; width:100%; }
.worksheet-page-button { min-width:44px; min-height:44px; padding:6px 10px; border:1px solid #ddd1ef; border-radius:12px; background:#fff; color:#60349b; font:600 13px/1.2 Poppins,sans-serif; cursor:pointer; }
.worksheet-page-button:hover:not(:disabled),.worksheet-page-button[aria-current="page"] { background:#60349b; color:#fff; }
.worksheet-page-button:focus-visible { outline:3px solid #60a5fa; outline-offset:2px; }
.worksheet-page-button:disabled { opacity:.48; cursor:not-allowed; }
.worksheet-page-status { width:100%; text-align:center; color:#6f6680; font-size:13px; }
.resource-index-page .bloom-category-header { display:flex;align-items:flex-start;gap:10px;min-height:96px; }
.resource-index-page .bloom-category-icon { width:40px;height:40px;object-fit:contain;flex:none;margin-top:2px; }
.resource-index-page .bloom-category-copy { min-width:0;flex:1; }
.resource-index-page :is(#gamesContent,.resource-index-root) .bloom-category-copy h1 { margin:0;font-size:clamp(22px,2.5vw,28px);font-weight:800;line-height:1.15; }
.resource-index-page :is(#gamesContent,.resource-index-root) .bloom-category-copy p { margin:6px 0 0;font-size:14px;line-height:1.35; }
.resource-index-page .bloom-category-badge { display:flex;flex-direction:column;align-items:center;min-width:48px;padding:6px;border:1px solid #e8def1;border-radius:12px;background:#fff; }
.resource-index-page .bloom-category-badge strong { font-size:24px;line-height:1;font-weight:800;color:#60349b; }
.resource-index-page .bloom-category-badge span { margin-top:4px;font-size:11px;font-weight:700; }
.resource-index-page :is(#gamesContent,.resource-index-root) .bloom-category-controls { margin:12px 0 0; }
.resource-index-page .bloom-category-controls.catalogue-controls,.resource-index-page .bloom-category-controls > .catalogue-controls { display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-bottom:0; }
.resource-index-page .bloom-category-controls .catalogue-page-search { box-sizing:border-box;height:44px;min-height:44px; }
.resource-index-page .bloom-category-controls .catalogue-page-search input { height:42px;padding-top:10px;padding-bottom:10px; }
.resource-index-page .bloom-category-controls .catalogue-page-filter-toggle { box-sizing:border-box;height:44px;min-height:44px; }
.bloom-inline-loader.bloom-loader-stalled { animation:none; }
.resource-index-page .bloom-phonics-preview { display:flex;align-items:center;justify-content:center;min-height:44px;margin-top:8px;padding:8px;border:1px solid #e8def1;border-radius:12px;background:#f2eafb;color:#60349b;font-size:12px;font-weight:800;text-align:center; }
.bloom-loader-surface { text-align:center; }
.bloom-loader-surface > :not([data-bloom-loading-presentation]):not(.bloom-loader-help) { display:none; }
.bloom-loader-surface > [data-bloom-loading-presentation] { position:relative;z-index:1;margin:auto; }
#loadingScreen.bloom-loader-surface { flex-direction:column;align-items:center;justify-content:center;gap:12px; }
#loadingScreen.bloom-loader-surface > [data-bloom-loading-presentation] { margin:0; }
.bloom-loader-surface > .bloom-loader-help { position:relative;z-index:1; }
.bloom-loader-mark { display:inline-grid;place-items:center;width:48px;height:48px;margin:0 auto 12px;border:3px solid #e8def1;border-top-color:#8748bc;border-right-color:#e791c3;border-radius:50%;animation:bloom-loading 1s linear infinite; }
.bloom-loader-label { margin:8px 0;color:#60349b;font:800 1rem/1.5 Nunito,system-ui,sans-serif; }
.bloom-loader-help { margin:10px auto;max-width:32ch;color:#65566f;font-size:.9rem; }
.bloom-loader-retry { display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 18px;border:1px solid #60349b;border-radius:12px;background:#60349b;color:#fff;font-weight:800;cursor:pointer; }
.bloom-loader-stalled .bloom-loader-mark { animation:none;border-color:#e8def1;border-top-color:#d459a8; }
.bloom-loader-mark:has(img) { width:64px;height:64px;border:0;border-radius:16px;animation:none; }
.bloom-loader-mark img { display:block;width:100%;height:100%;object-fit:contain; }
.bloom-inline-loader:not(.hidden):not([hidden]) { display:inline-block;width:18px;height:18px;font-size:0;vertical-align:middle;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:bloom-loading 1s linear infinite; }
.bloom-loader-retry:focus-visible { outline:3px solid #528dd6;outline-offset:3px; }
@keyframes bloom-loading { to { transform:rotate(360deg); } }
@media(min-width:768px) {
 .resource-index-page :is(#gamesContent,.resource-index-root) .catalogue-page-hero { padding:20px;min-height:180px; }
 .resource-index-page .bloom-category-header { min-height:72px; }
 .resource-index-page .bloom-category-controls.catalogue-controls,.resource-index-page .bloom-category-controls > .catalogue-controls { grid-template-columns:minmax(0,1fr) minmax(180px,230px); }
 .resource-index-page .bloom-category-controls:has(#storybooksSearch) { grid-template-columns:minmax(0,1fr); }
}
@media(prefers-reduced-motion:reduce) { .bloom-loader-mark,.bloom-inline-loader:not(.hidden) { animation:none; } }

/* Worksheet and Colouring catalogue responsive corrections. */
/* Keep all library catalogues on the approved four-column page grid. */
body[data-tailwind-catalogue]:not([data-tailwind-catalogue="worksheets"]) .resource-index-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
}
body[data-tailwind-catalogue]:not([data-tailwind-catalogue="worksheets"]) .catalogue-page-pagination button {
  min-width:44px;min-height:44px;
}
body[data-tailwind-catalogue="storybooks"] #storyResourcePagination > div { flex-wrap:wrap;width:100%; }
@media (min-width:768px) {
  body[data-tailwind-catalogue]:not([data-tailwind-catalogue="worksheets"]) .resource-index-grid {
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
}
#colouringContent .catalogue-page-hero.colouring-hero { min-height:0;padding:12px 14px; }
#colouringContent #colouringGrid { grid-template-columns:repeat(2,minmax(0,1fr)); }
#colouringContent #colouringGrid { align-items:stretch; }
#colouringContent .colouring-card { display:flex;min-width:0;flex-direction:column;height:100%;overflow:visible; }
#colouringContent .colouring-card .resource-index-card-body { display:flex;min-width:0;flex:1;flex-direction:column;padding-bottom:10px; }
#colouringContent .colouring-card-action { display:flex;align-self:stretch;margin-top:auto;padding-top:12px; }
#colouringContent .colouring-card-action > :is(a,button),
#colouringContent .colouring-card [data-category-card-action] { box-sizing:border-box;display:flex;align-items:center;justify-content:center;min-height:52px;width:100%;padding:8px 10px;white-space:normal;overflow-wrap:anywhere;text-align:center;line-height:1.25; }
@media (min-width:768px) {
  #colouringContent #colouringGrid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (min-width:1024px) {
  #colouringContent #colouringGrid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:767px) {
  #colouringContent .catalogue-page-hero.colouring-hero { padding:10px 12px; }
  #colouringContent .colouring-hero .catalogue-controls { margin-top:8px; }
}
/* Shared Library role links are injected after authorization. Catalogue pages
   intentionally do not load style.css, so the loaded shared sheet owns sizing. */
#libraryMoreMenu .library-role-link{box-sizing:border-box;display:flex;min-width:0;min-height:44px;align-items:center;gap:12px;padding:8px 12px;border-radius:12px;color:#49336b;font-size:14px;font-weight:800;text-decoration:none}
#libraryMoreMenu .library-role-icon{box-sizing:border-box;display:grid;width:22px;height:22px;max-width:22px;max-height:22px;flex:0 0 22px;place-items:center;border-radius:6px;background:#f2eafb;color:#60349b}
#libraryMoreMenu .library-role-icon>svg{display:block;width:20px;height:20px;max-width:20px;max-height:20px;flex:0 0 20px}
#libraryMoreMenu .library-role-label{min-width:0;overflow-wrap:anywhere}
#libraryMoreMenu .library-role-link:focus-visible{outline:3px solid #60349b;outline-offset:3px}
#libraryMobileMenu .library-role-link{display:flex;min-height:56px;align-items:center;gap:12px;padding:10px 12px;border:1px solid #e4d8ef;border-radius:12px;background:#fff;color:#49336b;text-decoration:none}
#libraryMobileMenu .library-role-icon{display:grid;width:40px;height:40px;max-width:40px;max-height:40px;flex:0 0 40px;place-items:center;border-radius:12px;background:#eef4ff;color:#245cb0}
#libraryMobileMenu .library-role-icon>svg{display:block;width:22px;height:22px;max-width:22px;max-height:22px;flex:0 0 22px}
#libraryMobileMenu .library-role-label{min-width:0;font-weight:700}
#libraryMobileMenu .library-role-link:focus-visible{outline:3px solid #60349b;outline-offset:3px}

/* The worksheet toggle is the shared interactive-runner language reference. */
body[data-tailwind-catalogue='worksheets'] .resource-index-root .resource-index-language button { font-family:Poppins,system-ui,sans-serif; font-size:14px; font-weight:700; }
