#app { min-height: 100vh; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: max(20px, env(safe-area-inset-top)) 0 18px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 20; overflow: hidden; transition: width .2s ease, box-shadow .2s ease, padding .2s ease; }
.sidebar:hover, .sidebar:focus-within { width: 232px; padding-inline: 12px; box-shadow: 12px 0 28px rgba(25,54,66,.09); }
.sidebar-brand { width: 100%; min-height: 54px; display: flex; align-items: center; justify-content: center; gap: 0; padding: 5px 0 18px; color: var(--text); white-space: nowrap; }
.sidebar:hover .sidebar-brand, .sidebar:focus-within .sidebar-brand { justify-content: flex-start; gap: 11px; padding-inline: 8px; }
.sidebar-brand img { width: 38px; height: 38px; object-fit: contain; flex: 0 0 38px; }
.sidebar-brand span { display: grid; line-height: 1.05; opacity: 0; width: 0; overflow: hidden; transition: opacity .15s ease, width .2s ease; }
.sidebar:hover .sidebar-brand span, .sidebar:focus-within .sidebar-brand span { opacity: 1; width: 130px; }
.sidebar-brand strong { font-size: 1.05rem; }
.sidebar-brand small { margin-top: 5px; color: var(--brand); font-size: .64rem; letter-spacing: .12em; font-weight: 800; }
.sidebar-nav { width: 100%; display: grid; gap: 6px; justify-items: center; }
.nav-item { width: 44px; height: 44px; margin-inline: auto; min-height: 44px; padding: 0; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: 0; color: var(--text-2); font-weight: 680; font-size: .91rem; white-space: nowrap; }
.sidebar:hover .nav-item, .sidebar:focus-within .nav-item { width: 100%; margin-inline: 0; justify-content: flex-start; gap: 11px; padding: 0 12px; }
.nav-item span { width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center; text-align: center; font-size: 1.05rem; line-height: 1; }
.nav-item.nav-feedback span { font-size: 1.24rem; }
.nav-item.nav-ajustes span { font-size: 1.28rem; }
.nav-item b { max-width: 0; opacity: 0; overflow: hidden; font-size: inherit; font-weight: inherit; transition: max-width .2s ease, opacity .15s ease; }
.sidebar:hover .nav-item b, .sidebar:focus-within .nav-item b { max-width: 150px; opacity: 1; }
.sidebar:hover .sidebar-nav, .sidebar:focus-within .sidebar-nav { justify-items: stretch; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-strong); }
.sidebar-user { width: 100%; margin-top: auto; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 38px; justify-content: center; gap: 9px; align-items: center; }
.sidebar:hover .sidebar-user, .sidebar:focus-within .sidebar-user { grid-template-columns: 38px minmax(0,1fr) 38px; justify-content: stretch; padding-inline: 8px; }
.sidebar-user img, .avatar-fallback { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-weight: 800; }
.sidebar-user div { min-width: 0; display: none; gap: 2px; }
.sidebar:hover .sidebar-user div, .sidebar:focus-within .sidebar-user div { display: grid; }
.sidebar-user .icon-button { display: none; }
.sidebar:hover .sidebar-user .icon-button, .sidebar:focus-within .sidebar-user .icon-button { display: grid; }
.sidebar-user strong, .sidebar-user small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user strong { font-size: .82rem; }
.sidebar-user small { font-size: .7rem; }
.main-column { grid-column: 2; min-width: 0; width: 100%; }
.topbar { height: 72px; padding: max(12px, env(safe-area-inset-top)) 26px 10px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 10; }
.topbar .eyebrow { margin-bottom: 3px; font-size: .58rem; }
.topbar strong { font-size: 1rem; }
.sync-pill, .status-badge { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: .72rem; font-weight: 700; }
.status-badge.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 28%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.page-content { width: min(1320px, 100%); margin: 0 auto; padding: 24px 28px 54px; }
.page-stack { display: grid; gap: 18px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow-soft); }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.toolbar h1, .hero-panel h1 { margin-bottom: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 15px; }
.section-heading h2, .section-heading p { margin-bottom: 0; }
.section-heading small { display: block; margin-top: 3px; font-weight: 500; }

