:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183553;background:#f1f4f8;font-synthesis:none}*{box-sizing:border-box}body{margin:0;min-width:0}button,input,textarea{font:inherit}[hidden]{display:none!important}.header{min-height:96px;padding:20px max(24px,calc((100vw - 1180px)/2));background:#fff;border-bottom:1px solid #dce4ee;display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{font-size:27px;font-weight:850;color:#164a82;text-decoration:none;white-space:nowrap;letter-spacing:-1px}.brand>span{color:#e67d2f}.brand small{display:block;font-size:9px;letter-spacing:2.5px;margin-top:5px;font-weight:650;color:#65778b}.account{display:flex;align-items:center;gap:18px;font-size:13px;min-width:0}.account>span{overflow-wrap:anywhere}main{width:min(1180px,100%);margin:auto;padding:48px 24px;min-height:calc(100dvh - 170px)}.login-layout{display:grid;grid-template-columns:1.1fr 1fr;gap:70px;align-items:center;min-height:65dvh}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:750;color:#627a92}.welcome .eyebrow{color:#d2732e}.welcome h1{font-size:clamp(36px,4vw,55px);line-height:1.13;letter-spacing:-2px;font-weight:750;margin:23px 0}.welcome h1 em{font-style:normal;color:#e58337}.welcome p{font-size:16px;color:#65798e;line-height:1.8;max-width:360px}.welcome-rule{height:3px;width:55px;background:#ea8739;margin:34px 0 18px}.signature{font-size:10px;letter-spacing:2px;color:#7a8998}.login-card{background:#fff;border:1px solid #dce4ee;border-radius:20px;padding:38px;box-shadow:0 16px 60px #1b3e6c0b}.login-card h2{font-size:25px;letter-spacing:-.7px;margin:16px 0 10px}.muted{color:#6a7e91;line-height:1.6}.login-card>.muted{font-size:14px;margin-bottom:25px}label{display:block;font-size:13px;font-weight:650;margin:20px 0 8px;color:#34526f}input,textarea{display:block;width:100%;padding:13px 14px;background:#f9fbfd;border:1px solid #cdd9e6;border-radius:9px;color:#213e5b;font-size:16px;min-height:48px}textarea{resize:vertical;line-height:1.6}input:focus,textarea:focus{outline:3px solid #266bae22;border-color:#477dab}.button{display:inline-flex;align-items:center;justify-content:center;gap:12px;min-height:46px;border-radius:9px;border:1px solid transparent;padding:12px 18px;font-weight:650;font-size:13px;cursor:pointer;text-decoration:none;line-height:1.3}.button.primary{background:#1a518b;color:#fff;border-color:#1a518b}.button.primary:hover{background:#123f70}.button.quiet{background:#fff;border-color:#d5dfeb;color:#3b5c7a}.button:focus-visible,.tabs button:focus-visible{outline:3px solid #e99044;outline-offset:3px}.button:disabled{opacity:.55;cursor:wait}.login-card .primary{width:100%;margin-top:26px;justify-content:space-between}.login-note{font-size:11px;color:#8390a0;margin:21px 0 0;text-align:center}.status{font-size:13px;line-height:1.6;color:#38634c;overflow-wrap:anywhere}.status:empty{display:none}.status.error{color:#a23d2c}.page-title{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:30px}.page-title h1{font-size:34px;letter-spacing:-1px;margin:10px 0}.page-title p{font-size:14px;margin:0}.workspace-grid{display:grid;grid-template-columns:minmax(280px,.9fr) minmax(0,1.25fr);gap:24px}.project-panel,.editor-panel{background:#fff;border:1px solid #dce4ee;border-radius:16px;padding:23px;min-width:0}.panel-toolbar{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-bottom:18px}.tabs{display:flex;padding:4px;background:#eef3f9;border-radius:8px;gap:3px}.tabs button{border:0;background:transparent;color:#60768f;min-height:38px;border-radius:6px;padding:8px 11px;cursor:pointer;font-size:12px;font-weight:650}.tabs button[aria-pressed=true]{background:#fff;color:#1f4a79;box-shadow:0 2px 5px #173b6110}.panel-toolbar>.button{font-size:12px;min-height:40px;padding:8px 10px}.project-list{display:grid;gap:12px}.project-item{padding:17px;border:1px solid #dce5f0;border-radius:11px;background:#fbfcfe;min-width:0}.project-item.selected{border-color:#4b80b5;background:#f0f6fc}.project-item h3{font-size:15px;margin:0 0 7px;overflow-wrap:anywhere}.project-item p{font-size:11px;color:#718499;margin:0;line-height:1.5}.project-actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.project-actions button{min-height:40px;font-size:12px;padding:9px 12px}.button.danger{color:#a24431;background:transparent;padding-left:8px;padding-right:8px}.empty-detail{padding:42px 14px;text-align:center}.empty-detail h2{font-size:21px;margin:20px 0 10px}.empty-detail p{font-size:14px;max-width:300px;margin:0 auto}.empty-symbol{font-size:36px;color:#df813c}.editor-heading{padding-bottom:18px;border-bottom:1px solid #e3eaf2}.editor-heading h2{font-size:23px;margin:12px 0 0}.editor-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:24px}#savedAt{display:block;font-size:11px;margin-top:14px}#moreProjects{width:100%;margin-top:18px}.footer{text-align:center;font-size:11px;color:#7b8b9c;padding:20px 24px 30px;line-height:1.7}.footer span{margin:0 8px;color:#e68d44}.boot{text-align:center;padding:80px 0;color:#617990}@media(max-width:740px){.header{padding:16px 18px;min-height:84px;gap:12px}.brand{font-size:23px}.brand small{font-size:8px;letter-spacing:1.8px}.account{gap:8px;align-items:flex-end;flex-direction:column;font-size:11px}.account .button{min-height:40px;padding:9px;font-size:11px}main{padding:25px 18px 32px}.login-layout{grid-template-columns:minmax(0,1fr);gap:28px;min-height:0}.welcome h1{font-size:36px;margin:14px 0;letter-spacing:-1.1px}.welcome p{font-size:14px;margin-bottom:0}.welcome-rule,.signature{display:none}.login-card{padding:26px 22px;border-radius:16px}.login-card h2{font-size:23px}.workspace-grid{grid-template-columns:minmax(0,1fr);gap:18px}.page-title{gap:14px;align-items:flex-start;flex-wrap:wrap;margin-bottom:23px}.page-title h1{font-size:29px}.page-title>.button{min-height:48px}.project-panel,.editor-panel{padding:18px}.editor-actions>.primary{flex:1}.footer{font-size:10px}.button{min-height:48px}.project-actions button{min-height:44px}.panel-toolbar .tabs button{min-height:44px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}

