/* Theme selection and six-picture galleries fit a TV; small screens scroll naturally. */
.collection-heading{text-align:center}.collection-heading p{margin:0 0 8px;color:var(--hint);font-size:clamp(1.1rem,1.6vw,1.8rem)}
.theme-row{max-width:1570px}.theme-card{padding:14px 14px 20px}.theme-card svg{height:min(43vh,440px)}
.theme-card small{display:block;font-size:clamp(.9rem,1.2vw,1.2rem);font-weight:550;color:var(--hint);line-height:1.4;padding:0 8px}
.theme-card .picture-count{display:inline-block;margin-top:14px;padding:5px 16px;border-radius:30px;background:var(--button-bg);border:1px solid var(--button-border);font-weight:750}
.theme-card.fairytales{border-bottom-color:#b065d9}.theme-card.vehicles{border-bottom-color:#f9a531}.theme-card.space{border-bottom-color:#4895ef}
#app.gallery{max-width:1700px;margin:0 auto;gap:18px}.gallery-heading{display:flex;align-items:center;gap:20px;flex:none}.gallery-heading>div{flex:1;text-align:center}.gallery-heading h1{margin:0;font-size:clamp(1.7rem,2.8vw,3rem)}.gallery-heading p{margin:5px 0 0;color:var(--hint);font-size:clamp(1rem,1.3vw,1.3rem)}.gallery-count{color:var(--hint);font-weight:750;font-size:1.1rem}
.picture-grid{width:100%;flex:1;min-height:0;grid-template-rows:repeat(2,minmax(0,1fr));gap:16px}.picture-grid .card{display:flex;flex-direction:column;min-height:0;padding:9px;border-width:3px;border-radius:20px;font-size:clamp(1rem,1.5vw,1.5rem)}.picture-grid .card svg{height:0;min-height:0;flex:1;width:100%;border-radius:12px}.picture-grid .card span{flex:none;padding:8px 3px 4px}
@media(min-width:901px){.picture-grid[data-count="3"]{grid-template-rows:1fr;align-content:center}.picture-grid[data-count="3"] .card{max-height:68vh;margin:auto 0;height:100%}}
@media(max-width:900px){#app.gallery{height:auto;min-height:calc(100dvh - 76px)}.picture-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:none;flex:none}.picture-grid .card svg{height:30vh;min-height:180px;flex:none}.gallery-count{display:none}.theme-card svg{height:32vh}.theme-card small{font-size:.9rem}.theme-card span{font-size:1.35rem}}
@media(max-width:650px){.themes{padding-top:28px!important;padding-bottom:28px!important}.collection-heading h1{font-size:2.2rem}.theme-row{grid-template-columns:1fr}.theme-card svg{height:35vh}.gallery-heading{flex-wrap:wrap;gap:12px}.gallery-heading>div{flex-basis:100%;order:2}.picture-grid{gap:12px}.picture-grid .card svg{height:24vh;min-height:140px}.picture-grid .card{font-size:1rem;padding:5px;border-radius:14px}}
@media(min-width:2600px){.theme-row{max-width:2900px;gap:44px}.theme-card svg{height:48vh;max-height:1000px}.theme-card span{font-size:3.5rem}.theme-card small{font-size:2rem}.theme-card .picture-count{margin-top:22px;padding:10px 25px}.collection-heading h1{font-size:6rem}.collection-heading p{font-size:2.5rem;margin-bottom:22px}#app.gallery{max-width:3000px;gap:26px}.gallery-heading h1{font-size:4rem}.gallery-heading p,.gallery-count{font-size:2rem}.picture-grid{gap:28px}.picture-grid .card{font-size:2.4rem;padding:16px;border-radius:30px}.picture-grid .card span{padding:14px 4px 8px}}

/* Keep the full 800×700 cover without white letterboxing in any viewport. */
.theme-row .theme-card svg{height:auto;max-height:none;aspect-ratio:8/7;background:transparent}
.theme-row{align-items:stretch}
.theme-card{display:flex;flex-direction:column;align-items:stretch;justify-content:center}
.theme-card .picture-count{align-self:center;margin-top:14px}
:root[data-theme="dark"] body{background:#0b2347 url('./aurora.svg') center/100% 100% fixed no-repeat}
:root[data-theme="dark"] .theme-card{border-width:3px;box-shadow:0 14px 30px #020f2d66,inset 0 0 28px #518cc51a,0 0 14px #4b89bb22}
:root[data-theme="dark"] .theme-card.fairytales{background:linear-gradient(145deg,#153c5fbd,#303361de)}
:root[data-theme="dark"] .theme-card.vehicles{background:linear-gradient(145deg,#0b3e53bd,#133b60de)}
:root[data-theme="dark"] .theme-card.space{background:linear-gradient(145deg,#29335dbd,#382d64de)}
@media(min-width:901px){.theme-row{width:min(1570px,100%,calc((100dvh - 310px)*3.2))}.theme-card{padding:clamp(12px,1.3vw,22px);padding-top:clamp(16px,2.5vh,32px)}.themes{gap:22px!important}}
@media(max-width:650px){.themes{justify-content:flex-start;padding-top:28px!important}.theme-row .theme-card svg{height:auto}.theme-card{padding:14px}.theme-row{gap:22px}:root[data-theme="dark"] body{background-size:100% 100vh}}
@media(min-width:2600px){.theme-row{width:min(2900px,100%,calc((100dvh - 480px)*3.2))}}

/* Seven collections: keep covers readable and let small/short screens scroll. */
#app.themes{height:auto;min-height:calc(100dvh - 76px);justify-content:flex-start;padding-top:24px;padding-bottom:28px}
.theme-row{width:min(1500px,100%);grid-template-columns:repeat(4,minmax(0,1fr));gap:18px}
.theme-row .theme-card{padding:12px;border-radius:20px;justify-content:flex-start}
.theme-row .theme-card span{font-size:clamp(1rem,1.5vw,1.5rem);padding:9px 0 3px}
.theme-row .theme-card small{font-size:clamp(.85rem,1vw,1rem)}
.theme-row .theme-card .picture-count{margin-top:auto;padding:4px 13px}
.theme-row .theme-card svg{height:clamp(125px,21vh,240px);aspect-ratio:auto;margin-bottom:4px;flex:none}
.theme-card.houses{border-bottom-color:#f6c5a5}.theme-card.ocean{border-bottom-color:#50cde4}.theme-card.performance{border-bottom-color:#ef78be}.theme-card.botanical{border-bottom-color:#90be6d}
:root[data-theme="dark"] .theme-card.houses{border-color:#c5a987}:root[data-theme="dark"] .theme-card.ocean{border-color:#50cde4}:root[data-theme="dark"] .theme-card.performance{border-color:#d995c6}:root[data-theme="dark"] .theme-card.botanical{border-color:#9bc98a}
.colors{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1100px){.theme-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.colors{grid-template-columns:repeat(9,minmax(0,1fr))}.theme-row{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-row .theme-card svg{height:auto;aspect-ratio:8/7}}
@media(max-width:520px){.theme-row{grid-template-columns:1fr;max-width:420px}.theme-row .theme-card{padding:14px}.theme-row .theme-card span{font-size:1.4rem}.theme-row .theme-card small{font-size:1rem}.theme-card .picture-count{margin-top:10px!important}}
@media(min-width:2600px){.theme-row{width:min(2900px,100%);gap:28px}.theme-row .theme-card{padding:20px}.theme-row .theme-card svg{height:24vh}.theme-row .theme-card span{font-size:2.8rem}.theme-row .theme-card small{font-size:1.8rem}}

/* Two bonus painting scenes: seven cards fit two rows on desktop. */
@media(min-width:901px){.picture-grid[data-count="7"]{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}}

/* Eight mandalas keep equal-size thumbnails in two desktop rows. */
@media(min-width:901px){.picture-grid[data-count="8"]{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}}
.theme-card.mandalas{border-bottom-color:#b065d9}
:root[data-theme="dark"] .theme-card.mandalas{border-color:#b995e8}

/* Equal side columns keep the title centered on the whole gallery. */
.gallery-heading{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,3fr) minmax(0,1fr)}
.gallery-heading>div{grid-column:2;min-width:0}
.gallery-heading>button{justify-self:start;max-width:100%}
@media(max-width:650px){.gallery-heading{grid-template-columns:minmax(0,1fr)}.gallery-heading>div{grid-column:1;grid-row:2}.gallery-heading>button{grid-column:1;grid-row:1}}

/* Nine city/theme covers form three balanced rows on desktop. */
@media(min-width:901px){.theme-row{grid-template-columns:repeat(3,minmax(0,1fr))}}
.theme-card.cities{border-bottom-color:#e8b85c}
:root[data-theme="dark"] .theme-card.cities{border-color:#e8c980}

/* Nine city views use equal-height rows on TV and desktop. */
@media(min-width:901px){.picture-grid[data-count="9"]{grid-template-columns:repeat(3,minmax(0,1fr));grid-template-rows:repeat(3,minmax(0,1fr))}}

/* Native portrait proportions and restrained outlines preserve the paintings. */
.theme-card.classics{border-bottom-color:#caa663}
:root[data-theme="dark"] .theme-card.classics{border-color:#dcc294}
.classic-trace .region:not(.background){stroke:#494038;stroke-width:1.15}
.classic-trace .master-detail{pointer-events:none;stroke:none}
@media(min-width:901px){.theme-row{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Artist credits must not squeeze a portrait title into a tall single-word column. */
.classics-editor .toolbar .title{flex:1 1 230px;min-width:180px;font-size:clamp(1rem,1.5vw,1.45rem)}
@media(min-width:2600px){.classics-editor .toolbar .title{flex-basis:420px;font-size:2.4rem}}
.classic-trace .outline.fine{stroke:#494038;stroke-width:1.15}

/* Portrait paint targets retain only their own pigment at the edge, never a dark contour. */
.tonal-portrait .region:not(.background){stroke:var(--portrait-edge,none);stroke-width:1.3}