.loading-screen, .fatal-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 14px; text-align: center; padding: 30px; }
.loading-screen img, .fatal-screen img { width: 94px; height: 94px; object-fit: contain; }
.loading-screen p { margin: 0; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: minmax(0,1.2fr) minmax(360px,.8fr); gap: 40px; align-items: center; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: max(52px, env(safe-area-inset-top)) 0 50px; }
.auth-intro { max-width: 660px; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 32px; }
.auth-brand img { width: 54px; height: 54px; object-fit: contain; }
.auth-brand strong { font-size: 1.15rem; }
.auth-brand span { padding: 5px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .65rem; font-weight: 850; letter-spacing: .1em; }
.auth-intro h1 { font-size: clamp(2.4rem, 5.7vw, 5.4rem); line-height: .98; max-width: 820px; margin-bottom: 22px; }
.auth-intro > p:not(.eyebrow) { max-width: 620px; font-size: 1.08rem; }
.auth-points { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 9px; }
.auth-points span { padding: 9px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); font-size: .82rem; font-weight: 700; }
.auth-card, .onboarding-card { background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); }
.auth-card-logo { width: 64px; height: 64px; object-fit: contain; margin-bottom: 20px; }
.auth-card h2 { font-size: 1.5rem; }
.auth-card > p:not(.eyebrow) { margin-bottom: 22px; }
.auth-card small { display: block; margin-top: 15px; line-height: 1.5; }
.google-button { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.google-button:hover { border-color: var(--brand); }
.google-logo { width: 19px; height: 19px; flex: 0 0 19px; }
.onboarding-page { min-height: 100vh; display: grid; place-items: center; padding: max(40px, env(safe-area-inset-top)) 20px 40px; }
.onboarding-card { width: min(720px,100%); }
.onboarding-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.onboarding-brand img { width: 64px; height: 64px; object-fit: contain; }
.username-field { display: grid; grid-template-columns: auto 1fr; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.username-field span { padding-left: 12px; color: var(--muted); }
.username-field input { border: 0; box-shadow: none !important; }

.hero-panel { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 26px; background: var(--surface); }
.hero-stat { min-width: 118px; height: 96px; border-radius: 20px; background: var(--brand); color: #fff; display: grid; place-items: center; align-content: center; }
.hero-stat strong { font-size: 2.15rem; line-height: 1; }
.hero-stat span { font-size: .72rem; margin-top: 5px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.compact-list { display: grid; }
.compact-list > div { min-height: 58px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 11px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.compact-list > div:first-child { border-top: 0; }
.compact-list > div > div { display: grid; gap: 3px; }
.compact-list strong { font-size: .88rem; }
.compact-list small { font-size: .76rem; }
.color-dot { width: 10px; height: 36px; border-radius: 999px; }
.date-chip { min-width: 42px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: var(--brand-soft); color: var(--brand-strong); font-size: .71rem; font-weight: 850; }
.timeline { display: grid; }
.timeline article { display: grid; grid-template-columns: 54px 5px minmax(0,1fr); gap: 13px; padding: 13px 0; border-top: 1px solid var(--line); }
.timeline article:first-child { border-top: 0; }
.timeline time { color: var(--text-2); font-size: .82rem; font-weight: 750; }
.timeline article > span { border-radius: 999px; }
.timeline article > div { display: grid; gap: 3px; }

.empty-state { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 7px; text-align: center; color: var(--text-2); }
.empty-state .empty-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: 1.35rem; }
.empty-state span { max-width: 420px; font-size: .86rem; }
.empty-copy { color: var(--muted); font-size: .83rem; }

.schedule-panel { padding: 14px; overflow: hidden; }
.schedule-scroll { overflow-x: auto; padding-bottom: 6px; }
.schedule-grid { min-width: 850px; display: grid; grid-template-columns: 68px repeat(var(--day-count),minmax(130px,1fr)); grid-template-rows: 42px var(--schedule-height); position: relative; }
.schedule-corner { border-bottom: 1px solid var(--line); }






















.subject-list { display: grid; }
.subject-row { min-height: 62px; display: grid; grid-template-columns: 8px minmax(0,1fr) auto 38px; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.subject-row:first-child { border-top: 0; }
.subject-swatch { width: 8px; height: 38px; border-radius: 999px; }
.subject-row > div { display: grid; gap: 3px; }
.subject-row strong { font-size: .89rem; }
.subject-row small { font-size: .72rem; }
.editor-section { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.session-row { display: grid; grid-template-columns: 1.05fr .9fr .72fr .72fr .9fr 38px; gap: 8px; margin-top: 8px; }
.evaluation-row { display: grid; grid-template-columns: minmax(0,1fr) 140px 38px; gap: 8px; margin-top: 8px; }
.weight-field { display: grid; grid-template-columns: 1fr auto; align-items: center; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; background: var(--surface); }
.weight-field input { border: 0; box-shadow: none !important; }
.weight-field span { padding-right: 11px; color: var(--muted); }

.event-list { display: grid; gap: 12px; }
.event-card { display: grid; grid-template-columns: 64px minmax(0,1fr) auto; gap: 16px; align-items: center; }
.event-card.past-event { opacity: .58; }
.event-date { width: 58px; height: 64px; border-radius: 14px; display: grid; place-items: center; align-content: center; background: var(--brand-soft); color: var(--brand-strong); }
.event-date strong { font-size: 1.5rem; line-height: 1; }
.event-date span { text-transform: uppercase; font-size: .65rem; font-weight: 800; }
.event-main h2 { margin: 4px 0; }
.event-main p { margin: 0; font-size: .82rem; }
.event-main > small { display: block; margin-top: 5px; }
.event-meta { display: flex; gap: 7px; align-items: center; }
.event-meta span, .event-meta b { font-size: .64rem; padding: 4px 7px; border-radius: 999px; }
.event-meta span { background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
.event-meta b { background: var(--brand-soft); color: var(--brand-strong); }
.row-actions { display: flex; gap: 6px; align-items: center; }

.grades-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.grade-card { align-self: start; }
.grade-head { display: grid; grid-template-columns: 8px minmax(0,1fr) auto; gap: 12px; align-items: center; }
.grade-head > div { display: grid; gap: 2px; }
.grade-head h2 { margin: 0; }
.grade-head > strong { font-size: 1.65rem; }
.progress { height: 7px; margin: 14px 0 17px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; }
.grade-block { margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--line); }
.grade-block-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.grade-block-head > div { display: grid; gap: 2px; }
.grade-block-head span { color: var(--text-2); font-size: .72rem; }
.grade-items { display: grid; margin-top: 8px; }
.grade-items > div { min-height: 48px; display: grid; grid-template-columns: minmax(0,1fr) 50px 36px 36px; gap: 7px; align-items: center; border-top: 1px solid var(--line); }
.grade-items > div:first-child { border-top: 0; }
.grade-items span { display: grid; gap: 2px; }
.grade-items strong { font-size: .82rem; }
.grade-items small { font-size: .69rem; }

.profile-header { display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--brand-soft); display: grid; place-items: center; color: var(--brand); font-size: 1.6rem; font-weight: 850; overflow: hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-header h1, .profile-header p { margin-bottom: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.check-card { min-height: 46px; display: grid; grid-template-columns: 20px 1fr; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); cursor: pointer; font-size: .78rem; }
.check-card input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid var(--line); border-radius: 6px; color: transparent; font-size: .72rem; }
.check-card input:checked + .custom-check { background: var(--brand); color: #fff; border-color: var(--brand); }
.toggle-card { display: grid; grid-template-columns: 42px minmax(0,1fr); align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.toggle-card input { position: absolute; opacity: 0; }
.toggle-ui { width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; }
.toggle-ui::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.toggle-card input:checked + .toggle-ui { background: var(--brand); }
.toggle-card input:checked + .toggle-ui::after { transform: translateX(18px); }
.toggle-card > span:last-child { display: grid; gap: 2px; }
.toggle-card small { font-weight: 500; }
.integration-actions { display: flex; gap: 10px; margin: 15px 0 8px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-color: color-mix(in srgb,var(--danger) 30%, var(--line)); }
.danger-zone p { margin-bottom: 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

.modal-backdrop { position: fixed; inset: 0; background: rgba(5,15,20,.48); backdrop-filter: blur(5px); z-index: 100; display: grid; place-items: center; padding: max(18px,env(safe-area-inset-top)) 18px max(18px,env(safe-area-inset-bottom)); overflow: auto; }
.modal-card { width: min(650px,100%); max-height: calc(100vh - 36px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.25); }
.wide-modal { width: min(900px,100%); }
.small-modal { width: min(470px,100%); }
.modal-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.modal-header h2, .modal-header p { margin-bottom: 0; }
.modal-copy { color: var(--text-2); }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }
#toast-root { position: fixed; right: 18px; bottom: 18px; z-index: 200; display: grid; gap: 8px; }
.toast { max-width: 340px; padding: 11px 14px; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: .18s ease; font-size: .82rem; font-weight: 650; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-danger { background: var(--danger); color: #fff; }
.mobile-nav { display: none; }

/* 0.21.2 · navegación automática */
/* La barra permanece compacta y se despliega únicamente al pasar el cursor o entrar con teclado. */

/* 0.21 · login */
.google-button { min-height: 46px; gap: 11px; border-color: #cfd8dc; box-shadow: 0 1px 2px rgba(16,33,41,.04); }
.google-button:hover { background: var(--surface-2); border-color: #aebdc3; transform: none; }
.google-button span { color: var(--text); }
.compact-copy { margin: 5px 0 0; font-size: .86rem; }

/* 0.21.8 · horario adaptativo premium */
.mobile-schedule { display: none; }
.schedule-panel { padding: 16px 18px 18px; background: var(--surface); }
.schedule-grid { grid-template-columns: 84px repeat(var(--day-count), minmax(164px, 1fr)); }
.schedule-corner { border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line)); display: flex; align-items: end; justify-content: end; padding: 0 12px 10px 0; color: var(--text-2); font-size: .72rem; font-weight: 780; letter-spacing: .02em; background: var(--surface); }
.schedule-day-head { border-left: 1px solid color-mix(in srgb, var(--brand) 8%, var(--line)); border-bottom: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line)); display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 8px 4px; background: var(--surface); }
.schedule-day-head strong { font-size: .87rem; font-weight: 860; letter-spacing: -.01em; }
.schedule-day-head small { color: var(--brand); font-size: .8rem; font-weight: 900; }
.time-axis { position: relative; border-right: 1px solid color-mix(in srgb, var(--brand) 8%, var(--line)); background: var(--surface); }
.time-axis span { position: absolute; right: 12px; transform: translateY(-50%); color: var(--text-2); font-size: .74rem; font-weight: 760; line-height: 1; background: var(--surface); padding: 2px 0; }
.time-axis span.edge-start { transform: translateY(0); top: 0 !important; }
.time-axis span.edge-end { transform: translateY(-100%); }
.day-column { position: relative; border-right: 1px solid color-mix(in srgb, var(--brand) 8%, var(--line)); background: var(--surface); }
.day-column > i { position: absolute; left: 0; right: 0; border-top: 1px solid color-mix(in srgb, var(--brand) 9%, var(--line)); opacity: .9; }
.day-column > i.separator-line { border-top: 2px dashed color-mix(in srgb, var(--brand) 38%, transparent); z-index: 1; }
.class-block { position: absolute; top: calc(var(--block-top, 0%) + 2px); height: max(12px, calc(var(--block-height, 100%) - 4px)); left: calc(var(--block-left, 0%) + 5px); width: calc(var(--block-width, 100%) - 10px); right: auto; box-sizing: border-box; min-height: 0; padding: 10px 11px 9px; border-radius: 14px; display: grid; align-content: start; gap: 2px; overflow: hidden; isolation: isolate; background: var(--block-bg); color: var(--block-text); border: 1px solid color-mix(in srgb, currentColor 13%, transparent); box-shadow: 0 5px 14px rgba(16,33,41,.075); z-index: 2; transition: transform .14s ease, box-shadow .14s ease; }
.class-block:hover { z-index: 5; transform: translateY(-1px); box-shadow: 0 9px 20px rgba(16,33,41,.12); }
.class-block-title { display: flex; min-width: 0; position: relative; z-index: 1; }
.class-block-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; line-height: 1.08; font-weight: 850; letter-spacing: -.01em; }
.class-block-time { position: relative; z-index: 1; font-size: .76rem; line-height: 1.06; font-weight: 800; letter-spacing: -.01em; color: currentColor; opacity: 1; }
.class-block-meta { position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; line-height: 1.06; color: currentColor; opacity: 1; font-weight: 650; }
.class-block-meta:empty { display: none; }

/* El contenido se adapta a la altura real del bloque para que nunca se corte. */
.class-block.duration-long { padding: 11px 12px 10px; gap: 3px; }
.class-block.duration-long .class-block-title strong { font-size: .94rem; }
.class-block.duration-long .class-block-time { font-size: .79rem; }
.class-block.duration-long .class-block-meta { font-size: .74rem; }
.class-block.duration-medium { padding: 9px 10px 8px; gap: 2px; }
.class-block.duration-medium .class-block-title strong { font-size: .88rem; }
.class-block.duration-medium .class-block-time { font-size: .74rem; }
.class-block.duration-medium .class-block-meta { font-size: .69rem; }
.class-block.duration-hour { padding: 6px 9px 5px; gap: 1px; }
.class-block.duration-hour .class-block-title strong { font-size: .82rem; line-height: 1.02; }
.class-block.duration-hour .class-block-time { font-size: .69rem; line-height: 1.02; }
.class-block.duration-hour .class-block-meta { font-size: .64rem; line-height: 1.02; }
.class-block.duration-compact { padding: 5px 8px; gap: 1px; }
.class-block.duration-compact .class-block-title strong { font-size: .78rem; }
.class-block.duration-compact .class-block-time { font-size: .65rem; }
.class-block.duration-compact .class-block-meta { display: none; }
.class-block.duration-short { padding: 4px 7px; gap: 0; align-content: center; }
.class-block.duration-short .class-block-title strong { font-size: .73rem; }
.class-block.duration-short .class-block-time { font-size: .61rem; }
.class-block.duration-short .class-block-meta { display: none; }
.class-block.duration-xs { padding: 2px 6px; align-content: center; border-radius: 10px; }
.class-block.duration-xs .class-block-title strong { font-size: .66rem; line-height: 1; }
.class-block.duration-xs .class-block-time, .class-block.duration-xs .class-block-meta { display: none; }

/* Si hay varios solapes, también se compacta por anchura. */
.class-block.compact { padding-left: 7px; padding-right: 7px; }
.class-block.compact .class-block-title strong { font-size: min(.82rem, 2.1vw); }
.class-block.compact .class-block-time { font-size: .66rem; }
.class-block.compact .class-block-meta { font-size: .62rem; }
.class-block.very-compact { padding-left: 5px; padding-right: 5px; }
.class-block.very-compact .class-block-title strong { font-size: .7rem; }
.class-block.very-compact .class-block-time { font-size: .59rem; }
.class-block.very-compact .class-block-meta { display: none; }
.session-card { margin-top: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.session-card:first-child { margin-top: 0; }
.session-card .session-row { margin-top: 0; }
.session-period-row { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(145px,.6fr) minmax(145px,.6fr); gap: 9px; align-items: end; margin-top: 9px; }
.session-period-row p { grid-column: 2 / -1; margin: 0 0 10px; color: var(--text-2); font-size: .76rem; }
.fixed-evaluation { align-items: center; }
.fixed-evaluation > div:first-child { display: grid; gap: 3px; }
.fixed-evaluation > div:first-child small { font-weight: 500; }
.settings-hint.is-error { color: var(--danger); font-weight: 700; }

/* 0.21 · notas */
.current-grade { text-align: right; display: grid; gap: 1px; }
.current-grade small { font-size: .64rem; font-weight: 700; }
.current-grade strong { font-size: 1.65rem; line-height: 1; }
.target-calculator { margin: 0 0 17px; padding: 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--brand-softer); display: grid; grid-template-columns: minmax(0,1fr) 105px; gap: 10px 14px; align-items: center; }
.target-calculator > div { display: grid; gap: 2px; }
.target-calculator > div small { font-size: .72rem; }
.target-calculator label { grid-template-columns: 1fr; font-size: .7rem; }
.target-calculator input { padding-block: 8px; background: var(--surface); }
.target-result { grid-column: 1 / -1; margin: 0; color: var(--text); font-size: .82rem; font-weight: 700; }

/* 0.21 · perfil académico */
.education-form { margin-top: 4px; }
.education-stage { display: grid; gap: 14px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.education-catalog-grid, .education-manual-fields { display: grid; gap: 14px; }
.manual-toggle-row { display: flex; grid-template-columns: none; align-items: center; gap: 9px; font-size: .8rem; cursor: pointer; }
.manual-toggle-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.catalog-status { margin: 0; padding: 9px 11px; border-radius: 10px; background: var(--brand-softer); color: var(--text-2); font-size: .78rem; }
.catalog-status.is-error { background: var(--danger-soft); color: var(--danger); }

/* 0.21 · ajustes */
.settings-main-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.schedule-settings-box { padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); display: grid; gap: 11px; }
.time-setting-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.time-setting-list label { display: grid; gap: 6px; }
.time-setting-list label > span { font-size: .75rem; color: var(--text-2); }
.time-setting-list select { cursor: pointer; font-weight: 700; background-color: var(--surface); }
.settings-page .integration-actions { flex-wrap: wrap; }

/* contraste y tactilidad */
input, select, textarea { border-color: var(--line); }
select { cursor: pointer; }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--text-2) 72%, transparent); }
.panel { box-shadow: 0 7px 22px rgba(25,54,66,.045); }
.schedule-toolbar-actions { display: flex; align-items: end; gap: 10px; }
.schedule-toolbar-actions label { min-width: 180px; font-size: .7rem; color: var(--text-2); }
.schedule-toolbar-actions select { min-height: 42px; padding-block: 9px; }

/* 0.21.3 · periodos académicos */
.schedule-toolbar-actions { flex-wrap: wrap; justify-content: flex-end; }
.period-tabs { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-2); }
.period-tab { min-height: 36px; min-width: 54px; padding: 6px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text-2); display: grid; gap: 1px; place-items: center; cursor: pointer; font-weight: 800; }
.period-tab span { display: none; font-size: .62rem; font-weight: 650; color: inherit; }
.period-tab:hover { background: var(--surface); color: var(--text); }
.period-tab.active { background: var(--brand); color: #fff; box-shadow: 0 2px 7px rgba(22,90,115,.18); }
.period-settings-box .compact-heading { margin-bottom: 0; }
.period-count-field { max-width: 420px; }
.period-label-editor { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.period-label-editor label { display: grid; gap: 6px; }
.subject-meta-grid { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) 110px; }


/* 0.21.6 · refinado visual del horario */
.manual-entry-action { display: flex; justify-content: flex-start; padding-top: 2px; border-top: 1px solid var(--line); }
.manual-university-button { min-height: 38px; }
.feedback-panel { scroll-margin-top: 86px; }
.feedback-panel textarea { min-height: 118px; resize: vertical; }
.feedback-standalone { max-width: 820px; width: 100%; }


/* 0.21.9 · ajustes por pestañas */
.settings-page { width: 100%; min-width: 0; }
.settings-tabs-wrap { position: sticky; top: 82px; z-index: 8; width: 100%; min-width: 0; padding: 4px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(16px); box-shadow: 0 8px 24px rgba(25,54,66,.06); }
.settings-tabs { display: flex; gap: 4px; width: 100%; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.settings-tabs::-webkit-scrollbar { display: none; }
.settings-tab { flex: 1 0 auto; min-height: 40px; padding: 0 13px; border-radius: 11px; background: transparent; color: var(--text-2); font-size: .78rem; font-weight: 780; white-space: nowrap; }
.settings-tab:hover { background: var(--surface-2); color: var(--text); }
.settings-tab.active { background: var(--brand); color: #fff; box-shadow: 0 3px 10px rgba(22,90,115,.16); }
.settings-tab-panel { display: none; width: 100%; min-width: 0; gap: 18px; }
.settings-tab-panel.active { display: grid; }
.settings-tab-panel > .panel { width: 100%; min-width: 0; }
.settings-info-card { display: grid; gap: 9px; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); }
.settings-info-card p { margin: 0; }
.settings-info-card .secondary-button { justify-self: start; margin-top: 4px; }
.legal-settings-panel { display: grid; gap: 10px; }

/* 0.22.0 · sistema visual unificado
   Geometría común para acciones, tarjetas, mensajes y navegación secundaria. */
.panel {
  border-radius: var(--card-radius);
  padding: var(--card-padding);
  border-color: var(--line);
  box-shadow: 0 7px 22px rgba(25,54,66,.045);
}
.page-stack { gap: 18px; }
.section-heading { gap: var(--space-4); margin-bottom: var(--space-4); }
.section-heading > div { min-width: 0; }
.section-heading h2 { margin: 0; font-size: 1.08rem; line-height: 1.25; }
.section-heading small { margin-top: 4px; max-width: 760px; font-size: .78rem; line-height: 1.45; color: var(--text-2); }
.eyebrow { margin-bottom: 6px; font-size: .68rem; letter-spacing: .12em; }

/* Una sola familia de subpaneles: mismo radio, fondo, borde y espaciado. */
.schedule-settings-box,
.education-stage,
.editor-section,
.settings-info-card,
.session-card {
  border: 1px solid var(--line);
  border-radius: var(--subcard-radius);
  background: var(--surface-2);
  padding: var(--subcard-padding);
  box-shadow: none;
}
.schedule-settings-box,
.education-stage,
.settings-info-card { gap: var(--space-3); }
.settings-info-card p,
.catalog-status,
.settings-hint,
.modal-copy,
.empty-copy { line-height: 1.5; }
.settings-info-card > strong,
.schedule-settings-box > strong { font-size: .92rem; line-height: 1.3; }

/* Callouts: info, estado y error comparten proporciones. */
.catalog-status,
.settings-info-card .settings-hint {
  border-radius: var(--control-radius);
  font-size: .8rem;
}
.catalog-status { padding: 11px 13px; border: 1px solid color-mix(in srgb, var(--brand) 12%, var(--line)); }
.status-badge,
.sync-pill {
  min-height: 30px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: .7rem;
  line-height: 1;
  font-weight: 760;
}

/* Acciones: misma altura y separación en toda la app. */
.primary-button,
.secondary-button,
.danger-button,
.google-button { min-height: var(--control-height); }
.google-button { min-height: var(--control-height); border-color: var(--line); box-shadow: 0 1px 2px rgba(16,33,41,.04); }
.google-button:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: none; }
.manual-university-button { min-height: var(--control-height); }
.integration-actions,
.form-actions,
.row-actions { gap: var(--space-2); }
.integration-actions { margin: var(--space-4) 0 var(--space-2); align-items: center; flex-wrap: wrap; }
.form-actions { margin-top: 2px; }

/* Controles de selección pequeños (tabs) comparten la misma gramática visual. */
.period-tabs,
.settings-tabs-wrap {
  padding: 4px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-shadow: none;
}
.period-tabs { border-radius: var(--control-radius); }
.period-tab,
.settings-tab {
  min-height: var(--control-height-sm);
  border-radius: 9px;
  font-size: .78rem;
  font-weight: 780;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.period-tab.active,
.settings-tab.active { box-shadow: 0 2px 8px rgba(22,90,115,.15); }

/* Selecciones/checks/toggles alineados con los controles generales. */
.check-card {
  min-height: var(--control-height);
  border-radius: var(--control-radius);
  padding: 10px 11px;
  gap: 9px;
}
.custom-check { width: 20px; height: 20px; border-radius: 6px; }
.toggle-card {
  min-height: 58px;
  border-radius: var(--subcard-radius);
  padding: 12px 14px;
  gap: 12px;
  background: var(--surface);
}

/* Listas y tarjetas repetidas: radios y acciones coherentes. */
.subject-row { min-height: 64px; gap: 12px; }
.subject-row .secondary-button { min-height: var(--control-height); }
.event-card,
.grade-card,
.profile-header { border-radius: var(--card-radius); }
.mobile-class-card { border-radius: var(--control-radius); }

/* Legal como acciones de navegación homogéneas, no enlaces sueltos flotando. */
.legal-links { gap: 8px; }
.legal-links a {
  min-height: var(--control-height);
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 720;
  transition: border-color .14s ease, background .14s ease, color .14s ease;
}
.legal-links a:hover { background: var(--surface-2); border-color: color-mix(in srgb,var(--brand) 45%,var(--line)); color: var(--brand-strong); }

/* Modales usan la misma escala que las tarjetas principales. */
.modal-card { border-radius: var(--card-radius); padding: var(--card-padding); }
.modal-actions { gap: var(--space-2); }


/* 0.22.1 · geometría estricta de controles y ajustes */
.settings-panel .form-stack { gap: 16px; }
.settings-panel label { font-size: .84rem; font-weight: 760; gap: 8px; }
.settings-control-grid,
.settings-main-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
}
.period-structure-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.period-label-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.period-label-editor label,
.period-structure-grid label,
.settings-control-grid label,
.time-setting-list label { min-width: 0; }
.schedule-settings-box {
  padding: var(--subcard-padding);
  border-radius: var(--subcard-radius);
  gap: 14px;
  background: color-mix(in srgb, var(--surface-2) 88%, var(--surface));
}
.schedule-settings-box > strong,
.period-settings-box .compact-heading strong { font-size: 1rem; font-weight: 820; }
.period-settings-box .compact-heading { margin-bottom: 0; }
.period-settings-box .compact-heading small { margin-top: 5px; }
.time-setting-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.time-setting-list label { display: grid; gap: 8px; }
.time-setting-list label > span { color: var(--text); font-size: .84rem; font-weight: 760; }
.time-setting-list select { height: var(--control-height); min-height: var(--control-height); font-weight: 680; }
.settings-panel input:not([type="checkbox"]):not([type="radio"]):not([type="color"]),
.settings-panel select { height: var(--control-height); min-height: var(--control-height); }
.settings-panel .check-grid { grid-template-columns: repeat(7, minmax(0,1fr)); gap: 10px; }
.settings-panel .check-card {
  min-height: var(--control-height);
  height: var(--control-height);
  padding: 0 12px;
  border-radius: var(--control-radius);
  grid-template-columns: 20px minmax(0,1fr);
  gap: 9px;
}
.settings-panel .toggle-card { min-height: 62px; border-radius: var(--subcard-radius); }
.settings-panel .form-actions { padding-top: 2px; }
.settings-panel .form-actions .primary-button { min-width: 148px; }

/* 0.22.4 · paleta de asignaturas */
.subject-color-picker {
  display: grid;
  gap: 13px;
  padding: var(--subcard-padding, 14px);
  border: 1px solid var(--line);
  border-radius: var(--subcard-radius, 14px);
  background: var(--surface-2);
}
.subject-color-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.subject-color-heading > div { display: grid; gap: 3px; }
.subject-color-heading strong { font-size: .9rem; }
.subject-color-heading small { color: var(--text-2); font-size: .74rem; }
.subject-color-current {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: var(--subject-preview);
  border: 1px solid color-mix(in srgb, var(--text) 12%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 2px 7px rgba(16,33,41,.06);
}
.subject-color-palette {
  display: grid;
  grid-template-columns: repeat(8, 34px);
  gap: 9px;
  align-items: center;
}
.subject-color-swatch {
  appearance: none;
  -webkit-appearance: none;
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 11px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .14s ease, border-color .14s ease, box-shadow .14s ease;
}
.subject-color-swatch span {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--swatch);
  border: 1px solid color-mix(in srgb, var(--text) 9%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.subject-color-swatch:hover { transform: translateY(-1px); }
.subject-color-swatch.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 13%, transparent);
}
.subject-custom-color-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.subject-custom-color-row small { color: var(--text-2); font-size: .72rem; }
.subject-custom-color-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}
.subject-custom-color-button { min-width: 170px; }

@media (max-width: 720px) {
  .subject-color-palette { grid-template-columns: repeat(5, 34px); gap: 8px; }
  .subject-color-heading { align-items: flex-start; }
  .subject-custom-color-button { width: 100%; }
}

/* 0.23.0 · Focus */
.focus-page { gap: 18px; }
.focus-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: linear-gradient(135deg, color-mix(in srgb, var(--brand-soft) 72%, var(--surface)), var(--surface) 62%); }
.focus-hero-copy { max-width: 720px; }
.focus-hero h1 { margin-bottom: 8px; }
.focus-hero p:last-child { margin-bottom: 0; }
.focus-mode-badge { flex: 0 0 auto; min-height: 38px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: var(--brand); color: #fff; font-size: .78rem; font-weight: 820; }
.focus-mode-badge.break { background: color-mix(in srgb, var(--success) 86%, var(--brand)); }
.focus-main-grid { display: grid; grid-template-columns: minmax(420px, 1.35fr) minmax(300px, .85fr); gap: 18px; align-items: stretch; }
.focus-timer-card { min-height: 520px; display: grid; grid-template-rows: auto auto auto auto 1fr; align-content: start; justify-items: center; gap: 18px; padding: 24px; }
.focus-timer-topline { width: 100%; display: flex; align-items: center; justify-content: space-between; color: var(--text-2); font-size: .74rem; font-weight: 760; }
.focus-ring { --focus-progress: 0deg; width: min(290px, 72vw); aspect-ratio: 1; border-radius: 50%; padding: 13px; display: grid; place-items: center; background: conic-gradient(var(--brand) var(--focus-progress), color-mix(in srgb, var(--brand-soft) 70%, var(--line)) 0); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 8%, var(--line)), 0 16px 34px rgba(25,54,66,.08); }
.focus-ring-inner { width: 100%; height: 100%; border-radius: 50%; background: var(--surface); display: grid; place-items: center; align-content: center; gap: 8px; border: 1px solid color-mix(in srgb, var(--brand) 10%, var(--line)); }
.focus-ring-inner strong { font-size: clamp(3rem, 6vw, 4.6rem); line-height: .95; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.focus-ring-inner span { color: var(--text-2); font-size: .8rem; font-weight: 760; }
.focus-subject-field { width: min(420px, 100%); }
.focus-subject-field select:disabled { opacity: .72; }
.focus-actions { width: 100%; display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }
.focus-actions .primary-button { min-width: 150px; }
.focus-break-message { width: min(430px, 100%); min-height: 72px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--subcard-radius); background: var(--surface-2); display: grid; align-content: center; gap: 4px; text-align: center; }
.focus-break-message span { color: var(--text-2); font-size: .8rem; }
.focus-no-subjects { text-align: center; }
.focus-stats-column { display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.focus-stat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.focus-stat { min-height: 128px; display: grid; align-content: center; gap: 4px; padding: 18px; }
.focus-stat > span { color: var(--text-2); font-size: .72rem; font-weight: 760; }
.focus-stat strong { font-size: 1.55rem; line-height: 1.05; letter-spacing: -.03em; }
.focus-stat small { font-size: .7rem; }
.focus-most-studied { min-height: 160px; display: grid; align-content: center; gap: 5px; background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--brand-soft) 46%, var(--surface))); }
.focus-most-studied .eyebrow { margin-bottom: 5px; }
.focus-most-studied strong { font-size: 1.18rem; }
.focus-most-studied span { color: var(--text-2); font-size: .8rem; }
.focus-week-panel .section-heading { align-items: center; }
.focus-week-chart { height: 230px; display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 12px; align-items: end; padding: 24px 8px 4px; border-top: 1px solid var(--line); }
.focus-day-bar { height: 100%; min-width: 0; display: grid; grid-template-rows: 22px minmax(0,1fr) 20px; align-items: end; justify-items: center; gap: 5px; }
.focus-day-bar > span { color: var(--text-2); font-size: .6rem; white-space: nowrap; opacity: 0; transition: opacity .15s ease; }
.focus-day-bar:hover > span { opacity: 1; }
.focus-day-bar i { width: min(34px, 68%); height: var(--bar-height); min-height: 4px; border-radius: 10px 10px 5px 5px; background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 84%, white), var(--brand)); box-shadow: 0 5px 12px rgba(22,90,115,.12); }
.focus-day-bar b { color: var(--text-2); font-size: .68rem; }
.focus-history { display: grid; }
.focus-history article { min-height: 58px; display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 12px; align-items: center; border-top: 1px solid var(--line); }
.focus-history article:first-child { border-top: 0; }
.focus-history-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.focus-history article > div { display: grid; gap: 2px; }
.focus-history article strong { font-size: .84rem; }
.focus-history article small { font-size: .7rem; }
.focus-history-status { padding: 5px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--text-2); background: var(--surface-2); font-size: .66rem; font-weight: 760; }
.focus-history-status.complete { color: var(--success); border-color: color-mix(in srgb, var(--success) 26%, var(--line)); background: color-mix(in srgb, var(--success) 8%, var(--surface)); }
.focus-settings-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }

