/* El lenguaje visual de Foco iOS: tipografía del sistema, fondo claro con un
   tinte de agua, superficies blancas redondeadas, botones píldora y la foca. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color: #1c2633;
  background: #f4f7fb;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --bg: #f4f7fb;
  --surface: #fff;
  --title: #16294a;
  --accent: #2b61a8;
  --accent-dark: #204e8c;
  --fill: #e6eefa;
  --rule: #dfe6f0;
  --muted: #627086;
  --danger: #a8392f;
  --shadow: 0 4px 18px rgba(22, 41, 74, 0.05);
  --shadow-float: 0 8px 28px rgba(22, 41, 74, 0.12);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 100% 0, #e4effb 0, transparent 70%),
    radial-gradient(800px 600px at 0 100%, #e8f1fc 0, transparent 70%),
    var(--bg);
  background-attachment: fixed;
}
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
a { color: var(--accent); }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #7eabd9;
  outline-offset: 3px;
}
button {
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 10px 16px;
  border-radius: 999px;
  min-height: 44px;
  font-weight: 500;
}
button:disabled { cursor: not-allowed; opacity: 0.5; }
button:hover { background: #e3ebf7; }
button.primary { color: #fff; background: var(--accent); padding: 12px 26px; box-shadow: 0 6px 18px rgba(43, 97, 168, 0.22); }
button.primary:hover { background: var(--accent-dark); }
button.quiet { background: var(--surface); box-shadow: inset 0 0 0 1.5px #d3ddec; padding: 12px 22px; }
button.quiet:hover { background: #f1f5fb; }
button.danger { color: var(--danger); }
.small { font-size: 0.875rem; }
.muted, small { color: var(--muted); }
small { font-size: 0.875rem; line-height: 1.5; }
h1, h2, h3, h4 { color: var(--title); font-weight: 600; margin-top: 0; }
h1 { font-size: clamp(1.8rem, 2.6vw, 2.2rem); line-height: 1.12; letter-spacing: -0.022em; margin-bottom: 14px; }
h2 { font-size: 1.45rem; letter-spacing: -0.015em; }
h3 { font-size: 1.1rem; }
p { line-height: 1.55; margin: 0 0 18px; }
label { display: grid; gap: 9px; color: var(--title); line-height: 1.4; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--title);
  border-radius: 16px;
  padding: 13px 16px;
  min-width: 0;
  font-size: 1rem;
}
input::placeholder, textarea::placeholder { color: #a3aebf; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); padding: 0; }
input[type="color"] { height: 48px; padding: 5px; }
textarea { resize: vertical; min-height: 100px; line-height: 1.5; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 10px; }
.fields { display: grid; gap: 20px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.row { display: flex; align-items: center; gap: 12px; }
.spread { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; min-height: 36px; background: var(--surface); color: var(--accent); border-radius: 999px; font-size: 0.875rem; box-shadow: var(--shadow); }
.ochre { color: #92501e; background: #f6e9d8; box-shadow: none; }
.dot { width: 7px; height: 7px; background: currentColor; border-radius: 50%; }
.icon { width: 21px; height: 21px; flex-shrink: 0; }

/* La foca y el agua (foca.mjs) */
foco-foca { display: inline-block; width: 96px; aspect-ratio: 1; flex-shrink: 0; vertical-align: middle; }
foco-foca > canvas { display: block; width: 100%; height: 100%; }
foco-agua { display: block; position: relative; overflow: hidden; }
foco-agua > canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
foco-agua > :not(canvas) { position: relative; }
.bubble {
  position: relative;
  display: inline-block;
  margin: 0;
  padding: 14px 24px;
  background: var(--surface);
  color: var(--title);
  border: 1.5px solid #cfe0f6;
  border-radius: 26px;
  font-size: 1.15rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.35;
  box-shadow: var(--shadow);
}
.bubble::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -8px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  background: var(--surface);
  border-left: 1.5px solid #cfe0f6;
  border-top: 1.5px solid #cfe0f6;
  transform: rotate(45deg);
}

