.story-panel{--scene:#83b79e;--scene-dim:#1b3026;--scene-ink:#d6e8dc;padding-bottom:20px;position:relative}.story-panel .section-title{margin-bottom:18px}.story-panel .section-title span{font-size:10px;color:#9eb8a9}.story-scene{display:grid;grid-template-columns:190px minmax(0,1fr);gap:28px;align-items:center;min-height:220px}.story-stage{position:relative;isolation:isolate;min-width:0;height:210px;display:flex;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--scene) 30%,transparent);background:radial-gradient(ellipse at 50% 45%,var(--scene-dim),transparent 75%);overflow:hidden;color:var(--scene);border-radius:2px}.story-stage:before{content:'';position:absolute;inset:10px;pointer-events:none;border-top:1px solid color-mix(in srgb,var(--scene) 18%,transparent);border-bottom:1px solid color-mix(in srgb,var(--scene) 18%,transparent)}.story-stage>img{width:100%;height:100%;object-fit:contain;animation:stage-float 6s ease-in-out infinite;max-height:185px}.stage-label{position:absolute;bottom:7px;left:5px;right:5px;text-align:center;color:var(--scene);font-size:8px;letter-spacing:.03em;line-height:1.25;background:#09100bc9;padding:3px 1px}.cyborg{width:145px;height:150px;position:relative;display:flex;align-items:center;justify-content:center;animation:stage-float 6s ease-in-out infinite}.story-face{width:130px;height:130px;background:url('/k-ai/assets/k-ai-expressions-02.png') 0 0/300% 200%;filter:grayscale(.8) sepia(.35) hue-rotate(70deg);position:relative;z-index:2;transform:translateY(-5px)}.cyborg:after{content:'';width:76px;height:12px;border:1px solid var(--scene);border-radius:50%;position:absolute;bottom:2px;opacity:.3}.speech{max-width:none}.story-panel .speech h3{font-size:16px;line-height:1.5;color:var(--scene-ink);margin:0 0 14px}.story-panel .speech p{font-size:14px;line-height:1.8;max-width:58ch;margin:0}.story-panel #story-echo{font-size:12px;color:var(--scene);margin-top:14px;border-left:1px solid var(--scene);padding-left:12px}.story-panel .choices{padding-left:218px;display:grid;grid-template-columns:1fr;gap:8px;margin:20px 0 12px}.story-panel .choices button,.story-panel .choices a{border:1px solid #334a3c;background:#101b14;display:flex;align-items:center;position:relative;padding:10px 16px;min-height:44px;font-size:12px;line-height:1.55}.story-panel .choices button:before,.story-panel .choices a:before{content:'›';margin-right:12px;color:var(--scene)}.story-panel .choices button:hover,.story-panel .choices a:hover{border-color:var(--scene);background:var(--scene-dim)}.story-panel .choices button[data-seen=true]{border-color:#2c3c32}.story-panel .chat-nav{padding-left:218px;gap:22px;align-items:center;min-height:44px;flex-wrap:wrap}.story-panel .chat-nav button{color:#a5beae;font-size:11px;padding:8px 0;min-height:44px}.story-panel .chat-nav button:disabled{opacity:.3;cursor:default}.story-panel #chat-reset{color:#d7e9da}.story-panel #story-found{padding-left:218px;font-size:10px;line-height:1.5;color:#d6ad7e;margin:12px 0}.story-fine{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;border-top:1px solid #24382a;margin-top:14px;padding-top:12px;color:#849f8e;font-size:9px}.story-fine details{max-width:70%;text-align:right}.story-fine summary{cursor:pointer;min-height:30px}.story-fine details[open]{width:70%}.story-fine details div{font-size:11px;text-align:left;line-height:1.65;padding:12px;background:#111d16;border:1px solid #2c4234}.story-fine details p{margin:0 0 8px}.story-fine a{color:#a0bfee;text-decoration:underline;text-underline-offset:3px}.deep-story .story-stage:after{content:'';position:absolute;left:0;right:0;top:28%;height:1px;background:var(--scene);opacity:.13;pointer-events:none;animation:story-scan 12s linear infinite}.story-panel[data-form=noir]{--scene:#b6c6bf;--scene-dim:#29363c;--scene-ink:#e3e6de}.story-panel[data-form=noir] .story-stage{background:repeating-linear-gradient(112deg,transparent 0 23px,#c7d8d908 24px 25px),linear-gradient(145deg,#071217,#364549)}.story-panel[data-form=mecha]{--scene:#85b0ff;--scene-dim:#142c48;--scene-ink:#cfdefb}.story-panel[data-form=mecha] .story-stage{background:repeating-conic-gradient(from 20deg at 50% 50%,#1f456126 0 3deg,transparent 3deg 22deg),radial-gradient(#193251,#091016)}.story-panel[data-form=toy]{--scene:#eac68d;--scene-dim:#322a19;--scene-ink:#f3e5c3}.story-panel[data-form=toy] .story-stage>img{animation:toy-bob 3.5s ease-in-out infinite}.story-panel[data-form=paper]{--scene:#c3b5d6;--scene-dim:#2c2936;--scene-ink:#eae0f0}.story-panel[data-form=paper] .story-stage{background:linear-gradient(25deg,#201e2d,#3b3b4933),repeating-linear-gradient(0deg,transparent 0 19px,#dad2e209 20px 21px)}.story-panel[data-form=pixel]{--scene:#87b0ef;--scene-dim:#17253f}.story-panel[data-form=pixel] .story-stage{background-image:linear-gradient(#5f8ae00c 1px,transparent 1px),linear-gradient(90deg,#5f8ae00c 1px,transparent 1px);background-size:12px 12px}.story-panel[data-form=pixel] .story-stage>img{image-rendering:pixelated;animation-timing-function:steps(4)}.story-panel[data-form=wire]{--scene:#8bb9ff;--scene-dim:#182849}.story-panel[data-form=wire] .story-stage>img{animation:wire-breathe 7s ease-in-out infinite}.story-panel[data-form=garden]{--scene:#b7c99b;--scene-dim:#25382b}.story-panel[data-form=crown]{--scene:#dfbc6c;--scene-dim:#3c2d18;--scene-ink:#f1dfb5}.paper-crown{position:absolute;top:0;left:33px;width:81px;height:50px;background:#dab365;clip-path:polygon(0 0,28% 32%,50% 0,72% 32%,100% 0,89% 100%,11% 100%);z-index:3;transform:rotate(-10deg);border-bottom:5px solid #ae7b45}.lab-coat{position:absolute;bottom:-3px;left:30px;width:88px;height:45px;background:#c5d9cf;clip-path:polygon(20% 0,50% 35%,80% 0,100% 100%,0 100%);z-index:1}.story-panel[data-form=council],.story-panel[data-form=collision]{--scene:#b6a1e5;--scene-dim:#292338}.cast{position:absolute;inset:10px 0 23px;display:flex;justify-content:center;align-items:center}.cast img{position:absolute;width:94px;height:120px;filter:drop-shadow(0 6px 5px #0008);animation:stage-float 5s ease-in-out infinite}.cast img:nth-child(1){left:-4px;top:5px;transform:rotate(-12deg);animation-delay:-1s}.cast img:nth-child(2){right:-4px;top:5px;animation-delay:-2s}.cast img:nth-child(3){left:0;bottom:-2px;animation-delay:-3s}.cast img:nth-child(4){right:-3px;bottom:-2px;animation-delay:-4s}.cast img:nth-child(5){width:76px;height:90px;bottom:31px;z-index:2}.story-panel[data-form=collision] .cast{background:conic-gradient(from 70deg,#244b7966,#af784733,#7e549c55,#244b7966);border-radius:50%;box-shadow:0 0 35px #7354e750}.story-panel[data-form=collision] .cast img{animation:collision-orbit 6s ease-in-out infinite alternate}.story-shift{animation:story-glitch .5s steps(1)}#story-drawer{width:min(620px,calc(100vw - 24px));max-height:calc(100dvh - 28px)}#story-drawer h2{font:inherit;margin:0}.drawer-body{padding:20px 24px}.drawer-body p{font-size:12px;color:#9fb5a6;margin:0 0 20px}.drawer-body button{border:1px solid #3c5344;font-size:12px;min-height:44px;padding:10px 14px;text-align:left}.drawer-body button:hover{border-color:#8ca9dd}.drawer-body #clear-story{display:block;margin-top:24px;font-size:10px;border:0;color:#90a196;padding-left:0}.drawer-body #story-unexplored{margin-top:20px;width:100%}#discovery-list{display:grid;grid-template-columns:1fr 1fr;gap:10px}#discovery-list button{color:#e1c6a4;background:#191c15}#clear-confirm{padding:14px;border:1px solid #a47554;margin-top:12px}#clear-confirm p{margin-bottom:12px}#clear-confirm button{margin-right:8px}.still .story-stage:after{display:none}.still .story-shift{animation:none!important}@keyframes stage-float{0%,100%{translate:0 0}50%{translate:0 -5px}}@keyframes toy-bob{0%,70%,100%{transform:rotate(-2deg) translateY(0)}80%{transform:rotate(3deg) translateY(-7px)}90%{transform:rotate(-3deg) translateY(0)}}@keyframes wire-breathe{0%,100%{transform:scale(.93)}50%{transform:scale(1.04)}}@keyframes story-scan{0%{top:10%;opacity:0}15%{opacity:.13}85%{opacity:.13}100%{top:90%;opacity:0}}@keyframes story-glitch{0%,100%{translate:0 0}20%{translate:2px 0;filter:drop-shadow(-3px 0 #637fff)}40%{translate:-2px 0}60%{translate:1px 0;filter:drop-shadow(2px 0 #c5926a)}}@keyframes collision-orbit{0%{translate:-3px 2px;rotate:-6deg}100%{translate:3px -7px;rotate:7deg}}@media(prefers-reduced-motion:reduce){.story-stage:after{display:none}.story-stage *,.story-shift{animation:none!important}}@media(max-width:600px){.story-panel{padding:22px 20px 16px}.story-panel .section-title{margin-bottom:18px}.story-panel .section-title span{font-size:9px}.story-scene{grid-template-columns:82px minmax(0,1fr);gap:15px;min-height:200px;align-items:start}.story-stage{height:124px;margin-top:2px;overflow:visible;border:0;background:none!important}.story-stage:before{inset:0 0 16px}.story-stage>img{width:105px;max-width:none;height:110px;max-height:none;align-self:flex-start}.stage-label{font-size:7px;bottom:0;left:-3px;right:-3px;line-height:1.35;background:none}.cyborg{width:83px;height:105px}.story-face{width:83px;height:83px;transform:none}.cyborg:after{width:51px;bottom:10px}.paper-crown{width:54px;height:34px;left:15px;top:2px}.lab-coat{width:60px;left:12px;bottom:7px;height:28px}.story-panel .speech h3{font-size:13px;line-height:1.5;margin-bottom:10px}.story-panel .speech p{font-size:12px;line-height:1.85}.story-panel #story-echo{font-size:11px}.story-panel .choices{padding:0;gap:8px;margin-top:18px}.story-panel .choices button,.story-panel .choices a{padding:10px 12px;font-size:11px;min-height:44px}.story-panel .chat-nav{padding:0;gap:19px;justify-content:flex-start}.story-panel .chat-nav button{font-size:10px}.story-panel #story-found{padding:0;font-size:10px}.story-fine{font-size:8px;margin-top:8px}.story-fine details{max-width:55%}.story-fine details[open]{width:100%;max-width:100%}.story-fine:has(details[open]){display:block}.story-fine details[open] summary{text-align:right}.cast{inset:0 -10px 18px}.cast img{width:66px;height:76px}.cast img:nth-child(1){left:-6px;top:-8px}.cast img:nth-child(2){right:-7px;top:-8px}.cast img:nth-child(3){left:-7px;bottom:-4px}.cast img:nth-child(4){right:-7px;bottom:-4px}.cast img:nth-child(5){width:47px;height:56px;bottom:21px}.drawer-body{padding:16px}#discovery-list{grid-template-columns:1fr}.commands a{min-height:44px}}
@media(min-width:601px){.terminal:has(#kai:not([hidden])) .identity{padding-top:24px;padding-bottom:24px}.terminal:has(#kai:not([hidden])) .identity h1{font-size:36px}.terminal:has(#kai:not([hidden])) .orbs{height:65px}.story-scene{min-height:200px}.story-panel .choices:has(>:nth-child(4)){grid-template-columns:1fr 1fr}}
@media(max-width:600px){.story-panel .choices:has(>:nth-child(4)){grid-template-columns:1fr 1fr}.terminal:has(#kai:not([hidden])) .identity{padding-top:24px;padding-bottom:20px}.terminal:has(#kai:not([hidden])) .commands{padding-bottom:10px}}
@media(max-width:360px){.identity{gap:10px;padding-left:18px;padding-right:18px}.identity h1{font-size:26px}.identity .orbs{width:52px}.identity p{font-size:9px}.topline{padding-left:12px;padding-right:12px;gap:5px}.topline #boot{font-size:8px}.topline button{font-size:8px;padding-left:6px}.commands{margin-left:18px;margin-right:18px}.commands a{font-size:11px}.story-panel{padding-left:16px;padding-right:16px}.story-scene{grid-template-columns:62px minmax(0,1fr);gap:12px;min-height:210px}.story-stage{height:100px}.story-stage>img{width:83px;height:88px}.cyborg{width:63px;height:82px}.story-face{width:63px;height:63px}.stage-label{font-size:6px}.story-panel .speech p{font-size:12px;line-height:1.75}.paper-crown{width:45px;left:8px;height:28px}.cast img{width:52px;height:60px}.cast img:nth-child(5){width:36px;height:45px;bottom:17px}.story-panel .chat-nav{gap:16px}.story-fine{font-size:7px}}
@media(max-width:600px){.story-stage .cast{inset:0 0 18px}.cast img{width:54px;height:70px}.cast img:nth-child(1),.cast img:nth-child(3){left:-2px}.cast img:nth-child(2),.cast img:nth-child(4){right:-2px}.cast img:nth-child(5){width:40px;height:51px}}
@media(max-width:360px){.cast img{width:43px;height:56px}.cast img:nth-child(5){width:32px;height:40px;bottom:17px}}
