/* Semantic UI colours. Communication photos are never filtered. */
:root{color-scheme:light;--page:#fffaf1;--surface:#fff;--raised:#edf3ff;--ink:#182344;--muted:#56647b;--line:#b9c8df;--accent:#1d58a6;--accent-ink:#fff;--focus:#164a96;--danger:#b33b3f;--yes:#1d58a6;--no:#b33b3f;--stop:#86520b;--ok:#1d58a6;--header:#182344;--header-ink:#fff;--symbol-paper:#fff;--glow:none;--coral:#b33b3f;--amber:#ffcb70;--amber-paper:#fff0ce}
:root[data-theme=dark]{color-scheme:dark;--page:#101820;--surface:#1b2833;--raised:#253744;--ink:#eef6fa;--muted:#b7cbd4;--line:#536f7d;--accent:#8cddbd;--accent-ink:#102a22;--focus:#79cfff;--danger:#ffb0bc;--yes:#9ce3bd;--no:#ffb4bf;--stop:#d4bdff;--ok:#94d6ff;--header:#101b24;--header-ink:#edf6fa}
:root[data-theme=green]{color-scheme:dark;--page:#06130c;--surface:#0b2114;--raised:#12331f;--ink:#c3f8c8;--muted:#97d9a1;--line:#448e55;--accent:#a0efad;--accent-ink:#092311;--focus:#d0ffd5;--danger:#c3f8c8;--yes:#a0efad;--no:#a0efad;--stop:#a0efad;--ok:#a0efad;--header:#06130c;--header-ink:#c3f8c8;--symbol-paper:#07190d}
:root[data-theme=neon]{color-scheme:dark;--page:#0d0a1c;--surface:#19152d;--raised:#27203e;--ink:#f6f1ff;--muted:#c7bfdc;--line:#776899;--accent:#91f8e4;--accent-ink:#092b27;--focus:#ffe187;--danger:#ffb1cf;--yes:#9ef5b5;--no:#ff9fc7;--stop:#d1aaff;--ok:#86e8ff;--header:#100d23;--header-ink:#f6f1ff;--glow:0 0 14px #66ffe51b}

/* All themes use the same semantic colours, including the companion-inspired default. */
:root[data-theme] body{background:var(--page);color:var(--ink)}
:root[data-theme] a{color:var(--focus)}
:root[data-theme] .topbar{background:var(--header);color:var(--header-ink);border-bottom:1px solid var(--line)}
:root[data-theme] .brand{color:inherit}
:root[data-theme] .brand em{color:var(--accent)}
:root[data-theme] :is(.brand-note,.prototype-tag){color:var(--muted);border-color:var(--line)}
:root[data-theme] .brand-symbol{background:var(--accent);color:var(--accent-ink)}
:root[data-theme] :is(.message-tile,.output-card,.full-compose,.data-list,.settings-card,.lock-panel,.empty-state,.guide-title,.symbol-choice,.message-composer,.message-part,.message-part-picture,.message-choice-grid,.message-strip-empty,dialog,.message-group-tabs button,.quick,.outline,.focus-exit){background:var(--surface);color:var(--ink);border-color:var(--line);box-shadow:var(--glow)}
:root[data-theme] :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
:root[data-theme] :is(.full-compose textarea,.segmented,.output-note,.form-preview,.guidance,.hint-box,.library-note,.optional-tools,.speech-voice-help,.speech-speed-heading output,.badge,.message-composer textarea[readonly],.message-composer-heading>span,.output-empty .symbol,.dialog-head .close,.manage-button,.storage-warning){background:var(--raised);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(.sub,.eyebrow,.connection,.board-foot,.footer,.footer a,.starter-kicker,.output-empty,.output-token span,.output-note,.panel-heading p,.data-info p,.settings-card p,.setting-line small,.lock-panel p,.hint-box strong,.form-preview p,.history-date,.speech-speed-labels,.speech-save-row span,.speech-troubleshooting,.message-composer-heading p,.message-picker-mode,.message-tile-appearance,.message-tile-appearance p,.message-no-results,.optional-tools p,.category-fieldset p,label.field small,.full-compose label,.empty-state h3,.guide-title,.search-box .icon){color:var(--muted)}
:root[data-theme] :is(.speech-discovery,.speech-voice-help,.speech-filter-note){color:var(--muted)!important}
:root[data-theme] :is(.prototype-controls,.board-tabs,.output-heading,.footer,.data-row,.setting-line,.dialog-head,.speech-save-row,.category-fieldset,.message-dialog .dialog-actions){border-color:var(--line)}
:root[data-theme] :is(.primary,.primary:hover,.message-group-tabs button[aria-selected=true]){background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
:root[data-theme] :is(.quiet,.board-tabs button,.segmented button,.manage-nav button){color:var(--muted)}
:root[data-theme] :is(.quiet:hover,.outline:hover,.message-tile:hover,.message-group-tabs button:hover,.quick:hover){background:var(--raised);color:var(--ink);border-color:var(--focus)}
:root[data-theme] :is(.segmented button[aria-pressed=true],.manage-nav button[aria-current=page],.message-tile.selected,.symbol-choice[aria-pressed=true],.speech-preview-actions .outline){background:var(--raised);color:var(--accent);border-color:var(--accent)}
:root[data-theme] .board-tabs button[aria-selected=true]{color:var(--accent);border-color:var(--accent)}
:root[data-theme] .board-tabs.message-group-tabs button[aria-selected=true]{background:var(--accent);color:var(--accent-ink);border-color:var(--accent)}
:root[data-theme] :is(.danger,.error,.message-part-actions [data-action=draft-remove],#feedback-error){color:var(--danger)}
:root[data-theme] .danger{background:var(--raised);border-color:var(--danger)}
:root[data-theme] :is(#voice-status,#feedback-status,.speech-save-row .saved,.speech-save-row .unsaved,.connection .icon,.output-heading .icon,.history-row .icon){color:var(--accent)}
:root[data-theme] .workspace>.quick-row{background:var(--page);border-color:var(--line)}
:root[data-theme] .workspace>.quick-row .quick{color:var(--yes);border-color:var(--yes)}
:root[data-theme] .workspace>.quick-row .quick.no{color:var(--no);border-color:var(--no)}
:root[data-theme] .workspace>.quick-row .quick.stop{color:var(--stop);border-color:var(--stop)}
:root[data-theme] .workspace>.quick-row .quick.ok{color:var(--ok);border-color:var(--ok)}
:root[data-theme] .symbol:has(.aac-symbol){background:var(--symbol-paper);border-color:var(--line)}
:root[data-theme] .message-group-tabs .group-symbol{background:var(--symbol-paper)}
:root[data-theme] .message-dialog .dialog-actions{background:var(--surface)}
:root[data-theme] :is(.guide-progress span){background:var(--raised);border-color:var(--line)}
:root[data-theme] .guide-progress span.complete{background:var(--accent)}
:root[data-theme] .notice{background:var(--accent);color:var(--accent-ink)}
:root[data-theme] dialog::backdrop{background:#000a}
:root[data-theme] :is(button,a,input,textarea,select,summary):focus-visible{outline:3px solid var(--focus);outline-offset:3px}
:root[data-theme] input:is([type=checkbox],[type=radio],[type=range]){accent-color:var(--accent)}
:root[data-theme] .skip{background:var(--surface);color:var(--ink)}
:root[data-theme] :is(.gallery-card,.gallery-note){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme] :is(.gallery-download span,.gallery-end,.gallery-section h2 span){color:var(--muted)}
:root[data-theme] :is(.gallery-toolbar,.gallery-end,.small-preview .gallery-picture){border-color:var(--line)}

/* Keep colour-coded original art intact in Dark/Neon. Only Green tints SVG symbols. */
:root[data-theme=green] .aac-symbol g{stroke:#a0efad}
:root[data-theme=green] .aac-symbol [stroke]:not([stroke=none]){stroke:#a0efad}
:root[data-theme=green] .aac-symbol [fill]:not([fill=none]){fill:#194326}
:root[data-theme=green] .aac-symbol [fill="#243e46"],:root[data-theme=green] .aac-symbol [fill="#233d44"]{fill:#a0efad}
:root[data-theme=green] :is(.symbol.mint,.symbol.blue,.symbol.peach,.symbol.yellow,.symbol.lilac,.symbol.rose){background:var(--raised);color:var(--ink)}
:root[data-theme=green] .theme-swatch{filter:none}
:root[data-theme=neon] :is(.message-tile,.message-group-tabs button){--tile-accent:#86e8ff;border-color:var(--tile-accent);box-shadow:0 0 12px color-mix(in srgb,var(--tile-accent) 14%,transparent)}
:root[data-theme=neon] :is(.message-tile,.message-group-tabs button):nth-child(4n+2){--tile-accent:#ffa7dc}
:root[data-theme=neon] :is(.message-tile,.message-group-tabs button):nth-child(4n+3){--tile-accent:#bba8ff}
:root[data-theme=neon] :is(.message-tile,.message-group-tabs button):nth-child(4n){--tile-accent:#9ef5b5}
:root[data-theme=neon] .quick{box-shadow:0 0 12px #b79cff20}

.theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;border:0;padding:0;margin:0}
.theme-option{display:grid;grid-template-columns:22px 70px minmax(0,1fr);align-items:center;gap:12px;min-height:100px;border:2px solid var(--line);border-radius:12px;padding:14px;cursor:pointer;background:var(--surface);color:var(--ink)}
.theme-option.chosen{border-color:var(--accent);outline:1px solid var(--accent)}
.theme-option input{margin:0;width:22px;height:22px;accent-color:var(--accent)}
.theme-option strong,.theme-option small{display:block}
.theme-option small{font-size:.875rem;color:var(--muted);font-weight:400;margin-top:4px}
.theme-swatch{display:flex;gap:4px;align-items:center;justify-content:center;height:56px;border-radius:9px;border:1px solid #8a9a9f}
.theme-swatch i{width:14px;height:25px;border-radius:4px;background:#4a9a80}
.theme-swatch-standard{background:#fffaf1}.theme-swatch-standard i{background:#1d58a6}.theme-swatch-standard i:nth-child(2){background:#df5554}.theme-swatch-standard i:nth-child(3){background:#ffcb70}
.theme-swatch-dark{background:#15212b}.theme-swatch-dark i{background:#8cddbd}
.theme-swatch-green{background:#06130c}.theme-swatch-green i{background:#a0efad}
.theme-swatch-neon{background:#100d23}.theme-swatch-neon i{background:#86e8ff;box-shadow:0 0 6px #86e8ff80}.theme-swatch-neon i:nth-child(2){background:#ffa7dc;box-shadow:0 0 6px #ffa7dc80}.theme-swatch-neon i:nth-child(3){background:#bba8ff;box-shadow:0 0 6px #bba8ff80}
#theme-status{margin:16px 0 0;color:var(--muted)}
.tutorial-welcome{display:flex;justify-content:space-between;align-items:center;gap:18px;background:var(--raised);color:var(--ink);border:1px solid var(--line);border-radius:14px;padding:18px;margin-bottom:24px}
.tutorial-welcome p{color:var(--muted);margin-top:4px}
.tutorial-topics{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tutorial-topics button{justify-content:flex-start;text-align:left;white-space:normal}
.tutorial-summary ol{padding-left:22px;line-height:1.8}
.tutorial-active{padding-bottom:390px}
.tutorial-active .notice{top:16px;bottom:auto}
.tutorial-coach{position:fixed;z-index:80;right:18px;bottom:18px;width:min(590px,calc(100vw - 36px));max-height:46dvh;overflow:auto;overscroll-behavior:contain;background:var(--surface);color:var(--ink);border:2px solid var(--accent);border-radius:16px;padding:16px 20px;box-shadow:0 8px 45px #0004;font-size:1rem}
.tutorial-coach-heading,.tutorial-coach-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.tutorial-coach-heading .quiet{padding:5px 8px;min-height:44px}
.tutorial-coach h2{font-size:1.2rem;line-height:1.3;margin:5px 0}
.tutorial-coach p{font-size:.95rem;line-height:1.5;margin:8px 0;color:var(--muted)}
.tutorial-coach summary{min-height:44px;padding:10px 0;cursor:pointer;font-size:.9rem;font-weight:650}
.tutorial-coach .tutorial-collapse{padding:4px 0;min-height:36px;font-size:.875rem}
.tutorial-coach-actions{justify-content:flex-start;margin-top:12px}
.tutorial-jump{display:block;font-size:.875rem;margin-top:12px;color:var(--muted)}
.tutorial-jump select{display:block;width:100%;max-width:100%;margin-top:5px;text-overflow:ellipsis}
.tutorial-target{outline:3px dashed var(--focus)!important;outline-offset:4px;scroll-margin-top:100px;scroll-margin-bottom:390px}
dialog:has(.tutorial-coach){padding-bottom:390px}
.output-secondary{flex-wrap:wrap}.output-secondary button{min-width:64px}
@media(max-width:760px){.theme-options{grid-template-columns:1fr}.theme-option{grid-template-columns:22px 65px minmax(0,1fr);padding:12px}.tutorial-topics{grid-template-columns:1fr}.tutorial-welcome{align-items:flex-start;flex-direction:column}.tutorial-coach{right:10px;bottom:10px;width:calc(100vw - 20px);padding:12px 14px;max-height:43dvh}.tutorial-coach .badge{font-size:.8rem}.tutorial-coach-actions{gap:7px}.tutorial-coach-actions .quiet{font-size:.875rem}.tutorial-coach .outline,.tutorial-coach .primary{padding:9px 12px}.tutorial-jump select{font-size:.95rem}.tutorial-active{padding-bottom:400px}}
@media(prefers-reduced-motion:reduce){:root[data-theme=neon] :is(.message-tile,.message-group-tabs button,.quick){box-shadow:none}}

/* Companion palette: blue actions, coral accents, amber guidance. */
:root[data-theme=standard] .brand em{color:var(--amber)}
:root[data-theme=standard] :is(.brand-note,.prototype-tag){color:#d9e5ff;border-color:#667594}
:root[data-theme=standard] .brand-symbol{background:#fff5e3}
:root[data-theme=standard] .topbar button.manage-button{background:#2b3b61;color:#fff;border-color:#7988a4}
:root[data-theme=standard] :is(.tutorial-welcome,.guidance,.hint-box,.storage-warning){background:var(--amber-paper);color:#69440d;border-color:#d0a65c}
:root[data-theme=standard] :is(.tutorial-coach span.badge,.guide-title){background:var(--amber-paper);color:#69440d;border-color:#d0a65c}
:root[data-theme=standard] .message-tile.selected{border-color:var(--coral);background:#fff5f2}
:root[data-theme=standard] .message-group-tabs button[aria-selected=true]{box-shadow:inset 0 -4px 0 var(--amber)}
:root[data-theme=standard] :is(.message-part.replacing,.tutorial-target){outline-color:var(--focus)}
:root[data-theme=standard] :is(.speech-speed-heading output,.message-composer-heading>span,.badge){color:var(--accent)}
:root[data-theme=standard] .speech-settings input[type=range]{accent-color:var(--accent)}
:root[data-theme=standard] .output-heading .eyebrow{color:var(--muted)}
:root[data-theme=standard] :is(.quick,.workspace>.quick-row .quick){background:#edf3ff}
:root[data-theme=standard] :is(.quick.no,.workspace>.quick-row .quick.no){background:#fff0ed}
:root[data-theme=standard] :is(.quick.stop,.workspace>.quick-row .quick.stop){background:var(--amber-paper)}
:root[data-theme=standard] .message-composer{background:#f4f7ff}
:root[data-theme=standard] .full-compose textarea{background:#f4f7ff;color:var(--ink)}
:root[data-theme=standard] .speech-preview-actions .outline{background:#edf3ff;border-color:var(--accent)}
.tutorial-mascot{float:right;width:100px;height:110px;object-fit:contain;margin:0 0 8px 12px;pointer-events:none}
.tutorial-welcome .tutorial-mascot{float:none;flex:0 0 80px;width:80px;height:95px;margin:0}
.tutorial-summary .tutorial-mascot{width:130px;height:145px}
.tutorial-coach:has(.tutorial-guidance[hidden]) .tutorial-mascot{display:none}
@media(max-width:760px){.tutorial-mascot{width:70px;height:84px;margin-left:8px}.tutorial-welcome .tutorial-mascot{display:none}}