/* Estructura */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 16px;
  height: calc(100vh - 32px);
  margin: 16px 0 16px 16px;
  padding: 22px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(18px);
  border-radius: 30px;
  box-shadow: var(--shadow);
  overflow-y: auto;
}
.brand { font-size: 50px; font-weight: 600; letter-spacing: -0.03em; display: flex; align-items: center; gap: 6px; color: var(--title); padding: 0 8px; text-decoration: none; }
.brand foco-marca { display: block; line-height: 0; }
.brand .marca { display: block; height: 0.77em; width: 2.18em; }
.sidebar nav { display: grid; gap: 4px; }
.navitem { display: flex; align-items: center; text-align: left; gap: 12px; padding: 8px 12px 8px 8px; width: 100%; color: #1c2633; font-size: 1rem; line-height: 1.2; }
.navitem .icon { width: 34px; height: 34px; padding: 8px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 25%, #5b8ccb, #2b61a8 55%, #1d4682); }
.navitem.active { color: var(--accent); background: #e8ecf2; font-weight: 600; }
.side-bottom { margin-top: auto; display: grid; gap: 2px; }
.side-bottom .navitem { color: var(--muted); font-size: 0.94rem; padding: 6px 12px 6px 8px; }
.side-bottom .navitem .icon { width: 30px; height: 30px; padding: 6px; color: var(--accent); background: var(--fill); }
.side-bottom .navitem.active { color: var(--accent); }
/* En la computadora, Memoria, Mi ritual y Configuración son íconos en fila */
@media (min-width: 641px) {
  .side-bottom { display: flex; gap: 8px; padding: 0 8px; }
  .side-bottom .navitem { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; }
  .side-bottom .navitem .icon { width: 40px; height: 40px; padding: 10px; }
  .side-bottom .navitem.active { background: none; }
  .side-bottom .navitem.active .icon { color: #fff; background: var(--accent); }
  .side-bottom .navitem span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
.workspace { min-width: 0; }
.topbar { height: 68px; display: flex; align-items: center; justify-content: flex-end; gap: 16px; padding: 0 44px; }
/* Estado de la extensión y cuenta: vidrio claro con borde fino */
.top-actions { display: flex; align-items: center; gap: 8px; }
.status-chip, .account-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; font-size: 0.875rem; font-weight: 500; background: rgba(255, 255, 255, 0.62); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(22, 41, 74, 0.08), 0 1px 2px rgba(22, 41, 74, 0.04); }
.status-chip:hover, .account-chip:hover { background: rgba(255, 255, 255, 0.92); }
.status-chip { padding: 6px 16px 6px 14px; color: var(--muted); }
.status-chip .dot { width: 8px; height: 8px; }
.status-chip.ok .dot { color: #3f9a70; box-shadow: 0 0 0 3px rgba(63, 154, 112, 0.18); }
.status-chip:is(.off, .error) { color: var(--danger); }
.status-chip:is(.off, .error) .dot { color: var(--danger); box-shadow: 0 0 0 3px rgba(168, 57, 47, 0.18); }
.account-chip { padding: 4px 16px 4px 4px; color: var(--title); }
.account-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: #fff; background: radial-gradient(circle at 35% 25%, #5b8ccb, #2b61a8 55%, #1d4682); }
.account-mark .icon { width: 16px; height: 16px; }
.content { padding: 26px 44px 60px; max-width: 980px; margin: auto; }

/* Companion */
.chat-layout { max-width: 760px; margin: 0 auto; }
.chat-main { min-height: calc(100vh - 170px); display: flex; flex-direction: column; min-width: 0; }
.welcome { margin: auto; padding: 20px 0 30px; text-align: center; display: flex; flex-direction: column; align-items: center; width: 100%; }
.welcome foco-foca { width: 150px; margin-bottom: 8px; }
.welcome h1 { max-width: 560px; }
.welcome p { color: var(--muted); max-width: 460px; font-size: 1.05rem; }
.suggestions { display: grid; gap: 10px; margin-top: 18px; width: min(100%, 480px); }
.suggestions button { display: flex; justify-content: space-between; align-items: center; text-align: left; padding: 14px 20px; gap: 18px; background: var(--surface); box-shadow: var(--shadow); border-radius: 22px; }
.suggestions button:hover { background: #f1f5fb; }
.composer { background: var(--surface); border: 1px solid var(--rule); border-radius: 28px; padding: 16px 18px 12px; margin-top: 22px; box-shadow: var(--shadow); }
.composer textarea { background: none; border: 0; border-radius: 8px; padding: 2px 4px; min-height: 54px; max-height: 240px; outline-offset: 6px; }
.composer-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.composer-foot [data-action="voice"] { width: 44px; padding: 0; display: grid; place-items: center; background: var(--fill); }
.composer-note { text-align: center; font-size: 0.75rem; color: var(--muted); margin-top: 12px; }
.messages { display: flex; flex-direction: column; gap: 6px; }
.message { max-width: 720px; line-height: 1.6; padding: 10px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 1.04rem; }
.message.user { align-self: flex-end; background: var(--surface); border: 1px solid var(--rule); padding: 13px 18px; border-radius: 22px; max-width: 85%; margin: 14px 0; }
.message.actionResult { font-size: 0.9rem; color: var(--accent); background: var(--fill); padding: 10px 16px; border-radius: 16px; align-self: flex-start; }
.proposal { border: 1px solid var(--rule); border-radius: 26px; padding: 22px; margin: 12px 0; background: var(--surface); box-shadow: var(--shadow); }
.proposal h3 { margin: 0 0 12px; font-weight: 500; font-size: 1.2rem; }
.proposal p { overflow-wrap: anywhere; }
.proposal ul { padding-left: 20px; line-height: 1.6; }

/* Secciones y listas */
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.intro { max-width: 630px; color: var(--muted); font-size: 1.05rem; }
.section { margin-top: 36px; }
.list { margin-top: 14px; display: grid; gap: 10px; }
.list-item { padding: 18px 22px; background: var(--surface); border-radius: 20px; box-shadow: 0 1px 3px rgba(22, 41, 74, 0.05); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.list-item h3 { margin: 0 0 6px; }
.list-item p { margin: 0; }
.empty { padding: 26px 0; color: var(--muted); max-width: 550px; line-height: 1.6; }
.notice { border-radius: 22px; background: var(--fill); padding: 16px 20px; color: #3a4d6b; line-height: 1.55; margin: 18px 0; }
.notice.warn { background: #f6eddc; color: #825324; }
.notice.error { background: #fbeceb; color: var(--danger); }
.duration { font-size: 4.6rem; font-weight: 600; color: var(--title); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; line-height: 1.1; margin: 24px 0; }
.duration small { font-size: 1.1rem; font-weight: 400; letter-spacing: 0; margin-left: 12px; }
.choice { display: flex; gap: 8px; flex-wrap: wrap; }
.choice button { background: var(--surface); box-shadow: inset 0 0 0 1.5px #d3ddec; }
.choice button.selected { background: var(--accent); color: #fff; box-shadow: none; }
/* Foco: el rato vive en el agua de la app */
.focus-hero { min-height: 500px; border-radius: 32px; background: linear-gradient(180deg, #f2f7fd, #e6effa); box-shadow: var(--shadow-float); }
.focus-hero-top { padding: 40px 44px 0; }
.focus-hero-top h1 { margin-bottom: 6px; }
.focus-hero-top p { color: var(--muted); margin: 0; }
.focus-hero-water { position: absolute; left: 44px; right: 44px; bottom: 32px; display: grid; gap: 18px; justify-items: start; color: #fff; }
.focus-hero .duration { color: #fff; font-size: 5rem; line-height: 1; margin: 0; }
.focus-hero .duration small { color: rgba(255, 255, 255, 0.75); font-size: 1.05rem; }
.focus-hero p.small { margin: 0; color: rgba(255, 255, 255, 0.7); }
.duration-choice { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, 0.14); backdrop-filter: blur(8px); }
.duration-choice button { min-height: 38px; padding: 6px 16px; color: rgba(255, 255, 255, 0.88); font-variant-numeric: tabular-nums; }
.duration-choice button:hover { background: rgba(255, 255, 255, 0.14); }
.duration-choice button.selected { background: #fff; color: var(--title); }
button.on-water { background: #fff; color: var(--title); padding: 12px 26px; font-weight: 600; box-shadow: 0 6px 18px rgba(10, 25, 50, 0.25); }
button.on-water:hover { background: #eef3fa; }
button.on-water-quiet { color: #fff; padding: 12px 22px; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.4); }
button.on-water-quiet:hover { background: rgba(255, 255, 255, 0.12); }
/* Sesión en marcha: el mismo agua, que baja a medida que pasa el tiempo. */
.focus-hero.live { min-height: 600px; }
.focus-hero.live .focus-hero-water { gap: 14px; }
.focus-hero.live h1 { color: #fff; margin: 0; font-size: 1.6rem; letter-spacing: -0.02em; }
.focus-hero.live .duration { margin: 4px 0 6px; }
.focus-hero.live > .water-clip { position: absolute; width: 0; height: 0; }
.focus-hero.live > .live-dry, .focus-hero.live > .live-wet { position: absolute; inset: 0; }
.focus-hero.live > .live-wet { clip-path: url(#session-water-clip); pointer-events: none; }
.live-dry .focus-hero-water, .focus-hero.live .live-dry h1, .focus-hero.live .live-dry .duration { color: var(--title); }
.focus-hero.live .live-dry .duration small { color: var(--muted); }
.live-dry button.on-water { background: var(--accent); color: #fff; box-shadow: var(--shadow-float); }
.live-dry button.on-water:hover { background: var(--title); }
.live-dry button.on-water-quiet { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.live-dry button.on-water-link { color: var(--accent); }
.live-dry button.on-water-quiet:hover, .live-dry button.on-water-link:hover { background: var(--fill); }
.live-exit { display: inline-flex; align-items: center; gap: 2px; }
button.on-water-link { color: rgba(255, 255, 255, 0.72); padding: 6px 10px; font-size: 0.9rem; }
button.on-water-link:hover { color: #fff; background: rgba(255, 255, 255, 0.1); }
.focus-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 40px; }
.focus-columns .section-head { align-items: center; margin-bottom: 14px; }
.focus-columns h2 { font-size: 1.15rem; margin: 0; }
.focus-columns .empty { padding: 4px 0; }
.site-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.site-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; background: var(--surface); color: var(--title); font-weight: 400; box-shadow: 0 1px 3px rgba(22, 41, 74, 0.06); }
.site-chip:hover { background: #f1f5fb; }
.site-chip.off { opacity: 0.5; }
.site-logo { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-size: 0.8125rem; font-weight: 600; flex-shrink: 0; }
.site-logo svg { display: block; width: 100%; height: 100%; }
.schedule-row { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rule); }
.schedule-row.off { opacity: 0.6; }
.schedule-row h3 { font-size: 1rem; font-weight: 500; margin: 0 0 2px; }
.schedule-row > .row { grid-column: 1 / -1; gap: 4px; }
.schedule-row > .row button { min-height: 32px; padding: 4px 10px; font-size: 0.875rem; }
.schedule-row > .row button:first-child { margin-left: -10px; }
.logo-stack { display: flex; align-items: center; margin-top: 8px; }
.logo-stack .site-logo { width: 22px; height: 22px; font-size: 0.6875rem; margin-right: -5px; box-shadow: 0 0 0 2px var(--bg); }
.logo-stack .site-logo svg { width: 100%; height: 100%; }
.logo-stack small { margin-left: 10px; font-size: 0.75rem; }
.week-days { display: flex; gap: 3px; }
.week-days span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-size: 0.75rem; color: var(--muted); }
.week-days span.on { background: var(--fill); color: var(--accent); font-weight: 600; }
.focus-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.focus-links button { color: var(--muted); font-size: 0.9rem; }
.symbol { width: 52px; height: 52px; display: grid; place-items: center; color: var(--accent); background: var(--fill); border-radius: 16px; flex-shrink: 0; }
.view-switch { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(22, 41, 74, 0.06); }
.view-switch button { min-height: 34px; padding: 4px 18px; color: var(--muted); font-size: 0.9rem; }
.view-switch button.selected { background: var(--surface); color: var(--title); box-shadow: 0 1px 4px rgba(22, 41, 74, 0.1); }
.collection-tabs { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; margin: 26px 0 6px; border-bottom: 1px solid var(--rule); }
.collection-tabs button { min-height: 0; padding: 0 0 12px; margin-bottom: -1px; border-radius: 0; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.collection-tabs button:hover { background: none; color: var(--title); }
.collection-tabs button[aria-selected="true"] { color: var(--title); font-weight: 600; border-color: var(--accent); }
.collection-add { justify-content: flex-end; }
.day { display: flex; align-items: center; gap: 7px; background: var(--fill); padding: 8px 12px; border-radius: 999px; }
.day input { margin: 0; }
.session-banner { padding: 14px 20px; color: #fff; background: linear-gradient(180deg, #2b61a8, #1c4079); border-radius: 20px; margin: 0 0 20px; box-shadow: var(--shadow-float); }
.session-banner small { color: rgba(255, 255, 255, 0.85); }
.session-banner .timer { font-size: 1.5rem; font-weight: 600; color: #fff; font-variant-numeric: tabular-nums; }
.session-banner button.quiet { box-shadow: none; }
.metric { font-size: 2.6rem; font-weight: 600; letter-spacing: -0.035em; color: var(--title); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 28px 0; }
.stat { background: var(--surface); border-radius: 24px; padding: 20px 22px; box-shadow: var(--shadow); }
.progress { height: 8px; background: var(--fill); border-radius: 20px; overflow: hidden; margin-top: 12px; }
.progress progress { width: 100%; height: 8px; accent-color: var(--accent); }
dialog { border: 0; border-radius: 30px; padding: 30px; width: min(610px, calc(100vw - 32px)); max-height: 90vh; background: var(--bg); color: #1c2633; box-shadow: 0 24px 80px rgba(22, 41, 74, 0.22); }
dialog::backdrop { background: rgba(22, 41, 74, 0.3); backdrop-filter: blur(4px); }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.dialog-head h2 { margin: 0; }
.dialog-head button { margin-top: -6px; margin-right: -8px; background: var(--surface); box-shadow: var(--shadow); }
.dialog-error { color: var(--danger); line-height: 1.5; margin-top: 14px; }
.review { padding: 16px 18px; background: var(--surface); border-radius: 20px; margin: 12px 0; line-height: 1.6; box-shadow: var(--shadow); }
.review dl { display: grid; grid-template-columns: 90px 1fr; gap: 8px; margin: 0; }
.review dt { color: var(--muted); }
.review dd { margin: 0; overflow-wrap: anywhere; }
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--title); color: #fff; padding: 14px 24px; border-radius: 999px; max-width: min(550px, 90vw); z-index: 100; box-shadow: var(--shadow-float); display: none; line-height: 1.4; }
#toast.show { display: block; }
.loading { margin: 70px; }
.skip { position: fixed; top: -100px; left: 20px; z-index: 999; background: #fff; padding: 15px; border-radius: 16px; }
.skip:focus { top: 10px; }

/* Mar y Lago: la foca flota sobre el agua de la app */
.lake-note { text-align: center; max-width: 560px; margin: 25px auto; }
.lake-note > foco-foca { width: 130px; margin: 14px; }
.calendar-item { align-items: start; }
.badge-label { font-size: 0.85rem; color: var(--muted); }
.hidden { display: none !important; }

/* Pausa de un sitio protegido */
.blocked { max-width: 560px; margin: 6vh auto; padding: 28px; text-align: center; }
.blocked foco-foca { width: 150px; }
.blocked h1 { margin-top: 8px; }
.blocked .actions { justify-content: center; }
.blocked .duration { font-size: 4rem; }
.blocked form, .blocked .notice { text-align: left; }
.word { font-size: 1.2rem; line-height: 1.7; padding: 18px; background: var(--fill); border-radius: 20px; user-select: none; }
.challenge-form { margin-top: 22px; }

/* Calendario */
.calendar-toolbar { margin: 28px 0 18px; }
.calendar-toolbar h2 { margin: 0; text-transform: capitalize; }
.calendar-scroll { overflow-x: auto; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); min-width: 750px; }
.weekday { padding: 14px 10px; font-size: 0.8125rem; font-weight: 600; text-align: center; color: var(--muted); }
.calendar-day { min-height: 125px; padding: 10px 8px; border-right: 1px solid var(--rule); border-top: 1px solid var(--rule); }
.calendar-day:nth-child(7n) { border-right: 0; }
.calendar-grid.week .calendar-day { min-height: 330px; }
.day-number { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; margin-bottom: 8px; color: var(--title); }
.day-number.today { background: var(--accent); color: #fff; }
.adjacent .day-number { color: var(--muted); }
.calendar-entry { display: grid; gap: 4px; width: 100%; min-height: 0; text-align: left; padding: 9px 10px; margin-bottom: 7px; background: #e4edf8; color: #214e8a; border-radius: 12px; font-size: 0.875rem; font-weight: 400; line-height: 1.4; overflow-wrap: anywhere; }
.calendar-entry small { font-size: 0.8125rem; color: inherit; }
.calendar-entry.assessments { background: #f5e7d8; color: #865021; }
.calendar-entry.classes { background: #e2eeea; color: #2e6858; }
.calendar-entry.availability { background: #edf0f4; color: #586578; }
.calendar-empty { font-size: 0.875rem; color: var(--muted); }

@media (max-width: 1150px) {
  .shell { grid-template-columns: 224px 1fr; }
  .content { padding: 22px 28px 50px; }
  .topbar { padding: 0 28px; }
}
@media (max-width: 900px) {
  .focus-columns { grid-template-columns: 1fr; }
}
/* En el teléfono, la barra flotante de la app */
@media (max-width: 640px) {
  .shell { display: block; }
  .sidebar { display: contents; }
  .sidebar .brand { padding: 16px 20px 0; font-size: 40px; }
  .sidebar nav {
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: max(12px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    padding: 5px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(18px);
    border-radius: 999px;
    box-shadow: var(--shadow-float);
    max-width: calc(100vw - 20px);
  }
  .sidebar nav .navitem { flex-direction: column; gap: 3px; width: auto; min-width: 72px; padding: 6px 9px; font-size: 0.7rem; font-weight: 600; text-align: center; white-space: nowrap; }
  .sidebar nav .navitem .icon { width: 30px; height: 30px; padding: 7px; }
  .side-bottom { display: flex; overflow-x: auto; gap: 6px; margin: 0; padding: 10px 20px 0; scrollbar-width: none; }
  .side-bottom .row { display: contents; }
  .side-bottom .navitem { width: auto; min-width: max-content; min-height: 36px; padding: 4px 14px 4px 4px; font-size: 0.85rem; background: var(--surface); box-shadow: var(--shadow); }
  .side-bottom .navitem .icon { width: 28px; height: 28px; }
  .topbar { padding: 0 20px; height: 60px; }
  .content { padding: 14px 20px 130px; }
  .chat-main { min-height: 62vh; }
  .welcome foco-foca { width: 120px; }
  .two { grid-template-columns: 1fr; }
  .section-head { flex-wrap: wrap; }
  .stats { grid-template-columns: 1fr; }
  .list-item { gap: 12px; flex-wrap: wrap; padding: 16px 18px; }
  .list-item .actions { margin: 0; }
  .focus-hero { min-height: 640px; }
  .focus-hero.live { min-height: 680px; }
  .focus-hero.live .duration small { display: block; margin: 8px 0 0; }
  .duration-choice button { padding: 6px 11px; }
  .focus-hero-top { padding: 28px 22px 0; }
  .focus-hero-water { left: 22px; right: 22px; bottom: 24px; }
  .focus-hero .duration { font-size: 4rem; }
  .duration { font-size: 4rem; }
  .blocked { margin-top: 2vh; }
  dialog { padding: 22px; border-radius: 26px; }
  #toast { bottom: 96px; }
}
@media (prefers-reduced-motion: no-preference) {
  button { transition: background 0.15s, color 0.15s; }
  .breathing { animation: breathe 8s ease-in-out infinite; }
  @keyframes breathe { 50% { transform: scale(1.12); } }
}

/* Quick choices keep site setup editable and use the existing Foco palette. */
.site-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.site-choice { display: flex; gap: 12px; align-items: center; text-align: left; border: 1px solid var(--rule); border-radius: 14px; padding: 10px 12px; min-width: 0; }
.site-choice-copy { display: flex; flex-direction: column; min-width: 0; }
.site-choice strong { font-size: .9rem; }
.site-choice small { font-size: .75rem; overflow-wrap: anywhere; }
.site-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: white; }
.site-choice[aria-pressed="true"] small { color: inherit; }
.site-choice-help { margin: -4px 0 12px; }
.site-study-help { margin: 0; padding: 10px 12px; border-radius: 12px; background: var(--fill); color: var(--title); }
@media (max-width: 440px) {
  .site-choice { gap: 8px; padding-inline: 8px; }
  .site-choice .site-logo { width: 34px; height: 34px; border-radius: 10px; }
}
#site-form details summary { cursor: pointer; color: var(--accent); padding: 4px 0; }
#site-form details[open] summary { margin-bottom: 12px; }

/* Assistant replies use document rhythm without oversized page headings. */
.message.assistant { white-space: normal; min-width: 0; width: 100%; }
.message.assistant > :first-child { margin-top: 0; }
.message.assistant > :last-child { margin-bottom: 0; }
.message.assistant p { margin: 0 0 1em; }
.message.assistant :is(h3, h4, h5, h6) { font-family: inherit; color: var(--title); font-weight: 650; letter-spacing: -.015em; line-height: 1.35; margin: 1.3em 0 .5em; }
.message.assistant h3 { font-size: 1.22em; }
.message.assistant h4 { font-size: 1.1em; }
.message.assistant :is(h5, h6) { font-size: 1em; }
.message.assistant :is(ul, ol) { padding-left: 1.45em; margin: .5em 0 1em; }
.message.assistant li { padding-left: .2em; margin: .5em 0; }
.message.assistant li::marker { color: var(--accent); }
.message.assistant li > p { margin: .35em 0; }
.message.assistant strong { color: var(--title); font-weight: 650; }
.message.assistant blockquote { border-left: 3px solid var(--rule); margin: 1em 0; padding-left: 1em; color: var(--muted); }
.message.assistant code { font-size: .88em; background: var(--surface); padding: .1em .3em; border-radius: 5px; }
.message.assistant pre { max-width: 100%; overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; padding: 14px; white-space: pre; }
.message.assistant pre code { padding: 0; }
.message.assistant a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.message.assistant .message-table { max-width: 100%; overflow-x: auto; margin: 1em 0; }
.message.assistant table { border-collapse: collapse; width: 100%; font-size: .9em; }
.message.assistant :is(th, td) { padding: .5em .7em; border-bottom: 1px solid var(--rule); text-align: left; }
.composer-foot > .row { flex-wrap: wrap; min-width: 0; max-width: 100%; }

/* La foca del Companion: una sola, que viaja entre la bienvenida, "pensando" y
   el pie de la conversación, y se achica para escribir la respuesta. */
.chat-main { position: relative; }
.chat-foca { position: absolute; left: 0; top: 0; width: 150px; transform-origin: 0 0; pointer-events: none; z-index: 1; opacity: 0; will-change: transform; }
.foca-slot { display: block; flex-shrink: 0; }
.welcome .foca-slot { width: 150px; height: 150px; margin-bottom: 8px; }
.foca-wait { padding-top: 4px; }
.foca-wait .foca-slot { width: 76px; height: 76px; margin-left: -6px; }
.foca-foot { display: flex; justify-content: center; padding-top: 12px; margin-top: auto; }
.foca-foot .foca-slot { width: 132px; height: 132px; }
/* Lugar a la derecha del renglón para la foca que escribe. */
.message.assistant { max-width: min(720px, calc(100% - 64px)); }
.message.revealing .foca-hidden,
.message.revealing :is(p, li, h3, h4, h5, h6, blockquote, pre, hr, .message-table):not(.foca-on) { visibility: hidden; }
@media (max-width: 640px) {
  .welcome .foca-slot { width: 120px; height: 120px; }
  .foca-foot .foca-slot { width: 104px; height: 104px; }
}

/* Choices belong to Foco on every OS, including their expanded help. */
.choice-field { min-width: 0; }
.choice-field legend { color: var(--title); margin-bottom: 9px; }
.choice-options { display: grid; gap: 8px; max-height: 340px; overflow-y: auto; padding: 4px; margin: -4px; }
.choice-option { position: relative; display: flex; align-items: center; gap: 12px; padding: 13px 16px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); cursor: pointer; min-height: 48px; }
.choice-option:hover { background: var(--bg); border-color: #a9bfda; }
.choice-option:has(input:checked) { background: var(--fill); border-color: var(--accent); color: var(--accent-dark); }
.choice-option:has(input:focus-visible) { outline: 3px solid #7eabd9; outline-offset: 1px; }
.choice-option input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; min-width: 0; }
.choice-copy { display: grid; gap: 3px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.choice-title { font-weight: 600; }
.choice-description { color: var(--muted); font-size: .875rem; line-height: 1.4; }
.choice-check { width: 18px; height: 18px; flex: 0 0 18px; border: 1.5px solid #a3b1c5; border-radius: 50%; }
.choice-option:has(input:checked) .choice-check { border: 5px solid var(--accent); background: var(--surface); }
.choice-help { margin-top: 10px; }
.choice-help summary { display: flex; gap: 8px; align-items: center; width: fit-content; min-height: 44px; padding: 6px 10px; border-radius: 12px; cursor: pointer; color: var(--accent); font-size: .875rem; list-style: none; }
.choice-help summary::-webkit-details-marker { display: none; }
.choice-help summary:hover, .choice-help[open] summary { background: var(--fill); }
.choice-help summary:focus-visible { outline: 3px solid #7eabd9; outline-offset: 2px; }
.info-symbol { display: inline-grid; place-items: center; border: 1.5px solid currentColor; border-radius: 50%; width: 18px; height: 18px; font-weight: 600; font-size: 12px; }
.choice-help > div { margin-top: 8px; padding: 16px; border-radius: 16px; background: var(--bg); }
.choice-help p { font-size: .875rem; color: var(--muted); margin-bottom: 12px; }
.choice-help p:last-child { margin-bottom: 0; }
.choice-help strong { color: var(--title); }

/* Programar un momento: días en pastillas y ruedas que giran sobre el agua. */
dialog:has(.moment-form) { width: min(940px, calc(100vw - 32px)); }
.moment { display: flex; flex-direction: column; border-radius: 26px; background: linear-gradient(180deg, #f2f7fd, #e6effa); box-shadow: var(--shadow-float); }
.moment-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.moment-side button[type="submit"] { margin-top: auto; }
@media (min-width: 860px) {
  .moment-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: stretch; }
}
@media (max-width: 859px) {
  .moment-side button[type="submit"] { position: sticky; bottom: 0; }
}
.moment-top { padding: 22px 24px 20px; }
.moment-top h3 { margin: 0 0 12px; font-size: 1.05rem; }
.moment-top p { margin: 0; color: var(--muted); }
.day-strip { --fade-l: 0px; --fade-r: 0px; position: relative; margin: 0 -24px; }
.day-pills { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 24px 18px; margin-bottom: -14px; cursor: grab; -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent); mask-image: linear-gradient(90deg, transparent, #000 var(--fade-l), #000 calc(100% - var(--fade-r)), transparent); }
.day-strip.dragging .day-pills { cursor: grabbing; }
.day-strip.dragging .day-pill { pointer-events: none; }
.day-pill { user-select: none; -webkit-user-select: none; }
.day-more, .day-less { position: absolute; top: 4px; height: 38px; display: inline-flex; align-items: center; gap: 3px; padding: 0 10px; border-radius: 999px; color: var(--accent); background: transparent; font-size: 1.15rem; line-height: 1; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.day-more { right: 0; padding: 0 22px 0 8px; border-radius: 0; background: #f0f5fc; }
.day-less { left: 0; padding: 0 8px 0 18px; border-radius: 0; background: #f0f5fc; }
.day-more::before, .day-less::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40px; pointer-events: none; }
.day-more::before { right: 100%; background: linear-gradient(90deg, rgba(240, 245, 252, 0), #f0f5fc); }
.day-less::before { left: 100%; background: linear-gradient(270deg, rgba(240, 245, 252, 0), #f0f5fc); }
.day-more b { font-size: .75rem; font-weight: 600; color: var(--muted); }
.day-more:hover, .day-less:hover { color: var(--accent-dark); }
.day-more:hover b { color: var(--accent-dark); }
.day-strip.more-right .day-more, .day-strip.more-left .day-less { opacity: 1; pointer-events: auto; }
.day-pills::-webkit-scrollbar { display: none; }
.day-pill { position: relative; display: inline-flex; align-items: center; flex: none; min-height: 38px; padding: 6px 16px; border-radius: 999px; background: var(--surface); color: var(--title); font-size: .94rem; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 3px rgba(22, 41, 74, 0.08); }
.day-pill:hover { background: #eef3fa; }
.day-pill:has(input:checked) { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(43, 97, 168, 0.22); }
.day-pill:has(input:focus-visible) { outline: 3px solid #7eabd9; outline-offset: 2px; }
.day-pill input { position: absolute; opacity: 0; width: 1px; height: 1px; padding: 0; min-width: 0; }
.moment-water { flex: 1; display: grid; gap: 14px; justify-items: center; align-content: center; padding: 26px 24px 24px; color: #fff; }
.moment-wheels { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 40px; }
.wheel-group { display: grid; gap: 4px; justify-items: center; }
.wheel-group > span { font-size: .875rem; color: rgba(255, 255, 255, 0.75); }
.wheel-pair { display: flex; align-items: center; gap: 2px; }
.wheel-pair b { font-size: 2rem; font-weight: 600; margin-bottom: 4px; }
.wheel { --item: 46px; position: relative; width: 74px; height: 184px; border-radius: 999px; outline: none; touch-action: pan-y; }
.wheel:has([name="minutes"]) { width: 132px; }
.wheel::before { content: ""; position: absolute; left: 0; right: 0; top: calc(50% - var(--item) / 2); height: var(--item); border-radius: 999px; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); }
.wheel:focus-visible::before { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.85); }
.wheel-track { position: relative; height: 100%; overflow-y: auto; overscroll-behavior: contain; scroll-snap-type: y mandatory; scrollbar-width: none; padding: calc(92px - var(--item) / 2) 0; perspective: 500px; cursor: grab; -webkit-mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); mask-image: linear-gradient(transparent, #000 32%, #000 68%, transparent); }
.wheel-track::-webkit-scrollbar { display: none; }
.wheel:is(.dragging, .gliding) .wheel-track { scroll-snap-type: none; }
.wheel.dragging .wheel-track { cursor: grabbing; }
.wheel-item small { font-size: .95rem; font-weight: 500; letter-spacing: 0; margin: 0 4px 0 3px; color: rgba(255, 255, 255, 0.78); }
.wheel-item { height: var(--item); display: grid; place-items: center; scroll-snap-align: center; font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; color: #fff; user-select: none; -webkit-user-select: none; }
.moment-summary { margin: 0; text-align: center; font-size: .94rem; color: rgba(255, 255, 255, 0.8); }
.moment-summary.warn { color: #fff; font-weight: 600; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
@media (max-width: 640px) {
  .moment-top { padding: 18px 18px 16px; }
  .day-strip { margin: 0 -18px; }
  .day-pills { padding-inline: 18px; }
  dialog:has(.moment) { padding: 24px 20px; }
  .moment-water { padding: 22px 8px 20px; }
  .moment-wheels { flex-wrap: nowrap; gap: 14px; }
  .wheel { width: 54px; }
  .wheel:has([name="minutes"]) { width: 108px; }
  .wheel-item small { font-size: .8rem; margin: 0 3px 0 2px; }
  .wheel-item, .wheel-pair b { font-size: 1.6rem; }
}

/* Estudio: calendario primero, próxima sesión en un círculo de agua y la
   cuenta regresiva de fechas. Diseño: docs/design/estudio (variante D). */
/* El calendario usa todo el ancho disponible en pantallas grandes. */
.content.wide { max-width: 1480px; }
.study-top { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 18px; }
.study-title { font-size: 1.9rem; margin: 0; letter-spacing: -0.02em; }
.study-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.study-nav { display: flex; align-items: center; }
.study-nav button { min-height: 36px; min-width: 36px; padding: 4px 10px; color: var(--title); font-size: 1.05rem; }
.study-nav button[data-action="calendar.today"] { color: var(--accent); font-size: 0.9rem; }
.study-chip { min-height: 32px; padding: 5px 14px; font-size: 0.82rem; color: var(--muted); background: var(--surface); box-shadow: inset 0 0 0 1px var(--rule); }
.study-chip.on { color: var(--accent); background: var(--fill); box-shadow: none; }
.study-add { min-height: 36px; font-size: 0.9rem; }
.next-orb { width: 128px; height: 128px; flex: none; border-radius: 50%; background: linear-gradient(180deg, #f2f7fd, #e6effa); box-shadow: var(--shadow-float), inset 0 0 0 1px rgba(255, 255, 255, 0.7); transition: transform 0.2s; }
.next-orb > canvas { border-radius: 50%; }
.next-orb:hover { transform: scale(1.04); }
.orb-hit { width: 100%; height: 100%; min-height: 0; padding: 24px 0 0; border-radius: 50%; display: flex; flex-direction: column; align-items: center; background: none; }
.orb-hit:hover { background: none; }
.orb-when { font-size: 0.74rem; font-weight: 500; color: var(--muted); }
.orb-time { font-size: 1.35rem; font-weight: 600; color: var(--title); letter-spacing: -0.02em; line-height: 1.15; }
.orb-dur { margin-top: 14px; font-size: 0.95rem; font-weight: 600; color: #fff; }
.cal-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 6px; }
.wk, .mo { min-width: 640px; background: var(--surface); border-radius: 28px; box-shadow: var(--shadow); padding: 6px 14px 16px; }
.wk-head, .wk-body, .wk-allrow { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
.wk-h { text-align: center; padding: 10px 0 12px; color: var(--muted); font-size: 0.8rem; }
.wk-h b { display: grid; place-items: center; width: 36px; height: 36px; margin: 2px auto 0; border-radius: 50%; font-size: 1.2rem; font-weight: 600; color: var(--title); }
.wk-h.today b { color: #fff; background: var(--accent); }
.wk-allrow { padding-bottom: 6px; }
.wk-all { display: grid; gap: 3px; padding: 0 3px; }
.ev-all, .m-date { min-height: 0; padding: 3px 7px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; color: #fff; background: var(--c, var(--accent)); text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-all:hover, .m-date:hover { background: var(--c, var(--accent)); filter: brightness(1.08); }
.wk-body { position: relative; height: var(--height); }
.wk-hours { position: absolute; inset: 0; pointer-events: none; }
.wk-hr { position: absolute; left: 0; right: 0; top: var(--top); border-top: 1px solid #edf1f6; }
.wk-hr span { position: absolute; left: 4px; top: -8px; padding-right: 4px; font-size: 0.72rem; color: var(--muted); background: var(--surface); }
.wk-col { position: relative; border-left: 1px solid #edf1f6; }
.wk-col.today { background: #f5f8fd; }
.ev { position: absolute; top: var(--top); height: var(--height); left: 3px; right: 3px; min-height: 0; padding: 5px 8px; border-radius: 10px; overflow: hidden; display: block; text-align: left; font-size: 0.75rem; font-weight: 400; line-height: 1.25; color: var(--title); }
.ev b { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-weight: 600; }
.ev small { font-size: 0.7rem; color: var(--muted); }
.ev.class { left: 0; right: 0; border-radius: 4px; padding: 4px 6px; font-size: 0.7rem; color: #7a8698; background: repeating-linear-gradient(135deg, #f3f6fa 0 6px, #eef2f7 6px 12px); }
.ev.class span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.free { display: flex; align-items: center; justify-content: center; border: 1.5px dashed #d3deed; }
.ev.free:hover { background: #f5f8fd; }
.ev.free .add { min-height: 0; padding: 4px 8px; font-size: 0.72rem; opacity: 0; }
.ev.free:hover .add, .ev.free .add:focus-visible { opacity: 1; }
.ev.session { --w: calc((100% - 11px) / var(--lanes, 1)); left: calc(7px + var(--w) * var(--lane, 0)); right: auto; width: var(--w); background: color-mix(in srgb, var(--c, var(--accent)) 13%, #fff); border-left: 3px solid var(--c, var(--accent)); border-radius: 4px 10px 10px 4px; box-shadow: 0 2px 8px rgba(22, 41, 74, 0.06); }
.ev.session:hover { background: color-mix(in srgb, var(--c, var(--accent)) 18%, #fff); box-shadow: var(--shadow-float); z-index: 2; }
.ev.session.done { opacity: 0.5; }
.ev.exam { left: 7px; right: 4px; background: var(--c, var(--accent)); box-shadow: 0 4px 14px rgba(22, 41, 74, 0.18); z-index: 1; }
.ev.exam:hover { background: var(--c, var(--accent)); filter: brightness(1.08); }
.ev.exam b, .ev.exam small { color: #fff; }
.wk-now { position: absolute; left: 0; right: 0; top: var(--top); height: 2px; background: var(--accent); z-index: 3; }
.wk-now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mo-head, .mo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mo-head span { padding: 12px 0; text-align: center; font-size: 0.8rem; color: var(--muted); }
.mo-day { min-height: 116px; padding: 7px 6px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; border-top: 1px solid #edf1f6; border-left: 1px solid #edf1f6; }
.mo-day:nth-child(7n + 1) { border-left: 0; }
.mo-day.out > * { opacity: 0.38; }
.mo-day .n { margin: 0 0 3px 3px; font-size: 0.85rem; font-weight: 600; color: var(--title); }
.mo-day.today .n { display: grid; place-items: center; width: 26px; height: 26px; margin: -3px 0 0; border-radius: 50%; color: #fff; background: var(--accent); }
.m-ev { min-height: 0; padding: 2px 4px; display: flex; align-items: center; gap: 5px; border-radius: 6px; font-size: 0.72rem; font-weight: 400; color: var(--title); text-align: left; white-space: nowrap; overflow: hidden; }
.m-ev .dot { flex: none; background: var(--c, var(--accent)); }
.m-ev .num { color: var(--muted); }
.m-ev.done { color: var(--muted); }
.mo-day .more { min-height: 0; padding: 2px 4px; font-size: 0.7rem; color: var(--muted); text-align: left; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 12px; font-size: 0.8rem; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; }
.lg-session { background: #dfe7f3; box-shadow: inset 3px 0 var(--accent); }
.lg-date { background: #d9822b; }
.lg-class { background: repeating-linear-gradient(135deg, #eef2f7 0 3px, #f6f8fb 3px 6px); }
.lg-free { box-shadow: inset 0 0 0 1.5px #c9d6e8; }
.upcoming { margin-top: 48px; }
.upcoming .section-title { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.upcoming h2 { margin: 0; font-size: 1.15rem; }
.up-row { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 8px; }
.up { min-height: 0; padding: 14px 20px 6px; display: grid; gap: 4px; align-content: start; text-align: left; font-weight: 400; color: var(--title); border-radius: 0; border-left: 1px solid var(--rule); }
.up:first-child { padding-left: 0; border-left: 0; }
.up:hover { background: none; }
.up:hover .up-title { color: var(--accent); }
.up .n { margin-bottom: 8px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; color: var(--title); }
.up .n.size-xl { font-size: 3.2rem; } .up .n.size-l { font-size: 2.5rem; } .up .n.size-m { font-size: 2rem; } .up .n.size-s { font-size: 1.6rem; }
.up .n small { margin-left: 4px; font-size: 0.8rem; font-weight: 500; letter-spacing: 0; }
.up-title { font-size: 0.95rem; }
.up > small { display: block; font-size: 0.8rem; line-height: 1.45; }
.up .dot { display: inline-block; margin-right: 5px; vertical-align: 1px; background: var(--c, var(--accent)); }
.study-more { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-top: 52px; }
.study-more button { min-height: 36px; font-size: 0.9rem; font-weight: 400; color: var(--muted); }
.study-pop { position: fixed; z-index: 60; width: 300px; padding: 14px 18px 16px; border-radius: 22px; background: var(--surface); box-shadow: 0 18px 50px rgba(22, 41, 74, 0.22); }
.study-pop .pop-h { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.study-pop .pop-h .dot { flex: none; background: var(--c, var(--accent)); }
.study-pop .pop-x { min-height: 30px; width: 30px; margin-left: auto; padding: 0; font-size: 1.3rem; color: var(--muted); }
.study-pop h3 { margin: 6px 0 2px; font-size: 1.1rem; }
.study-pop p { margin: 0 0 12px; font-size: 0.88rem; }
.study-pop .pop-notes { color: #3a4d6b; }
.study-pop .pop-done { color: #3a9a6b; font-weight: 600; }
.study-pop .pop-act { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 14px; }
.study-pop .pop-act button { min-height: 40px; }
.study-pop .pop-act .primary { padding: 10px 18px; font-size: 0.9rem; }

/* Ventana flotante de chat con Foco (todas las secciones menos la conversación) */
.dock-seal { display: block; width: 40px; height: 40px; flex: none; }
/* Foco como bloque de la página: una columna al costado del contenido. */
.page.with-dock { display: grid; grid-template-columns: minmax(0, 1fr) 360px; align-items: start; gap: 8px; padding-right: 28px; }
.page.with-dock > .content { width: 100%; }
.dock { position: sticky; top: 18px; margin-top: 26px; height: min(680px, calc(100vh - 36px)); display: flex; flex-direction: column; border-radius: 28px; background: var(--surface); box-shadow: var(--shadow); }
.dock-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 3px 16px 3px 4px; font-size: 0.875rem; font-weight: 500; color: var(--title); background: rgba(255, 255, 255, 0.62); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px rgba(22, 41, 74, 0.08), 0 1px 2px rgba(22, 41, 74, 0.04); }
.dock-toggle:hover { background: rgba(255, 255, 255, 0.92); }
.dock-toggle.on { color: var(--accent); background: var(--fill); box-shadow: none; }
.dock-toggle .dock-seal { width: 30px; height: 30px; }
.dock-head { display: flex; align-items: center; gap: 10px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--rule); }
.dock-head .dock-seal { width: 36px; height: 36px; }
.dock-head div { flex: 1; min-width: 0; }
.dock-head b { display: block; color: var(--title); }
.dock-head small { font-size: 0.8rem; }
.dock-close { min-height: 36px; width: 36px; padding: 0; font-size: 1.1rem; color: var(--muted); }
.dock-msgs { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 8px; }
.dock .message { max-width: 100%; padding: 0; font-size: 0.92rem; line-height: 1.5; }
.dock .message.user { align-self: flex-end; max-width: 88%; margin: 4px 0; padding: 9px 14px; border: 0; border-radius: 18px 18px 6px 18px; background: var(--fill); color: var(--title); }
.dock .message.actionResult { font-size: 0.82rem; padding: 6px 12px; }
.dock .proposal { margin: 4px 0; padding: 14px 16px; border-radius: 20px; box-shadow: none; }
.dock .proposal h3 { font-size: 0.95rem; }
.dock .proposal p { font-size: 0.86rem; margin: 0 0 8px; }
.dock .proposal .actions button { min-height: 38px; padding: 8px 16px; }
.dock-hello, .dock-wait { margin: 0; font-size: 0.92rem; line-height: 1.5; color: #1c2633; }
.dock-wait { color: var(--muted); }
.dock-compose { display: flex; align-items: flex-end; gap: 8px; margin: 6px 12px 12px; padding: 6px 6px 6px 14px; border-radius: 22px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--rule); }
.dock-compose textarea { flex: 1; min-width: 0; min-height: 0; max-height: 120px; padding: 7px 0; border: 0; resize: none; background: none; box-shadow: none; font-size: 0.92rem; color: var(--title); outline: none; }
.dock-send { min-height: 38px; width: 38px; padding: 0; display: grid; place-items: center; color: #fff; background: var(--accent); }
.dock-send:hover { background: var(--accent-dark); }
.dock-send svg { width: 18px; height: 18px; }
@media (prefers-reduced-motion: no-preference) {
  .dock.opening { animation: dock-in 0.22s ease-out; }
  @keyframes dock-in { from { opacity: 0; transform: translateX(12px); } }
}
@media (prefers-reduced-motion: reduce) { .next-orb { transition: none; } }
@media (max-width: 1100px) {
  .page.with-dock { grid-template-columns: minmax(0, 1fr); padding-right: 0; }
  .dock { order: -1; position: static; margin: 18px 28px 0; height: min(460px, 70vh); }
}
@media (max-width: 900px) {
  .up-row { grid-template-columns: 1fr; }
  .up { grid-template-columns: 90px 1fr; column-gap: 12px; padding: 14px 0; border-left: 0; border-top: 1px solid var(--rule); }
  .up:first-child { border-top: 0; }
  .up .n { grid-row: span 2; margin: 0; }
}
@media (max-width: 640px) {
  .study-top { align-items: flex-start; }
  .study-title { font-size: 1.5rem; }
  .next-orb { width: 104px; height: 104px; }
  .orb-hit { padding-top: 18px; }
  .orb-time { font-size: 1.15rem; }
  .orb-dur { margin-top: 18px; font-size: 0.85rem; }
  .dock-toggle { padding: 3px; font-size: 0; gap: 0; }
  .dock { margin: 14px 20px 0; }
  .study-pop { width: calc(100vw - 24px); }
}
