/* Warm paper / monochrome ink. All typography uses local system fonts. */
:root{--bg:#fbf0df;--header:#f5e7d1;--surface:#fff7e9;--ink:#493326;--muted:#80654e;--accent:#94542f;--accent-bright:#ac6539;--blue:#854a28;--pink:#ad6043;--gold:#ae7a31;--line:#e6cdb0;--soft:#f0dfc4;--code:#33271f;--studio:#efddc1;--shadow:0 18px 55px #6951381a;--heading-font:"Palatino Linotype","Book Antiqua","Songti SC","Noto Serif CJK SC","SimSun",serif;--font:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif}
:root[data-theme=dark]{--bg:#161616;--header:#1b1b1a;--surface:#242422;--ink:#f2efe7;--muted:#bab5aa;--accent:#e2dcd0;--accent-bright:#fffaf0;--blue:#ece7dc;--pink:#c8c1b5;--gold:#bcb3a3;--line:#41413c;--soft:#30302c;--code:#101010;--studio:#20201e;--shadow:0 18px 55px #0005}
body{background-image:radial-gradient(ellipse at 5% 5%,#b88c4c08,transparent 55%);transition:background-color .45s,color .35s}
body:before{content:"";position:fixed;inset:0;pointer-events:none;z-index:25;opacity:.027;background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%237c6d59' filter='url(%23n)' opacity='.45' d='M0 0h160v160H0z'/%3E%3C/svg%3E")}
:root[data-theme=dark] body{background-image:radial-gradient(ellipse at 0 15%,#ffffff04,transparent 45%)}
::selection{background:#d9b991;color:#35291f}:root[data-theme=dark] ::selection{background:#d0cbc1;color:#171717}
.wordmark{font-family:"Palatino Linotype","Book Antiqua",Georgia,serif;font-weight:700;font-size:32px;letter-spacing:-1.6px}.wordmark .brand-dot{font-family:var(--font);font-size:15px;font-weight:500;align-self:flex-end;letter-spacing:-.3px;margin-bottom:1px;margin-left:2px}.logo-bracket{font-size:28px}.header-inner{gap:25px}.desktop-nav{gap:25px}.welcome h1,.section-heading h2,.about-section h2,#reader-content h1,#reader-content h2{font-family:var(--heading-font);font-weight:700;letter-spacing:.2px}.welcome h1{font-size:44px;line-height:1.65}.article-preview h3{font-family:var(--heading-font);font-weight:700;font-size:25px;letter-spacing:.1px}.portal h2,.studio-card h3{font-family:var(--heading-font);letter-spacing:.1px}.studio-heading h2{font-family:"Palatino Linotype",Georgia,serif;letter-spacing:-1.2px;font-size:42px}.section-english{font-family:var(--font);letter-spacing:.7px}.welcome{position:relative}.welcome:after{content:'学 · 思 · 创';position:absolute;right:25px;top:35px;font-family:var(--heading-font);font-size:10px;letter-spacing:5px;color:var(--muted);writing-mode:vertical-rl;opacity:.55}.hello-toy{margin-right:23px}.toy-star>path:first-child{fill:#e7c789;stroke:#ba914f}.toy-star>ellipse{fill:#6d502a}.toy-smile{stroke:#6d502a}.course-art{background:linear-gradient(145deg,#f0dfc4,#e6cfaf 60%,#dcc3a0)}.course-art:before{border-color:#9a704333}.course-cpp{color:#91653d;text-shadow:3px 4px 0 #fff6eaaa}.code-token{color:#8c6341;border-color:#fff4de;background:#fff7e8cc;box-shadow:0 5px 12px #855c3514}.course-art-dot{border-color:#b08859}.art-prompt{background:linear-gradient(135deg,#efe0c8,#e2ceb1)}.mini-prompt{background:#fffaf0;border-color:#fff8e9;box-shadow:7px 11px 0 #bba07844}.mini-window-dots{color:#c5ae8e}.mini-prompt-label{color:#8d785f}.mini-prompt-line{color:#7b5d3f}.prompt-cursor{color:#a67c49}.mini-chip{color:#8c6c45;background:#f0e4d0}.floating-spark{color:#b08951}.art-flow{background:#e8dfcb}.art-flow svg{filter:sepia(.8) saturate(.55)}.art-notebook{background:linear-gradient(135deg,#f0dfca,#e4ceb0)}.sort-bar.comparing{background:#e6c69c;color:#654220;border-color:#d3ac7a}.sort-bar.sorted{background:#c8d0b7;color:#414c2f;border-color:#aebc94}.code-block pre code,.copy-button{color:#f0e5d2}.music-dock{position:fixed;left:24px;bottom:22px;z-index:20}.music-toggle{display:flex;align-items:center;gap:12px;padding:10px 17px 10px 10px;background:var(--surface);border:1px solid var(--line);border-radius:40px;box-shadow:0 7px 22px #45332212;transition:transform .25s,box-shadow .25s}.music-toggle:hover{transform:translateY(-3px);box-shadow:0 10px 28px #45332220}.vinyl{position:relative;display:grid;place-items:center;width:34px;height:34px;flex-shrink:0;border-radius:50%;background:repeating-radial-gradient(circle,#403a33 0 2px,#292622 3px 4px);border:1px solid #555047}.vinyl i{width:12px;height:12px;border-radius:50%;background:#be9770;border:4px solid #d9b38a}.music-name{display:block;font-family:var(--heading-font);font-size:13px;line-height:1.5;text-align:left}.music-name small{display:block;font-family:var(--font);font-size:8px;color:var(--muted);letter-spacing:.2px}.music-open-label{font-size:16px;color:var(--accent);margin-left:8px}.music-panel{position:absolute;bottom:73px;left:0;width:min(375px,calc(100vw - 34px));padding:21px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow);max-height:calc(100dvh - 180px);overflow:auto;animation:panel-in .25s ease-out}.music-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.music-eyebrow{font-size:8px;letter-spacing:1px;color:var(--muted)}.music-heading h2{font-family:var(--heading-font);font-size:21px;margin-top:7px}.music-heading h2 span{font-family:var(--font);font-size:11px;font-weight:400;color:var(--muted)}.music-help{font-size:11px;color:var(--muted);line-height:1.8;margin:13px 0}.music-load{display:block;width:100%;padding:25px 15px;border:1px dashed var(--accent);border-radius:8px;background:var(--soft);font-size:12px;color:var(--accent)}#official-player iframe{display:block;width:100%;height:210px;border:0;border-radius:8px}.music-links{display:flex;justify-content:space-between;gap:14px;font-size:10px;color:var(--accent);align-items:center}.local-track-label{cursor:pointer;text-decoration:underline;text-underline-offset:4px}.local-track-label input{width:1px;height:1px;position:absolute;opacity:0}.local-track-label:focus-within{outline:2px solid var(--accent);outline-offset:5px}#local-audio-wrap{margin-top:15px;border-top:1px solid var(--line);padding-top:10px}#local-audio-wrap p{font-size:10px;color:var(--muted);overflow-wrap:anywhere}#local-audio{width:100%;height:37px}.music-dock.is-playing .vinyl{animation:record-spin 7s linear infinite}.music-dock.is-playing .music-open-label{animation:music-breathe 1.5s ease-in-out infinite}.site-footer{padding-bottom:100px}
/* Small, deliberate interactions: light-following cards, spring feedback, ink rings. */
.portal,.studio-card{transform-style:preserve-3d;will-change:auto;--rx:0deg;--ry:0deg;--lift:0px;transform:perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));transition:transform .3s ease,box-shadow .3s,border-color .3s}.portal:hover,.studio-card:hover{--lift:-4px;translate:none;transform:perspective(900px) rotateX(var(--rx)) rotateY(var(--ry)) translateY(var(--lift));box-shadow:0 18px 30px #72513116}.portal:before{content:'';position:absolute;inset:0;pointer-events:none;background:radial-gradient(180px circle at var(--mx,50%) var(--my,50%),#d7b27c28,transparent 70%);opacity:0;transition:opacity .25s}.portal:hover:before{opacity:1}.primary-button,.icon-button,.text-link{transition:transform .2s,background .2s,color .2s}.primary-button:active{transform:translateY(2px) scale(.97)}.icon-button:active{transform:scale(.9)}.article-preview h3 a{transition:color .2s,text-decoration-color .2s,text-underline-offset .2s}.article-preview h3 a:hover{text-underline-offset:9px}.inline-filters button{transition:background .25s,color .25s,transform .2s}.inline-filters button:hover{transform:translateY(-2px)}.ink-ring{position:fixed;width:12px;height:12px;border:1px solid var(--accent);border-radius:50%;pointer-events:none;z-index:35;animation:ink-ring .65s ease-out forwards}.reveal-ready{opacity:0;transform:translateY(15px)}.reveal-ready.is-visible{opacity:1;transform:translateY(0);transition:opacity .65s,transform .65s}.theme-button svg{transition:rotate .5s}.theme-button[aria-label*='浅色'] svg{rotate:135deg}
/* Ink mode: grayscale reaches every illustration, not only the background. */
:root[data-theme=dark] .course-art,:root[data-theme=dark] .studio-art,:root[data-theme=dark] .hello-toy svg,:root[data-theme=dark] .sort-bars,:root[data-theme=dark] .vinyl{filter:grayscale(1)}
:root[data-theme=dark] .course-art,:root[data-theme=dark] .studio-art{filter:grayscale(1) brightness(.76)}
:root[data-theme=dark] .welcome:before{content:'';position:absolute;inset:10px 15px 0 auto;width:260px;pointer-events:none;opacity:.65;background:radial-gradient(ellipse at 60% 46%,#77777114 0 18%,transparent 62%),radial-gradient(ellipse at 25% 70%,#aaaaaa08,transparent 58%);filter:blur(7px);border-radius:50%}
:root[data-theme=dark] .playful-word>svg{stroke-width:5;opacity:.27}:root[data-theme=dark] .portal:before{background:radial-gradient(180px circle at var(--mx,50%) var(--my,50%),#eee9dd0d,transparent 70%)}:root[data-theme=dark] .code-block pre code,:root[data-theme=dark] .copy-button{color:#e4e1d9}:root[data-theme=dark] .sort-bar.comparing{background:#a4a29d;color:#171717;border-color:#c5c1b9}:root[data-theme=dark] .sort-bar.sorted{background:#666560;color:#f2efe8;border-color:#88867f}:root[data-theme=dark] .hello-toy{opacity:.87}:root[data-theme=dark] .site-header{border-bottom-color:#ffffff06}:root[data-theme=dark] .portal:hover,:root[data-theme=dark] .studio-card:hover{box-shadow:0 18px 30px #0004}
@keyframes panel-in{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}@keyframes record-spin{to{rotate:360deg}}@keyframes music-breathe{50%{opacity:.4}}@keyframes ink-ring{from{opacity:.7;transform:translate(-50%,-50%) scale(.3)}to{opacity:0;transform:translate(-50%,-50%) scale(3.2)}}
@media(max-width:1050px){.desktop-nav{gap:19px}.header-inner{gap:20px}.wordmark{font-size:29px}.wordmark .brand-dot{font-size:13px}}
@media(max-width:790px){.welcome h1{font-size:34px}.header-inner{gap:15px}.desktop-nav{gap:15px}.wordmark{font-size:26px}.wordmark .brand-dot{font-size:12px}.hello-toy{margin-right:12px}.welcome:after{right:15px;font-size:8px}.article-preview h3{font-size:22px}.music-dock{left:16px;bottom:15px}}
@media(max-width:640px){.welcome h1{font-size:32px}.welcome:after{display:none}.hello-toy{margin-right:0}.music-toggle{padding:8px 13px 8px 8px}.music-name small{display:none}.vinyl{width:29px;height:29px}.music-panel{bottom:61px}.studio-heading h2{font-size:36px}}
@media(max-width:390px){.welcome h1{font-size:28px}.wordmark{font-size:24px}.wordmark .brand-dot{font-size:11px}.header-actions{gap:3px}.logo-bracket{font-size:23px;margin-right:5px}}
/* Refinement: clean ink surfaces, a sculpted star, explicit control states. */
.welcome:after,:root[data-theme=dark] .welcome:before{display:none!important}
.nav-button{display:inline-flex;align-items:center;gap:6px;vertical-align:middle;line-height:1.5}.nav-chevron{width:14px;height:14px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;transition:transform .22s}.nav-button[aria-expanded=true] .nav-chevron{transform:rotate(180deg)}
.hello-toy{rotate:0deg;margin-right:17px;filter:drop-shadow(0 9px 14px #b17e3020)}.hello-toy:hover{rotate:-3deg}.hello-toy>span{rotate:0deg;font-size:9px;letter-spacing:.6px;margin-top:5px}.toy-star>path:first-child{fill:url(#star-glaze);stroke:#c0914a;stroke-width:1.5;paint-order:stroke fill}.star-light{stop-color:#fff0b4}.star-mid{stop-color:#f2ce77}.star-low{stop-color:#dca24b}.star-shine{fill:none;stroke:#fff7d9;stroke-width:3;stroke-linecap:round;stroke-linejoin:round;opacity:.7}.star-face{transition:transform .18s ease-out}.star-face ellipse{fill:#745022}.star-cheek{fill:#c88552;opacity:.23}.star-halo{fill:none;stroke:#c8a16a;stroke-width:.7;stroke-dasharray:1 7;opacity:.55}.star-companions{fill:#bb8a45;animation:twinkle 4s ease-in-out infinite}.toy-shadow{opacity:.06}.toy-orbit{opacity:.25}.hello-toy.celebrate .star-companions{animation:star-pop .7s ease}
:root[data-theme=dark] .hello-toy svg{filter:none}:root[data-theme=dark] .hello-toy{opacity:1;filter:drop-shadow(0 6px 15px #0004)}:root[data-theme=dark] .star-light{stop-color:#fffdf5}:root[data-theme=dark] .star-mid{stop-color:#dcd7cb}:root[data-theme=dark] .star-low{stop-color:#a9a396}:root[data-theme=dark] .toy-star>path:first-child{stroke:#878276}:root[data-theme=dark] .star-face ellipse{fill:#4a4842}:root[data-theme=dark] .toy-smile{stroke:#4a4842}:root[data-theme=dark] .star-shine{stroke:#fffdf7}:root[data-theme=dark] .star-cheek{fill:#767267}:root[data-theme=dark] .star-halo{stroke:#c4bcae;opacity:.25}:root[data-theme=dark] .star-companions{fill:#d5cdbf}
:root[data-theme=dark] body:before{opacity:.012}:root[data-theme=dark] .course-art,:root[data-theme=dark] .studio-art{filter:grayscale(1);background:#30302d}:root[data-theme=dark] .mini-prompt{background:#484844;border-color:#66665e;box-shadow:7px 11px 0 #1115}:root[data-theme=dark] .mini-prompt-line{color:#f1eee5}:root[data-theme=dark] .mini-prompt-label,:root[data-theme=dark] .mini-window-dots{color:#c0bbaf}:root[data-theme=dark] .mini-chip{background:#353531;color:#d7d2c5}:root[data-theme=dark] .floating-spark{color:#cec7b6}:root[data-theme=dark] .course-cpp{color:#e0dace;text-shadow:3px 4px 0 #1119}:root[data-theme=dark] .code-token{background:#43433d;color:#ded8ca;border-color:#64645b}:root[data-theme=dark] .notebook{background:#595951;color:#efebdf;box-shadow:4px 5px 0 #a39e90,7px 9px 0 #0005}:root[data-theme=dark] .art-flow svg{opacity:.8;filter:grayscale(1)}:root[data-theme=dark] .portal,:root[data-theme=dark] .studio-card{border-color:#484841;box-shadow:inset 0 1px 0 #ffffff05}:root[data-theme=dark] .studio-wave{opacity:1}
.music-dock{display:flex;align-items:center;gap:7px}.music-toggle{box-shadow:0 5px 20px #35221212}.music-open-label{display:flex;align-items:center}.music-open-label svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;transition:rotate .2s}.music-toggle[aria-expanded=true] .music-open-label svg{rotate:180deg}.music-transport{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:var(--accent);color:var(--bg);box-shadow:0 5px 18px #30231518;transition:transform .2s,background .2s}.music-transport svg{width:19px;height:19px;fill:currentColor}.music-transport:hover{transform:translateY(-2px);background:var(--accent-bright)}.music-transport:active{transform:scale(.93)}.music-transport[data-state=playing]{background:var(--ink);color:var(--surface)}.music-dock.is-playing .music-open-label{animation:none}
@media(max-width:640px){.hello-toy{margin-right:0}.music-transport{width:37px;height:37px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}.reveal-ready{opacity:1;transform:none}.portal,.studio-card,.portal:hover,.studio-card:hover{transform:none!important}.ink-ring{display:none}}
/* Dedicated URL pages; shared layout and dialogs are retained across templates. */
.page-heading{display:none;padding-top:40px;padding-bottom:35px}.page-back{font-size:12px;color:var(--muted);display:inline-block;margin-bottom:27px}.page-back:hover{color:var(--accent)}.page-heading h1{font-family:var(--heading-font);font-size:40px;margin:0 0 10px}.page-heading p:last-child{font-size:14px;color:var(--muted)}
body:not([data-page]) .content-layout,body:not([data-page]) .studio-section,body[data-page=home] .content-layout,body[data-page=home] .studio-section{display:none}
body[data-page=notes] .welcome,body[data-page=notes] .section-portals,body[data-page=notes] .studio-section,body[data-page=notes] .about-section,body[data-page=notes] .ai-page-intro{display:none}
body[data-page=ai] .welcome,body[data-page=ai] .section-portals,body[data-page=ai] .content-layout,body[data-page=ai] .about-section,body[data-page=ai] .notes-page-intro{display:none}
body[data-page=notes] .page-heading,body[data-page=ai] .page-heading{display:block}
body[data-page=ai] .studio-wave{display:none}body[data-page=ai] .studio-section{padding-top:35px;padding-bottom:70px;min-height:55vh}body[data-page=ai] .studio-heading{display:none}
body[data-page=notes] .content-layout{padding-top:0;min-height:65vh}body[data-page=home] .about-section{padding-top:35px}
.desktop-nav>a[aria-current=page]:after{transform:scaleX(1)}
@media(max-width:640px){.page-heading{padding-top:25px;padding-bottom:25px}.page-heading h1{font-size:32px}}

.icp-line{text-align:center;padding:0 1rem 1.5rem;font-size:.78rem;color:var(--muted)}.icp-line a{color:inherit;text-decoration:none}.icp-line a:hover{text-decoration:underline}
@media(max-width:650px){.footer-inner>.copyright{grid-column:1/-1;grid-row:3}.footer-inner>.footer-note{grid-column:1/-1;grid-row:4;text-align:left}}

.music-dock[hidden]{display:none!important}
#local-audio{width:100%;max-width:100%}