.mobile-more-menu { display: none; }
.nav-item.nav-focus span { font-size: 1.16rem; }

/* 0.23.1 · aviso sonoro Focus */
.focus-sound-settings { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(260px,.65fr); gap: var(--space-3); align-items: stretch; }
.focus-sound-toggle { min-height: var(--control-height); }
.focus-sound-toggle > span:last-child strong { font-size: .84rem; line-height: 1.25; }
.focus-sound-toggle > span:last-child small { color: var(--text-2); line-height: 1.35; }
.focus-sound-controls { display: grid; grid-template-columns: minmax(130px,1fr) auto; gap: var(--space-3); align-items: end; }
.focus-sound-preview { white-space: nowrap; }
.focus-sound-controls select:disabled, .focus-sound-preview:disabled { opacity: .48; cursor: not-allowed; }


/* 0.23.2 · alarma Focus */
.focus-alarm-hint {
  width: min(430px, 100%);
  margin: -4px auto 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 22%, var(--line));
  border-radius: var(--subcard-radius);
  background: color-mix(in srgb, var(--brand-soft) 56%, var(--surface));
  color: var(--text);
  text-align: center;
  font-size: .74rem;
  line-height: 1.4;
}

/* 0.24.0 · Notificaciones */
.notifications-settings-panel { display: grid; gap: var(--space-4); }
.notification-permission-card,
.notification-section,
.notification-reminder-card,
.notification-inline-card {
  border: 1px solid var(--line);
  border-radius: var(--subcard-radius);
  background: var(--surface-2);
}
.notification-permission-card {
  min-height: 92px;
  padding: var(--subcard-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.notification-permission-card > div:first-child { display: grid; gap: 5px; min-width: 0; }
.notification-permission-card p { margin: 0; color: var(--text-2); font-size: .8rem; line-height: 1.45; }
.notification-permission-actions { display: flex; gap: var(--space-2); flex: 0 0 auto; }
.status-badge.warning { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 24%, var(--line)); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.notification-settings-form { gap: var(--space-4); }
.notification-section { padding: var(--subcard-padding); display: grid; gap: var(--space-3); }
.notification-section-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.notification-section-heading > div { display: grid; gap: 3px; }
.notification-section-heading > div > strong { font-size: .94rem; }
.notification-section-heading small { color: var(--text-2); font-size: .76rem; line-height: 1.4; }
.notification-toggle-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3); }
.notification-reminder-card { padding: 12px; display: grid; grid-template-columns: minmax(270px, .9fr) minmax(360px, 1.1fr); gap: var(--space-3); align-items: stretch; background: var(--surface); }
.notification-reminder-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--space-3); align-items: end; }
.notification-inline-card { padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) minmax(180px, 230px); gap: var(--space-3); align-items: stretch; background: var(--surface); }
.notification-inline-card > .settings-field { align-self: center; }
.notification-master-toggle { height: 100%; min-height: 62px; }
.notification-runtime-note { margin-top: 2px; }
.notification-reminder-card select:disabled,
.notification-inline-card select:disabled { opacity: .48; cursor: not-allowed; }

