/* 034: a student's story table, plus an optional, user-led companion. */
#ui-refresh-notice{position:fixed;left:50%;top:12px;transform:translateX(-50%);width:max-content;max-width:calc(100vw - 24px);z-index:150;background:#fffdf9;color:#29303d;border:1px solid #d3c1b3;border-radius:12px;box-shadow:0 5px 24px #35271324;padding:12px 16px;display:flex;gap:12px;align-items:center;font-size:13px}#ui-refresh-notice[hidden],body:has(dialog[open]) #ui-refresh-notice{display:none}#ui-refresh-notice button{border:1px solid #d9c3b9;border-radius:8px;padding:8px 12px;background:#b94f44;color:white;white-space:nowrap}#ui-refresh-notice button:last-child{background:white;color:#6d5147}@media(max-width:600px){#ui-refresh-notice{flex-wrap:wrap;width:calc(100vw - 24px)}#ui-refresh-notice span{width:100%}}
#projects{padding:0;max-height:min(82dvh,700px);overflow:hidden;border:1px solid #e0ddd5;border-radius:18px;color:#29303d;background:#fffdf9}#projects[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto}#projects .dialog-head{padding:16px 20px;margin:0;gap:20px;border-bottom:1px solid #e7e2da;flex-wrap:wrap}#projects .dialog-head h2{font-size:18px;margin:0}#projects .projects-return{padding:10px 14px;min-height:42px;color:#923f35;background:#f7e8e1;border:1px solid #e7c8bd;border-radius:10px;font-size:14px;font-weight:600}#project-list{overflow-y:auto;min-height:0;overscroll-behavior:contain;padding:12px 20px}#projects .project-item{overflow-wrap:anywhere}#projects .projects-footer{border-top:1px solid #e7e2da;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#fffdf9}#projects .projects-footer span{font-size:12px;color:#6b7280}#projects .projects-footer button{white-space:nowrap;min-height:42px;background:#b94f44;border-color:#b94f44;color:white}@media(max-width:600px){#projects{max-width:calc(100vw - 24px);width:calc(100vw - 24px);max-height:85dvh}#projects .dialog-head{padding:13px;gap:14px}#project-list{padding:10px 13px}#projects .projects-footer{padding:12px 13px;flex-wrap:wrap}#projects .projects-footer span{width:100%}#projects .projects-footer button{width:100%}}
.student-scene-ui{--scene-paper:#faf9f6;--scene-red:#b94f44;--scene-ink:#29303d;--scene-mint:#c6ded1}
.student-scene-ui .mentor-sidebar-note,.student-scene-ui #mentor-launcher{display:none!important}
.student-scene-ui[data-director-stage=story]{background:var(--scene-paper);color:var(--scene-ink)}
.student-scene-ui[data-director-stage=story] .shell{display:block}.student-scene-ui[data-director-stage=story] .sidebar{position:relative;height:auto;width:auto;display:flex;flex-direction:row;align-items:center;padding:16px 32px;gap:32px;border-bottom:1px solid #e5e5e0;overflow:visible}.student-scene-ui[data-director-stage=story] .sidebar>.brand{flex:none}.student-scene-ui[data-director-stage=story] .sidebar>.sidebar-bottom{display:none}.student-scene-ui[data-director-stage=story] .sidebar>.nav{display:flex;flex-direction:row;flex:1;justify-content:flex-end;min-width:0;overflow-x:auto;gap:8px}.student-scene-ui[data-director-stage=story] .sidebar .nav-item{min-height:48px;padding:8px 12px;flex:none;border-radius:12px}.student-scene-ui[data-director-stage=story] .sidebar .journey-name small,.student-scene-ui[data-director-stage=story] .sidebar .journey-no{display:none}.student-scene-ui[data-director-stage=story] .sidebar .nav-item.active{color:var(--scene-red);background:#f7eae5}.student-scene-ui[data-director-stage=story] .sidebar .journey-symbol{background:transparent;color:inherit;width:25px}.student-scene-ui[data-director-stage=story] .topbar{max-width:1180px;margin:auto;background:transparent;border:0;padding:18px 30px}.student-scene-ui[data-director-stage=story] .content{max-width:1120px;margin:auto;padding:8px 30px 160px}.student-scene-ui[data-director-stage=story] .canvas-entry-tray{display:none}.student-scene-ui[data-director-stage=story] .stage-delivery{display:none}
.student-story-scene{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(260px,.8fr);gap:30px;align-items:center;padding:24px 0 30px;isolation:isolate}.scene-eyebrow{font-size:13px;color:#687367}.student-story-scene h1{font-size:36px;line-height:1.5;letter-spacing:-1px;margin:12px 0;color:var(--scene-ink);font-family:'Yuanti SC','PingFang SC',sans-serif;max-width:17em}.scene-copy>p{font-size:14px;color:#626975;line-height:1.9;margin:0 0 23px}.scene-story-slip{position:relative;background:white;border:1px solid #e3e3dc;border-left:5px solid var(--scene-mint);padding:20px 24px;box-shadow:5px 5px 0 #eeeee7}.scene-story-slip>span{font-size:11px;color:#758072;display:block;margin-bottom:8px}.scene-story-slip>strong{font-size:19px}.scene-story-slip>p{font-size:13px;line-height:1.85;color:#606775;margin:10px 0 16px;white-space:pre-wrap}.student-scene-ui .scene-primary{background:var(--scene-red);color:white;border:0;border-radius:12px;padding:12px 17px;min-height:44px;font-size:14px;box-shadow:none}.scene-entry-links{display:flex;align-items:center;gap:20px;margin-top:18px;flex-wrap:wrap}.scene-entry-links button,.scene-entry-links a{font-size:12px;color:#6a514a;background:none;border:0;padding:5px 0;text-decoration:underline;text-underline-offset:4px}.scene-companion-stage{min-height:365px;position:relative;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;padding-top:34px}.scene-companion-stage:before{content:'';position:absolute;width:260px;height:260px;background:#e9eee3;border-radius:50%;top:55px;z-index:-1}.scene-dumpling{background:transparent;border:0;padding:0;width:235px;height:315px;box-shadow:none;transform-origin:50% 90%;animation:scene-arrive .7s ease-out both}.scene-dumpling:hover{transform:rotate(-3deg)}.scene-dumpling img{width:100%;height:100%;object-fit:contain}.scene-speech{position:absolute;top:0;left:0;z-index:1;border:1px solid #dfdfd5;background:#fff;padding:12px 18px;border-radius:18px 18px 3px 18px;font-size:14px;line-height:1.7;color:#65594f;transform:rotate(-3deg)}.scene-name{font-size:11px;color:#6f756d;margin-top:4px}.student-scene-ui[data-director-stage=story] .film-duration{background:transparent;border:0;border-top:1px dashed #d9dcd3;border-bottom:1px dashed #d9dcd3;border-radius:0;padding:17px 0;margin:0 0 24px}.student-scene-ui[data-director-stage=story] .fast-steps{background:transparent;padding:0;justify-content:flex-start;gap:22px;margin:22px 0}.student-scene-ui[data-director-stage=story] .fast-steps button{background:transparent;color:#73806d;border:0;border-radius:0;padding:8px 0;border-bottom:2px solid transparent}.student-scene-ui[data-director-stage=story] .fast-steps button[aria-current=step]{border-color:var(--scene-red);color:var(--scene-red)}.student-scene-ui[data-director-stage=story] .story-notebook{border-radius:5px 19px 19px 5px;border-color:#e3e4da;box-shadow:5px 6px 0 #efeee7}.student-scene-ui[data-director-stage=story] .story-compose{grid-template-columns:minmax(0,1fr) 230px}.student-scene-ui[data-director-stage=story] .story-writing-note{background:#eaf0e7;border:0;transform:rotate(2deg);border-radius:4px}.student-scene-ui[data-director-stage=story] .primary{background:var(--scene-red);border-color:var(--scene-red)}
#student-companion{position:fixed;right:22px;bottom:18px;z-index:70;display:flex;flex-direction:column;align-items:flex-end;max-width:calc(100vw - 24px);transition:right .6s ease,left .6s ease}#student-companion[data-side=left]{right:auto;left:20px;align-items:flex-start}.companion-character{padding:0;background:transparent;border:0;box-shadow:none;width:110px;display:flex;align-items:center;flex-direction:column;color:#634e47}.companion-character img{width:95px;height:128px;object-fit:contain;filter:drop-shadow(0 5px 4px #3a291318)}.companion-character span{padding:5px 11px;border:1px solid #e2d8cf;background:#fffdf8;border-radius:12px;font-size:11px;box-shadow:0 2px 5px #00000005}.companion-character:hover img{transform:translateY(-4px)}.companion-bubble{width:310px;max-width:calc(100vw - 28px);background:#fffdf9;border:1px solid #dfd7ca;border-radius:20px 20px 4px 20px;padding:17px;margin-bottom:3px;box-shadow:0 12px 45px #41361e20;color:#29303d;max-height:calc(100dvh - 195px);overflow:auto}.companion-bubble header{display:flex;justify-content:space-between;align-items:center}.companion-bubble header strong{font-size:14px}.companion-bubble header button{padding:1px 8px;min-height:30px;font-size:20px}.companion-bubble>p{font-size:14px;line-height:1.9;white-space:pre-wrap;margin:8px 0 12px}.companion-choices{display:grid;gap:7px}.companion-choices button{background:white;border:1px solid #e1dbcf;border-radius:10px;text-align:left;color:#77524b;font-size:13px;min-height:39px;padding:9px 12px}.companion-bubble footer{margin-top:13px;border-top:1px dashed #e0ddd4;padding-top:10px}.companion-bubble footer small{font-size:10px;color:#737369;line-height:1.7;display:block}.companion-bubble footer>div{display:flex;gap:8px;flex-wrap:wrap}.companion-bubble footer button{font-size:11px;padding:9px 0;min-height:32px}.companion-restore{background:#fffdf8;border:1px solid #e0d8ce;border-radius:18px;padding:9px 14px;font-size:12px;color:#6a514a}.student-scene-ui:has(dialog[open]) #student-companion{display:none}.student-scene-ui .content{padding-bottom:160px}.student-scene-ui .mentor-dialog-head img{width:68px;height:80px;object-fit:contain}.student-scene-ui .canvas-coach>img{width:58px;height:76px;object-fit:contain}.student-scene-ui .canvas-coach{grid-template-columns:58px minmax(0,1fr) auto}
@keyframes scene-arrive{from{opacity:0;transform:translateY(18px) rotate(4deg)}to{opacity:1;transform:none}}@keyframes companion-hop{0%,100%{transform:translateY(0)}35%{transform:translateY(-14px) rotate(-5deg)}65%{transform:translateY(-6px) rotate(4deg)}}
@media(max-width:1000px){.student-scene-ui[data-director-stage=story] .sidebar{flex-wrap:wrap;gap:15px;padding:15px 20px}.student-scene-ui[data-director-stage=story] .sidebar>.nav{justify-content:flex-start}.student-scene-ui[data-director-stage=story] .sidebar .journey-name strong{font-size:12px}.student-scene-ui[data-director-stage=story] .sidebar .nav-item{padding:7px 9px}.student-story-scene{gap:15px}.student-story-scene h1{font-size:30px}.scene-companion-stage:before{width:230px;height:230px}.scene-dumpling{width:210px}}
@media(max-width:700px){.student-scene-ui[data-director-stage=story] .sidebar{display:block;padding:14px 14px 0}.student-scene-ui[data-director-stage=story] .sidebar>.nav{margin-top:14px;padding-bottom:10px}.student-scene-ui[data-director-stage=story] .topbar{padding:13px 15px}.student-scene-ui[data-director-stage=story] .content{padding:0 17px 140px}.student-story-scene{grid-template-columns:minmax(0,1fr);gap:0;padding:15px 0 25px;position:relative}.student-story-scene h1{font-size:26px;max-width:11em;margin-right:38px}.scene-copy>p{font-size:12px;max-width:20em;margin-bottom:155px}.scene-companion-stage{position:absolute;top:78px;right:0;min-height:0;height:184px;width:160px;padding:0;pointer-events:none}.scene-companion-stage:before{width:146px;height:146px;top:25px}.scene-dumpling{width:135px;height:185px;pointer-events:auto}.scene-speech{font-size:11px;top:25px;left:-164px;padding:9px 12px}.scene-name{display:none}.scene-story-slip{padding:17px}.scene-entry-links{gap:16px;margin-top:17px}.student-scene-ui[data-director-stage=story] .story-compose{grid-template-columns:minmax(0,1fr)}.student-scene-ui[data-director-stage=story] .fast-steps{gap:10px}.student-scene-ui[data-director-stage=story] .fast-steps button{font-size:11px}.student-scene-ui[data-director-stage=story] .story-writing-note{transform:none}#student-companion{right:10px;bottom:10px}#student-companion[data-side=left]{left:10px}.companion-character{width:79px}.companion-character img{width:72px;height:94px}.companion-character span{font-size:10px;padding:4px 7px}.companion-bubble{width:290px;padding:15px;max-height:calc(100dvh - 155px)}.student-scene-ui .canvas-coach{grid-template-columns:48px minmax(0,1fr)}.student-scene-ui .canvas-coach>img{width:48px;height:65px}.student-scene-ui .canvas-coach>button{grid-column:2;justify-self:start}.student-scene-ui .content{padding-bottom:140px}}
.student-scene-ui[data-director-stage=story] .workspace{background:var(--scene-paper)}
.scene-speech{white-space:pre-line}
#student-companion{transition:transform .6s ease;transform:translateX(0)}#student-companion[data-side=left]{left:auto;right:22px;transform:translateX(calc(-100vw + 100% + 44px))}
@media(max-width:700px){#student-companion[data-side=left]{left:auto;right:10px;transform:translateX(calc(-100vw + 100% + 20px))}}
@media(max-width:700px){.student-story-scene{grid-template-columns:minmax(0,1fr) 145px;column-gap:12px;row-gap:10px}.scene-copy{display:contents}.scene-eyebrow,.student-story-scene h1{grid-column:1/-1}.student-story-scene h1{max-width:none;margin:0;line-height:1.5}.scene-copy>p{grid-column:1;grid-row:3;margin:15px 0 0;max-width:none;align-self:start}.scene-companion-stage{grid-column:2;grid-row:3;position:relative;inset:auto;width:145px;height:205px;pointer-events:auto;justify-content:flex-end}.scene-companion-stage:before{top:55px;width:140px;height:140px}.scene-speech{position:relative;inset:auto;align-self:center;font-size:11px;padding:7px 10px;margin-bottom:-3px;flex:none}.scene-dumpling{width:115px;height:153px;flex:none}.scene-story-slip{grid-column:1/-1;margin-top:5px}.scene-entry-links{grid-column:1/-1;margin-top:12px}}
@media(prefers-reduced-motion:reduce){.student-scene-ui *,#student-companion{animation:none!important;transition:none!important;scroll-behavior:auto!important}}@media print{#student-companion,.student-story-scene{display:none!important}}

/* 037: return to the existing story landing, without rebuilding the draft. */
.scene-home-nav{position:sticky;top:0;z-index:35;background:#faf9f6;padding:10px 0;margin-bottom:8px;border-bottom:1px solid #e5e5e0}.scene-home-nav button{display:inline-flex;align-items:center;min-height:44px;border:1px solid #d9c5bc;border-radius:10px;padding:10px 16px;background:#fffdf9;color:#923f35;font-size:14px;font-weight:600}.scene-home-nav button:focus-visible{outline:3px solid #2457db;outline-offset:3px}.student-story-scene{scroll-margin-top:78px}.student-story-scene h1:focus{outline:none}

/* 038: six intentional projectionist poses; motion follows user input. */
.companion-character img{filter:none}.scene-dumpling{animation:none}.scene-dumpling img,.companion-character img{object-position:center bottom}.student-scene-ui .mentor-dialog-head img,.student-scene-ui .canvas-coach>img{object-position:center bottom}

/* 039: small responsive movements, with an optional short greeting. */
.companion-character{transform-origin:50% 90%;animation:desk-companion-breathe 6.5s ease-in-out infinite}.companion-character img,.scene-dumpling img{transform-origin:50% 90%;animation:desk-pose-settle .45s ease-out both}.scene-dumpling{transform-origin:50% 90%;animation:desk-companion-sway 8s ease-in-out infinite}.companion-character:hover img{transform:rotate(-3deg) translateY(-3px)}.companion-hello{width:240px;max-width:calc(100vw - 30px);padding:13px 16px;margin-bottom:4px;background:#fffdf9;border:1px solid #dfd7ca;border-radius:17px 17px 4px 17px;box-shadow:0 8px 25px #41361e15;animation:desk-hello-enter .3s ease-out both}.companion-hello p{font-size:13px;line-height:1.8;color:#514d46;margin:0 0 5px}.companion-hello button{font-size:12px;background:transparent;border:0;color:#923f35;padding:7px 0;min-height:36px}.companion-hello button:focus-visible{outline:2px solid #2457db;outline-offset:2px}#student-companion[data-mode=quiet] .companion-character,body:has(textarea:focus,input:focus) #student-companion .companion-character{animation:none}
@keyframes desk-companion-breathe{0%,100%{transform:translateY(0) rotate(0)}45%{transform:translateY(-2px) rotate(1deg)}75%{transform:translateY(-1px) rotate(-.7deg)}}@keyframes desk-companion-sway{0%,100%{transform:rotate(0)}35%{transform:rotate(-1.2deg)}70%{transform:rotate(.8deg)}}@keyframes desk-pose-settle{from{opacity:.65;transform:translateY(4px) scale(.97)}to{opacity:1;transform:none}}@keyframes desk-hello-enter{from{opacity:0;transform:translateY(6px) scale(.96)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.companion-character,.companion-character img,.scene-dumpling,.scene-dumpling img,.companion-hello{animation:none!important;transition:none!important;transform:none!important}}

body:has(textarea:focus,input:focus) .scene-dumpling,body:has(#student-companion[data-mode=quiet]) .scene-dumpling{animation:none}

/* 046: short, concrete responses and a visible destination for help. */
.companion-reaction{width:270px}.companion-reaction button+button{margin-left:14px}.companion-target{outline:3px solid #b49bdc!important;outline-offset:5px;scroll-margin:100px}
#student-companion[data-reaction=active] .companion-character img{animation:desk-response-lean 1.5s ease-in-out 2}
@keyframes desk-response-lean{0%,100%{transform:translateY(0) rotate(0)}35%{transform:translateY(-5px) rotate(-5deg)}70%{transform:translateY(-1px) rotate(3deg)}}
@media(prefers-reduced-motion:reduce){#student-companion[data-reaction=active] .companion-character img{animation:none!important}}
