.theme-button{font-size:12px;gap:8px}
.theme-swatch{display:inline-block;width:16px;height:16px;border-radius:50%;background:conic-gradient(#d5e88a 0 33%,#e4d5b6 33% 66%,#557bad 66%);border:1px solid #ffffff70;flex-shrink:0}
.mascot-scene{position:absolute;inset:0;display:flex;align-items:flex-end;justify-content:center;padding:74px 70px 51px;isolation:isolate}
.mascot-scene img{display:block;max-width:100%;max-height:100%;width:auto;height:100%;object-fit:contain;filter:drop-shadow(0 12px 25px var(--shadow));mask-image:linear-gradient(#000 95%,transparent);user-select:none;pointer-events:none}
#theme-dialog{color:var(--text);background:var(--surface,#201a14);border:1px solid var(--line-strong,#8f714a);border-radius:18px;padding:26px;max-width:900px;width:calc(100% - 36px);max-height:90dvh;box-shadow:0 30px 100px #0006}
#theme-dialog::backdrop{background:#0008;backdrop-filter:blur(5px)}
#theme-dialog .modal-heading{margin-bottom:13px}
#theme-dialog .eyebrow{color:var(--muted,#b7a792);margin-bottom:5px}
#theme-dialog-description{font-size:14px;color:var(--secondary,#ccbba4);line-height:1.6;margin-bottom:23px;max-width:640px}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.theme-card{padding:0;background:var(--card,#2b231a);color:var(--text);text-align:left;border:1px solid var(--line,#665139);border-radius:12px;overflow:hidden;min-width:0}
.theme-card:hover{border-color:var(--coral);transform:translateY(-2px)}
.theme-card[aria-pressed="true"]{border-color:var(--coral);box-shadow:0 0 0 1px var(--coral)}
.theme-preview{display:flex;flex-direction:column;gap:6px;padding:12px;height:205px;--preview-bg:#edf1f6;--preview-screen:#e0e8f2;--preview-accent:#365e99;--preview-line:#b6c5d8;background:var(--preview-bg)}
.preview-quiet{--preview-bg:#efe9dc;--preview-screen:#e5e7d7;--preview-accent:#5c7355;--preview-line:#bfc6aa}
.preview-spark{--preview-bg:#211828;--preview-screen:#493052;--preview-accent:#d5e88a;--preview-line:#735e80}
.preview-header{display:flex;gap:4px;height:5px;align-items:center;flex-shrink:0}
.preview-header i{width:5px;height:5px;border-radius:50%;background:var(--preview-accent);opacity:.75}
.preview-header i:last-child{width:40px;margin-left:auto;border-radius:2px;opacity:.35}
.preview-stage{display:flex;justify-content:center;align-items:flex-end;overflow:hidden;min-height:0;flex:1;border-radius:7px;background:var(--preview-screen);border:1px solid var(--preview-line)}
.preview-stage img{height:100%;max-width:100%;object-fit:contain;padding:7px 12px 0;mask-image:linear-gradient(#000 95%,transparent)}
.preview-chat{padding:6px 8px;border:1px solid var(--preview-line);border-radius:5px;display:flex;gap:4px;flex-direction:column;height:25px;flex-shrink:0}
.preview-chat i{height:2px;width:70%;background:var(--preview-accent);opacity:.5}
.preview-chat i:last-child{width:45%;opacity:.3}
.theme-card-copy{display:block;padding:14px 15px 17px}
.theme-card-copy strong{display:flex;align-items:center;justify-content:space-between;font-size:18px;font-weight:500}
.theme-animal{display:block;font-size:12px;color:var(--secondary,#c4af93);margin-top:2px}
.theme-card-copy small{display:block;color:var(--muted,#b7a58b);font-size:11px;line-height:1.5;margin-top:10px}
.theme-check{font-size:15px;color:var(--coral);visibility:hidden}
.theme-card[aria-pressed="true"] .theme-check{visibility:visible}
.theme-dialog-footer{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:23px;padding-top:17px;border-top:1px solid var(--line,#665139);color:var(--muted,#b7a58b);font-size:11px}
.theme-dialog-footer .quiet-button{font-size:12px;color:var(--secondary,#dfc9a9);text-align:right}

body:not([data-theme="classic"]){background:var(--bg);color:var(--text)}
body:not([data-theme="classic"]) #app{background:var(--bg)}
body:not([data-theme="classic"]) .app-header{border-color:var(--line)}
/* The original EdJoy logo keeps its coral brand colour in every theme. */
.brand-mark{background:#ff8065}
body:not([data-theme="classic"]) .prototype-label,body:not([data-theme="classic"]) .demo-tag{color:var(--muted);border-color:var(--line-strong)}
body:not([data-theme="classic"]) :is(.top-button,.screen-select){color:var(--text);background:var(--surface);border-color:var(--line-strong);box-shadow:0 2px 6px var(--shadow)}
body:not([data-theme="classic"]) :is(.top-button,.screen-select):hover{background:var(--card);border-color:var(--coral)}
body:not([data-theme="classic"]) :is(.icon-button,.quiet-button){color:var(--secondary)}
body:not([data-theme="classic"]) .icon-button:hover{background:var(--ghost);color:var(--coral)}
body:not([data-theme="classic"]) .cinema-screen{background:var(--screen);border-color:var(--line-strong);box-shadow:0 6px 35px var(--shadow)}
body:not([data-theme="classic"]) .screen-content.hero-content{background:var(--stage-gradient)}
body:not([data-theme="classic"]) .cinema-screen:has(.screen-content:not(.hero-content)) .screen-heading{background:linear-gradient(var(--screen) 70%,transparent)}
body:not([data-theme="classic"]) :is(.eyebrow,.screen-heading .eyebrow){color:var(--muted)}
body:not([data-theme="classic"]) .screen-tools{background:var(--surface)}
body:not([data-theme="classic"]) #reader-tools{border-color:var(--line)}
body:not([data-theme="classic"]) .screen-tools .icon-button[aria-pressed="true"]{background:var(--selected);color:var(--coral)}
body:not([data-theme="classic"]) .resize-handle span{background:var(--line-strong)}
body:not([data-theme="classic"]) .dialogue{background:var(--panel);border-color:var(--line-strong);box-shadow:0 4px 20px var(--shadow)}
body:not([data-theme="classic"]) .message.student{color:var(--text);border-color:var(--line-strong);background:var(--chat)}
body:not([data-theme="classic"]) :is(.message.system,.message.pending){color:var(--muted)}
body:not([data-theme="classic"]) .message-form{background:var(--screen);border-color:var(--line-strong);box-shadow:none}
body:not([data-theme="classic"]) .message-form:focus-within{border-color:var(--coral)}
body:not([data-theme="classic"]) .message-form>.icon-button{color:var(--secondary)}
body:not([data-theme="classic"]) .message-form textarea{border-color:var(--line);color:var(--text)}
body:not([data-theme="classic"]) .message-form textarea::placeholder{color:var(--muted)}
body:not([data-theme="classic"]) .send-button{background:var(--coral);color:var(--accent-ink);box-shadow:none}
body:not([data-theme="classic"]) .screen-menu{background:var(--surface);border-color:var(--line-strong);box-shadow:0 12px 40px var(--shadow)}
body:not([data-theme="classic"]) .screen-menu>button{color:var(--text)}
body:not([data-theme="classic"]) .screen-menu>button:is(:hover,.active){background:var(--selected)}
body:not([data-theme="classic"]) :is(.screen-menu>button>svg,.drawer-link svg){color:var(--coral)}
body:not([data-theme="classic"]) :is(.screen-menu small,.drawer-link small){color:var(--muted)}
body:not([data-theme="classic"]) #drawer-shade{background:var(--shade)}
body:not([data-theme="classic"]) .drawer{background:var(--surface);border-color:var(--line-strong);box-shadow:0 0 40px var(--shadow)}
body:not([data-theme="classic"]) .drawer-tabs{border-color:var(--line)}
body:not([data-theme="classic"]) .drawer-tabs button{color:var(--secondary)}
body:not([data-theme="classic"]) .drawer-tabs button[aria-selected="true"]{color:var(--coral)}
body:not([data-theme="classic"]) :is(.drawer-link,.course-card){color:var(--text);border-color:var(--line)}
body:not([data-theme="classic"]) :is(.drawer-section-label,.course-summary,.lesson-preview p){color:var(--secondary)}
body:not([data-theme="classic"]) .course-summary strong{color:var(--text)}
body:not([data-theme="classic"]) :is(.drawer-action,.primary-button){background:var(--selected);border-color:var(--line-strong);color:var(--text)}
body:not([data-theme="classic"]) :is(.drawer-action,.primary-button):hover{background:var(--card);border-color:var(--coral)}
body:not([data-theme="classic"]) .back-link{color:var(--coral)}
body:not([data-theme="classic"]) .lesson-preview .lock-circle{color:var(--muted);border-color:var(--line)}
body:not([data-theme="classic"]) .reading{color:var(--text)}
body:not([data-theme="classic"]) .reading :is(.intro,.document-origin,.page-label){color:var(--secondary)}
body:not([data-theme="classic"]) .reading :is(h3,strong){color:var(--text)}
body:not([data-theme="classic"]) .reading :is(hr,.text-page){border-color:var(--line)}
body:not([data-theme="classic"]) .notes-editor{background:var(--surface);color:var(--text);border-color:var(--line-strong)}
body:not([data-theme="classic"]) .notes-meta{color:var(--muted)}
body:not([data-theme="classic"]) .material-tile{background:var(--card);color:var(--text);border-color:var(--line)}
body:not([data-theme="classic"]) .material-tile:hover{background:var(--selected);border-color:var(--coral)}
body:not([data-theme="classic"]) .material-tile>svg{color:var(--coral)}
body:not([data-theme="classic"]) .material-tile small{color:var(--secondary)}
body[data-theme="clarity"] .scanned-page,body[data-theme="quiet"] .scanned-page{filter:none}
body[data-theme="clarity"].light-paper .scanned-page,body[data-theme="quiet"].light-paper .scanned-page{filter:invert(.92) hue-rotate(180deg)}
body:not([data-theme="classic"]) :is(.visual-intro,.map-detail p,.chart-caption,.map-legend){color:var(--secondary)}
body:not([data-theme="classic"]) :is(.map-detail h2,.outcome-detail h2){color:var(--text)}
body:not([data-theme="classic"]) .visual-eyebrow{color:var(--muted)}
body:not([data-theme="classic"]) .map-region path{fill:var(--card);stroke:var(--line-strong)}
body:not([data-theme="classic"]) .map-region.current path{fill:var(--selected);stroke:var(--coral)}
body:not([data-theme="classic"]) .map-region.selected path,body:not([data-theme="classic"]) .map-region:hover path,body:not([data-theme="classic"]) .map-region:focus-visible path{fill:var(--selected);stroke:var(--coral)}
body:not([data-theme="classic"]) .map-region text{fill:var(--text)}
body:not([data-theme="classic"]) .map-region :is(.map-number,.map-here){fill:var(--secondary)}
body:not([data-theme="classic"]) .map-position{fill:var(--coral)}
body:not([data-theme="classic"]) .map-legend i{background:var(--selected);border-color:var(--coral)}
body:not([data-theme="classic"]) .map-legend i.muted{background:var(--card);border-color:var(--line-strong)}
body:not([data-theme="classic"]) :is(.radar-grid,.radar-axis){stroke:var(--line-strong)}
body:not([data-theme="classic"]) .radar-grid{fill:none}
body:not([data-theme="classic"]) .radar-axis.selected{stroke:var(--coral)}
body:not([data-theme="classic"]) :is(.radar-scale,.radar-zero){fill:var(--secondary)}
body:not([data-theme="classic"]) .radar-value{stroke:var(--coral);fill:var(--selected)}
body:not([data-theme="classic"]) .radar-origin{fill:var(--coral)}
body:not([data-theme="classic"]) .radar-choice circle{fill:var(--surface);stroke:var(--line-strong)}
body:not([data-theme="classic"]) .radar-choice text{fill:var(--text)}
body:not([data-theme="classic"]) .radar-choice:is(.selected,:hover,:focus-visible) circle{fill:var(--selected);stroke:var(--coral)}
body:not([data-theme="classic"]) .outcome-choices button{background:var(--card);color:var(--text);border-color:var(--line)}
body:not([data-theme="classic"]) .outcome-choices button[aria-pressed="true"]{background:var(--selected);color:var(--text);border-color:var(--coral)}
body:not([data-theme="classic"]) .outcome-choices button :is(span,small){color:var(--secondary)}
body:not([data-theme="classic"]) .outcome-detail{border-color:var(--line)}
body:not([data-theme="classic"]) .outcome-detail p{color:var(--secondary)}
body:not([data-theme="classic"]) .progress-track{background:var(--line)}
body:not([data-theme="classic"]) :is(.attachment-chip,#toast){background:var(--card);color:var(--text);border-color:var(--line-strong)}
body:not([data-theme="classic"]) .attachment-chip button{color:var(--secondary)}
body:not([data-theme="classic"]) #modal{background:var(--surface);border-color:var(--line-strong);color:var(--text)}
body:not([data-theme="classic"]) #modal-body :is(p,ul){color:var(--secondary)}
body:not([data-theme="classic"]) .course-card>span:first-child{background:var(--selected);color:var(--coral)}
body:not([data-theme="classic"]) .course-card small{color:var(--secondary)}
body:not([data-theme="classic"]) :is(.messages,.screen-content,.drawer-body){scrollbar-color:var(--line-strong) transparent}
@media(max-width:1100px){.app-header{gap:12px}.theme-button{font-size:11px;padding-inline:9px}.course-heading{font-size:14px}.course-heading .prototype-label{display:none}.mascot-scene{padding:74px 50px 48px}}
@media(max-width:760px){.theme-button{margin-left:0;gap:5px}.theme-button .theme-swatch{width:12px;height:12px}.app-header{column-gap:8px}.brand-mark{width:77px}.theme-options{gap:9px}.theme-preview{height:150px;padding:8px}.theme-card-copy{padding:10px}.theme-card-copy strong{font-size:15px}.theme-card-copy small{font-size:10px}.theme-dialog-footer{align-items:flex-start;flex-direction:column;gap:12px}.theme-dialog-footer .quiet-button{text-align:left}.mascot-scene{padding:72px 20px 47px}}
@media(max-width:520px){#theme-dialog{padding:18px}.theme-options{grid-template-columns:1fr}.theme-card{display:grid;grid-template-columns:110px 1fr}.theme-preview{height:125px}.theme-card-copy{padding:13px}.theme-card-copy small{font-size:11px}.theme-dialog-footer{margin-top:16px}.theme-button #theme-button-label{max-width:70px;overflow:hidden;text-overflow:ellipsis}}
@media(prefers-reduced-motion:reduce){.theme-card:hover{transform:none}}
@media(max-width:520px){.theme-button #theme-button-label{display:none}.theme-button{width:31px;padding-inline:7px;justify-content:center}}

.drawer-description{font-size:13px;color:var(--secondary,#c9b496)}

/* Uploaded character artwork is displayed unchanged through a cropped viewport. */
.appearance-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line,#665139);margin-bottom:20px}
.appearance-tabs button{padding:0 0 10px;background:none;color:var(--secondary,#ccbba4);border-bottom:2px solid transparent;font-size:14px}
.appearance-tabs button[aria-selected="true"]{border-color:var(--coral);color:var(--coral)}
.mascot-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px}
.mascot-card{display:flex;flex-direction:column;padding:0;overflow:hidden;min-width:0;text-align:left;border:1px solid var(--line,#665139);border-radius:12px;background:var(--card,#2b231a);color:var(--text)}
.mascot-card:hover{border-color:var(--coral)}
.mascot-card[aria-pressed="true"]{border-color:var(--coral);box-shadow:0 0 0 1px var(--coral)}
.mascot-card[aria-pressed="true"] .theme-check{visibility:visible}
.mascot-card-portrait{height:168px;display:flex;align-items:center;justify-content:center;background:#fff;padding:7px;overflow:hidden}
.mascot-card-copy{display:block;padding:10px 13px 12px}
.mascot-card-copy strong{display:flex;align-items:center;justify-content:space-between;gap:7px;font-size:14px;font-weight:500}
.mascot-card-copy small{display:block;font-size:10px;line-height:1.4;color:var(--secondary,#c4af93);margin-top:3px}
.source-figure{display:block;position:relative;overflow:hidden;background:#fff;height:100%;width:auto;flex-shrink:0}
.source-figure>img,.mascot-scene .source-figure>img,.preview-stage .source-figure>img{position:absolute;display:block;max-width:none;max-height:none;height:auto;padding:0;object-fit:initial;filter:none;mask-image:none;transform:none;pointer-events:none}
.source-scene .source-figure{border-radius:16px;box-shadow:0 8px 30px var(--shadow,#0004)}
.mascot-card-portrait>.mascot-image{display:block;height:100%;width:auto;max-width:100%;object-fit:contain}
.source-scene>.source-full{border-radius:16px;mask-image:none;filter:none;box-shadow:0 8px 30px var(--shadow,#0004)}
.preview-stage>.source-full{height:100%;width:auto;padding:0;mask-image:none}
.preview-stage>.source-figure{height:100%;width:auto}
.original-thumb{display:block;position:relative;overflow:hidden;height:100%;width:auto;aspect-ratio:1.126;background:#100d09;flex-shrink:0}
.original-thumb>img,.preview-stage .original-thumb>img,.mascot-scene .original-thumb>img{position:absolute;display:block;height:183%;width:auto;max-height:none;max-width:none;top:-14.5%;left:50%;transform:translateX(-50%);padding:0;mask-image:none;filter:none;object-fit:initial}
.animal-options-details{margin-top:18px;color:var(--secondary,#c4af93);font-size:12px}
.animal-options-details summary{cursor:pointer;padding:7px 0}
.animal-options{margin-top:10px;grid-template-columns:repeat(4,minmax(0,1fr))}
.animal-options .mascot-card-portrait{height:135px}
#appearance-mascots .mascot-card-portrait>.mascot-image:not(.source-full){filter:none;mask-image:none}
@media(max-width:760px){.mascot-card-portrait{height:145px}.mascot-card-copy{padding:9px}.mascot-card-copy strong{font-size:12px}.mascot-card-copy small{font-size:10px}.mascot-options{gap:9px}.appearance-tabs{margin-bottom:14px}.animal-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:520px){.mascot-options{grid-template-columns:repeat(2,minmax(0,1fr))}.mascot-card-portrait{height:145px}.mascot-card-copy strong{font-size:13px}.mascot-card-copy small{font-size:10px}.appearance-tabs button{min-height:38px}.source-scene{padding-inline:20px}.mascot-scene>.original-thumb{max-width:100%}}

/* Transparent artwork shares the selected scene palette, in every view. */
.cinema-screen .screen-content.hero-content:has(.fantasy-scene){background:var(--stage-gradient,radial-gradient(ellipse at 50% 78%,#23140e 0%,#100c0a 48%,#090909 100%))}
.fantasy-scene{padding:70px 70px 52px}
.fantasy-scene:before{display:none}
.fantasy-scene>.fantasy-cutout{display:block;height:100%;max-height:100%;width:auto;max-width:100%;object-fit:contain;border:0;border-radius:0;background:transparent;box-shadow:none;mask-image:none;filter:drop-shadow(0 7px 14px var(--shadow,#0004))}
.mascot-card-portrait,.mascot-card-portrait:has(.fantasy-cutout){background:var(--screen,#100d09)}
#appearance-mascots .mascot-card-portrait>.fantasy-cutout{filter:drop-shadow(0 3px 7px var(--shadow,#0003));background:transparent}
.preview-stage:has(.fantasy-cutout){background:var(--preview-screen);border-color:var(--preview-line)}
.preview-stage>.fantasy-cutout{mask-image:none;filter:drop-shadow(0 2px 4px #0002);padding:7px 12px 0}
@media(max-width:760px){.fantasy-scene{padding:70px 22px 48px}}
