body.home-collection-open { overflow: hidden; }
.home-collection { width: min(1080px, calc(100% - 32px)); height: min(850px, calc(100dvh - 40px)); max-width: none; max-height: none; padding: 28px; border: 1px solid rgba(194,211,255,.3); border-radius: 8px; color: var(--ink, #f8f8ff); background: #101525; box-shadow: 0 24px 80px #0009; overflow: auto; overscroll-behavior: contain; }
.home-collection::backdrop { background: #050812cc; }
.home-collection [hidden] { display: none !important; }
.home-collection button, .home-collection input, .home-collection select { font: inherit; }
.home-collection button, .home-collection a, .home-collection input, .home-collection select { touch-action: manipulation; }
.home-collection :focus-visible { outline: 3px solid #8dd8ff; outline-offset: 3px; }
.home-collection svg { width: 24px; height: 24px; fill: none; stroke: currentColor; flex-shrink: 0; }
.collection-header { position: sticky; top: -28px; z-index: 2; display: flex; gap: 20px; justify-content: space-between; align-items: flex-start; padding: 12px 0; background: #101525; }
.collection-header > div { min-width: 0; }
.collection-eyebrow { margin: 0 0 8px; color: #ffe080; font-size: .8rem; }
.collection-header h2 { margin: 0; font-size: 1.9rem; line-height: 1.2; letter-spacing: 0; overflow-wrap: anywhere; }
.collection-icon-button { flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid #b6c2df44; border-radius: 6px; color: #f8f8ff; background: transparent; cursor: pointer; font-size: 1.5rem !important; }
.collection-icon-button:disabled { opacity: .35; cursor: default; }
.collection-tabs { display: flex; gap: 16px; margin-top: 22px; border-bottom: 1px solid #b6c2df33; }
.collection-tab { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; min-height: 60px; padding: 10px 0; border: 0; border-bottom: 3px solid transparent; color: #b6c2df; background: transparent; text-align: left; cursor: pointer; line-height: 1.4 !important; }
.collection-tab span { overflow-wrap: anywhere; }
.collection-tab[aria-selected=true] { color: #ffe080; border-color: #ffe080; }
.collection-tab[data-kind=cards][aria-selected=true] { color: #7ee8c1; border-color: #7ee8c1; }
.collection-tab[data-kind=books][aria-selected=true] { color: #8dd8ff; border-color: #8dd8ff; }
.collection-toolbar { display: flex; align-items: end; gap: 16px; margin-top: 20px; }
.collection-toolbar label { display: grid; gap: 6px; min-width: 0; flex: 1; color: #b6c2df; font-size: .8rem; }
.collection-toolbar input, .collection-toolbar select { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #b6c2df55; border-radius: 6px; color: #f8f8ff; background: #090d1f; font-size: 1rem; }
.collection-status { color: #b6c2df; margin: 18px 0; font-size: .9rem; }
.collection-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 20px; }
.collection-item { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 1px solid #b6c2df33; border-radius: 8px; background: #ffffff04; color: #f8f8ff; overflow: hidden; text-align: left; cursor: pointer; }
.collection-item:hover { border-color: #8dd8ff; background: #ffffff09; }
.collection-art { display: grid; place-items: center; align-content: center; gap: 10px; width: 100%; aspect-ratio: 4 / 3; color: #b6c2df; background: linear-gradient(135deg, #ffffff05, #ffffff0b); overflow: hidden; }
.collection-art svg { width: 48px; height: 48px; }
.collection-art img { display: block; width: 100%; height: 100%; object-fit: contain; min-height: 0; }
.collection-item-copy { display: grid; gap: 7px; padding: 16px; overflow-wrap: anywhere; }
.collection-item-copy strong { font-family: var(--sq-font-body); font-size: 1.2rem; line-height: 1.35; }
.collection-item-quest { color: #8dd8ff; font-size: .85rem; overflow-wrap: anywhere; }
.collection-item-kind { color: #b6c2df; font-size: .8rem; }
.collection-empty { grid-column: 1 / -1; padding: 50px 12px; text-align: center; }
.collection-empty > svg { width: 56px; height: 56px; color: #ffe080; }
.collection-empty h3 { font-size: 1.3rem; margin: 18px 0; }
.collection-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 14px; border: 1px solid #8dd8ff66; border-radius: 6px; color: #f8f8ff; background: #8dd8ff0c; cursor: pointer; text-decoration: none; }
.collection-detail-controls { display: flex; align-items: center; gap: 8px; margin: 20px 0; }
.collection-counter { margin-left: auto; color: #b6c2df; white-space: nowrap; }
.collection-art.is-large { aspect-ratio: auto; min-height: 240px; height: min(64dvh, 650px); background: #080b12; }
.collection-art.is-large img { max-height: 100%; object-fit: contain; }
.collection-description { max-width: 70ch; line-height: 1.7; white-space: pre-line; }
.collection-quest-link { display: block; width: fit-content; padding: 12px 0; color: #8dd8ff; text-decoration: underline; overflow-wrap: anywhere; }
.collection-grid.is-books .collection-art { aspect-ratio: 3 / 1; color: #8dd8ff; }
.collection-chapters { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 0; border-bottom: 1px solid #b6c2df33; }
.collection-chapters button { max-width: 100%; text-align: left; overflow-wrap: anywhere; }
.collection-reader { max-width: 68ch; margin: 28px auto; padding: 0 16px; }
.collection-reader h3 { color: #ffe080; font-size: 1.5rem; line-height: 1.3; scroll-margin-top: 140px; overflow-wrap: anywhere; }
.collection-reader p { font: 1.13rem/1.85 var(--sq-font-body); white-space: pre-line; overflow-wrap: anywhere; }
@media (max-width: 600px) {
  .home-collection { width: calc(100% - 16px); height: calc(100dvh - 16px); padding: 18px 14px; }
  .collection-header { top: -18px; }
  .collection-header h2 { font-size: 1.5rem; }
  .collection-tabs { gap: 10px; }
  .collection-tab { flex-direction: column; align-items: flex-start; gap: 6px; font-size: .8rem !important; }
  .collection-toolbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .collection-item-copy { padding: 12px 10px; }
  .collection-item-copy strong { font-size: 1rem; }
  .collection-grid.is-books { grid-template-columns: 1fr; }
  .collection-grid.is-books .collection-item { flex-direction: row; align-items: center; }
  .collection-grid.is-books .collection-art { width: 80px; flex: 0 0 80px; aspect-ratio: auto; background: transparent; }
  .collection-grid.is-books .collection-art span { display: none; }
  .collection-reader { padding: 0; }
  .collection-counter { font-size: .8rem; }
  .collection-detail-controls .collection-action { padding: 8px; font-size: .85rem; }
}