/* 0.24.1 · Administración privada y analítica de producto */
.nav-item.nav-admin { margin-top: 4px; }
.nav-item.nav-admin span { font-size: 1.02rem; }
.nav-item.nav-admin.active { background: color-mix(in srgb, var(--brand) 14%, var(--surface)); }
.admin-page { gap: 18px; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); }
.admin-toolbar small { max-width: 760px; }
.admin-dashboard { display: grid; gap: 18px; }
.admin-loading { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--text-2); }
.admin-metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.admin-metric { min-height: 128px; padding: 18px; display: grid; align-content: center; gap: 5px; }
.admin-metric > span { color: var(--text-2); font-size: .72rem; font-weight: 780; }
.admin-metric strong { font-size: 1.75rem; line-height: 1; letter-spacing: -.035em; }
.admin-metric small { color: var(--text-2); font-size: .7rem; }
.admin-panel-wide { overflow: hidden; }
.admin-two-col { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.admin-three-col { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.admin-progress-list { display: grid; gap: 15px; }
.admin-progress-row { display: grid; gap: 7px; }
.admin-progress-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-progress-row strong { font-size: .8rem; }
.admin-progress-row span { color: var(--text-2); font-size: .68rem; text-align: right; }
.admin-progress-track { height: 8px; border-radius: 999px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.admin-progress-track i { display: block; width: var(--progress); height: 100%; min-width: 3px; border-radius: inherit; background: var(--brand); }
.admin-trend { height: 240px; display: grid; grid-template-columns: repeat(30, minmax(8px,1fr)); gap: 5px; align-items: end; padding: 22px 2px 2px; border-top: 1px solid var(--line); }
.admin-trend-day { height: 100%; min-width: 0; display: grid; grid-template-rows: 18px minmax(0,1fr) 18px; gap: 4px; align-items: end; justify-items: center; }
.admin-trend-day span { color: var(--text-2); font-size: .58rem; opacity: 0; }
.admin-trend-day:hover span { opacity: 1; }
.admin-trend-day i { width: min(20px, 80%); height: var(--height); min-height: 2px; border-radius: 7px 7px 3px 3px; background: var(--brand); opacity: .86; }
.admin-trend-day b { min-height: 14px; color: var(--text-2); font-size: .53rem; font-weight: 680; writing-mode: vertical-rl; transform: rotate(180deg); }
.admin-focus-summary { background: linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--brand-soft) 32%, var(--surface))); }
.admin-inline-metrics { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.admin-inline-metrics > div { min-height: 88px; padding: 13px; border: 1px solid var(--line); border-radius: var(--subcard-radius); background: var(--surface); display: grid; align-content: center; gap: 4px; }
.admin-inline-metrics span { color: var(--text-2); font-size: .67rem; font-weight: 720; }
.admin-inline-metrics strong { font-size: 1.18rem; }
.admin-health-list { display: grid; }
.admin-health-list > div { min-height: 50px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.admin-health-list > div:first-child { border-top: 0; }
.admin-health-list span { color: var(--text-2); font-size: .76rem; }
.admin-health-list strong { font-size: .9rem; }
.admin-feedback-list { display: grid; }
.admin-feedback-list article { padding: 14px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.admin-feedback-list article:first-child { border-top: 0; padding-top: 0; }
.admin-feedback-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-feedback-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.admin-feedback-delete { min-height: 32px; padding: 0 11px; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--line)); border-radius: 10px; background: color-mix(in srgb, var(--danger) 8%, var(--surface)); color: var(--danger); font: inherit; font-size: .68rem; font-weight: 760; cursor: pointer; flex: 0 0 auto; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.admin-feedback-delete:hover { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); border-color: color-mix(in srgb, var(--danger) 55%, var(--line)); transform: translateY(-1px); }
.admin-feedback-delete:disabled { opacity: .55; cursor: wait; transform: none; }
.admin-feedback-delete:focus-visible { outline: 3px solid color-mix(in srgb, var(--danger) 24%, transparent); outline-offset: 2px; }
.admin-feedback-list time, .admin-feedback-list small { color: var(--text-2); font-size: .67rem; }
.admin-feedback-list p { margin: 0; font-size: .8rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-empty { margin: 0; color: var(--text-2); font-size: .8rem; }
.admin-privacy-note { padding: 13px 15px; border: 1px solid color-mix(in srgb, var(--brand) 20%, var(--line)); border-radius: var(--subcard-radius); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); color: var(--text-2); font-size: .76rem; line-height: 1.45; }
.admin-error { border-color: color-mix(in srgb, var(--danger) 30%, var(--line)); }

/* Avatares y horarios compartidos · 0.26.0 */
.avatar-grid { display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:12px; }
.avatar-choice { position:relative;display:flex;align-items:center;flex-direction:column;gap:8px;min-width:0;padding:12px 6px;background:var(--surface);border:2px solid var(--line);border-radius:16px;color:var(--text);font-weight:650;cursor:pointer; }
.avatar-choice img { width:min(100%,80px);height:auto;aspect-ratio:1; }
.avatar-choice[aria-pressed="true"] { border-color:var(--brand-strong);background:var(--brand-soft); }
.avatar-choice b { display:none;position:absolute;top:5px;right:5px;width:22px;height:22px;align-items:center;justify-content:center;border-radius:50%;background:var(--brand-strong);color:var(--surface);font-size:13px; }
.avatar-choice[aria-pressed="true"] b { display:flex; }
.avatar-choice:focus-visible { outline:3px solid var(--brand-strong);outline-offset:3px; }
.avatar-status:empty { display:none; }
.share-modal { display:flex;flex-direction:column;gap:14px; }
.share-image-frame { overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff; }
.share-image-frame img { display:block;width:100%;height:auto; }
.share-image-frame img:not([src]) { display:none; }
.share-actions { display:flex;align-items:center;gap:10px;flex-wrap:wrap; }
.share-actions[hidden] { display:none; }
.schedule-copy-permission { display:grid;gap:8px; }
.schedule-copy-permission label { display:flex;align-items:center;gap:12px;cursor:pointer; }
.schedule-copy-permission input { width:20px;height:20px;flex:0 0 20px;accent-color:var(--brand-strong); }
.schedule-copy-permission small { color:var(--text-2); }
.import-summary { margin-top:18px;padding:18px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);display:grid;gap:12px; }
.import-summary ul { margin:0;padding-left:20px; }
#import-review[hidden] { display:none; }
@media (max-width:1000px) { .avatar-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:520px) {
  .avatar-grid { gap:8px; }
  .avatar-choice { font-size:.75rem;padding:10px 4px; }
  .avatar-choice b { width:18px;height:18px;top:2px;right:2px; }
  .share-actions > button,.share-actions > a { flex:1 1 140px; }
}

