/* Notea 7.8.3.0 — Foundation, typography, editor and base components.
   This file preserves cascade order from the consolidated legacy stylesheet. */
/* =========================================================
   NOTEA — SISTEMA TIPOGRÁFICO
   Inter es la familia base de toda la aplicación y del editor.
   Fraunces se conserva como una opción editorial dentro del selector.
   ========================================================= */
@font-face{font-family:"Inter";font-style:normal;font-weight:400;font-display:swap;src:url("/assets/fonts/inter-latin-400-normal.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:500;font-display:swap;src:url("/assets/fonts/inter-latin-500-normal.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:600;font-display:swap;src:url("/assets/fonts/inter-latin-600-normal.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:700;font-display:swap;src:url("/assets/fonts/inter-latin-700-normal.woff2") format("woff2")}
@font-face{font-family:"Inter";font-style:normal;font-weight:800;font-display:swap;src:url("/assets/fonts/inter-latin-800-normal.woff2") format("woff2")}
@font-face{font-family:"Fraunces";font-style:normal;font-weight:300 900;font-display:swap;src:url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2")}
@font-face{font-family:"Fraunces";font-style:italic;font-weight:300 900;font-display:swap;src:url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2")}
:root{
  --bg:#f4f5f9;--paper:#fff;--panel:#fbfbfd;--panel-2:#f1f2f7;--text:#20232d;--muted:#777d8c;
  --line:#e3e5ec;--accent:#6269e7;--accent-soft:#eceeff;--danger:#c34f59;--ok:#5ca778;
  --shadow:0 22px 70px rgba(38,42,66,.12);--radius:18px;
  --ui:"Inter","Aptos","SF Pro Display","Segoe UI Variable","Segoe UI",system-ui,sans-serif;
  --serif:"Inter","Aptos","SF Pro Display","Segoe UI Variable","Segoe UI",system-ui,sans-serif;
}
:is(html[data-theme="dark"],html[data-theme="eclipse"],html[data-theme="peachcoal"],html[data-theme="aurora"]){
  --bg:#12151d;--paper:#191d27;--panel:#171a23;--panel-2:#20242f;--text:#f5f6fa;--muted:#a5aaba;
  --line:#303542;--accent:#8b91ff;--accent-soft:#282c50;--danger:#ff8a92;--ok:#64c48a;
  --shadow:0 26px 80px rgba(0,0,0,.42)
}
html[data-theme="pink"]{--bg:#fff5f9;--paper:#fffafd;--panel:#fff8fb;--panel-2:#faeaf2;--text:#3d2934;--muted:#866b79;--line:#efd7e3;--accent:#d85f98;--accent-soft:#fde6f1;--danger:#c94b63;--ok:#57a777;--shadow:0 24px 72px rgba(126,57,91,.13)}
html[data-theme="green"]{--bg:#f3faf6;--paper:#fbfffc;--panel:#f7fcf9;--panel-2:#e6f4eb;--text:#24372d;--muted:#687d70;--line:#d6e9dd;--accent:#3f9a68;--accent-soft:#e1f4e8;--danger:#c1515c;--ok:#3d9d68;--shadow:0 24px 72px rgba(45,102,69,.12)}
html[data-theme="purple"]{--bg:#f7f4ff;--paper:#fdfbff;--panel:#faf8ff;--panel-2:#eee8fb;--text:#30283e;--muted:#776c88;--line:#e1d8f1;--accent:#815dcc;--accent-soft:#eee6ff;--danger:#c64e68;--ok:#579c73;--shadow:0 24px 72px rgba(91,63,139,.13)}
html[data-theme="yellow"]{--bg:#fffaf0;--paper:#fffdf8;--panel:#fffcf4;--panel-2:#f7eed7;--text:#3d3424;--muted:#82745d;--line:#eadfca;--accent:#b98019;--accent-soft:#fff0c9;--danger:#c55757;--ok:#5f9c69;--shadow:0 24px 72px rgba(124,91,31,.12)}
*{box-sizing:border-box}
html,body{height:100%;margin:0}
body{font-family:var(--ui);background:var(--bg);color:var(--text);overflow:hidden}
button,input,select,textarea{font:inherit;color:inherit}
[hidden]{display:none!important}
.mobile-only{display:none!important}
.primary{background:var(--accent)!important;color:#fff!important;border-color:var(--accent)!important}
.danger{color:var(--danger)!important}
.text-button{border:0!important;background:transparent!important;color:var(--muted)!important}
.icon-button{width:38px;height:38px;border:0;border-radius:11px;background:transparent;display:grid;place-items:center;font-size:18px;color:var(--muted)}
.icon-button:hover{background:var(--panel-2);color:var(--text)}
/* LOGIN */
.login-screen{height:100dvh;overflow-y:auto;background:
  radial-gradient(circle at 87% 4%,color-mix(in srgb,var(--accent) 13%,transparent),transparent 28%),
  linear-gradient(135deg,var(--bg),color-mix(in srgb,var(--bg) 88%,var(--accent) 12%));
  padding:max(28px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(32px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));
}
.login-shell{min-height:calc(100dvh - 60px);max-width:1120px;margin:auto;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(340px,.7fr);align-items:center;gap:clamp(42px,8vw,110px)}
.login-eyebrow{display:flex;align-items:center;gap:9px;color:var(--accent);font-size:10px;font-weight:850;letter-spacing:.22em}
.login-eyebrow i{width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 7px color-mix(in srgb,var(--accent) 15%,transparent)}
.login-intro h1{font-size:clamp(55px,7vw,88px);line-height:.93;letter-spacing:-.07em;margin:28px 0 24px;font-weight:830;max-width:770px}
.login-intro h1 em{font-family:var(--serif);font-weight:400;color:var(--accent)}
.login-intro>p{max-width:650px;color:var(--muted);font-size:18px;line-height:1.72;margin:0}
.login-benefits{display:flex;gap:10px;flex-wrap:wrap;margin-top:30px}
.login-benefits span{border:1px solid var(--line);background:color-mix(in srgb,var(--paper) 65%,transparent);padding:9px 13px;border-radius:999px;color:var(--muted);font-size:11px;backdrop-filter:blur(12px)}
.login-card{position:relative;background:color-mix(in srgb,var(--paper) 88%,transparent);border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:30px;padding:38px;box-shadow:var(--shadow);overflow:hidden;backdrop-filter:blur(24px)}
.login-art{height:96px;display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.art-notebook{width:58px;height:66px;border-radius:13px 17px 17px 13px;background:var(--accent);display:flex;flex-direction:column;justify-content:space-evenly;padding-left:4px;box-shadow:inset 10px 0 rgba(0,0,0,.12),0 12px 30px color-mix(in srgb,var(--accent) 22%,transparent)}
.art-notebook i{height:4px;width:11px;background:color-mix(in srgb,var(--accent) 60%,#000 40%);border-radius:5px;transform:translateX(-8px)}
.art-lines{width:116px;height:66px;border:1px solid var(--line);border-radius:15px;transform:rotate(7deg);padding:16px;background:color-mix(in srgb,var(--panel-2) 80%,transparent)}
.art-lines i{display:block;height:5px;background:var(--muted);border-radius:5px;margin-bottom:9px;opacity:.62}
.art-lines i:nth-child(2){width:80%}
.art-lines i:nth-child(3){width:55%}
.login-welcome{font-size:10px;color:var(--accent);letter-spacing:.2em;font-weight:850;margin:0 0 6px}
.login-card h2{font-size:38px;letter-spacing:-.055em;margin:0 0 8px}
.login-card>p:not(.login-welcome){color:var(--muted);line-height:1.6;font-size:14px;margin:0 0 25px}
.google-button{width:100%;height:52px;border:1px solid var(--accent);background:var(--accent);color:#fff;border-radius:14px;display:flex;align-items:center;justify-content:center;gap:12px;font-weight:800;box-shadow:0 13px 28px color-mix(in srgb,var(--accent) 24%,transparent)}
.google-button b{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;background:#fff;color:#5160c9}
.google-button:disabled{opacity:.65}
.login-card>[data-login-status]{display:block;text-align:center;color:var(--danger);min-height:18px;margin-top:10px;font-size:11px}
.login-local-note{display:flex;align-items:center;gap:11px;border-top:1px solid var(--line);padding-top:20px;margin-top:8px}
.login-local-note>span{width:34px;height:34px;border-radius:10px;background:var(--accent-soft);display:grid;place-items:center}
.login-local-note div{display:grid}
.login-local-note strong{font-size:12px}
.login-local-note small{font-size:10px;color:var(--muted);margin-top:2px}
/* APP LAYOUT */
.app{height:100dvh;display:grid;grid-template-columns:292px minmax(0,1fr);background:var(--bg)}
.sidebar{min-width:0;border-right:1px solid var(--line);background:color-mix(in srgb,var(--panel) 94%,transparent);display:flex;flex-direction:column;overflow:hidden;backdrop-filter:blur(18px);z-index:20}
.sidebar-header{height:66px;padding:0 13px 0 15px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between}
.brand{border:0;background:transparent;display:flex;align-items:center;gap:10px;text-align:left;padding:0;color:var(--text)}
.brand-mark{width:32px;height:36px;border-radius:8px 12px 12px 8px;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:850;box-shadow:inset 6px 0 rgba(0,0,0,.13)}
.brand>span:last-child{display:grid}
.brand strong{font-size:13px}
.brand small{font-size:9px;color:var(--muted);margin-top:1px}
.pages-tools{padding:16px 14px 12px}
.pages-title-row{display:flex;justify-content:space-between;align-items:flex-end}
.pages-title-row small{font-size:8px;color:var(--accent);letter-spacing:.16em;font-weight:850}
.pages-title-row h2{font-size:23px;letter-spacing:-.05em;margin:3px 0 0}
.compact-actions{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:13px 0 10px}
.compact-actions button{min-width:0;height:52px;border:1px solid var(--line);border-radius:12px;background:var(--paper);display:grid;place-content:center;justify-items:center;gap:2px;padding:4px;color:var(--text)}
.compact-actions button:hover{border-color:color-mix(in srgb,var(--accent) 55%,var(--line));background:var(--accent-soft)}
.compact-actions span{font-size:17px;color:var(--accent);line-height:1}
.compact-actions small{font-size:9px;font-weight:750}
.folder-glyph{font-size:14px!important;transform:skew(-5deg)}
.search-box{height:38px;border:1px solid var(--line);border-radius:11px;background:var(--paper);display:flex;align-items:center;gap:7px;padding:0 11px;color:var(--muted)}
.search-box input{min-width:0;flex:1;border:0;outline:0;background:transparent;font-size:12px}
.search-box span{font-size:18px}
.bulk-bar{margin:0 14px 8px;padding:8px;border-radius:11px;background:var(--accent-soft);display:flex;align-items:center;gap:5px;flex-wrap:wrap}
.bulk-bar span{font-size:10px;font-weight:750;margin-right:auto}
.bulk-bar button{border:0;background:var(--paper);border-radius:8px;padding:6px 8px;font-size:9px;font-weight:750}
.page-list{min-height:0;flex:1;overflow-y:auto;padding:0 10px 15px;overscroll-behavior:contain}
.page-list::-webkit-scrollbar{width:5px}
.page-list::-webkit-scrollbar-thumb{background:var(--line);border-radius:10px}
.folder-block{margin:5px 0 9px;border:1px solid var(--line);border-radius:13px;background:color-mix(in srgb,var(--paper) 76%,transparent);overflow:hidden}
.folder-head{display:flex;align-items:center;padding:8px}
.folder-toggle{flex:1;min-width:0;border:0;background:transparent;display:flex;align-items:center;gap:8px;text-align:left;padding:2px}
.folder-toggle span:first-child{width:26px;height:25px;border-radius:8px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:11px}
.folder-toggle strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:11px}
.folder-toggle small{font-size:9px;color:var(--muted);margin-left:auto}
.folder-head>button{border:0;background:transparent;color:var(--muted);border-radius:7px;width:26px;height:26px}
.folder-head>button:hover{background:var(--panel-2)}
.page-row{display:flex;align-items:center;gap:5px;margin:2px 0;border-radius:10px}
.page-row.is-selected{outline:2px solid var(--accent)}
.page-select{width:20px;height:20px;margin-left:5px;accent-color:var(--accent)}
.page-open{min-width:0;flex:1;border:0;background:transparent;text-align:left;padding:8px 7px;display:grid;gap:2px;border-radius:9px}
.page-open strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-open small{font-size:9px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.page-delete{width:28px;height:28px;border:0;background:transparent;color:var(--muted);border-radius:8px}
.page-delete:hover{background:color-mix(in srgb,var(--danger) 12%,transparent);color:var(--danger)}
.loose-pages{margin-top:5px}
.loose-title{font-size:8px;color:var(--muted);letter-spacing:.12em;padding:7px 8px;font-weight:850}
.empty-list{padding:28px 14px;text-align:center;color:var(--muted);font-size:11px;line-height:1.55}
.sidebar-footer{border-top:1px solid var(--line);padding:8px;display:grid;gap:2px}
.footer-row{width:100%;border:0;background:transparent;min-height:34px;border-radius:9px;padding:6px 8px;display:flex;align-items:center;gap:9px;text-align:left;font-size:10px;color:var(--muted)}
.footer-row:hover{background:var(--panel-2);color:var(--text)}
.footer-row>span:first-child{width:22px;text-align:center;font-size:14px}
.footer-row small{margin-left:auto;background:var(--accent-soft);color:var(--accent);border-radius:999px;padding:3px 6px;font-size:8px;font-weight:800}
.footer-row input{display:none}
.account-row{margin-top:3px;padding:8px;border-top:1px solid var(--line);display:flex;align-items:center;gap:8px}
.account-row>span{width:27px;height:27px;border-radius:9px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:850}
.account-row small{min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9px;color:var(--muted)}
.account-row button{border:0;background:transparent;color:var(--muted);font-size:16px}
.version{text-align:center;color:var(--muted);font-size:7.5px;padding-bottom:2px}
.workspace{min-width:0;position:relative;display:grid;grid-template-rows:59px minmax(0,1fr);height:100dvh;overflow:hidden}
.topbar{position:relative;z-index:10;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:color-mix(in srgb,var(--bg) 82%,transparent);backdrop-filter:blur(18px)}
.topbar-left,.topbar-actions{display:flex;align-items:center;gap:4px}
.save-state{height:31px;border:1px solid var(--line);background:var(--paper);border-radius:999px;display:flex;align-items:center;gap:7px;padding:0 10px;font-size:9px;color:var(--muted)}
.save-state i{width:7px;height:7px;border-radius:50%;background:var(--ok);box-shadow:0 0 0 4px color-mix(in srgb,var(--ok) 15%,transparent)}
.save-state.is-saving i{background:#d9a644}
.more-menu{position:absolute;right:12px;top:51px;width:190px;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:6px;box-shadow:var(--shadow);display:grid}
.more-menu button{border:0;background:transparent;border-radius:8px;padding:9px 10px;text-align:left;font-size:10px}
.more-menu button:hover{background:var(--panel-2)}
.workspace-scroll{min-height:0;overflow-y:auto;padding:34px 38px 120px;overscroll-behavior:contain}
.empty-workspace{min-height:calc(100dvh - 150px);display:grid;place-content:center;justify-items:center;text-align:center;color:var(--muted)}
.empty-icon{width:62px;height:62px;border-radius:20px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:28px}
.empty-workspace h2{font-size:28px;letter-spacing:-.045em;color:var(--text);margin:18px 0 8px}
.empty-workspace p{font-size:12px;max-width:400px;line-height:1.6;margin:0 0 20px}
.empty-workspace button{border:1px solid var(--accent);border-radius:12px;padding:11px 15px;font-weight:800}
.paper{max-width:980px;min-height:calc(100dvh - 150px);margin:0 auto;background:var(--paper);border:1px solid var(--line);border-radius:22px;box-shadow:0 24px 75px rgba(36,40,66,.10);padding:56px 68px 34px}
.page-title{display:block;width:100%;border:0;outline:0;background:transparent;font-size:45px;line-height:1.08;font-weight:820;letter-spacing:-.06em;color:var(--text)}
.page-meta{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:9px;margin:9px 0 24px}
.page-meta button{border:0;background:transparent;color:var(--accent);padding:0;font-size:9px}
.tags-popover{border:1px solid var(--line);border-radius:11px;padding:10px;margin:-15px 0 15px}
.tags-popover label{display:grid;gap:5px;font-size:9px;color:var(--muted)}
.tags-popover input{border:1px solid var(--line);border-radius:8px;background:var(--panel-2);padding:8px;outline:0}
.template-heading{border-bottom:1px solid var(--line);padding-bottom:22px;margin-bottom:18px}
.template-heading>small{color:var(--accent);font-size:9px;font-weight:850;letter-spacing:.15em;text-transform:uppercase}
.template-heading h1{font-size:41px;letter-spacing:-.055em;line-height:1.05;margin:8px 0}
.template-heading p{color:var(--muted);font-size:11px;margin:0;line-height:1.55}
.toolbar{position:sticky;top:-22px;z-index:8;border:1px solid var(--line);background:color-mix(in srgb,var(--paper) 92%,transparent);border-radius:13px;padding:5px;display:flex;align-items:center;gap:3px;overflow-x:auto;scrollbar-width:none;box-shadow:0 8px 24px rgba(28,31,50,.07);backdrop-filter:blur(18px)}
.toolbar::-webkit-scrollbar{display:none}
.toolbar button,.toolbar select,.color-tool{flex:0 0 auto;height:32px;border:0;border-radius:8px;background:transparent;display:grid;place-items:center;min-width:32px;padding:0 8px;font-size:10px}
.toolbar button:hover,.toolbar select:hover,.color-tool:hover{background:var(--panel-2)}
.toolbar select{outline:0;max-width:90px}
.toolbar-divider{width:1px;height:20px;background:var(--line);margin:0 2px}
.toolbar-spacer{flex:1;min-width:8px}
.color-tool{position:relative;font-weight:800}
.color-tool input{position:absolute;inset:0;opacity:0;width:100%;height:100%;cursor:pointer}
.free-editor{min-height:520px;padding:28px 4px 50px;outline:0;font-family:var(--serif);font-size:18px;line-height:1.76}
.free-editor h2,.free-editor h3{font-family:var(--ui);letter-spacing:-.035em}
.free-editor img,.template-note img{max-width:100%;height:auto;border-radius:12px}
.free-editor blockquote,.template-note blockquote{border-left:3px solid var(--accent);margin-left:0;padding-left:15px;color:var(--muted)}
.paper-footer{border-top:1px solid var(--line);padding-top:12px;display:flex;justify-content:space-between;color:var(--muted);font-size:8px}
/* FIXED PROGRAM TEMPLATE */
.template-program{padding-top:10px}
.program-section{margin:28px 0 36px}
.program-section:first-child{margin-top:16px}
.program-day{display:flex;align-items:flex-end;justify-content:space-between;gap:14px;border-bottom:1px solid var(--line);padding-bottom:11px;margin-bottom:11px}
.program-day div{display:grid}
.program-day small{font-size:9px;color:var(--accent);font-weight:850;letter-spacing:.14em;text-transform:uppercase}
.program-day h2{font-size:25px;letter-spacing:-.045em;margin:2px 0 0}
.program-theme{text-align:right;max-width:58%;font-size:10px;color:var(--muted);line-height:1.45}
.program-theme strong{display:block;color:var(--text);font-size:10px}
.program-item{display:grid;grid-template-columns:52px minmax(0,1fr);gap:12px;padding:12px 0;border-bottom:1px solid color-mix(in srgb,var(--line) 80%,transparent)}
.program-time{font-size:10px;color:var(--accent);font-weight:850;padding-top:2px}
.program-label{font-size:8px;color:var(--accent);text-transform:uppercase;letter-spacing:.12em;font-weight:850}
.program-title{font-size:12px;font-weight:780;line-height:1.45}
.program-reference{font-size:9px;color:var(--muted);line-height:1.5;margin-top:2px}
.program-parts{margin:7px 0 0;padding-left:17px;color:var(--text)}
.program-parts li{font-size:10px;line-height:1.5;margin:3px 0}
.program-parts span{color:var(--muted)}
.template-note-wrap{margin-top:9px}
.template-note-label{font-size:8px;color:var(--muted);margin-bottom:4px;font-weight:700}
.template-note{min-height:64px;border:1px solid var(--line);border-radius:10px;background:color-mix(in srgb,var(--panel-2) 55%,transparent);padding:10px 11px;outline:0;font-family:var(--serif);font-size:14px;line-height:1.55}
.template-note:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 13%,transparent);background:var(--paper)}
.template-note:empty:before{content:"Escribe tus notas…";color:var(--muted);opacity:.7}
.focus-exit{position:fixed;top:14px;right:16px;z-index:80;border:1px solid var(--line);background:var(--paper);color:var(--text);border-radius:999px;padding:9px 13px;font-size:10px;font-weight:800;box-shadow:var(--shadow)}
.app.focus-mode{grid-template-columns:1fr}
.app.focus-mode .sidebar,.app.focus-mode .topbar{display:none}
.app.focus-mode .workspace{grid-template-rows:1fr}
.app.focus-mode .workspace-scroll{padding-top:22px}
/* WOL */
.wol-panel{position:fixed;z-index:60;right:0;top:0;bottom:0;width:min(390px,100vw);background:var(--panel);border-left:1px solid var(--line);box-shadow:-25px 0 70px rgba(0,0,0,.18);display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden}
.wol-header{height:65px;padding:0 14px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--panel);z-index:2}
.wol-icon{width:39px;height:39px;border-radius:12px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:19px}
.wol-header>div:nth-child(2){display:grid;flex:1}
.wol-header strong{font-size:14px}
.wol-header small{font-size:9px;color:var(--muted);margin-top:2px}
.wol-body{min-height:0;overflow-y:auto;padding:20px 16px calc(26px + env(safe-area-inset-bottom));overscroll-behavior:contain}
.wol-body>p{font-size:12px;line-height:1.65;color:var(--muted);margin:0 0 20px}
.wol-body label{display:grid;gap:6px;font-size:9px;color:var(--muted)}
.wol-body input{height:45px;border:1px solid var(--line);border-radius:12px;background:var(--paper);outline:0;padding:0 13px;font-size:12px}
.wol-body input:focus{border-color:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 13%,transparent)}
.wol-body>button{width:100%;min-height:41px;border:1px solid var(--line);border-radius:11px;background:transparent;margin-top:8px;font-size:10px;font-weight:750}
.wol-body>small{display:block;color:var(--muted);font-size:8.5px;line-height:1.55;margin-top:18px}
/* DIALOGS */
dialog{border:0;background:transparent;padding:0;color:var(--text)}
dialog::backdrop{background:rgba(13,15,23,.55);backdrop-filter:blur(7px)}
.dialog-shell,.folder-dialog form,.move-dialog form{width:min(590px,calc(100vw - 26px));max-height:min(86dvh,760px);overflow-y:auto;background:var(--paper);border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:var(--shadow)}
.dialog-shell header,.folder-dialog header,.move-dialog header{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.dialog-shell header small{font-size:8px;color:var(--accent);letter-spacing:.16em;font-weight:850}
.dialog-shell h2,.folder-dialog h2,.move-dialog h2{font-size:25px;letter-spacing:-.045em;margin:3px 0 0}
.dialog-shell header button,.folder-dialog header button,.move-dialog header button{border:0;background:var(--panel-2);width:32px;height:32px;border-radius:9px}
.blank-template{width:100%;border:1px solid var(--accent);background:var(--accent-soft);border-radius:13px;padding:13px;display:flex;gap:12px;align-items:center;text-align:left;margin-bottom:14px}
.blank-template>span{width:35px;height:35px;border-radius:11px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:18px}
.blank-template div{display:grid}
.blank-template strong{font-size:12px}
.blank-template small{font-size:9px;color:var(--muted);margin-top:3px}
.template-list{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.template-choice{border:1px solid var(--line);border-radius:13px;background:var(--paper);padding:13px;text-align:left;display:grid;gap:5px}
.template-choice:hover{border-color:var(--accent);background:var(--accent-soft)}
.template-choice b{font-size:8px;color:var(--accent);letter-spacing:.1em}
.template-choice strong{font-size:11px;line-height:1.35}
.template-choice small{font-size:8.5px;color:var(--muted);line-height:1.45}
.folder-dialog form,.move-dialog form{width:min(400px,calc(100vw - 26px))}
.folder-dialog label{display:grid;gap:6px;font-size:10px;color:var(--muted)}
.folder-dialog input{height:42px;border:1px solid var(--line);border-radius:11px;background:var(--panel-2);padding:0 11px;outline:0}
.folder-dialog form>button,.move-dialog form button{border:1px solid var(--line);border-radius:10px;background:var(--paper);padding:10px;font-size:10px;font-weight:750}
.folder-dialog form>.primary{width:100%;margin-top:12px}
.move-dialog [data-move-options]{display:grid;gap:6px}
.move-dialog [data-move-options] button{text-align:left}
.toast{position:fixed;z-index:100;left:50%;bottom:24px;transform:translateX(-50%);background:var(--text);color:var(--paper);border-radius:999px;padding:10px 15px;font-size:10px;box-shadow:var(--shadow);max-width:min(90vw,520px);text-align:center}
.scrim{position:fixed;z-index:18;inset:0;background:rgba(13,15,23,.42);backdrop-filter:blur(2px)}
/* TABLET */
@media(max-width:980px){
  .login-shell{grid-template-columns:1fr;max-width:680px;padding:20px 0 40px;gap:38px}.login-intro{text-align:center}.login-eyebrow{justify-content:center}.login-intro h1{font-size:64px;margin:22px auto 18px}.login-intro>p{margin:auto;font-size:16px}.login-benefits{justify-content:center}.login-card{max-width:520px;width:100%;margin:auto}
  .app{grid-template-columns:264px minmax(0,1fr)}.paper{padding:46px 42px 30px}.workspace-scroll{padding:24px 22px 100px}
}
/* MOBILE — intentionally compact and scroll-safe */
@media(max-width:720px){
  body{overflow:hidden}.mobile-only{display:grid!important}
  .login-screen{padding:0;overflow-y:auto;-webkit-overflow-scrolling:touch}.login-shell{display:block;min-height:auto;padding:calc(28px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));max-width:none}.login-intro{text-align:center}.login-eyebrow{font-size:8px}.login-eyebrow i{width:7px;height:7px;box-shadow:0 0 0 5px color-mix(in srgb,var(--accent) 15%,transparent)}.login-intro h1{font-size:clamp(40px,12vw,54px);line-height:.98;margin:20px 0 14px;letter-spacing:-.06em}.login-intro>p{font-size:13px;line-height:1.6;max-width:390px}.login-benefits{margin-top:18px;gap:5px}.login-benefits span{font-size:8px;padding:6px 8px}.login-card{margin-top:26px;padding:22px 20px 24px;border-radius:23px;min-height:auto}.login-art{height:58px;margin-bottom:10px}.art-notebook{width:43px;height:49px;border-radius:10px 13px 13px 10px}.art-lines{width:89px;height:48px;padding:11px}.art-lines i{height:4px;margin-bottom:6px}.login-card h2{font-size:31px}.login-card>p:not(.login-welcome){font-size:12px;margin-bottom:17px}.google-button{height:47px}.login-local-note{padding-top:15px;margin-top:3px}
  .app{display:block;height:100dvh}.sidebar{position:fixed;z-index:40;inset:0 auto 0 0;width:min(88vw,330px);transform:translateX(-102%);transition:transform .22s ease;box-shadow:24px 0 70px rgba(0,0,0,.24)}.sidebar.is-open{transform:translateX(0)}.sidebar-header{height:59px}.pages-tools{padding:12px 11px 9px}.pages-title-row h2{font-size:20px}.compact-actions{margin:9px 0 8px;gap:5px}.compact-actions button{height:43px;border-radius:10px;display:flex;align-items:center;justify-content:center;gap:5px}.compact-actions span{font-size:15px}.compact-actions small{font-size:8px}.search-box{height:36px}.page-list{padding-inline:8px}.folder-block{margin-bottom:6px}.sidebar-footer{padding-bottom:calc(8px + env(safe-area-inset-bottom))}
  .workspace{height:100dvh;grid-template-rows:54px minmax(0,1fr)}.topbar{height:54px;padding:0 8px}.save-state{height:29px;padding:0 8px;font-size:8px}.topbar-actions{gap:0}.icon-button{width:36px;height:36px}
  .workspace-scroll{padding:10px 8px calc(80px + env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch}.empty-workspace{min-height:calc(100dvh - 90px);padding:28px}.empty-workspace h2{font-size:23px}.paper{min-height:calc(100dvh - 73px);border-radius:15px;padding:27px 16px 24px;box-shadow:none}.page-title{font-size:34px}.page-meta{margin-bottom:15px}.template-heading{padding-bottom:15px;margin-bottom:12px}.template-heading h1{font-size:31px}.template-heading p{font-size:10px}.toolbar{top:-1px;margin:0 -3px;padding:4px;border-radius:10px}.toolbar button,.toolbar select,.color-tool{height:36px;min-width:36px}.toolbar select{max-width:82px}.toolbar-spacer{display:none}.free-editor{min-height:430px;padding:20px 2px 40px;font-size:17px}.paper-footer{font-size:7.5px}
  .program-section{margin:21px 0 30px}.program-day{display:block}.program-day h2{font-size:22px}.program-theme{text-align:left;max-width:none;margin-top:6px}.program-item{grid-template-columns:43px minmax(0,1fr);gap:8px;padding:10px 0}.program-title{font-size:11px}.program-reference{font-size:8.5px}.template-note{min-height:78px;font-size:14px;padding:9px}.template-note-label{font-size:7.5px}
  .wol-panel{width:100%;inset:0;grid-template-rows:58px minmax(0,1fr);border:0}.wol-header{height:58px;padding-top:env(safe-area-inset-top)}.wol-body{padding:15px 13px calc(30px + env(safe-area-inset-bottom));}.wol-body>p{font-size:11px;margin-bottom:15px}.wol-body input{height:43px}.wol-body>button{min-height:42px;margin-top:7px}.wol-body>small{margin-top:14px}
  .template-list{grid-template-columns:1fr}.dialog-shell,.folder-dialog form,.move-dialog form{max-height:88dvh;padding:18px;border-radius:18px}.dialog-shell h2{font-size:22px}.blank-template{padding:11px}.focus-exit{top:calc(8px + env(safe-area-inset-top));right:8px}
  .app.focus-mode .workspace-scroll{padding-top:8px}.app.focus-mode .paper{min-height:100dvh;border:0;border-radius:0;padding-top:58px}
}
@media(max-width:380px){
  .login-intro h1{font-size:38px}.login-benefits span{font-size:7.5px}.login-card{margin-top:20px}.compact-actions small{display:none}.compact-actions button{height:39px}.page-title{font-size:30px}.paper{padding-inline:13px}.program-item{grid-template-columns:38px minmax(0,1fr)}
}
@media print{
  body{overflow:visible;background:#fff}.sidebar,.topbar,.wol-panel,.toolbar,.paper-footer,.focus-exit{display:none!important}.app,.workspace{display:block;height:auto}.workspace-scroll{overflow:visible;padding:0}.paper{border:0;box-shadow:none;max-width:none;min-height:auto;padding:20px}.template-note{border:1px solid #ccc;min-height:60px}
}
/* =========================================================
   VERSIÓN 2.0 — ESPACIO COMPLETO, LETRA GRANDE Y MÓVIL
   ========================================================= */
html,body{font-size:16px}
.workspace-scroll{padding:0;background:var(--bg)}
.paper{width:100%;max-width:none;min-height:calc(100dvh - 62px);margin:0;border:0;border-radius:0;box-shadow:none;padding:46px clamp(30px,5vw,82px) 84px}
.page-heading,.template-heading,.toolbar,.free-editor,.template-program,.paper-footer{max-width:1180px;margin-left:auto;margin-right:auto;width:100%}
.page-title{font-size:clamp(44px,4.2vw,66px);line-height:1.03}
.free-editor{min-height:calc(100dvh - 280px);font-size:20px;line-height:1.8;padding-top:28px}
.toolbar{min-height:50px;padding:7px;gap:4px;border-radius:14px}
.toolbar button,.toolbar select,.color-tool{height:38px;font-size:13px}
.template-heading{padding-bottom:24px;margin-bottom:18px}
.template-heading [contenteditable="true"]{outline:0;border-radius:8px;transition:.15s ease}
.template-heading [contenteditable="true"]:hover,.template-heading [contenteditable="true"]:focus{background:var(--accent-soft);box-shadow:0 0 0 5px var(--accent-soft)}
.template-title-edit{font-size:clamp(44px,4.2vw,66px);line-height:1.02;letter-spacing:-.055em;margin:10px 0 8px;font-weight:850}
.template-subtitle-edit{display:inline-block;color:var(--accent);font-size:11px;letter-spacing:.18em;font-weight:850}
.template-description-edit{font-size:15px;color:var(--muted);margin:0;line-height:1.55}
[contenteditable="true"][data-placeholder]:empty:before{content:attr(data-placeholder);color:var(--muted);opacity:.62;pointer-events:none}
.program-section{margin:32px auto 54px;max-width:1180px}
.editable-program-day{position:relative;gap:22px;padding:0 0 18px;border-bottom:1px solid var(--line)}
.program-day-main{min-width:190px}
.program-day-edit{display:inline-block;color:var(--accent);font-size:12px;letter-spacing:.15em;font-weight:850;text-transform:uppercase}
.program-session-edit{font-size:34px;letter-spacing:-.045em;margin:4px 0 0;line-height:1.08}
.editable-program-theme{font-size:14px;min-width:260px;max-width:480px;text-align:right}
.editable-program-theme strong,.editable-program-theme span{display:block;outline:0;border-radius:7px;padding:2px 5px}
.editable-program-theme strong:hover,.editable-program-theme strong:focus,.editable-program-theme span:hover,.editable-program-theme span:focus,
.program-day-edit:hover,.program-day-edit:focus,.program-session-edit:hover,.program-session-edit:focus,
.program-time-edit:hover,.program-time-edit:focus,.program-label-edit:hover,.program-label-edit:focus,
.program-title-edit:hover,.program-title-edit:focus,.program-reference-edit:hover,.program-reference-edit:focus{background:var(--accent-soft);box-shadow:0 0 0 3px var(--accent-soft);outline:0}
.section-actions{display:flex;align-items:flex-start}
.section-delete,.remove-part-button{border:0;background:transparent;color:var(--muted);border-radius:9px;width:36px;height:36px;font-size:16px}
.section-delete:hover,.remove-part-button:hover{background:color-mix(in srgb,var(--danger) 12%,transparent);color:var(--danger)}
.editable-program-item{position:relative;grid-template-columns:70px minmax(0,1fr);gap:16px;padding:22px 0}
.program-time-edit{font-size:15px;font-weight:850;padding:5px 4px;border-radius:8px;align-self:start}
.program-item-head{display:flex;align-items:flex-start;gap:16px}
.program-item-texts{min-width:0;flex:1}
.program-label-edit{font-size:10px;letter-spacing:.13em}
.program-title-edit{font-size:18px;line-height:1.35;font-weight:800;margin-top:4px}
.program-reference-edit{font-size:13px;margin-top:4px;color:var(--muted)}
.program-item-actions{display:flex;align-items:center;gap:4px}
.add-part-button{border:1px solid var(--line);background:var(--paper);color:var(--accent);border-radius:11px;height:38px;padding:0 11px;display:flex;align-items:center;gap:5px;font-size:12px}
.add-part-button span{font-size:18px}
.add-part-button:hover{background:var(--accent-soft);border-color:var(--accent)}
.template-note-wrap{margin-top:14px}
.template-note-label{font-size:10px;letter-spacing:.11em}
.template-note{min-height:132px;border-radius:14px;padding:16px 18px;font-size:18px;line-height:1.65}
.section-add-part{display:flex;margin:10px 0 0 86px;border:1px dashed color-mix(in srgb,var(--accent) 52%,var(--line));background:transparent;color:var(--accent);border-radius:12px;padding:11px 15px;font-size:13px;font-weight:750}
.section-add-part:hover{background:var(--accent-soft)}
.program-add-section{width:100%;max-width:1180px;margin:18px auto 0;border:1px dashed var(--accent);background:var(--accent-soft);color:var(--text);border-radius:16px;padding:18px;display:grid;grid-template-columns:42px 1fr;column-gap:12px;text-align:left}
.program-add-section>span{grid-row:1/3;width:42px;height:42px;border-radius:13px;background:var(--accent);color:#fff;display:grid;place-items:center;font-size:23px}
.program-add-section strong{font-size:15px}
.program-add-section small{font-size:11px;color:var(--muted);margin-top:3px}
.wol-body>p{font-size:14px}
.wol-body label{font-size:12px}
.wol-body input{font-size:16px;height:50px}
.wol-body>button{font-size:13px;min-height:48px}
.wol-body>small{font-size:11px}
.sidebar{font-size:14px}
.page-open strong{font-size:13px}
.page-open small{font-size:11px}
.footer-row{font-size:12px}
.search-box input{font-size:13px}
@media(max-width:980px){
  .paper{padding:38px 30px 70px}.page-title,.template-title-edit{font-size:48px}.program-session-edit{font-size:30px}
}
@media(max-width:720px){
  html,body{font-size:18px}
  .workspace{grid-template-rows:58px minmax(0,1fr)}.topbar{height:58px}.save-state{font-size:11px;height:32px}.icon-button{width:42px;height:42px;font-size:20px}
  .workspace-scroll{padding:0}.paper{width:100%;min-height:calc(100dvh - 58px);padding:24px 14px calc(100px + env(safe-area-inset-bottom));border-radius:0}
  .page-heading,.template-heading,.toolbar,.free-editor,.template-program,.paper-footer{max-width:none}
  .page-title,.template-title-edit{font-size:38px;line-height:1.06}.template-subtitle-edit{font-size:11px}.template-description-edit{font-size:15px;line-height:1.5}
  .toolbar{position:sticky;top:0;z-index:8;margin:0 -6px;padding:7px 6px;min-height:52px;overflow-x:auto;flex-wrap:nowrap;border-radius:12px}.toolbar button,.toolbar select,.color-tool{height:42px;min-width:42px;font-size:14px}.toolbar select{max-width:110px}.toolbar-divider{height:28px}
  .free-editor{min-height:calc(100dvh - 230px);padding:22px 3px 50px;font-size:20px;line-height:1.75}
  .paper-footer{font-size:10px}.program-section{margin:26px 0 44px}
  .editable-program-day{display:grid;grid-template-columns:1fr auto;gap:10px;padding-bottom:16px}.program-day-main{min-width:0}.program-day-edit{font-size:11px}.program-session-edit{font-size:29px}.editable-program-theme{grid-column:1/3;min-width:0;max-width:none;text-align:left;font-size:14px}
  .editable-program-item{display:block;padding:18px 0}.program-time-edit{display:inline-block;font-size:14px;margin-bottom:9px;background:var(--accent-soft);color:var(--accent);padding:6px 9px}.program-item-head{display:block}.program-item-actions{margin-top:11px;justify-content:flex-start}.add-part-button{height:42px;font-size:13px}.remove-part-button{height:42px;width:42px}
  .program-label-edit{font-size:10px}.program-title-edit{font-size:19px;line-height:1.35}.program-reference-edit{font-size:14px}.template-note-wrap{margin-top:14px}.template-note-label{font-size:10px}.template-note{min-height:150px;padding:16px;font-size:19px;line-height:1.65;border-radius:14px}
  .section-add-part{margin:12px 0 0;width:100%;justify-content:center;min-height:46px;font-size:14px}.program-add-section{margin-top:10px;padding:16px 13px}.program-add-section strong{font-size:15px}.program-add-section small{font-size:12px}
  .wol-panel{font-size:16px}.wol-header{height:64px;padding:calc(7px + env(safe-area-inset-top)) 14px 7px}.wol-header strong{font-size:17px}.wol-header small{font-size:11px}.wol-body{padding:20px 16px calc(36px + env(safe-area-inset-bottom))}.wol-body>p{font-size:16px;line-height:1.6}.wol-body label{font-size:13px}.wol-body input{height:56px;font-size:18px}.wol-body>button{min-height:54px;font-size:15px}.wol-body>small{font-size:13px;line-height:1.6}
  .sidebar{width:min(92vw,380px)}.pages-title-row h2{font-size:27px}.compact-actions button{height:50px}.compact-actions small{font-size:11px}.search-box{height:44px}.search-box input{font-size:15px}.page-open{padding:11px 8px}.page-open strong{font-size:15px}.page-open small{font-size:12px}.footer-row{min-height:43px;font-size:14px}
}
@media(max-width:380px){
  .paper{padding-inline:11px}.page-title,.template-title-edit{font-size:34px}.program-session-edit{font-size:27px}.free-editor{font-size:19px}.template-note{font-size:18px}.toolbar select{max-width:92px}
}
/* =========================================================
   VERSIÓN 2.1 — MENÚ OCULTABLE Y PROGRAMA REFINADO
   ========================================================= */
.desktop-only{display:grid}
.icon-button svg,.close-button svg,.section-delete svg,.remove-part-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.close-button{background:var(--panel-2)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:11px!important;display:grid!important;place-items:center!important}
.close-button:hover{background:color-mix(in srgb,var(--danger) 10%,var(--panel-2))!important;color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 35%,var(--line))!important}
.sidebar-header-actions{display:flex;align-items:center;gap:4px}
.sidebar-collapse-button{border:1px solid transparent}
.sidebar-collapse-button:hover{border-color:var(--line)}
.app{--sidebar-size:292px;grid-template-columns:var(--sidebar-size) minmax(0,1fr);transition:grid-template-columns .24s ease}
.sidebar{width:100%;transition:transform .24s ease,opacity .18s ease,border-color .18s ease}
.app.sidebar-collapsed{--sidebar-size:0px}
.app.sidebar-collapsed .sidebar{transform:translateX(-100%);opacity:0;pointer-events:none;border-right-color:transparent}
.sidebar-expand-button{border:1px solid var(--line);background:var(--paper);box-shadow:0 5px 16px rgba(35,39,62,.06)}
.template-heading{padding-bottom:22px;margin-bottom:18px}
.template-title-edit{margin:0;font-size:clamp(42px,4vw,62px)}
.editable-program-day{display:grid;grid-template-columns:minmax(220px,1fr) minmax(260px,.8fr) auto;align-items:end;gap:28px;padding-bottom:20px}
.program-day-main{display:grid;gap:5px;min-width:0}
.program-day-edit{display:block;font-size:34px;line-height:1.05;letter-spacing:-.045em;font-weight:850;text-transform:none;color:var(--text);margin:0}
.program-session-edit{display:block;font-size:16px;line-height:1.3;letter-spacing:0;font-weight:700;color:var(--accent);margin:0}
.editable-program-theme{display:grid;gap:5px;align-content:end;min-width:0;max-width:none;text-align:left;font-size:15px}
.editable-program-theme strong,.editable-program-theme span{font-size:15px;line-height:1.35;font-weight:700;padding:2px 5px}
.editable-program-theme span{color:var(--muted)}
.program-day-edit:hover,.program-day-edit:focus,.program-session-edit:hover,.program-session-edit:focus{background:var(--accent-soft);box-shadow:0 0 0 4px var(--accent-soft);outline:0;border-radius:8px}
.editable-program-item{display:block;padding:22px 0;border-bottom:1px solid var(--line)}
.program-content{min-width:0}
.program-item-line{display:grid;grid-template-columns:72px minmax(0,1fr) auto;align-items:center;gap:14px}
.program-time-edit{font-size:16px;font-weight:850;padding:7px 8px;border-radius:9px;color:var(--accent);background:var(--accent-soft);text-align:center}
.program-title-edit{font-size:19px;line-height:1.35;font-weight:820;margin:0;min-width:0}
.program-reference-edit{font-size:14px;margin:7px 0 0 86px;color:var(--muted)}
.program-item-actions{display:flex;align-items:center;gap:5px}
.add-part-button{white-space:nowrap}
.remove-part-button,.section-delete{display:grid;place-items:center}
.remove-part-button svg,.section-delete svg{width:18px;height:18px}
.template-note-wrap{margin:15px 0 0 86px}
.template-note{min-height:140px}
.section-add-part{margin-left:86px}
.dialog-shell header .close-button,.folder-dialog header .close-button,.move-dialog header .close-button{width:36px;height:36px;padding:0}
@media(max-width:980px) and (min-width:721px){.app{--sidebar-size:264px}.editable-program-day{grid-template-columns:minmax(180px,1fr) minmax(220px,.8fr) auto;gap:18px}.program-day-edit{font-size:30px}}
@media(max-width:720px){
  .desktop-only{display:none!important}.app,.app.sidebar-collapsed{display:block}.app.sidebar-collapsed .sidebar{transform:translateX(-102%);opacity:1;pointer-events:auto;border-right-color:var(--line)}
  .close-button{width:42px!important;height:42px!important}.close-button svg{width:22px;height:22px}
  .template-heading{padding-bottom:18px}.template-title-edit{font-size:37px}
  .editable-program-day{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;padding-bottom:17px}.program-day-main{gap:4px}.program-day-edit{font-size:32px;line-height:1.02}.program-session-edit{font-size:16px}.editable-program-theme{grid-column:1/3;gap:3px;font-size:15px}.editable-program-theme strong,.editable-program-theme span{font-size:15px}.section-actions{position:absolute;right:0;top:0}
  .program-item-line{grid-template-columns:64px minmax(0,1fr) auto;gap:9px;align-items:start}.program-time-edit{font-size:15px;padding:7px 5px}.program-title-edit{font-size:18px;line-height:1.35}.program-item-actions{grid-column:2/4;margin-top:8px}.program-reference-edit{margin:7px 0 0 73px;font-size:14px}.template-note-wrap{margin:14px 0 0}.template-note{min-height:160px;font-size:19px}.section-add-part{margin-left:0}
}
@media(max-width:390px){.program-item-line{grid-template-columns:58px minmax(0,1fr)}.program-item-actions{grid-column:1/3}.program-reference-edit{margin-left:67px}.program-day-edit{font-size:29px}.template-title-edit{font-size:34px}}
/* =========================================================
   VERSIÓN 2.2 — PLANTILLA PULIDA Y NUEVOS MODOS
   ========================================================= */
.pages-tools{padding-top:12px}
.pages-title-row{display:none!important}
.compact-actions{margin:0 0 10px;gap:8px}
.compact-actions button{height:58px;border-radius:14px;transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease}
.compact-actions button:hover{transform:translateY(-1px);box-shadow:0 9px 22px rgba(42,45,70,.08)}
.compact-actions .action-icon{width:28px;height:28px;border-radius:9px;display:grid;place-items:center}
.compact-actions .action-icon svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.compact-actions .action-page .action-icon{background:#e7edff;color:#506ede}
.compact-actions .action-folder .action-icon{background:#fff0cc;color:#bb7914}
.compact-actions .action-select .action-icon{background:#e6f6ed;color:#32845a}
.compact-actions small{font-size:9px;font-weight:800}
.search-box{padding-right:5px}
.search-favorite{width:31px;height:31px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:17px}
.search-favorite:hover{background:var(--panel-2);color:var(--accent)}
.theme-selector-row{cursor:default}
.theme-selector-row select{margin-left:auto;max-width:104px;border:1px solid var(--line);background:var(--paper);border-radius:8px;padding:5px 22px 5px 7px;font-size:10px;outline:0}
.theme-preview{width:18px!important;height:18px!important;border-radius:50%!important;border:2px solid var(--paper);box-shadow:0 0 0 1px var(--line);background:linear-gradient(135deg,var(--accent),var(--accent-soft))!important}
.toolbar-spacer{display:none!important}
.color-tool{flex:0 0 auto;display:grid;place-items:center;position:relative}
.color-tool>span{pointer-events:none;font-weight:800}
.color-tool input{position:absolute;inset:auto 4px 3px auto;width:12px;height:5px;padding:0;border:0;background:transparent}
.highlight-tool>span{font-size:14px}
.editable-program-theme strong,.editable-program-theme span{color:color-mix(in srgb,var(--text) 74%,var(--muted));font-weight:700}
.template-note{min-height:104px;padding:13px 15px}
.template-note-wrap{margin-top:12px}
.template-note-label{margin-bottom:6px}
.dialog-close{position:relative;border-radius:50%!important;background:transparent!important;border:1px solid var(--line)!important;transition:transform .18s ease,background .18s ease,color .18s ease}
.dialog-close:hover{transform:rotate(4deg);background:var(--panel-2)!important;color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 30%,var(--line))!important}
.x-mark{position:relative;width:16px;height:16px;display:block}
.x-mark::before,.x-mark::after{content:"";position:absolute;left:7px;top:1px;width:2px;height:14px;border-radius:999px;background:currentColor}
.x-mark::before{transform:rotate(45deg)}
.x-mark::after{transform:rotate(-45deg)}
.sidebar-header .close-button{display:none!important}
@media(max-width:720px){.compact-actions button{height:58px}.compact-actions .action-icon{width:30px;height:30px}.theme-selector-row select{font-size:12px;max-width:120px}.editable-program-theme strong,.editable-program-theme span{color:color-mix(in srgb,var(--text) 74%,var(--muted))}.template-note{min-height:122px;padding:14px 15px}.dialog-close{width:40px!important;height:40px!important}}
/* =========================================================
   VERSIÓN 2.3 — NAVEGACIÓN MÓVIL CORREGIDA
   ========================================================= */
.mobile-sidebar-editor{display:none}
@media(max-width:720px){
  .mobile-sidebar-editor.mobile-only{
    display:flex!important;align-items:center;justify-content:center;gap:6px;
    min-width:82px;height:38px;padding:0 11px;border:1px solid var(--line);
    border-radius:11px;background:var(--paper);color:var(--accent);
    font:800 12px/1 var(--font);box-shadow:0 5px 16px rgba(39,43,70,.07)
  }
  .mobile-sidebar-editor svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  .mobile-sidebar-editor:active{transform:scale(.97);background:var(--accent-soft)}
  .sidebar-header{padding-right:10px}
}
/* =========================================================
   VERSIÓN 2.4 — PROGRAMA MÓVIL REFINADO
   ========================================================= */
.wol-book-button svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.program-item-actions .remove-part-button{width:36px;height:36px;padding:0;border-radius:10px}
@media(max-width:720px){
  .program-item-line{grid-template-columns:64px minmax(0,1fr) 40px;align-items:start;gap:9px}
  .program-item-actions{grid-column:auto;margin-top:0;align-self:start;justify-self:end;display:flex}
  .program-item-actions .remove-part-button{width:38px;height:38px;margin-top:0}
  .program-reference-edit{margin:6px 40px 0 73px;min-height:28px;display:block}
}
@media(max-width:390px){
  .program-item-line{grid-template-columns:58px minmax(0,1fr) 38px;gap:8px}
  .program-item-actions{grid-column:auto;margin-top:0}
  .program-reference-edit{margin:6px 38px 0 66px}
}
/* =========================================================
   VERSIÓN 2.5 — MI NOTEBOOK JW, CARPETAS Y DIÁLOGOS MÓVILES
   ========================================================= */
.close-glyph{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;pointer-events:none}
.dialog-close{background:color-mix(in srgb,var(--paper) 88%,var(--panel-2))!important;box-shadow:0 5px 16px rgba(35,39,63,.07)}
.dialog-close:hover{transform:none;background:var(--accent-soft)!important;color:var(--accent)!important}
.folder-color-picker{border:0;padding:0;margin:15px 0 4px;display:flex;gap:9px;align-items:center;flex-wrap:wrap}
.folder-color-picker legend{width:100%;font-size:10px;color:var(--muted);margin-bottom:2px}
.folder-color-picker label{display:block;cursor:pointer}
.folder-color-picker input{position:absolute;opacity:0;pointer-events:none}
.folder-color-picker span{width:30px;height:30px;border-radius:10px;display:block;border:3px solid var(--paper);box-shadow:0 0 0 1px var(--line);transition:.15s ease}
.folder-color-picker input:checked+span{box-shadow:0 0 0 2px var(--text);transform:scale(1.06)}
.folder-color-picker [data-color="blue"]{background:#6d7cf3}
.folder-color-picker [data-color="purple"]{background:#9a73df}
.folder-color-picker [data-color="rose"]{background:#e879a0}
.folder-color-picker [data-color="green"]{background:#5ebd87}
.folder-color-picker [data-color="amber"]{background:#e6ac45}
.folder-color-picker [data-color="teal"]{background:#4bb9b2}
.folder-block{--folder-color:#6d7cf3;--folder-soft:#eef0ff}
.folder-block[data-folder-color="purple"]{--folder-color:#9a73df;--folder-soft:#f3edff}
.folder-block[data-folder-color="rose"]{--folder-color:#d96f96;--folder-soft:#fff0f5}
.folder-block[data-folder-color="green"]{--folder-color:#4fae78;--folder-soft:#eaf8f0}
.folder-block[data-folder-color="amber"]{--folder-color:#c88b24;--folder-soft:#fff4dc}
.folder-block[data-folder-color="teal"]{--folder-color:#369e98;--folder-soft:#e8f8f7}
.folder-head{gap:3px;padding:7px 8px}
.folder-color-button,.folder-add-button,.folder-remove-button{flex:0 0 auto;border:0;border-radius:10px;display:grid;place-items:center;padding:0;transition:.15s ease}
.folder-color-button{width:32px;height:32px;background:var(--folder-soft)!important;color:var(--folder-color)!important}
.folder-color-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linejoin:round}
.folder-toggle{gap:6px;padding:6px 5px}
.folder-toggle.is-empty{cursor:default}
.folder-toggle strong{font-size:11.5px}
.folder-toggle small{display:none!important}
.folder-chevron{width:16px;height:16px;margin-left:auto;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round;transition:transform .18s ease}
.folder-chevron.is-collapsed{transform:rotate(-90deg)}
.folder-add-button{width:34px!important;height:34px!important;background:var(--folder-soft)!important;color:var(--folder-color)!important}
.folder-add-button svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.folder-remove-button{width:32px!important;height:32px!important;background:transparent!important;color:var(--muted)!important}
.folder-remove-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.folder-remove-button:hover{background:color-mix(in srgb,var(--danger) 10%,transparent)!important;color:var(--danger)!important}
@media(max-width:720px){
  dialog[open]{position:fixed;inset:max(8px,env(safe-area-inset-top)) 8px max(8px,env(safe-area-inset-bottom));margin:auto;max-width:640px;max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:visible}
  .dialog-shell,.folder-dialog form,.move-dialog form{width:100%;max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:20px 18px calc(22px + env(safe-area-inset-bottom));border-radius:20px}
  .template-dialog .dialog-shell{display:block}.template-list{padding-bottom:4px}
  .dialog-shell header,.folder-dialog header,.move-dialog header{position:sticky;top:-20px;z-index:3;background:var(--paper);padding-top:2px;padding-bottom:10px;margin-bottom:10px}
  .dialog-close{width:42px!important;height:42px!important;flex:0 0 42px}
  .close-glyph{width:20px;height:20px}
  .folder-color-picker span{width:34px;height:34px;border-radius:11px}
  .folder-add-button{width:40px!important;height:40px!important;border-radius:12px}.folder-add-button svg{width:23px;height:23px}
  .folder-color-button{width:36px;height:36px}.folder-remove-button{width:36px!important;height:36px!important}
  .folder-head{padding:8px 7px;gap:4px}.folder-toggle{padding-block:8px}.folder-toggle strong{font-size:13px}
}
@media(max-width:380px){
  dialog[open]{inset:max(5px,env(safe-area-inset-top)) 5px max(5px,env(safe-area-inset-bottom))}
  .dialog-shell,.folder-dialog form,.move-dialog form{padding-inline:15px;max-height:calc(100dvh - 10px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
}
/* =========================================================
   VERSIÓN 2.6 — ICONOS Y POP-UPS MÁS LEGIBLES EN MÓVIL
   ========================================================= */
@media(max-width:720px){
  /* Los tres iconos principales conservan sus botones, pero se leen mejor. */
  .compact-actions .action-icon{
    width:40px;height:40px;border-radius:13px;
  }
  .compact-actions .action-icon svg{
    width:25px;height:25px;stroke-width:2;
  }
  .compact-actions button{
    height:66px;
  }

  /* Tipografía de los pop-ups de creación, exclusivamente en teléfonos. */
  .dialog-shell header small{
    font-size:10px;letter-spacing:.17em;
  }
  .dialog-shell h2,.folder-dialog h2,.move-dialog h2{
    font-size:28px;line-height:1.12;
  }
  .blank-template{
    padding:15px;gap:14px;border-radius:15px;
  }
  .blank-template>span{
    width:42px;height:42px;border-radius:13px;font-size:22px;
  }
  .blank-template strong{
    font-size:16px;line-height:1.25;
  }
  .blank-template small{
    font-size:12px;line-height:1.4;
  }
  .template-choice{
    padding:16px;border-radius:15px;gap:7px;
  }
  .template-choice b{
    font-size:10px;
  }
  .template-choice strong{
    font-size:15px;line-height:1.35;
  }
  .template-choice small{
    font-size:12px;line-height:1.48;
  }
  .folder-dialog label{
    gap:8px;font-size:14px;
  }
  .folder-dialog input{
    height:52px;border-radius:13px;padding:0 15px;font-size:16px;
  }
  .folder-color-picker legend{
    font-size:13px;margin-bottom:5px;
  }
  .folder-dialog form>.primary,
  .move-dialog form button{
    min-height:50px;font-size:14px;border-radius:13px;
  }
}
@media(max-width:380px){
  .dialog-shell h2,.folder-dialog h2,.move-dialog h2{font-size:26px}
  .template-choice strong{font-size:14px}
}
/* =========================================================
   VERSIÓN 2.7 — IDIOMAS, COPIAS Y CONTROLES REFINADOS
   ========================================================= */
.login-language-picker{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:14px 0 4px;padding:9px 11px;border:1px solid var(--line);border-radius:12px;background:color-mix(in srgb,var(--panel-2) 58%,transparent);font-size:12px;color:var(--muted)}
.login-language-picker select,.language-selector-row select{margin-left:auto;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--text);padding:7px 30px 7px 10px;font:700 12px var(--font)}
.footer-action-icon{width:34px!important;height:34px!important;flex:0 0 34px;display:grid!important;place-items:center;border-radius:11px}
.footer-action-icon svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.backup-download-icon{background:#e8edff;color:#526be0}
.backup-restore-icon{background:#e9f8f0;color:#33885c}
.language-icon{background:#f2ecff;color:#8060c8;font-size:13px;font-weight:900}
.footer-row[data-export],.sidebar-footer>label.footer-row:not(.theme-selector-row):not(.language-selector-row){font-weight:720;color:var(--text)}
.logout-button{width:42px;height:42px;border:0;border-radius:13px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;transition:.16s ease;flex:0 0 42px}
.logout-button:hover{transform:translateX(2px);background:color-mix(in srgb,var(--accent) 18%,var(--accent-soft))}
.logout-button svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.clear-color-tool{width:30px!important;min-width:30px!important;height:30px!important;border-radius:9px!important;border:1px dashed var(--line)!important;background:var(--paper)!important;color:var(--muted)!important;font-size:16px!important;font-weight:650!important;padding:0!important}
.clear-color-tool:hover{border-color:var(--accent)!important;color:var(--accent)!important;background:var(--accent-soft)!important}
.no-text-color,.no-text-color *{color:var(--text)}
.no-highlight,.no-highlight *{background-color:var(--paper);background-image:none}
.about-dialog{width:min(440px,calc(100% - 24px));border:0;border-radius:24px;background:var(--paper);color:var(--text);padding:0;box-shadow:0 35px 100px rgba(24,28,52,.28)}
.about-dialog::backdrop{background:rgba(17,20,32,.48);backdrop-filter:blur(7px)}
.about-dialog form{padding:28px}
.about-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.about-brand{display:flex;align-items:center;gap:12px}
.about-brand>div{display:grid;gap:2px}
.about-brand strong{font-size:18px}
.about-brand small{color:var(--muted)}
.about-version{display:flex;align-items:center;justify-content:space-between;margin:25px 0 15px;padding:14px 16px;border-radius:14px;background:var(--panel-2);color:var(--muted)}
.about-version strong{font-size:24px;color:var(--accent)}
.about-dialog>form>p{color:var(--muted);font-size:13.5px;line-height:1.55}
.about-points{display:grid;gap:8px;margin:18px 0 22px}
.about-points span{padding:10px 12px;border:1px solid var(--line);border-radius:11px;font-size:12.5px}
.about-dialog .primary{width:100%;border-radius:12px;padding:12px}
.brand{cursor:pointer}
@media(max-width:720px){.login-language-picker{font-size:14px;padding:11px 12px}.login-language-picker select,.language-selector-row select{font-size:14px;padding-block:9px}.footer-action-icon{width:38px!important;height:38px!important;flex-basis:38px}.footer-action-icon svg{width:23px;height:23px}.logout-button{width:46px;height:46px;flex-basis:46px}.logout-button svg{width:25px;height:25px}.about-dialog form{padding:22px}.clear-color-tool{width:35px!important;min-width:35px!important;height:35px!important}}
/* =========================================================
   VERSIÓN 2.8 — CONTROLES LATERALES MÁS EQUILIBRADOS
   ========================================================= */
/* Descargar y restaurar vuelven a peso normal. */
.footer-row[data-export],
.sidebar-footer>label.footer-row:not(.theme-selector-row):not(.language-selector-row){
  font-weight:400;
}
/* Iconos ligeramente más discretos. */
.footer-action-icon{
  width:30px!important;
  height:30px!important;
  flex:0 0 30px;
  border-radius:10px;
}
.footer-action-icon svg{width:18px;height:18px}
.language-icon{font-size:12px}
/* El selector de idioma usa exactamente las medidas del selector de apariencia. */
.language-selector-row select{
  margin-left:auto;
  width:auto;
  max-width:104px;
  height:auto;
  border:1px solid var(--line);
  background:var(--paper);
  color:var(--text);
  border-radius:8px;
  padding:5px 22px 5px 7px;
  font:400 10px var(--font);
  outline:0;
}
@media(max-width:720px){
  .footer-action-icon{
    width:32px!important;
    height:32px!important;
    flex-basis:32px;
  }
  .footer-action-icon svg{width:19px;height:19px}
  .language-icon{font-size:12px}
  .language-selector-row select{
    max-width:120px;
    padding:5px 22px 5px 7px;
    font-size:12px;
    font-weight:400;
  }
}
/* =========================================================
   VERSIÓN 2.9 — EDITOR REFINADO Y PAPELERA LOCAL
   ========================================================= */
