/* Topic collections share the site's peach, sky blue and rounded card styling. */
.topics-page { padding: 20px 0 64px; background: linear-gradient(155deg, #fff8f2, #f6fbff 60%, #fff7f5); color: #374151; }
.topics-wrap { width: min(1280px, 100%); margin: auto; padding: 0 24px; }
.topics-breadcrumb { margin: 0 0 24px; font-size: 13px; color: #6b7280; }
.topics-breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topics-breadcrumb i { color: #d1b5a8; font-size: 9px; }
.topics-breadcrumb a:hover { color: #b6423c; }
.topics-hero { position: relative; padding: 28px 24px 30px; text-align: center; }
.topics-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid #fadac2; border-radius: 24px; background: #fff; color: #b6423c; font-size: 12px; font-weight: 700; }
.topics-hero h1 { max-width: 960px; margin: 18px auto 14px; color: #493a35; font-size: clamp(27px, 3.5vw, 44px); font-weight: 900; line-height: 1.25; overflow-wrap: anywhere; text-wrap: balance; }
.topics-hero p { max-width: 740px; margin: 8px auto 0; color: #6b7280; font-size: 15px; line-height: 1.85; }
.topics-hero .topics-intro { color: #846256; font-size: 17px; }
.topics-friends { display: flex; justify-content: center; gap: 8px; margin-top: 24px; }
.topics-friends img { width: 56px; height: 56px; padding: 5px; background: white; border: 2px solid #fadac2; border-radius: 50%; box-shadow: 0 4px 12px #ea7c5c12; }
.topics-friends img:nth-child(2) { border-color: #bae6fd; transform: translateY(-5px); }
.topics-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 16px; }
.topic-card { overflow: hidden; border: 1px solid #f5d9ca; border-radius: 28px; background: #fff; box-shadow: 0 8px 28px #ea7c5c12; }
.topic-card:hover { transform: translateY(-4px); box-shadow: 0 14px 32px #ea7c5c22; }
.topic-card-link { display: block; height: 100%; }
.topic-collage { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 18px; background: linear-gradient(135deg, #fdeee1, #e0f2fe); }
.topic-collage-tile { aspect-ratio: 9 / 16; overflow: hidden; border: 3px solid white; border-radius: 14px; box-shadow: 0 6px 12px #58423612; }
.topic-collage-tile:nth-child(even) { transform: translateY(5px) rotate(2deg); }
.topic-collage-tile:nth-child(odd) { transform: rotate(-2deg); }
.topic-collage img { width: 100%; height: 100%; object-fit: cover; }
.topic-card-copy { padding: 24px; }
.topic-count { display: inline-flex; align-items: center; gap: 7px; color: #86695a; font-size: 12px; }
.topic-card h2 { margin-top: 10px; font-size: 23px; line-height: 1.35; font-weight: 800; color: #493a35; overflow-wrap: anywhere; }
.topic-card p { margin-top: 12px; color: #6b7280; font-size: 14px; line-height: 1.8; }
.topic-open { display: inline-flex; align-items: center; justify-content: center; gap: 12px; margin-top: 22px; padding: 12px 18px; border-radius: 16px; background: var(--kawaii-gradient-pink); color: white; font-size: 14px; font-weight: 700; box-shadow: var(--kawaii-shadow-soft); }
.topics-catalog-single { grid-template-columns: minmax(0, 1fr); max-width: 1050px; margin: 16px auto 0; }
.topics-catalog-single .topic-card-link { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; }
.topics-catalog-single .topic-collage { padding: 32px 22px; }
.topics-catalog-single .topic-card-copy { padding: 32px; }
.topics-formats { margin: 0 auto 28px; padding: 18px; border: 1px solid #f2e0d5; border-radius: 24px; background: #ffffffc9; }
.topics-formats > p { margin-bottom: 12px; text-align: center; font-size: 12px; color: #86695a; font-weight: 700; }
.topics-format-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.topics-format-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid #fadac2; border-radius: 16px; background: #fff8f2; color: #93373a; font-size: 13px; font-weight: 700; }
.topics-format-links a:hover { background: #fdeee1; transform: translateY(-2px); }
.topics-format-links a > span { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; height: 23px; padding: 0 5px; border-radius: 20px; background: white; color: #78695f; font-size: 11px; }
.topics-sections { display: grid; gap: 28px; }
.topic-section { min-width: 0; scroll-margin-top: 90px; padding: 24px; border: 1px solid #f3dfd3; border-radius: 28px; background: #fff; box-shadow: 0 6px 24px #ea7c5c0b; }
.topic-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topic-section-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topic-format-icon { display: flex; flex-shrink: 0; justify-content: center; align-items: center; width: 44px; height: 44px; border-radius: 15px; background: linear-gradient(135deg, #fdeee1, #f0f9ff); color: #db5a47; font-size: 18px; }
.topic-section-title h2 { color: #493a35; font-size: 21px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; }
.topic-section-title p { margin-top: 3px; color: #9b8174; font-size: 12px; }
.topic-load-actions { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 24px; text-align: center; }
.topic-load-actions [hidden] { display: none; }
.topic-load-actions p { color: #9b8174; font-size: 13px; line-height: 1.7; }
.topic-load-actions [data-topic-error] { color: #b6423c; }
.topic-load-actions .topic-open { margin-top: 0; }
.topic-load-actions button:disabled { cursor: wait; opacity: .6; }
.topic-resource-grid { display: grid; gap: 16px; }
.topic-mobile-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.topic-desktop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.topic-media-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.topic-resource-grid .wallpaper-item { min-width: 0; }
.topic-resource-grid .wallpaper-item:hover { transform: translateY(-4px); }
.topics-pagination { margin-top: 28px; overflow-x: auto; padding: 5px; text-align: center; }
.topic-live-badge { position: absolute; top: 10px; left: 10px; padding: 4px 8px; border-radius: 14px; background: #db5a47; color: white; font-size: 10px; font-weight: 700; pointer-events: none; }
.topics-empty { padding: 48px 24px; border: 1px dashed #fadac2; border-radius: 28px; background: white; text-align: center; }
.topics-empty > i { color: #f09f78; font-size: 32px; }
.topics-empty p { margin-top: 18px; line-height: 1.8; }
.topics-page a:focus-visible, .topics-page button:focus-visible { outline: 3px solid #38bdf8; outline-offset: 4px; }
.topic-resource-grid .wallpaper-image-container:focus-within .wallpaper-buttons { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%); }
@media (max-width: 1023px) {
    .topics-catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topics-catalog-single { grid-template-columns: minmax(0, 1fr); }
    .topic-mobile-grid, .topic-media-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .topic-desktop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
    .topics-page { padding-top: 16px; padding-bottom: 36px; }
    .topics-wrap { padding: 0 12px; }
    .topics-breadcrumb { margin-bottom: 12px; font-size: 11px; }
    .topics-breadcrumb ol { gap: 7px; }
    .topics-hero { padding: 20px 8px 26px; }
    .topics-hero p { font-size: 13px; }
    .topics-hero .topics-intro { font-size: 14px; }
    .topics-catalog { grid-template-columns: minmax(0, 1fr); }
    .topics-catalog-single .topic-card-link { display: block; }
    .topics-catalog-single .topic-collage { padding: 22px 18px; }
    .topics-catalog-single .topic-card-copy { padding: 24px; }
    .topic-card h2 { font-size: 23px; }
    .topics-formats { padding: 16px 10px; border-radius: 20px; }
    .topics-format-links { gap: 6px; }
    .topics-format-links a { font-size: 12px; padding: 9px 10px; }
    .topic-section { padding: 18px 10px; border-radius: 22px; }
    .topic-section-heading { gap: 12px; margin-bottom: 18px; }
    .topic-section-title { gap: 9px; }
    .topic-section-title h2 { font-size: 18px; }
    .topic-format-icon { width: 36px; height: 36px; border-radius: 12px; }
    .topic-mobile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topic-desktop-grid { grid-template-columns: minmax(0, 1fr); }
    .topic-media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .topic-resource-grid { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
    .topics-page *, .topics-page *::before, .topics-page *::after { transition: none !important; animation: none !important; }
}