.share-actions > [hidden] { display:none; }

.agenda-note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.agenda-editor textarea { resize: vertical; }

.event-create-actions { flex-wrap: wrap; }

.help-tour {
  display: grid;
  grid-template-columns: minmax(220px, .72fr) minmax(0, 1.65fr);
  align-items: start;
  gap: clamp(12px, 1.8vw, 26px);
  padding: clamp(12px, 1.8vw, 26px);
  border-radius: 26px;
  --help-ink: #0c3546;
  --help-accent: color-mix(in srgb, var(--brand) 75%, #123a4d);
  background: radial-gradient(ellipse at 90% 0%, var(--help-accent), transparent 75%), var(--help-ink);
}
.help-guide.panel {
  position: sticky;
  top: 84px;
  min-width: 0;
  padding: clamp(4px, 1vw, 16px);
  border: 0;
  box-shadow: none;
  background: transparent;
  color: #f6fbff;
}
.help-guide.page-stack { gap: 12px; }
.help-guide h1, .help-guide p, .help-guide ol { margin: 0; }
.help-guide h1 { color: inherit; font-size: clamp(1.65rem, 3vw, 2.65rem); line-height: 1.05; }
.help-guide h1:focus { outline: none; }
.help-guide p { color: #e1f0f7; font-size: 1rem; }
.help-guide ol { padding-inline-start: 1.3em; }
.help-guide li + li { margin-top: 8px; }
.help-guide-heading { display: flex; justify-content: space-between; gap: 8px; }
.help-guide-heading a, .help-guide-heading small { color: #d4eaf5; }
.help-guide label { color: inherit; }
.help-guide select { max-width: 100%; }
.help-controls { flex-wrap: wrap; gap: 8px; }
.help-controls a { padding-inline: 12px; }
.help-controls a.primary-button,
.help-controls a.primary-button:hover,
.help-controls a.primary-button:focus-visible {
  background: #c3e8f6;
  border-color: #c3e8f6;
  color: var(--help-ink);
}
.help-controls a.primary-button:hover { background: #e3f5fc; }
.help-live-screen {
  container: help-screen / inline-size;
  min-width: 0;
  padding: clamp(10px, 2vw, 22px);
  border-radius: 19px;
  background: var(--surface);
}
.help-highlight { outline: 2px solid var(--brand); outline-offset: 3px; }
.help-install-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 12px; }
.help-install-grid h2 { margin: 0; font-size: 1.1rem; }
@media (min-width: 951px) {
  .help-live-screen {
    max-height: max(280px, calc(100dvh - 150px));
    overflow: auto;
  }
}
@media (min-width: 951px) and (max-height: 800px) {
  .help-tour { gap: 12px; padding: 12px; }
  .help-guide.panel { position: static; padding: 6px; }
  .help-guide.page-stack { gap: 8px; }
  .help-guide h1 { font-size: 1.8rem; }
  .help-guide ol { font-size: .9rem; }
  .help-guide li + li { margin-top: 4px; }
}
@media (max-width: 950px) {
  .help-tour { grid-template-columns: minmax(0, 1fr); }
  .help-guide.panel { position: static; }
}
@media (max-width: 600px) {
  .help-tour { padding: 12px; border-radius: 18px; }
  .help-live-screen { padding: 8px; }
}

.help-live-screen .focus-subject-field select { min-width: 0; max-width: 100%; }
.help-live-screen .focus-ring { max-width: 100%; }
.help-live-screen .focus-most-studied { overflow-wrap: anywhere; }

@container help-screen (width < 738px) {
  .help-live-screen .focus-main-grid { grid-template-columns: minmax(0, 1fr); }
  .help-live-screen .focus-timer-card { min-height: 0; }
  .help-live-screen .focus-stats-column { grid-template-columns: minmax(0, 1fr); }
}
@container help-screen (width < 460px) {
  .help-live-screen .focus-hero { flex-direction: column; align-items: flex-start; }
  .help-live-screen .focus-ring-inner strong { font-size: clamp(2rem, 14cqw, 4rem); }
  .help-live-screen .focus-week-panel .section-heading { flex-wrap: wrap; }
}

.help-live-screen :is(.check-card, .toggle-card) input[type="checkbox"] {
  inline-size: 1px;
  block-size: 1px;
  min-block-size: 0;
  padding: 0;
}

@container help-screen (width < 460px) {
  .help-live-screen :is(.period-structure-grid, .period-label-editor, .settings-control-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
  .help-live-screen .settings-panel .check-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
