/* SynsMind / 2026.10 — shared component contract. No ornamental gradients. */
body[data-restyle]{--brand1:#b7a8ed;--brand2:#a4bde5;--brand3:#a4bde5;--brand-grad:#b7a8ed;--grad:#b7a8ed;--text:#edf1f8;--text-light:#edf1f8;--text-inverse:#101727;--muted:#a2aec2;--text-muted:#a2aec2;--card:#111c2d;--surface:#111c2d;--bg-panel:#111c2d;--bg-input:#0c1524;--bg-secondary:#182438;--border-color:#2b384d;--line:#2b384d;--accent:#c2b5f3;--accent-ink:#171a2a;--shadow-lg:none;--shadow:0 20px 50px #0002;background:radial-gradient(ellipse at 10% 0%,#26243e55,transparent 60%),#080e19;color:var(--text);font-family:Inter,system-ui,sans-serif;padding:0;line-height:1.65}
body[data-restyle].light{--text:#162239;--text-light:#162239;--text-inverse:#162239;--muted:#50617a;--text-muted:#50617a;--card:#fff;--surface:#fff;--bg-panel:#fff;--bg-input:#f2f5fa;--bg-secondary:#edf1f8;--line:#d5deeb;--border-color:#d5deeb;--accent:#50447d;--accent-ink:#fff;--brand1:#50447d;--brand2:#4c648b;--brand3:#4c648b;background:#f2f5fa}
body[data-restyle] :is(h1,h2,h3,h4,.title){font-family:Manrope,Inter,system-ui,sans-serif;letter-spacing:-.035em;color:var(--text)}
body[data-restyle] :is(button,input,select,textarea){font-family:inherit}
body[data-restyle] :is(button,a){-webkit-tap-highlight-color:transparent}
body[data-restyle] button:disabled{opacity:.45;cursor:not-allowed}
body[data-restyle] :is(.action-btn,.btn,.retry-btn,.ss-theme){border:1px solid var(--line);background:var(--bg-secondary);color:var(--text);box-shadow:none;border-radius:12px;min-height:44px;font-size:.88rem;font-weight:600;letter-spacing:0;padding:10px 16px;backdrop-filter:none;transition:background .18s,border-color .18s,transform .18s}
body[data-restyle] :is(.action-btn.brand,.btn.listen,.btn--pill,#m-play,#send-btn){background:var(--accent);color:var(--accent-ink);border:1px solid transparent;box-shadow:none}
body[data-restyle] :is(.btn.pause,.btn.stop,.btn.more,.btn--ghost,#m-pause,#m-stop,#m-close){background:var(--bg-secondary);color:var(--text);border:1px solid var(--line);box-shadow:none}
body[data-restyle] :is(.btn,.action-btn)::before,body[data-restyle] .title--gloss::after{display:none!important}
body[data-restyle] :is(.btn,.action-btn):hover:not(:disabled){filter:none;transform:translateY(-1px);border-color:var(--muted)}
body[data-restyle] :focus-visible{outline:2px solid var(--accent);outline-offset:4px}
body[data-restyle] :is(.chat-header,.ta-header){background:var(--surface);border-bottom:1px solid var(--line);box-shadow:none}
body[data-restyle] .ta-header{position:relative;top:auto}
body[data-restyle] .ta-header__inner{max-width:1180px;margin:auto;justify-content:space-between;padding:28px 20px}
body[data-restyle] .ta-header__title{font-size:clamp(1.5rem,3vw,2.3rem);background:none;-webkit-text-fill-color:var(--text)}
body[data-restyle] :is(.logo,.ta-header__icon){width:36px;height:36px;filter:none;border-radius:0;box-shadow:none}
body[data-restyle] .ss-page-nav{max-width:1180px;margin:auto;padding:18px 20px;min-height:72px;font-family:Inter,system-ui,sans-serif;justify-content:flex-start}
body[data-restyle] .ss-page-nav a:hover{color:var(--accent)}
body[data-restyle] :is(.intro-card,.ta-info__box,.detail__content,.card,.panel,.affiliate-box){background:var(--surface);color:var(--text);border:1px solid var(--line);border-radius:20px;box-shadow:none}
body[data-restyle] .intro-card{margin:30px 0;padding:26px}
body[data-restyle] .ta-info__box{background:transparent;border:0;padding:0;box-shadow:none}
body[data-restyle] :is(.tip,.ta-four,.card p,.detail__obj,.detail__steps,.detail__tips,.intro-card p,.ai-ul){color:var(--muted)}
body[data-restyle] .detail__tips{background:var(--bg-secondary);border:1px solid var(--line);border-radius:12px;padding:16px}
body[data-restyle] .detail__content{max-height:90dvh;overflow:auto}
body[data-restyle] .detail__title{color:var(--text)}
body[data-restyle] .detail__img{aspect-ratio:3/2;object-fit:cover;border-radius:14px;max-height:300px;width:100%}
body[data-restyle] :is(.card-grid,#training-grid){gap:22px;grid-template-columns:repeat(3,minmax(0,1fr));margin-block:28px}
body[data-restyle] .card{padding:0;overflow:hidden;display:flex;flex-direction:column}
body[data-restyle] .card:hover{border-color:#58657d;transform:translateY(-3px);box-shadow:0 15px 35px #0002}
body[data-restyle] .card img{border-radius:0;aspect-ratio:3/2;height:auto;width:100%;object-fit:cover;background:var(--bg-input);display:block}
body[data-restyle] .card-content{padding:22px;display:flex;flex-direction:column;flex:1}
body[data-restyle] .card>h3,body[data-restyle] .card>p{margin-inline:22px}
body[data-restyle] .card>.card-actions{padding:0 22px 22px}
body[data-restyle] .card h3{margin-top:8px;font-size:1.15rem;line-height:1.35}
body[data-restyle] .card p{font-size:.9rem;line-height:1.7}
body[data-restyle] .card-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:auto;padding-top:18px}
body[data-restyle] .card--full{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;min-height:250px}
body[data-restyle] .card--full img{height:100%;max-height:330px}
body[data-restyle] .card--full .card-content{padding:32px;justify-content:center}
.exercise-index,.page-eyebrow{font-size:.68rem;letter-spacing:.15em;text-transform:uppercase;color:var(--muted);font-weight:600}
body[data-restyle] .affiliate-box{padding:24px;margin-block:30px;border-left:1px solid var(--line)}
body[data-restyle] a:not([class]){color:var(--accent)}
body[data-restyle] :is(input,textarea,select){color:var(--text);background:var(--bg-input);border:1px solid var(--line);accent-color:var(--accent)}
body[data-restyle] .media-bar{background:var(--bg-secondary);border:1px solid var(--line);border-radius:12px;padding:14px}
body[data-restyle] .media-bar input[type=range]{background:var(--line);box-shadow:none}
body[data-restyle] .media-bar input[type=range]::-webkit-slider-thumb{background:var(--accent);box-shadow:none}
.audio-status{color:var(--muted);background:var(--bg-secondary);border:1px solid var(--line);border-radius:12px;padding:12px 16px;font-size:.85rem;margin:12px 0}.audio-status:empty{display:none}
/* Chat: quiet surfaces, typographic hierarchy, no coloured chat balloons. */
body.ss-chat-page{display:block;height:auto;min-height:100dvh}
body.ss-chat-page .chat-container{width:min(1080px,calc(100% - 40px));height:calc(100dvh - 110px);min-height:540px;max-height:none;margin:10px auto 28px;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 30px 90px #0002}
body.ss-chat-page .chat-header{display:flex;align-items:center;justify-content:space-between;padding:22px 26px;flex-shrink:0}
body.ss-chat-page .chat-header .brand{display:flex;align-items:center;gap:16px}
body.ss-chat-page .page-eyebrow{margin:0 0 3px;font-size:.62rem}
body.ss-chat-page h1.title{font-size:1.65rem;margin:0;line-height:1.25;color:var(--text)}
body.ss-chat-page .utility-bar{padding:12px 26px;display:flex;gap:8px;background:transparent;border-bottom:0;flex-shrink:0}
body.ss-chat-page .guru-tabs{display:flex;gap:6px;padding:8px 26px 14px;background:transparent;border-bottom:1px solid var(--line);flex-shrink:0;flex-wrap:wrap}
body.ss-chat-page .guru-tabs .tab{flex:1;min-width:110px;min-height:45px;border:1px solid transparent;border-radius:12px;font-size:.82rem;padding:10px 12px;color:var(--muted);background:transparent;box-shadow:none;animation:none}
body.ss-chat-page .guru-tabs .tab.active{color:var(--text);background:var(--bg-secondary);border-color:var(--line)}
body.ss-chat-page .guru-tabs .tab.active::after{display:none}
.coach-intro{font-size:.78rem;color:var(--muted);padding:12px 26px 0;margin:0}
body.ss-chat-page .chat-messages{min-height:0;flex:1;overflow-y:auto;padding:24px 26px;gap:22px;overscroll-behavior:contain;background:transparent}
body.ss-chat-page .message{max-width:88%;gap:0;animation:none}
body.ss-chat-page .message .bubble{background:var(--bg-secondary);color:var(--text);border:1px solid var(--line);box-shadow:none;padding:17px 20px;border-radius:16px;line-height:1.8;font-size:.94rem}
body.ss-chat-page .message.user .bubble{background:var(--bg-input);color:var(--text);border-color:var(--line);border-bottom-right-radius:4px}
body.ss-chat-page .message.bot .bubble{border-bottom-left-radius:4px}
body.ss-chat-page .message .bubble strong{color:var(--text)}
body.ss-chat-page .message .bubble :is(p,h1,h2,h3){margin:0 0 10px}body.ss-chat-page .message .bubble p:last-child{margin-bottom:0}
body.ss-chat-page .message .bubble a{color:var(--accent)}
body.ss-chat-page :is(.message-source,.message-timestamp,.specialist-info){color:var(--muted);background:none;border:0;padding:0;margin-top:12px;font-size:.7rem}
body.ss-chat-page .message-sources-container{margin-top:14px;padding-top:12px;border-top:1px solid var(--line);color:var(--muted)}
body.ss-chat-page .message-sources-container h5{margin:0;font-size:.75rem}body.ss-chat-page .message-sources-container ul{margin:6px 0;padding-left:20px;font-size:.8rem}
body.ss-chat-page .chat-footer{padding:16px 26px 12px;background:var(--surface);border-top:1px solid var(--line);flex-shrink:0}
body.ss-chat-page .input-wrapper{background:var(--bg-input);border:1px solid var(--line);box-shadow:none;border-radius:14px;display:flex;align-items:flex-end;padding:8px;gap:8px}
body.ss-chat-page .input-wrapper::before,body.ss-chat-page .input-wrapper::after{display:none}
body.ss-chat-page #user-input{background:transparent;border:0;box-shadow:none;color:var(--text);min-height:44px;max-height:130px;padding:12px;resize:none;flex:1;border-radius:6px}
body.ss-chat-page #send-btn{width:44px;height:44px;min-width:44px;padding:12px;border-radius:10px;box-shadow:none;animation:none}
body.ss-chat-page #send-btn svg{width:20px;height:20px;display:block}
body.ss-chat-page .chat-notice{color:var(--muted);font-size:.67rem;text-align:center;margin:10px 0 0}
body.ss-chat-page .typing-dots i{background:var(--muted)}
body.ss-chat-page .message.error .bubble{border-color:#9d777c;background:var(--bg-secondary);color:var(--text)}
body[data-restyle] .theme-switch{background:var(--bg-secondary);border:1px solid var(--line);color:var(--text);box-shadow:none;min-height:44px}
body[data-restyle] .theme-switch .knob{background:var(--line);box-shadow:none}
body[data-restyle] .theme-switch.on .knob{background:var(--accent)}
body[data-restyle] .ripple-ink{background:var(--line)}
body[data-restyle] .animate-tips-on-load{animation:none}
/* Games: only meaningful game stimuli retain their functional colours. */
body[data-restyle] .gym-intro{padding:36px 28px 12px}.gym-intro h2{font-family:Manrope,Inter,sans-serif}
body[data-restyle] #game-selection{padding:20px 28px;gap:12px}
body[data-restyle] #game-selection .action-btn{background:var(--bg-input);color:var(--text);border:1px solid var(--line);padding:20px;box-shadow:none}
body[data-restyle] #game-selection .action-btn.brand{background:var(--bg-secondary);border-color:var(--accent);color:var(--text)}
body[data-restyle] #game-selection small,body[data-restyle] #game-selection .brand small{color:var(--muted);line-height:1.5}
body[data-restyle] .panel{margin:16px 28px 28px;border-radius:18px;box-shadow:none}
body[data-restyle] .game-title{background:none;color:var(--text);font-size:1.3rem;border-bottom:1px solid var(--line)}
body[data-restyle] :is(.status-bar,.controls,.switch-cue,.switch-mapping){background:var(--bg-secondary);color:var(--text);border-color:var(--line)}
body[data-restyle] :is(.badge,.timer){background:var(--bg-input);color:var(--muted);border:1px solid var(--line);border-radius:8px}
body[data-restyle] :is(.sequence,.anagram-word-display,.sequences-display,.switch-item,.mnemonics){background:var(--bg-input);color:var(--text);border-color:var(--line);box-shadow:none}
body[data-restyle] .palace-tutorial{background:var(--bg-secondary);border-color:var(--line)}
body[data-restyle] .palace-tutorial summary{color:var(--accent)}
body[data-restyle] #palace-check{background:var(--accent);color:var(--accent-ink)}
body[data-restyle] .card-front{background:var(--bg-secondary);border:1px solid var(--line);color:var(--accent)}
body[data-restyle] .card-back{background:var(--bg-input);color:var(--text);border:1px solid var(--line)}
body[data-restyle] .new-board .lit{background:var(--accent)!important;color:var(--accent-ink)!important}
body[data-restyle] .new-board .chosen{background:#4c648b!important;color:#fff!important}
body[data-restyle] .feedback{color:var(--text)}
body[data-restyle] .new-controls .action-btn{display:inline-flex;visibility:visible;opacity:1}
body[data-restyle] .new-stage{padding:24px}
#strumenti{scroll-margin-top:95px}.checkin-link{display:block;margin-top:10px;color:#c2b5f3;font-weight:600}
@media(max-width:850px){body[data-restyle] :is(.card-grid,#training-grid){grid-template-columns:repeat(2,minmax(0,1fr))}body[data-restyle] .ss-page-nav span{display:none}}
@media(max-width:600px){body[data-restyle] .ss-page-nav{padding:12px 16px;gap:14px;min-height:62px}body[data-restyle] :is(.card-grid,#training-grid){grid-template-columns:1fr}body[data-restyle] .card--full{display:flex}body[data-restyle] .card--full img{height:auto}body[data-restyle] .card-content,body[data-restyle] .card--full .card-content{padding:20px}body[data-restyle] .intro-card{padding:20px}.ta-brand{min-width:0}body[data-restyle] .ta-header__inner{padding:20px 16px;gap:16px}body.ss-chat-page .chat-container{width:calc(100% - 16px);height:calc(100dvh - 90px);min-height:520px;margin:4px 8px 16px;border-radius:18px}body.ss-chat-page .chat-header{padding:16px;gap:12px;align-items:flex-start;flex-wrap:wrap}body.ss-chat-page h1.title{font-size:1.35rem}body.ss-chat-page .utility-bar{padding:8px 16px;gap:6px}body.ss-chat-page .utility-bar .action-btn{font-size:.74rem;padding:8px 10px;min-height:40px}body.ss-chat-page .guru-tabs{padding:8px 12px 12px;gap:4px}body.ss-chat-page .guru-tabs .tab{min-width:85px;padding:8px;font-size:.74rem;min-height:40px}.coach-intro{padding-left:16px;font-size:.7rem}body.ss-chat-page .chat-messages{padding:16px}body.ss-chat-page .message{max-width:96%}body.ss-chat-page .message .bubble{padding:14px;font-size:.88rem}body.ss-chat-page .chat-footer{padding:12px}body[data-restyle] .panel{margin:12px}body[data-restyle] .gym-intro{padding:26px 18px 12px}body[data-restyle] #game-selection{padding:12px;gap:8px}body[data-restyle] #game-selection .action-btn{padding:14px;font-size:.88rem}body[data-restyle] .new-controls .action-btn{width:100%}body[data-restyle] .head-actions{flex-wrap:wrap}.new-stage h2{line-height:1.25}}
@media(prefers-reduced-motion:reduce){body[data-restyle] *,body[data-restyle] *::before,body[data-restyle] *::after{animation:none!important;transition:none!important}}
/* Normalize the more specific legacy card and mobile toolbar selectors. */
body[data-restyle] .card .btn,body[data-restyle] .detail__actions .btn{border-radius:12px;box-shadow:none}
body[data-restyle] .card .btn.listen{background:var(--accent);color:var(--accent-ink);border:1px solid transparent}
body[data-restyle] .card .btn.pause,body[data-restyle] .card .btn.stop,body[data-restyle] .card .btn.more{background:var(--bg-secondary);color:var(--text);border:1px solid var(--line)}
body[data-restyle] .ss-page-nav>a{display:inline-flex;align-items:center;white-space:nowrap}
body.ss-chat-page .message .bubble .message-source{display:block;background:none;color:var(--muted);border:0;padding:0}
body.ss-chat-page #send-btn svg{color:var(--accent-ink);fill:currentColor}
body.ss-chat-page .chat-container .tab{white-space:normal;text-overflow:clip;overflow:visible}
@media(max-width:600px){
 body.ss-chat-page .chat-container .utility-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));flex-direction:row;gap:6px;padding:8px 16px}
 body.ss-chat-page .chat-container .utility-bar>*{width:auto;min-width:0;max-width:none;justify-content:center;flex:none;margin:0}
 body.ss-chat-page .chat-container .utility-bar .label{display:inline}
 body.ss-chat-page .chat-container .guru-tabs{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex-direction:row}
 body.ss-chat-page .chat-container .guru-tabs .tab{width:auto;min-width:0;font-size:.7rem;padding:7px 5px;line-height:1.35}
 body.ss-chat-page .chat-container #user-input{line-height:1.4;font-size:.9rem;min-height:44px;height:44px;padding:10px 8px}
 body.ss-chat-page .chat-container .chat-header{padding:14px 16px}
 body.ss-chat-page .chat-container .head-actions .action-btn{padding:8px 12px;min-height:36px;font-size:.75rem}
 body.ss-chat-page .chat-container .chat-header .brand{gap:10px}
}
body[data-restyle] :is(h1,h2,h3,h4,.title,.ss-page-nav){text-shadow:none;filter:none}
body[data-restyle] .card-tile.ok .card-back{background:#37435f;color:var(--text);border:2px solid var(--accent)}
body.ss-disclaimer main{background:var(--surface);color:var(--text);border:1px solid var(--line);box-shadow:none}
body.ss-disclaimer header{background:var(--surface);color:var(--text);border-bottom:1px solid var(--line)}
body.ss-disclaimer .home-button{background:var(--bg-secondary);color:var(--text);border:1px solid var(--line)}
body.ss-disclaimer footer{color:var(--muted)}
