:root{color-scheme:dark;--bg:#0f1523;--surface:#1b2538;--raised:#26324e;--border:#34425d;--text:#edf1fc;--muted:#a7b3cb;--accent:#797de8;--pale:#d0d5ff}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif;font-size:16px;line-height:1.65}button,input,textarea{font:inherit}button,a,input,textarea{-webkit-tap-highlight-color:transparent}button,a{touch-action:manipulation}button{cursor:pointer}a{color:inherit;text-decoration:none}button{color:inherit}svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.icon-defs{position:absolute;width:0;height:0;overflow:hidden}button:focus-visible,a:focus-visible{outline:3px solid #a6afff;outline-offset:4px}[hidden]{display:none!important}.topbar{height:80px;background:#1a2435;border-bottom:1px solid var(--border)}.header-inner{max-width:1370px;padding:0 2px;margin:auto;height:100%;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:13px;white-space:nowrap}.brand img{width:46px;height:46px;object-fit:cover;border-radius:50%;border:2px solid #f0dec1}.brand strong{font-size:22px;letter-spacing:.5px}.brand-divider{height:22px;width:1px;background:#768098;margin:0 2px}.series{font-size:15px;color:#b9c1d0}.topnav{display:flex;align-items:center;gap:30px}.topnav button{display:flex;align-items:center;gap:9px;background:none;border:0;font-size:15px;color:#d5dff6;padding:9px 4px}.topnav button:hover{color:white}.topnav .login{border:1px solid var(--border);border-radius:30px;padding:8px 20px}.layout{max-width:1370px;margin:22px auto 0;display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:26px;align-items:start}.learning-column{min-width:0}.hero{height:332px;border-radius:17px;position:relative;overflow:hidden;isolation:isolate}.hero>img{width:100%;height:100%;object-fit:cover;object-position:55% 50%;position:absolute;inset:0}.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(12,31,29,.85),rgba(12,31,29,.47) 36%,rgba(12,31,29,0) 72%),linear-gradient(0deg,rgba(7,27,22,.24),transparent 45%)}.hero-copy{position:relative;padding:28px 38px;color:#fff7e3}.eyebrow{font-size:13px;letter-spacing:2px;color:#eee6c9}.eyebrow span{margin:0 8px}h1{font-family:"STKaiti","KaiTi","Noto Serif SC",serif;font-weight:500;font-size:66px;letter-spacing:12px;line-height:1.2;margin:17px 0 6px}.author{font-size:15px;letter-spacing:3px;margin:4px 0 13px;color:#ebe8d5}.verse{font-family:"STKaiti","KaiTi",serif;font-size:23px;letter-spacing:2px;margin:0 0 22px}.hero-tags{display:flex;gap:9px}.hero-tags span{font-size:12px;background:#ffffff1c;border:1px solid #fff3c944;padding:3px 10px;border-radius:5px;backdrop-filter:blur(5px)}.hero-caption{position:absolute;right:25px;bottom:22px;font-size:12px;letter-spacing:2px;color:#fffbe9;text-shadow:0 1px 5px #000}.tabs{display:grid;grid-template-columns:repeat(3,1fr);padding:5px;background:var(--raised);border-radius:15px;margin:21px 0 23px;gap:5px}.tabs button,.tabs>a{display:flex;align-items:center;justify-content:center;gap:9px;min-height:46px;background:transparent;border:0;border-radius:11px;font-size:15px;color:#cbd4e9}.tabs button[aria-selected=true]{background:#7175df;color:#fff;box-shadow:0 2px 8px #12172a33}.tabs button:hover:not([aria-selected=true]),.tabs>a:hover{background:#ffffff0a}.tabs svg{width:18px;height:18px}.panel{padding:28px 25px 20px;background:var(--surface);border:1px solid var(--border);border-radius:18px;min-height:430px}.section-kicker{font-size:13px;font-weight:600;color:#d5e3f5;letter-spacing:.5px;margin:1px 0 12px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.section-heading>span{font-size:12px;color:var(--muted)}h2{font-size:23px;font-weight:500;margin:0 0 16px;letter-spacing:.4px}.section-heading h2{margin-bottom:0}.question{display:flex;gap:19px;padding:28px 0 25px;border-bottom:1px solid #6d789362}.question:first-child{padding-top:33px}.question:last-child{border:0}.question-number{font-size:24px;font-weight:650;color:#a2b7f2;line-height:1.45;font-variant-numeric:tabular-nums}.question-body p{margin:0 0 13px;font-size:16px;line-height:1.9}.question button,.primary{display:inline-flex;align-items:center;gap:14px;padding:9px 14px;background:var(--pale);color:#182c53;border:1px solid #e0e4ff;border-radius:8px;font-size:13px;font-weight:600;min-height:41px}.question button:hover,.primary:hover{background:#e1e4ff}.question button svg{width:17px;height:17px}.question.active .question-number{color:#e3e6ff}.question.active button{background:#aebaff}.panel-foot{font-size:12px;color:#92a0bc;border-top:1px dashed #46516b;padding-top:17px}.tutor{position:sticky;top:22px;background:var(--surface);border:1px solid var(--border);border-radius:18px;overflow:hidden;display:flex;flex-direction:column;height:calc(100dvh - 124px);min-height:560px;max-height:920px}.tutor-header{display:flex;align-items:center;gap:11px;padding:22px 20px;background:#27324e;border-bottom:1px solid var(--border)}.chat-icon{width:43px;height:43px;border-radius:14px;background:#545dce;display:grid;place-items:center}.chat-icon svg{width:25px;height:25px}.tutor-header h2{font-size:18px;font-weight:650;margin:0 0 2px;letter-spacing:0}.tutor-header p{font-size:12px;color:#bbc5dc;margin:0}.tutor-header>button{margin-left:auto;background:none;border:0;font-size:24px;color:#adbad3;padding:0 3px}.messages{flex:1;overflow:auto;padding:20px;scroll-behavior:smooth;min-height:170px}.message{padding:15px 14px;background:#252f45;border-radius:0 15px 15px 15px;margin-bottom:16px;font-size:14px;line-height:1.9;overflow-wrap:anywhere}.message p{margin:0;white-space:pre-wrap}.message .message-label{display:block;font-size:12px;color:#a7b6d5;margin-bottom:7px}.message.user{background:#414979;border-radius:15px 0 15px 15px;margin-left:20px}.chat-hint{margin:35px 10px;color:#8e9bb4;text-align:center;font-size:12px}.chat-hint span{color:#b1bdd4}.chat-hint p{line-height:1.9}.composer{padding:13px 16px 16px;border-top:1px solid #495670}.connection-status{font-size:12px;color:#b2bfd8;margin:0 0 9px}.composer textarea{width:100%;height:90px;padding:12px 11px;resize:vertical;min-height:70px;max-height:180px;background:var(--bg);border:1px solid #46536e;border-radius:10px;color:var(--text);font-size:14px;outline:none}.composer textarea:focus{border-color:#9c9eff;box-shadow:0 0 0 3px #7b7eee35}textarea::placeholder,input::placeholder{color:#8c96ac}.keyboard-hint{font-size:12px;color:#b3bed5;margin:5px 0 12px}.composer-bottom{display:flex;align-items:end;justify-content:space-between;gap:8px}.composer-bottom>span{font-size:11px;color:#8f9db6}.send{display:flex;align-items:center;gap:7px;padding:8px 12px;border:0;background:#6268c6;border-radius:10px;font-size:14px}.send:hover{background:#787ee2}.send svg{width:17px;height:17px}.send:disabled{opacity:.5;cursor:wait}.page-footer{color:#71819e;text-align:center;font-size:12px;padding:25px 10px}.page-footer span{padding:0 10px}.muted{color:var(--muted);font-size:14px}.poem{text-align:center;padding:20px 0 24px;background:#141f31;border-radius:12px;margin:22px 0}.poem h3{font-family:"KaiTi",serif;font-size:32px;font-weight:400;letter-spacing:8px;margin:0}.poem p:last-child{font-family:"KaiTi",serif;font-size:23px;line-height:2.25;margin:15px 0 0}.notes{font-size:14px;margin:23px 0}.notes strong{color:#c5cff7}.game-panel{padding:25px 20px}.game-panel a{font-size:13px;color:#c9d0ff}.game-tip{font-size:12px}.game-panel iframe{width:100%;height:650px;border:1px solid #52645d;border-radius:12px;background:#eef4e7}#creation-form{margin-top:25px}#creation-form label{display:block;font-size:14px;margin-bottom:20px;color:#ced6ed}#creation-form input,#creation-form textarea{display:block;width:100%;background:#121c2d;border:1px solid #43516d;border-radius:9px;padding:12px;margin-top:8px;color:var(--text);outline:none}#creation-form textarea{height:110px;resize:vertical}#creation-form input:focus,#creation-form textarea:focus{border-color:#969bea}.creation-actions{display:flex;align-items:center;gap:13px;flex-wrap:wrap}.secondary{padding:9px 14px;background:none;border:1px solid #667598;border-radius:8px;font-size:13px}.storage-note,#save-state{font-size:12px;color:#a7b4cc}dialog{position:fixed;background:var(--surface);color:var(--text);width:min(560px,calc(100% - 32px));max-height:85dvh;border:1px solid #53627e;border-radius:18px;padding:34px;box-shadow:0 30px 100px #0008}dialog::backdrop{background:#050b18aa;backdrop-filter:blur(5px)}.dialog-close{position:absolute;right:14px;top:8px;font-size:28px;border:0;background:none;color:#c9d1e6}.dialog-poem{padding:18px;background:#121c2d;border-radius:10px;line-height:2.1}.progress-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px;margin:25px 0}.progress-grid>div{padding:20px;background:#121c2d;border-radius:12px}.progress-grid strong{display:block;font-size:30px;color:#b8c5ff}.progress-grid span{font-size:13px}.toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);padding:12px 24px;background:#d1d8fc;color:#1a294c;border-radius:10px;box-shadow:0 5px 25px #0005;z-index:10;font-size:14px;max-width:90vw}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}@media(min-width:1700px){.header-inner,.layout{max-width:1370px}}@media(max-width:1450px){.header-inner,.layout{margin-left:32px;margin-right:32px}.layout{grid-template-columns:minmax(0,1fr) 330px;gap:24px}.hero-copy{padding-left:30px}}@media(max-width:1050px){.layout{grid-template-columns:minmax(0,1fr) 305px;gap:18px;margin-left:20px;margin-right:20px}.header-inner{margin:0 20px}.topnav{gap:15px}.brand strong{font-size:19px}.series{font-size:13px}.hero-caption{display:none}.hero{height:310px}.section-heading>span{display:none}.question{gap:13px}.panel{padding:24px 20px}.tutor-header{padding:20px 15px}.messages{padding:16px}.composer-bottom>span{max-width:150px}.verse{font-size:20px}.hero-copy{padding-left:25px}}@media(max-width:800px){.topbar{height:auto;min-height:78px}.header-inner{flex-wrap:wrap;gap:8px;padding:14px 0}.topnav{width:100%;justify-content:space-between;padding-left:2px}.topnav button{font-size:13px}.brand{gap:9px}.brand img{width:38px;height:38px}.brand strong{font-size:19px}.series{font-size:13px}.layout{display:block;margin:18px 16px 0}.tutor{position:relative;top:0;height:540px;min-height:0;max-height:none;margin-bottom:24px}.hero{height:290px}.hero-copy{padding:25px}h1{font-size:58px}.hero-tags{gap:7px}.hero-tags span{font-size:12px}.tabs{margin:17px 0;padding:4px;gap:2px}.tabs button,.tabs>a{font-size:13px;gap:5px}.tabs svg{width:16px;height:16px}.panel{padding:24px 20px}.question{padding:24px 0}.question-body p{font-size:15px}.section-heading h2{font-size:22px}.tutor-header{padding:18px 20px}.composer-bottom>span{max-width:none}.game-panel iframe{height:650px}.poem p:last-child{font-size:20px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.tutor-avatar{width:48px;height:48px;border-radius:50%;overflow:hidden;flex-shrink:0;background:#5c5aa4}.tutor-avatar img{width:100%;height:100%;object-fit:cover;object-position:center}.tabs>a{line-height:1.65}.composer-bottom>span{font-size:12px;line-height:1.65;max-width:205px}

.works-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:24px 0}.work-card{padding:22px;border:1px solid #475473;border-radius:12px;background:#142033;min-width:0}.work-card h3{font-size:20px;font-weight:500;overflow-wrap:anywhere;margin:7px 0 12px}.work-card>p{font-size:14px;color:#c0cbe2;line-height:1.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;min-height:80px}.work-card time{display:block;font-size:12px;color:#9aabc8;margin:14px 0}.work-scene{border-top:1px solid #43516d;padding:14px 0}.work-scene h3{font-size:14px;color:#b9c9f3}.work-scene p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:16px;line-height:1.9}#submit-work:disabled{opacity:.55;cursor:wait}.topnav{gap:22px}@media(max-width:1050px) and (min-width:801px){.header-inner{flex-wrap:wrap;padding:10px 0}.topbar{height:auto;min-height:80px}.topnav{gap:16px}.topnav button{font-size:13px}}@media(max-width:800px){.topnav{gap:7px;flex-wrap:wrap}.topnav button{font-size:12px;gap:4px}.topnav .login{padding:7px 12px}.topnav svg{width:16px;height:16px}.works-grid{grid-template-columns:1fr}}

.poem-switcher{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:15px}.poem-switcher a{font-size:13px;padding:6px 12px;border:1px solid var(--border);border-radius:20px;color:#c8d3e9}.poem-switcher a[aria-current=page]{background:#343e68;border-color:#8184d8;color:#fff}.hero h1.long-title{font-size:38px;letter-spacing:2px;margin-top:25px}.hero h1{font-size:clamp(32px,4vw,66px)}#panel-tutor{background-image:linear-gradient(90deg,rgba(10,25,35,.76),rgba(10,25,35,.52)),var(--reading-image);background-size:cover;background-position:center;overflow:hidden;text-shadow:0 1px 5px #051823}#panel-tutor .poem{background:rgba(10,25,35,.26);backdrop-filter:blur(1px)}#panel-tutor .muted,#panel-tutor .notes{color:#f0f4fa}#panel-tutor .primary{text-shadow:none}#panel-tutor .notes{line-height:2;background:#10233260;border-radius:8px;padding:12px 16px}@media(max-width:800px){.poem-switcher{gap:6px}.poem-switcher a{font-size:12px;padding:5px 10px}.hero h1.long-title{font-size:30px}.hero h1{font-size:44px}.verse{font-size:18px}}

#panel-tutor .poem{min-height:360px;padding:32px 20px;display:flex;flex-direction:column;justify-content:center;margin:22px 0 26px}#panel-tutor .poem p:last-child{font-size:26px;line-height:2.4}@media(max-width:800px){#panel-tutor .poem{min-height:320px;padding:26px 12px}#panel-tutor .poem p:last-child{font-size:21px;line-height:2.25}}

.return-main{display:block;margin:0 0 12px;color:#c1cbea;font-size:14px}.return-main:hover{color:white}

.world-entry{display:inline-flex;align-items:center;justify-content:center;margin-top:22px;padding:10px 18px;border:1px solid #fff6c880;border-radius:9px;background:#203e3b8c;color:#fff8e9;font-size:14px;backdrop-filter:blur(5px)}.world-entry:hover{background:#365951cc}.world-entry:focus-visible{outline:3px solid #fff1bd;outline-offset:4px}

.topnav>a{display:flex;align-items:center;gap:9px;font-size:15px;color:#d5dff6;padding:9px 4px}@media(max-width:1050px){.topnav>a{font-size:13px}}@media(max-width:800px){.topnav>a{font-size:12px;gap:4px}}

/* Keep each poetic clause intact on small screens, including seven-character lines. */
.poem-clause{display:inline-block;white-space:nowrap}#panel-tutor .poem h3{overflow-wrap:anywhere}@media(max-width:480px){.hero h1.long-title{font-size:clamp(24px,7vw,30px);letter-spacing:1px}.hero-copy{padding-left:24px;padding-right:24px}.hero-caption{letter-spacing:1px;left:24px;right:24px;text-align:right}#panel-tutor .poem h3{font-size:26px;letter-spacing:3px}}

/* Long titles and prose retain the shared reading layout without clipped text. */
.hero.hero-long{height:auto;min-height:332px}.hero-long .hero-copy{padding-bottom:80px}.hero h1.long-title{text-wrap:balance}.poem h3{text-wrap:balance}#panel-tutor .poem.prose p:last-child{text-align:left;letter-spacing:1px;font-size:23px;line-height:2.05;overflow-wrap:anywhere}#panel-tutor .poem.prose h3,#panel-tutor .poem.prose .muted{text-align:center}.prose-paragraph{display:block;margin-bottom:.8em}.prose-paragraph:last-child{margin-bottom:0}@media(max-width:800px){#panel-tutor .poem.prose p:last-child{font-size:20px;line-height:1.95}}@media(max-width:480px){.hero h1:not(.long-title){letter-spacing:4px}.hero-long .hero-copy{padding-bottom:76px}#panel-tutor .poem.prose{padding:24px 12px}}

/* Lower title, byline and world entry together; keep the lesson number in place. */
.hero{height:auto;min-height:332px}.hero .hero-copy{padding-bottom:60px}.hero h1{margin-top:45px}.hero h1.long-title{margin-top:53px}
@media(max-width:1050px){.hero{min-height:310px}}
@media(max-width:800px){.hero{min-height:290px}.hero h1{margin-top:37px}.hero h1.long-title{margin-top:45px}.hero .hero-copy{padding-bottom:40px}}

.footer-actions{display:flex;align-items:stretch;justify-content:center;flex-wrap:wrap;gap:12px;max-width:640px;margin:0 auto 14px}.footer-actions>.secondary{display:inline-flex;align-items:center;justify-content:center;min-height:41px;margin:0;text-align:center;line-height:1.65}.footer-actions>.return-main{margin:0;text-decoration:none}@media(max-width:600px){.footer-actions{width:100%}.footer-actions>.secondary{flex:1;min-width:0;text-wrap:balance}}

.page-footer{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:14px 12px;padding-inline:0}.page-footer>.footer-actions{grid-column:2;grid-row:1;margin:0}.student-profile{grid-column:1;grid-row:1;text-align:left;font-size:12px;line-height:1.6;margin:0;overflow-wrap:anywhere}.footer-caption{grid-column:1/-1;grid-row:2;margin:0}@media(max-width:1000px){.page-footer{grid-template-columns:minmax(0,1fr)}.page-footer>.footer-actions{grid-column:1;grid-row:1}.student-profile{grid-column:1;grid-row:2}.footer-caption{grid-column:1;grid-row:3}}

.page-footer>.footer-actions{justify-self:center;max-width:100%}

/* Shared exploration polish: align the footer card and lower only the hero title group. */
.page-footer{display:block;width:100%;min-width:0;padding:0;margin:24px 0 0}
.learning-footer-card{width:100%;min-width:0;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:18px 24px;padding:22px 24px;background:var(--surface);border:1px solid var(--border);border-radius:18px}
.learning-footer-card>.student-profile{flex:1 1 150px;min-width:0;margin:0;text-align:left}
.learning-footer-card>.footer-actions{flex:0 1 auto;min-width:0;max-width:100%;margin:0;justify-content:center}
.page-footer>.footer-caption{margin:14px 0 24px}
.hero h1{margin-top:69px}.hero h1.long-title{margin-top:77px}.hero .hero-copy{padding-bottom:40px}
@media(max-width:1050px) and (min-width:801px){.learning-footer-card{padding:20px;gap:14px}.learning-footer-card>.student-profile{flex-basis:100%}.learning-footer-card>.footer-actions{width:100%}}
@media(max-width:800px){.hero h1{margin-top:57px}.hero h1.long-title{margin-top:65px}.hero .hero-copy{padding-bottom:24px}.learning-footer-card{padding:20px;gap:16px}.learning-footer-card>.student-profile{flex-basis:100%}.learning-footer-card>.footer-actions{width:100%}}

.learning-footer-card>.footer-actions:only-child{margin-inline:auto}

/* Current child's profile belongs in the banner; the footer contains only navigation. */
.hero>.student-profile{position:absolute;right:25px;bottom:22px;z-index:1;max-width:48%;color:#fffbe9;text-align:right;font-size:12px;line-height:1.65;margin:0;text-shadow:0 1px 5px #051823;overflow-wrap:anywhere}
.learning-footer-card{justify-content:center;margin-bottom:24px}
@media(max-width:1050px){.hero>.student-profile{position:relative;right:auto;bottom:auto;max-width:none;margin:0 25px 22px;text-align:right}}
@media(max-width:480px){.hero>.student-profile{margin-left:24px;margin-right:24px}}

/* Footer navigation keeps the two buttons without an enclosing card. */
.learning-footer-card{background:transparent;border:0;border-radius:0}

/* Keep the footer centered across the page and dock the tutor to the last panel at the bottom. */
.layout{row-gap:18px}
.tutor-column{min-width:0;align-self:stretch;position:relative}
.page-footer{grid-column:1/-1;margin:0 0 24px}
.learning-footer-card{padding:0;margin:0;justify-content:center}
.learning-footer-card>.footer-actions{width:auto;max-width:100%;margin:0 auto}
@media(min-width:801px){.tutor-column{min-height:clamp(560px,calc(100dvh - 124px),920px)}.layout.at-page-end>.tutor-column>.tutor{position:absolute;top:auto;bottom:0;width:100%}}
@media(max-width:800px){.page-footer{margin-top:18px}.learning-footer-card>.footer-actions{width:100%}}

@media(min-width:801px){.learning-column{align-self:stretch;display:flex;flex-direction:column}.learning-column>.hero,.learning-column>.tabs{flex-shrink:0}.learning-column>.panel:not([hidden]){flex:1}}

.topnav>a,.topnav>button{min-height:44px;box-sizing:border-box}.world-entry,.footer-actions>.secondary{min-height:44px}.dialog-close,#clear-chat{min-width:44px;min-height:44px}
