/* The preview keeps its footprint while topics change. */
.topic-preview{gap:10px;transform:rotate(1deg)}
.preview-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.preview-top button{min-height:36px;padding:4px 8px;background:#fffdf9;color:#514582;border:1px solid #c6bde2;font-size:11px;border-radius:10px;white-space:nowrap}
.preview-picture{height:170px;display:flex;align-items:center;justify-content:center}
.preview-picture svg{height:100%;width:100%;overflow:visible;fill:#171a2b;font-family:inherit}
.topic-preview .preview-caption{margin:0;text-align:center;font-size:14px;line-height:1.4}
.topic-preview .art-try{display:flex;align-items:center;justify-content:center;min-height:44px;padding:8px 0;line-height:1.35;text-align:center}
.preview-topics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px}
.preview-topics button{min-height:36px;padding:4px;background:transparent;color:#514582;border:1px solid #c6bde2;border-radius:9px;font-size:10px;line-height:1.2}
.preview-topics button[aria-pressed=true]{background:#4557ea;color:white;border-color:#4557ea}
.fraction-return{display:block;margin-top:10px;color:#3546a8;font-size:12px;font-weight:700}
.rule summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-size:13px;font-weight:700;color:#3546a8}
/* Override both themes together: the old white panel inherited white text. */
aside.update-banner{background:#fffdf9;color:#171a2b;border:1px solid #b8bfee;width:min(420px,calc(100% - 32px));height:auto;max-height:calc(100dvh - 180px);overflow:auto;left:auto;right:16px;bottom:90px;padding:18px 20px;line-height:1.5}
aside.update-banner strong{display:block;color:#171a2b;font-size:16px;line-height:1.4}
aside.update-banner p{color:#505569;margin:8px 0 12px;font-size:13px;line-height:1.5}
aside.update-banner button{background:#4557ea;color:white;margin:0;min-height:44px;padding:9px 15px;border:0}
@media(min-width:1024px) and (min-height:650px){body.desktop-story-mode .heroart.topic-preview{height:350px;max-height:100%;padding:18px 20px;gap:7px}body.desktop-story-mode .preview-picture{height:155px;min-height:75px;flex:1}body.desktop-story-mode .topic-preview .preview-caption{margin:0}body.desktop-story-mode .topic-preview .art-try{flex-shrink:0}}
@media(max-width:767px){body.mobile-story-mode .heroart.topic-preview{gap:7px;padding:12px 14px}body.mobile-story-mode .preview-picture{height:125px}body.mobile-story-mode .topic-preview .preview-caption{margin:0}body.mobile-story-mode .topic-preview .art-try{font-size:12px;padding:7px 0}.preview-topics button{min-height:44px;font-size:10px}.preview-top .arttag{font-size:8px}.preview-top button{min-height:44px}}
@media(prefers-reduced-motion:reduce){.topic-preview{transform:none}}

/* A single new number mystery, within the existing topic discovery screen. */
.number-discovery{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:15px;border:1px solid #d7d1ec;border-radius:14px;padding:12px 18px;background:#f3efff;color:#3546a8;font-size:13px}.number-discovery small{display:block;font-size:9px;letter-spacing:.1em;color:#606477}.number-discovery strong{display:block;font-size:17px;color:#20243a;margin-top:3px}.number-discovery>span:last-child{white-space:nowrap}.number-discovery b{margin-left:12px}@media(max-width:767px){.number-discovery{padding:13px 14px;min-height:70px;font-size:12px}.number-discovery strong{font-size:16px}.number-discovery small{font-size:8px}}
@media(min-width:1024px) and (min-height:650px) and (max-height:800px){body.desktop-story-mode #hub-topics .hub-module h2{font-size:22px;line-height:1.2;margin:6px 0 8px}body.desktop-story-mode #hub-topics .hub-module p{font-size:13px;line-height:1.45;margin:5px 0 10px}body.desktop-story-mode #hub-topics .hub-module .pill{font-size:9px}}

@media(min-width:1024px) and (min-height:650px) and (max-height:800px){body.desktop-story-mode #hub-topics:has(.hub-module:nth-child(4)){grid-template-columns:repeat(4,minmax(0,1fr))}body.desktop-story-mode #hub-topics:has(.hub-module:nth-child(5)){grid-template-columns:repeat(5,minmax(0,1fr))}}

@media(min-width:1024px) and (min-height:650px){#topics .number-discovery{padding:8px 16px;margin-top:8px;min-height:48px}#topics .number-discovery strong{font-size:17px}#topics .number-discovery small{font-size:9px}}

.number-discoveries{display:grid;gap:8px;margin-top:12px}.number-discoveries .number-discovery{margin:0}@media(min-width:701px){.number-discoveries{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}}@media(min-width:1024px) and (min-height:650px){#topics .number-discoveries .number-discovery{margin-top:0}}
