
/* ZUPILO / 2026 character universe + theme system */
:root{color-scheme:dark}
:root[data-theme="light"]{color-scheme:light;--bg:#f4f6fb;--bg-2:#f4f7fc;--panel:#fff;--panel-2:#f6f8fc;--panel-3:#edf2fa;--text:#132443;--soft:#53617a;--line:rgba(27,49,88,.13);--shadow:0 16px 48px rgba(28,49,88,.09);--navy:#0c1f3c}
:root[data-theme="light"] body{color:var(--text);background:radial-gradient(circle at 6% 8%,#fff4d9 0,transparent 28%),radial-gradient(circle at 90% 93%,#e7edff 0,transparent 35%),#f2f5fb}
:root[data-theme="light"] .card:not(.hero):not(.info-panel):not(.quote):not(.pro-card):not(.motivation),:root[data-theme="light"] .sidebar,:root[data-theme="light"] .topbar,:root[data-theme="light"] .rightbar,:root[data-theme="light"] .footer-mobile{background:linear-gradient(155deg,#fff,#f7f9fd);color:#172744;border-color:#dfe5f1;box-shadow:var(--shadow)}
:root[data-theme="light"] .nav a{color:#52627d}
:root[data-theme="light"] .nav a.active,:root[data-theme="light"] .nav a:hover{color:#1c3052;background:#fff0c7;border-color:#f4da8c}
:root[data-theme="light"] .sidebar .nav .icon{background:#eff2f9}
:root[data-theme="light"] .search,:root[data-theme="light"] .chip,:root[data-theme="light"] .field,:root[data-theme="light"] .segmented button,:root[data-theme="light"] .pill,:root[data-theme="light"] .voice-grid select,:root[data-theme="light"] .voice-grid input{background:#f1f4fa;color:#1c3052;border-color:#dce3f0}
:root[data-theme="light"] .search input,:root[data-theme="light"] .field input{color:#1c3052}
:root[data-theme="light"] .segmented button.active,:root[data-theme="light"] .pill.active{color:#263550;background:#ffedb1;border-color:#e9c86c}
:root[data-theme="light"] .setting-row{border-color:#e4e9f1}
:root[data-theme="light"] .lesson-card,:root[data-theme="light"] .unit-card{background:rgba(255,255,255,.9);color:#172744}
:root[data-theme="light"] .lesson-card h4,:root[data-theme="light"] .lesson-card p,:root[data-theme="light"] .lesson-card small{color:#273d61}
:root[data-theme="light"] .hero .sub{color:#465975}
:root[data-theme="light"] .hero-bg{background:radial-gradient(circle at 15% 5%,rgba(255,212,79,.35),transparent 30%),linear-gradient(165deg,#fefcf5,#eff5ff 70%,#dce8f9)}
:root[data-theme="light"] .hero{color:#142746}
:root[data-theme="light"] .hero .badge{color:#644400;background:#fff0b7}
:root[data-theme="light"] .stars{opacity:.12}
:root[data-theme="light"] .motivation{color:#263752}
:root[data-theme="light"] .goal-ring span{background:#fff}
:root[data-theme="light"] .speak-page{color:#162849}
:root[data-theme="light"] .speak-panel,:root[data-theme="light"] .speak-stage{background:linear-gradient(150deg,#fff,#f6f9fe);color:#172b4b;border-color:#dce4f1}
:root[data-theme="light"] .speak-title p,:root[data-theme="light"] .speak-hint,:root[data-theme="light"] .speak-mode-note{color:#5b6b85}
:root[data-theme="light"] .speak-chat{background:#f9fbff}
:root[data-theme="light"] .speak-bubble{background:#e9effa;color:#173454}
:root[data-theme="light"] .speak-bubble small{color:#4d6787}
:root[data-theme="light"] .speak-input,:root[data-theme="light"] #speak-input{background:#f2f5fb;color:#142746;border-color:#d9e4f5}
:root[data-theme="light"] .speak-feedback{background:#eef4ff;color:#365172}
:root[data-theme="light"] .voice-actions button:not(.primary){background:#eef2f9;color:#223452;border-color:#d9e2f0}
:root[data-theme="light"] .voice-note{color:#5a6c86}
:root[data-theme="light"] .wallet-details .card{color:#172744}
:root[data-theme="light"] .mobile-logo-link img,:root[data-theme="light"] .brand-logo{filter:drop-shadow(0 6px 14px rgba(34,55,99,.12))}
:root[data-theme="light"] .footer-mobile a.active{color:#153052;background:#fff0c8}
:root[data-theme="light"] #zupilo-character-page .zp-sub{color:#5e6f89}
:root[data-theme="light"] #zupilo-voice-panel .zp-voice-card{background:#f5f7fd;border-color:#d8e1ef;color:#233652}
:root[data-theme="light"] #zupilo-voice-panel .zp-voice-card.active{background:#fff5da;border-color:#dfbf65}
:root[data-theme="light"] #zupilo-voice-panel .zp-voice-card p{color:#62718a}
:root[data-theme="light"] #zupilo-voice-panel .zp-status{background:#eef3fa;color:#475b76}
:root[data-theme="light"] .zp-card-button{background:#edf2fa;color:#21385a;border-color:#dce4f1}
:root[data-theme="light"] .zp-card-button.active{background:#192b4d;color:#fff}
.zp-theme-segment{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.zp-theme-segment button{background:rgba(150,172,216,.08);border:1px solid var(--line);color:var(--text);border-radius:13px;padding:11px 15px;font-weight:850;cursor:pointer;transition:.2s}
.zp-theme-segment button[aria-pressed="true"]{background:var(--yellow);color:#11233f;border-color:var(--yellow)}
.zp-theme-segment button:focus-visible,.zp-voice-card:focus-visible,.zp-choose:focus-visible,.zp-card-button:focus-visible{outline:3px solid var(--yellow);outline-offset:3px}
#zupilo-character-page{padding:10px 4px 35px}
.zp-eyebrow{font-weight:850;letter-spacing:.15em;text-transform:uppercase;color:#f7cc60;font-size:11px}
.zp-characters-header{border-radius:28px;padding:28px;position:relative;overflow:hidden;background:linear-gradient(127deg,#112b53,#243462 60%,#685191);border:1px solid #a0acff40;display:flex;justify-content:space-between;gap:24px;align-items:center}
.zp-characters-header:after{content:'';position:absolute;width:280px;height:280px;border-radius:50%;background:radial-gradient(circle,#ffdb6970,transparent 72%);right:-55px;top:-100px;pointer-events:none}
.zp-characters-header h1{font-size:clamp(27px,3vw,41px);margin:8px 0;line-height:1.12;letter-spacing:-.04em;color:#fff}
.zp-characters-header p{color:#d2dcf3;max-width:500px;line-height:1.6;font-size:14px}
.zp-characters-header .zp-bubble{position:relative;z-index:1;border:1px solid #ffffff3d;border-radius:21px;background:#ffffff12;padding:16px 18px;min-width:175px;text-align:center;backdrop-filter:blur(8px);color:#fff}
.zp-bubble span{display:block;font-size:12px;color:#d3e4ff}.zp-bubble strong{display:block;font-size:23px;margin-top:6px;color:#ffe18f}
.zp-sub{font-size:14px;color:#bdcde5;line-height:1.6}
.zp-section-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:18px;margin:28px 0 16px}
.zp-section-heading h2{margin:0 0 4px;font-size:24px}
.zp-character-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.zp-character{min-width:0;position:relative;border:1px solid var(--line);background:linear-gradient(150deg,rgba(28,54,99,.9),rgba(10,29,56,.95));border-radius:26px;overflow:hidden;transition:transform .2s,border-color .2s;box-shadow:0 12px 35px #0001}
.zp-character:hover{transform:translateY(-4px)}
.zp-character.selected{border:2px solid #ffd44f;box-shadow:0 0 0 4px #ffd44f18}
.zp-art{position:relative;height:215px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:radial-gradient(circle at 50% 26%,var(--zp-glow,#5a80b8),transparent 69%),linear-gradient(155deg,var(--zp-bg1,#143761),var(--zp-bg2,#101e3e))}
.zp-art:before{content:'';position:absolute;inset:12px;border:1px solid #ffffff2b;border-radius:23px}
.zp-art svg{width:190px;height:190px;position:relative;z-index:1;filter:drop-shadow(0 12px 17px rgba(1,10,25,.25))}
.zp-art .zp-star{position:absolute;left:19px;top:18px;color:#ffec95;font-size:24px}
.zp-art .zp-orbit{position:absolute;right:18px;bottom:22px;color:#c3eaff;font-size:18px}
.zp-character-info{padding:19px}
.zp-character-name{display:flex;align-items:center;justify-content:space-between;gap:8px}
.zp-character-name h3{font-size:24px;margin:0}
.zp-role{font-size:10px;letter-spacing:.08em;text-transform:uppercase;color:#ffe099;border:1px solid #ffe09950;border-radius:50px;padding:6px 9px}
.zp-character-info p{font-size:13px;color:#bdcee8;line-height:1.5;min-height:39px}
.zp-traits{display:flex;gap:7px;flex-wrap:wrap;margin:12px 0}
.zp-traits span{font-size:10px;border-radius:20px;padding:6px 9px;border:1px solid #ffffff24;color:#d4e3f9;background:#ffffff0d}
.zp-choose{border:0;border-radius:12px;background:var(--yellow);color:#12223c;font-weight:900;padding:11px 17px;cursor:pointer;width:100%}
.zp-character.selected .zp-choose{background:#d7fbe0;color:#16442b}
.zp-mini-panel{margin-top:16px;border:1px solid var(--line);border-radius:22px;padding:17px;background:#ffffff0b;display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.zp-mini-panel strong{font-size:15px}.zp-mini-panel p{font-size:12px;margin:4px 0 0;color:var(--soft)}
.zp-mini-panel .btn{margin-left:auto}
.zp-voice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px;margin:15px 0}
#zupilo-voice-panel .zp-voice-card{border-radius:17px;text-align:left;cursor:pointer;border:1px solid #ffffff1d;background:#0e2343;color:#e9f1ff;padding:14px;transition:.2s;display:flex;flex-direction:column;gap:5px}
#zupilo-voice-panel .zp-voice-card.active{border-color:#ffd567;background:#362d39}
#zupilo-voice-panel .zp-voice-card strong{font-size:16px}
#zupilo-voice-panel .zp-voice-card p{font-size:11px;color:#aebfda;margin:0;line-height:1.4}
#zupilo-voice-panel .zp-voice-card .zp-voice-meta{font-size:10px;color:#f6d981;font-weight:850}
#zupilo-voice-panel .zp-voice-card .zp-voice-availability{font-size:10px;font-weight:750;margin-top:5px}
#zupilo-voice-panel .zp-status{padding:12px 14px;border:1px solid var(--line);border-radius:12px;margin:10px 0;font-size:12px;line-height:1.5;color:#d0dfef;background:#11233f}
#zupilo-voice-panel .zp-voice-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
#zupilo-voice-panel .zp-card-button{cursor:pointer;padding:12px 14px;border:1px solid var(--line);background:#1a355b;color:#fff;border-radius:12px;font-weight:900}
#zupilo-voice-panel .zp-card-button.primary{background:#ffd44f;color:#10223c;border-color:#ffd44f}
#zupilo-voice-panel .zp-card-button.active{outline:1px solid #ffe9aa}
.zp-voice-note{font-size:11px;color:var(--soft);margin-top:12px;line-height:1.65}
:root[data-theme="light"] .zp-character{background:#fff;color:#1a2c4d;border-color:#d9e0ed}
:root[data-theme="light"] .zp-character-info p{color:#596c88}
:root[data-theme="light"] .zp-traits span{background:#eef2fa;color:#50637e;border-color:#dce4ef}
:root[data-theme="light"] .zp-role{color:#715105;border-color:#f5d483}
:root[data-theme="light"] .zp-mini-panel{background:#fff}
@media (max-width:950px){.zp-characters-header{padding:24px 20px}.zp-character-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:620px){.zp-characters-header{display:block}.zp-characters-header .zp-bubble{margin-top:18px;display:inline-block}.zp-character-grid,.zp-voice-grid{grid-template-columns:1fr}.zp-art{height:195px}.zp-mini-panel .btn{margin-left:0;width:100%}.zp-section-heading{display:block}.zp-section-heading h2{font-size:21px}}
@media (prefers-reduced-motion:reduce){.zp-character,.zupi-hero{transition:none;animation:none}}

/* Compact navigation: eight destinations should scroll rather than collide */
@media (max-width:950px){
  .footer-mobile{justify-content:flex-start!important;gap:3px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scrollbar-width:none;padding:8px 6px}
  .footer-mobile::-webkit-scrollbar{display:none}
  .footer-mobile a{flex:0 0 66px;min-width:66px;padding:8px 5px!important;scroll-snap-align:center;font-size:10px;line-height:1.2;text-align:center}
  .footer-mobile a span:first-child{font-size:20px}
}
:root[data-theme="light"] .zp-character-grid .zp-choose{background:#ffd44f;color:#17314d}
:root[data-theme="light"] .zp-character.selected .zp-choose{background:#c8f6d5;color:#20523a}
:root[data-theme="light"] .promo h3,:root[data-theme="light"] .promo p,:root[data-theme="light"] .rightbar .motivation .muted{color:#364b6d}
:root[data-theme="light"] .rightbar .motivation{background:#fff;color:#263957}
:root[data-theme="light"] .speak-mini-actions button{color:#1a3255;border-color:#d7e3f2;background:#ecf3fd}
:root[data-theme="light"] #speak .speak-title h1{color:#1b2d4c}
:root[data-theme="light"] .zp-character-name h3{color:#182d4d}

/* 3D ZUPILO character art — original user-created sprite */
.zp-avatar3d{display:block;width:min(270px,92%);height:180px;background-image:url("assets/zupi-universe-3d.avif");background-size:200% 200%;background-repeat:no-repeat;filter:drop-shadow(0 10px 14px rgba(2,11,28,.16));transition:transform .25s ease}
.zp-avatar3d[data-zp-figure="piko"]{background-position:0% 0%}
.zp-avatar3d[data-zp-figure="niva"]{background-position:100% 0%}
.zp-avatar3d[data-zp-figure="rofi"]{background-position:0% 100%}
.zp-avatar3d[data-zp-figure="nori"]{background-position:100% 100%}
.zp-character:hover .zp-avatar3d{transform:translateY(-5px) scale(1.025)}
.zp-profile-picker{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.zp-profile-picker .zp-art{height:170px}
.zp-profile-picker .zp-avatar3d{width:min(200px,95%);height:135px}
.zp-profile-picker .zp-character-info{padding:13px}
.zp-profile-picker .zp-character-name h3{font-size:20px}
.zp-profile-picker .zp-role{display:none}
.zp-profile-picker .zp-character-info p{font-size:11px;min-height:44px}
.zp-profile-picker .zp-traits{margin:9px 0}
.zp-profile-picker .zp-traits span{font-size:9px}
.zp-profile-picker .zp-choose{font-size:12px;padding:10px}
.zp-character.selected{border-color:#ffdc5b!important}
@media(max-width:1260px){.zp-profile-picker{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:530px){.zp-profile-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.zp-profile-picker .zp-art{height:123px}.zp-profile-picker .zp-avatar3d{width:165px;height:110px}.zp-profile-picker .zp-character-info p{display:none}.zp-profile-picker .zp-traits{display:none}}
