: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:"Iowan Old Style","Baskerville","Times New Roman",serif;
}
html[data-theme="dark"]{
  --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}
button{cursor:pointer}
[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-active{background:var(--accent-soft)}.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-content{min-width:0}.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,.backup-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}.backup-dialog form{width:min(430px,calc(100vw - 26px));text-align:center}.backup-icon{width:58px;height:58px;border-radius:18px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:25px;margin:0 auto 16px}.backup-dialog form>small{font-size:8px;color:var(--accent);letter-spacing:.16em;font-weight:850}.backup-dialog h2{font-size:27px;letter-spacing:-.045em;margin:7px 0 10px}.backup-dialog p{font-size:11px;line-height:1.6;color:var(--muted);margin:0 0 18px}.backup-dialog button{width:100%;border:1px solid var(--line);background:var(--paper);border-radius:11px;padding:10px;margin-top:7px;font-size:10px;font-weight:750}
.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,.backup-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}.section-actions{position:absolute;right:0;top:0}
  .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,.backup-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,.backup-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
   ========================================================= */
.settings-select-row{display:grid!important;grid-template-columns:26px minmax(0,1fr) 112px;align-items:center;column-gap:9px;min-height:40px}.settings-select-row>span:nth-child(2){min-width:0}.settings-select-row select{width:112px!important;max-width:112px!important;height:32px!important;margin:0!important;padding:0 31px 0 10px!important;border:1px solid var(--line)!important;border-radius:10px!important;background-color:var(--paper)!important;color:var(--text)!important;font:600 11px/1 var(--font)!important;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--muted) 50%),linear-gradient(135deg,var(--muted) 50%,transparent 50%)!important;background-position:calc(100% - 14px) 13px,calc(100% - 10px) 13px!important;background-size:4px 4px,4px 4px!important;background-repeat:no-repeat!important}
.toolbar{overflow-x:auto;overflow-y:visible;background:color-mix(in srgb,var(--paper) 95%,transparent);border-color:color-mix(in srgb,var(--line) 82%,transparent);box-shadow:0 12px 34px rgba(34,38,65,.08)}.toolbar button,.color-tool{transition:background .15s ease,color .15s ease,transform .15s ease}.toolbar button:active{transform:scale(.94)}
.history-tool,.svg-tool{padding:0!important}.history-tool svg,.svg-tool svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.history-divider{margin-right:3px}
.tool-dropdown{position:relative;flex:0 0 auto}.tool-dropdown-trigger{height:38px!important;min-width:98px!important;padding:0 10px 0 12px!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;border:1px solid transparent!important;background:var(--panel-2)!important;color:var(--text)!important;font:650 12px var(--font)!important}.tool-dropdown[data-tool-dropdown="font"] .tool-dropdown-trigger{min-width:105px!important}.tool-dropdown-trigger:hover{border-color:var(--line)!important;background:var(--paper)!important}.tool-dropdown-trigger svg{width:15px;height:15px;fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.tool-dropdown-menu{position:fixed;z-index:1200;padding:7px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--paper) 97%,transparent);box-shadow:0 18px 48px rgba(25,28,48,.20);backdrop-filter:blur(20px);display:grid;gap:3px;max-height:min(380px,60dvh);overflow:auto}.tool-dropdown-menu[hidden]{display:none!important}.tool-dropdown-menu button{width:100%!important;min-width:0!important;height:auto!important;display:flex!important;justify-content:flex-start!important;padding:9px 11px!important;border-radius:9px!important;background:transparent!important;font-size:13px!important;text-align:left!important}.tool-dropdown-menu button:hover{background:var(--accent-soft)!important;color:var(--accent)!important}.font-menu button{font-size:14px!important}
.page-delete{display:grid;place-items:center}.page-delete svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}.page-delete:hover{transform:scale(1.04)}
.trash-row{color:var(--text)}.trash-footer-icon{background:#fff0f1;color:#c85763}.trash-row small[hidden]{display:none}.trash-row small{min-width:20px;text-align:center}.trash-dialog{width:min(560px,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,.30)}.trash-dialog::backdrop{background:rgba(17,20,32,.48);backdrop-filter:blur(7px)}.trash-dialog form{padding:26px}.trash-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}.trash-dialog header small{color:var(--accent);font-size:9px;letter-spacing:.16em;font-weight:850}.trash-dialog h2{margin:3px 0 0;font-size:28px;letter-spacing:-.04em}.trash-description{margin:17px 0;color:var(--muted);font-size:13px;line-height:1.55}.trash-list{display:grid;gap:8px;max-height:min(420px,48dvh);overflow:auto;padding-right:3px}.trash-empty{padding:35px 18px;text-align:center;border:1px dashed var(--line);border-radius:14px;color:var(--muted)}.trash-item{display:flex;align-items:center;gap:12px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--panel-2)}.trash-item-info{min-width:0;flex:1;display:grid;gap:3px}.trash-item-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.trash-item-info small{color:var(--muted);font-size:10px}.trash-item-actions{display:flex;align-items:center;gap:5px}.trash-item-actions button{border:0;border-radius:9px;height:34px;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 9px;font:700 10px var(--font)}.trash-item-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.trash-restore{background:var(--accent-soft);color:var(--accent)}.trash-delete-forever{width:34px;padding:0!important;background:#fff0f1;color:var(--danger)}.trash-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.trash-actions button{border-radius:11px;padding:10px 14px}.danger-outline{border:1px solid color-mix(in srgb,var(--danger) 30%,var(--line));background:transparent;color:var(--danger)}.danger-outline:disabled{opacity:.4;cursor:not-allowed}
@media(max-width:720px){.settings-select-row{grid-template-columns:34px minmax(0,1fr) 132px;min-height:48px}.settings-select-row select{width:132px!important;max-width:132px!important;height:38px!important;font-size:13px!important;background-position:calc(100% - 15px) 16px,calc(100% - 11px) 16px!important}.toolbar{overflow-x:auto;overflow-y:visible}.tool-dropdown-trigger{height:42px!important;min-width:104px!important;font-size:14px!important}.tool-dropdown[data-tool-dropdown="font"] .tool-dropdown-trigger{min-width:112px!important}.history-tool svg,.svg-tool svg{width:21px;height:21px}.tool-dropdown-menu{max-height:55dvh}.tool-dropdown-menu button{font-size:15px!important;padding:12px!important}.trash-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px)}.trash-dialog form{padding:20px 17px;max-height:calc(100dvh - 16px);overflow:auto}.trash-dialog h2{font-size:27px}.trash-list{max-height:45dvh}.trash-item{padding:12px 10px}.trash-item-actions span{display:none}.trash-item-actions button{width:38px;height:38px;padding:0}.trash-actions{display:grid;grid-template-columns:1fr 1fr}.trash-actions button{width:100%}}


/* =========================================================
   VERSIÓN 3.0 — MENÚ COMPACTO Y DESPLEGABLES REPARADOS
   ========================================================= */
