@media screen {
 :root{--accent:#26785d;--accent-light:#5daa8a;--soft:#edf6ee;--canvas:#eaf1e7;--ink:#203249;--muted:#667583;--line:#dce6dc;--theme-glow:#d8ebd6;--chat-tint:#eaf5ee;--hero-tint:#eff7e5;--panel:#fffefaf2}
 :root[data-theme="sky"]{--accent:#326d99;--accent-light:#73a9c4;--soft:#edf5fb;--canvas:#e9f1f6;--ink:#25394d;--line:#d9e6ef;--theme-glow:#d4e9f6;--chat-tint:#eaf4fb;--hero-tint:#eef6fe}
 :root[data-theme="peach"]{--accent:#ac514b;--accent-light:#d08a7c;--soft:#fcf0ed;--canvas:#f5ece8;--ink:#453039;--line:#eddfd9;--theme-glow:#f5ded5;--chat-tint:#f9efeb;--hero-tint:#fef2e9}
 :root[data-theme="lavender"]{--accent:#786092;--accent-light:#a38fbe;--soft:#f2edf8;--canvas:#efeaf4;--ink:#393347;--line:#e3dcea;--theme-glow:#e6dcf3;--chat-tint:#f2edf8;--hero-tint:#f7f2fc}
 :root[data-theme="sand"]{--accent:#86682d;--accent-light:#b69a54;--soft:#faf5e4;--canvas:#f3efe2;--ink:#413a2c;--line:#e8e1cb;--theme-glow:#efe5ba;--chat-tint:#f8f3e4;--hero-tint:#fff8dd}
 html,body{width:100%;height:100%;overflow:hidden}
 body{height:100dvh;display:grid;grid-template-columns:218px minmax(0,1fr);gap:12px;padding:12px;background:radial-gradient(ellipse at 80% 0%,var(--theme-glow),transparent 75%),var(--canvas);font-family:'Yu Gothic UI','Meiryo',sans-serif;color:var(--ink)}
 button{color:var(--ink);border-color:var(--line);box-shadow:0 2px 4px #20324906;transition:background .15s,border-color .15s;cursor:pointer}
 button:disabled{cursor:default;opacity:.55}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
 button:hover:not(:disabled){background:var(--soft);border-color:var(--accent-light)}.primary{background:var(--accent);color:white}.primary:hover:not(:disabled){background:var(--accent);filter:brightness(.94)}
 .ui-icon{width:23px;height:23px;flex:none;vertical-align:middle}
 .sidebar{min-height:0;display:flex;flex-direction:column;padding:20px 14px 14px;border-radius:22px;background:var(--panel);box-shadow:0 5px 28px #43664a07;overflow:auto;overscroll-behavior:contain}
 .brand{display:flex;align-items:center;gap:10px;font-size:37px;color:var(--ink);padding:2px 6px 20px;font-weight:750;text-decoration:none;line-height:1.1}
 .brand img{width:43px;height:43px;object-fit:contain}.brand-note{display:block;font-size:10px;font-weight:500;margin-top:6px;letter-spacing:.01em;color:var(--ink)}
 .side-nav,.side-secondary{display:grid;gap:6px}.sidebar button{display:flex;align-items:center;gap:14px;width:100%;min-height:46px;padding:11px 12px;border:0;border-radius:10px;background:transparent;text-align:left;font-size:13px;box-shadow:none;line-height:1.45}
 .sidebar button.nav-active{background:linear-gradient(120deg,var(--accent-light),var(--accent));color:#fff;font-weight:700;box-shadow:0 3px 10px #345d3922}
 .side-secondary{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}.side-secondary button{font-size:12px;min-height:42px}
 .garden-scene{margin-top:auto;padding-top:15px;min-height:65px;display:flex;align-items:flex-end}.garden-scene img{width:100%;height:90px;object-fit:contain;object-position:bottom}
 .garden-identity{display:flex;gap:8px;align-items:center;padding:14px 4px 0;border-top:1px solid var(--line);font-size:12px;line-height:1.6;overflow-wrap:anywhere}.workspace{display:block}.identity-dot{height:8px;width:8px;border-radius:50%;background:var(--accent);flex-shrink:0}
 .app-surface{min-width:0;min-height:0;display:grid;grid-template-rows:30px minmax(190px,max-content) minmax(52px,max-content) minmax(0,1fr);gap:10px}
 .topbar{padding:0 4px;border:0;height:30px;min-height:0;display:flex;background:transparent;justify-content:space-between;align-items:center;gap:10px}
 .page-label{font-size:11px;color:var(--muted)}.top-meta{gap:10px}.badge{font-size:10px;background:var(--panel);border:1px solid var(--line);padding:4px 10px;border-radius:20px}#account-button{min-height:30px;padding:5px 12px;font-size:10px;background:var(--panel);border-radius:20px;max-width:210px}
 .hero{border-radius:22px;background:linear-gradient(90deg,#ffffff08,#fffdf655),url('/classroom-v1.png') center 49%/cover;display:grid;grid-template-columns:minmax(0,1fr) 270px;gap:12px;padding:14px 16px 0 12px;overflow:hidden;min-width:0}
 .hero-welcome{display:flex;align-items:flex-end;gap:7px;min-width:0}.hero-mascot{width:185px;height:100%;max-height:190px;object-fit:contain;object-position:bottom;filter:drop-shadow(0 4px 4px #325b3e22);flex-shrink:0}
 .hero-copy{min-width:0;align-self:center;flex:1;padding-bottom:10px}.greeting-bubble{position:relative;background:#fffffff2;border-radius:24px;padding:16px 20px 14px;box-shadow:0 3px 16px #4836200c}
 .greeting-bubble::before{content:'';position:absolute;left:-13px;top:48%;border-top:10px solid transparent;border-bottom:6px solid transparent;border-right:15px solid #fffffff2}
 .hero-eyebrow{font-size:8px;letter-spacing:.18em;color:var(--accent);margin:0 0 5px}.greeting-bubble h1{font-size:clamp(20px,2.05vw,32px);font-weight:750;line-height:1.4;margin:0 0 7px;letter-spacing:-.04em;white-space:nowrap}.greeting-bubble em{font-style:normal;color:var(--accent)}.greeting-bubble>p:last-child{font-size:12px;line-height:1.7;margin:0}
 .hero-voice{display:flex;align-items:center;gap:10px;background:#fffffff3;border-radius:16px;margin-top:8px;padding:7px 12px;box-shadow:0 3px 10px #48362010}
 .hero-voice strong{font-size:11px;color:var(--accent);font-weight:700}.hero-voice p{font-size:9px;color:var(--muted);margin:3px 0 0;line-height:1.5}.hero-voice kbd{border:1px solid #97a99e;border-radius:4px;font:9px inherit;background:white;padding:0 7px;color:var(--ink)}
 #hero-voice #voice-button{border:0;border-radius:50%;width:40px;height:40px;min-height:40px;background:linear-gradient(145deg,var(--accent-light),var(--accent));color:white;box-shadow:0 2px 8px #346b3c25;padding:10px;font-size:0;flex-shrink:0}
 #hero-voice #voice-button::before{content:'';display:block;width:20px;height:20px;background:url('/mic.svg') center/contain no-repeat}
 #hero-voice #voice-button .ui-icon{width:21px;height:21px}#hero-voice #voice-button[aria-pressed="true"]{background:#a54141}#hero-voice #voice-button:disabled{background:#b2bdb7}
 .today-card{align-self:stretch;margin-bottom:14px;border-radius:20px;background:#fffceded;padding:15px 17px;display:flex;flex-direction:column;min-height:0;box-shadow:0 3px 14px #4836200a}
 .today-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.today-heading h2{display:flex;align-items:center;gap:7px;font-size:15px;white-space:nowrap;margin:0}.today-heading .ui-icon{color:var(--accent);width:20px;height:20px}#today-date{font-size:10px;white-space:nowrap;background:#fff;padding:4px 7px;border-radius:9px}
 #today-events{list-style:none;margin:9px 0 0;padding:0;overflow:auto;min-height:0}#today-events:empty{display:none}#today-events li{display:flex;gap:12px;padding:5px 8px;border-bottom:1px solid #e7e7d875;font-size:11px;line-height:1.5}#today-events li:nth-child(2n){background:var(--soft);border-radius:7px}#today-events li span:first-child{min-width:35px;color:var(--accent)}#today-events li span:last-child{overflow-wrap:anywhere}
 #today-status{font-size:11px;line-height:1.8;color:var(--muted);margin:12px 0 8px}#today-calendar{margin-top:auto;align-self:flex-end;min-height:28px;font-size:10px;padding:5px 10px;border-radius:8px;background:white}
 .quick-actions{min-width:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:5px;border-radius:16px;background:#ffffffa6}
 .quick-actions button{display:flex;align-items:center;justify-content:center;gap:9px;border:0;border-radius:11px;padding:5px 8px;font-size:11px;line-height:1.5;min-height:40px;box-shadow:none;background:var(--soft)}.quick-actions button:first-child{background:#fff0ee}.quick-actions button:nth-child(2){background:#edf6fd}.quick-actions button:nth-child(3){background:#eef6e9}.quick-actions button:nth-child(4){background:#fff5e3}.quick-actions button:nth-child(5){background:#fbf5de}.quick-actions button .ui-icon{color:var(--accent)}.quick-actions button:first-child .ui-icon{color:#d97579}
 .editor-grid{height:auto;min-height:0;min-width:0;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:10px;margin:0;overflow:hidden;background:transparent}
 .conversation,.document-space{min-width:0;min-height:0;height:auto;border:0;border-radius:20px;background:#ffffffed;overflow:hidden;box-shadow:0 4px 20px #31593906;display:flex;flex-direction:column}
 .section-heading,.document-toolbar{padding:13px 18px 10px;flex:0 0 auto;min-height:0}.section-heading h1,.document-toolbar h2{font-size:14px;margin:0}.eyebrow{font-size:8px;letter-spacing:.16em;color:var(--muted);margin-bottom:4px}.availability{font-size:9px;color:var(--accent)}.tools button{min-height:28px;padding:4px 8px;font-size:10px;border-radius:9px}.tools{gap:4px}
 .messages{min-height:0;padding:0 18px 8px;flex:1 1 0;overflow:auto;overscroll-behavior:contain}.welcome{padding:8px 0 4px}.welcome img{width:52px;height:52px;object-fit:contain;margin:0 0 6px}.welcome h2{font-size:14px}.welcome p{font-size:11px;line-height:1.8;margin-top:7px}
 .message{position:relative;display:block;font-size:12px;line-height:1.9;padding:12px 14px;margin:12px 0 12px 40px;border-radius:3px 14px 14px 14px;white-space:pre-wrap;background:var(--chat-tint);color:var(--ink);min-height:40px}.message.user{background:#eff6fd;margin-left:40px;color:var(--ink);border-radius:3px 14px 14px 14px}.message.error{background:#fff0e8;color:#864e2e}.message-avatar{position:absolute;left:-39px;top:2px;height:32px;width:32px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:white;border:1px solid var(--line);font-size:9px;color:#627d95;white-space:normal}.message-avatar img{height:30px;width:30px;object-fit:contain}.message.user .message-avatar{background:#e6eef8}
 .composer-area{flex:0 0 auto;min-height:0;max-height:65%;background:transparent;padding:7px 14px 9px;border-top:1px solid var(--line);overflow:auto;overscroll-behavior:contain}
 .composer-area .work-shortcuts,.composer-area #voice-status{display:none}.suggestions{margin:0 0 5px;gap:5px}.suggestions button{min-height:28px;padding:4px 8px;font-size:10px}.suggestions button:first-child{width:auto;text-align:center;display:block}
 
 #chat-form{padding:8px 11px;border-radius:14px;border:1px solid var(--line);box-shadow:0 3px 10px #31593907;margin:0;background:#fff}.composer-bottom{font-size:8px}.composer-bottom .primary{font-size:10px;min-height:34px;padding:7px 12px;border-radius:9px}#prompt{height:48px;min-height:44px;max-height:100px;font-size:12px;line-height:1.7}#connection-note{font-size:9px;margin:5px 0 0;line-height:1.5}
 .draft-tools{gap:5px;padding:0 0 6px;margin:0 14px;position:relative;flex-shrink:0;align-items:center}.draft-tools button,.optional-exports summary{min-height:30px;padding:5px 8px;font-size:10px;border-radius:8px;background:white}.draft-tools #export-docx{background:var(--accent);color:white}.optional-exports summary{border:1px solid var(--line);line-height:18px}.draft-note{display:none}
 .paper-meta{padding:0 16px 6px;font-size:9px;gap:8px}.letter-checks{margin:0 14px 6px;font-size:10px;border-radius:8px}.letter-checks summary{padding:5px 8px}.letter-check-content{max-height:90px}
 .paper-scroll{min-height:0;flex:1 1 0;padding:0 14px 18px;overflow:auto;background:transparent;overscroll-behavior:contain}.paper{max-width:794px;width:100%;min-height:650px;padding:36px 8%;border-radius:9px;border:1px solid #e5e9e3;box-shadow:0 3px 9px #20324907;background:#fff;aspect-ratio:210/297}.doc-title{font-size:20px;color:var(--ink)}.paper-rule{margin:16px 0 24px;background:var(--accent-light)}.doc-body{font-size:12px;line-height:2;min-height:600px;color:#354351}
 .document-footer{flex:0 0 auto;padding:7px 15px;font-size:9px;background:transparent;gap:5px}.notice{flex:0 0 auto;font-size:10px;padding:0 15px 7px;line-height:1.5;color:var(--accent)}.extra-document-tools{right:0;max-height:45dvh}
 dialog{background:#fffeFC;border:1px solid var(--line);box-shadow:0 15px 80px #243d4420}dialog::backdrop{background:#273a434d;backdrop-filter:blur(3px)}dialog legend{font-size:13px;font-weight:700}dialog fieldset{border:0;padding:0;margin:20px 0}.theme-options{display:flex;flex-wrap:wrap;gap:8px}.theme-choice{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:11px;padding:8px;font-size:11px;cursor:pointer;margin:0}.theme-choice:has(input:checked),.character-choice:has(input:checked){border-color:var(--accent);background:var(--soft);box-shadow:0 0 0 1px var(--accent)}.theme-choice input,.character-choice input{display:inline-block;width:16px;min-height:16px;padding:0;accent-color:var(--accent)}.theme-swatch{display:block;width:15px;height:15px;border-radius:50%}.swatch-sage{background:#26785d}.swatch-sky{background:#326d99}.swatch-peach{background:#ac514b}.swatch-lavender{background:#786092}.swatch-sand{background:#86682d}.character-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.character-choice{position:relative;display:flex;flex-direction:column;align-items:center;gap:7px;padding:12px 6px;border:1px solid var(--line);border-radius:13px;cursor:pointer;margin:0;font-size:11px;line-height:1.5;text-align:center}.character-choice input{position:absolute;top:7px;left:7px}.character-choice img{width:64px;height:72px;object-fit:contain}.appearance-actions{display:flex;gap:8px;flex-wrap:wrap}#appearance-dialog{width:min(640px,calc(100vw - 28px))}
}
@media screen and (min-width:1400px){body{grid-template-columns:244px minmax(0,1fr);padding:14px;gap:14px}.app-surface{grid-template-rows:30px minmax(225px,max-content) minmax(56px,max-content) minmax(0,1fr);gap:12px}.hero-mascot{width:226px;max-height:225px}.hero{grid-template-columns:minmax(0,1fr) 300px}.greeting-bubble{padding:20px 24px}.hero-copy{padding-bottom:15px}.hero-voice strong{font-size:13px}.greeting-bubble>p:last-child{font-size:14px}.hero-voice{padding:9px 14px}.sidebar button{min-height:50px;font-size:14px}.side-secondary button{font-size:13px}.quick-actions button{font-size:12px}.messages{padding:0 22px 10px}.message{font-size:13px}.composer-area{padding:10px 18px}.paper{padding-top:42px}.doc-body{font-size:13px}}
@media screen and (max-width:1150px){body{grid-template-columns:190px minmax(0,1fr);gap:9px;padding:10px}.hero{grid-template-columns:minmax(0,1fr)}.today-card{display:none}.hero-mascot{width:180px}.sidebar{padding:17px 10px 12px}.brand{font-size:31px;gap:6px}.brand-note{font-size:9px}.sidebar button{font-size:12px;gap:10px;padding:10px}.side-secondary button{font-size:11px}.quick-actions button{font-size:10px;gap:5px}.quick-actions .ui-icon{width:19px;height:19px}.hero-eyebrow{font-size:8px}.greeting-bubble h1{font-size:27px}.greeting-bubble>p:last-child{font-size:13px}}
@media screen and (max-height:750px) and (min-width:701px){.app-surface{grid-template-rows:28px minmax(152px,max-content) minmax(46px,max-content) minmax(0,1fr);gap:8px}.hero-mascot{width:153px;max-height:152px}.hero{padding:8px 12px 0 8px;grid-template-columns:minmax(0,1fr) 240px}.greeting-bubble{border-radius:19px;padding:10px 14px}.greeting-bubble h1{font-size:24px;margin-bottom:5px}.greeting-bubble>p:last-child{font-size:11px}.hero-copy{padding-bottom:8px}.hero-eyebrow{display:none}.hero-voice{padding:5px 9px;margin-top:6px;gap:7px}.hero-voice strong{font-size:10px}.hero-voice p{font-size:8px}#hero-voice #voice-button{width:33px;height:33px;min-height:33px;padding:8px}.today-card{padding:11px 13px;margin-bottom:8px;border-radius:16px}.today-heading h2{font-size:13px}.today-heading .ui-icon{width:17px;height:17px}#today-date{font-size:9px}#today-status{margin:7px 0;font-size:10px}.quick-actions{padding:4px;gap:6px}.quick-actions button{min-height:34px;font-size:10px}.section-heading,.document-toolbar{padding:9px 14px 7px}.sidebar{padding-top:14px}.sidebar button{min-height:38px;padding:8px 10px;font-size:12px}.side-nav,.side-secondary{gap:4px}.side-secondary{padding-top:8px;margin-top:10px}.side-secondary button{min-height:32px;font-size:11px}.garden-scene img{height:60px}.garden-scene{min-height:35px;padding-top:8px}.brand{padding-bottom:14px}.garden-identity{padding-top:9px;font-size:11px}.composer-area{max-height:60%}.welcome img{width:38px;height:38px}.welcome p{font-size:10px}.message{font-size:11px;padding:9px 11px}.eyebrow{display:none}.paper{padding-top:26px}.doc-title{font-size:18px}}
@media screen and (max-width:1150px) and (max-height:750px){.hero{grid-template-columns:minmax(0,1fr)}.app-surface{grid-template-rows:28px minmax(136px,max-content) minmax(46px,max-content) minmax(0,1fr)}.hero-mascot{max-height:136px;width:135px}.greeting-bubble h1{font-size:25px}}
@media screen and (max-width:950px) and (min-width:701px){body{grid-template-columns:66px minmax(0,1fr);gap:8px;padding:8px}.sidebar{border-radius:17px;padding:13px 7px}.sidebar .brand{padding:0 4px 18px}.brand img{width:42px;height:42px}.sidebar .brand span{display:none}.sidebar button{font-size:0;gap:0;padding:9px;justify-content:center;min-height:42px}.sidebar button .ui-icon{width:23px;height:23px}.side-secondary button{font-size:0}.garden-scene{display:none}.garden-identity{margin-top:auto;justify-content:center;min-height:32px}.garden-identity .workspace{display:none}.quick-actions button{font-size:9px}.quick-actions .ui-icon{width:18px;height:18px}.draft-tools{margin:0 10px;gap:4px}.draft-tools button,.optional-exports summary{font-size:9px;padding:4px 6px}.paper-scroll{padding:0 10px 12px}.paper{padding-left:7%;padding-right:7%}.paper-meta{padding-left:12px;padding-right:12px}.letter-checks{margin-left:10px;margin-right:10px}.document-footer{font-size:8px}.composer-area{padding-left:10px;padding-right:10px}.hero-mascot{width:120px}.greeting-bubble h1{font-size:23px}.hero-voice p{font-size:8px}}
@media screen and (max-width:700px){html,body{height:auto;overflow:auto}body{display:block;padding:8px}.sidebar{padding:7px 9px;display:flex;flex-direction:row;align-items:center;gap:8px;overflow:visible;border-radius:13px;margin-bottom:8px}.sidebar .brand{padding:0;font-size:23px;gap:6px}.brand-note{display:none}.brand img{width:29px;height:29px}.side-nav{display:none}.side-secondary{display:flex;border:0;padding:0;margin:0 0 0 auto;gap:2px}.sidebar .side-secondary button{font-size:0;min-height:34px;width:34px;padding:7px;justify-content:center;gap:0}.side-secondary .ui-icon{width:19px;height:19px}.garden-scene,.garden-identity{display:none}.app-surface{display:flex;flex-direction:column;gap:8px}.topbar{height:26px;min-height:26px}.page-label{font-size:9px}.top-meta{gap:5px}#account-button{font-size:9px;max-width:140px;padding:4px 8px;min-height:26px}.hero{min-height:154px;height:auto;flex:none;grid-template-columns:minmax(0,1fr);padding:8px 8px 0}.hero-mascot{width:110px;max-height:150px}.greeting-bubble{padding:11px 12px;border-radius:16px}.greeting-bubble h1{font-size:20px;white-space:normal;letter-spacing:-.03em}.greeting-bubble>p:last-child{font-size:10px}.hero-eyebrow{display:none}.hero-voice{padding:5px 7px;gap:7px}.hero-voice strong{font-size:9px}.hero-voice p{font-size:8px;line-height:1.35}.hero-copy{padding-bottom:7px}#hero-voice #voice-button{width:30px;height:30px;min-height:30px;padding:7px}.today-card{display:none}.quick-actions{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;padding:5px;flex-shrink:0}.quick-actions button{font-size:10px;gap:5px;min-height:38px}.quick-actions button:nth-child(n+4){display:flex}.quick-actions .ui-icon{width:18px;height:18px}.editor-grid{display:flex;flex-direction:column;overflow:visible;gap:10px;min-height:0}.conversation{height:480px;flex:none}.document-space{min-height:0;height:760px;flex:none}.composer-area{max-height:60%;padding:8px 12px}.paper-scroll{overflow:auto;min-height:0}.paper{min-height:650px}.character-options{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-options{gap:5px}.theme-choice{font-size:10px;padding:7px}.draft-tools{margin:0 12px}.section-heading,.document-toolbar{padding:12px 14px}.extra-document-tools{position:absolute;right:0;top:100%;z-index:5;background:white;padding:12px;border-radius:10px;border:1px solid var(--line);width:min(300px,calc(100vw - 40px));max-height:45dvh;overflow:auto}.optional-exports[open]{display:block}}
@media(prefers-reduced-motion:reduce){button{transition:none}}

/* Keep the greeting and voice guidance inside the banner at every breakpoint. */
@media screen {
 .hero{align-items:center;padding-bottom:12px}
 .hero-welcome{align-items:center;min-height:0}
 .hero-mascot{height:auto;align-self:center}
 .hero-copy{padding-bottom:0}
 .greeting-bubble h1{white-space:normal;overflow-wrap:anywhere}
 .hero-voice>div{min-width:0;overflow-wrap:anywhere}
 .today-card{margin-bottom:0;max-height:190px}
 .quick-actions button{min-width:0;overflow-wrap:anywhere}
 .quick-actions button>span{min-width:0}
}
@media screen and (min-width:1400px){.today-card{max-height:225px}}
@media screen and (max-height:750px) and (min-width:701px){.today-card{max-height:136px}}
@media screen and (min-height:550px){.composer-area{max-height:none;overflow:visible}}

@media screen {
 .chat-heading-tools{display:flex;align-items:center;gap:7px;flex-shrink:0}
 #speech-toggle{min-height:26px;padding:4px 8px;border-radius:9px;font-size:10px;white-space:nowrap;box-shadow:none}
 #speech-toggle[aria-pressed="true"]{background:var(--soft);color:var(--accent);border-color:var(--accent-light)}
 #speech-toggle[data-speaking="true"]{border-color:var(--accent);box-shadow:0 0 0 2px var(--soft)}
}

@media screen {
 #mode{min-height:26px;font-size:10px;padding:4px 10px;box-shadow:none;white-space:nowrap}
 #mode[data-connection="offline"],#mode[data-connection="refresh"]{background:#fff3da;color:#75541c;border-color:#e1cc9e}
 #connection-dialog{max-width:520px}
 #connection-dialog li{margin:9px 0;line-height:1.6}
}

@media screen {
 #recovery-dialog{width:min(620px,calc(100vw - 28px))}
 .recovery-row{display:flex;align-items:center;gap:8px;margin:8px 0}.recovery-row .library-item{flex:1;min-width:0;text-align:left;overflow-wrap:anywhere}
 #recovery-list button{font-size:12px}.recovery-notice{min-height:22px;padding:3px 7px;font-size:10px}
}
@media screen {
 #export-review{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px)}
 #export-review-items{max-height:32dvh;overflow:auto;padding-left:24px;overflow-wrap:anywhere}
 #export-review-items li{margin:8px 0}
 .export-review-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:8px}
 .export-review-actions button{white-space:normal}
}
@media screen {
 #document-changes-dialog{width:min(880px,calc(100vw - 28px));max-height:calc(100dvh - 28px)}
 .comparison-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
 .comparison-columns>section{min-width:0;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff}
 .comparison-columns h4{margin:0 0 10px;font-size:13px}
 .comparison-text{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;line-height:1.75}
 .comparison-removed{background:#ffe4e3;color:#8a2929;text-decoration:line-through;text-decoration-thickness:1px}
 .comparison-added{background:#dff3df;color:#245e31;text-decoration:underline;text-underline-offset:3px}
 .comparison-legend{font-size:12px;color:var(--muted)}
 .comparison-notice{min-height:22px;padding:3px 7px;font-size:10px}
 #template-changes .template-change{padding:12px 0}
 #template-changes .comparison-columns{grid-template-columns:1fr}
}
@media screen and (max-width:700px){.comparison-columns{grid-template-columns:1fr}}
@media screen {
 .word-save-state{position:sticky;top:0;z-index:2;margin:0 0 12px;padding:8px 12px;border-radius:9px;background:#fff3da;color:#75541c;font-size:12px}
 .word-save-state[data-state="saved"]{background:#e6f3e9;color:#245e31}
 .word-save-state[data-state="working"]{background:#eef2f7;color:#344155}
 #word-exit-dialog{width:min(560px,calc(100vw - 28px));max-height:calc(100dvh - 28px)}
 .word-exit-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px}
 .word-exit-actions button{white-space:normal}
}

/* Home and editing share the same spacious workspace. */
@media screen {
 body.workspace-focused .app-surface{grid-template-rows:30px 62px minmax(0,1fr);gap:8px}
 body.workspace-focused .topbar{grid-row:1}
 body.workspace-focused .hero{grid-row:2;grid-template-columns:minmax(0,1fr);min-height:0;height:62px;padding:6px 12px;border-radius:15px;background:var(--panel);overflow:visible}
 body.workspace-focused .quick-actions{display:none}
 body.workspace-focused .hero-copy>.quick-actions{display:grid;flex:1;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;max-width:620px;background:transparent;border-radius:0}
 body.workspace-focused .hero-copy>.quick-actions button{min-height:34px;padding:6px;gap:5px;font-size:11px;white-space:nowrap}
 body.workspace-focused .hero-copy>.quick-actions .ui-icon{flex:none;width:18px;height:18px}
 body.workspace-focused .hero-copy>.quick-actions #quick-idea{display:none}
 body.workspace-focused .editor-grid{grid-row:3}
 body.workspace-focused .today-card,body.workspace-focused .hero-eyebrow,body.workspace-focused .greeting-bubble>p:last-child,body.workspace-focused .greeting-bubble::before,body.workspace-focused .messages .welcome{display:none}
 body.workspace-focused .hero-welcome{height:100%;align-items:center;gap:12px}
 body.workspace-focused .hero-mascot{width:48px;height:48px;max-height:48px;object-position:center}
 body.workspace-focused .hero-copy{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0}
 body.workspace-focused .greeting-bubble{background:none;box-shadow:none;padding:0;border-radius:0}
 body.workspace-focused .greeting-bubble h1{font-size:18px;margin:0;white-space:nowrap}
 body.workspace-focused .hero-voice{flex-shrink:0;margin:0;padding:0;background:none;box-shadow:none;gap:8px}
 body.workspace-focused .hero-voice strong{font-size:11px}
 body.workspace-focused .hero-voice p{font-size:8px;margin-top:2px}
 body.workspace-focused #hero-voice #voice-button{width:34px;height:34px;min-height:34px;padding:8px}
}
@media screen and (max-width:1150px){.topbar .page-label{display:none}}
@media screen and (min-width:701px) and (max-width:1150px){body.workspace-focused .greeting-bubble{display:none}}
@media screen and (min-width:701px) and (max-width:900px){body.workspace-focused .hero-voice>div{display:none}}
@media screen and (max-height:750px) and (min-width:701px){
 body.workspace-focused .app-surface{grid-template-rows:28px 56px minmax(0,1fr)}
 body.workspace-focused .hero{height:56px}
 body.workspace-focused .hero-mascot{width:42px;height:42px;max-height:42px}
}
@media screen and (max-width:700px){
 body.workspace-focused .hero{height:56px;min-height:56px;padding:6px 10px}
 body.workspace-focused .hero-mascot{width:38px;height:38px;max-height:38px}
 body.workspace-focused .greeting-bubble{display:none}
 body.workspace-focused .hero-copy{justify-content:flex-start}
 body.workspace-focused .hero-voice{flex-shrink:1}
 body.workspace-focused .quick-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:4px}
 body.workspace-focused .quick-actions button{min-height:34px;font-size:9px}
 body.workspace-focused .quick-actions button:nth-child(n+4){display:none}
 body.workspace-focused .topbar{height:30px;min-height:30px}
#account-button{max-width:124px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}
@media screen {
 .draft-tools>.optional-exports{margin-left:auto}
 .document-more-group{display:grid;gap:6px;min-width:0}
 .document-more-group+.document-more-group{border-top:1px solid var(--line);padding-top:10px;margin-top:4px}
 .document-more-label{margin:0;font-size:10px;font-weight:700;color:var(--muted)}
 .extra-document-tools .word-layout-tools{display:grid;margin:0;padding:0;gap:6px;min-width:0}
 .extra-document-tools .word-layout-tools label{font-size:10px}
 .extra-document-tools .word-layout-tools select{width:100%;min-width:0;font-size:11px}
 .extra-document-tools button{font-size:11px;text-align:left}
}
@media screen {
 .composer-bottom #reference-open{min-height:28px;padding:4px 8px;font-size:10px;border-radius:8px;background:white;flex:none}
 .composer-bottom>span{margin-left:auto}
 .composer-bottom{gap:8px}
 .composer-shortcuts:has(.suggestions[hidden]){display:none}
 #suggestion-status{font-size:10px;margin:0 0 6px;color:var(--muted)}
 .suggestions button{white-space:normal}
}
@media screen and (min-width:701px){
 .sidebar>.brand,.sidebar>.side-nav,.sidebar>.side-secondary,.sidebar>.garden-identity{flex-shrink:0}
 .sidebar .garden-identity{margin-top:auto}
}
@media screen and (min-width:701px) and (max-height:850px){
 .sidebar{padding-top:12px;padding-bottom:12px}
 .sidebar .brand{padding-bottom:10px}
 .sidebar .side-nav,.sidebar .side-secondary{gap:4px}
 .sidebar button{min-height:38px;padding:7px 9px}
 .sidebar .side-secondary{margin-top:10px;padding-top:8px}
 .sidebar .side-secondary button{min-height:34px}
 .sidebar .ui-icon{width:20px;height:20px}
 .sidebar .garden-identity{padding-top:8px;font-size:11px}
}
@media screen and (min-width:701px) and (max-height:650px){
 .sidebar{padding-top:10px;padding-bottom:10px}
 .sidebar .brand{padding-bottom:8px}
 .sidebar .brand img{width:36px;height:36px}
 .sidebar .side-nav,.sidebar .side-secondary{gap:3px}
 .sidebar button{min-height:32px;padding:6px 8px}
 .sidebar .side-secondary{margin-top:8px;padding-top:7px}
 .sidebar .side-secondary button{min-height:30px}
 .sidebar .ui-icon{width:18px;height:18px}
 .sidebar .garden-identity{padding-top:6px}
}
@media screen and (min-width:701px) and (max-height:550px){
 .sidebar{padding-top:8px;padding-bottom:8px}
 .sidebar .brand{padding-bottom:6px}
 .sidebar .brand-note{display:none}
 .sidebar .side-nav,.sidebar .side-secondary{gap:2px}
 .sidebar button,.sidebar .side-secondary button{min-height:28px;padding:4px 8px}
 .sidebar .side-secondary{margin-top:6px;padding-top:6px}
}

/* Sidebar contains Coco work; the HOME portal contains external garden entrances. */
.side-menu-caption{font-size:12px;font-weight:600;letter-spacing:.04em;color:var(--muted);margin:12px 12px 7px}
.side-secondary>.side-menu-caption{margin:0 12px 4px}
@media(min-width:701px){.sidebar .side-nav button{font-size:15px;gap:11px}.sidebar .side-secondary button{font-size:13px}.sidebar .side-nav{gap:4px}.sidebar .side-menu-caption{flex-shrink:0}}
@media(min-width:701px) and (max-height:750px){.side-menu-caption{margin-top:5px;margin-bottom:4px}.sidebar .side-nav button{min-height:36px;padding-block:7px;font-size:14px}.sidebar .side-secondary button{font-size:12px;min-height:30px}}
@media(max-width:700px){.sidebar .side-menu-caption{display:none}}

/* Clear entrances and capability status while Google and AI are separate. */
.home-main-actions{flex:1;min-width:0}.home-main-actions>.home-ai{margin:0;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.readiness-status{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px;font-size:12px;line-height:1.5;color:var(--muted)}
.readiness-status span{padding:3px 9px;border-radius:7px;background:#fff4de;color:#75541c}.readiness-status span[data-ready="true"]{background:#e8f4ec;color:#235c40}
.hero-copy>.readiness-status{flex-shrink:0;flex-direction:column;margin:0;font-size:11px;gap:3px}
body.workspace-focused .hero-copy>.quick-actions{grid-template-columns:repeat(2,minmax(0,1fr));max-width:420px}
body.workspace-focused #hero-voice{display:none}
#work-recovery-status{font-size:11px;line-height:1.5;color:var(--muted);margin:6px 0 0;min-height:0}
@media(max-width:700px){.home-main-actions>.home-ai{grid-template-columns:1fr;gap:8px}.home-start{align-items:flex-start}.home-start .home-mascot{width:42px;height:42px}.home-main-actions .home-ai button{min-height:64px;padding:12px}.hero-copy>.readiness-status{font-size:10px}.readiness-status{font-size:11px}}