.brand img{display:block;width:155px;height:68px;object-fit:contain}.project-actions{flex-wrap:wrap}

/* Portada compartida: imagen íntegra; controles y contenido siempre accesibles. */
body{height:100dvh;display:flex;flex-direction:column;overflow:hidden}
.header{flex:none;min-height:82px;padding-top:10px;padding-bottom:10px}
.brand img{height:52px}
main{width:100%;max-width:1720px;flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(380px,1fr);gap:clamp(20px,3vw,48px);padding:24px clamp(18px,3vw,48px);overflow:hidden;align-items:stretch}
.project-cover{margin:0;min-width:0;min-height:0;display:flex;align-items:center;justify-content:center}
.project-cover img{display:block;width:100%;height:100%;min-height:0;object-fit:contain;object-position:center;border-radius:12px}
#boot,#loginView,#workspace{min-width:0;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:8px}
.login-layout{display:flex;flex-direction:column;gap:22px;align-items:stretch;min-height:0}
.welcome h1{font-size:clamp(26px,2.6vw,40px);margin:12px 0;letter-spacing:-1px}
.welcome p{font-size:14px;line-height:1.6;margin:8px 0;max-width:none}
.welcome-rule{margin:16px 0 12px}
.login-card{padding:26px;box-shadow:none}
.login-card h2{margin:12px 0 8px}
.login-card>.muted{margin-bottom:16px}
.login-card label{margin-top:14px}
.login-card .primary{margin-top:20px}
.workspace-grid{grid-template-columns:minmax(0,1fr);gap:18px}
.page-title{margin-bottom:20px;flex-wrap:wrap}
.page-title h1{font-size:29px}
.empty-detail{padding:24px 10px}
.footer{flex:none;padding:10px 18px;font-size:10px}
@media(max-width:740px){
 .header{min-height:74px;padding:8px 16px}.brand img{width:125px;height:44px}
 main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(100px,28%) minmax(0,1fr);gap:16px;padding:12px 16px}
 .project-cover img{border-radius:8px}
 #loginView,#workspace,#boot{padding-right:5px}
 .welcome h1{font-size:28px}.welcome-rule,.signature{display:block}
 .welcome-rule{margin:12px 0 8px}.login-card{padding:22px}
 .footer{padding:8px 12px;font-size:9px}
}
@media(max-height:500px) and (min-width:741px){.header{min-height:65px}.brand img{height:36px}main{padding-top:12px;padding-bottom:12px}.footer{padding:5px 12px}}
.account{flex-wrap:wrap;justify-content:flex-end;gap:8px}
dialog{width:min(540px,calc(100% - 28px));max-height:88dvh;overflow:auto;border:1px solid #dce4ee;border-radius:18px;padding:26px;color:#183553;background:#fff}dialog::backdrop{background:#10273eb3}.dialog-heading{display:flex;justify-content:space-between;align-items:center;gap:16px}.dialog-heading h2{margin:0}dialog form>.button,dialog form>div>.button{margin-top:20px}dialog hr{border:0;border-top:1px solid #dce4ee;margin:26px 0}

/* Presentación centrada compartida entre computadora y teléfono. */
.header{flex-direction:column;justify-content:center;gap:12px}
.header .brand{display:flex;flex-direction:column;align-items:center;text-align:center}
.header .brand img{margin-inline:auto;object-position:center}
.header .account{justify-content:center;align-items:center;flex-direction:row}
h1,h2,h3,h4,h5,h6,.eyebrow,.signature,.welcome,.editor-heading,.page-title .muted{ text-align:center }
.welcome-rule{margin-inline:auto}.welcome p{margin-inline:auto}
.page-title{flex-direction:column;align-items:center;text-align:center}
.login-card .primary{justify-content:center}.dialog-heading{flex-wrap:wrap;justify-content:center}
.dialog-heading h2{flex-basis:100%}.project-actions,.editor-actions{justify-content:center}
@media(max-width:740px){.header .account{flex-wrap:wrap}.header .account>span{flex-basis:100%;text-align:center}}

/* Distribución compacta: acceso y proyectos aprovechan la ventana completa. */
.header{position:relative;min-height:76px;padding:8px 24px;gap:6px}
.header .brand img{height:42px}
.header .brand small{margin-top:2px}
main{max-width:1920px;grid-template-columns:minmax(0,1.15fr) minmax(340px,.85fr);padding:16px 24px;gap:24px}
#loginView{justify-content:safe center;gap:14px}
.welcome h1{font-size:clamp(24px,2.3vw,34px);margin:8px 0;line-height:1.16}
.welcome-rule{margin:10px auto 8px}
.login-card{padding:20px 24px}
.login-card h2{font-size:23px;margin:8px 0}
.login-card label{margin-top:12px}
.login-card .primary{margin-top:16px}
.login-note{margin:12px 0 0}
body:has(#workspace:not([hidden])) .header{padding-inline:24px 24px;min-height:76px}
body:has(#workspace:not([hidden])) .header .account{position:absolute;right:24px;max-width:calc(50% - 110px);gap:6px}
.account .button{min-height:40px;padding:8px 10px;font-size:12px}
.account>span{font-size:11px;flex-basis:100%;text-align:right}
main:has(#workspace:not([hidden])){grid-template-columns:minmax(190px,.65fr) minmax(0,2fr)}
#workspace{display:flex;flex-direction:column;overflow:hidden;padding-right:0}
.page-title{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;margin-bottom:14px;flex:none}
.page-title h1{font-size:27px;margin:5px 0}
.page-title .muted{font-size:12px}
.page-title>.button{padding:10px 12px;min-height:44px}
.workspace-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:14px;min-height:0;flex:1}
.project-panel,.editor-panel{padding:16px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.panel-toolbar{gap:6px;margin-bottom:12px;flex-wrap:wrap}
.project-list{gap:10px}
.project-item{padding:12px}
.project-item h3{text-align:left;margin-bottom:5px}
.project-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin-top:10px}
.project-actions button{min-height:44px;padding:8px;font-size:11px}
.editor-heading{padding-bottom:10px}
.editor-heading h2{font-size:20px;margin:6px 0 0}
#projectForm label{margin:12px 0 6px}
#projectForm input{min-height:44px;padding:10px 12px}
#notes{height:88px;min-height:70px}
.editor-actions{margin-top:14px;gap:8px}
#savedAt{margin-top:8px}
.empty-detail{padding:20px 8px}
.footer{padding:6px 12px}
@media(min-width:741px) and (max-width:1100px){
 main:has(#workspace:not([hidden])){grid-template-columns:minmax(140px,.38fr) minmax(0,2fr);gap:16px}
 .page-title{grid-template-columns:1fr 1fr}.page-title>div{grid-column:1/-1}
 body:has(#workspace:not([hidden])) .header{min-height:100px}
}
@media(max-width:740px){
 body{height:auto;min-height:100dvh;overflow:auto}
 .header{min-height:64px;padding:8px 12px;gap:7px}
 .header .brand img{width:112px;height:36px}.brand small{font-size:8px}
 main{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;gap:12px;padding:12px;overflow:visible;flex:1}
 .project-cover{height:clamp(100px,20dvh,160px)}
 #loginView,#workspace,#boot{overflow:visible;padding:0;scrollbar-gutter:auto}
 #loginView{gap:12px;max-width:520px;width:100%;margin:auto}
 .welcome h1{font-size:23px;margin:6px 0}.welcome .eyebrow,.signature{font-size:9px;letter-spacing:1px}
 .welcome-rule{margin:8px auto;height:2px}
 .login-card{padding:16px 18px;border-radius:14px}
 .login-card h2{font-size:21px;margin:6px 0}
 .login-card input{min-height:46px;padding:10px 12px}
 .login-card .primary{min-height:46px;margin-top:14px}
 .login-note{margin-top:10px;font-size:10px}
 body:has(#workspace:not([hidden])) .header{padding:8px 12px;min-height:64px;display:grid;grid-template-columns:100px minmax(0,1fr);gap:8px}
 body:has(#workspace:not([hidden])) .header .account{position:static;max-width:none;justify-content:flex-end;gap:5px}
 .header .account>span{flex-basis:100%;font-size:10px;text-align:right}
 .header .account .button{min-height:44px;padding:7px 8px;font-size:11px}
 main:has(#workspace:not([hidden])){grid-template-columns:minmax(0,1fr);gap:10px}
 main:has(#workspace:not([hidden])) .project-cover{height:clamp(80px,14dvh,112px)}
 .page-title{grid-template-columns:1fr 1fr;gap:8px;margin-bottom:12px}
 .page-title>div{grid-column:1/-1}.page-title h1{font-size:25px;margin:3px 0}.page-title .eyebrow{font-size:9px}
 .page-title>.button{width:100%;min-height:44px;font-size:12px;padding:9px 8px}
 .workspace-grid{grid-template-columns:minmax(0,1fr);gap:12px}
 .project-panel,.editor-panel{overflow:visible;padding:13px;scrollbar-gutter:auto;border-radius:13px}
 .project-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr));gap:10px}
 .project-actions button{font-size:12px}.project-item{padding:12px}
 .empty-detail{padding:8px}.empty-symbol{font-size:24px}.empty-detail h2{font-size:17px;margin:8px 0}
 #projectForm{display:grid;grid-template-columns:1fr 1fr;column-gap:10px}
 #projectForm .editor-heading,#projectForm label[for=notes],#notes,.editor-actions,#editorStatus,#savedAt{grid-column:1/-1}
 #projectForm label[for=projectName]{grid-column:1;grid-row:2}
 #projectForm label[for=clientName]{grid-column:2;grid-row:2}
 #projectName{grid-column:1;grid-row:3}#clientName{grid-column:2;grid-row:3}
 #projectForm label{font-size:12px}#projectForm input{min-height:46px}
 .editor-actions>.button{flex:1;min-height:44px}
 .footer{font-size:9px;padding:6px 12px}
}
@media(min-width:741px) and (max-height:700px){
 .header{min-height:64px}.header .brand img{height:34px}
 main{padding-block:10px;gap:16px}.login-layout{gap:10px}.login-card{padding:16px 20px}
 .welcome h1{font-size:25px}.welcome-rule{margin-block:6px}.login-card input{min-height:44px;padding:10px}
 .login-card label{margin-top:8px}.login-card .primary{margin-top:12px}.login-note{margin-top:8px}
 .page-title{margin-bottom:10px}.page-title h1{font-size:24px}.project-panel,.editor-panel{padding:12px}
}

/* Tablets táctiles: la composición de escritorio permanece independiente. */
@media screen and (min-width:741px) and (max-width:1366px) and (any-pointer:coarse){
 body{height:100dvh;min-height:0;overflow:hidden}
 .header,body:has(#workspace:not([hidden])) .header{min-height:78px;padding:10px 20px;display:flex;flex-direction:row;justify-content:space-between;gap:16px}
 .header .brand{flex:none}.header .brand img{width:130px;height:40px}
 .header .brand small{font-size:8px}
 body:has(#workspace:not([hidden])) .header .account{position:static;max-width:calc(100% - 155px);gap:7px;justify-content:flex-end}
 .header .account>span{flex-basis:100%;font-size:12px;text-align:right}
 .header .account .button{min-height:44px;padding:10px 14px;font-size:13px}
 main{padding:16px 20px;gap:20px;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);grid-template-rows:minmax(0,1fr);align-items:stretch}
 #loginView{display:flex;gap:18px;justify-content:safe center;padding:0 4px;overflow:auto}
 .welcome h1{font-size:clamp(25px,2.6vw,32px);line-height:1.2}
 .login-card{padding:22px}.login-card input{min-height:48px;font-size:16px}
 .login-card .primary{min-height:48px}.login-card label{font-size:14px}
 main:has(#workspace:not([hidden])){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(100px,17%) minmax(0,1fr);gap:14px}
 main:has(#workspace:not([hidden])) .project-cover{height:auto;min-height:0}
 #workspace{overflow:hidden;min-height:0}
 .page-title{grid-template-columns:minmax(0,1fr) auto auto;gap:12px;margin-bottom:14px}
 .page-title>div{grid-column:auto}.page-title h1{font-size:27px}
 .page-title>.button{min-height:48px;font-size:13px;padding:12px 15px}
 .workspace-grid{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:16px;min-height:0}
 .project-panel,.editor-panel{padding:16px;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 .panel-toolbar{flex-wrap:nowrap;gap:8px}.tabs button,.panel-toolbar>.button{min-height:44px;font-size:13px}
 .project-list{grid-template-columns:minmax(0,1fr);gap:12px}
 .project-item{padding:14px}.project-item h3{font-size:16px}.project-item p{font-size:12px}
 .project-actions{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 .project-actions button{min-height:44px;font-size:12px}
 #projectForm input{min-height:48px;font-size:16px}#projectForm label{font-size:13px;margin-top:14px}
 #notes{height:96px;font-size:16px}.editor-actions>.button{flex:1;min-height:48px}
 .footer{padding:6px 12px;font-size:10px}
}
@media screen and (min-width:741px) and (max-width:1366px) and (any-pointer:coarse) and (orientation:portrait){
 main{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(140px,26%) minmax(0,1fr);gap:16px}
 #loginView{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;align-content:safe center;gap:24px}
 .welcome h1{font-size:29px}.login-card{padding:24px}
 main:has(#workspace:not([hidden])){grid-template-rows:minmax(100px,16%) minmax(0,1fr)}
 .page-title{grid-template-columns:1fr 1fr;gap:10px}.page-title>div{grid-column:1/-1}
 .page-title>.button{width:100%}.workspace-grid{grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:12px}
 .project-panel,.editor-panel{padding:13px}.panel-toolbar{flex-wrap:wrap}
}
@media screen and (min-width:741px) and (max-width:1366px) and (any-pointer:coarse) and (orientation:landscape){
 main:has(#workspace:not([hidden])){grid-template-columns:minmax(150px,.42fr) minmax(0,2fr);grid-template-rows:minmax(0,1fr);gap:18px}
 .page-title{grid-template-columns:minmax(0,1fr) auto auto}.page-title>div{grid-column:auto}
}
/* Teléfono: portada completa encima de Tus proyectos, como antes. */
@media screen and (max-width:740px){
 #loginView{max-width:560px}
 #loginView .welcome h1{font-size:22px}
 #loginView .welcome-rule,#loginView .signature{display:none}
 main:not(:has(#workspace:not([hidden]))) .project-cover{height:clamp(95px,18dvh,145px)}
}
@media screen and (min-width:540px) and (max-width:740px){
 #loginView{max-width:none;display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);align-items:center;gap:18px}
 .project-list{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media screen and (max-width:359px){
 .header .account .button{font-size:10px;padding-inline:6px}
 #projectForm{grid-template-columns:minmax(0,1fr)}
 #projectForm label[for=projectName],#projectName,#projectForm label[for=clientName],#clientName{grid-column:1;grid-row:auto}
}
/* El teclado o una ventana baja pueden reducir el alto útil de una tablet. */
@media screen and (min-width:741px) and (max-width:1366px) and (any-pointer:coarse) and (max-height:560px){
 body{height:auto;min-height:100dvh;overflow:auto}main{min-height:420px;overflow:visible}
 main:has(#workspace:not([hidden])){min-height:480px;grid-template-columns:minmax(0,1fr);grid-template-rows:80px auto}
 #workspace{overflow:visible}.workspace-grid{min-height:340px}
}

/* Computadora: más presencia de portada, completa y sin deformaciones. */
@media screen and (min-width:741px) and (not (any-pointer:coarse)), screen and (min-width:1367px){
 main:has(#workspace:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(0,1.35fr);gap:clamp(20px,2.5vw,40px)}
 .page-title{grid-template-columns:1fr 1fr}.page-title>div{grid-column:1/-1}
 .workspace-grid{grid-template-columns:minmax(0,1fr)}
 #workspace{overflow:auto;scrollbar-gutter:stable;padding-right:6px}
 .project-panel,.editor-panel{overflow:visible;scrollbar-gutter:auto}
 .project-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
}

/* Cuenta compacta y portada protagonista en Mis proyectos del teléfono. */
#accountToggle{display:none}
.account-actions{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:6px;min-width:0}
@media screen and (max-width:740px){
 body:has(#workspace:not([hidden])) .header{display:grid;grid-template-columns:136px minmax(0,1fr);align-items:center;gap:12px;min-height:82px;padding:10px 12px}
 body:has(#workspace:not([hidden])) .header .brand{min-width:0;white-space:normal}
 body:has(#workspace:not([hidden])) .header .brand img{width:136px;height:48px}
 body:has(#workspace:not([hidden])) .header .brand small{font-size:8px;letter-spacing:1px;margin-top:3px}
 body:has(#workspace:not([hidden])) .header .account{position:relative;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:5px;min-width:0;max-width:none}
 .header .account>span{max-width:100%;font-size:11px;line-height:1.3;text-align:right;overflow-wrap:anywhere;flex-basis:auto}
 #accountToggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:9px 14px;font-size:13px}
 #accountActions{display:none;position:absolute;right:0;top:calc(100% + 8px);z-index:40;width:min(260px,calc(100vw - 24px));padding:10px;background:#fff;border:1px solid #d5dfeb;border-radius:12px;box-shadow:0 12px 32px #18355326;gap:8px}
 #accountToggle[aria-expanded=true]+#accountActions{display:grid;grid-template-columns:minmax(0,1fr)}
 #accountActions>.button{width:100%;min-height:46px;justify-content:flex-start;padding:11px 14px;font-size:14px}
 main:has(#workspace:not([hidden])){gap:16px;padding:12px}
 main:has(#workspace:not([hidden])) .project-cover{height:auto;aspect-ratio:2000/1545;width:100%;max-width:540px;align-self:start;margin:0 auto}
 main:has(#workspace:not([hidden])) .project-cover img{width:100%;height:auto;max-height:none;object-fit:contain;border-radius:12px}
 #workspace .page-title .eyebrow{display:none}
 #workspace .page-title h1{font-size:26px;margin:0 0 4px}
 #workspace .page-title .muted{font-size:12px;line-height:1.4}
 #workspace .page-title{row-gap:12px;margin-bottom:14px}
}
@media screen and (max-width:359px){
 body:has(#workspace:not([hidden])) .header{grid-template-columns:110px minmax(0,1fr);gap:8px}
 body:has(#workspace:not([hidden])) .header .brand img{width:110px;height:42px}
}

/* Mis proyectos: solo nombre y fecha hasta desplegar sus opciones. */
.project-list{align-items:start}
.project-item{padding:0}
.project-summary{display:block;list-style:none;cursor:pointer;padding:14px;min-height:68px;border-radius:11px}
.project-summary::-webkit-details-marker{display:none}
.project-summary:focus-visible{outline:3px solid #e99044;outline-offset:2px}
.project-name{display:block;font-size:16px;font-weight:750;line-height:1.4;overflow-wrap:anywhere;text-align:left}
.project-date{display:block;margin-top:5px;font-size:11px;color:#718499;line-height:1.5}
.project-item[open]{border-color:#4b80b5;background:#f0f6fc}
.project-item>.project-actions{padding:0 14px 14px;margin-top:0}
.project-item:not([open])>.project-actions{display:none}

/* El formulario solo ocupa espacio al crear/editar un proyecto. */
.editor-panel:has(#projectForm[hidden]){display:none}
.workspace-grid:not(:has(#projectForm:not([hidden]))){grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr)}
/* Escritorio: portada y trabajo equilibrados dentro de la ventana. */
@media screen and (min-width:741px) and (not (any-pointer:coarse)), screen and (min-width:1367px){
 body .header,body:has(#workspace:not([hidden])) .header{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);align-items:center;gap:18px;min-height:100px;padding:10px 24px}
 .header .brand{grid-column:2;justify-self:center;min-width:0}
 .header .brand img{width:210px;height:70px}
 .header .brand small{font-size:9px;margin-top:3px;letter-spacing:2px}
 body:has(#workspace:not([hidden])) .header .account{position:static;grid-column:3;justify-self:end;max-width:100%;justify-content:flex-end}
 .account-actions{justify-content:flex-end}
 main,main:has(#workspace:not([hidden])){grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-rows:minmax(0,1fr);gap:24px;padding:16px 24px;min-height:0;overflow:hidden}
 .project-cover{padding:10px;background:#fff;border:1px solid #dce4ee;border-radius:16px}
 .project-cover img{width:100%;height:100%;min-height:0;object-fit:contain}
 #loginView{max-width:540px;width:100%;justify-self:center;overflow:auto;justify-content:safe center}
 #workspace{display:flex;min-height:0;overflow:hidden;padding:0;scrollbar-gutter:auto}
 .page-title{flex:none;margin-bottom:12px;gap:10px}
 .page-title h1{margin:3px 0;font-size:27px}
 .workspace-grid{flex:1;min-height:0;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(120px,.65fr) minmax(0,1fr);gap:12px}
 .project-panel,.editor-panel{min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
 .project-list{grid-template-columns:repeat(auto-fit,minmax(min(100%,245px),1fr))}
 .footer{padding:6px 12px}
}
@media screen and (min-width:741px) and (not (any-pointer:coarse)) and (max-height:650px){
 body .header,body:has(#workspace:not([hidden])) .header{min-height:78px;padding-block:6px}
 .header .brand img{width:180px;height:50px}
 main,main:has(#workspace:not([hidden])){padding-block:10px;gap:16px}
}

.company-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.company-form-grid label{margin:0;font-size:13px}.company-form-grid input{margin-top:6px}
#companyDialog{width:min(820px,calc(100% - 28px))}
.company-profile-card{background:#fff;border:1px solid #dce4ee;border-radius:12px;padding:12px 16px;min-width:0;overflow-wrap:anywhere}
.company-profile-card h2{font-size:17px;margin:0 0 6px;text-align:left;line-height:1.3}
.company-profile-card p{font-size:12px;line-height:1.45;margin:3px 0;color:#526a82}
.project-cover{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto;gap:10px;background:transparent;border:0;padding:0}
@media screen and (min-width:741px) and (not (any-pointer:coarse)),screen and (min-width:1367px){
 .project-cover{padding:0;background:transparent;border:0;border-radius:0}
 .company-profile-card{max-height:180px;overflow:auto}
}
@media(max-width:740px){
 main:has(#workspace:not([hidden])) .project-cover:has(.company-profile-card:not([hidden])){aspect-ratio:auto}
 .project-cover{grid-template-rows:auto auto}
 .company-profile-card{padding:12px}.company-profile-card h2{font-size:15px}.company-profile-card p{font-size:11px}
 .company-form-grid{grid-template-columns:minmax(0,1fr)}
}

@media screen and (min-width:741px) and (max-width:1366px) and (any-pointer:coarse) and (orientation:portrait){
 main:has(#workspace:not([hidden])):has(.company-profile-card:not([hidden])){grid-template-rows:minmax(210px,32%) minmax(0,1fr)}
 .project-cover:has(.company-profile-card:not([hidden])){grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:12px}
 .project-cover:has(.company-profile-card:not([hidden])) img{height:100%;max-height:100%;object-fit:contain}
 .company-profile-card{max-height:100%;overflow:auto}
}