.sidebar-footer{padding:5px 8px calc(5px + env(safe-area-inset-bottom));gap:0}
.sidebar-footer .footer-row{min-height:31px;padding:3px 7px;gap:8px}
.sidebar-footer .settings-select-row{min-height:34px;grid-template-columns:26px minmax(0,1fr) 108px}
.sidebar-footer .settings-select-row select{width:108px!important;max-width:108px!important;height:29px!important;padding-top:0!important;padding-bottom:0!important}
.sidebar-footer .footer-action-icon{width:27px!important;height:27px!important;flex-basis:27px!important;border-radius:9px}
.sidebar-footer .footer-action-icon svg{width:16px;height:16px}
.sidebar-footer .theme-preview{width:17px!important;height:17px!important}
.sidebar-footer .account-row{margin-top:2px;padding:6px 7px}
.trash-row{margin-top:1px}
.tool-dropdown-trigger[aria-expanded="true"]{border-color:color-mix(in srgb,var(--accent) 45%,var(--line))!important;background:var(--accent-soft)!important;color:var(--accent)!important}
.tool-dropdown-trigger[aria-expanded="true"] svg{transform:rotate(180deg);stroke:var(--accent)}
.tool-dropdown-trigger svg{transition:transform .16s ease}
.tool-dropdown-menu{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
@media(max-width:720px){
  .sidebar-footer{padding:5px 9px calc(6px + env(safe-area-inset-bottom))}
  .sidebar-footer .footer-row{min-height:38px!important;padding:3px 7px;font-size:13px}
  .sidebar-footer .settings-select-row{min-height:39px;grid-template-columns:31px minmax(0,1fr) 124px}
  .sidebar-footer .settings-select-row select{width:124px!important;max-width:124px!important;height:34px!important;font-size:12px!important;background-position:calc(100% - 15px) 14px,calc(100% - 11px) 14px!important}
  .sidebar-footer .footer-action-icon{width:30px!important;height:30px!important;flex-basis:30px!important}
  .sidebar-footer .footer-action-icon svg{width:18px;height:18px}
  .tool-dropdown-menu{max-height:50dvh}
}


/* =========================================================
   VERSIÓN 3.1 — DESPLEGABLES NATIVOS Y CONFIABLES
   ========================================================= */
.toolbar-select-wrap{
  position:relative;display:flex;align-items:center;flex:0 0 auto;height:38px;
  border:1px solid transparent;border-radius:10px;background:var(--panel-2);
  transition:border-color .15s ease,background .15s ease,box-shadow .15s ease
}
.toolbar-select-wrap:hover,.toolbar-select-wrap:focus-within{
  border-color:color-mix(in srgb,var(--accent) 42%,var(--line));
  background:var(--paper);box-shadow:0 5px 16px rgba(30,34,58,.07)
}
.toolbar-select-wrap select{
  appearance:none;-webkit-appearance:none;height:100%;border:0!important;outline:0!important;
  background:transparent!important;color:var(--text)!important;margin:0!important;
  padding:0 34px 0 12px!important;font:650 12px/1 var(--font)!important;cursor:pointer
}
.block-select-wrap select{width:108px;max-width:none!important}
.font-select-wrap select{width:122px;max-width:none!important}
.toolbar-select-wrap>svg{
  position:absolute;right:10px;width:15px;height:15px;pointer-events:none;
  fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round;stroke-linejoin:round
}
.toolbar-select-wrap:focus-within>svg{stroke:var(--accent)}
@media(max-width:720px){
  .toolbar-select-wrap{height:42px;border-radius:10px}
  .toolbar-select-wrap select{font-size:14px!important;padding-left:11px!important;padding-right:34px!important}
  .block-select-wrap select{width:116px}
  .font-select-wrap select{width:126px}
  .toolbar-select-wrap>svg{right:9px;width:16px;height:16px}
}


/* =========================================================
   VERSIÓN 3.3 — RESALTADO Y RENOMBRE DE CARPETAS
   ========================================================= */
.folder-rename-button{width:32px!important;height:32px!important;flex:0 0 32px;border:0;border-radius:10px;background:transparent!important;color:var(--muted)!important;display:grid;place-items:center;padding:0;transition:.15s ease}
.folder-rename-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.folder-rename-button:hover{background:var(--folder-soft)!important;color:var(--folder-color)!important}
@media(max-width:720px){.folder-rename-button{width:36px!important;height:36px!important;flex-basis:36px}.folder-rename-button svg{width:20px;height:20px}}


/* =========================================================
   VERSIÓN 3.5 — FUENTES, COLOR EN VIVO Y BIENVENIDA JW
   ========================================================= */
.art-notebook{position:relative;align-items:center!important;justify-content:center!important;padding-left:0!important}
.art-notebook b{font:900 20px/1 var(--font);letter-spacing:-.08em;color:#fff;transform:translateX(3px);text-shadow:0 2px 8px rgba(20,22,70,.18)}
.art-notebook i{position:absolute;left:0;transform:translateX(-8px)!important}.art-notebook i:nth-of-type(1){top:15px}.art-notebook i:nth-of-type(2){top:31px}.art-notebook i:nth-of-type(3){top:47px}
.art-companion{position:relative;width:72px;height:66px;border:1px solid color-mix(in srgb,var(--accent) 20%,var(--line));border-radius:18px;background:linear-gradient(145deg,var(--accent-soft),color-mix(in srgb,var(--paper) 92%,var(--accent) 8%));display:grid;place-items:center;box-shadow:0 11px 27px rgba(42,45,81,.08)}
.art-companion svg{width:50px;height:50px;fill:none;stroke:var(--accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.art-companion .art-pencil{fill:var(--paper);stroke-width:1.8}
.art-companion>i{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--accent)}.art-companion>i:first-of-type{right:-3px;top:11px;box-shadow:0 0 0 6px color-mix(in srgb,var(--accent) 12%,transparent)}.art-companion>i:last-of-type{left:-4px;bottom:10px;width:5px;height:5px;opacity:.55}
.format-preview-target{outline:2px solid color-mix(in srgb,var(--accent) 48%,transparent);outline-offset:2px;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.toolbar-select-wrap select option{color:var(--text);background:var(--paper)}
.install-app-button{width:100%;min-height:44px;border:1px solid color-mix(in srgb,var(--accent) 38%,var(--line));border-radius:12px;background:var(--accent-soft);color:var(--accent);display:flex;align-items:center;justify-content:center;gap:9px;padding:10px 13px;font:800 12px var(--font);transition:.16s ease}
.install-app-button[hidden]{display:none!important}.install-app-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}.login-install-button{margin:0 0 12px}.about-install-button{margin:18px 0 9px}
@media(display-mode:standalone){body{overscroll-behavior-y:none}.install-app-button{display:none!important}}
@media(max-width:720px){.art-notebook b{font-size:16px}.art-companion{width:58px;height:52px;border-radius:14px}.art-companion svg{width:39px;height:39px}.install-app-button{min-height:48px;font-size:14px}}


/* =========================================================
   VERSIÓN 3.6 — SELECCIÓN ESTABLE, PALETAS Y BIENVENIDA
   ========================================================= */
.art-notebook{position:relative;align-items:stretch!important;justify-content:space-evenly!important;padding-left:4px!important;flex:0 0 58px}
.art-notebook i{position:static!important;left:auto!important;top:auto!important;transform:translateX(-8px)!important}
.art-companion{display:none!important}.login-art{gap:14px;justify-content:flex-start}
.art-companion-wide{height:76px;min-width:0;flex:1;border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line));border-radius:20px;background:linear-gradient(145deg,color-mix(in srgb,var(--accent-soft) 75%,var(--paper) 25%),color-mix(in srgb,var(--paper) 94%,var(--accent) 6%));display:grid;place-items:center;overflow:hidden;box-shadow:0 12px 30px rgba(42,45,81,.07)}
.art-companion-wide svg{width:100%;height:100%;max-width:260px}.art-paper{fill:var(--paper);stroke:color-mix(in srgb,var(--accent) 20%,var(--line));stroke-width:1.5}.art-paper-line{fill:none;stroke:color-mix(in srgb,var(--text) 48%,transparent);stroke-width:3;stroke-linecap:round}.art-pencil{fill:var(--accent-soft);stroke:var(--accent);stroke-width:2;stroke-linejoin:round}.art-pencil-tip{fill:var(--accent);stroke:var(--accent);stroke-width:1.5}.art-dot{fill:var(--accent)}.dot-one{opacity:.24}.dot-two{opacity:.5}.art-spark{fill:none;stroke:var(--accent);stroke-width:2.5;stroke-linecap:round}
.format-active-target{outline:2px solid color-mix(in srgb,var(--accent) 58%,transparent);outline-offset:2px;border-radius:3px;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.editor-color-palette{position:fixed;z-index:1600;width:252px;padding:12px;border:1px solid var(--line);border-radius:16px;background:color-mix(in srgb,var(--paper) 98%,transparent);box-shadow:0 22px 60px rgba(24,28,50,.25);backdrop-filter:blur(22px)}
.editor-color-palette[hidden]{display:none!important}.editor-color-palette header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.editor-color-palette header strong{font-size:13px}.editor-color-palette header button{width:30px!important;height:30px!important;border:0!important;border-radius:9px!important;background:var(--panel-2)!important;color:var(--muted)!important;padding:0!important}.editor-color-palette header svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round}
.color-swatches{display:grid;grid-template-columns:repeat(5,1fr);gap:8px}.color-swatch{width:36px!important;height:36px!important;min-width:0!important;border-radius:11px!important;border:2px solid var(--paper)!important;background:var(--swatch)!important;box-shadow:0 0 0 1px var(--line)!important;padding:0!important}.color-swatch:hover,.color-swatch:focus{transform:scale(1.08)!important;box-shadow:0 0 0 2px var(--accent)!important}
.custom-color-row{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:12px;padding-top:10px;border-top:1px solid var(--line);font-size:11px;color:var(--muted)}.custom-color-row input{width:44px;height:30px;border:0;background:transparent;padding:0;cursor:pointer}
.color-picker-trigger{position:relative;width:36px!important;min-width:36px!important;height:36px!important;padding:0!important;display:grid!important;place-items:center!important;border-radius:10px!important;background:var(--panel-2)!important;color:var(--text)!important}.color-picker-trigger>span{font-weight:850}.color-picker-trigger>i{position:absolute;left:8px;right:8px;bottom:5px;height:3px;border-radius:3px;background:#6f78ff}.highlight-trigger>i{background:#fff09d}.color-picker-trigger:hover{background:var(--accent-soft)!important;color:var(--accent)!important}
@media(max-width:720px){.login-art{height:72px}.art-notebook{width:47px;height:54px;flex-basis:47px}.art-companion-wide{height:62px;border-radius:16px}.editor-color-palette{width:min(270px,calc(100vw - 20px));padding:13px}.color-swatch{width:40px!important;height:40px!important}.color-picker-trigger{width:40px!important;min-width:40px!important;height:40px!important}}


/* =========================================================
   VERSIÓN 3.7 — FUENTES, COLOR Y RESALTADO REPARADOS
   ========================================================= */
.toolbar-select-wrap select{touch-action:manipulation}
.color-picker-trigger,.clear-color-tool,.color-swatch{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.color-picker-trigger:active,.clear-color-tool:active{transform:scale(.94)!important}
.editor-color-palette{touch-action:manipulation}
.format-active-target{outline:2px solid color-mix(in srgb,var(--accent) 68%,transparent)!important;outline-offset:2px!important}
\n\n/* VERSIÓN 3.8 — PALETA FUERA DE LA BARRA PARA EVITAR RECORTES */\nbody>.editor-color-palette{position:fixed!important;z-index:5000!important;overflow:visible!important}\nbody>.editor-color-palette[hidden]{display:none!important}\n

/* VERSIÓN 3.9 — REBRANDING NOTEA */
.notea-hero-logo{display:block;max-width:min(100%,420px);width:100%;height:auto;object-fit:contain;filter:drop-shadow(0 10px 26px rgba(32,39,94,.16))}
.login-art{height:auto;min-height:86px;display:flex;align-items:center;justify-content:flex-start;margin-bottom:14px}
.brand-mark{width:34px;height:34px;border-radius:10px;background:transparent;box-shadow:none;display:grid;place-items:center;padding:0;overflow:hidden}.brand-mark img{width:100%;height:100%;object-fit:contain}
.brand strong{font-size:15px}.brand small{font-size:9.5px;line-height:1.2;max-width:170px}
.about-brand strong{font-size:19px}.about-brand small{line-height:1.25}
@media(max-width:720px){.notea-hero-logo{max-width:320px}.login-art{min-height:70px}.brand small{max-width:140px}}


/* VERSIÓN 3.9.1 — LOGO COMPACTO */
.login-art{height:58px!important;min-height:58px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;margin-bottom:12px!important;overflow:hidden}.login-brand-compact{display:flex;align-items:center;gap:12px;max-width:100%}.login-brand-compact .brand-mark{width:46px!important;height:46px!important;min-width:46px!important;flex:0 0 46px!important;border-radius:12px!important;background:transparent!important;box-shadow:none!important;padding:0!important;overflow:hidden!important}.login-brand-compact .brand-mark img{width:100%!important;height:100%!important;display:block!important;object-fit:contain!important}.login-wordmark{height:32px!important;width:auto!important;max-width:180px!important;object-fit:contain!important;display:block!important}.brand{align-items:center!important}.brand-mark{width:32px!important;height:32px!important;min-width:32px!important;flex:0 0 32px!important;border-radius:8px!important;background:transparent!important;box-shadow:none!important;overflow:hidden!important}.brand-mark img{width:100%!important;height:100%!important;display:block!important;object-fit:contain!important}.brand strong{font-size:14px!important;line-height:1.1}.brand small{font-size:9px!important;line-height:1.15!important;max-width:135px!important}.about-brand .brand-mark{width:36px!important;height:36px!important;min-width:36px!important;flex:0 0 36px!important}.about-brand strong{font-size:18px!important}.about-brand small{font-size:12px!important}@media(max-width:720px){.login-art{height:50px!important;min-height:50px!important}.login-brand-compact .brand-mark{width:40px!important;height:40px!important;min-width:40px!important;flex-basis:40px!important}.login-wordmark{height:26px!important;max-width:150px!important}.brand-mark{width:30px!important;height:30px!important;min-width:30px!important;flex-basis:30px!important}.brand small{max-width:118px!important}}


/* VERSIÓN 3.9.2 — LOGO ÚNICO Y CABECERA LIMPIA */
.login-art{height:54px!important;min-height:54px!important;display:flex!important;align-items:center!important;justify-content:flex-start!important;margin-bottom:12px!important;overflow:hidden!important}.login-wordmark-single{display:block!important;width:auto!important;height:40px!important;max-width:210px!important;object-fit:contain!important}.brand>span:last-child{display:flex!important;align-items:center!important}.brand strong{font-size:14px!important;line-height:1.1!important}.brand small{display:none!important}@media(max-width:720px){.login-art{height:48px!important;min-height:48px!important}.login-wordmark-single{height:34px!important;max-width:180px!important}}


/* VERSIÓN 3.9.3 — TEXTO DE TARJETA */
.login-card [data-i18n="login.eyebrow"]{font-size:11px!important;letter-spacing:.22em!important;font-weight:800!important;color:var(--accent)!important}.login-card h2{font-size:32px!important;line-height:1.04!important;font-weight:850!important;letter-spacing:-.03em!important;margin:10px 0 10px!important}.login-card p[data-i18n="login.openSpace"]{font-size:14px!important;line-height:1.5!important;color:var(--muted)!important;max-width:28ch!important;margin-bottom:18px!important}@media(max-width:720px){.login-card h2{font-size:28px!important}.login-card p[data-i18n="login.openSpace"]{font-size:14px!important;max-width:none!important}}


/* VERSIÓN 3.9.3 — TEXTO DE TARJETA CORREGIDO */
.login-card .login-welcome{font-size:11px!important;letter-spacing:.22em!important;font-weight:800!important;color:var(--accent)!important;margin:14px 0 8px!important}.login-card h2{font-size:32px!important;line-height:1.04!important;font-weight:850!important;letter-spacing:-.03em!important;margin:0 0 12px!important}.login-card p[data-i18n="login.openSpace"]{font-size:14px!important;line-height:1.5!important;color:var(--muted)!important;max-width:30ch!important;margin-bottom:18px!important}@media(max-width:720px){.login-card h2{font-size:28px!important}.login-card p[data-i18n="login.openSpace"]{font-size:14px!important;max-width:none!important}}


/* =========================================================
   VERSIÓN 4.0 — REFRESCO VISUAL: PROFUNDIDAD, MOVIMIENTO Y BRILLO
   ========================================================= */

:root{
  --accent-2:#9b6bff;
  --accent-3:#ff6fa8;
  --accent-gradient:linear-gradient(120deg,var(--accent) 0%,var(--accent-2) 100%);
  --accent-gradient-soft:linear-gradient(120deg,color-mix(in srgb,var(--accent) 16%,transparent),color-mix(in srgb,var(--accent-2) 14%,transparent));
  --glow:0 0 0 1px color-mix(in srgb,var(--accent) 22%,transparent),0 18px 48px -12px color-mix(in srgb,var(--accent) 45%,transparent);
}
html[data-theme="dark"]{--accent-2:#b98bff;--accent-3:#ff8fbd}
html[data-theme="pink"]{--accent-2:#ff8fc4;--accent-3:#ffb27a}
html[data-theme="green"]{--accent-2:#67c98f;--accent-3:#3fb0a8}
html[data-theme="purple"]{--accent-2:#a985e6;--accent-3:#d876b0}
html[data-theme="yellow"]{--accent-2:#e0a83e;--accent-3:#d97a4a}

*{scrollbar-color:color-mix(in srgb,var(--accent) 35%,var(--line)) transparent}
html{scroll-behavior:smooth}
body,.sidebar,.paper,.login-card,.topbar,.toolbar,.compact-actions button,.search-box,.footer-row,.icon-button,.page-row,.folder-block{
  transition:background-color .28s ease,border-color .28s ease,box-shadow .28s ease,color .22s ease;
}

/* Scrollbars a la medida, en toda la app */
::-webkit-scrollbar{width:9px;height:9px}
::-webkit-scrollbar-track{background:transparent}
::-webkit-scrollbar-thumb{background:color-mix(in srgb,var(--muted) 35%,transparent);border-radius:99px;border:2px solid transparent;background-clip:padding-box}
::-webkit-scrollbar-thumb:hover{background:color-mix(in srgb,var(--accent) 55%,transparent);background-clip:padding-box}

/* Foco accesible con brillo, en vez del contorno del navegador */
button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,[contenteditable]:focus-visible,a:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 65%,transparent)!important;
  outline-offset:2px;
  border-radius:8px;
}

/* Fondo general con capa sutil de profundidad */
body{
  background:
    radial-gradient(circle at 12% -6%,color-mix(in srgb,var(--accent) 7%,transparent),transparent 32%),
    radial-gradient(circle at 100% 8%,color-mix(in srgb,var(--accent-2) 6%,transparent),transparent 30%),
    var(--bg);
}

/* ===== LOGIN: orbes flotantes + entrada animada ===== */
.login-screen{position:relative;overflow:hidden;background:
  radial-gradient(circle at 87% 4%,color-mix(in srgb,var(--accent) 15%,transparent),transparent 30%),
  radial-gradient(circle at 6% 92%,color-mix(in srgb,var(--accent-2) 12%,transparent),transparent 34%),
  linear-gradient(135deg,var(--bg),color-mix(in srgb,var(--bg) 86%,var(--accent) 14%));
}
.login-screen::before,.login-screen::after{
  content:"";position:absolute;border-radius:50%;filter:blur(60px);opacity:.55;pointer-events:none;z-index:0;
  animation:notea-float 16s ease-in-out infinite;
}
.login-screen::before{width:420px;height:420px;top:-120px;right:-100px;background:radial-gradient(circle,color-mix(in srgb,var(--accent) 55%,transparent),transparent 70%)}
.login-screen::after{width:360px;height:360px;bottom:-140px;left:-90px;background:radial-gradient(circle,color-mix(in srgb,var(--accent-2) 50%,transparent),transparent 70%);animation-delay:-8s}
@keyframes notea-float{0%,100%{transform:translate(0,0) scale(1)}50%{transform:translate(24px,-26px) scale(1.08)}}
.login-shell{position:relative;z-index:1}
.login-intro{animation:notea-rise .7s cubic-bezier(.16,1,.3,1) both}
.login-card{animation:notea-rise .7s cubic-bezier(.16,1,.3,1) .1s both}
@keyframes notea-rise{from{opacity:0;transform:translateY(22px)}to{opacity:1;transform:translateY(0)}}
.login-intro h1 em{background:var(--accent-gradient);-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;font-style:normal}
.login-eyebrow i{background:var(--accent-gradient)}
.login-card{box-shadow:var(--shadow),var(--glow)!important;border-radius:32px!important}
.login-card:hover{box-shadow:var(--shadow),0 0 0 1px color-mix(in srgb,var(--accent) 32%,transparent),0 26px 60px -14px color-mix(in srgb,var(--accent) 50%,transparent)!important}
.google-button{background:var(--accent-gradient)!important;border:0!important;position:relative;overflow:hidden}
.google-button:not(:disabled):hover{transform:translateY(-1px);box-shadow:0 18px 34px color-mix(in srgb,var(--accent) 32%,transparent)}
.google-button:not(:disabled):active{transform:translateY(0) scale(.99)}
.login-benefits span{transition:.2s ease}
.login-benefits span:hover{border-color:color-mix(in srgb,var(--accent) 45%,var(--line));color:var(--text);transform:translateY(-1px)}

/* ===== Botones primarios con degradado y elevación ===== */
.primary{background:var(--accent-gradient)!important;border:0!important;position:relative;box-shadow:0 10px 24px -8px color-mix(in srgb,var(--accent) 55%,transparent)!important;transition:transform .16s ease,box-shadow .16s ease!important}
.primary:hover{transform:translateY(-1.5px);box-shadow:0 16px 32px -8px color-mix(in srgb,var(--accent) 60%,transparent)!important}
.primary:active{transform:translateY(0) scale(.98)}
button:not(.primary):not(.danger):not(.text-button):active{transform:scale(.97)}

/* ===== Marca / logo con un poco de vida ===== */
.brand-mark{transition:transform .3s cubic-bezier(.34,1.56,.64,1)}
.brand:hover .brand-mark{transform:rotate(-6deg) scale(1.06)}
.notea-hero-logo{transition:transform .4s ease}

/* ===== Sidebar: acciones y filas con más carácter ===== */
.compact-actions button{transition:transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease}
.compact-actions button:hover{transform:translateY(-2px);box-shadow:0 10px 22px -10px color-mix(in srgb,var(--accent) 45%,transparent)}
.compact-actions button:active{transform:translateY(0) scale(.97)}
.search-box{transition:.18s ease}
.search-box:focus-within{border-color:color-mix(in srgb,var(--accent) 50%,var(--line));box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 14%,transparent)}
.page-row{position:relative;transition:background .18s ease}
.page-row.is-active{background:var(--accent-soft)}
.page-row.is-active::before{content:"";position:absolute;left:-10px;top:6px;bottom:6px;width:3px;border-radius:3px;background:var(--accent-gradient)}
.page-open:hover{background:color-mix(in srgb,var(--panel-2) 70%,transparent)}
.footer-row{transition:transform .15s ease,background .15s ease}
.footer-row:hover{transform:translateX(2px)}
.icon-button{transition:transform .15s ease,background .15s ease,color .15s ease}
.icon-button:hover{transform:translateY(-1px)}
.icon-button:active{transform:translateY(0) scale(.94)}

/* ===== Área de trabajo y hoja de papel ===== */
.paper{animation:notea-rise .5s cubic-bezier(.16,1,.3,1) both;box-shadow:0 30px 80px -20px rgba(36,40,66,.14),0 0 0 1px color-mix(in srgb,var(--line) 70%,transparent)!important}
.empty-icon{background:var(--accent-gradient-soft);animation:notea-bob 3.4s ease-in-out infinite}
@keyframes notea-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-6px)}}
.empty-workspace button.primary{margin-top:4px}
.toolbar{box-shadow:0 10px 28px -12px rgba(28,31,50,.14),0 0 0 1px color-mix(in srgb,var(--line) 60%,transparent)!important}
.toolbar button:hover,.toolbar select:hover,.color-tool:hover{background:var(--accent-soft)!important;color:var(--accent)}
.save-state{position:relative}
.save-state i{position:relative}
.save-state:not(.is-saving) i::after{content:"";position:absolute;inset:-4px;border-radius:50%;background:var(--ok);opacity:.35;animation:notea-pulse 2.4s ease-out infinite}
@keyframes notea-pulse{0%{transform:scale(.6);opacity:.5}100%{transform:scale(2.2);opacity:0}}

/* ===== Diálogos con entrada suave ===== */
dialog[open]{animation:notea-dialog-in .28s cubic-bezier(.16,1,.3,1) both}
dialog::backdrop{animation:notea-fade-in .28s ease both}
@keyframes notea-dialog-in{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes notea-fade-in{from{opacity:0}to{opacity:1}}

/* ===== Carpetas: toque de color en el borde ===== */
.folder-block{border-left:3px solid var(--folder-color,var(--accent))!important;transition:box-shadow .2s ease,transform .2s ease}
.folder-block:hover{box-shadow:0 10px 26px -14px rgba(20,22,50,.18)}

/* ===== Enlaces / texto seleccionado con acento ===== */
.free-editor ::selection,.page-title::selection{background:color-mix(in srgb,var(--accent) 30%,transparent)}
.free-editor a{color:var(--accent);text-decoration-color:color-mix(in srgb,var(--accent) 45%,transparent)}

/* ===== Tema oscuro: brillo más rico en tarjetas ===== */
html[data-theme="dark"] .login-card{background:color-mix(in srgb,var(--paper) 92%,transparent)!important}
html[data-theme="dark"] .paper{box-shadow:0 30px 90px -18px rgba(0,0,0,.55),0 0 0 1px color-mix(in srgb,var(--line) 70%,transparent)!important}
html[data-theme="dark"]::selection{background:color-mix(in srgb,var(--accent) 40%,transparent)}

@media(prefers-reduced-motion:reduce){
  *{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
}

@media(max-width:720px){
  .login-screen::before{width:280px;height:280px}
  .login-screen::after{width:240px;height:240px}
}


/* =========================================================
   VERSIÓN 4.1 — HOJAS, RECORDATORIOS, ATAJOS Y MICRO-MAGIA
   ========================================================= */

/* ----- Tipos de hoja ----- */
.free-editor[data-paper-style="lined"]{
  background-image:repeating-linear-gradient(to bottom, transparent, transparent 34px, color-mix(in srgb, var(--accent) 16%, var(--line)) 35px);
  background-position:0 6px;
}
.free-editor[data-paper-style="dotted"]{
  background-image:radial-gradient(color-mix(in srgb, var(--muted) 45%, transparent) 1.3px, transparent 1.3px);
  background-size:22px 22px;
  background-position:2px 10px;
}
.free-editor[data-paper-style="blank"]{background-image:none}
.paper-select-wrap select{width:96px}
@media(max-width:720px){.paper-select-wrap select{width:104px}}

/* ----- Recordatorio en el popover de etiquetas ----- */
.reminder-row{display:grid;gap:5px;margin-top:10px;font-size:9px;color:var(--muted)}
.reminder-row-controls{display:flex;align-items:center;gap:6px}
.reminder-row input[type="date"]{flex:1;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);padding:7px 8px;outline:0;color:var(--text);font-size:12px}
.reminder-row-controls button{width:28px;height:28px;border:0;border-radius:8px;background:var(--panel-2);color:var(--muted);flex:0 0 auto}
.reminder-row-controls button:hover{background:color-mix(in srgb,var(--danger) 12%,transparent);color:var(--danger)}

/* ----- Panel "Próximos" en el sidebar ----- */
.reminders-box{margin:0 14px 10px;padding:9px 10px;border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));border-radius:13px;background:var(--accent-gradient-soft);display:grid;gap:5px}
.reminders-title{font-size:8px;letter-spacing:.14em;font-weight:850;color:var(--accent)}
.reminder-item{display:grid;grid-template-columns:8px 1fr auto;align-items:center;gap:8px;border:0;background:transparent;padding:5px 4px;border-radius:8px;text-align:left;width:100%}
.reminder-item:hover{background:color-mix(in srgb,var(--paper) 60%,transparent)}
.reminder-item strong{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.reminder-item small{font-size:9px;color:var(--muted);font-weight:750}
.reminder-dot{width:7px;height:7px;border-radius:50%;background:var(--accent)}
.reminder-item.is-overdue .reminder-dot{background:var(--danger)}
.reminder-item.is-overdue small{color:var(--danger)}

/* ----- Búsqueda con resaltado ----- */
mark.search-hit{background:color-mix(in srgb,var(--accent) 40%,transparent);color:inherit;border-radius:3px;padding:0 1px}

/* ----- Arrastrar y soltar páginas entre carpetas ----- */
.page-row[draggable="true"]{cursor:grab}
.page-row.is-dragging{opacity:.45}
.folder-block.drag-over,.loose-pages.drag-over{outline:2px dashed var(--accent);outline-offset:-2px;background:var(--accent-soft)!important}
.loose-drop-zone{border-radius:13px;transition:background .15s ease}

/* ----- Favorito: animación de "pop" ----- */
@keyframes notea-favorite-pop{
  0%{transform:scale(1)}
  35%{transform:scale(1.5) rotate(-12deg)}
  60%{transform:scale(.9) rotate(6deg)}
  100%{transform:scale(1) rotate(0)}
}
[data-favorite].favorite-pop{animation:notea-favorite-pop .5s cubic-bezier(.34,1.56,.64,1) both}

/* ----- Confeti ----- */
.confetti-layer{position:fixed;inset:0;pointer-events:none;z-index:9000;overflow:hidden}
.confetti-layer i{
  position:absolute;top:-16px;width:8px;height:14px;border-radius:2px;
  animation:notea-confetti-fall 1.9s cubic-bezier(.2,.6,.4,1) forwards;
  opacity:.95;
}
@keyframes notea-confetti-fall{
  0%{transform:translate(0,0) rotate(0deg);opacity:1}
  100%{transform:translate(var(--drift),110vh) rotate(var(--spin));opacity:0}
}

/* ----- Diálogo de atajos de teclado ----- */
.shortcuts-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,.30)}
.shortcuts-dialog::backdrop{background:rgba(17,20,32,.48);backdrop-filter:blur(7px)}
.shortcuts-dialog form{padding:26px}
.shortcuts-dialog header{display:flex;align-items:center;justify-content:space-between;gap:16px}
.shortcuts-dialog header small{color:var(--accent);font-size:9px;letter-spacing:.16em;font-weight:850}
.shortcuts-dialog h2{margin:3px 0 0;font-size:24px;letter-spacing:-.03em}
.shortcuts-list{list-style:none;margin:18px 0;padding:0;display:grid;gap:2px}
.shortcuts-list li{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:9px 4px;border-bottom:1px solid var(--line);font-size:13px}
.shortcuts-list li:last-child{border-bottom:0}
.shortcuts-list kbd{font:750 11px var(--ui);background:var(--panel-2);border:1px solid var(--line);border-radius:7px;padding:4px 8px;color:var(--muted);white-space:nowrap}
.shortcuts-hint{color:var(--muted);font-size:12px;line-height:1.5;margin:0 0 18px}
.shortcuts-icon{font-size:14px}

