/* Calm, readable phone-first refinements; color always accompanies a label. */
button,input,select,textarea{font:inherit}button{touch-action:manipulation}
button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid #3457c4;outline-offset:4px}
.creation-steps{display:flex;gap:8px;list-style:none;padding:0;margin:20px 0;counter-reset:step}
.creation-steps li{flex:1;min-width:0;background:#edf2ff;padding:12px 10px;border-radius:14px;color:#29478f;font-size:14px;font-weight:800}
.creation-steps li:before{counter-increment:step;content:counter(step) ' · '}
.device-access{margin:16px auto;padding:16px 20px;max-width:1124px;background:#edf2ff;border-radius:18px;color:#294078;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.device-access p{margin:0;flex:1 1 240px;font-size:15px}
#offlinePanel[hidden]{display:none!important}
#offlinePanel{position:fixed;inset:0;z-index:1000;background:#f5f7fb;overflow:auto;padding:24px 16px max(28px,env(safe-area-inset-bottom))}
.offline-inner{max-width:720px;margin:auto}.offline-item{background:#fff;padding:20px;border:1px solid #dbe2f0;border-radius:18px;margin:14px 0;overflow-wrap:anywhere}
.offline-item h3{margin:0;font-size:18px}.offline-item p{color:#53617b}.offline-item button{min-height:48px}
@media(max-width:720px){
 body{font-size:16px;line-height:1.55}main{padding-left:14px;padding-right:14px}
 h1{font-size:26px}.muted,.form-note,#planResults,.plan-breadcrumb,.folder-heading .muted{font-size:14px;color:#53617b}
 input,select,textarea,#planes input,#planes select{font-size:16px;min-height:52px;padding:13px 12px;max-width:100%;box-sizing:border-box}
 label,.field-label,#planes .filter-row label{font-size:16px;color:#27364c}
 button,.soft-btn,.primary,.blue,.dictate-button{min-height:48px;font-size:16px}
 #planForm{grid-template-columns:minmax(0,1fr);gap:22px}#planForm>*{min-width:0}
 .voice-control{display:flex;flex-direction:column;align-items:stretch;gap:8px}.voice-control textarea{min-height:115px;width:100%;font-size:17px;line-height:1.6}
 .dictate-button{width:100%;justify-content:center;display:flex;gap:9px;align-items:center;background:#edf2ff;border:1px solid #bdccee;color:#29478f;border-radius:13px;padding:12px}
 .dictate-button.listening{background:#ffefed;border-color:#c97069;color:#8a241c}
 .section-hint{font-size:15px;line-height:1.6;padding:14px;border-radius:14px}
 .form-actions{gap:12px}.form-actions button{width:100%;justify-content:center}
 .creation-steps{gap:6px}.creation-steps li{font-size:13px;padding:10px 6px;text-align:center}
 .nav .tab{min-height:58px}.nav .tab span{font-size:12px}
 .subject-folder{min-height:160px;padding:17px}.subject-folder h2{font-size:17px}.subject-folder small,.subject-folder .folder-count{font-size:13px}
 .timeline-day .plan-list-row h3{font-size:17px}.timeline-day .plan-list-row .muted,.timeline-date time{font-size:14px}
 .folder-heading h2{font-size:17px}.folder-heading .soft-btn{font-size:15px;min-height:48px}
 .plan-meta{grid-template-columns:minmax(0,1fr);gap:14px}.plan-paper{padding:20px 16px;font-size:16px;overflow-wrap:anywhere}
 #planEditor{font-size:16px;line-height:1.65;min-height:240px}.plan-paper>.row button{width:100%}
 .device-access{margin:14px;border-radius:18px;padding:16px}.device-access button{width:100%}
 .head-actions .ghost{min-height:44px;font-size:14px}.checklist-table{font-size:14px}
 #planes .filter-row{grid-template-columns:minmax(0,1fr)}#clearPlanFilters{font-size:15px;min-height:44px}
 footer{padding-bottom:100px}
}
@media print{.device-access,.creation-steps,#offlinePanel{display:none!important}}

/* Accessible proportions and account-level reading preferences. */
:root{--reading-size:16px;--body-leading:1.6}
:root[data-reading-size="large"]{--reading-size:18px}
:root[data-reading-size="extra"]{--reading-size:20px}
body{font-size:var(--reading-size);line-height:var(--body-leading)}
#app>header{background:#eae6fa!important;border-bottom:1px solid #d8d3ee!important;color:#29324a}
#app>header .brand-light{color:#26304a}
#app>header .head-actions .ghost{background:#ffffffb8;color:#424b69;border-color:#d2cbe6}
.avatar{width:42px;height:42px;min-width:42px;aspect-ratio:1;border-radius:50%!important;overflow:hidden;display:flex;align-items:center;justify-content:center;border:2px solid #fff;box-shadow:0 0 0 1px #d6cfea;background:#f9f7ff}
.avatar img,.avatar-image{width:100%;height:100%;object-fit:cover;border-radius:50%!important;display:block}
.avatar>span{font-size:25px;line-height:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%}
.avatar-option img,.avatar-option .avatar-emoji{width:56px;height:56px;min-width:56px;border-radius:50%!important;object-fit:cover;background:#f1eefb;display:flex;align-items:center;justify-content:center;overflow:hidden;line-height:1;font-size:37px}
.avatar-option{gap:9px}.avatar-option:has(input:focus-visible){outline:3px solid #3457c4;outline-offset:3px}
.reading-settings{min-width:0;margin:6px 0 22px;padding:18px;border:1px solid #dfe4f0;border-radius:20px;background:#f8f9fe}
.reading-settings legend{font-size:1.05em;font-weight:900;padding:0 8px;color:#3d4f78}
.reading-settings label{margin:0 0 10px}.reading-settings .muted{margin:0 0 14px}
.reading-example{padding:16px;background:white;border:1px solid #e0e5f0;border-radius:15px;font-size:var(--reading-size);font-weight:800;color:#2e3e5a;line-height:1.65}
.reading-example span{font-size:.95em;font-weight:500;color:#56647b}
#app main p,#app .plan-block p,#app .plan-paper,#app .plan-meta,#offlinePanel .offline-item{font-size:var(--reading-size);line-height:1.65}
#app .muted,#app .form-note,#app .status,#app .section-hint,#app .plan-breadcrumb,#app #planResults,#app .folder-heading .muted{font-size:calc(var(--reading-size) - 2px);line-height:1.6}
#app label,#app .field-label,#app .choice,#app #planes .filter-row label{font-size:calc(var(--reading-size) - 1px);line-height:1.5}
#app input,#app select,#app textarea,#app #planEditor,#app #planes input,#app #planes select{font-size:var(--reading-size);line-height:1.5}
#app .subject-folder h2,#app .timeline-day .plan-list-row h3,#app .folder-heading h2,#app .agenda-row strong{font-size:var(--reading-size);line-height:1.45}
#app .subject-folder small,#app .subject-folder .folder-count,#app .timeline-day .plan-list-row .muted,#app .timeline-date time,#app .agenda-hour{font-size:calc(var(--reading-size) - 3px);line-height:1.5}
#app .checklist-table{font-size:calc(var(--reading-size) - 2px)}
#app .subject-folder{height:auto;overflow-wrap:anywhere;justify-content:flex-start}
#app .plan-breadcrumb{flex-wrap:wrap}
#app .plan-meta>div,#app .row>span{min-width:0;overflow-wrap:anywhere}
#app .plan-paper .row{flex-wrap:wrap}
button,input,select,textarea{max-width:100%;box-sizing:border-box}
@media(max-width:720px){
 main{padding:18px 14px calc(125px + env(safe-area-inset-bottom))}
 #app>header{padding:12px 16px!important}
 .head-top{gap:10px;align-items:center}.head-actions{gap:8px;flex-wrap:wrap;justify-content:flex-end}
 .brand-light{font-size:23px;white-space:nowrap}.brand-light .mark{width:31px;height:31px}
 .avatar{width:42px;height:42px;min-width:42px;flex-shrink:0}
 #app .head-actions .ghost{min-height:44px;padding:8px 11px;font-size:13px;border-radius:12px}
 #app .card{padding:20px 17px;border:1px solid #e8ecf5;border-radius:22px;margin-bottom:16px}
 #app h1{font-size:calc(var(--reading-size) + 10px);line-height:1.22;overflow-wrap:anywhere}
 #app h2{font-size:calc(var(--reading-size) + 3px);line-height:1.35}
 #app h3{font-size:var(--reading-size);line-height:1.5}
 #app main button:not(.calendar-entry):not(.calendar-more):not(.text-btn),#offlinePanel button{min-height:48px;padding:11px 15px;font-size:calc(var(--reading-size) - 1px);line-height:1.4;border-radius:14px;white-space:normal;overflow-wrap:anywhere}
 #app .text-btn{min-height:44px;font-size:calc(var(--reading-size) - 2px);white-space:normal}
 #app .subject-folders{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
 #app main button.subject-folder{padding:17px 14px;min-height:195px;text-align:left;border-radius:22px}
 #app .subject-folder h2{font-size:var(--reading-size);line-height:1.35;margin:0}
 #app .subject-folder .folder-symbol{font-size:34px;line-height:1;margin:12px 0 8px}
 #app .subject-folder small{font-size:calc(var(--reading-size) - 3px)}
 #app .stat{padding:15px 11px;border-radius:18px;min-width:0}
 #app .stat strong{font-size:calc(var(--reading-size) + 10px)}
 #app .stat span{font-size:calc(var(--reading-size) - 4px);line-height:1.4}
 #app .timeline-day .plan-list-row{padding:17px 14px;border-radius:18px;gap:14px}
 #app .plan-list-row>.row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:stretch}
 #app .plan-list-row .danger-btn{font-size:calc(var(--reading-size) - 2px)}
 #app .form-actions{gap:10px}#app .form-actions>button{width:100%}
 #app .voice-control{gap:9px}#app .voice-control textarea{min-height:128px}
 #app .dictate-button{width:100%}
 #app .reading-settings{padding:15px 13px;border-radius:18px}
 #app .reading-settings select{min-height:52px}
 #app .avatar-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
 #app .avatar-option{padding:13px 6px;min-width:0;font-size:calc(var(--reading-size) - 3px);border-radius:18px}
 #app .avatar-option:has(input:checked){padding:12px 5px}
 #app .avatar-option input{width:20px;height:20px;min-height:20px;margin:0}
 #app .avatar-option img,#app .avatar-option .avatar-emoji{width:54px;height:54px;min-width:54px}
 #app .calendar-toolbar strong{font-size:calc(var(--reading-size) + 1px)}
 #app .calendar-entry{font-size:11px;min-height:26px;padding:4px;white-space:normal;line-height:1.35;overflow-wrap:anywhere}
 #app .calendar-more{min-height:26px;font-size:11px}
 #app .calendar-cell{min-width:0}
 #app .nav .tab{min-height:64px}
 #app .nav .tab span{font-size:12px;line-height:1.25}
 #app .nav .tab .icon{width:23px;height:23px}
 #app .saved-plan-view .plan-paper{padding:22px 16px;border-radius:20px}
}
@media(max-width:380px){
 #app .subject-folders{grid-template-columns:1fr}
 #app main button.subject-folder{min-height:170px}
 #app .avatar-options{grid-template-columns:repeat(2,minmax(0,1fr))}
 #app .plan-list-row>.row{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media print{body,#app .plan-paper,#app .plan-block p,#app .plan-meta{font-size:11pt!important;line-height:1.55}#app .checklist-table{font-size:10pt!important}}

/* Matching circular illustrations and an explicit selection state. */
.avatar-options{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}
#app .avatar-option{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:164px;padding:19px 10px 29px;gap:12px;background:#fff;border:2px solid #e2e6f1;border-radius:22px;cursor:pointer;margin:0;transition:border-color .15s,background .15s}
#app .avatar-option input{position:absolute;opacity:0;width:1px;height:1px;min-height:0;left:12px;top:12px;padding:0;margin:0}
#app .avatar-option img{width:76px;height:76px;min-width:76px;border-radius:50%;box-shadow:0 3px 10px #29334d0c;object-fit:cover;background:transparent}
#app .avatar-option>span{font-weight:900;font-size:14px;line-height:1.3;color:#34415d}
#app .avatar-option:has(input:checked){padding:19px 10px 29px;border:2px solid #5675d6;background:#eff3ff;box-shadow:0 0 0 3px #e5ecff}
#app .avatar-option:has(input:checked)::after{content:'✓ Elegido';position:absolute;bottom:8px;left:0;right:0;font-size:11px;font-weight:900;text-align:center;color:#3457c4}
#app .avatar-option:has(input:focus-visible){outline:3px solid #3457c4;outline-offset:4px}
#app .avatar-option:has(input:checked) img{box-shadow:0 0 0 3px #fff,0 0 0 5px #b2c0ed}
#app .avatar{background:#fff;box-shadow:0 0 0 2px #fff,0 0 0 3px #d1cbe7}
@media(max-width:720px){#app .avatar-options{grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}#app .avatar-option,#app .avatar-option:has(input:checked){min-height:142px;padding:16px 6px 27px;border-radius:19px;gap:10px}#app .avatar-option img{width:64px;height:64px;min-width:64px}#app .avatar-option>span{font-size:calc(var(--reading-size) - 3px)}}
@media(max-width:380px){#app .avatar-options{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){#app .avatar-option{transition:none}}

/* Soft gradients and a searchable, app-owned subject picker. */
#app>header{background:linear-gradient(115deg,#e7e4fc 0%,#edf0ff 55%,#e2f3f1 100%)!important;border-bottom:1px solid #dcdff0!important}
body{background:linear-gradient(160deg,#f3f1fc 0%,#f6f8fc 45%,#eef7f5 100%);background-attachment:fixed}
#app .primary{background:linear-gradient(115deg,#4569d6,#6655bf);border:0;box-shadow:0 5px 14px #4e5ac622}
#app .hero{background:linear-gradient(125deg,#fff 10%,#efedff 70%,#e8f5ef)}
#app .subject-folder:nth-child(6n+1){background:linear-gradient(140deg,#e8e4ff,#cfd9ff)}#app .subject-folder:nth-child(6n+2){background:linear-gradient(140deg,#fdeaf3,#f0cfe7)}#app .subject-folder:nth-child(6n+3){background:linear-gradient(140deg,#f4f5d3,#e1edc8)}#app .subject-folder:nth-child(6n+4){background:linear-gradient(140deg,#fff0df,#f9dccb)}#app .subject-folder:nth-child(6n+5){background:linear-gradient(140deg,#e7f1ff,#cee1f6)}#app .subject-folder:nth-child(6n){background:linear-gradient(140deg,#e4f5ec,#cce7df)}
.subject-field{min-width:0}.subject-field label{margin-bottom:6px}
#app main .subject-trigger{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:linear-gradient(120deg,#f4f2ff,#f1f8ff);border:1.5px solid #cbd4ed;padding:13px 15px;min-height:60px;color:#334568;box-shadow:0 3px 10px #26374604}
.subject-trigger #subjectTriggerText{flex:1;line-height:1.45;overflow-wrap:anywhere}
.subject-trigger-icon{background:#fff;border-radius:12px;padding:9px;color:#645ac4;font-size:22px}
.subject-dialog{width:min(520px,calc(100% - 28px));max-height:85dvh;border:1px solid #e2e5f2;border-radius:28px;padding:24px;background:linear-gradient(145deg,#fff,#f6f5ff);color:#263746;box-shadow:0 25px 80px #25325230;overflow:auto}
.subject-dialog::backdrop{background:#222b485c;backdrop-filter:blur(6px)}
.subject-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.subject-dialog-head h2{margin:5px 0 16px;font-size:24px}.subject-dialog-head button{min-height:44px;min-width:44px}
.subject-dialog input{font-size:var(--reading-size);min-height:52px;margin:0 0 14px;background:#fff;border:1px solid #d5dbec}
.subject-dialog-options{display:grid;gap:10px}
.subject-option{display:flex;align-items:center;gap:12px;width:100%;text-align:left;background:#fff;border:1.5px solid #e1e6f1;padding:13px;border-radius:17px;font-size:var(--reading-size);line-height:1.4;min-height:64px}
.subject-option>span:nth-child(2){flex:1;overflow-wrap:anywhere}
.subject-option-mark{width:40px;height:40px;min-width:40px;display:grid;place-items:center;border-radius:12px;background:var(--subject-tone);color:#4b5485}
.subject-option[aria-pressed="true"]{border-color:#6c79d1;background:#f0f2ff}.subject-option-check{color:#6675c5;font-weight:900;font-size:22px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#app .plan-paper{border:1px solid #e3e8f2;box-shadow:0 12px 35px #26374607;background:#fff;border-radius:24px}
#app .plan-heading{background:linear-gradient(120deg,#f0ecff,#edf6fb 65%,#eef8f0);border:0;border-radius:20px;padding:25px 18px;margin-bottom:22px}
#app .plan-heading h2{color:#344269;line-height:1.4}
#app .plan-meta{background:#f7f9fd;padding:18px;border-radius:16px;border:1px solid #e8ecf5;gap:12px}
#app .plan-block{margin:24px 0}
#app .plan-block>h3{padding:12px 15px;border:0;border-left:4px solid #8c80cf;border-radius:0 12px 12px 0;background:linear-gradient(90deg,#f0edfb,#f8faff);color:#475078}
#app .activity{background:#fafbfe;border:1px solid #e3e8f2;border-radius:18px;padding:17px;margin:13px 0}
#app .activity h3{color:#4c5ba1;background:none;border:0}
#app .checklist-table{border-radius:14px;overflow:hidden}#app .checklist-table th{background:#edf1fc;color:#435886}
@media(max-width:720px){.subject-dialog{padding:20px 16px;border-radius:25px;max-height:82dvh}.subject-dialog-head h2{font-size:23px}.subject-option{font-size:var(--reading-size);padding:12px;gap:10px}.subject-option-mark{width:36px;height:36px;min-width:36px}#app .plan-paper{padding:18px 13px}#app .plan-heading{padding:20px 14px;border-radius:17px}#app .plan-heading .brand{font-size:16px!important}#app .plan-meta{padding:15px}#app .activity{padding:15px}#app .plan-block>h3{font-size:var(--reading-size);line-height:1.5}}
@media print{#subjectDialog{display:none!important}#app .plan-heading,#app .plan-meta,#app .activity,#app .plan-block>h3{background:#fff!important;box-shadow:none!important}#app .plan-paper{border:0;box-shadow:none;padding:0}#app .plan-heading{padding:0;border-radius:0}}

/* Subject symbols stay consistent across search, selection and folders. */
.subject-option-mark svg,.subject-trigger-icon svg{width:23px;height:23px;display:block}
.subject-trigger-icon{display:grid;place-items:center}
.folder-symbol svg{width:42px;height:42px;display:block}
.subject-option-mark{background:linear-gradient(145deg,var(--subject-tone),#ffffff);color:#46547b;box-shadow:inset 0 0 0 1px #ffffffb3}
.subject-option{background:linear-gradient(120deg,#ffffff,#fafbff);box-shadow:0 3px 10px #34446904}
.subject-option[aria-pressed="true"]{background:linear-gradient(120deg,#efebff,#e8f2ff);border-color:#7e80cd}
#app .soft-btn{background:linear-gradient(120deg,#f1edff,#edf3ff);border-color:#d9ddf1;color:#3c5184}
#app .blue{background:linear-gradient(120deg,#3971cb,#6958c3);color:#fff;border:0;box-shadow:0 4px 12px #4e5ac61a}
#app .dictate-button{background:linear-gradient(120deg,#f0ebff,#e7f4fa);border-color:#cfd8ed}
#app .dictate-button.listening{background:linear-gradient(120deg,#ffe6eb,#fff0de);border-color:#dca2ac;color:#8a293c}
#app .danger-btn{background:linear-gradient(120deg,#fff4f6,#fff1ee);border-color:#f0d3d8;color:#a93f53}
#app .stat{background:linear-gradient(140deg,#fff,#f1f3ff);border:1px solid #e4e8f5}
#app .stat:nth-child(2){background:linear-gradient(140deg,#fff,#eef7ef)}
#app .stat:nth-child(3){background:linear-gradient(140deg,#fff,#f9eef6)}
#app .reading-settings,#app .avatar-picker{background:linear-gradient(135deg,#faf8ff,#f2f7ff)}
#app .avatar-option:has(input:checked){background:linear-gradient(145deg,#f1eaff,#e7f1ff)}
#app .timeline-date-number{background:linear-gradient(145deg,#ebe5ff,#dfeaff)}
#app .nav .tab{background:linear-gradient(145deg,var(--section-bg),#fff)!important}
#app .nav .tab.active{background:linear-gradient(145deg,var(--section-bg),var(--section-bg))!important;box-shadow:0 3px 9px #38477413}
@media print{#app button,#subjectDialog{display:none!important}.stat,.reading-settings,.avatar-picker{background:#fff!important}}
