@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
:root{color-scheme:dark;--bg:#1d130e;--panel:#2b1d15;--border:#634735;--muted:#c9ad98;--accent:#e7b884;--text:#f8eadb}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font:14px 'DM Sans',sans-serif;display:grid;grid-template-columns:200px minmax(480px,1fr) 280px;min-height:100vh}button,input,textarea,select{font:inherit;color:inherit}button{cursor:pointer}button:disabled{opacity:.4;cursor:default}button:hover:not(:disabled){border-color:#a88568}button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid var(--accent);outline-offset:3px}a{color:var(--accent)}.sidebar{padding:28px 18px;border-right:1px solid var(--border);display:flex;flex-direction:column;height:100vh;position:sticky;top:0}.brand{font-size:27px;font-weight:700;letter-spacing:-1px;text-decoration:none;color:var(--text);display:flex;align-items:center;margin-bottom:36px}.brand-icon{font-size:31px;color:var(--accent);margin-right:8px}.brand-dot{color:var(--muted)}.workspace-label{font-size:10px;letter-spacing:1px;color:var(--muted);margin:0 8px 12px}.workspace-label>span{display:none}.workspace{display:flex;align-items:center;gap:9px;width:100%;padding:11px 10px;border:1px solid transparent;border-radius:6px;background:none;text-align:left;font-size:12px;margin-bottom:5px}.workspace.active{background:#442c1e;color:#f2d5b9}.badge{margin-left:auto;color:var(--muted);font-size:11px}.sidebar-divider{height:1px;background:var(--border);margin:22px 0}.idea-link{background:none;border:1px solid transparent;border-radius:6px;color:var(--muted);display:flex;gap:8px;padding:12px 8px;width:100%;text-align:left;font-size:12px}.idea-link span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.idea-link.current{background:#402d21;color:var(--text)}.sidebar-bottom{margin-top:auto}.model-settings{border:1px solid transparent;background:none;font-size:12px;padding:10px 6px;color:var(--muted)}main{min-width:0}.topbar{display:flex;justify-content:space-between;align-items:center;gap:10px;height:72px;padding:0 30px;border-bottom:1px solid var(--border);font-size:12px}.breadcrumb{color:var(--muted)}.breadcrumb span{margin:0 9px}.breadcrumb strong{font-weight:500;color:var(--text)}.header-actions{display:flex;align-items:center;gap:15px;font-size:11px;color:var(--muted)}.button{border:1px solid var(--border);border-radius:6px;background:#3a291e;padding:10px 14px;font-size:12px;font-weight:500}.button.primary{background:var(--accent);color:#25150b;border-color:var(--accent)}.studio{padding:30px}.studio-heading{display:flex;align-items:center;justify-content:space-between;gap:15px}.studio-heading>div:first-child{flex:1;min-width:0}.eyebrow{font-size:10px;letter-spacing:1px;color:var(--muted);font-weight:500}.studio-heading input{display:block;width:100%;background:none;border:0;padding:4px 0;color:var(--text)}#ideaTitle{font-size:25px;font-weight:600;margin:7px 0}#ideaDescription{font-size:12px;color:var(--muted)}.view-switch{display:flex;border:1px solid var(--border);border-radius:6px;padding:3px;gap:3px;flex-shrink:0}.view-switch button{border:1px solid transparent;border-radius:4px;background:none;color:var(--muted);padding:8px 10px;font-size:12px}.view-switch .selected{background:#573c2a;color:var(--text)}.board-toolbar{display:flex;justify-content:space-between;align-items:center;margin:25px 0 18px;gap:10px;font-size:12px;color:var(--muted)}.board-toolbar b{font-weight:400}.tiny-dot{display:none}.toolbar-hint{font-size:11px;color:var(--muted);margin-left:5px}.board{display:grid;grid-template-columns:minmax(0,1fr);gap:6px}.block{min-height:180px;padding:18px;border:1px solid var(--border);border-radius:8px;background:var(--panel);text-align:left}.block:hover{background:#402d21}.block-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.block-icon{font-size:18px;color:var(--color)}.block-number{font-size:11px;color:var(--muted)}.block h3{font-size:14px;font-weight:500;line-height:1.5;margin:0 0 9px}.block p{font-size:12px;line-height:1.7;color:var(--muted);margin:0;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;white-space:pre-line}.block-bottom{margin-top:18px;display:flex;justify-content:space-between;color:var(--muted);font-size:10px}.block.filled .block-bottom span:first-child{color:#eac7a3}.notes-panel{padding:29px 22px;border-left:1px solid var(--border);height:100vh;position:sticky;top:0;overflow:auto}.notes-header h2{font-size:17px;font-weight:500;margin:0 0 18px}.notes-panel textarea{width:100%;min-height:260px;resize:vertical;background:var(--panel);border:1px solid var(--border);border-radius:6px;color:var(--text);padding:14px;font-size:13px;line-height:1.8}.assistant-card{margin-top:28px;padding-top:24px;border-top:1px solid var(--border)}.assistant-card h3{font-size:14px;font-weight:500;margin:0 0 12px}.assistant-card p{font-size:12px;line-height:1.8;color:var(--muted)}.model-state{font-size:11px;line-height:1.7;color:var(--muted);margin-top:15px}dialog{width:min(650px,94vw);max-height:90vh;padding:0;border:1px solid #8a694f;border-radius:10px;background:#2d1e16;color:var(--text)}dialog::backdrop{background:#0009}.dialog-shell{padding:26px}.dialog-top{display:flex;justify-content:space-between;align-items:center}.icon-button{background:#402d22;border:1px solid var(--border);padding:8px 10px;border-radius:5px}.block-heading-input{width:100%;border:0;background:none;font-size:25px;font-weight:600;margin-top:17px;padding:7px 0}#blockPrompt,dialog p,dialog li{font-size:13px;color:var(--muted);line-height:1.8}.field-label{display:block;font-size:10px;color:var(--muted);letter-spacing:1px;margin:22px 0 10px}#blockContent{width:100%;min-height:180px;background:#21150f;border:1px solid var(--border);border-radius:6px;padding:14px;line-height:1.8;resize:vertical}.editor-meta{display:flex;justify-content:space-between;align-items:center;margin-top:12px;gap:10px;font-size:12px;color:var(--muted)}select{background:#402d21;border:1px solid var(--border);border-radius:5px;padding:8px;margin-left:7px;font-size:11px}.ai-section{border-top:1px solid var(--border);margin-top:22px;padding-top:20px}.ai-title{font-size:13px}.ai-title small{float:right;font-size:11px;color:var(--muted)}.ai-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}.ai-actions button{background:#402d22;border:1px solid #72523d;border-radius:5px;padding:9px 11px;font-size:11px}.ai-output{white-space:pre-wrap;font-size:13px;line-height:1.8;color:#f0ddca;border:1px solid var(--border);border-radius:6px;padding:15px;margin:15px 0;max-height:260px;overflow:auto}.dialog-bottom{display:flex;justify-content:space-between;gap:10px;margin-top:24px}.danger{color:#e3abb6;background:none}code{background:#4b3324;color:#eed0b0;padding:3px 5px;font-size:12px;border-radius:3px}#createName{width:100%;padding:13px;background:#21150f;border:1px solid var(--border);border-radius:6px;margin-bottom:22px}.hidden{display:none!important}.toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);display:none;padding:12px 18px;border:1px solid #8a694f;border-radius:6px;background:#482f20;max-width:90vw;font-size:12px;z-index:10}.toast.visible{display:block}.slide-card{padding:30px;min-height:320px;border:1px solid var(--border);border-radius:8px;background:var(--panel)}.slide-card h2{font-size:28px;font-weight:500}.slide-card p{white-space:pre-wrap;color:var(--muted);line-height:1.8}.slide-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:18px;font-size:12px;color:var(--muted)}.slide-controls button{margin-left:8px}.slide-empty{padding:25px;color:var(--muted)}.dragging{opacity:.4}.drop-target{outline:2px solid var(--accent)}.mobile-idea-picker{display:none}@media(min-width:1600px){body{grid-template-columns:220px minmax(500px,1fr) 320px}.studio{padding:36px}}@media(max-width:1150px){body{grid-template-columns:180px minmax(420px,1fr)}.sidebar{grid-row:1/3}.notes-panel{grid-column:2;position:static;height:auto;border-top:1px solid var(--border);display:grid;grid-template-columns:1fr 1fr;gap:0 24px;padding:28px 30px}.notes-header{grid-column:1}.notes-panel textarea{grid-column:1;grid-row:2}.assistant-card{grid-column:2;grid-row:1/3;margin:0;border-top:0;padding-top:0}}@media(max-width:720px){body{display:block}.sidebar{position:static;height:auto;padding:15px 20px;flex-direction:row;align-items:center;gap:10px;border-right:0;border-bottom:1px solid var(--border)}.brand{margin:0;font-size:24px}.sidebar .workspace-label,.sidebar-divider,.sidebar-bottom,.sidebar #ideaList,.sidebar #homeButton{display:none}.sidebar #newIdea{width:auto;margin:0 0 0 auto}.topbar{height:60px;padding:0 20px}.breadcrumb{font-size:11px}.header-actions{gap:8px}.header-actions>span{font-size:10px}.studio{padding:24px 20px}.studio-heading{align-items:flex-start}#ideaTitle{font-size:22px}.view-switch button{font-size:11px;padding:7px}.mobile-idea-picker{display:block;width:100%;margin:16px 0 0;padding:10px}.board{gap:12px}.block{padding:14px;min-height:185px}.block h3{font-size:13px}.block p{font-size:11px}.toolbar-hint{display:none}.notes-panel{display:block;padding:24px 20px}.notes-panel textarea{min-height:180px}.assistant-card{margin-top:24px;padding-top:20px;border-top:1px solid var(--border)}.dialog-shell{padding:20px}.slide-card{padding:22px}.slide-card h2{font-size:23px}}

/* Fixed viewport workspace: additional blocks use pages, not document scrolling. */
html,body{height:100%;overflow:hidden}body{height:100dvh;min-height:0;grid-template-columns:190px minmax(0,1fr) 260px;grid-template-rows:minmax(0,1fr)}.sidebar{height:100%;min-height:0;position:static;padding:24px 16px}main{height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden}.topbar{height:58px;flex-shrink:0;padding:0 24px}.studio{flex:1;min-height:0;display:flex;flex-direction:column;padding:22px 24px 14px;overflow:hidden}.studio-heading{flex-shrink:0}#ideaTitle{font-size:23px;margin:4px 0}.board-toolbar{flex-shrink:0;margin:18px 0 12px}.board{flex:1;min-height:0;gap:10px;overflow:hidden}.block{min-height:0;padding:13px;display:flex;flex-direction:column;overflow:hidden}.block-top{margin-bottom:8px}.block h3{font-size:13px;line-height:1.4;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;flex-shrink:0;margin-bottom:5px}.block p{font-size:11px;line-height:1.5;min-height:0}.block-bottom{margin-top:auto;padding-top:8px;flex-shrink:0}.board-pager{height:38px;flex-shrink:0;display:flex;align-items:center;justify-content:center;gap:14px;margin-top:8px;font-size:11px;color:var(--muted)}.board-pager button{padding:5px 12px}.notes-panel{position:static;height:100%;min-height:0;display:flex;flex-direction:column;overflow:hidden;padding:24px 18px}.notes-header{flex-shrink:0}.notes-header h2{margin-bottom:12px}.notes-panel textarea{flex:1;min-height:0;height:auto;resize:none}.assistant-card{flex-shrink:0;margin-top:18px;padding-top:16px}.assistant-card p{margin:0;font-size:11px}.model-state{margin-top:10px}.slides{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}.slide-card{flex:1;min-height:0;overflow:auto;padding:24px}.slide-controls{flex-shrink:0;margin-top:12px}.mobile-idea-picker{display:block;width:100%;margin:10px 0 0;flex-shrink:0;font-size:11px;padding:7px}#ideaList{display:none}.sidebar-divider{display:none}.sidebar .workspace-label:nth-of-type(3){display:none}dialog{max-height:calc(100dvh - 24px);overflow:auto}
@media(max-width:1100px){body{grid-template-columns:160px minmax(0,1fr) 220px}.sidebar{grid-row:auto}.studio{padding:18px 18px 12px}.topbar{padding:0 18px}.notes-panel{grid-column:auto;border-top:0;padding:20px 14px}.assistant-card{grid-column:auto;grid-row:auto;border-top:1px solid var(--border)}}
@media(max-width:850px){body{grid-template-columns:minmax(0,1fr) 220px;grid-template-rows:56px minmax(0,1fr)}.sidebar{grid-column:1/-1;grid-row:1;height:auto;display:flex;flex-direction:row;align-items:center;padding:8px 18px;border-right:0;border-bottom:1px solid var(--border)}.brand{margin:0;font-size:23px}.sidebar .workspace-label,.sidebar #homeButton{display:none}.sidebar #newIdea{width:auto;margin:0 0 0 18px}.sidebar-bottom{margin:0 0 0 auto}.model-settings{font-size:11px;padding:6px}.notes-panel{grid-column:2;grid-row:2}main{grid-column:1;grid-row:2}.brand-icon{font-size:25px}}
@media(max-width:600px){body{grid-template-columns:minmax(0,1fr);grid-template-rows:50px minmax(0,1fr) 150px}.sidebar{padding:6px 14px}.sidebar #newIdea{margin-left:10px;font-size:11px}.model-settings{font-size:10px}.brand{font-size:20px}.notes-panel{grid-column:1;grid-row:3;padding:12px 16px;border-left:0;border-top:1px solid var(--border)}.notes-header h2{font-size:13px;margin:0 0 7px}.notes-panel textarea{min-height:0;padding:8px 10px;font-size:12px}.assistant-card{display:none}main{grid-row:2}.topbar{height:42px;padding:0 16px}.studio{padding:12px 16px 6px}.studio-heading{align-items:center}#ideaTitle{font-size:19px}.studio-heading .eyebrow{display:none}#ideaDescription{font-size:11px}.view-switch button{font-size:10px;padding:6px}.board-toolbar{margin:10px 0;font-size:11px}.board-toolbar .button{font-size:11px;padding:7px 10px}.mobile-idea-picker{margin-top:7px;padding:5px}.board{gap:8px}.block{padding:10px}.block-top{margin-bottom:5px}.block-icon{font-size:14px}.block-number{font-size:10px}.block h3{font-size:12px}.block p{font-size:10px}.block-bottom{font-size:9px;padding-top:5px}.board-pager{height:28px;margin-top:4px}.board-pager button{padding:3px 10px}.slide-card{padding:16px}.slide-card h2{font-size:20px}.slide-controls{margin-top:6px}.slide-controls button{padding:6px 8px;font-size:10px}}
@media(max-height:650px) and (min-width:601px){.sidebar{padding-top:16px;padding-bottom:16px}.brand{margin-bottom:20px}.studio{padding-top:12px}.assistant-card p{display:none}.notes-panel{padding-top:16px}.board-toolbar{margin:10px 0}.block-top{margin-bottom:5px}}
body{display:grid}

[hidden]{display:none!important}.startup{position:fixed;inset:0;z-index:20;background:var(--bg);display:grid;place-items:center}.startup-content{text-align:center}.startup-brand{font-size:34px;font-weight:600;letter-spacing:-1.5px}.startup-content p{font-size:13px;color:var(--muted);margin:22px 0}.startup-content button{font-size:11px}.booting>*:not(#startup){visibility:hidden}.library-mode>.sidebar,.library-mode>main,.library-mode>.notes-panel{display:none}.library{height:100dvh;width:100%;grid-column:1/-1;grid-row:1/-1;display:flex;flex-direction:column;overflow:hidden;padding:0 clamp(20px,6vw,90px) 20px}.library-header{height:88px;flex-shrink:0;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px}.library-header .brand{margin:0}.library-title{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:32px 0 25px;flex-shrink:0}.library-title h1{font-size:28px;font-weight:500;letter-spacing:-.7px;margin:0 0 7px}.library-title span{font-size:12px;color:var(--muted)}.library-pager{display:flex;justify-content:center;align-items:center;gap:16px;flex-shrink:0;height:38px;margin-top:16px;font-size:11px;color:var(--muted)}.library-pager button{padding:5px 12px}.back-link{border:0;background:none;color:var(--muted);font-size:12px;padding:0}.board-toolbar{min-height:25px}.add-section{border-style:dashed;background:transparent;align-items:center;justify-content:center;gap:12px}.add-section>span{font-size:25px;color:var(--accent)}.add-section h3{font-size:12px;color:var(--muted);margin:0}
@media(max-width:850px){.library{grid-row:1/-1}.library-header{height:70px}.library-title{padding:24px 0 20px}}
@media(max-width:600px){.library{padding:0 20px 12px}.library-header{height:64px}.library-header .brand{font-size:23px}.library-title{padding:24px 0 18px}.library-title h1{font-size:23px}.library-title .button{font-size:11px;padding:9px 11px}.library-pager{margin-top:10px}}

.startup{overflow:hidden;background:radial-gradient(ellipse at 50% 35%,#382016 0%,#1d130e 48%,#0c0806 100%)}
.startup-content{width:min(100%,480px);padding:12px 20px}
.loader-stage{
  width:min(100%,390px);
  height:clamp(118px,35dvh,260px);
  margin:0 auto 12px;
  perspective:650px;
}
.startup-scene{position:relative;display:grid;place-items:center;width:100%;height:100%;transform-style:preserve-3d}
.startup-brand{font-size:clamp(30px,6vmin,46px)}
.startup-brand span{color:var(--accent)}

/* Startup loader adapted from Uiverse.io by alexruix. */
.loading-bar{position:relative;width:96px;height:38px;margin:24px auto 0;text-align:left}
.startup-loader-text{position:absolute;top:0;color:var(--muted);font-size:12px;letter-spacing:1px}
.startup-load{position:absolute;bottom:0;left:0;width:16px;height:12px;border-radius:999px;background:#a36342}
.startup-load::before{position:absolute;inset:0 auto 0 0;width:100%;border-radius:inherit;background:var(--accent);content:""}
.startup-content p{margin-top:15px}
@media(prefers-reduced-motion:no-preference){
  .loading-bar:not(.ready) .startup-loader-text{animation:startup-label 3.5s ease infinite}
  .loading-bar:not(.ready) .startup-load{animation:startup-capsule 3.5s ease infinite}
  .loading-bar:not(.ready) .startup-load::before{animation:startup-capsule-fill 3.5s ease infinite}
}
.loading-bar.ready .startup-load{width:100%;background:var(--accent)}
@keyframes startup-label{
  0%,90%,100%{transform:translateX(0);letter-spacing:1px}
  40%{transform:translateX(26px);letter-spacing:2px}
  80%{transform:translateX(32px);letter-spacing:1px}
}
@keyframes startup-capsule{
  0%,100%{width:16px;transform:translateX(0)}
  40%,90%{width:100%;transform:translateX(0)}
  80%{width:16px;transform:translateX(80px)}
}
@keyframes startup-capsule-fill{
  0%,100%{width:16px;transform:translateX(0)}
  40%{width:80%;transform:translateX(0)}
  80%{width:100%;transform:translateX(0)}
  90%{width:80%;transform:translateX(20%)}
}

.startup-symbol{
  width:clamp(105px,25dvh,194px);
  height:auto;
  object-fit:contain;
  filter:drop-shadow(0 14px 18px #0c0504aa);
}
.startup-bean{
  position:absolute;
  width:var(--bean-size);
  aspect-ratio:469/650;
  background:url('/assets/coffee-bean.webp') center/contain no-repeat;
  filter:drop-shadow(0 10px 12px #0c0504aa);
  transform:translateZ(var(--bean-depth)) rotate(var(--bean-angle));
}
.startup-bean-far{--bean-size:clamp(28px,10vw,56px);--bean-depth:-48px;--bean-angle:-34deg;--bean-phase:-3s;top:11%;right:14%;opacity:.55}
.startup-bean-mid{--bean-size:clamp(27px,9vw,47px);--bean-depth:8px;--bean-angle:32deg;--bean-phase:-1s;bottom:15%;left:13%;opacity:.76}
.startup-bean-near{--bean-size:clamp(34px,12vw,62px);--bean-depth:55px;--bean-angle:50deg;--bean-phase:-4s;bottom:2%;right:9%}
@media(prefers-reduced-motion:no-preference){
  .startup-scene{transform:rotateX(var(--startup-x,0deg)) rotateY(var(--startup-y,0deg));transition:transform .32s ease-out}
  .startup-symbol{animation:startup-symbol 5.2s ease-in-out infinite}
  .startup-bean{animation:startup-drift 6s var(--bean-phase) ease-in-out infinite alternate}
}
@keyframes startup-symbol{
  0%,100%{transform:translate3d(0,4px,22px) rotateX(6deg) rotateY(-16deg) rotateZ(-3deg)}
  50%{transform:translate3d(0,-10px,40px) rotateX(-7deg) rotateY(16deg) rotateZ(3deg)}
}
@keyframes startup-drift{
  to{transform:translate3d(0,-18px,var(--bean-depth)) rotate(calc(var(--bean-angle) + 14deg))}
}

#editor{width:min(940px,94vw)}#editor .dialog-shell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 24px}#editor .dialog-top,#editor .block-heading-input,#editor #blockPrompt,#editor .ai-section,#editor .dialog-bottom{grid-column:1/-1}.editor-writing{min-width:0}#blockContent{min-height:220px}.editor-coach{min-width:0;border-left:1px solid var(--border);padding-left:24px;padding-top:14px}.level-label{font-size:12px;color:var(--muted)}#englishLevel{margin-left:10px}#levelDescription{font-size:11px;margin:8px 0 20px}.coach-heading{font-size:12px;font-weight:500;margin:16px 0 9px}.coach-content{font-size:12px;line-height:1.8;color:#e6cdb8;white-space:pre-wrap}.coach-content ul{margin:0;padding-left:18px;white-space:normal}.coach-content li{margin:0 0 8px}.coach-status{font-size:11px;color:var(--muted);line-height:1.7;margin-top:12px}#applyRewrite,#retryCoach{font-size:11px;margin-top:12px}.step-actions{display:flex;gap:8px}@media(max-width:650px){#editor .dialog-shell{display:block}.editor-coach{border-left:0;border-top:1px solid var(--border);padding:16px 0 0;margin-top:18px}#blockContent{min-height:160px}.step-actions .button{font-size:10px;padding:8px}.dialog-bottom{align-items:center}}

.writing-actions{margin-top:10px;display:flex;justify-content:flex-end}.writing-actions .button{font-size:11px;padding:8px 12px}.coach-status{min-height:20px}

#pptDialog{width:min(94vw,720px);max-height:90dvh}
#pptDialog .dialog-shell{display:grid;gap:.75rem;overflow:auto}
#pptDialog h2,#pptDialog p{margin:0}
#pptDialog select{width:100%;padding:.6rem}
#pptSwatches{display:grid;grid-template-columns:repeat(4,1fr);gap:.35rem}
#pptSwatches span{height:1.5rem;border:1px solid #777;border-radius:4px}
#pptExportStatus:empty{display:none}
.flow-editor,.flow-step,#pptFlowSteps{display:grid;gap:.75rem}
.flow-editor h3{margin:0;font-size:1rem}
.flow-actions{display:flex;flex-wrap:wrap;gap:.5rem}
.flow-step{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0;margin:0;padding:.75rem;border:1px solid var(--border);border-radius:8px}
.flow-step legend{padding:0 .25rem;font-weight:600}
.flow-step label{display:grid;gap:.25rem;min-width:0}
.flow-step label:nth-of-type(n+3){grid-column:1/-1}
.flow-step input,.flow-step textarea{width:100%;padding:.5rem;background:var(--bg);border:1px solid var(--border);border-radius:5px}
.flow-step textarea{resize:vertical}
.flow-step button{justify-self:start}
#pptFlowPreview{margin:0;display:grid;gap:.35rem}
#pptFlowPreview img{display:block;width:100%;height:auto;border:1px solid var(--border);border-radius:5px}
#pptFlowHint:empty,#pptFlowStatus:empty{display:none}
@media(max-width:480px){.flow-step{grid-template-columns:minmax(0,1fr)}}

.notes-header{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:8px}
.notes-header .button{font-size:12px;padding:6px 8px}
.notes-header [aria-pressed=true]{background:var(--panel);color:var(--text);border-color:var(--border)}
.notes-panel:has(#cloveChat:not([hidden])) .assistant-card{display:none}
#cloveChat{display:flex;flex:1;flex-direction:column;min-height:0;gap:8px}
#chatMessages{flex:1;min-height:0;overflow:auto;overflow-wrap:anywhere;font-size:13px;line-height:1.45}
#chatMessages article{padding:8px 4px;border-bottom:1px solid var(--border)}
#chatMessages p,#chatMessages ol{margin:4px 0 6px}
#chatMessages ol{padding-left:21px}
#chatMessages li+li{margin-top:5px}
#chatForm{display:grid;gap:5px}
#chatQuestion{font:inherit;font-size:13px;padding:8px;line-height:1.35}
.chat-actions{display:flex;flex-wrap:wrap;gap:4px;align-items:center;justify-content:flex-end}
.chat-actions .button{font-size:11px;padding:6px 8px}
.chat-actions .chat-send{display:inline-grid;place-items:center;width:36px;height:36px;padding:0;border-radius:10px}
#chatStatus{font-size:12px;color:var(--muted);max-height:3em;overflow:auto}
#chatStatus:empty{display:none}
@media(max-width:600px){body:not(.library-mode):has(#cloveChat:not([hidden])){grid-template-rows:50px minmax(0,1fr) min(46dvh,330px)}}
/* Planner and section lists. */
.brand-icon{flex:none;width:26px;height:26px}
.board{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:max-content;align-content:start;gap:6px}
.board .block{width:100%;height:56px;min-height:0;padding:6px 10px;display:grid;grid-template-columns:24px minmax(0,1fr) auto;grid-template-rows:auto auto;align-content:center;align-items:center;column-gap:8px;border-radius:5px}
.board .block-top{grid-column:1;grid-row:1/3;margin:0}
.board .block h3{grid-column:2;grid-row:1;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.board .block p{grid-column:2;grid-row:2;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board .block-bottom{grid-column:3;grid-row:1/3;gap:6px;margin:0;padding:0}
.board .add-section{display:flex;flex-direction:row}
@media(max-width:600px){
  .topbar{height:auto;min-height:44px;padding:5px 12px}
  .header-actions{gap:5px}
  .header-actions .button{font-size:10px;padding:6px 7px}
  .breadcrumb span,.breadcrumb strong{display:none}
  #saveStatus{display:none}
}

.studio-heading{margin-bottom:12px}
#ideaPicker{margin-bottom:12px}
#editor .dialog-top,#createDialog .dialog-top{justify-content:flex-end}
#rewriteOutput:empty{display:none}
.library{position:relative;isolation:isolate;background:var(--bg)}
.coffee-scene{
  position:absolute;
  inset:0;
  z-index:-1;
  overflow:hidden;
  pointer-events:none;
  background:radial-gradient(ellipse at 83% 48%,#583221 0%,#2e1c13 42%,var(--bg) 76%);
}
.coffee-scene::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,var(--bg),transparent 80%);
}
.coffee-beans{position:absolute;inset:0}
.coffee-beans span{
  position:absolute;
  width:var(--size);
  aspect-ratio:469/650;
  background:url('/assets/coffee-bean.webp') center/contain no-repeat;
  filter:drop-shadow(12px 19px 15px #120a07b0);
  transform:rotate(var(--angle));
}
.coffee-beans span:nth-child(1){--size:clamp(110px,19vw,330px);--angle:-32deg;--delay:-3s;--lift:42px;right:9%;top:23%}
.coffee-beans span:nth-child(2){--size:clamp(72px,13vw,225px);--angle:38deg;--delay:-5s;--lift:32px;right:26%;top:53%}
.coffee-beans span:nth-child(3){--size:clamp(52px,9vw,150px);--angle:57deg;--delay:-7s;right:2%;top:6%}
.coffee-beans span:nth-child(4){--size:clamp(58px,10vw,165px);--angle:-66deg;--delay:-1s;right:5%;top:70%}
.coffee-beans span:nth-child(5){--size:clamp(42px,7vw,115px);--angle:-17deg;--delay:-9s;right:29%;top:12%}

/* Animated button adapted from Uiverse.io by dexter-st. */
#newPlanner.coffee-action{
  position:relative;
  isolation:isolate;
  overflow:hidden;
  flex:none;
  border-color:transparent;
  border-radius:999px;
  background:#986440;
  padding-inline:16px;
}
#newPlanner.coffee-action::before,#newPlanner.coffee-action::after{
  content:"";
  position:absolute;
  pointer-events:none;
  z-index:-1;
}
#newPlanner.coffee-action::before{
  width:100%;
  aspect-ratio:1;
  inset:50% auto auto 50%;
  background:conic-gradient(#986440,#fff1dd,#a4633c,#e7b884,#986440);
  transform:translate(-50%,-50%);
}
#newPlanner.coffee-action::after{
  inset:2px;
  border-radius:inherit;
  background:linear-gradient(160deg,#f5d6ad,var(--accent));
}
#newPlanner.coffee-action:active::after{background:#d9a873}
@media(prefers-reduced-motion:no-preference){
  .coffee-beans{transform:translate3d(var(--coffee-x,0px),var(--coffee-y,0px),0);transition:transform .45s ease-out}
  .coffee-beans span{animation:coffee-drift 10s ease-in-out var(--delay) infinite alternate}
  #newPlanner.coffee-action::before{animation:coffee-button-turn 7s linear infinite}
}
@keyframes coffee-drift{to{transform:translate3d(9px,calc(-1 * var(--lift,24px)),0) rotate(calc(var(--angle) + 15deg))}}
@keyframes coffee-button-turn{to{transform:translate(-50%,-50%) rotate(1turn)}}
@media(max-width:600px){
  .coffee-scene::after{background:#1d130e45}
}
.library-header{border-bottom-color:#79543d}
.github-flip{
  --face-height:36px;
  --face-depth:calc(var(--face-height) / 2);
  display:inline-flex;
  flex:none;
  border:1px solid var(--border);
  border-radius:8px;
  text-decoration:none;
}
.github-flip-icon{
  display:grid;
  place-items:center;
  width:var(--face-height);
  border-radius:7px 0 0 7px;
  background:var(--accent);
  color:var(--bg);
}
.github-flip-cube{
  position:relative;
  width:142px;
  height:var(--face-height);
  transform-style:preserve-3d;
}
.github-flip-cube>span{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  backface-visibility:hidden;
  border-radius:0 7px 7px 0;
  font-size:10px;
  font-weight:700;
  letter-spacing:.5px;
  text-transform:uppercase;
}
.github-flip-front{background:var(--panel);color:var(--text);transform:translateZ(var(--face-depth))}
.github-flip-top{background:var(--accent);color:var(--bg);transform:rotateX(-90deg) translateZ(var(--face-depth))}
.github-flip:is(:hover,:focus-visible){border-color:var(--accent)}
.github-flip:is(:hover,:focus-visible) .github-flip-cube{transform:rotateX(90deg)}
@media(prefers-reduced-motion:no-preference){
  .github-flip-cube{transition:transform .4s}
}
@media(max-width:600px){
  .github-flip{--face-height:28px}
  .github-flip-icon svg{width:18px;height:18px}
  .github-flip-cube{width:114px}
  .github-flip-cube>span{font-size:9px}
}
.library-title,#plannerSearchForm,.book-grid,.library-pager{width:min(100%,650px)}
#plannerSearchForm{flex:none;margin:0 0 12px;padding:7px}
#plannerSearch{
  width:100%;
  padding:10px 1rem;
  border:0;
  border-radius:10px;
  outline:2px solid var(--muted);
  outline-offset:3px;
  font-family:inherit;
  background:var(--panel);
}
#plannerSearch:focus{
  outline-color:var(--accent);
  outline-offset:5px;
  background:var(--bg);
}
@media(prefers-reduced-motion:no-preference){
  #plannerSearch{transition:outline-offset .25s,outline-color .25s,background-color .25s}
}
.planner-empty{grid-column:1/-1;align-self:start;margin:0;padding:14px;background:var(--panel);border-radius:5px}

/* Suggestion loader adapted from Uiverse.io by dexter-st. */
.suggestion-loader{
  position:relative;
  display:inline-grid;
  place-items:center;
  width:100px;
  aspect-ratio:1;
  color:var(--text);
  font-size:11px;
}
.suggestion-loader::before{
  content:"";
  position:absolute;
  inset:0;
  border:2px solid var(--border);
  border-top-color:var(--accent);
  border-right-color:var(--accent);
  border-radius:50%;
}
.suggestion-loader-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.suggestion-loader-letters span{display:inline-block}
@media(prefers-reduced-motion:no-preference){
  .suggestion-loader::before{animation:suggestion-spin 2s linear infinite}
  .suggestion-loader-letters span{animation:suggestion-letter 2s ease-in-out infinite;animation-delay:calc(var(--letter-index) * .08s)}
}
@keyframes suggestion-spin{to{transform:rotate(1turn)}}
@keyframes suggestion-letter{0%,55%,100%{color:var(--muted)} 25%{color:var(--accent);transform:translateY(-2px)}}

/* Planner card design adapted from Uiverse.io by Smit-Prajapati. */
.book-grid{
  --book-columns:2;
  --book-height:300px;
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:repeat(var(--book-columns),minmax(0,290px));
  grid-auto-rows:clamp(210px,100%,var(--book-height));
  align-content:start;
  gap:16px;
  overflow:auto;
}
.planner-book{
  display:block;
  text-decoration:none;
  position:relative;
  min-width:0;
  min-height:0;
  padding:0;
  border:0;
  border-radius:42px;
  background:none;
  text-align:left;
  perspective:850px;
}
.planner-book:focus-visible{outline:none}
.planner-book:focus-visible .book-cover{outline:2px solid #fff;outline-offset:-5px}
.book-cover{
  position:relative;
  pointer-events:none;
  transform-style:preserve-3d;
  display:flex;
  flex-direction:column;
  height:100%;
  padding:clamp(48px,11dvh,96px) 24px 22px;
  border-radius:inherit;
  background:linear-gradient(135deg,#945638,#e7b884);
  box-shadow:inset 0 -7px #824729,inset 0 0 0 1px #d7a279,0 9px 12px #12090580;
  color:#3d2317;
}
.book-cover::before{
  content:"";
  position:absolute;
  inset:8px;
  border-radius:35px 100% 35px 35px;
  border-left:1px solid #fff1dd;
  border-bottom:1px solid #fff1dd;
  background:linear-gradient(0deg,#e9c49e,#f8e5cb);
  transform:translateZ(2px);
}
.book-mark{position:absolute;top:10px;right:10px;width:clamp(88px,16dvh,128px);aspect-ratio:1;pointer-events:none;transform-style:preserve-3d}
.book-mark span,.book-mark img{position:absolute;top:var(--inset);right:var(--inset);border-radius:50%;aspect-ratio:1}
.book-mark span:nth-child(1){--inset:0;width:100%;background:#a36342}
.book-mark span:nth-child(2){--inset:6px;width:82%;background:#bb7853}
.book-mark span:nth-child(3){--inset:12px;width:65%;background:#d0946d}
.book-mark span:nth-child(4){--inset:18px;width:48%;background:#e1ae83}
.book-mark img{--inset:24px;width:32%;padding:7px;background:#f5dec1}
.book-title,.book-description{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
  overflow-wrap:anywhere;
}
.book-title{font-size:20px;font-weight:800;line-height:1.15}
.book-description{margin-top:8px;font-size:13px;line-height:1.4;color:#613c2a}
.book-footer{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  align-items:center;
  gap:4px 8px;
  margin-top:auto;
  padding-top:8px;
  font-size:11px;
}
.book-title,.book-description,.book-footer{transform:translateZ(6px)}
.book-mark span:nth-child(1){transform:translateZ(4px)}
.book-mark span:nth-child(2){transform:translateZ(7px)}
.book-mark span:nth-child(3){transform:translateZ(10px)}
.book-mark span:nth-child(4){transform:translateZ(13px)}
.book-mark img{transform:translateZ(16px)}
.book-open{padding:5px 9px;border-radius:999px;background:#f8e5cb;font-weight:700}
@media(hover:hover) and (pointer:fine) and (prefers-reduced-motion:no-preference){
  .book-cover,.book-cover::before,.book-mark span,.book-mark img,.book-title,.book-description,.book-footer{
    transition:transform .48s cubic-bezier(.2,.7,.25,1);
  }
  .planner-book:hover{z-index:1}
  .planner-book:hover .book-cover{
    transform:scale(.94) rotateX(var(--book-tilt-x,0deg)) rotateY(var(--book-tilt-y,0deg));
    transition-duration:.2s;
  }
  .planner-book:hover .book-cover::before{transform:translateZ(25px)}
  .planner-book:hover :is(.book-title,.book-description){transform:translateZ(33px)}
  .planner-book:hover .book-footer{transform:translateZ(48px);transition-delay:.08s}
  .planner-book:hover .book-mark span:nth-child(1){transform:translateZ(32px)}
  .planner-book:hover .book-mark span:nth-child(2){transform:translateZ(48px);transition-delay:.04s}
  .planner-book:hover .book-mark span:nth-child(3){transform:translateZ(64px);transition-delay:.08s}
  .planner-book:hover .book-mark span:nth-child(4){transform:translateZ(80px);transition-delay:.12s}
  .planner-book:hover .book-mark img{transform:translateZ(96px);transition-delay:.16s}
}

/* Open planner workspace */
.planner-workspace{position:relative;isolation:isolate;background:#000}
.planner-workspace::after{
  content:"";
  position:absolute;
  right:-28px;
  bottom:-62px;
  z-index:-1;
  width:clamp(138px,26vw,330px);
  aspect-ratio:469/650;
  background:url('/assets/coffee-bean.webp') center/contain no-repeat;
  opacity:.23;
  pointer-events:none;
  transform:rotate(-24deg);
}
.workspace-icon-sprite{position:absolute;pointer-events:none}
.workspace-icon{
  width:16px;
  height:16px;
  flex:none;
  fill:none;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
}
:is(.sidebar,.topbar,.view-switch,.notes-header,.chat-actions) button:has(.workspace-icon){
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.sidebar button.workspace{justify-content:flex-start}
.sidebar,.notes-panel{background:var(--panel)}
.topbar{background:#241810}
.topbar .back-link{min-height:36px;padding:0 8px;border-radius:7px}
.topbar .back-link:hover,.sidebar button.workspace:hover{background:#402d21}
.header-actions{gap:8px}
#saveStatus{margin-right:4px}
.studio-heading{align-items:center}
.studio-heading input{border:1px solid transparent;border-radius:10px;padding:5px 9px}
.studio-heading input:hover{border-color:var(--border)}
.studio-heading input:focus{outline:2px solid var(--accent);outline-offset:2px;background:var(--panel)}
.view-switch button{border-radius:6px}
.view-switch button[aria-pressed=true],.notes-header button[aria-pressed=true]{
  border-color:#8a694f;
  background:#4b3324;
  color:var(--text);
}
.board .block{border-radius:9px;column-gap:10px}
.board .block:not(.add-section){
  border-color:#684834;
  box-shadow:inset 0 1px #9d6d4938,inset 0 -3px #100a0780;
}
.board .block-number{
  display:grid;
  place-items:center;
  width:24px;
  height:24px;
  border-radius:6px;
  background:#442c1e;
  color:var(--accent);
}
.board .block.drop-target{border-color:var(--accent);outline-offset:-2px}
@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  .planner-workspace .planner-rain{
    inset:-14px;
    transform:translate3d(var(--workspace-x,0px),var(--workspace-y,0px),0);
    transition:transform .45s ease-out;
  }
  .planner-workspace::after{
    transform:translate3d(calc(var(--workspace-x,0px) * 2),calc(var(--workspace-y,0px) * 2),0) rotate(-24deg);
    transition:transform .55s ease-out;
  }
  .board .block:not(.add-section){transition:transform .22s ease-out,background-color .22s ease-out}
  .board:not(:has(.dragging)) .block:not(.add-section):hover{
    transform:perspective(950px) rotateX(var(--section-tilt-x,0deg)) rotateY(var(--section-tilt-y,0deg)) scale(.99);
    background:#402d21;
  }
  .board:not(:has(.dragging)) .block:not(.add-section):active{transform:perspective(950px) translateZ(-8px)}
}
.board .block-top{color:var(--accent)}
.board .block-bottom{align-items:center;gap:8px}
.board .block-bottom .workspace-icon{width:14px;height:14px;color:var(--accent)}
.board .add-section .workspace-icon{color:var(--accent)}
.notes-header{gap:5px}
#sideNotes,#chatForm{background:var(--bg);border:1px solid var(--border);border-radius:12px}
#sideNotes:focus,#chatForm:focus-within{outline:2px solid var(--accent);outline-offset:3px}
#chatForm{padding:7px}
#chatQuestion{border:0;background:transparent;outline:none}
.chat-actions .chat-send{width:34px;height:34px;border-radius:8px}
.chat-actions #stopChat{min-width:34px;min-height:34px}
.chat-actions #stopChat .action-label{display:none}
@media(max-width:720px){
  .header-actions button:has(.workspace-icon){width:36px;height:36px;padding:0}
  .header-actions .action-label,.view-switch .action-label{display:none}
  .view-switch button:has(.workspace-icon){width:34px;height:34px;padding:0}
}
@media(max-width:380px){
  .board .block-bottom span{display:none}
}
@media(max-width:600px){
  .book-grid{--book-columns:1}
  .library-header{gap:6px}
}

.team-shell {
  max-height: 80dvh;
  overflow-y: auto;
}

#teamPanel {
  display: grid;
  gap: .75rem;
}

#teamPanel form, #teamPanel label {
  display: grid;
  gap: .4rem;
}

#teamPanel li {
  margin-block: .5rem;
  overflow-wrap: anywhere;
}

#teamPanel input {
  width: 100%;
  min-width: 0;
}

#teamAccount:empty, #teamMessage:empty {
  display: none;
}

#teamAccount, #accountPanel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

#accountPanel p {
  flex-basis: 100%;
}

#teamAccount [hidden], #accountStatus:empty {
  display: none;
}

#accountPanel {
  display: grid;
  align-items: start;
  gap: .85rem;
}

.account-form, #accountPanel label {
  display: grid;
  gap: .4rem;
}

.account-form {
  gap: .85rem;
}

.credential-field {
  position: relative;
  isolation: isolate;
}

.credential-field input {
  background: rgba(232, 185, 143, .12);
  border: 1px solid rgba(242, 210, 179, .36);
  border-radius: 13px 13px 18px 15px;
  padding: 12px 14px;
  color: var(--text);
  caret-color: var(--accent);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  box-shadow: inset 0 1px 0 rgba(255, 239, 219, .22),
    inset 0 -1px 0 rgba(224, 162, 111, .12);
  transition: border-radius .8s ease, background-color .3s ease, border-color .3s ease;
}

.credential-field input:focus {
  background: rgba(232, 185, 143, .19);
  border-color: var(--accent);
  border-radius: 17px 12px 22px 13px;
  outline: 2px solid rgba(231, 184, 132, .4);
  outline-offset: 3px;
}

.credential-field::after {
  content: '';
  position: absolute;
  pointer-events: none;
  right: 18px;
  bottom: -3px;
  width: 12px;
  height: 7px;
  border-radius: 0 0 10px 10px;
  background: rgba(232, 185, 143, .15);
  border: 1px solid rgba(242, 210, 179, .22);
  border-top: 0;
  z-index: -1;
}

@media (prefers-reduced-motion: no-preference) {
  .credential-field:focus-within::after { animation: credential-melt 3s ease-in-out infinite; }
  @keyframes credential-melt {
    0%, 100% { transform: scaleY(.7); }
    50% { transform: scaleY(1.45); }
  }
}

@media (prefers-reduced-motion: reduce) {
  .credential-field input { transition: none; }
}

.account-form input, #accountPanel input[type="file"] {
  min-width: 0;
  width: 100%;
}

.profile-preview, .account-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .55rem;
}

.clove-avatar {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
}

.profile-preview .clove-avatar, .avatar-choices .clove-avatar {
  width: 2.75rem;
  height: 2.75rem;
}

.avatar-choices {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.avatar-choices button {
  display: grid;
  justify-items: center;
  gap: .3rem;
}

.avatar-choices [aria-pressed="true"] {
  outline: 2px solid #e4aa7e;
}

.account-entry {
  grid-column: 1 / -1;
  height: 100dvh;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
}

.account-entry-content {
  width: min(100%, 26rem);
}

.account-entry-content .brand { margin: 0 0 1.3rem; }
#entryStatus:empty { display: none; }

.entry-switch {
  display: block;
  position: relative;
  width: min(100%, 240px);
  margin: 0 auto 1.25rem;
}

.entry-switch input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.entry-switch-track {
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  align-items: center;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #140e0b;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}

.entry-switch-track > span:not(.entry-switch-thumb) { position: relative; }
.entry-switch input:focus-visible + .entry-switch-track { outline: 2px solid var(--accent); outline-offset: 3px; }
.entry-switch input:not(:checked) + .entry-switch-track > span:nth-child(2),
.entry-switch input:checked + .entry-switch-track > span:last-child { color: var(--text); }

.entry-switch-thumb {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: calc(50% - 3px);
  border-radius: 4px;
  border: 1px solid #936546;
  background: #503425;
  transition: transform .4s ease-in-out;
}

.entry-switch-thumb i {
  position: absolute;
  right: 7px;
  top: 50%;
  width: 2px;
  height: 12px;
  transform: translateY(-50%);
  border-radius: 1px;
  background: var(--accent);
  box-shadow: -3px 0 var(--accent), 3px 0 var(--accent);
}

.entry-switch input:checked + .entry-switch-track .entry-switch-thumb { transform: translateX(100%); }

.entry-perspective { perspective: 1000px; }
.entry-card {
  --entry-flip: 0deg;
  --entry-lift: 0px;
  display: grid;
  transform-style: preserve-3d;
  transform: translateY(var(--entry-lift)) rotateX(var(--entry-tilt-x, 0deg))
    rotateY(var(--entry-tilt-y, 0deg)) rotateY(var(--entry-flip));
  transition: transform .55s ease-in-out;
}

.signup-mode .entry-card { --entry-flip: 180deg; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .entry-card.entry-hovering {
    --entry-lift: -8px;
    transition-duration: .16s;
    transition-timing-function: ease-out;
  }

  .entry-hovering .entry-face { box-shadow: 0 14px 24px #100905; }
}

.entry-face {
  grid-area: 1 / 1;
  padding: clamp(18px, 5vw, 32px);
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  backface-visibility: hidden;
}

.entry-face h1 { margin: 0 0 1.2rem; }
.entry-face-back { transform: rotateY(180deg); }

.signup-avatars {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.signup-avatars legend { margin-bottom: .4rem; }
.signup-avatar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(51px, 1fr));
  gap: .35rem;
}

.signup-avatar-grid label {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: .2rem;
  padding: .35rem .15rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: .72rem;
}

.signup-avatar-grid label:has(:checked) { border-color: var(--accent); background: var(--bg); }
.signup-avatar-grid label:has(:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.signup-avatar-grid input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .entry-card, .entry-switch-thumb { transition: none; }
  .entry-card { transform: rotateY(var(--entry-flip)); }
}

/* Neutral focus outline for the desktop account form. */
.credential-field input:focus { outline-color: #f8eadb; border-color: #c9ad98; }
.entry-switch input:focus-visible + .entry-switch-track { outline-color: #f8eadb; }

/* Continue the desktop caption color into the workspace. */
.topbar { background: var(--bg); border-bottom-color: transparent; }

.account-entry {
  grid-template-columns: minmax(180px, 280px) minmax(280px, 416px);
  justify-content: center;
  align-content: center;
  gap: clamp(24px, 6vw, 100px);
}

.entry-robot {
  --robot-x: 0;
  --robot-y: 0;
  width: 240px;
  height: 300px;
  perspective: 900px;
}

.robot-model {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(calc(var(--robot-x) * 8deg));
  transition: transform .18s ease-out;
}


.robot-head {
  position: absolute;
  top: 20px;
  left: 22px;
  width: 196px;
  height: 224px;
  border: 1px solid #c79365;
  border-radius: 48% 53% 46% 50% / 42% 44% 56% 58%;
  background: radial-gradient(ellipse at 27% 17%, #f5d3a3 0%, #b87c4d 24%, #704329 55%, #2b190f 90%);
  box-shadow: inset 8px 6px 12px #ffe5b744, inset -12px -10px 18px #1b0d0b77, 8px 16px 20px #10090566;
  transform-style: preserve-3d;
  transform: rotateX(calc(var(--robot-y) * -10deg)) rotateY(calc(var(--robot-x) * 16deg)) rotateZ(-7deg);
  transition: transform .22s ease-out;
  z-index: 3;
  overflow: hidden;
}

.robot-head::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #f6d3a32b;
  border-radius: inherit;
  pointer-events: none;
}

.robot-crease {
  position: absolute;
  left: 92px;
  top: -14px;
  width: 39px;
  height: 124px;
  border-radius: 60% 20% 75% 10%;
  background: #2f190f;
  box-shadow: -3px 0 3px #d8a570, inset 7px 0 8px #130904;
  transform: rotate(14deg);
}

.robot-face {
  position: absolute;
  top: 105px;
  left: 26px;
  right: 26px;
  height: 79px;
  display: flex;
  justify-content: center;
  align-items: start;
  gap: 27px;
  transform: translateZ(14px);
}

.robot-eye {
  width: 35px;
  height: 39px;
  border-radius: 48%;
  background: #f9e7c9;
  display: grid;
  place-items: center;
  box-shadow: 0 -3px 0 #3e2319, 0 2px 3px #eac49755;
  overflow: hidden;
}

.robot-eye i {
  position: relative;
  width: 20px;
  height: 25px;
  border-radius: 50%;
  background: #2a1d16;
  transform: translate(calc(var(--robot-x) * 6px), calc(var(--robot-y) * 5px));
  transition: transform .16s ease-out;
}

.robot-eye i::before {
  content: '';
  position: absolute;
  width: 6px;
  height: 7px;
  border-radius: 50%;
  top: 4px;
  left: 4px;
  background: #fff5e7;
}

.robot-mouth {
  position: absolute;
  bottom: 2px;
  width: 31px;
  height: 15px;
  border-bottom: 3px solid #291811;
  border-radius: 50%;
}

.robot-brow {
  position: absolute;
  top: 91px;
  width: 25px;
  height: 7px;
  border-top: 3px solid #3b2217;
  border-radius: 50%;
}
.robot-brow-left { left: 45px; transform: rotate(-10deg); }
.robot-brow-right { right: 44px; transform: rotate(10deg); }
.robot-badge {
  position: absolute;
  left: 106px;
  top: 227px;
  z-index: 4;
  width: 30px;
  height: 30px;
  background: #35241a;
  border: 1px solid #d3a676;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.robot-arm {
  position: absolute;
  top: 159px;
  width: 30px;
  height: 65px;
  border-radius: 60% 50% 45% 70%;
  background: linear-gradient(120deg, #d9ab79, #71462e);
  border: 1px solid #bf906a;
}
.robot-arm-left { left: 4px; transform: rotate(27deg); }
.robot-arm-right { right: 3px; transform: rotate(-38deg); transform-origin: 50% 85%; }
.robot-base {
  position: absolute;
  bottom: 18px;
  left: 49px;
  width: 142px;
  height: 15px;
  border-radius: 50%;
  background: #10090577;
  filter: blur(4px);
}

@media (prefers-reduced-motion: no-preference) {
  .robot-head { animation: bean-breathe 5s ease-in-out infinite; }
  .robot-eye { animation: bean-blink 6s infinite; transform-origin: center; }
  .robot-eye:nth-child(2) { animation-delay: .08s; }
  .robot-arm-right { animation: bean-wave 7s ease-in-out infinite; }
  @keyframes bean-breathe {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -5px; }
  }
  @keyframes bean-blink {
    0%, 43%, 47%, 100% { scale: 1 1; }
    45% { scale: 1 .08; }
  }
  @keyframes bean-wave {
    0%, 65%, 100% { rotate: 0deg; }
    72%, 86% { rotate: -18deg; }
    79%, 93% { rotate: 10deg; }
  }
}
@media (max-width: 700px) {
  .account-entry { grid-template-columns: minmax(0, 416px); gap: 12px; align-content: start; }
  .entry-robot { width: 240px; height: 120px; transform: scale(.4); transform-origin: center top; margin-bottom: -4px; }
}
@media (prefers-reduced-motion: reduce) {
  .robot-model, .robot-head, .robot-eye i { transform: none; transition: none; }
}

/* Compact planner actions: export controls use named, focusable icons. */
.topbar{gap:12px}.topbar .breadcrumb{min-width:0}.header-actions{margin-left:auto;gap:6px;flex-wrap:nowrap}
.header-actions #flowchartButton,.header-actions #exportButton{width:36px;height:36px;min-width:36px;padding:0;border-radius:6px;background:transparent}
.header-actions #flowchartButton{margin-left:8px}.header-actions .button{min-height:36px}
.header-actions button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
#saveStatus{font-size:11px;white-space:nowrap;margin:0 8px;color:var(--muted)}
#pptDialog{width:min(94vw,640px)}#pptDialog .dialog-shell{gap:10px;padding:22px}
#pptDialog select{margin:0}#pptSwatches,#pptThemeDescription{display:none}
.flow-actions{justify-content:flex-end}.flow-actions .button{padding:7px 10px;font-size:12px}
#pptDownloadFlow{width:100%;margin-top:8px}.flow-editor{gap:10px}
@media(max-width:700px){#saveStatus{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.header-actions{gap:4px}.header-actions #flowchartButton{margin-left:2px}.topbar .back-link .action-label{display:none}.header-actions .button{padding:6px 8px}}

.flow-step{grid-template-columns:minmax(0,1fr) 30px;gap:8px;padding:12px;position:relative}
.flow-step>label{grid-column:1}.flow-step>[data-remove-step]{grid-column:2;grid-row:1;width:28px;height:28px;padding:0;align-self:end;font-size:18px}
.flow-step-details{grid-column:1/-1;font-size:12px;color:var(--muted)}.flow-step-details summary{cursor:pointer;padding:4px 0}
.flow-step-details[open]{display:grid;gap:8px}.flow-step-details label{margin-top:8px;color:var(--text)}
.flow-step-details summary:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
#pptDialog .dialog-top{position:sticky;top:-22px;background:var(--panel);padding:8px 0;z-index:1}