@media(prefers-reduced-motion:reduce){
  .confetti-layer{display:none}
  [data-favorite].favorite-pop{animation:none}
}

/* =========================================================
   NOTEA 5.0 — HUB Y MÓDULOS
   ========================================================= */
.portal{height:100dvh;overflow-y:auto;background:
  radial-gradient(circle at 92% 0%,color-mix(in srgb,var(--accent) 10%,transparent),transparent 34%),
  var(--bg);color:var(--text)}
.portal-header{position:sticky;top:0;z-index:30;height:74px;padding:0 clamp(18px,4vw,54px);display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid color-mix(in srgb,var(--line) 82%,transparent);background:color-mix(in srgb,var(--bg) 88%,transparent);backdrop-filter:blur(22px)}
.portal-brand{border:0;background:transparent;display:flex;align-items:center;gap:12px;text-align:left;padding:0}.portal-logo{width:39px;height:43px;display:grid;place-items:center}.portal-logo img{width:100%;height:100%;object-fit:contain}.portal-brand>span:last-child{display:grid}.portal-brand strong{font-size:18px;letter-spacing:-.02em}.portal-brand small{font-size:10px;color:var(--muted);margin-top:1px}
.portal-header-actions{display:flex;align-items:center;gap:10px}.local-pill{height:34px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--paper);display:flex;align-items:center;gap:6px;color:var(--muted);font-size:10px;font-weight:700}.portal-icon-button{width:40px;height:40px;border:1px solid var(--line);border-radius:13px;background:var(--paper);display:grid;place-items:center;font-size:17px}.portal-icon-button:hover{background:var(--accent-soft);border-color:color-mix(in srgb,var(--accent) 45%,var(--line))}
.portal-main{width:min(1120px,calc(100% - 36px));margin:0 auto;padding:clamp(28px,5vw,58px) 0 calc(64px + env(safe-area-inset-bottom))}.portal-screen{animation:portal-in .22s ease both}@keyframes portal-in{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:none}}
.eyebrow{margin:0 0 8px;color:var(--accent);font-size:10px;letter-spacing:.18em;font-weight:850}.house-text{color:#328361}.revisits-text{color:#7655bd}
.hub-welcome{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:28px}.hub-welcome h1,.module-header h1{font-size:clamp(38px,5vw,60px);line-height:1;letter-spacing:-.055em;margin:0}.hub-welcome p:last-child,.module-header>div>p:last-child{color:var(--muted);font-size:15px;line-height:1.55;margin:12px 0 0}.quick-create,.module-primary{min-height:48px;border:0;border-radius:14px;padding:0 19px;background:var(--accent);color:#fff;font-weight:800;display:flex;align-items:center;justify-content:center;gap:7px;box-shadow:0 13px 26px color-mix(in srgb,var(--accent) 24%,transparent)}.quick-create span{font-size:22px;font-weight:400}
.hub-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.hub-card{position:relative;min-height:132px;border:1px solid var(--line);border-radius:22px;background:var(--paper);padding:22px;display:grid;grid-template-columns:56px minmax(0,1fr) auto 20px;align-items:center;gap:16px;text-align:left;overflow:hidden;transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease}.hub-card:hover{transform:translateY(-2px);border-color:color-mix(in srgb,var(--accent) 36%,var(--line));box-shadow:0 15px 38px color-mix(in srgb,var(--text) 8%,transparent)}.hub-card-icon{width:56px;height:56px;border-radius:17px;display:grid;place-items:center;font-size:25px;font-weight:800}.notes-card .hub-card-icon{background:#fff0c9;color:#b98019}.house-card .hub-card-icon{background:#e3f5eb;color:#328361}.revisits-card .hub-card-icon{background:#eee7ff;color:#7655bd}.settings-card .hub-card-icon{background:var(--panel-2);color:var(--muted)}.hub-card-copy{display:grid;min-width:0}.hub-card-copy strong{font-size:18px;letter-spacing:-.025em}.hub-card-copy small{color:var(--muted);font-size:11px;margin-top:5px;line-height:1.4}.hub-card-count{display:grid;text-align:right}.hub-card-count b{font-size:27px;line-height:1}.hub-card-count small{color:var(--muted);font-size:9px;margin-top:4px}.hub-card-arrow{font-size:28px;color:var(--muted)}
.hub-summary{margin-top:26px;border:1px solid var(--line);border-radius:22px;background:color-mix(in srgb,var(--paper) 86%,transparent);padding:22px}.hub-summary>header{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;border-bottom:1px solid var(--line);padding-bottom:15px}.hub-summary h2{font-size:21px;letter-spacing:-.035em;margin:0}.hub-summary>header>small{font-size:10px;color:var(--muted)}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding-top:18px}.summary-grid>div{display:grid;grid-template-columns:42px auto;grid-template-rows:auto auto;column-gap:12px;align-items:center;padding:11px}.summary-icon{grid-row:1/3;width:42px;height:42px;border-radius:13px;display:grid;place-items:center;font-size:19px}.notes-soft{background:#fff0c9;color:#b98019}.house-soft{background:#e3f5eb;color:#328361}.revisits-soft{background:#eee7ff;color:#7655bd}.summary-grid strong{font-size:22px;line-height:1}.summary-grid small{font-size:10px;color:var(--muted);margin-top:2px}
.module-screen{max-width:1040px;margin:0 auto}.module-header{display:grid;grid-template-columns:50px minmax(0,1fr) auto;align-items:center;gap:18px;margin-bottom:24px}.module-header h1{font-size:clamp(34px,4vw,52px)}.back-button{width:46px;height:46px;border:1px solid var(--line);border-radius:14px;background:var(--paper);font-size:21px;color:var(--muted)}.back-button:hover{background:var(--panel-2);color:var(--text)}.house-primary{background:#328361}.revisits-primary{background:#7655bd}.settings-header{grid-template-columns:50px minmax(0,1fr)}
.module-toolbar{display:grid;grid-template-columns:minmax(280px,1fr) auto;gap:12px;align-items:center;margin-bottom:16px}.module-search{height:48px;border:1px solid var(--line);border-radius:15px;background:var(--paper);display:flex;align-items:center;gap:9px;padding:0 15px;color:var(--muted)}.module-search span{font-size:20px}.module-search input{width:100%;min-width:0;border:0;outline:0;background:transparent;font-size:13px}.segmented{display:flex;align-items:center;gap:4px;padding:4px;border:1px solid var(--line);border-radius:15px;background:var(--paper)}.segmented button{height:38px;border:0;border-radius:11px;background:transparent;color:var(--muted);padding:0 12px;font-size:10px;font-weight:750}.segmented button.is-active{background:var(--accent-soft);color:var(--accent)}[data-house-tabs] button.is-active{background:#e3f5eb;color:#328361}[data-person-tabs] button.is-active{background:#eee7ff;color:#7655bd}
.metric-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}.metric-grid article{border:1px solid var(--line);border-radius:17px;background:var(--paper);padding:17px;display:grid}.metric-grid small{font-size:9px;color:var(--muted);letter-spacing:.06em;text-transform:uppercase}.metric-grid strong{font-size:31px;letter-spacing:-.04em;margin:7px 0 1px;color:#328361}.metric-grid span{font-size:10px;color:var(--muted)}.revisits-metrics strong{color:#7655bd}
.records-panel{border:1px solid var(--line);border-radius:21px;background:var(--paper);overflow:hidden}.records-panel>header{height:59px;padding:0 19px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.records-panel h2{font-size:17px;margin:0;letter-spacing:-.02em}.records-panel>header span{font-size:10px;color:var(--muted)}.record-list{padding:5px 10px}.record-item{width:100%;min-height:78px;border:0;border-bottom:1px solid var(--line);background:transparent;display:grid;grid-template-columns:45px minmax(0,1fr) auto 18px;gap:12px;align-items:center;text-align:left;padding:10px 8px}.record-item:last-child{border-bottom:0}.record-item:hover{background:var(--panel)}.record-avatar{width:43px;height:43px;border-radius:14px;display:grid;place-items:center;font-weight:850}.house-avatar{background:#e3f5eb;color:#328361;font-size:19px}.people-avatar{background:#eee7ff;color:#7655bd;font-size:15px}.record-main{display:grid;min-width:0}.record-main strong{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-main small{font-size:10px;color:var(--muted);margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.record-main em{font-style:normal;font-size:9px;color:var(--accent);margin-top:4px}.status-chip{border-radius:999px;padding:6px 9px;font-size:8px;font-weight:800;white-space:nowrap}.status-pending{background:#fff0c9;color:#9a6810}.status-completed,.status-study{background:#e3f5eb;color:#277151}.status-interested,.status-revisit{background:#eee7ff;color:#6745ad}.status-neutral{background:var(--panel-2);color:var(--muted)}.status-danger{background:color-mix(in srgb,var(--danger) 12%,var(--paper));color:var(--danger)}.record-arrow{font-size:20px;color:var(--muted)}
.module-empty{min-height:300px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:35px}.module-empty>span{width:64px;height:64px;border-radius:20px;background:var(--panel-2);display:grid;place-items:center;font-size:26px;color:var(--muted)}.module-empty strong{font-size:18px;margin-top:16px}.module-empty p{font-size:11px;color:var(--muted);margin:7px 0 17px}.module-empty button{border:1px solid var(--line);background:var(--paper);border-radius:12px;padding:10px 14px;color:var(--accent);font-weight:750;font-size:11px}
.settings-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.settings-group{border:1px solid var(--line);border-radius:21px;background:var(--paper);padding:19px}.settings-group>header{display:flex;align-items:center;gap:12px;border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:5px}.settings-group>header>span{width:42px;height:42px;border-radius:13px;background:var(--accent-soft);color:var(--accent);display:grid;place-items:center;font-size:18px}.settings-group h2{font-size:16px;margin:0}.settings-group p{font-size:10px;color:var(--muted);margin:4px 0 0;line-height:1.45}.settings-control,.settings-action{min-height:60px;border:0;border-bottom:1px solid var(--line);background:transparent;width:100%;display:flex;align-items:center;justify-content:space-between;gap:15px;text-align:left;padding:8px 3px}.settings-control:last-child,.settings-action:last-child{border-bottom:0}.settings-control>span{font-size:12px;font-weight:700}.settings-control select{min-width:145px;height:38px;border:1px solid var(--line);background:var(--panel);border-radius:11px;padding:0 34px 0 11px;font-size:11px}.settings-action{cursor:pointer}.settings-action>span{display:grid}.settings-action b{font-size:12px}.settings-action small{font-size:9px;color:var(--muted);margin-top:4px}.settings-action i{font-style:normal;color:var(--muted);font-size:18px}.settings-action:hover{color:var(--accent)}.settings-action.install-app-button{height:auto;border-radius:0;box-shadow:none;color:inherit}.privacy-note{grid-column:1/-1;border:1px solid color-mix(in srgb,var(--accent) 25%,var(--line));border-radius:19px;background:var(--accent-soft);display:flex;gap:13px;padding:18px}.privacy-note>span{font-size:22px}.privacy-note strong{font-size:13px}.privacy-note p{font-size:10px;color:var(--muted);line-height:1.55;margin:5px 0 0}
.hub-return-button{height:34px;border:1px solid var(--line);border-radius:11px;background:var(--paper);display:flex;align-items:center;gap:6px;padding:0 10px;color:var(--muted)}.hub-return-button span{font-size:16px}.hub-return-button b{font-size:10px}.hub-return-button:hover{color:var(--text);background:var(--panel-2)}.simplified-footer .hub-footer-row{color:var(--accent)}
.module-dialog{width:min(650px,calc(100% - 24px));max-height:calc(100dvh - 30px);border:0;padding:0;border-radius:23px;background:var(--paper);color:var(--text);box-shadow:var(--shadow)}.module-dialog::backdrop{background:rgba(18,20,28,.48);backdrop-filter:blur(4px)}.module-form{padding:23px}.module-form>header{display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--line);padding-bottom:15px;margin-bottom:17px}.module-form header small{color:var(--accent);font-size:9px;font-weight:850;letter-spacing:.16em}.module-form h2{font-size:29px;letter-spacing:-.045em;margin:4px 0 0}.dialog-x{width:39px;height:39px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:23px;color:var(--muted)}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid label{display:grid;gap:6px}.form-grid label>span{font-size:10px;font-weight:750;color:var(--muted)}.form-grid input,.form-grid select,.form-grid textarea{width:100%;border:1px solid var(--line);border-radius:12px;background:var(--panel);padding:11px 12px;outline:none;font-size:12px}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}.form-grid textarea{resize:vertical;min-height:96px}.form-grid .span-2{grid-column:1/-1}.module-form>footer{display:grid;grid-template-columns:auto 1fr auto auto;gap:9px;align-items:center;border-top:1px solid var(--line);margin-top:19px;padding-top:16px}.module-form>footer button{min-height:42px;border:1px solid var(--line);border-radius:12px;background:var(--paper);padding:0 15px;font-size:11px;font-weight:750}.danger-outline{color:var(--danger)!important;border-color:color-mix(in srgb,var(--danger) 42%,var(--line))!important;background:color-mix(in srgb,var(--danger) 5%,var(--paper))!important}

@media(max-width:820px){
  .portal-header{height:64px;padding-inline:15px}.portal-brand small,.local-pill span{display:none}.local-pill{width:34px;padding:0;justify-content:center;border-radius:11px}
  .portal-main{width:min(100% - 24px,680px);padding-top:25px}.hub-welcome{align-items:flex-start}.hub-welcome h1{font-size:40px}.quick-create{min-height:43px;padding-inline:14px;font-size:12px}.hub-grid{grid-template-columns:1fr}.hub-card{min-height:108px;padding:16px;border-radius:18px}.hub-card-icon{width:49px;height:49px;border-radius:15px}.hub-summary{padding:16px}.summary-grid>div{padding:7px}
  .module-header{grid-template-columns:44px minmax(0,1fr) auto;gap:11px}.module-header h1{font-size:36px}.module-header>div>p:last-child{font-size:12px}.back-button{width:42px;height:42px}.module-primary{min-height:42px;padding-inline:13px;font-size:11px}
  .module-toolbar{grid-template-columns:1fr}.segmented{overflow-x:auto;justify-content:flex-start}.segmented button{flex:0 0 auto}.settings-layout{grid-template-columns:1fr}.privacy-note{grid-column:auto}
}
@media(max-width:560px){
  .portal-main{width:calc(100% - 18px);padding-top:20px}.hub-welcome{display:grid}.hub-welcome h1{font-size:36px}.quick-create{justify-self:start}.hub-card{grid-template-columns:48px minmax(0,1fr) 16px;gap:11px}.hub-card-count{display:none}.hub-card-icon{width:46px;height:46px}.hub-card-copy strong{font-size:15px}.summary-grid{grid-template-columns:1fr;gap:3px}.summary-grid>div{grid-template-columns:38px auto}.summary-icon{width:38px;height:38px}
  .module-header{grid-template-columns:42px minmax(0,1fr);align-items:start}.module-header .module-primary{grid-column:1/-1;justify-self:stretch}.module-header h1{font-size:32px}.metric-grid{grid-template-columns:repeat(3,1fr);gap:6px}.metric-grid article{padding:12px 9px;border-radius:14px}.metric-grid strong{font-size:25px}.metric-grid small{font-size:7px}.metric-grid span{font-size:8px}.record-item{grid-template-columns:40px minmax(0,1fr) 15px;padding-inline:4px}.record-avatar{width:38px;height:38px}.status-chip{grid-column:2;justify-self:start;padding:4px 7px}.record-arrow{grid-column:3;grid-row:1/3}.record-main small{white-space:normal}.settings-group{padding:15px}.settings-control select{min-width:125px}
  .module-dialog{width:calc(100% - 12px);max-height:calc(100dvh - 12px);border-radius:19px}.module-form{padding:17px;max-height:calc(100dvh - 12px);overflow-y:auto}.module-form h2{font-size:25px}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.module-form>footer{grid-template-columns:auto 1fr}.module-form>footer span{display:none}.module-form>footer button{padding-inline:12px}.module-form>footer .danger-outline{grid-column:1/-1;justify-self:start}
  .hub-return-button b{display:none}.hub-return-button{width:38px;padding:0;justify-content:center}.topbar-left{gap:3px}
}
@media print{.portal{display:none!important}}


/* =========================================================
   NOTEA 6.0 — MINISTERIO, CALENDARIO Y AJUSTES GLOBALES
   ========================================================= */
.ministry-card .hub-card-icon,.ministry-soft{background:#e5f2ff;color:#3b75a6}.settings-card{grid-column:1/-1}.summary-grid{grid-template-columns:repeat(4,1fr)}
.ministry-text{color:#3b75a6}.ministry-primary{background:#3b75a6}.ministry-toolbar{grid-template-columns:auto 1fr}.ministry-toolbar .segmented{justify-self:start}[data-ministry-tabs] button.is-active{background:#e5f2ff;color:#3b75a6}.service-year-pill{justify-self:end;border:1px solid var(--line);border-radius:999px;background:var(--paper);padding:10px 14px;font-size:9px;color:var(--muted)}.service-year-pill strong{color:var(--text);margin-left:5px}
.ministry-overview-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:14px;margin-bottom:14px}.ministry-progress-card,.timer-card,.ministry-calendar-card,.report-card,.service-year-card{border:1px solid var(--line);border-radius:21px;background:var(--paper);padding:20px}.ministry-progress-card>header,.timer-card>header,.report-card>header,.service-year-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px}.ministry-progress-card small,.timer-card small,.report-card small,.service-year-card small{font-size:9px;color:var(--muted);font-weight:800;letter-spacing:.08em}.ministry-progress-card h2,.report-card h2,.service-year-card h2{margin:5px 0 0;font-size:21px;letter-spacing:-.035em}.profile-chip{border-radius:999px;background:#e5f2ff;color:#3b75a6;padding:7px 10px;font-size:9px;font-weight:800}.ministry-progress-numbers{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin-top:28px}.ministry-progress-numbers strong{font-size:39px;letter-spacing:-.055em;color:#3b75a6}.ministry-progress-numbers span{font-size:11px;color:var(--muted);padding-bottom:6px}.ministry-progress-track{height:9px;border-radius:999px;background:var(--panel-2);overflow:hidden;margin-top:12px}.ministry-progress-track i{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#3b75a6,#65a7dd);transition:width .3s ease}.ministry-progress-card>p{font-size:10px;color:var(--muted);margin:11px 0 0}
.timer-card{display:flex;flex-direction:column}.timer-card>header span{font-size:9px;color:var(--muted)}.timer-display{font-variant-numeric:tabular-nums;font-size:36px;letter-spacing:-.04em;text-align:center;margin:auto 0;padding:24px 0;color:#3b75a6}.timer-actions{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}.timer-actions button{min-height:40px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:10px;font-weight:800;color:var(--text)}.timer-actions .timer-start{grid-column:1/-1;background:#e5f2ff;color:#3b75a6;border-color:#c9e0f5}.timer-actions button:disabled{opacity:.42;cursor:not-allowed}.ministry-metrics strong{color:#3b75a6}.ministry-avatar{background:#e5f2ff;color:#3b75a6}.entry-time{font-size:11px;font-weight:850;color:#3b75a6;white-space:nowrap}.compact-empty{min-height:240px}
.ministry-calendar-card{padding:0;overflow:hidden}.calendar-header{height:76px;padding:0 17px;display:grid;grid-template-columns:42px 1fr 42px;align-items:center;text-align:center;border-bottom:1px solid var(--line)}.calendar-header button{width:39px;height:39px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:22px;color:var(--muted)}.calendar-header h2{margin:3px 0 0;font-size:21px}.calendar-header small{font-size:8px;color:var(--muted);letter-spacing:.12em}.ministry-calendar{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;padding:15px}.calendar-weekday{font-size:8px;color:var(--muted);font-weight:800;text-align:center;padding:5px}.calendar-day{min-height:82px;border:1px solid var(--line);border-radius:13px;background:var(--panel);display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;padding:10px;text-align:left}.calendar-day b{font-size:13px}.calendar-day small{font-size:8px;color:#3b75a6;font-weight:800}.calendar-day.has-time{background:#edf7ff;border-color:#c7e2f7}.calendar-day.is-today{box-shadow:inset 0 0 0 2px #3b75a6}.calendar-day.is-empty{visibility:hidden}.calendar-hint{font-size:9px;color:var(--muted);text-align:center;margin:0;padding:0 15px 15px}
.report-grid{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(0,1.2fr);gap:14px}.report-card>header>span{width:42px;height:42px;border-radius:13px;background:#e5f2ff;color:#3b75a6;display:grid;place-items:center;font-size:20px}.report-card dl{margin:20px 0 0}.report-card dl>div{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);padding:13px 0}.report-card dt{font-size:11px;color:var(--muted)}.report-card dd{margin:0;font-size:17px;font-weight:850}.report-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:18px}.report-actions button{min-height:42px;border:1px solid var(--line);border-radius:12px;background:var(--panel);font-size:10px;font-weight:800}.report-actions .primary{background:#3b75a6;color:#fff;border-color:#3b75a6}.service-year-card>header>strong{font-size:24px;color:#3b75a6}.year-bars{height:270px;display:grid;grid-template-columns:repeat(12,1fr);gap:7px;align-items:end;margin-top:24px}.year-bar{height:100%;display:grid;grid-template-rows:1fr auto auto;gap:5px;text-align:center}.year-bar>span{height:100%;display:flex;align-items:flex-end;justify-content:center;border-radius:7px;background:var(--panel-2);overflow:hidden}.year-bar i{width:100%;min-height:2px;background:linear-gradient(180deg,#65a7dd,#3b75a6);border-radius:7px 7px 0 0}.year-bar small{font-size:7px;color:var(--muted)}.year-bar b{font-size:7px;white-space:nowrap}.ministry-rule-note{border-radius:13px;background:#e5f2ff;padding:12px 13px;margin-top:10px}.ministry-rule-note strong{font-size:11px;color:#3b75a6}.ministry-rule-note p{font-size:9px;margin:4px 0 0;color:var(--muted)}.settings-everywhere{font-size:16px}
@media(max-width:820px){.settings-card{grid-column:auto}.summary-grid{grid-template-columns:repeat(2,1fr)}.ministry-overview-grid,.report-grid{grid-template-columns:1fr}.ministry-toolbar{grid-template-columns:1fr}.service-year-pill{justify-self:start}.year-bars{height:220px}.calendar-day{min-height:68px;padding:8px}.timer-card{min-height:240px}}
@media(max-width:560px){.summary-grid{grid-template-columns:1fr}.ministry-progress-numbers strong{font-size:32px}.ministry-progress-numbers{align-items:flex-start;flex-direction:column;gap:0}.timer-display{font-size:32px}.ministry-calendar{gap:3px;padding:9px}.calendar-day{min-height:62px;border-radius:9px;padding:6px}.calendar-day b{font-size:11px}.calendar-day small{font-size:7px}.calendar-weekday{font-size:7px;padding-inline:1px}.year-bars{height:180px;gap:3px}.year-bar b{display:none}.report-actions{grid-template-columns:1fr}.service-year-pill{width:100%;justify-content:center;text-align:center}.entry-time{grid-column:2;justify-self:start}.settings-everywhere{width:38px;height:38px}}


/* =========================================================
   NOTEA 6.1 — HUB Y NAVEGACIÓN CONSISTENTE
   ========================================================= */
.portal-brand{cursor:default;user-select:none}
.hub-screen{position:relative;isolation:isolate;padding:clamp(22px,3.2vw,38px);border:1px solid color-mix(in srgb,var(--accent) 18%,var(--line));border-radius:32px;background:
  radial-gradient(circle at 92% 3%,color-mix(in srgb,var(--accent) 15%,transparent),transparent 30%),
  radial-gradient(circle at 5% 42%,color-mix(in srgb,#7655bd 9%,transparent),transparent 28%),
  linear-gradient(145deg,color-mix(in srgb,var(--paper) 95%,var(--accent) 5%),color-mix(in srgb,var(--bg) 92%,var(--paper) 8%));
  box-shadow:0 24px 70px color-mix(in srgb,var(--text) 7%,transparent);overflow:hidden}
.hub-screen::after{content:"N";position:absolute;right:-18px;top:-58px;z-index:-1;font-size:260px;line-height:1;font-weight:900;letter-spacing:-.12em;color:color-mix(in srgb,var(--accent) 4%,transparent);pointer-events:none}
.hub-screen .hub-welcome{margin-bottom:30px}.hub-screen .hub-summary{background:color-mix(in srgb,var(--paper) 91%,transparent);backdrop-filter:blur(14px)}
.hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hub-card{min-height:154px;grid-template-columns:54px minmax(0,1fr) 18px;align-content:center}.hub-card-count{grid-column:2;justify-self:start;text-align:left;display:flex;align-items:baseline;gap:5px}.hub-card-count b{font-size:20px}.hub-card-count small{margin-top:0}.hub-card-arrow{grid-column:3;grid-row:1/3}
.summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.hub-nav-button{width:40px!important;height:40px!important;min-width:40px;padding:0!important;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--paper)!important;display:grid!important;place-items:center!important;color:var(--muted)!important;box-shadow:none!important}
.hub-nav-button svg{width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}.hub-nav-button:hover{background:var(--accent-soft)!important;color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 40%,var(--line))!important;transform:translateY(-1px)}
.settings-everywhere{width:40px!important;height:40px!important;min-width:40px;border:1px solid var(--line)!important;border-radius:13px!important;background:var(--paper)!important;font-size:17px!important}.settings-everywhere:hover{background:var(--accent-soft)!important;color:var(--accent)!important;border-color:color-mix(in srgb,var(--accent) 40%,var(--line))!important}
.portal-icon-button{width:40px;height:40px;min-width:40px}.house-soft{background:#eee7ff;color:#7655bd}
@media(max-width:980px){.hub-grid{grid-template-columns:1fr}.hub-card{min-height:112px;grid-template-columns:54px minmax(0,1fr) auto 18px}.hub-card-count{grid-column:auto;justify-self:end;text-align:right;display:grid}.hub-card-arrow{grid-column:auto;grid-row:auto}.hub-screen{border-radius:26px}}
@media(max-width:560px){.hub-screen{padding:18px 13px;border-radius:23px}.hub-screen::after{font-size:190px;top:-35px}.hub-card{grid-template-columns:48px minmax(0,1fr) 16px}.hub-card-count{display:none}.hub-nav-button,.settings-everywhere,.portal-icon-button{width:40px!important;height:40px!important;min-width:40px!important}.summary-grid{grid-template-columns:1fr}}


/* =========================================================
   NOTEA 6.2 — TIPOS DE ACTIVIDAD Y META ANUAL VISIBLE
   ========================================================= */
.service-year-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin-top:16px}
.service-year-summary>span{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:13px;background:var(--panel)}
.service-year-summary small{font-size:8px!important;letter-spacing:.05em!important}.service-year-summary strong{font-size:13px;color:#3b75a6;white-space:nowrap}
@media(max-width:560px){.service-year-summary{grid-template-columns:1fr}.service-year-summary>span{padding:10px 11px}}


/* =========================================================
   NOTEA 6.3 — MÓVIL COMPACTO Y LISTAS DESPLEGABLES
   ========================================================= */
.record-list{padding:0 10px}
.record-group{border-bottom:1px solid var(--line)}.record-group:last-child{border-bottom:0}
.record-group>summary{min-height:58px;padding:10px 8px;display:flex;align-items:center;justify-content:space-between;gap:12px;cursor:pointer;list-style:none;user-select:none}
.record-group>summary::-webkit-details-marker{display:none}.record-group>summary span{display:grid;min-width:0}.record-group>summary strong{font-size:13px;letter-spacing:-.015em}.record-group>summary small{margin-top:3px;color:var(--muted);font-size:9px}.record-group>summary i{width:28px;height:28px;border:1px solid var(--line);border-radius:9px;background:var(--panel);display:grid;place-items:center;color:var(--muted);font-style:normal;transition:transform .18s ease}.record-group[open]>summary i{transform:rotate(180deg)}
.record-group-items{padding:0 4px 7px 18px;border-left:2px solid color-mix(in srgb,var(--accent) 18%,var(--line));margin:0 0 8px 13px}.record-group-items .record-item{padding-inline:5px}
.record-more{width:100%;min-height:38px;border:0;border-radius:10px;background:var(--panel);color:var(--accent);font-size:10px;font-weight:800;margin-top:5px}
.record-more:hover{background:var(--accent-soft)}

@media(max-width:600px){
  .portal-header{height:58px;padding:0 10px}.portal-logo{width:31px;height:34px}.portal-brand{gap:8px}.portal-brand strong{font-size:16px}.portal-brand small{display:none}.portal-header-actions{gap:6px}.local-pill{display:none}.portal-icon-button,.settings-everywhere,.hub-nav-button{width:38px!important;height:38px!important;min-width:38px!important;border-radius:12px!important}
  .portal-main{width:calc(100% - 14px);padding:8px 0 calc(12px + env(safe-area-inset-bottom))}
  .hub-screen{min-height:calc(100dvh - 74px);padding:12px 10px;border-radius:20px}.hub-screen::after{font-size:145px;right:-8px;top:-20px}.hub-screen .hub-welcome{margin-bottom:9px}
  .hub-welcome{align-items:center;gap:8px}.hub-welcome h1{font-size:26px;line-height:1.03}.hub-welcome .eyebrow{font-size:8px;margin-bottom:4px}.hub-welcome p:last-child{font-size:10px;line-height:1.3;margin-top:5px}.quick-create{min-height:39px;padding:0 11px;border-radius:12px;font-size:10px;white-space:nowrap;box-shadow:none}.quick-create span{font-size:10px}.quick-create span:first-child{font-size:17px}
  .hub-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.hub-card{min-height:94px;padding:10px;border-radius:15px;grid-template-columns:38px minmax(0,1fr) 12px;gap:8px;align-content:center}.hub-card.notes-card{grid-column:1/-1;min-height:67px;grid-template-columns:38px minmax(0,1fr) auto 12px}.hub-card-icon{width:38px;height:38px;border-radius:12px;font-size:18px}.hub-card-copy strong{font-size:14px}.hub-card-copy small{font-size:8.5px;line-height:1.25;margin-top:3px}.hub-card-count{display:none}.notes-card .hub-card-count{display:grid;grid-column:3;justify-self:end;text-align:right}.notes-card .hub-card-count b{font-size:17px}.notes-card .hub-card-count small{font-size:7px}.hub-card-arrow{font-size:19px;grid-column:auto;grid-row:auto}.revisits-card .hub-card-arrow,.ministry-card .hub-card-arrow{align-self:center}
  .hub-summary{margin-top:8px;padding:8px 9px;border-radius:15px}.hub-summary>header{padding-bottom:5px;border-bottom:0;align-items:center}.hub-summary .eyebrow,.hub-summary>header>small{display:none}.hub-summary h2{font-size:13px}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px;padding-top:3px}.summary-grid>div{grid-template-columns:25px minmax(0,1fr);grid-template-rows:auto auto;column-gap:6px;padding:4px 2px}.summary-icon{width:25px;height:25px;border-radius:8px;font-size:12px}.summary-grid strong{font-size:15px}.summary-grid small{font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .module-screen{width:100%}.module-header{grid-template-columns:40px minmax(0,1fr) 40px;gap:8px;margin-bottom:9px;align-items:center}.module-header h1{font-size:24px;line-height:1.05}.module-header .eyebrow{font-size:7.5px;margin-bottom:3px}.module-header>div>p:last-child{display:none}.back-button{width:40px;height:40px;border-radius:12px}.module-primary{width:40px;min-width:40px;min-height:40px;padding:0;border-radius:12px;font-size:18px;box-shadow:none}.module-primary span{display:none}
  .module-toolbar{grid-template-columns:1fr;gap:6px;margin-bottom:8px}.module-search{height:40px;border-radius:12px;padding:0 11px}.module-search input{font-size:11px}.segmented{width:100%;overflow-x:auto;justify-content:flex-start;padding:3px;border-radius:12px;scrollbar-width:none}.segmented::-webkit-scrollbar{display:none}.segmented button{height:32px;padding:0 10px;font-size:9px;flex:0 0 auto}
  .metric-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin-bottom:8px}.metric-grid article{padding:8px;border-radius:12px;min-width:0}.metric-grid small{font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.metric-grid strong{font-size:20px;margin:4px 0 0}.metric-grid span{font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .records-panel{border-radius:15px}.records-panel>header{height:44px;padding:0 12px}.records-panel h2{font-size:14px}.records-panel>header span{font-size:8px}.record-list{padding:0 7px}.record-group>summary{min-height:45px;padding:7px 3px}.record-group>summary strong{font-size:11px}.record-group>summary small{font-size:7.5px}.record-group>summary i{width:25px;height:25px;border-radius:8px}.record-group-items{padding-left:8px;margin-left:6px;margin-bottom:5px}.record-item{min-height:59px;grid-template-columns:34px minmax(0,1fr) auto 11px;gap:7px;padding:7px 2px}.record-avatar{width:33px;height:33px;border-radius:10px;font-size:12px}.record-main strong{font-size:11px}.record-main small{font-size:8px;margin-top:2px}.record-main em{font-size:7.5px;margin-top:2px}.status-chip{display:none}.entry-time{font-size:9px}.record-arrow{font-size:15px}.record-more{min-height:34px;font-size:9px}
  .module-empty{min-height:185px;padding:20px}.module-empty>span{width:49px;height:49px;border-radius:15px}.module-empty strong{font-size:15px;margin-top:10px}.module-empty p{font-size:9px;margin:5px 0 11px}
  .ministry-toolbar{grid-template-columns:1fr auto;align-items:center}.ministry-toolbar .segmented{min-width:0}.service-year-pill{width:auto;justify-self:end;padding:7px 8px;font-size:7px;white-space:nowrap}.service-year-pill strong{margin-left:3px}
  .ministry-overview-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin-bottom:7px}.ministry-progress-card,.timer-card,.ministry-calendar-card,.report-card,.service-year-card{padding:10px;border-radius:15px}.ministry-progress-card>header,.timer-card>header{gap:5px}.ministry-progress-card small,.timer-card small{font-size:7px}.ministry-progress-card h2{font-size:14px;margin-top:3px}.profile-chip{padding:4px 5px;font-size:6.5px}.ministry-progress-numbers{margin-top:10px;display:grid;gap:1px}.ministry-progress-numbers strong{font-size:24px}.ministry-progress-numbers span{font-size:7px;padding:0}.ministry-progress-track{height:6px;margin-top:6px}.ministry-progress-card>p{font-size:7px;margin-top:6px;line-height:1.25}.timer-card{min-height:0}.timer-card>header span{font-size:7px}.timer-display{font-size:23px;padding:12px 0}.timer-actions{gap:4px}.timer-actions button{min-height:31px;border-radius:9px;font-size:7.5px;padding:0 4px}.ministry-metrics{margin-bottom:7px}.ministry-metrics strong{font-size:18px}
  .calendar-header{height:59px;grid-template-columns:35px 1fr 35px}.calendar-header button{width:33px;height:33px}.calendar-header h2{font-size:16px}.ministry-calendar{padding:7px;gap:2px}.calendar-day{min-height:48px;padding:5px;border-radius:8px}.calendar-day b{font-size:10px}.calendar-day small{font-size:6px}.calendar-hint{font-size:7px;padding-bottom:9px}
  .report-grid{gap:7px}.report-card,.service-year-card{padding:13px}.year-bars{height:150px}.service-year-summary{gap:6px;margin-top:10px}.service-year-summary>span{padding:8px 9px}
  .module-dialog{width:calc(100% - 10px);max-height:calc(100dvh - 10px);border-radius:17px}.module-form{padding:14px;max-height:calc(100dvh - 10px)}.module-form>header{padding-bottom:10px;margin-bottom:11px}.module-form h2{font-size:21px}.dialog-x{width:36px;height:36px}.form-grid{gap:9px}.form-grid label>span{font-size:9px}.form-grid input,.form-grid select,.form-grid textarea{padding:10px 11px;font-size:11px}.form-grid textarea{min-height:78px}.module-form>footer{margin-top:12px;padding-top:11px}.module-form>footer button{min-height:39px;font-size:10px}
  .topbar{min-height:56px;padding-inline:8px}.hub-return-button{width:38px;height:38px;border-radius:12px}.topbar-actions{gap:3px}.topbar .icon-button{width:38px;height:38px}
}
@media(max-width:360px){
  .hub-welcome p:last-child{display:none}.hub-welcome h1{font-size:23px}.quick-create span:last-child{display:none}.quick-create{width:39px;padding:0}.hub-card-copy small{display:none}.hub-card{min-height:82px}.hub-card.notes-card{min-height:60px}.summary-grid small{font-size:7px}.ministry-overview-grid{gap:5px}.ministry-progress-card,.timer-card{padding:8px}.timer-display{font-size:20px}
}

/* =========================================================
   NOTEA 7.0 — FINAL PREMIUM MOBILE UI
   Hub E · Notes C · Revisits C · Ministry D · Settings D
   ========================================================= */
:root{
  --notea-violet:#5b45ef;
  --notea-indigo:#26358f;
  --notea-deep:#17235f;
  --notea-lilac:#a78bfa;
  --notea-blue:#4f8fe8;
  --notea-cream:#ffd88b;
  --notea-glass:rgba(255,255,255,.14);
  --notea-soft-shadow:0 18px 44px rgba(53,48,116,.13);
}

/* Shared premium controls */
.module-head-actions{display:flex;align-items:center;gap:9px;justify-self:end}
.module-settings-button,.settings-page-gear{
  width:46px;height:46px;min-width:46px;border:1px solid var(--line);border-radius:15px;
  display:grid;place-items:center;background:var(--paper);color:var(--text);font-size:18px;
  box-shadow:0 8px 24px rgba(38,42,86,.07)
}
.module-settings-button:hover{background:var(--accent-soft);color:var(--accent)}
.settings-page-gear{cursor:default}
.portal-bottom-nav,.notes-bottom-nav{display:none}
.notes-screen-title{display:none}
.hub-header-create{display:none;width:40px;height:40px;min-width:40px;border:1px solid var(--line);border-radius:13px;background:var(--paper);color:var(--text);place-items:center;font-size:25px;line-height:1;box-shadow:0 8px 24px rgba(38,42,86,.07)}

/* Hub — selected option E */
.portal[data-active-module="hub"]{
  background:
    radial-gradient(circle at 86% 12%,rgba(157,126,255,.35),transparent 30%),
    radial-gradient(circle at 10% 78%,rgba(73,126,245,.23),transparent 32%),
    linear-gradient(165deg,#3444bb 0%,#25358f 40%,#17235f 100%);
}
.portal[data-active-module="hub"] .portal-header{
  border-bottom-color:rgba(255,255,255,.1);background:rgba(30,43,126,.58);color:#fff
}
.portal[data-active-module="hub"] .portal-brand strong{color:#fff}
.portal[data-active-module="hub"] .portal-brand small{color:rgba(255,255,255,.7)}
.portal[data-active-module="hub"] .local-pill,
.portal[data-active-module="hub"] .portal-icon-button{
  border-color:rgba(255,255,255,.22);background:rgba(255,255,255,.11);color:#fff;backdrop-filter:blur(18px)
}
.portal[data-active-module="hub"] .portal-main{width:min(760px,calc(100% - 30px));padding-top:26px}
.hub-screen{
  min-height:calc(100dvh - 160px);border:0!important;border-radius:0!important;padding:0!important;
  background:transparent!important;box-shadow:none!important;color:#fff
}
.hub-screen::after{display:none!important}
.hub-hero{position:relative;margin-bottom:18px}
.hub-greeting{padding:2px 2px 14px}
.hub-kicker{margin:0;color:#fff;font-size:clamp(28px,4vw,42px);font-weight:850;letter-spacing:-.045em}
.hub-greeting h1{margin:5px 0 0;color:rgba(255,255,255,.78);font-size:clamp(14px,2vw,18px);font-weight:500;letter-spacing:0}
.hub-search{height:54px;border:1px solid rgba(255,255,255,.27);border-radius:17px;background:rgba(255,255,255,.13);display:flex;align-items:center;gap:12px;padding:0 9px 0 16px;box-shadow:inset 0 1px rgba(255,255,255,.18);backdrop-filter:blur(18px)}
.hub-search>span{font-size:26px;color:rgba(255,255,255,.8)}
.hub-search input{min-width:0;flex:1;border:0;outline:0;background:transparent;color:#fff;font-size:14px}
.hub-search input::placeholder{color:rgba(255,255,255,.7)}
.hub-search button{width:38px;height:38px;border:0;border-radius:12px;background:rgba(255,255,255,.12);color:#fff;font-size:19px}
.premium-hub-grid{grid-template-columns:1fr!important;gap:12px!important}
.premium-hub-grid .hub-card{
  min-height:126px!important;border:1px solid rgba(255,255,255,.45)!important;border-radius:24px!important;padding:19px!important;
  grid-template-columns:64px minmax(0,1fr) 96px 38px!important;gap:15px!important;color:#172047;box-shadow:0 18px 38px rgba(6,13,58,.2),inset 0 1px rgba(255,255,255,.65)!important;
  backdrop-filter:blur(18px);overflow:hidden
}
.premium-hub-grid .hub-card:hover{transform:translateY(-2px) scale(1.005)}
.premium-hub-grid .notes-card{background:linear-gradient(135deg,#fff5dc 0%,#ffd68d 50%,#f1bd63 100%)!important}
.premium-hub-grid .revisits-card{background:linear-gradient(135deg,#f3eaff 0%,#c5a7ff 52%,#9c7ce7 100%)!important}
.premium-hub-grid .ministry-card{background:linear-gradient(135deg,#e6f4ff 0%,#92c5fa 54%,#5c92e5 100%)!important}
.premium-hub-grid .hub-card-icon{
  width:64px;height:64px;border-radius:19px!important;background:rgba(255,255,255,.68)!important;color:inherit!important;
  font-size:29px;box-shadow:0 10px 24px rgba(34,36,86,.11)
}
.premium-hub-grid .hub-card-copy{position:relative;z-index:2}
.premium-hub-grid .hub-card-copy strong{font-size:22px!important;color:#172047;letter-spacing:-.035em}
.premium-hub-grid .hub-card-copy small{max-width:310px;font-size:12px!important;line-height:1.45!important;color:rgba(23,32,71,.72)!important}
.hub-card-art{width:96px;height:72px;opacity:.24;align-self:end;position:relative}
.note-art::before{content:"";position:absolute;inset:8px 18px 0 2px;border:3px solid currentColor;border-radius:8px;transform:rotate(-8deg)}
.note-art::after{content:"≡";position:absolute;right:5px;top:16px;font-size:60px;line-height:1;transform:rotate(22deg)}
.study-art::before{content:"⌁";position:absolute;font-size:82px;line-height:1;right:4px;top:-4px;transform:rotate(-12deg)}
.ministry-art::before{content:"▂▅▇";position:absolute;font-size:58px;letter-spacing:-10px;right:5px;bottom:2px}
.premium-hub-grid .hub-card-arrow{width:36px;height:36px;border:1px solid rgba(255,255,255,.65);border-radius:50%;display:grid;place-items:center;color:#24356d;font-size:26px;background:rgba(255,255,255,.22)}
.premium-summary{margin-top:18px!important;border:0!important;border-radius:22px!important;background:rgba(255,255,255,.09)!important;padding:15px!important;backdrop-filter:blur(18px)}
.premium-summary>header{border:0!important;padding:0 2px 11px!important;align-items:center!important}
.premium-summary h2{color:#fff;font-size:16px!important}
.premium-summary>header button{border:0;background:transparent;color:rgba(255,255,255,.8);font-size:11px}
.premium-summary .summary-grid{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;padding:0!important}
.premium-summary .summary-grid>div{display:flex!important;flex-direction:column;align-items:center;text-align:center;gap:5px;padding:12px 6px!important;border:1px solid rgba(255,255,255,.13);border-radius:16px;background:rgba(255,255,255,.08)}
.premium-summary .summary-icon{width:35px;height:35px;border-radius:11px;grid-row:auto;background:rgba(255,255,255,.14)!important;color:#fff!important}
.premium-summary strong{color:#fff;font-size:18px!important}
.premium-summary small{color:rgba(255,255,255,.72)!important;font-size:8px!important;line-height:1.2;white-space:normal!important}
.streak-soft{background:rgba(62,205,184,.22)!important;color:#9affeb!important}
.hub-fab{display:none;width:58px;height:58px;border:0;border-radius:50%;background:linear-gradient(135deg,#7c5cff,#5140d7);color:#fff;font-size:35px;box-shadow:0 13px 28px rgba(45,33,147,.38),inset 0 1px rgba(255,255,255,.4)}

/* Revisits — selected option C */
.revisits-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.revisits-metrics article{display:grid;grid-template-columns:34px 1fr;grid-template-rows:auto auto;column-gap:9px;align-items:center;padding:13px 12px;background:var(--paper)}
.revisits-metrics article:nth-child(1){background:color-mix(in srgb,#eee7ff 74%,var(--paper));border-color:#d9ccfb}
.revisits-metrics article:nth-child(2){background:color-mix(in srgb,#e5f2ff 74%,var(--paper));border-color:#cee4f7}
.revisits-metrics article:nth-child(3){background:color-mix(in srgb,#fff0c9 64%,var(--paper));border-color:#f0dcaa}
.revisits-metrics article:nth-child(4){background:var(--panel);border-color:var(--line)}
.revisits-metrics .metric-icon{grid-row:1/3;width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-size:15px;color:var(--accent);background:rgba(255,255,255,.7)}
.revisits-metrics strong{font-size:25px!important;margin:0!important;line-height:1;color:var(--text)!important}
.revisits-metrics small{font-size:8px!important;text-transform:none!important;letter-spacing:0!important;margin-top:3px;color:var(--muted)}
.people-records-panel .record-group{margin:10px;border:1px solid var(--line);border-radius:17px;background:var(--paper);overflow:hidden}
.people-records-panel .record-group>summary{padding-inline:13px;background:color-mix(in srgb,var(--panel) 70%,transparent)}
.people-records-panel .record-group-items{border-left:0;margin:0;padding:0 10px 8px}
.people-records-panel .record-item{min-height:66px}
.people-records-panel .people-avatar{border-radius:50%;background:linear-gradient(135deg,#eee7ff,#e4f1ff);color:#5742c4}

/* Ministry — selected option D */
.ministry-top-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:12px}
.ministry-top-metrics article{border:1px solid var(--line);border-radius:17px;background:var(--paper);padding:13px 8px;text-align:center;display:grid;gap:4px;box-shadow:0 7px 20px rgba(42,49,94,.035)}
.ministry-top-metrics article:nth-child(1){background:color-mix(in srgb,#e5f2ff 65%,var(--paper))}
.ministry-top-metrics article:nth-child(2){background:color-mix(in srgb,#eee7ff 65%,var(--paper))}
.ministry-top-metrics article:nth-child(3){background:color-mix(in srgb,#fff0c9 55%,var(--paper))}
.ministry-top-metrics article:nth-child(4){background:color-mix(in srgb,#f0eaff 55%,var(--paper))}
.ministry-top-metrics span{font-size:18px;color:#5b45ef}
.ministry-top-metrics strong{font-size:18px;letter-spacing:-.035em}
.ministry-top-metrics small{font-size:8px;color:var(--muted)}
.ministry-timer-hero{min-height:auto!important;padding:20px!important;background:linear-gradient(135deg,color-mix(in srgb,#f1eeff 85%,var(--paper)),var(--paper))!important;box-shadow:var(--notea-soft-shadow)}
.ministry-timer-hero .timer-display{font-size:52px;padding:22px 0;color:#22328c}
.ministry-timer-hero .timer-actions{grid-template-columns:1fr auto}
.ministry-timer-hero .timer-start{grid-column:auto!important;min-height:50px!important;border:0!important;background:linear-gradient(90deg,#566af5,#5942e8)!important;color:#fff!important;font-size:13px!important;box-shadow:0 12px 28px rgba(72,68,215,.24)}
.ministry-timer-hero [data-ministry-timer-pause]{min-width:110px}
.ministry-timer-hero [data-ministry-timer-save]{grid-column:1/-1}
.ministry-profile-card{margin:12px 0;border:1px solid var(--line);border-radius:17px;background:var(--paper);padding:13px 16px;display:grid;grid-template-columns:48px minmax(0,1fr) 18px;align-items:center;gap:12px}
.profile-orb{width:48px;height:48px;border-radius:16px;display:grid;place-items:center;background:#eee7ff;color:#5b45ef;font-size:23px}
.ministry-profile-card>div{display:grid}.ministry-profile-card strong{font-size:14px}.ministry-profile-card small{font-size:9px;color:var(--muted);margin-top:4px;line-height:1.35}.ministry-profile-card>span:last-child{font-size:24px;color:var(--muted)}
.ministry-goal-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:12px}
.goal-card{border:1px solid var(--line);border-radius:18px;background:var(--paper);padding:16px}
.goal-card header{display:flex;justify-content:space-between;align-items:center}.goal-card header strong{font-size:11px}.goal-card header span{padding:4px 8px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:9px;font-weight:800}
.goal-card>b{display:block;font-size:25px;margin:14px 0 8px;letter-spacing:-.04em;color:#26358f}.goal-track{height:7px;border-radius:99px;background:var(--panel-2);overflow:hidden}.goal-track i{display:block;height:100%;width:0;border-radius:inherit;background:linear-gradient(90deg,#604af0,#8a73ff);transition:width .35s ease}
.goal-card>small{display:block;color:var(--muted);font-size:8px;margin-top:8px}.goal-card>p{margin:10px 0 0;padding:9px;border-radius:11px;background:var(--accent-soft);color:var(--accent);font-size:9px;line-height:1.35;font-weight:700}
.ministry-bottom-grid{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(260px,.8fr);gap:12px}
.ministry-year-mini{padding:15px!important}.ministry-year-mini .year-bars{height:160px;margin-top:10px;gap:4px}.ministry-year-mini .year-bar b{display:none}.ministry-year-mini>header>strong{font-size:17px!important}
.ministry-recent-panel .record-group>summary{min-height:44px}.ministry-recent-panel .record-item{min-height:61px}

/* Settings — selected option D */
.settings-screen{max-width:800px}
.settings-layout{display:grid;grid-template-columns:1fr;gap:14px}
.settings-welcome{border:1px solid color-mix(in srgb,var(--accent) 22%,var(--line));border-radius:22px;padding:24px;display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(135deg,#f3efff,#e8efff);box-shadow:var(--notea-soft-shadow)}
.settings-welcome strong{font-size:19px;color:#3b31a0}.settings-welcome p{max-width:470px;color:#626882;font-size:12px;line-height:1.55;margin:7px 0 0}.settings-welcome>span{width:74px;height:74px;border-radius:23px;display:grid;place-items:center;background:rgba(255,255,255,.55);font-size:36px;color:#7058ef}
.settings-group{border-radius:20px!important;box-shadow:0 9px 28px rgba(35,42,88,.045)}
.settings-group>header{padding-bottom:15px!important;margin-bottom:5px!important}
.settings-control{min-height:62px!important;border-top:1px solid var(--line);padding:9px 2px!important}
.settings-action{min-height:62px!important}
.ministry-facts{margin-top:12px;border-radius:15px;padding:14px;display:grid;grid-template-columns:36px 1fr;gap:10px;background:linear-gradient(135deg,#f5f1ff,#eef3ff);color:#4d4e74}
.ministry-facts>span{width:36px;height:36px;border:1px solid #cfc3fb;border-radius:50%;display:grid;place-items:center;color:#604af0;font-size:19px}.ministry-facts ul{margin:0;padding-left:18px}.ministry-facts li{font-size:9px;line-height:1.55;margin:2px 0}

/* Notes — selected option C, editorial and serene */
.workspace{position:relative;background:
  radial-gradient(circle at 86% 8%,rgba(150,132,245,.13),transparent 32%),
  linear-gradient(135deg,#fbfbff,#f7f6fc)}
.paper{max-width:900px!important;padding:58px 68px 48px!important;border-radius:28px!important;border:1px solid rgba(113,98,199,.14)!important;box-shadow:0 24px 70px rgba(49,45,99,.09)!important;background:
  radial-gradient(circle at 92% 3%,rgba(135,111,235,.10),transparent 24%),
  linear-gradient(180deg,rgba(255,255,255,.98),rgba(253,252,255,.98))!important}
.page-heading{position:relative;padding-bottom:28px!important;overflow:hidden}.page-heading::after{content:"";position:absolute;width:260px;height:150px;right:-30px;top:-30px;background:radial-gradient(ellipse at center,rgba(134,114,232,.09),transparent 67%);border-radius:50%;pointer-events:none}
.page-title{font-family:var(--serif)!important;font-size:clamp(45px,5vw,68px)!important;font-weight:500!important;letter-spacing:-.04em!important;color:#131a3a!important}
.page-meta{margin-top:12px!important}.page-meta>span{font-size:11px!important;color:#707896!important}.page-meta button{border-radius:999px!important;background:#eeeaff!important;color:#5c45d9!important;border-color:#dcd2ff!important}
.toolbar{border-radius:16px!important;background:rgba(247,246,252,.9)!important;border:1px solid #e8e4f3!important;box-shadow:none!important;margin-bottom:28px!important}
.free-editor{font-family:var(--serif)!important;font-size:20px!important;line-height:1.8!important;color:#2f385c!important;max-width:720px;margin:auto}
.free-editor h2,.free-editor h3{font-family:var(--ui)!important;color:#1c2345}.free-editor blockquote{margin:26px 0;padding:8px 0 8px 30px;border-left:3px solid #7862e8;color:#2c3459;font-size:1.15em;font-style:italic;background:transparent}
.free-editor ul,.free-editor ol{padding-left:28px}.free-editor li{margin:8px 0}.paper-footer{margin-top:42px!important;color:#8a8fa5!important}
.empty-workspace{border-radius:28px;background:rgba(255,255,255,.72);box-shadow:var(--notea-soft-shadow)}

/* Desktop refinements */
@media(min-width:761px){
  .portal[data-active-module="hub"] .portal-main{padding-bottom:70px}
  .premium-hub-grid .hub-card{min-height:120px!important}
  .module-screen{padding-bottom:60px}
}

/* Mobile-first final layouts */
@media(max-width:760px){
  body{overflow:hidden}
  .portal{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
  .portal-main{width:100%!important;margin:0!important;padding:12px 12px 18px!important}
  .portal[data-active-module="hub"] .portal-header{height:70px;padding:env(safe-area-inset-top) 16px 0;position:sticky}
  .portal[data-active-module="hub"] .portal-main{padding:8px 14px 14px!important}
  .portal:not([data-active-module="hub"]) .portal-header{display:none}
  .portal:not([data-active-module="hub"]) .portal-main{padding-top:max(14px,env(safe-area-inset-top))!important}
  .portal-brand small,.local-pill{display:none!important}.portal-logo{width:36px!important;height:40px!important}.portal-brand strong{font-size:21px!important}.portal-icon-button{width:45px!important;height:45px!important;border-radius:15px!important}
  .hub-screen{min-height:auto!important;padding-bottom:10px!important}
  .hub-kicker{font-size:28px}.hub-greeting h1{font-size:13px;line-height:1.4}
  .hub-search{height:49px;border-radius:15px}.hub-search input{font-size:12px}
  .premium-hub-grid{gap:10px!important}
  .premium-hub-grid .hub-card{min-height:101px!important;padding:13px!important;border-radius:20px!important;grid-template-columns:50px minmax(0,1fr) 43px!important;gap:11px!important}
  .premium-hub-grid .hub-card-icon{width:50px;height:50px;border-radius:16px!important;font-size:22px}
  .premium-hub-grid .hub-card-copy strong{font-size:17px!important}.premium-hub-grid .hub-card-copy small{font-size:9.5px!important;margin-top:4px!important}
  .hub-card-art{display:none}.premium-hub-grid .hub-card-arrow{width:34px;height:34px;font-size:22px}
  .premium-summary{margin-top:11px!important;padding:11px!important}.premium-summary>header{padding-bottom:8px!important}.premium-summary h2{font-size:14px!important}.premium-summary .summary-grid{gap:5px!important}.premium-summary .summary-grid>div{padding:8px 3px!important;border-radius:13px}.premium-summary .summary-icon{width:28px;height:28px;font-size:12px}.premium-summary strong{font-size:15px!important}.premium-summary small{font-size:6.8px!important}
  .hub-fab{display:grid;place-items:center;position:fixed;z-index:62;left:50%;bottom:calc(55px + env(safe-area-inset-bottom));transform:translateX(-50%)}
  .portal-bottom-nav,.notes-bottom-nav{
    position:fixed;left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom));z-index:60;height:68px;
    display:grid;grid-template-columns:repeat(5,1fr);align-items:end;padding:7px 7px 8px;border:1px solid rgba(93,92,145,.16);border-radius:22px;
    background:rgba(255,255,255,.94);box-shadow:0 14px 40px rgba(28,28,68,.18);backdrop-filter:blur(24px)
  }
  .portal-bottom-nav button,.notes-bottom-nav button{height:52px;border:0;background:transparent;color:#737994;border-radius:14px;display:grid;place-content:center;justify-items:center;gap:2px;padding:0}
  .portal-bottom-nav button span,.notes-bottom-nav button span{font-size:18px;line-height:1}.portal-bottom-nav button small,.notes-bottom-nav button small{font-size:7.5px;font-weight:700}
  .portal-bottom-nav button.is-active,.notes-bottom-nav button.is-active{color:#4e42df;background:#f0edff}
  .portal[data-active-module="hub"] .portal-bottom-nav{background:rgba(255,255,255,.96)}
  .portal[data-active-module="hub"] .portal-bottom-nav button:nth-child(3){padding-top:10px}

  .module-screen{max-width:none;width:100%;padding-bottom:84px}
  .module-header{grid-template-columns:44px minmax(0,1fr) auto!important;gap:10px!important;margin:0 0 13px!important;align-items:center!important}
  .module-header h1{font-size:27px!important;line-height:1!important;letter-spacing:-.045em}.module-header .eyebrow{font-size:7px!important;margin-bottom:4px!important}.module-header>div>p:last-child{display:none!important}
  .back-button,.module-settings-button{width:44px!important;height:44px!important;min-width:44px!important;border-radius:14px!important}.module-head-actions{gap:7px}.module-primary{width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;border-radius:14px!important;padding:0!important}.module-primary span{display:none!important}
  .module-toolbar{grid-template-columns:1fr!important;gap:8px!important;margin-bottom:10px!important}.module-search{height:45px!important;border-radius:14px!important;padding:0 13px!important}.module-search input{font-size:11px!important}.segmented{padding:4px!important;border-radius:14px!important;justify-content:space-between!important}.segmented button{flex:1;height:35px!important;padding:0 7px!important;font-size:8.5px!important}

  .revisits-metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin-bottom:10px!important}.revisits-metrics article{display:flex!important;flex-direction:column!important;gap:3px!important;padding:8px 3px!important;border-radius:13px!important}.revisits-metrics .metric-icon{width:26px;height:26px;border-radius:9px;font-size:12px}.revisits-metrics strong{font-size:18px!important}.revisits-metrics small{font-size:6.5px!important}
  .people-records-panel{border:0!important;background:transparent!important}.people-records-panel>header{display:none}.people-records-panel .record-list{padding:0!important}.people-records-panel .record-group{margin:0 0 8px!important;border-radius:15px!important}.people-records-panel .record-group>summary{min-height:45px!important}.people-records-panel .record-group-items{padding:0 8px 5px!important}.people-records-panel .record-item{min-height:55px!important;grid-template-columns:34px minmax(0,1fr) auto 12px!important}.people-records-panel .record-main strong{font-size:10.5px!important}.people-records-panel .record-main small,.people-records-panel .record-main em{font-size:7.5px!important}.people-records-panel .status-chip{display:block!important;font-size:6.5px!important;padding:4px 6px!important}
  .revisits-primary{position:fixed;z-index:63;right:18px;bottom:calc(83px + env(safe-area-inset-bottom));border-radius:50%!important;box-shadow:0 13px 27px rgba(91,69,239,.32)!important}

  .ministry-screen .module-toolbar{grid-template-columns:1fr auto!important}.ministry-screen .segmented{min-width:0}.service-year-pill{width:auto!important;white-space:nowrap;font-size:7px!important;padding:8px 9px!important}
  .ministry-top-metrics{gap:5px;margin-bottom:8px}.ministry-top-metrics article{padding:8px 3px;border-radius:13px}.ministry-top-metrics span{font-size:14px}.ministry-top-metrics strong{font-size:13px}.ministry-top-metrics small{font-size:6px}
  .ministry-timer-hero{padding:12px!important;border-radius:17px!important}.ministry-timer-hero .timer-display{font-size:38px;padding:15px 0}.ministry-timer-hero .timer-start{min-height:42px!important;font-size:10px!important}.ministry-timer-hero [data-ministry-timer-pause]{min-width:74px}.ministry-timer-hero [data-ministry-timer-save]{min-height:34px!important}
  .ministry-profile-card{margin:8px 0;padding:9px 11px;border-radius:14px;grid-template-columns:38px minmax(0,1fr) 14px}.profile-orb{width:38px;height:38px;border-radius:12px;font-size:18px}.ministry-profile-card strong{font-size:11px}.ministry-profile-card small{font-size:7px}
  .ministry-goal-grid{gap:7px;margin-bottom:8px}.goal-card{padding:10px;border-radius:14px}.goal-card header strong{font-size:8px}.goal-card header span{font-size:7px;padding:3px 5px}.goal-card>b{font-size:19px;margin:9px 0 6px}.goal-card>small{font-size:6.5px}.goal-card>p{font-size:7px;padding:7px;margin-top:7px}.goal-track{height:5px}
  .ministry-bottom-grid{grid-template-columns:1fr;gap:8px}.ministry-year-mini{padding:10px!important}.ministry-year-mini .year-bars{height:100px}.ministry-recent-panel .record-item{min-height:53px!important}
  .ministry-primary{position:fixed;z-index:63;right:18px;bottom:calc(83px + env(safe-area-inset-bottom));border-radius:50%!important;box-shadow:0 13px 27px rgba(59,117,166,.3)!important}

  .settings-header{grid-template-columns:44px minmax(0,1fr) 44px!important}.settings-page-gear{width:44px;height:44px;min-width:44px;border-radius:14px}
  .settings-layout{gap:9px}.settings-welcome{padding:15px;border-radius:17px}.settings-welcome strong{font-size:15px}.settings-welcome p{font-size:9px;margin-top:5px}.settings-welcome>span{width:48px;height:48px;border-radius:15px;font-size:25px}
  .settings-group{padding:13px!important;border-radius:16px!important}.settings-group>header{padding-bottom:10px!important}.settings-group>header>span{width:39px!important;height:39px!important}.settings-group h2{font-size:15px!important}.settings-group header p{font-size:8px!important}.settings-control,.settings-action{min-height:52px!important}.settings-control>span,.settings-action b{font-size:10px!important}.settings-control select{min-width:112px!important;font-size:9px!important;padding:9px 25px 9px 9px!important}.settings-action small{font-size:7.5px!important}.ministry-rule-note{padding:9px!important}.ministry-facts{padding:10px;grid-template-columns:30px 1fr}.ministry-facts>span{width:30px;height:30px;font-size:15px}.ministry-facts li{font-size:7.2px}

  /* Notes/editor mobile */
  .app{padding-bottom:76px}.workspace{height:calc(100dvh - 76px)}
  .topbar{height:62px!important;min-height:62px!important;display:grid!important;grid-template-columns:1fr auto 1fr!important;padding:env(safe-area-inset-top) 8px 0!important;background:rgba(250,249,255,.9)!important;backdrop-filter:blur(18px)}
  .notes-screen-title{display:block;grid-column:2;grid-row:1;align-self:center;font-size:18px;letter-spacing:-.02em}.topbar-left{grid-column:1;grid-row:1;min-width:0}.topbar-actions{grid-column:3;grid-row:1;justify-self:end}
  .hub-return-button{width:42px!important;height:42px!important;border-radius:14px!important}.hub-return-button b{display:none}.save-state{max-width:52px;padding:0!important;border:0!important;background:transparent!important}.save-state span{display:none}
  .topbar-actions .wol-book-button,.topbar-actions [data-favorite],.topbar-actions [data-focus]{display:none!important}.topbar-actions .icon-button{width:42px!important;height:42px!important;border-radius:14px!important}.settings-everywhere{display:grid!important}
  .workspace-scroll{padding:9px 8px 20px!important}.paper{min-height:calc(100dvh - 154px)!important;padding:27px 22px 30px!important;border-radius:21px!important}.page-heading{padding-bottom:18px!important}.page-title{font-size:42px!important;line-height:1.03!important}.page-meta{margin-top:9px!important}.toolbar{position:sticky;top:0;z-index:5;margin:0 -8px 20px!important;padding:5px!important;border-radius:14px!important;overflow-x:auto!important;flex-wrap:nowrap!important}.free-editor{font-size:18px!important;line-height:1.75!important}.paper-footer{margin-top:30px!important}.empty-workspace{min-height:calc(100dvh - 160px)!important;border-radius:21px!important}
  .notes-bottom-nav{z-index:90}.sidebar{z-index:110}
}

@media(max-width:390px){
  .premium-hub-grid .hub-card{min-height:94px!important}.hub-kicker{font-size:25px}.premium-summary .summary-grid>div{padding-inline:2px!important}.premium-summary small{font-size:6px!important}
  .ministry-goal-grid{grid-template-columns:1fr}.ministry-bottom-grid{grid-template-columns:1fr}.ministry-timer-hero .timer-display{font-size:34px}
  .page-title{font-size:37px!important}.paper{padding-inline:17px!important}
}

/* =========================================================
   NOTEA 7.0.2 — COMPACT MOBILE DOCK + CLEAN EDITOR HEADER
   Tablet and desktop remain unchanged.
   ========================================================= */
@media(max-width:760px){
  /* New-page action belongs in the Hub header beside Settings. */
  .portal[data-active-module="hub"] .hub-header-create{
    display:grid!important;
    width:45px!important;
    height:45px!important;
    min-width:45px!important;
    border-radius:15px!important;
    border-color:rgba(255,255,255,.22)!important;
    background:rgba(255,255,255,.11)!important;
    color:#fff!important;
    font-size:28px!important;
    box-shadow:inset 0 1px rgba(255,255,255,.25),0 8px 22px rgba(12,20,83,.18)!important;
    backdrop-filter:blur(18px)!important;
  }
  .portal:not([data-active-module="hub"]) .hub-header-create{display:none!important}
  .hub-fab{display:none!important}

  /* The editor already has Inicio in the bottom dock. */
  .hub-return-button{display:none!important}

  /* Inicio in the dock replaces the redundant back buttons on mobile. */
  [data-module-screen="revisits"] .back-button,
  [data-module-screen="ministry"] .back-button{display:none!important}
  [data-module-screen="revisits"] .module-header,
  [data-module-screen="ministry"] .module-header{grid-template-columns:minmax(0,1fr) auto!important}

  /* The mobile dock and Más replace these sidebar footer actions. */
  .sidebar-footer{display:none!important}

  /* Compact browser dock: no large unused block beneath the icons. */
  .portal-bottom-nav,
  .notes-bottom-nav{
    left:0!important;
    right:0!important;
    bottom:0!important;
    width:100%!important;
    height:60px!important;
    min-height:60px!important;
    padding:4px 8px 3px!important;
    border-left:0!important;
    border-right:0!important;
    border-bottom:0!important;
    border-radius:18px 18px 0 0!important;
    align-items:center!important;
    box-shadow:0 -7px 24px rgba(28,28,68,.13)!important;
  }
  .portal-bottom-nav button,
  .notes-bottom-nav button{
    height:48px!important;
    min-height:48px!important;
    border-radius:12px!important;
    gap:1px!important;
  }
  .portal-bottom-nav button span,
  .notes-bottom-nav button span{font-size:17px!important}
  .portal-bottom-nav button small,
  .notes-bottom-nav button small{font-size:7px!important;line-height:1!important}
  .portal[data-active-module="hub"] .portal-bottom-nav button:nth-child(3){padding-top:0!important}

  /* Reserve only the real dock height. */
  .portal{padding-bottom:60px!important}
  .portal-main,
  .portal[data-active-module="hub"] .portal-main{padding-bottom:70px!important}
  .module-screen{padding-bottom:72px!important}
  .app{padding-bottom:60px!important}
  .workspace{height:calc(100dvh - 60px)!important}
}

/* Installed PWAs need only the actual device safe-area, not extra browser space. */
@media(max-width:760px) and (display-mode:standalone){
  .portal-bottom-nav,
  .notes-bottom-nav{
    height:calc(60px + env(safe-area-inset-bottom))!important;
    padding-bottom:calc(3px + env(safe-area-inset-bottom))!important;
  }
  .portal{padding-bottom:calc(60px + env(safe-area-inset-bottom))!important}
  .portal-main,
  .portal[data-active-module="hub"] .portal-main{padding-bottom:calc(70px + env(safe-area-inset-bottom))!important}
  .module-screen{padding-bottom:calc(72px + env(safe-area-inset-bottom))!important}
  .app{padding-bottom:calc(60px + env(safe-area-inset-bottom))!important}
  .workspace{height:calc(100dvh - 60px - env(safe-area-inset-bottom))!important}
}


/* =========================================================
   NOTEA 7.0.3 — ONE CREATE ACTION + COMPACT MINISTRY OVERVIEW
   Mobile only. Tablet and desktop remain unchanged.
   ========================================================= */
@media(max-width:760px){
  /* One creation action per module, always in the header. */
  .revisits-primary,
  .ministry-primary{
    position:static!important;
    inset:auto!important;
    transform:none!important;
    width:44px!important;
    min-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    border-radius:14px!important;
    box-shadow:0 8px 20px rgba(55,49,145,.13)!important;
  }
  .module-head-actions{display:flex!important;align-items:center!important;gap:7px!important}
  .module-head-actions .module-primary span{display:none!important}

  /* The empty states explain the top action instead of repeating it. */
  .people-empty{min-height:210px!important;padding:22px 16px!important}
  .people-empty p{max-width:240px!important;margin-bottom:0!important}
  .ministry-empty{min-height:112px!important;padding:12px 10px!important}
  .ministry-empty>span{width:38px!important;height:38px!important;border-radius:12px!important;font-size:17px!important}
  .ministry-empty strong{font-size:12px!important;margin-top:7px!important}
  .ministry-empty p{max-width:290px!important;font-size:8px!important;margin:3px 0 0!important}

  /* Tabs and service-year selector are visually equal-height cards. */
  .ministry-screen .module-toolbar{
    grid-template-columns:minmax(0,1.55fr) minmax(118px,.75fr)!important;
    align-items:stretch!important;
    gap:8px!important;
  }
  .ministry-screen .module-toolbar .segmented,
  .ministry-screen .service-year-pill{
    min-height:48px!important;
    height:48px!important;
    border-radius:15px!important;
    box-sizing:border-box!important;
  }
  .ministry-screen .module-toolbar .segmented{align-items:center!important;padding:4px!important}
  .ministry-screen .module-toolbar .segmented button{height:38px!important}
  .ministry-screen .service-year-pill{
    width:100%!important;
    justify-self:stretch!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    padding:5px 8px!important;
    white-space:normal!important;
    text-align:center!important;
    line-height:1.15!important;
  }
  .ministry-screen .service-year-pill strong{display:block!important;margin-left:4px!important}

  /* Monthly and annual progress stay side by side, including small phones. */
  .ministry-goal-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:7px!important;
    margin-bottom:8px!important;
  }
  .ministry-goal-grid .goal-card{min-width:0!important;padding:9px 8px!important;border-radius:14px!important}
  .ministry-goal-grid .goal-card header{gap:4px!important}
  .ministry-goal-grid .goal-card header strong{font-size:7.7px!important;line-height:1.15!important}
  .ministry-goal-grid .goal-card header span{font-size:6.5px!important;padding:3px 5px!important;flex:0 0 auto!important}
  .ministry-goal-grid .goal-card>b{font-size:17px!important;margin:8px 0 6px!important;white-space:nowrap!important}
  .ministry-goal-grid .goal-card>small{font-size:6.2px!important;line-height:1.25!important;min-height:16px!important}
  .ministry-goal-grid .goal-card>p{font-size:6.6px!important;line-height:1.25!important;padding:6px!important;margin-top:6px!important;min-height:34px!important}

  /* Recent activity is compact and no longer dominates the screen. */
  .ministry-recent-panel{min-height:0!important;border-radius:15px!important}
  .ministry-recent-panel>header{height:40px!important;padding:0 11px!important}
  .ministry-recent-panel h2{font-size:13px!important}
  .ministry-recent-panel .record-list{padding:0 6px!important}
  .ministry-recent-panel .record-group>summary{min-height:39px!important}
  .ministry-recent-panel .record-item{min-height:48px!important;padding-block:5px!important}

  /* No floating creation controls may overlap lists, charts or reports. */
  [data-module-screen="revisits"] .module-primary,
  [data-module-screen="ministry"] .module-primary{z-index:auto!important}
}

@media(max-width:370px){
  .ministry-screen .module-toolbar{grid-template-columns:minmax(0,1.35fr) minmax(108px,.85fr)!important}
  .ministry-screen .service-year-pill{font-size:6.5px!important;padding-inline:5px!important}
  .ministry-goal-grid{gap:5px!important}
  .ministry-goal-grid .goal-card{padding-inline:7px!important}
  .ministry-goal-grid .goal-card>b{font-size:15px!important}
}

/* =========================================================
   NOTEA 7.0.4 — COMPACT MOBILE FORMS
   Keep dialogs fully contained, compact and easy to close.
   ========================================================= */
@media(max-width:760px){
  .module-dialog{
    width:calc(100% - 22px)!important;
    max-width:560px!important;
    max-height:min(88dvh,690px)!important;
    overflow:hidden!important;
    border-radius:22px!important;
    margin:auto!important;
    box-shadow:0 24px 70px rgba(18,20,45,.28)!important;
  }
  .module-dialog::backdrop{
    background:rgba(20,22,32,.48)!important;
    backdrop-filter:blur(8px)!important;
  }
  .module-form{
    display:grid!important;
    grid-template-rows:auto minmax(0,1fr) auto!important;
    width:100%!important;
    max-height:min(88dvh,690px)!important;
    padding:0!important;
    overflow:hidden!important;
    background:var(--paper)!important;
  }
  .module-form>header{
    position:relative!important;
    z-index:2!important;
    margin:0!important;
    padding:14px 15px 11px!important;
    border-bottom:1px solid var(--line)!important;
    background:color-mix(in srgb,var(--paper) 94%,transparent)!important;
    backdrop-filter:blur(14px)!important;
  }
  .module-form header small{
    font-size:7.5px!important;
    letter-spacing:.15em!important;
  }
  .module-form h2{
    margin-top:3px!important;
    font-size:21px!important;
    line-height:1.05!important;
  }
  .dialog-x{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    border-radius:12px!important;
    font-size:22px!important;
  }
  .form-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px 9px!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    scrollbar-gutter:stable!important;
    padding:11px 15px 12px!important;
    align-content:start!important;
  }
  .form-grid .span-2{grid-column:1/-1!important}
  .form-grid label{gap:4px!important;min-width:0!important}
  .form-grid label>span{
    font-size:8px!important;
    line-height:1.15!important;
  }
  .form-grid input,
  .form-grid select,
  .form-grid textarea{
    min-width:0!important;
    min-height:42px!important;
    padding:9px 10px!important;
    border-radius:11px!important;
    font-size:10.5px!important;
    line-height:1.2!important;
  }
  .form-grid textarea{
    min-height:66px!important;
    max-height:88px!important;
    resize:none!important;
  }
  .module-form>footer{
    position:relative!important;
    z-index:3!important;
    display:flex!important;
    align-items:center!important;
    gap:8px!important;
    margin:0!important;
    padding:10px 15px calc(10px + env(safe-area-inset-bottom))!important;
    border-top:1px solid var(--line)!important;
    background:color-mix(in srgb,var(--paper) 96%,transparent)!important;
    backdrop-filter:blur(14px)!important;
  }
  .module-form>footer>span{display:none!important}
  .module-form>footer button{
    min-height:40px!important;
    padding:0 12px!important;
    border-radius:11px!important;
    font-size:9.5px!important;
    white-space:nowrap!important;
  }
  .module-form>footer button:not(.danger-outline){flex:1 1 0!important}
  .module-form>footer .primary{flex:1.45 1 0!important}
  .module-form>footer .danger-outline{
    flex:0 0 auto!important;
    grid-column:auto!important;
    justify-self:auto!important;
  }
}

@media(max-width:370px){
  .module-dialog{
    width:calc(100% - 14px)!important;
    max-height:90dvh!important;
    border-radius:19px!important;
  }
  .module-form{max-height:90dvh!important}
  .module-form>header{padding-inline:12px!important}
  .form-grid{padding-inline:12px!important;gap:7px!important}
  .module-form>footer{padding-inline:12px!important}
  .form-grid input,.form-grid select,.form-grid textarea{font-size:10px!important}
}

/* =========================================================
   NOTEA 7.0.5 — RESTORE BIBLE WOL ON MOBILE
   Keeps the editor companion visible without crowding the header.
   ========================================================= */
@media(max-width:760px){
  .topbar-actions .wol-book-button{
    display:grid!important;
    place-items:center;
    color:#5144d8;
    background:#f0edff;
    border-color:rgba(91,69,239,.18);
  }
  .topbar-actions{gap:3px!important}
  .topbar-actions .icon-button{
    width:39px!important;
    height:39px!important;
    min-width:39px!important;
    border-radius:13px!important;
  }
  .topbar-actions .wol-book-button svg{width:20px;height:20px}
}
@media(max-width:390px){
  .topbar-actions{gap:1px!important}
  .topbar-actions .icon-button{
    width:37px!important;
    height:37px!important;
    min-width:37px!important;
    border-radius:12px!important;
  }
  .notes-screen-title{font-size:17px!important}
}

/* =========================================================
   NOTEA 7.0.6 — CLEAN MODULE HEADERS
   Settings stays in the Hub; mobile module headers use icons.
   ========================================================= */
.module-mobile-section-icon{display:none}
.compact-module-header{grid-template-columns:minmax(0,1fr) auto}

@media(max-width:760px){
  /* Revisitas and Ministerio are already named in the bottom dock. */
  .compact-module-header{
    position:relative!important;
    grid-template-columns:44px auto!important;
    align-items:center!important;
    justify-content:space-between!important;
    min-height:44px!important;
    margin-bottom:12px!important;
  }
  .module-mobile-section-icon{
    display:grid!important;
    width:44px!important;
    height:44px!important;
    min-width:44px!important;
    place-items:center!important;
    border:1px solid var(--line)!important;
    border-radius:14px!important;
    background:var(--paper)!important;
    box-shadow:0 8px 22px rgba(38,42,86,.07)!important;
    font-size:20px!important;
    line-height:1!important;
  }
  .revisits-section-icon{color:#7655bd!important;background:#f3edff!important;border-color:rgba(118,85,189,.16)!important}
  .ministry-section-icon{color:#3b75a6!important;background:#e8f4ff!important;border-color:rgba(59,117,166,.16)!important}

  /* Keep the true page heading available to assistive technology. */
  .compact-module-header .module-title-copy{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }
  .compact-module-header .module-head-actions{
    grid-column:2!important;
    justify-self:end!important;
  }
}


/* =========================================================
   NOTEA 7.0.7 — SETTINGS ICON HEADER
   On mobile, Settings uses the same compact icon language as
   Revisitas and Ministerio while preserving the back action.
   ========================================================= */
.settings-section-icon{color:#5b45ef;background:#f0edff;border-color:rgba(91,69,239,.16)}

@media(max-width:760px){
  .compact-settings-header{
    grid-template-columns:44px 44px minmax(0,1fr)!important;
    justify-content:start!important;
    gap:8px!important;
    min-height:44px!important;
    margin-bottom:12px!important;
  }
  .compact-settings-header .settings-section-icon{
    display:grid!important;
    grid-column:2!important;
  }
  .compact-settings-header .settings-title-copy{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    white-space:nowrap!important;
    border:0!important;
  }
}
