:root{font-family:'DM Sans',sans-serif;color:#282638;background:#f7f6fb;font-synthesis:none;--ink:#282638;--muted:#88869a;--purple:#6754c8;--line:#eceaf2;--paper:#fff}*{box-sizing:border-box}body{margin:0}.topbar{height:70px;background:var(--paper);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(28px,calc((100vw - 1250px)/2))}.brand{text-decoration:none;color:var(--purple);font-weight:800;font-size:22px;letter-spacing:-1px}.brand span{color:var(--ink);font-family:Manrope,sans-serif;font-size:17px}.user-tools{display:flex;align-items:center;gap:18px;color:var(--muted);font-size:13px}.user-tools form{margin:0}.link-button{border:0;background:none;color:var(--purple);font:inherit;cursor:pointer}.layout{max-width:1250px;margin:0 auto;display:grid;grid-template-columns:220px minmax(0,1fr);gap:52px;padding:48px 28px}.sidebar{position:sticky;top:30px;height:calc(100vh - 110px);display:flex;flex-direction:column}.eyebrow{font-size:10px;letter-spacing:1.4px;font-weight:700;color:#9692aa}.sidebar h2{font:700 19px Manrope,sans-serif;letter-spacing:-.5px;margin:12px 0 30px}.sidebar nav{display:grid;gap:7px}.sidebar nav a{padding:12px 14px;border-radius:10px;color:#777489;text-decoration:none;font-size:14px}.sidebar nav .nav-active{background:#eeebfb;color:var(--purple);font-weight:700}.sidebar-note{margin-top:auto;border-radius:14px;background:#eeebfb;color:#6452b1;padding:17px;font-size:13px;line-height:1.5}.content{min-width:0}.welcome{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:30px}.welcome h1,.login-card h1{font:800 33px Manrope,sans-serif;letter-spacing:-1.3px;margin:8px 0}.welcome p,.login-card p{margin:0;color:var(--muted);font-size:14px}.profile-chip,select{border:1px solid var(--line);border-radius:9px;padding:10px 13px;background:white;color:#55536a;font:inherit}.summary-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.summary{background:white;border:1px solid var(--line);border-radius:15px;padding:17px;display:grid;gap:8px;min-height:120px}.summary strong{font:800 27px Manrope,sans-serif;letter-spacing:-1px}.summary .small-strong{font-size:15px;letter-spacing:0}.summary span:last-child{font-size:12px;color:var(--muted)}.summary.accent{background:#f0edff;border-color:#e8e2ff}.section-heading{display:flex;justify-content:space-between;align-items:end;margin:34px 0 14px}.section-heading h2{font:700 20px Manrope,sans-serif;margin:5px 0 0;letter-spacing:-.5px}.subject-list{display:flex;flex-wrap:wrap;gap:10px}.subject-card{display:flex;align-items:center;gap:9px;background:white;border:1px solid var(--line);border-radius:10px;padding:11px 13px;font-size:13px}.subject-dot{width:9px;height:9px;background:var(--subject-color);border-radius:50%}.subject-card small{color:var(--muted);font-size:11px;margin-left:3px}.add-task{display:flex;gap:8px;background:white;border:1px solid var(--line);padding:10px;border-radius:12px;margin-bottom:12px}.add-task input,.add-task select{min-width:0;padding:9px;border:1px solid var(--line);border-radius:8px;font:inherit;font-size:12px}.add-task input[name=title]{flex:1}.button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--line);border-radius:8px;padding:9px 14px;text-decoration:none;color:var(--ink);font:600 13px 'DM Sans',sans-serif;background:white;cursor:pointer}.button.primary{background:var(--purple);border-color:var(--purple);color:white}.task-list{display:grid;gap:8px}.task-row{display:flex;align-items:center;gap:12px;padding:13px;background:white;border:1px solid var(--line);border-radius:11px}.task-row form{margin:0}.check{width:21px;height:21px;border:1.5px solid #d7d4e2;border-radius:50%;background:white;color:var(--purple);cursor:pointer}.task-info{display:grid;gap:4px;flex:1}.task-info strong{font-size:13px;font-weight:600}.task-info span,.status-pill{font-size:11px;color:var(--muted)}.task-done .task-info strong{text-decoration:line-through;color:#aaa}.status-pill{background:#f2f0f7;border-radius:20px;padding:5px 9px}.empty,.empty-inline{padding:24px;border:1px dashed #d8d4e4;border-radius:13px;text-align:center;color:var(--muted);font-size:13px;background:white}.empty h2{font:700 19px Manrope,sans-serif;color:var(--ink)}.muted{color:var(--muted);font-size:13px}.notice{color:#3d7c62;background:#e8f6ef;padding:10px 14px;border-radius:9px}.login-page{min-height:100vh;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,#f0edff,transparent 35%),#f7f6fb}.login-card{width:min(420px,calc(100vw - 32px));background:white;border:1px solid var(--line);border-radius:20px;padding:34px;box-shadow:0 18px 60px #45398012}.login-card h1{font-size:27px;margin:10px 0}.login-card form{display:grid;gap:9px;margin:25px 0 15px}.login-card label{font-size:12px;font-weight:700;color:#5d5a6d}.login-card input{border:1px solid var(--line);border-radius:9px;padding:12px;font:inherit;margin-bottom:8px}.login-card small{color:var(--muted);font-size:11px}.error{color:#b03d4c;font-size:13px}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}@media(max-width:800px){.layout{grid-template-columns:1fr;gap:24px;padding:27px 18px}.sidebar{position:static;height:auto}.sidebar h2{margin-bottom:12px}.sidebar-note{display:none}.sidebar nav{display:flex}.sidebar nav a{padding:9px 11px}.summary-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.summary{padding:12px;min-height:108px}.summary strong{font-size:22px}.summary span:last-child{font-size:10px}.add-task{flex-wrap:wrap}.add-task input[name=title]{flex-basis:100%}.add-task select,.add-task input[type=date]{flex:1}.welcome{align-items:start;gap:12px}.welcome h1{font-size:27px}}@media(max-width:440px){.topbar{padding:0 17px}.summary-grid{grid-template-columns:1fr 1fr}.summary:last-child{grid-column:span 2}.welcome p{max-width:250px}.task-info strong{font-size:12px}.status-pill{display:none}}

/* Tablet: keep navigation visible and give the content the full row. */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 24px; padding: 30px 24px; }
  .sidebar { position: static; height: auto; }
  .sidebar h2 { margin: 8px 0 12px; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .sidebar nav a { min-height: 44px; display: flex; align-items: center; gap: 8px; }
  .sidebar-note { display: none; }
}

/* Touch-friendly phone layout with navigation anchored to the bottom. */
@media (max-width: 600px) {
  html { scroll-padding-top: 72px; }
  .topbar {
    position: sticky; top: 0; z-index: 20; height: 60px;
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .brand { font-size: 20px; }
  .brand span { font-size: 15px; }
  .user-tools { gap: 12px; }
  .layout {
    display: block; padding: 20px 16px calc(84px + env(safe-area-inset-bottom));
  }
  .sidebar {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; top: auto;
    width: 100%; height: auto;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(255,255,255,.98); border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px #2826380d;
  }
  .sidebar > .eyebrow, .sidebar h2, .sidebar-note { display: none; }
  .sidebar nav {
    display: flex; gap: 3px; overflow-x: auto; overscroll-behavior-x: contain;
    scrollbar-width: none; scroll-snap-type: x proximity;
  }
  .sidebar nav::-webkit-scrollbar { display: none; }
  .sidebar nav a {
    min-width: 68px; min-height: 56px; flex: 0 0 68px; padding: 5px 4px; border-radius: 12px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    gap: 4px; text-align: center; font-size: 11px; font-weight: 600; scroll-snap-align: center;
  }
  .sidebar nav a .nav-icon { font-size: 20px; line-height: 1; }
  .welcome {
    align-items: stretch; flex-direction: column; gap: 14px; margin-bottom: 22px;
  }
  .welcome h1 { font-size: clamp(27px,8vw,32px); line-height: 1.1; }
  .welcome p { max-width: 34ch; font-size: 14px; line-height: 1.5; }
  .profile-chip { width: fit-content; max-width: 100%; padding: 9px 11px; font-size: 12px; }
  .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .summary { min-width: 0; min-height: 104px; padding: 14px; border-radius: 14px; }
  .summary:last-child { grid-column: 1 / -1; min-height: 92px; }
  .summary strong { font-size: 24px; line-height: 1.15; overflow-wrap: anywhere; }
  .summary .small-strong { font-size: 15px; }
  .section-heading { margin: 28px 0 12px; }
  .section-heading h2 { font-size: 19px; }
  .subject-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .subject-card {
    min-width: 0; min-height: 62px; padding: 10px;
    display: grid; grid-template-columns: 10px minmax(0,1fr);
    align-content: center; gap: 5px 8px; overflow-wrap: anywhere; font-size: 12px;
  }
  .subject-dot { align-self: start; margin-top: 4px; }
  .subject-card small { grid-column: 2; margin: 0; font-size: 10px; }
  .add-task {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px; padding: 10px; margin-bottom: 12px;
  }
  .add-task input[name="title"] {
    grid-column: 1 / -1; width: 100%; min-height: 46px;
    padding: 11px 12px; font-size: 14px;
  }
  .add-task select, .add-task input[type="date"] {
    width: 100%; min-width: 0; min-height: 44px; padding: 9px; font-size: 13px;
  }
  .add-task .button { grid-column: 1 / -1; min-height: 46px; font-size: 14px; }
  .task-row { align-items: flex-start; gap: 10px; padding: 12px; }
  .check { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 1px; }
  .task-info { min-width: 0; gap: 5px; overflow-wrap: anywhere; }
  .task-info strong { font-size: 14px; line-height: 1.35; }
  .task-info span { line-height: 1.4; }
  .status-pill { white-space: nowrap; }
  .empty-inline { padding: 20px 14px; line-height: 1.5; }
  .notice { line-height: 1.45; }
  .empty { padding: 22px 16px; }
  .empty .button { min-height: 44px; }
  .section-heading[id] { scroll-margin-top: 76px; }
}

@media (max-width: 380px) {
  .layout { padding-left: 13px; padding-right: 13px; }
  .summary { padding: 12px; }
  .subject-list { grid-template-columns: 1fr; }
  .subject-card { min-height: 48px; grid-template-columns: 10px minmax(0,1fr) auto; }
  .subject-card small { grid-column: auto; }
  .task-info span { font-size: 10px; }
  .status-pill { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

:where(a,button,input,select):focus-visible {
  outline: 3px solid #9788eb; outline-offset: 2px;
}

.effort-panel { margin-top: 30px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; }
.effort-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.effort-heading h2 { margin: 5px 0 4px; font: 700 20px Manrope,sans-serif; letter-spacing: -.5px; }
.effort-heading p,.effort-note { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.effort-score { flex: 0 0 auto; display: grid; gap: 3px; text-align: right; }
.effort-score strong { color: var(--purple); font: 800 25px Manrope,sans-serif; }
.effort-score span { font-size: 11px; font-weight: 700; }
.effort-score small { color: var(--muted); font-size: 10px; }
.effort-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.effort-action { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbff; }
.effort-star { color: var(--purple); font-size: 18px; }
.effort-action h3 { min-height: 38px; margin: 7px 0 12px; font-size: 12px; line-height: 1.45; }
.effort-action form { margin: 0; }
.effort-button { width: 100%; min-height: 40px; padding: 8px; border: 1px solid #ded9f4; border-radius: 9px; background: #f3f0ff; color: #5946b6; font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.effort-button:hover:not(:disabled) { background: #e9e4ff; }
.effort-button:disabled { border-color: #d9eee2; background: #eff8f2; color: #47775d; cursor: default; }
.effort-recorded { display: block; color: var(--muted); font-size: 10px; line-height: 1.4; }
.effort-note { margin-top: 13px; font-size: 11px; }
.task-list { gap: 10px; }
.task-card { overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.task-card .task-row { border: 0; border-radius: 0; }
.task-steps { border-top: 1px solid var(--line); }
.task-steps summary { display: flex; align-items: center; justify-content: space-between; min-height: 42px; padding: 8px 14px; color: #656176; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.task-steps summary::-webkit-details-marker { display: none; }
.task-steps summary::after { content: "＋"; color: var(--purple); font-size: 15px; margin-left: 10px; }
.task-steps[open] summary::after { content: "−"; }
.step-count { margin-left: auto; color: var(--muted); font-size: 10px; font-weight: 600; }
.task-step-list { display: grid; gap: 7px; padding: 0 13px 12px; }
.step-hint { margin: 0; color: var(--muted); font-size: 11px; }
.task-step { display: flex; align-items: center; gap: 9px; min-height: 34px; font-size: 12px; }
.task-step form { margin: 0; }
.step-check { width: 21px; height: 21px; border: 1px solid #d7d4e2; border-radius: 7px; background: #fff; color: var(--purple); cursor: pointer; }
.step-done span { color: var(--muted); text-decoration: line-through; }
.step-done .step-check { border-color: #cfe8d9; background: #eff8f2; }
.add-step { display: flex; gap: 7px; margin-top: 4px; }
.add-step input { flex: 1; min-width: 0; min-height: 40px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 12px; }
.add-step .button { min-height: 40px; }
@media (max-width: 600px) {
  .effort-panel { margin-top: 22px; padding: 15px; }
  .effort-heading { align-items: flex-start; gap: 10px; }
  .effort-heading h2 { font-size: 18px; }
  .effort-heading p { max-width: 25ch; font-size: 11px; }
  .effort-score strong { font-size: 22px; }
  .effort-score span { max-width: 70px; font-size: 10px; }
  .effort-actions { grid-template-columns: 1fr; gap: 7px; }
  .effort-action { display: grid; grid-template-columns: 22px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 10px; }
  .effort-action h3 { min-height: 0; margin: 0; font-size: 11px; }
  .effort-action form { grid-column: 3; grid-row: 1; }
  .effort-button { min-width: 105px; min-height: 44px; font-size: 10px; }
  .effort-recorded { grid-column: 3; }
  .task-steps summary { min-height: 44px; padding-left: 12px; padding-right: 12px; }
  .task-step { min-height: 40px; font-size: 12px; }
  .step-check { width: 24px; height: 24px; flex: 0 0 24px; }
  .add-step { align-items: stretch; }
  .add-step input { font-size: 13px; }
  .add-step .button { padding-left: 10px; padding-right: 10px; }
}

.feature-panel { margin-top: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.feature-panel .section-heading { margin: 0 0 14px; }
.feature-panel .section-heading p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.reading-form,.activity-form,.practice-form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.reading-form input,.activity-form input,.activity-form select,.topic-list input { min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12px; }
.reading-form input[name="book_title"],.activity-form input[name="title"] { flex: 1 1 220px; }
.reading-form input[name="minutes"] { width: 105px; }
.activity-form select,.activity-form input[type="time"],.practice-form select,.practice-form input { flex: 1 1 120px; min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font: inherit; font-size: 12px; }
.reading-list,.activity-list { display: grid; gap: 6px; }
.reading-list > div,.activity-list article { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 12px; }
.reading-list span,.activity-list article span { color: var(--muted); font-size: 11px; }
.activity-list article div { display: grid; gap: 4px; }
.activity-list article form { margin: 0; }
.mission-area { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; }
.subject-card { display: grid; gap: 8px; min-width: min(250px,100%); align-items: stretch; }
.subject-title { display: flex; align-items: center; gap: 8px; }
.subject-title strong { font-size: 13px; }
.subject-title small { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.topic-list { width: 100%; border-top: 1px solid var(--line); }
.topic-list summary { display: flex; align-items: center; justify-content: space-between; padding: 8px 0 0; color: #656176; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.topic-list summary::-webkit-details-marker { display: none; }
.topic-list ul { display: grid; gap: 5px; margin: 8px 0; padding: 0; list-style: none; }
.topic-list li { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }
.topic-list li small { color: var(--muted); white-space: nowrap; }
.topic-list form { display: flex; gap: 6px; margin: 8px 0 0; }
.topic-list input { flex: 1; min-height: 38px; font-size: 11px; }
.topic-list .button { min-height: 38px; padding: 7px 10px; }
@media (max-width: 600px) {
  .feature-panel { margin-top: 18px; padding: 14px; }
  .reading-form { display: grid; grid-template-columns: minmax(0,1fr) 90px; }
  .reading-form input[name="book_title"] { grid-column: 1 / -1; width: 100%; }
  .reading-form input[name="minutes"] { width: 100%; }
  .reading-form .button { min-height: 42px; }
  .activity-form,.practice-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .activity-form input[name="title"],.practice-form select { grid-column: 1 / -1; width: 100%; }
  .activity-form select:first-of-type { grid-column: 1 / -1; }
  .activity-form button,.practice-form button { min-height: 42px; }
  .reading-list > div,.activity-list article { align-items: flex-start; flex-direction: column; gap: 4px; }
  .activity-list article { flex-direction: row; align-items: center; }
  .subject-card { min-width: 0; }
  .subject-title { min-width: 0; flex-wrap: wrap; }
  .subject-title strong { overflow-wrap: anywhere; }
}

/* Visual refinement: softer surfaces, clearer hierarchy and persistent section navigation. */
:root {
  --ink: #29263a;
  --muted: #77758a;
  --purple: #6754c8;
  --line: #e9e6f0;
  --paper: #fff;
  background: #f7f6fb;
  color: var(--ink);
}
body { color: var(--ink); background: linear-gradient(180deg,#fbfaff 0,#f7f6fb 380px); }
.topbar { height: 66px; box-shadow: 0 2px 12px #29263a08; }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand:first-letter { font-size: 25px; }
.user-tools > span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav a { transition: background-color .16s ease,color .16s ease,transform .16s ease; }
.sidebar nav a:hover { background: #f2effb; color: var(--purple); }
.sidebar nav a:active { transform: scale(.98); }
.welcome { padding: 4px 0 2px; }
.welcome h1 { letter-spacing: -1.5px; }
.summary { box-shadow: 0 5px 18px #39305006; transition: transform .16s ease,box-shadow .16s ease; }
.summary:hover { transform: translateY(-2px); box-shadow: 0 10px 25px #3930500c; }
.summary.accent { background: linear-gradient(145deg,#f2efff,#ebe7ff); }
.effort-panel { border-color: #e7e1fb; background: linear-gradient(145deg,#fff 0%,#fbfaff 100%); box-shadow: 0 8px 28px #4435840a; }
.effort-heading { align-items: center; }
.effort-score { min-width: 105px; padding: 11px 15px; border: 1px solid #e6e0fb; border-radius: 13px; background: #f4f1ff; text-align: center; }
.effort-actions { grid-template-columns: repeat(3,minmax(0,1fr)); }
.effort-action { display: flex; flex-direction: column; min-height: 156px; border-color: #e9e6f2; background: #fff; box-shadow: 0 3px 10px #29263a05; transition: border-color .16s ease,transform .16s ease,box-shadow .16s ease; }
.effort-action:hover { transform: translateY(-2px); border-color: #d8d0f5; box-shadow: 0 8px 18px #51448b0c; }
.effort-action h3 { flex: 1; font-size: 13px; }
.effort-action.mission-paused { background: #faf9fc; }
.effort-controls { display: flex; align-items: center; gap: 8px; margin-top: auto; }
.effort-focus { width: 100%; min-width: 0; min-height: 40px; margin-top: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.effort-controls form:first-child { flex: 1; }
.effort-controls > .effort-recorded { flex: 1; }
.effort-button { min-height: 42px; font-size: 12px; }
.effort-toggle { min-height: 42px; padding: 7px 10px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; cursor: pointer; }
.effort-toggle:hover { border-color: var(--line); background: #faf9fc; color: var(--ink); }
.feature-panel { background: #fff; box-shadow: 0 5px 18px #39305005; }
.feature-panel .section-heading h2,.section-heading h2 { letter-spacing: -.6px; }
.feature-panel .section-heading { align-items: center; }
.reading-form input,.activity-form input,.activity-form select,.practice-form select,.practice-form input,.topic-list input,.add-task input,.add-task select,.add-step input { transition: border-color .15s ease,box-shadow .15s ease; }
:where(input,select):focus { border-color: #a79be4 !important; box-shadow: 0 0 0 3px #6754c81a; outline: 0; }
.button { min-height: 42px; transition: background-color .15s ease,border-color .15s ease,transform .15s ease; }
.button:hover { border-color: #cbc5e1; background-color: #fbfaff; }
.button.primary:hover { border-color: #5743bb; background: #5743bb; }
.button:active { transform: translateY(1px); }
.subject-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: start; }
.subject-card { display: block; min-width: 0; padding: 14px; border-radius: 13px; box-shadow: 0 3px 14px #39305005; transition: border-color .16s ease,box-shadow .16s ease; }
.subject-card:hover { border-color: #dcd7eb; box-shadow: 0 7px 20px #3930500a; }
.subject-title { min-height: 25px; }
.topic-list { margin-top: 8px; border-top-color: #f0eef4; }
.topic-list summary { min-height: 38px; padding-top: 9px; }
.topic-list summary span { margin-left: auto; padding: 2px 7px; border-radius: 20px; background: #f3f1f8; }
.task-card { box-shadow: 0 3px 14px #39305005; }
.task-row { min-height: 62px; }
.task-steps[open] { background: #fdfcff; }
.task-steps summary { min-height: 46px; }
.notice { border: 1px solid #d5edde; }
@media (max-width: 1100px) {
  .effort-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .subject-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .sidebar nav { gap: 5px; }
  .sidebar nav a { flex: 1 1 auto; justify-content: center; }
  .subject-list { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  body { background: #f7f6fb; }
  .topbar { height: 58px; }
  .sidebar nav { display: flex; flex-wrap: nowrap; gap: 3px; overflow-x: auto; }
  .sidebar nav a { min-width: 68px; min-height: 56px; flex: 0 0 68px; gap: 4px; padding: 5px 4px; font-size: 11px; }
  .sidebar nav a .nav-icon { font-size: 20px; }
  .user-tools { gap: 8px; font-size: 12px; }
  .user-tools > span { max-width: 95px; }
  .layout { padding-top: 17px; }
  .welcome { margin-bottom: 18px; }
  .summary-grid { gap: 8px; }
  .summary { min-height: 98px; padding: 12px; box-shadow: 0 3px 12px #39305006; }
  .summary:last-child { min-height: 84px; }
  .summary .eyebrow { font-size: 9px; }
  .summary span:last-child { line-height: 1.35; }
  .effort-panel { padding: 14px; border-radius: 15px; }
  .effort-heading { align-items: flex-start; gap: 8px; }
  .effort-score { min-width: 78px; padding: 8px; }
  .effort-score strong { font-size: 21px; }
  .effort-score span { max-width: none; }
  .effort-actions { grid-template-columns: 1fr; }
  .effort-action { display: grid; grid-template-columns: 22px minmax(0,1fr); min-height: 0; gap: 6px 9px; padding: 11px; }
  .effort-action h3 { margin: 2px 0 0; font-size: 12px; }
  .effort-controls { grid-column: 2; width: 100%; margin-top: 3px; }
  .effort-focus { grid-column: 2; min-height: 42px; margin-top: 2px; font-size: 12px; }
  .effort-controls form:first-child { flex: 1; }
  .effort-controls form:last-child { flex: 0 0 auto; }
  .effort-button { min-width: 0; min-height: 42px; }
  .effort-toggle { min-width: 65px; }
  .effort-recorded { grid-column: 2; }
  .effort-note { font-size: 10px; }
  .feature-panel { padding: 14px; border-radius: 14px; }
  .feature-panel .section-heading p { line-height: 1.4; }
  .subject-list { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .layout { padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
  .section-heading[id],#esfuerzo,#lectura,#actividades { scroll-margin-top: 72px; }
}

/* Local entertainment corner: small, optional activities with no score or timer. */
.fun-shell { width: min(860px,calc(100% - 40px)); margin: 44px auto 74px; }
.fun-heading { margin-bottom: 23px; }
.fun-heading h1 { margin: 7px 0; font: 800 32px Manrope,sans-serif; letter-spacing: -1px; }
.fun-heading p { max-width: 58ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.fun-picker { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-bottom: 15px; }
.fun-tab { display: grid; justify-items: start; gap: 5px; min-height: 108px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; }
.fun-tab > span { font-size: 22px; }
.fun-tab strong { font-size: 13px; }
.fun-tab small { color: var(--muted); font-size: 11px; }
.fun-tab.is-selected { border-color: #d9d0ff; background: #f1eeff; box-shadow: 0 4px 15px #6453bd0c; }
.fun-tab:focus-visible,.memory-card:focus-visible,.riddle-choice:focus-visible,.fun-panel button:focus-visible { outline: 3px solid #a99af5; outline-offset: 2px; }
.fun-panel { min-height: 355px; padding: 21px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: 0 6px 24px #39305006; }
.fun-panel[hidden] { display: none; }
.fun-panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }
.fun-panel-heading h2 { margin: 5px 0; font: 700 20px Manrope,sans-serif; letter-spacing: -.4px; }
.fun-panel-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.memory-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; max-width: 510px; margin: 0 auto; }
.memory-card { min-height: 72px; border: 1px solid #e8e4f2; border-radius: 13px; background: #f7f5fd; color: #6655bd; font: 700 24px 'DM Sans',sans-serif; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.memory-card:hover { transform: translateY(-2px); background: #f0edff; }
.memory-card.is-open { border-color: #d9d0ff; background: #fff; }
.memory-card.is-matched { border-color: #cde5d7; background: #f2faf5; cursor: default; }
.memory-card:disabled { opacity: 1; }
.fun-feedback { min-height: 25px; margin: 14px 0 0; color: #625c79; font-size: 12px; line-height: 1.5; text-align: center; }
.riddle-prompt { margin: 20px 0; font: 700 18px/1.5 Manrope,sans-serif; color: #38344d; }
.riddle-choices { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.riddle-choice { min-height: 48px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); font: 600 12px 'DM Sans',sans-serif; cursor: pointer; }
.riddle-choice:hover { border-color: #d3cafa; background: #fbfaff; }
.riddle-choice.is-right { border-color: #a9d4b8; background: #eff9f2; color: #34754b; }
.riddle-choice.is-reveal { border-color: #e8dba9; background: #fffaf0; }
.story-card { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; min-height: 125px; margin: 22px 0 14px; padding: 18px; border: 1px solid #e7e1fa; border-radius: 14px; background: linear-gradient(135deg,#f7f4ff,#fff9f0); }
.story-spark { color: #806bd2; font-size: 21px; }
.story-card p { margin: 3px 0; color: #4b465e; font: 600 16px/1.65 Manrope,sans-serif; }
.fun-small-note { margin: 12px 0 0; color: var(--muted); font-size: 10px; }
.fun-footer { display: flex; justify-content: center; align-items: center; gap: 8px; margin: 18px 0; color: var(--muted); font-size: 12px; }
.fun-footer > span { font-size: 18px; }
.fun-footer p { margin: 0; }
.fun-footer a { color: #5d4bb9; font-weight: 700; text-decoration: none; }
@media (max-width: 600px) {
  .fun-shell { width: calc(100% - 28px); margin: 27px auto 38px; }
  .fun-heading h1 { font-size: 28px; }
  .fun-picker { gap: 7px; }
  .fun-tab { min-height: 98px; padding: 11px 9px; border-radius: 12px; }
  .fun-tab > span { font-size: 20px; }
  .fun-tab strong { font-size: 11px; }
  .fun-tab small { font-size: 9px; line-height: 1.3; }
  .fun-panel { min-height: 340px; padding: 15px; border-radius: 14px; }
  .fun-panel-heading { align-items: flex-start; }
  .fun-panel-heading .button { flex: 0 0 auto; min-height: 42px; padding: 8px 10px; font-size: 11px; }
  .memory-board { gap: 7px; }
  .memory-card { min-height: 65px; border-radius: 11px; }
  .riddle-prompt { margin: 17px 0; font-size: 16px; }
  .riddle-choices { grid-template-columns: 1fr; }
  .riddle-choice { min-height: 46px; text-align: left; }
  .fun-footer { align-items: flex-start; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  .memory-card { transition: none; }
  .memory-card:hover { transform: none; }
}
@media (max-width: 350px) {
  .sidebar nav a { font-size: 8px; }
  .summary { padding: 10px; }
  .effort-score { min-width: 70px; }
}
@media (max-width: 380px) {
  .subject-list { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

.mission-create { display: grid; grid-template-columns: minmax(180px,1fr) minmax(170px,.65fr) auto; align-items: center; gap: 8px; margin-top: 14px; padding: 12px; border: 1px dashed #dcd6f2; border-radius: 12px; background: #faf9ff; }
.mission-create input,.mission-create select,.topic-progress select { min-width: 0; min-height: 42px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.mission-create .button { min-width: 130px; }
.effort-level { display: grid; grid-template-columns: minmax(0,1fr) minmax(120px,220px); align-items: center; gap: 14px; margin: 16px 0; padding: 14px; border: 1px solid #ece8fa; border-radius: 13px; background: #fff; }
.effort-level-copy { display: grid; gap: 3px; }
.effort-level-copy strong { font: 700 14px Manrope,sans-serif; }
.effort-level-copy small { color: var(--muted); font-size: 11px; }
.progress-track { height: 9px; overflow: hidden; border-radius: 99px; background: #eeeaf6; }
.progress-track > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#8c7be0,#6754c8); transition: width .25s ease; }
.weekly-goal { margin: 14px 0 16px; padding: 16px; border: 1px solid #e8e2fb; border-radius: 14px; background: linear-gradient(135deg,#f7f5ff,#fff 70%); }
.goal-heading,.goal-progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.goal-heading h3 { margin: 4px 0 0; font: 700 16px Manrope,sans-serif; }
.goal-paused-label { padding: 5px 9px; border-radius: 99px; background: #f0eef4; color: #686579; font-size: 11px; }
.goal-description { margin: 11px 0; font-size: 13px; line-height: 1.45; }
.goal-progress-row { margin-bottom: 7px; color: #6f6c80; font-size: 11px; }
.goal-progress-row strong { color: #5d4bb9; }
.goal-track { height: 8px; background: #e8e3f6; }
.goal-form { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.65fr) auto; align-items: end; gap: 9px; margin-top: 12px; }
.goal-form label { display: grid; gap: 5px; color: #716d82; font-size: 10px; font-weight: 700; }
.goal-form select { min-width: 0; min-height: 42px; padding: 8px 10px; font-size: 12px; }
.goal-pause-form { display: flex; justify-content: flex-end; margin-top: 4px; }
.weekly-goal + .effort-note { margin-top: 10px; }
.practice-summary { display: flex; gap: 7px; }
.practice-summary > span { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 6px 8px; border: 1px solid #efedf4; border-radius: 9px; background: #fff; }
.practice-summary > .practice-this-week { border-color: #e7e1fb; background: #f7f5ff; }
.practice-summary strong { color: #514794; font: 700 14px Manrope,sans-serif; }
.practice-summary small { color: var(--muted); font-size: 9px; }
.topic-practice { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: -3px; color: #605c72; font-size: 10px; }
.topic-practice small { color: var(--muted); font-size: 9px; }
@media (max-width: 600px) {
  .practice-summary { gap: 5px; }
  .practice-summary > span { flex: 1; justify-content: center; gap: 5px; padding: 6px 5px; }
  .practice-summary small { font-size: 8px; }
  .topic-practice { font-size: 10px; }
}
.topic-row { display: grid; gap: 8px; padding: 8px 0; border-bottom: 1px solid #f0eef4; }
.topic-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.topic-meta strong { min-width: 0; font-size: 11px; font-weight: 650; overflow-wrap: anywhere; }
.topic-meta small { color: var(--muted); font-size: 10px; text-align: right; }
.topic-progress { display: grid !important; grid-template-columns: minmax(0,1fr) auto; gap: 6px !important; margin: 0 !important; }
.topic-progress select { width: 100%; min-height: 38px; padding: 7px 9px; font-size: 11px; }
.topic-progress .button { min-height: 38px; padding: 7px 10px; font-size: 11px; }
.topic-list ul { gap: 0; }
@media (max-width: 600px) {
  .effort-level { grid-template-columns: 1fr; gap: 9px; padding: 12px; }
  .goal-form { grid-template-columns: 1fr 1fr; gap: 8px; }
  .goal-form label:first-child { grid-column: 1 / -1; }
  .goal-form .button { grid-column: 1 / -1; min-height: 44px; }
  .weekly-goal { padding: 13px; }
  .goal-description { font-size: 12px; }
  .mission-create { grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 10px; }
  .mission-create input { grid-column: 1 / -1; width: 100%; min-height: 44px; font-size: 13px; }
  .mission-create select { width: 100%; min-height: 44px; font-size: 12px; }
  .mission-create .button { min-width: 0; min-height: 44px; padding-inline: 10px; font-size: 12px; }
  .topic-row { gap: 7px; }
  .topic-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .topic-meta small { text-align: left; }
  .topic-progress { grid-template-columns: minmax(0,1fr) auto; }
}

.companion-panel { display: flex; align-items: center; gap: 16px; margin: 14px 0; padding: 15px; border: 1px solid #e8e2fb; border-radius: 15px; background: linear-gradient(115deg,#f5f2ff,#fff 68%); }
.companion-avatar { display: grid; place-items: center; width: 76px; height: 76px; flex: 0 0 76px; border: 1px solid #e4dcff; border-radius: 24px; background: radial-gradient(circle at 35% 25%,#fff 0,#efe9ff 70%); font-size: 38px; box-shadow: 0 6px 16px #4b378513; animation: companion-float 3.6s ease-in-out infinite; }
.companion-owl { background: radial-gradient(circle at 35% 25%,#fff 0,#e9f3ff 70%); border-color: #d8e9fb; }
.companion-axolotl { background: radial-gradient(circle at 35% 25%,#fff 0,#ffeaf2 70%); border-color: #f5dce8; }
.companion-main { min-width: 0; flex: 1; }
.companion-main h3,.badge-heading h3 { margin: 3px 0; font: 750 16px Manrope,sans-serif; }
.companion-main > p { margin: 0 0 9px; color: var(--muted); font-size: 11px; }
.companion-form { display: grid; grid-template-columns: minmax(130px,.8fr) minmax(160px,1fr) auto; align-items: center; gap: 7px; }
.companion-form input,.companion-form select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.companion-form .button { min-height: 40px; padding: 7px 12px; font-size: 11px; }
.companion-unlocks { display: flex; gap: 8px; margin-top: 8px; }
.companion-unlocks > span { display: grid; justify-items: center; gap: 1px; font-size: 20px; }
.companion-unlocks small { color: var(--muted); font-size: 9px; }
.companion-locked { filter: grayscale(1); opacity: .48; }
.badge-panel { margin: 14px 0 18px; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.badge-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.badge-heading > span { color: var(--muted); font-size: 10px; }
.badge-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.badge-card { display: flex; align-items: flex-start; gap: 9px; min-width: 0; min-height: 82px; padding: 10px; border: 1px solid #eeeaf5; border-radius: 11px; background: #fbfaff; }
.badge-earned { border-color: #e7e0fc; background: linear-gradient(140deg,#f6f3ff,#fff); }
.badge-locked { background: #faf9fc; }
.badge-medal { display: grid; place-items: center; width: 27px; height: 27px; flex: 0 0 27px; border-radius: 50%; background: #eeeaf8; color: #9792a6; font-size: 16px; }
.badge-earned .badge-medal { background: #e8e1ff; color: #5d4bb9; }
.badge-card strong { display: block; overflow-wrap: anywhere; font-size: 10px; line-height: 1.35; }
.badge-card p { margin: 4px 0; color: #777489; font-size: 9px; line-height: 1.4; }
.badge-card small { color: var(--muted); font-size: 8px; }
@keyframes companion-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@media (max-width: 600px) {
  .companion-panel { align-items: flex-start; gap: 11px; padding: 12px; }
  .companion-avatar { width: 56px; height: 56px; flex-basis: 56px; border-radius: 18px; font-size: 29px; }
  .companion-main h3 { font-size: 15px; }
  .companion-main > p { font-size: 10px; }
  .companion-form { grid-template-columns: 1fr 1fr; }
  .companion-form label:first-child { grid-column: 1 / -1; }
  .companion-form .button { min-height: 42px; }
  .badge-panel { padding: 12px; }
  .badge-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .badge-card { min-height: 86px; gap: 7px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .companion-avatar { animation: none; }
}

.week-board { margin-top: 20px; padding: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 18px #39305005; }
.week-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.week-heading h2 { margin: 4px 0; font: 750 19px Manrope,sans-serif; letter-spacing: -.5px; }
.week-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.week-heading > a { flex: 0 0 auto; color: var(--purple); text-decoration: none; font-size: 11px; font-weight: 700; }
.week-heading > a:hover { text-decoration: underline; }
.week-hint { display: none; margin: 0 0 8px; color: var(--muted); font-size: 10px; }
.week-days { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: 7px; }
.week-day { min-width: 0; min-height: 150px; padding: 9px 8px; border: 1px solid #eeecf3; border-radius: 11px; background: #fcfbfe; }
.week-day.is-today { border-color: #cfc7f1; background: #f5f2ff; box-shadow: inset 0 2px 0 #8d7cde; }
.week-day-head { display: flex; align-items: center; gap: 5px; padding-bottom: 8px; border-bottom: 1px solid #ebe8f0; }
.week-day-head > span { color: var(--muted); font-size: 9px; text-transform: capitalize; }
.week-day-head > strong { font-size: 13px; }
.week-day-head em { margin-left: auto; color: var(--purple); font-size: 8px; font-style: normal; font-weight: 800; text-transform: uppercase; }
.week-day-items { display: grid; gap: 6px; padding-top: 7px; }
.week-item { display: flex; align-items: flex-start; gap: 5px; min-width: 0; padding: 6px; border: 1px solid #e8e5ef; border-radius: 8px; background: #fff; color: var(--ink); text-decoration: none; }
.week-item:hover { border-color: #cfc7f1; }
.week-item-icon { flex: 0 0 13px; color: var(--purple); font-size: 11px; line-height: 1.2; }
.week-item > div { display: grid; min-width: 0; gap: 3px; }
.week-item strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 9px; line-height: 1.3; overflow-wrap: anywhere; }
.week-item small { color: var(--muted); font-size: 8px; line-height: 1.2; }
.activity-item { background: #f8f6ff; }
.activity-item .week-item-icon { color: #7c65c7; }
.week-empty { margin: 0; padding: 8px 2px; color: #a09cac; font-size: 9px; line-height: 1.4; }
.week-empty-state { display: flex; align-items: center; gap: 13px; margin-top: 10px; padding: 17px; border: 1px dashed #ddd7ef; border-radius: 13px; background: linear-gradient(110deg,#fbfaff,#fff); }
.week-empty-state > span { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 13px; background: #f0edff; color: #6856bd; font-size: 22px; }
.week-empty-state > div:nth-child(2) { min-width: 0; flex: 1; }
.week-empty-state strong { color: var(--ink); font-size: 13px; }
.week-empty-state p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
@media(max-width:600px) {
  .week-empty-state { align-items: flex-start; flex-wrap: wrap; gap: 10px; padding: 13px; }
  .week-empty-state > span { width: 34px; height: 34px; flex-basis: 34px; font-size: 19px; }
  .week-empty-state > div:nth-child(2) { flex-basis: calc(100% - 50px); }
}

.inline-create-input { width: 100%; min-width: 0; min-height: 42px; margin-top: 6px; padding: 9px 11px; border: 1px solid #cfc7ee; border-radius: 10px; background: #fff; color: #302b42; font: inherit; font-size: 14px; }
.inline-create-input[hidden] { display: none!important; }
.focus-start-form .inline-create-input { min-height: 42px; padding: 8px 9px; font-size: 12px; }
@media(max-width:600px) { .inline-create-input,.focus-start-form .inline-create-input { min-height: 48px; padding: 10px 12px; font-size: 16px; } }
.week-previous { margin-top: 11px; border-top: 1px solid #eeecf3; }
.week-previous summary { padding-top: 10px; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.week-previous ul { display: grid; gap: 5px; margin: 8px 0 0; padding-left: 17px; }
.week-previous li { font-size: 11px; }
.week-previous a { color: var(--ink); text-decoration: none; }
.week-previous a:hover { color: var(--purple); }
.week-previous small { margin-left: 8px; color: var(--muted); }
.week-unplanned { margin-top: 10px; border: 1px dashed #d9d4e6; border-radius: 10px; background: #faf9fd; }
.week-unplanned summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 8px 11px; color: #555168; font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.week-unplanned summary::-webkit-details-marker { display: none; }
.week-unplanned summary::after { content: "＋"; color: var(--purple); font-size: 14px; }
.week-unplanned[open] summary::after { content: "−"; }
.week-unplanned summary span { margin-left: auto; color: var(--muted); font-size: 9px; font-weight: 500; }
.week-unplanned-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; padding: 0 10px 10px; }
.week-unplanned-list a { min-width: 0; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-size: 10px; text-decoration: none; overflow-wrap: anywhere; }
.week-unplanned-list a:hover { border-color: #cfc7f1; color: var(--purple); }
.week-unplanned-list small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.summary-action { display: block; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.summary-action:hover { color: var(--purple); text-decoration: underline; }
.task-card[id^="tarea-"] { scroll-margin-top: 78px; }
.task-edit { border-top: 1px solid var(--line); }
.task-edit summary { min-height: 42px; padding: 12px 14px 8px; color: var(--purple); font-size: 11px; font-weight: 700; cursor: pointer; list-style: none; }
.task-edit summary::-webkit-details-marker { display: none; }
.task-edit summary::after { content: "＋"; float: right; font-size: 14px; line-height: 12px; }
.task-edit[open] summary::after { content: "−"; }
.task-edit form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; padding: 2px 13px 12px; }
.task-edit input,.task-edit select { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 11px; }
.task-edit input[name="title"] { grid-column: 1 / -1; }
.task-edit button { grid-column: 1 / -1; }
.completed-tasks { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; background: #faf9fc; }
.completed-tasks > summary { padding: 12px 14px; color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer; }
.completed-task-list { display: grid; gap: 5px; padding: 0 12px 12px; }
.completed-task-list article { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.completed-task-list article > div { display: grid; gap: 3px; min-width: 0; }
.completed-task-list strong { font-size: 11px; overflow-wrap: anywhere; }
.completed-task-list span { color: var(--muted); font-size: 9px; }
.completed-task-list form { flex: 0 0 auto; margin: 0; }
.undo-done { min-height: 36px; padding: 6px 10px; border: 1px solid #e3dfeb; border-radius: 8px; background: #fff; color: #655a8e; font: inherit; font-size: 10px; font-weight: 700; cursor: pointer; }
.undo-done:hover { border-color: #cfc7f1; background: #f7f5ff; }
.task-status { flex: 0 0 auto; margin: 0; }
.status-action { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: 6px 9px; border: 1px solid #e2deeb; background: #faf9fc; color: #69657a; font: inherit; font-size: 9px; font-weight: 700; cursor: pointer; }
.status-action:hover { border-color: #cfc7f1; background: #f5f2ff; color: var(--purple); }
.status-action.is-doing { border-color: #d8d1f3; background: #f2efff; color: #5948ad; }
@media (max-width: 600px) {
  .task-edit summary { min-height: 44px; padding: 13px 12px 9px; }
  .task-edit form { grid-template-columns: 1fr; padding-inline: 11px; }
  .task-edit input,.task-edit select { min-height: 44px; font-size: 13px; }
  .task-edit input[name="title"],.task-edit button { grid-column: 1; }
  .task-edit button { min-height: 44px; }
  .completed-tasks > summary { min-height: 44px; }
  .completed-task-list article { align-items: flex-start; }
  .undo-done { min-height: 40px; }
  .task-status { margin-left: auto; }
  .status-action { min-height: 36px; padding: 6px 8px; font-size: 9px; }
}
@media (max-width: 600px) {
  .week-unplanned summary { min-height: 46px; font-size: 10px; }
  .week-unplanned summary span { max-width: 75px; text-align: right; line-height: 1.3; }
  .week-unplanned-list { grid-template-columns: 1fr; }
}
@media (max-width: 1000px) {
  .week-days { grid-template-columns: repeat(7,minmax(112px,1fr)); overflow-x: auto; padding: 0 0 5px; scroll-snap-type: x mandatory; scrollbar-color: #d9d4e6 transparent; scrollbar-width: thin; }
  .week-day { scroll-snap-align: start; }
}
@media (max-width: 600px) {
  .week-board { margin-top: 16px; padding: 14px; border-radius: 14px; }
  .week-heading { align-items: flex-start; }
  .week-heading h2 { font-size: 18px; }
  .week-heading p { max-width: 30ch; line-height: 1.4; }
  .week-heading > a { padding-top: 17px; }
  .week-hint { display: block; }
  .week-days { grid-template-columns: repeat(7,minmax(70vw,1fr)); gap: 8px; }
  .week-day { min-height: 132px; padding: 10px; }
  .week-day-head { gap: 7px; }
  .week-day-head > span { font-size: 10px; }
  .week-day-head > strong { font-size: 15px; }
  .week-item { gap: 8px; padding: 8px; }
  .week-item-icon { flex-basis: 15px; font-size: 13px; }
  .week-item strong { font-size: 11px; }
  .week-item small { font-size: 9px; }
  .week-empty { padding-top: 12px; font-size: 10px; }
}

/* Guided study session: focused, calm and comfortable on narrow screens. */
.study-page { min-height: 100vh; background: radial-gradient(ellipse at top,#f1edff 0,#f8f7fb 440px); }
.study-page .topbar { position: sticky; top: 0; z-index: 5; }
.study-top-label { color: var(--muted); font-size: 12px; text-align: right; }
.study-shell { width: min(640px,calc(100% - 36px)); margin: 42px auto 80px; }
.study-intro { margin: 0 0 22px; }
.study-intro h1 { margin: 8px 0; font: 800 clamp(28px,6vw,38px) Manrope,sans-serif; letter-spacing: -1.2px; }
.study-intro p { max-width: 54ch; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.study-focus { margin-top: 12px!important; color: var(--purple)!important; font-weight: 700; }
.study-card { display: grid; gap: 15px; padding: 24px; border: 1px solid #e8e4f3; border-radius: 20px; background: #fff; box-shadow: 0 14px 40px #40366b0c; }
.study-start-form label,.study-step-form label { display: grid; gap: 7px; color: #514d63; font-size: 12px; font-weight: 700; }
.optional-label { display: inline; color: var(--muted); font-weight: 500; }
.study-card input,.study-card select,.study-card textarea { width: 100%; min-width: 0; min-height: 46px; padding: 11px 12px; border: 1px solid #e6e3ed; border-radius: 10px; background: #fff; color: var(--ink); font: inherit; font-size: 14px; }
.study-card textarea { min-height: 130px; resize: vertical; line-height: 1.55; }
.study-card input:focus,.study-card select:focus,.study-card textarea:focus { border-color: #a99ee3; outline: 3px solid #eeeaff; }
.study-privacy,.study-prompt-hint { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.study-submit { min-height: 48px; display: flex; justify-content: center; align-items: center; gap: 8px; font-size: 14px; }
.study-submit:disabled { opacity: .55; cursor: not-allowed; }
.study-errors { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #f2d7dc; border-radius: 10px; background: #fff6f7; color: #a2394b; font-size: 13px; }
.study-errors p { margin: 3px 0; }
.study-progress { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-bottom: 13px; }
.study-progress span { height: 5px; border-radius: 8px; background: #e8e6ee; }
.study-progress .is-current { background: linear-gradient(90deg,#7867d7,#b1a6f0); }
.study-step-form > label:not(:first-child) { margin-top: 2px; }
.study-recap { padding: 12px 14px; border-left: 3px solid #b7adea; border-radius: 0 10px 10px 0; background: #f7f5ff; }
.study-recap p { margin: 7px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.study-form-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.study-text-button { min-height: 40px; padding: 8px 2px; border: 0; background: none; color: #6153ad; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.study-complete { text-align: center; }
.study-complete-mark { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto; border-radius: 18px; background: #f2efff; color: var(--purple); font-size: 28px; }
.study-complete h2 { margin: 0; font: 750 23px Manrope,sans-serif; }
.study-complete > p { margin: 0 auto 5px; max-width: 45ch; color: var(--muted); font-size: 13px; line-height: 1.55; }
.study-complete section { padding: 12px 14px; border-radius: 11px; background: #faf9fd; text-align: left; }
.study-complete section p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.study-complete .study-submit { margin-top: 4px; text-decoration: none; }
.week-actions { display: flex; align-items: center; gap: 13px; }
.open-sessions { display: grid; gap: 8px; margin: 12px 0 20px; padding: 13px 16px; border: 1px solid #e5e0f5; border-radius: 13px; background: #fbfaff; }
.open-sessions > a { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--ink); text-decoration: none; }
.open-sessions > a > span:first-child { display: grid; min-width: 0; gap: 3px; }
.open-sessions strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.open-sessions small { color: var(--muted); font-size: 11px; }
.resume-session,.subject-study-link,.task-study-link { color: #5e4cc2; font-size: 11px; font-weight: 700; text-decoration: none; }
.resume-session { flex: 0 0 auto; }
.subject-study-link { justify-self: start; padding: 5px 0; }
.task-study-link { display: inline-flex; padding: 0 14px 12px; }
@media(max-width:600px) {
 .study-page .topbar { height: 58px; padding-left: 14px; padding-right: 14px; }
 .study-top-label { max-width: 48%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
 .study-shell { width: min(100% - 26px,500px); margin: 25px auto 42px; }
 .study-intro { margin-bottom: 17px; }
 .study-intro h1 { font-size: 29px; }
 .study-intro p { font-size: 13px; }
 .study-card { gap: 13px; padding: 17px; border-radius: 16px; }
 .study-card textarea { min-height: 120px; }
 .study-form-actions { align-items: center; }
 .study-text-button { min-height: 44px; }
 .week-heading { align-items: flex-start; }
 .week-actions { align-items: flex-end; flex-direction: column; gap: 9px; }
 .week-actions .button { min-height: 42px; padding: 9px 11px; white-space: nowrap; }
 .subject-study-link,.task-study-link { min-height: 40px; align-items: center; }
}

/* Endless effort levels and their reviewable progress collection. */
.message-stack,.progress-messages { display: grid; gap: 8px; margin: 0 0 18px; }
.celebration { display: flex; align-items: center; gap: 10px; margin: 0; padding: 13px 16px; border: 1px solid #ead78b; border-radius: 13px; background: linear-gradient(110deg,#fff9dd,#fff); color: #574719; box-shadow: 0 6px 20px #b38a2012; font-size: 13px; font-weight: 700; line-height: 1.45; }
.celebration span { color: #c18d16; font-size: 20px; }
.progress-link { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
.progress-shell { width: min(900px,calc(100% - 40px)); margin: 42px auto 80px; }
.progress-heading { margin-bottom: 24px; }
.progress-heading h1 { margin: 7px 0; font: 800 clamp(30px,6vw,40px) Manrope,sans-serif; letter-spacing: -1.5px; }
.progress-heading p,.progress-caption { color: var(--muted); font-size: 13px; line-height: 1.55; }
.level-hero { display: flex; align-items: center; gap: 21px; padding: 23px; border: 1px solid #e5defc; border-radius: 20px; background: linear-gradient(115deg,#f0edff,#fff 78%); box-shadow: 0 10px 30px #4839820c; }
.level-orb { display: grid; place-items: center; width: 86px; height: 86px; flex: 0 0 86px; border: 5px solid #d6cdfa; border-radius: 50%; background: #fff; color: #5946b6; font: 800 28px Manrope,sans-serif; box-shadow: inset 0 0 0 4px #f0edff; }
.level-copy { flex: 1; min-width: 0; }
.level-copy h2 { margin: 5px 0; font: 750 21px Manrope,sans-serif; }
.level-copy p { margin: 0 0 13px; color: #625d74; font-size: 12px; }
.level-copy .progress-track { height: 9px; margin-bottom: 6px; }
.level-copy > small { color: var(--muted); font-size: 11px; }
.progress-section { margin-top: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.progress-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.progress-section-head h2 { margin: 5px 0 0; font: 750 20px Manrope,sans-serif; }
.collection-count { color: var(--muted); font-size: 11px; }
.infinite-mark { color: #8674dc; font: 400 40px Manrope,sans-serif; }
.level-roadmap { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 16px; }
.roadmap-step { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbfe; }
.roadmap-current { border-color: #cfc5f7; background: #f4f1ff; }
.roadmap-number { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #eeebfa; color: #6655bf; font-size: 14px; font-weight: 800; }
.roadmap-current .roadmap-number { background: var(--purple); color: white; }
.roadmap-step div { display: grid; min-width: 0; gap: 3px; }
.roadmap-step strong { font-size: 12px; }
.roadmap-step small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.companion-collection { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.collection-pet { display: grid; justify-items: center; gap: 7px; min-width: 0; padding: 13px 7px; border: 1px solid var(--line); border-radius: 13px; background: #fcfbfe; text-align: center; }
.collection-pet strong { max-width: 100%; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.collection-pet small { color: var(--muted); font-size: 10px; }
.pet-avatar { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid #e6e1f2; border-radius: 16px; background: #f4f1ff; font-size: 25px; }
.pet-locked { filter: grayscale(1); opacity: .56; }
.pet-selected { border-color: #c9bef2; background: #f7f4ff; box-shadow: inset 0 0 0 1px #ded6fa; }
.next-reward { margin: 14px 0 0; padding: 11px 13px; border-radius: 10px; background: #f5f2ff; color: #5749a1; font-size: 12px; line-height: 1.45; }
.progress-badges { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.progress-badge { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #faf9fc; opacity: .67; }
.progress-badge-earned { border-color: #eee1b0; background: #fffaf0; opacity: 1; }
.progress-badge .badge-medal { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: #efedf3; color: #9995a5; }
.progress-badge-earned .badge-medal { background: #fff0bd; color: #b7810a; }
.progress-badge div { min-width: 0; }
.progress-badge strong { font-size: 12px; }
.progress-badge p { margin: 4px 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.progress-badge small { color: #6958bf; font-size: 10px; font-weight: 700; }
.progress-footer { margin: 18px 0 0; color: var(--muted); text-align: center; font-size: 11px; line-height: 1.5; }
.companion-fox,.companion-red_panda { background: radial-gradient(circle at 35% 25%,#fff 0,#fff0e4 70%); border-color: #f4dfce; }
.companion-cat,.companion-turtle { background: radial-gradient(circle at 35% 25%,#fff 0,#e8f7ec 70%); border-color: #d8ecdd; }
.companion-whale { background: radial-gradient(circle at 35% 25%,#fff 0,#e5f5ff 70%); border-color: #d4eafa; }
.companion-dragon,.companion-phoenix { background: radial-gradient(circle at 35% 25%,#fff 0,#f4eaff 70%); border-color: #e7d8f5; }
.companion-capybara { background: radial-gradient(circle at 35% 25%,#fff 0,#f5efdf 70%); border-color: #e9dfc8; }
@media(max-width:700px) {
 .progress-shell { width: min(100% - 26px,560px); margin: 25px auto 45px; }
 .level-hero { align-items: flex-start; gap: 13px; padding: 16px; border-radius: 16px; }
 .level-orb { width: 65px; height: 65px; flex-basis: 65px; font-size: 22px; }
 .level-copy h2 { font-size: 17px; }
 .level-roadmap { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
 .roadmap-step { gap: 7px; padding: 9px; }
 .roadmap-number { width: 29px; height: 29px; flex-basis: 29px; font-size: 12px; }
 .companion-collection { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
 .collection-pet { padding: 10px 4px; }
 .pet-avatar { width: 42px; height: 42px; font-size: 22px; }
 .progress-badges { grid-template-columns: 1fr; }
 .progress-section { padding: 15px; }
}
@media(max-width:380px) {
 .companion-collection { grid-template-columns: repeat(3,minmax(0,1fr)); }
 .level-hero { flex-direction: column; }
 .level-orb { width: 56px; height: 56px; flex-basis: 56px; }
}

/* Brief, calm celebration when a milestone is reached. */
.celebration { position: relative; overflow: hidden; animation: celebration-enter .42s cubic-bezier(.2,.8,.25,1) both; }
.celebration::after { content: "✧  ✦"; flex: 0 0 auto; margin-left: auto; color: #d4a523; letter-spacing: 5px; font-size: 15px; animation: celebration-sparkle 1.8s ease-in-out infinite; }
.celebration span { animation: celebration-pop .6s cubic-bezier(.2,1.5,.45,1) both; }
@keyframes celebration-enter { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes celebration-pop { 0% { transform: scale(.5) rotate(-25deg); } 65% { transform: scale(1.3) rotate(9deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes celebration-sparkle { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
 .celebration,.celebration::after,.celebration span { animation: none; }
}

/* Each long-run level unlocks a new, equippable companion accent. */
.companion-avatar { position: relative; }
.companion-avatar > span { line-height: 1; }
.style-mark { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 27px; height: 27px; border: 2px solid #fff; border-radius: 50%; background: hsl(var(--style-hue) 82% 94%); color: hsl(var(--style-hue) 70% 38%); box-shadow: 0 2px 8px #33265328; font-size: 15px; font-style: normal; }
.companion-form { grid-template-columns: minmax(115px,.8fr) minmax(145px,1fr) minmax(180px,1.2fr) auto; }
.companion-form label { min-width: 0; }
.progress-section .companion-collection + .next-reward { margin-top: 12px; }
.style-collection { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 15px; }
.style-card { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fcfbfe; }
.style-selected { border-color: #ccbff3; background: #f7f4ff; box-shadow: inset 0 0 0 1px #e4dcfa; }
.style-locked { opacity: .55; filter: grayscale(.65); }
.style-swatch { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid hsl(var(--style-hue) 65% 83%); border-radius: 13px; background: hsl(var(--style-hue) 80% 95%); color: hsl(var(--style-hue) 70% 38%); font-size: 19px; }
.style-card div { display: grid; min-width: 0; gap: 4px; }
.style-card strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.style-card small { color: var(--muted); font-size: 10px; line-height: 1.35; }
.roadmap-reward { color: #5f4bb2!important; font-weight: 700; }
.companion-edit-form { grid-template-columns: minmax(120px,1fr) minmax(180px,1.4fr) minmax(120px,1fr) auto; margin-top: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #fbfaff; }
.companion-edit-form label { display: grid; gap: 5px; color: #68647a; font-size: 10px; font-weight: 700; }
.companion-edit-form .button { min-height: 42px; align-self: end; }
.equipped-style { margin: 10px 0 0; color: #6553b8; font-size: 11px; font-weight: 700; }
@media(max-width:800px) {
 .style-collection { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .companion-edit-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .companion-edit-form .button { grid-column: 1 / -1; }
}
@media(max-width:600px) {
 .companion-form { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .companion-form label:first-child { grid-column: 1 / -1; }
 .companion-form .button { grid-column: 1 / -1; }
 .style-collection { gap: 7px; }
 .style-card { gap: 7px; padding: 9px; }
 .style-swatch { width: 34px; height: 34px; flex-basis: 34px; }
}
@media(max-width:380px) {
 .style-collection { grid-template-columns: 1fr; }
}

/* Topic maps reuse the student's own confidence setting and show practice days. */
.subject-topic-overview { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; margin: 0 0 8px; color: #5e5980; font-size: 10px; font-weight: 700; }
.subject-topic-overview small { color: var(--muted); font-size: 10px; font-weight: 500; }
.topic-map { display: flex; gap: 8px; overflow-x: auto; margin: 0 -2px 9px; padding: 3px 2px 8px; scrollbar-color: #d8d1ef transparent; scrollbar-width: thin; }
.topic-map-stop { position: relative; display: grid; grid-template-columns: 22px minmax(0,1fr); align-content: start; gap: 4px 7px; min-width: 138px; max-width: 190px; flex: 1 0 138px; padding: 9px; border: 1px solid var(--line); border-radius: 11px; background: #fbfaff; }
.topic-map-stop:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 19px; right: -9px; width: 9px; height: 2px; background: #d9d4e5; }
.topic-map-node { position: relative; z-index: 1; display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #d9d5e2; border-radius: 50%; background: white; color: #858195; font-size: 12px; font-weight: 800; }
.topic-map-stop strong { align-self: center; min-width: 0; overflow: hidden; color: #514d63; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.topic-map-stop small { grid-column: 2; color: var(--muted); font-size: 9px; line-height: 1.3; }
.topic-map-practicing { border-color: #e8dba9; background: #fffdf5; }
.topic-map-practicing .topic-map-node { border-color: #e9d47d; background: #fff4cc; color: #98720d; }
.topic-map-can_explain { border-color: #cde5d7; background: #f5fbf7; }
.topic-map-can_explain .topic-map-node { border-color: #a8d0b8; background: #e9f6ed; color: #3d7c55; }
.week-review-link { color: #5d4bb9; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.review-week-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.review-week-nav a { color: #5d4bb9; font-size: 11px; font-weight: 700; text-decoration: none; }
.review-week-nav strong { color: var(--ink); font-size: 12px; }
.review-week-nav > span { color: var(--muted); font-size: 10px; }
.review-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.review-stats article { display: grid; gap: 5px; min-height: 82px; padding: 14px; border: 1px solid #e8e2fb; border-radius: 14px; background: linear-gradient(145deg,#fff,#f7f5ff); }
.review-stats strong { color: #5946b6; font: 800 24px Manrope,sans-serif; }
.review-stats span { color: var(--muted); font-size: 10px; }
.review-section { margin-top: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.review-section-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 13px; }
.review-step-number { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%; background: #f0edff; color: #5e4cc2; font-size: 12px; font-weight: 800; }
.review-section-heading h2 { margin: 1px 0 4px; font: 750 17px Manrope,sans-serif; }
.review-section-heading p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.review-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.review-chips span { padding: 7px 10px; border: 1px solid #e6e1f4; border-radius: 99px; background: #f8f6ff; color: #554c87; font-size: 10px; font-weight: 700; }
.review-topic-chips { margin-top: 7px; }
.review-topic-chips span { border-color: #e9e7ed; background: #faf9fc; color: #686579; font-weight: 500; }
.review-session-list { display: grid; gap: 7px; margin: 12px 0 0; padding: 0; list-style: none; }
.review-session-list li { display: grid; gap: 3px; padding: 10px 12px; border-left: 3px solid #c8bef0; border-radius: 0 9px 9px 0; background: #faf9fe; }
.review-session-list strong { font-size: 11px; }
.review-session-list small { color: var(--muted); font-size: 10px; }
.review-gentle-note { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.review-reflection-form { display: grid; gap: 8px; }
.review-reflection-form label { margin-top: 3px; color: #514d63; font-size: 11px; font-weight: 700; }
.review-reflection-form textarea,.review-reflection-form input { width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font: inherit; font-size: 12px; }
.review-reflection-form textarea { min-height: 82px; resize: vertical; line-height: 1.5; }
.review-private-note { margin: 0; color: var(--muted); font-size: 10px; }
.review-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.review-actions .button { min-height: 42px; }
.review-clear { min-height: 40px; padding: 8px 10px; border: 0; background: transparent; color: #7e7182; font: inherit; font-size: 10px; cursor: pointer; }
.subject-progress-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 14px; }
.subject-progress-card { min-width: 0; padding: 15px; border: 1px solid #e9e5f2; border-radius: 14px; background: #fcfbfe; }
.subject-progress-head,.topic-progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.subject-progress-head > div { display: grid; gap: 4px; min-width: 0; }
.subject-progress-head h3 { margin: 0; color: var(--ink); font: 750 15px Manrope,sans-serif; }
.subject-progress-head span,.subject-progress-next { color: var(--muted); font-size: 10px; line-height: 1.4; }
.subject-progress-head > strong { flex: 0 0 auto; color: #5d4bb9; font-size: 14px; white-space: nowrap; }
.subject-progress-head > strong small { color: var(--muted); font-size: 9px; font-weight: 600; }
.subject-progress-card > .progress-track { margin-top: 12px; }
.subject-progress-next { margin: 5px 0 0; }
.topic-progress-details { margin-top: 12px; border-top: 1px solid #ebe8f1; }
.topic-progress-details > summary { padding: 10px 0 2px; color: #5c4cac; font-size: 10px; font-weight: 750; cursor: pointer; }
.topic-progress-list { display: grid; gap: 11px; padding-top: 11px; }
.topic-progress-row { display: grid; gap: 6px; }
.topic-progress-head { align-items: center; }
.topic-progress-head strong { min-width: 0; overflow-wrap: anywhere; color: #514d63; font-size: 10px; }
.topic-progress-head span { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.topic-progress-row .progress-track { height: 6px; }
.topic-progress-empty { margin: 11px 0 0; color: var(--muted); font-size: 10px; }

/* Contemporary Plan palette: violet focus, warm coral moments, clear ink. */
:root {
  --ink: #25243b;
  --muted: #62637a;
  --purple: #6658df;
  --line: #e7e5ef;
  --paper: #fff;
  background: #f5f4fa;
  color: var(--ink);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body { color: var(--ink); background: radial-gradient(ellipse at 92% 0,#eeeaff 0,transparent 32%),#f5f4fa; }
.topbar { background: rgba(255,255,255,.96); border-bottom-color: #e8e6f0; }
.brand { color: #6658df; }
.brand span { color: var(--ink); }
.brand .brand-mark { background: #efedff; color: #5b4dd0; }
.sidebar { border-color: #e7e5ef; background: rgba(255,255,255,.88); }
.sidebar nav a { color: #5c5e75; }
.sidebar nav a:hover { background: #f4f2ff; color: #5548c8; }
.sidebar nav .nav-active { background: #eeecff; color: #5144bd; }
.sidebar nav .nav-active .nav-icon { color: #6658df; }
.sidebar-note { background: #f0eeff; color: #5147a5; }
.eyebrow { color: #6c6785; }
.welcome h1,.week-heading h2,.section-heading h2,.effort-heading h2 { color: #25243b; }
.welcome p,.week-heading p { color: #62637a; }
.summary { border-color: #e7e5ef; background: #fff; box-shadow: 0 7px 22px #31265f0b; }
.summary strong { color: #312c52; }
.summary.accent { border-color: #e5e0ff; background: linear-gradient(145deg,#f3f0ff,#ebe8ff); }
.summary:last-child { background: linear-gradient(135deg,#fff2eb,#fff9f5); }
.summary:last-child::after { border-color: #f0c6b7; background: #ffe4d8; color: #ad563f; box-shadow: none; }
.summary-action { color: #5144bd; }
.summary-action:hover { color: #b95841; }
.week-board,.task-card,.feature-panel,.progress-section,.review-section { border-color: #e7e5ef; background: #fff; box-shadow: 0 8px 26px #31265f0b; }
.week-day { border-color: #e9e7f0; background: #faf9fd; }
.week-day.is-today { border-color: #d9d2ff; background: #f3f1ff; box-shadow: inset 0 3px 0 #6658df; }
.week-day-head em { color: #6658df; }
.week-actions a,.week-heading > a,.subject-study-link,.task-study-link,.study-text-button,.progress-link { color: #5548c8; }
.button.primary { border-color: #6658df; background: #6658df; }
.button.primary:hover { border-color: #5144c4; background: #5144c4; }
.nav-more-menu { background: #fff; }
.study-page { background: radial-gradient(ellipse at 92% 0,#eeeaff 0,transparent 34%),#f5f4fa; }
.login-page { background: radial-gradient(circle at 20% 8%,#eeeaff,transparent 36%),#f5f4fa; }
.level-orb { border-color: #ded8ff; background: #f3f1ff; color: #5548c8; box-shadow: inset 0 0 0 4px #eae7ff; }
.roadmap-current,.pet-selected { border-color: #d9d2ff; background: #f3f1ff; }
.roadmap-number { background: #eeecff; color: #5548c8; }
.next-reward { background: #fff1eb; color: #934e3d; }
.study-progress .is-current { background: linear-gradient(90deg,#a99eff,#6658df); }
.study-recap { border-left-color: #8b7df0; background: #f3f1ff; }
.study-complete-mark { background: #eeecff; color: #5548c8; }
.subject-progress-card { border-color: #e7e5ef; background: #fbfaff; }
.subject-progress-head > strong,.topic-progress-details > summary { color: #5548c8; }
.progress-badge-earned { border-color: #ded8ff; background: #f4f2ff; }
.badge-medal,.infinite-mark { color: #b95841; }

@media (max-width: 600px) {
  body { background: radial-gradient(ellipse at 95% 0,#eeebff 0,transparent 34%),#f5f4fa; }
  .layout { padding: 20px 16px calc(112px + env(safe-area-inset-bottom)); }
  .welcome { gap: 12px; margin-bottom: 22px; }
  .welcome h1 { font-size: clamp(37px, 10vw, 43px); line-height: 1.02; letter-spacing: -1.5px; }
  .welcome p,.content p { font-size: 16px; line-height: 1.55; }
  .content small,.content label { font-size: 14px; line-height: 1.45; }
  .content :is(.task-info span,.subject-title small,.topic-map-stop small,.week-item small,.effort-recorded,.effort-note,.mission-area,.reading-list span,.activity-list article span,.subject-topic-overview,.topic-practice,.badge-card p) { font-size: 14px; line-height: 1.45; }
  .eyebrow { font-size: 12px; letter-spacing: 1.15px; }
  .summary { min-height: 112px; padding: 15px; border-radius: 17px; }
  .summary strong { font-size: 34px; }
  .summary .eyebrow { font-size: 11px; }
  .summary span:last-child { font-size: 14px; }
  .summary:last-child { min-height: 116px; padding-right: 58px; }
  .summary-action { font-size: 17px; }
  .week-board { margin-top: 18px; padding: 17px; border-radius: 19px; }
  .week-heading { align-items: flex-start; }
  .week-heading h2,.section-heading h2 { font-size: 25px; }
  .week-heading p { font-size: 14px; }
  .week-empty-state { padding: 15px; }
  .week-empty-state strong { font-size: 15px; }
  .week-empty-state p { font-size: 14px; }
  .sidebar { border-top-color: #e4e1ef; background: rgba(255,255,255,.98); box-shadow: 0 -7px 24px #30265c15; }
  .sidebar nav > a,.nav-more > summary { min-height: 64px; color: #55566c; font-size: 12px; }
  .sidebar nav .nav-icon { width: 24px; height: 24px; flex-basis: 24px; color: #625a93; stroke-width: 1.9; }
  .sidebar nav .nav-active { background: #efedff; color: #5144bd; }
  .sidebar nav .nav-active .nav-icon { color: #6658df; }
  .nav-more-menu { border-color: #e4e1ef; box-shadow: 0 14px 36px #30265c24; }
  .nav-more-menu a { min-height: 48px; font-size: 15px; }
  .task-row { gap: 12px; padding: 15px; }
  .task-info strong { font-size: 16px; }
  .task-info span { font-size: 14px; }
  .task-steps summary,.task-edit summary,.topic-list summary { min-height: 48px; font-size: 14px; }
  .button,.effort-button,.effort-toggle { min-height: 48px; font-size: 15px; }
  input,select { font-size: 16px; }
}

/* Mobile navigation and effort summary: give both clear, usable proportions. */
@media (max-width: 600px) {
  .sidebar nav { align-items: stretch; gap: 3px; }
  .sidebar nav > a,.nav-more > summary {
    min-height: 76px;
    padding: 9px 4px;
    gap: 6px;
    font-size: 15px;
    line-height: 1.15;
  }
  .sidebar nav .nav-icon { width: 28px; height: 28px; flex-basis: 28px; }
  .effort-heading { display: grid; grid-template-columns: minmax(0,1fr); gap: 12px; }
  .effort-heading > div:first-child { min-width: 0; }
  .effort-heading h2 { font-size: 23px; line-height: 1.2; }
  .effort-heading p { max-width: 38ch; font-size: 16px; }
  .effort-score { width: 100%; min-width: 0; padding: 12px 14px; text-align: left; }
  .effort-score span { max-width: none; font-size: 14px; }
  .effort-score small { font-size: 14px; }
}

@media (max-width: 600px) {
  .companion-panel { display: block; padding: 16px; }
  .companion-avatar { width: 60px; height: 60px; margin: 0 0 12px; border-radius: 19px; font-size: 30px; }
  .companion-main { width: 100%; }
  .companion-main h3 { margin: 5px 0 7px; font-size: 20px; }
  .companion-main > p { margin: 0 0 14px; font-size: 15px; line-height: 1.45; }
  .companion-form { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .companion-form label:first-child,.companion-form .button { grid-column: auto; }
  .companion-form input,.companion-form select { min-height: 48px; padding: 10px 12px; font-size: 16px; }
  .companion-form .button { width: 100%; min-height: 50px; font-size: 16px; }
  .badge-panel { padding: 16px; }
  .badge-heading { align-items: flex-start; }
  .badge-heading > span { flex: 0 0 auto; padding-top: 5px; font-size: 14px; }
  .badge-grid { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .badge-card { min-height: 0; gap: 12px; padding: 13px; border-radius: 14px; }
  .badge-card > div { min-width: 0; }
  .badge-card strong { font-size: 16px; line-height: 1.35; }
  .badge-card p { margin: 5px 0; font-size: 15px; line-height: 1.45; }
  .badge-card small { font-size: 13px; }
  .badge-medal { width: 32px; height: 32px; flex-basis: 32px; font-size: 18px; }
}

@media(max-width:700px) {
 .review-week-nav { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
 .review-week-nav strong { grid-column: 1 / -1; grid-row: 1; }
 .review-week-nav > :last-child { justify-self: end; }
 .review-stats { gap: 7px; }
 .review-stats article { min-height: 76px; padding: 11px; }
 .review-stats strong { font-size: 21px; }
 .review-stats span { font-size: 9px; }
 .review-section { padding: 14px; }
 .subject-progress-grid { grid-template-columns: 1fr; gap: 9px; }
 .subject-progress-card { padding: 13px; }
 .week-actions { align-items: flex-end; }
 .week-review-link { text-align: right; }
}
@media(max-width:380px) {
 .review-stats { grid-template-columns: 1fr 1fr; }
 .review-stats article:last-child { grid-column: 1 / -1; }
}

/* Plan identity: an editorial study journal with ink, sage and citrus accents. */
:root {
  --ink: #20342f;
  --muted: #718079;
  --purple: #3f6857;
  --line: #e4e8df;
  --paper: #fffefa;
  background: #f2f3eb;
  color: var(--ink);
}
body { color: var(--ink); background: radial-gradient(ellipse at 90% 4%,#e9f0d9 0,transparent 30%),linear-gradient(180deg,#f8f7ef 0,#f2f3eb 430px); }
.topbar { background: rgba(255,254,250,.94); border-bottom-color: #e6e8df; box-shadow: 0 3px 18px #314b3c0a; }
.brand { color: #b85f3d; }
.brand span { color: var(--ink); }
.layout { max-width: 1440px; grid-template-columns: 232px minmax(0,1fr); gap: clamp(32px,5vw,76px); padding-top: 44px; }
.sidebar { top: 24px; height: calc(100vh - 108px); padding: 19px 14px; border: 1px solid #e5e7de; border-radius: 19px; background: rgba(255,254,250,.74); box-shadow: 0 12px 35px #334b3808; }
.sidebar h2 { max-width: 175px; color: var(--ink); font-size: 21px; line-height: 1.2; }
.sidebar nav { gap: 5px; }
.sidebar nav a { min-height: 45px; display: flex; align-items: center; gap: 11px; border-radius: 12px; color: #66756e; font-weight: 600; }
.sidebar nav a .nav-icon { width: 23px; color: #8b9a8d; font-size: 17px; text-align: center; }
.sidebar nav .nav-active { background: #eaf0df; color: #315946; }
.sidebar nav .nav-active .nav-icon { color: #b85f3d; }
.sidebar-note { position: relative; overflow: hidden; background: #eef2df; color: #52644f; }
.sidebar-note::after { content: "✳"; position: absolute; right: 10px; bottom: -15px; color: #d1dcac; font-size: 45px; }
.eyebrow { color: #8b7967; letter-spacing: 1.55px; }
.welcome { align-items: center; min-height: 119px; margin-bottom: 23px; }
.welcome h1 { margin: 9px 0 7px; color: var(--ink); font-size: clamp(35px,4vw,48px); line-height: 1.02; letter-spacing: -2px; }
.welcome p { color: #6f7d75; font-size: 14px; }
.profile-chip { border-color: #dfe6d7; background: #fffefa; color: #48624f; font-weight: 650; }
.summary-grid { grid-template-columns: minmax(130px,.68fr) minmax(130px,.68fr) minmax(290px,1.64fr); gap: 12px; }
.summary { position: relative; overflow: hidden; min-height: 135px; padding: 19px; border-color: #e4e8df; border-radius: 17px; background: #fffefa; box-shadow: 0 7px 22px #283e3108; }
.summary:first-child,.summary:nth-child(2) { align-content: center; }
.summary strong { color: #314b3d; font-size: 34px; }
.summary span:last-child { color: #77837b; }
.summary.accent { border-color: #dfe8cb; background: linear-gradient(145deg,#f1f5e4,#eaf0d9); }
.summary:last-child { padding-right: 64px; background: #e8efe0; }
.summary:last-child::after { content: "↗"; position: absolute; right: 18px; top: 17px; display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #d8e5bf; color: #40634d; font-size: 20px; }
.summary-action { width: fit-content; color: #294c39; font: 750 18px/1.25 Manrope,sans-serif; text-decoration: none; }
.summary-action:hover { color: #b85f3d; text-decoration: none; }
.week-board { margin-top: 16px; padding: 20px; border-color: #e3e7dc; border-radius: 18px; background: #fffefa; box-shadow: 0 9px 28px #283e3108; }
.week-heading h2,.section-heading h2,.effort-heading h2 { color: var(--ink); }
.week-heading h2 { font-size: 21px; }
.week-heading p { color: #7a877d; font-size: 12px; }
.week-actions a,.week-heading > a { color: #456d57; }
.week-day { border-color: #e8e9e1; border-radius: 13px; background: #fafaf5; }
.week-day.is-today { border-color: #c8d7ad; background: #f0f4e5; box-shadow: inset 0 3px 0 #b85f3d; }
.week-day-head { border-bottom-color: #e8e9e1; }
.week-day-head em { color: #a65337; }
.week-item { border-color: #e9e9e1; border-radius: 9px; }
.week-item-icon { color: #527660; }
.task-card,.feature-panel,.effort-panel { border-color: #e4e8df; border-radius: 17px; background: #fffefa; box-shadow: 0 7px 24px #283e3108; }
.task-card { border-radius: 14px; }
.task-row { background: transparent; }
.task-row:hover { background: #fbfbf5; }
.check,.step-check { border-color: #c7d1c4; }
.button.primary { border-color: #456b55; background: #456b55; color: #fffefa; }
.button.primary:hover { border-color: #355640; background: #355640; }
.button:not(.primary) { border-color: #dfe5d9; background: #fffefa; }
:where(input,select):focus { border-color: #86a17b!important; box-shadow: 0 0 0 3px #8ca77a24; }
.subject-card { border-color: #e4e8df; border-radius: 15px; background: #fffefa; box-shadow: 0 5px 18px #283e3107; }
.subject-card:hover { border-color: #cbd8bd; box-shadow: 0 9px 23px #283e310d; }
.subject-dot { box-shadow: 0 0 0 4px color-mix(in srgb,var(--subject-color),transparent 86%); }
.practice-summary > .practice-this-week { border-color: #e0e8d2; background: #f2f5e9; }
.practice-summary strong { color: #43664e; }
.topic-map-stop { border-color: #e7e9e0; border-radius: 12px; background: #fbfbf7; }
.topic-map-practicing { border-color: #e6d9ad; background: #fffaf0; }
.topic-map-can_explain { border-color: #cedfca; background: #f3f8f0; }
.effort-panel { background: linear-gradient(145deg,#fffefa,#f4f6ed); }
.effort-score { border-color: #e2e8d4; background: #f0f4e4; }
.effort-score strong,.goal-progress-row strong { color: #456b55; }
.effort-level { border-color: #e2e8d8; border-radius: 14px; background: #fffefa; }
.progress-track { background: #e8eadf; }
.progress-track > span { background: linear-gradient(90deg,#a7c67a,#557a59); }
.weekly-goal { border-color: #e2e8d4; background: linear-gradient(135deg,#f1f5e6,#fffefa 72%); }
.mission-create { border-color: #d9e2cc; background: #f7f8f0; }
.effort-action { border-color: #e4e8df; border-radius: 14px; }
.effort-button { border-color: #dce7cf; background: #f0f4e5; color: #3f654d; }
.effort-button:hover:not(:disabled) { background: #e5edda; }
.feature-panel { box-shadow: 0 7px 24px #283e3108; }
.progress-section,.review-section { border-color: #e4e8df; border-radius: 17px; background: #fffefa; }
.level-hero { border-color: #dfe7d2; background: linear-gradient(120deg,#edf3e2,#fffefa 76%); }
.level-orb { background: #dce9c5; color: #40624b; }
.progress-badge-earned { border-color: #d5e3c7; background: #f1f6e9; }
.style-selected { border-color: #cbdcb7; background: #f3f6e9; }
.companion-panel { border-color: #dfe7d2; background: linear-gradient(115deg,#eef3e2,#fffefa 72%); }
.fun-tab.is-selected { border-color: #cad9b6; background: #eef3e2; }
.story-card { border-color: #e5e4d2; background: linear-gradient(135deg,#f0f4e4,#fff9ef); }
.infinite-mark,.badge-medal { color: #a45c3c; }
@media(max-width:1100px) {
 .layout { gap: 32px; }
 .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .summary:last-child { grid-column: 1 / -1; min-height: 116px; }
}
@media(max-width:900px) {
 body { background: linear-gradient(180deg,#f8f7ef,#f2f3eb 500px); }
 .layout { max-width: 780px; gap: 18px; }
 .sidebar { padding: 12px; border-radius: 16px; }
 .sidebar h2 { max-width: none; }
 .sidebar nav a { background: #fffefa; border: 1px solid #e7e9e1; }
 .sidebar nav .nav-active { border-color: #dce7cf; background: #eaf0df; }
}
@media(max-width:600px) {
 body { background: #f4f4ed; }
 .topbar { background: rgba(255,254,250,.96); }
 .sidebar { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border: 0; border-top: 1px solid #e3e7dc; border-radius: 0; background: rgba(255,254,250,.98); }
 .sidebar nav a { border: 0; background: transparent; }
 .sidebar nav .nav-active { background: #eaf0df; }
 .welcome { min-height: 0; }
 .welcome h1 { font-size: clamp(34px,9vw,42px); }
 .summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .summary { min-height: 104px; padding: 13px; border-radius: 15px; }
 .summary strong { font-size: 28px; }
 .summary:last-child { min-height: 105px; padding-right: 55px; }
 .summary-action { font-size: 16px; }
 .week-board { padding: 14px; border-radius: 16px; }
 .week-day.is-today { box-shadow: inset 0 3px 0 #b85f3d; }
 .effort-panel,.feature-panel,.progress-section,.review-section { border-radius: 15px; }
}
@media(prefers-reduced-motion:reduce) {
 .summary:hover,.subject-card:hover,.effort-action:hover { transform: none; }
}


/* Desktop information architecture: work in one column, explore the subject map beside it. */
@media(min-width:1201px) {
 .home-workbench { display: grid; grid-template-columns: minmax(0,1.18fr) minmax(300px,.82fr); align-items: start; gap: 24px; margin-top: 30px; }
 .home-workbench > .section-heading { grid-column: 1; margin: 0 0 0; }
 .home-workbench > .add-task,.home-workbench > .task-list,.home-workbench > .completed-tasks { grid-column: 1; }
 .home-workbench > .section-heading[id="materias"] { grid-column: 2; grid-row: 1; }
 .home-workbench > .subject-list { grid-column: 2; grid-row: 2 / span 4; grid-template-columns: 1fr; }
 .home-workbench > .subject-list .subject-card { padding: 16px; }
 .home-workbench > .add-task { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
 .home-workbench > .add-task input[name="title"] { grid-column: 1 / -1; width: 100%; }
 .home-workbench > .add-task .button { grid-column: 1 / -1; min-height: 42px; }
}
.home-workbench { scroll-margin-top: 82px; }

/* Crisp, consistent line icons and a compact overflow menu. */
.brand-mark { display: inline-grid; width: 28px; height: 28px; place-items: center; border-radius: 9px; background: #eaf0df; color: #3d684c; vertical-align: middle; }
.brand-mark svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.sidebar nav .nav-icon { width: 21px; height: 21px; flex: 0 0 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.nav-more { min-width: 0; }
.nav-more > summary { display: none; }
.nav-more-menu { display: contents; }

/* Keep the phone layout explicit after the product theme overrides above. */
@media (max-width: 600px) {
  html, body { min-width: 320px; }
  body { color: #20342f; }
  .topbar { position: sticky; top: 0; z-index: 40; }
  .layout {
    display: block;
    padding: 18px 16px calc(104px + env(safe-area-inset-bottom));
  }
  .content { position: relative; z-index: 1; min-width: 0; color: #20342f; }
  .content p { font-size: 15px; line-height: 1.5; }
  .content small { font-size: 13px; line-height: 1.4; }
  .content label { font-size: 14px; }
  .content :is(.task-info span, .subject-title small, .topic-map-stop small, .week-item small, .effort-recorded, .effort-note, .mission-area, .reading-list span, .activity-list article span, .subject-topic-overview, .topic-practice, .badge-card p) { font-size: 13px; line-height: 1.45; }
  .welcome h1, .section-heading h2, .week-heading h2 { color: #20342f; }
  .welcome h1 { font-size: clamp(34px, 9vw, 40px); line-height: 1.04; letter-spacing: -1.3px; }
  .welcome p, .week-heading p { color: #53645a; font-size: 15px; line-height: 1.5; }
  .eyebrow { color: #62594d; font-size: 11px; letter-spacing: 1.25px; }
  .summary { background: #fffefa; }
  .summary .eyebrow { color: #635849; }
  .summary strong { color: #263f32; font-size: 31px; }
  .summary span:last-child { color: #4f5f55; font-size: 13px; line-height: 1.4; }
  .summary-action { font-size: 16px; line-height: 1.35; }
  .week-board { padding: 16px; }
  .week-heading h2 { font-size: 23px; }
  .sidebar {
    position: fixed;
    z-index: 50;
    inset: auto 0 0;
    width: 100%;
    height: auto;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #d9dfd3;
    border-radius: 0;
    background: #fffefa;
    box-shadow: 0 -5px 18px #20342f18;
  }
  .sidebar > .eyebrow, .sidebar h2, .sidebar-note { display: none; }
  .sidebar nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 2px;
    overflow: visible;
  }
  .sidebar nav > a, .nav-more > summary {
    min-width: 0;
    min-height: 60px;
    flex: 1 1 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px 3px;
    border-radius: 12px;
    color: #4f6158;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
  }
  .sidebar nav .nav-icon { width: 23px; height: 23px; flex-basis: 23px; color: #536c5c; stroke-width: 1.8; }
  .sidebar nav .nav-active { background: #eaf0df; color: #284b37; }
  .nav-more { position: relative; display: block; flex: 1 1 20%; min-width: 0; }
  .nav-more > summary { display: flex; list-style: none; cursor: pointer; }
  .nav-more > summary::-webkit-details-marker { display: none; }
  .nav-more-menu { position: absolute; right: 0; bottom: calc(100% + 10px); display: none; min-width: 176px; padding: 7px; border: 1px solid #e0e5db; border-radius: 15px; background: #fffefa; box-shadow: 0 12px 32px #20342f20; }
  .nav-more[open] .nav-more-menu { display: grid; gap: 3px; }
  .nav-more-menu a { min-height: 46px; flex: initial; flex-direction: row; justify-content: flex-start; gap: 11px; padding: 8px 11px; border-radius: 10px; font-size: 14px; text-align: left; }
  .nav-more-menu a .nav-icon { width: 20px; height: 20px; flex-basis: 20px; }
  .section-heading h2 { font-size: 23px; }
  .task-info strong { font-size: 15px; }
  .task-info span { font-size: 13px; line-height: 1.4; }
  .button, .effort-button, .effort-toggle { min-height: 46px; font-size: 14px; }
}
.week-empty-state { border-color: #dfe7d6; background: #f8faf2; }
.week-empty-state > span { background: #e7eed8; color: #517158; }
.summary:last-child::after { content: ""; border: 1px solid #ccdbb6; box-shadow: inset 0 0 0 6px #e2ebd1; }
@media(max-width:1200px) {
 .home-workbench { display: contents; }
}
.study-page { color: var(--ink); background: radial-gradient(ellipse at 90% 3%,#e9f0d9 0,transparent 32%),linear-gradient(180deg,#f8f7ef 0,#f2f3eb 500px); }
.login-page { background: radial-gradient(circle at 20% 10%,#e8efdc,transparent 36%),#f4f4ed; }
.level-orb { border-color: #cbdcb5; background: #fffefa; color: #456b55; box-shadow: inset 0 0 0 4px #eef3e3; }
.roadmap-current { border-color: #cbdcb5; background: #f2f6e9; }
.roadmap-number { background: #e9efdc; color: #4d6a53; }
.pet-selected { border-color: #cadbb8; background: #f3f6eb; box-shadow: inset 0 0 0 1px #e0e9d4; }
.next-reward { background: #f0f4e5; color: #49634b; }
.progress-badge small { color: #57745a; }
.study-progress .is-current { background: linear-gradient(90deg,#8daa6f,#557a59); }
.study-recap { border-left-color: #88a176; background: #f3f6ed; }
.study-text-button { color: #456b55; }
.study-complete-mark { background: #ecf2e2; color: #456b55; }
.progress-link { color: #355640; }
.subject-progress-card { border-color: #e2e8d9; background: #fcfcf7; }
.subject-progress-head > strong { color: #456b55; }
.topic-progress-details > summary { color: #456b55; }

/* Plan visual refresh: vivid violet, lilac surfaces, coral and butter accents. */
:root {
  --ink: #241f36;
  --muted: #5d586f;
  --purple: #5b4bd6;
  --line: #e6e1f0;
  --paper: #ffffff;
  color: var(--ink);
  background: #f7f5fc;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
body,.study-page { color: var(--ink); background: radial-gradient(ellipse at 92% 0,#eee9ff 0,transparent 34%),#f7f5fc; }
.login-page { background: radial-gradient(circle at 20% 10%,#eee9ff,transparent 36%),#f7f5fc; }
.topbar { background: rgba(255,255,255,.97); border-bottom-color: #e8e4f1; }
.brand { color: #5b4bd6; }
.brand span { color: var(--ink); }
.brand .brand-mark { background: #eeeaff; color: #5543c6; }
.sidebar { border-color: #e6e1f0; background: rgba(255,255,255,.91); }
.sidebar nav a { color: #5d586f; }
.sidebar nav a:hover { background: #f4f1ff; color: #4c3db6; }
.sidebar nav .nav-active { background: #ece8ff; color: #493ab2; }
.sidebar nav .nav-active .nav-icon { color: #5b4bd6; }
.sidebar-note { background: #eeeaff; color: #4b3ca9; }
.sidebar-note::after { color: #d3cafb; }
.eyebrow { color: #645c7c; }
.welcome h1,.section-heading h2,.week-heading h2,.effort-heading h2 { color: #241f36; }
.welcome p,.week-heading p { color: #5d586f; }
.profile-chip { border-color: #e3def1; background: #fff; color: #4b4561; }
.summary,.week-board,.task-card,.feature-panel,.effort-panel,.progress-section,.review-section { border-color: #e6e1f0; background-color: #fff; box-shadow: 0 8px 24px #30234f0d; }
.summary strong { color: #29243f; }
.summary.accent { border-color: #e5deff; background: linear-gradient(145deg,#f5f2ff,#ece8ff); }
.summary:last-child { background: linear-gradient(135deg,#fff0ea,#fff8f4); }
.summary:last-child::after { border-color: #f2c6b7; background: #ffe2d6; color: #9d4434; box-shadow: none; }
.summary-action,.week-actions a,.week-heading > a,.subject-study-link,.task-study-link,.study-text-button,.progress-link { color: #5141c2; }
.summary-action:hover,.week-actions a:hover { color: #a34335; }
.week-day { border-color: #eae6f1; background: #fbfaff; }
.week-day.is-today { border-color: #d7ceff; background: #f2efff; box-shadow: inset 0 3px 0 #6553dc; }
.week-day-head em { color: #5746cc; }
.week-item-icon { color: #5c50bd; }
.week-empty-state { border-color: #ddd6f4; background: #faf8ff; }
.week-empty-state > span { background: #eeeaff; color: #5746cc; }
.task-row:hover { background: #faf9ff; }
.check,.step-check { border-color: #c9c3dd; color: #5545c7; }
.button.primary { border-color: #5b4bd6; background: #5b4bd6; color: #fff; }
.button.primary:hover { border-color: #4939bd; background: #4939bd; }
.button:not(.primary) { border-color: #e4e0ed; background: #fff; }
:where(input,select):focus { border-color: #7767e4!important; box-shadow: 0 0 0 3px #7665e426; }
.subject-card,.topic-map-stop { border-color: #e6e1f0; background: #fff; }
.subject-card:hover { border-color: #cfc6f5; box-shadow: 0 8px 22px #453b8412; }
.practice-summary > .practice-this-week,.effort-score,.effort-level { border-color: #e3def4; background: #f4f1ff; }
.practice-summary strong,.effort-score strong,.effort-score span,.goal-progress-row strong { color: #5141c2; }
.topic-map-practicing { border-color: #f0d990; background: #fff9e8; }
.topic-map-can_explain { border-color: #c9d8f6; background: #f0f4ff; }
.effort-panel { background: linear-gradient(145deg,#fff,#f8f6ff); }
.progress-track { background: #e8e4f2; }
.progress-track > span,.study-progress .is-current { background: linear-gradient(90deg,#9a8df2,#5b4bd6); }
.weekly-goal,.mission-create,.level-hero,.companion-panel { border-color: #e3def4; background: linear-gradient(135deg,#f2efff,#fff 76%); }
.effort-action,.style-selected,.pet-selected,.roadmap-current { border-color: #dfdaf2; background: #f8f6ff; }
.effort-button { border-color: #d8d0fa; background: #f0edff; color: #493bb2; }
.effort-button:hover:not(:disabled) { background: #e8e3ff; }
.effort-button:disabled,.study-complete-mark { border-color: #d6def4; background: #edf1ff; color: #44558f; }
.level-orb,.roadmap-number { border-color: #d9d2fa; background: #eeeaff; color: #5141c2; }
.next-reward,.story-card { background: linear-gradient(130deg,#fff0ea,#fff9e8); color: #6e4137; }
.progress-badge-earned { border-color: #e7d7cb; background: #fff6ef; }
.progress-badge small,.subject-progress-head > strong,.topic-progress-details > summary { color: #5141c2; }
.subject-progress-card { border-color: #e6e1f0; background: #fcfbff; }
.fun-tab.is-selected { border-color: #d8d0fa; background: #eeeaff; }
.badge-medal,.infinite-mark { color: #a34837; }
.celebration { border-color: #f0d48b; background: linear-gradient(110deg,#fff8df,#fff); color: #574719; }
.notice { border: 1px solid #d9d2fa; background: #f0edff; color: #4436a9; }
.riddle-choice.is-right { border-color: #c7d5f4; background: #edf2ff; color: #3f528a; }
.status-action.is-doing { border-color: #d8d0fa; background: #f0edff; color: #493bb2; }
.badge-earned .badge-medal { background: #eeeaff; color: #5141c2; }
.task-done .task-info strong { color: #716b82; }
.progress-badge-earned,.badge-earned { border-color: #e5dbf3; background: #f6f2ff; }

@media (max-width: 600px) {
  body { background: radial-gradient(ellipse at 94% 0,#eee9ff 0,transparent 35%),#f7f5fc; }
  .topbar { background: rgba(255,255,255,.98); }
  .content { color: #241f36; }
  .welcome h1 { font-size: clamp(39px,10.6vw,45px); letter-spacing: -1.7px; }
  .content p,.progress-shell p,.study-shell p,.fun-shell p { font-size: 17px; line-height: 1.55; }
  .content small,.content label,.progress-shell small,.study-shell label,.study-privacy,.study-prompt-hint { font-size: 16px; line-height: 1.45; }
  .content :is(.task-info span,.subject-title small,.topic-map-stop small,.week-item small,.effort-recorded,.effort-note,.mission-area,.reading-list span,.activity-list article span,.subject-topic-overview,.topic-practice,.badge-card p) { font-size: 15px; line-height: 1.45; }
  .eyebrow { color: #554e6c; font-size: 12px; }
  .summary { min-height: 116px; padding: 16px; border-radius: 19px; }
  .summary strong { font-size: 38px; }
  .summary .eyebrow { font-size: 11px; }
  .summary span:last-child { color: #514b60; font-size: 15px; }
  .summary:last-child { min-height: 120px; }
  .summary-action { font-size: 18px; }
  .week-board { padding: 18px; border-radius: 20px; }
  .week-heading h2,.section-heading h2 { font-size: 27px; }
  .week-heading p,.week-empty-state p { font-size: 15px; }
  .week-empty-state strong { font-size: 16px; }
  .sidebar { border-top-color: #e6e1f0; background: rgba(255,255,255,.99); box-shadow: 0 -8px 26px #30234f18; }
  .sidebar nav > a,.nav-more > summary { min-height: 66px; color: #514b65; font-size: 13px; }
  .sidebar nav .nav-icon { width: 25px; height: 25px; flex-basis: 25px; color: #5b50a4; stroke-width: 1.9; }
  .sidebar nav .nav-active { background: #eeeaff; color: #493ab2; }
  .sidebar nav .nav-active .nav-icon { color: #5b4bd6; }
  .nav-more-menu { border-color: #e3def0; background: #fff; box-shadow: 0 14px 36px #30234f24; }
  .nav-more-menu a { min-height: 50px; font-size: 16px; }
  .task-info strong { font-size: 18px; }
  .task-info span { font-size: 15px; }
  .task-steps summary,.task-edit summary,.topic-list summary { min-height: 52px; font-size: 16px; }
  .button,.effort-button,.effort-toggle { min-height: 52px; font-size: 16px; }
  .study-intro h1 { font-size: 32px; }
  .study-intro p,.study-card label,.study-submit { font-size: 16px; }
  .fun-heading h1 { font-size: 34px; }
  input,select { font-size: 16px; }
}

/* Keep the home screen focused; reveal the full gamification workspace on demand. */
.effort-details { margin-top: 14px; border: 1px solid #e3def4; border-radius: 15px; background: #fff; overflow: clip; }
.effort-details > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 13px 16px; color: #493bb2; font-size: 15px; font-weight: 750; cursor: pointer; list-style: none; }
.effort-details > summary::-webkit-details-marker { display: none; }
.effort-details > summary::after { content: "+"; flex: 0 0 auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: #eeeaff; font-size: 20px; line-height: 1; }
.effort-details[open] > summary::after { content: "−"; }
.effort-details-hint { margin-left: auto; color: #6d687a; font-size: 13px; font-weight: 500; text-align: right; }
.effort-details-content { padding: 0 14px 14px; border-top: 1px solid #eeeaf6; }
.effort-details-content > :first-child { margin-top: 14px; }
@media (max-width: 600px) {
  .effort-details > summary { min-height: 62px; padding: 12px; font-size: 16px; }
  .effort-details-hint { max-width: 125px; font-size: 12px; line-height: 1.35; }
  .effort-details-content { padding: 0 10px 10px; }
  .sidebar nav > a,.nav-more > summary { font-size: 15px; }
  .sidebar nav .nav-icon { width: 28px; height: 28px; flex-basis: 28px; }
}

/* Optional focus timer and clear task completion at the end of a guided session. */
.focus-timer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 18px; margin: 0 0 16px; padding: 17px 19px; border: 1px solid #e3def4; border-radius: 16px; background: linear-gradient(135deg,#f3f0ff,#fff 75%); }
.focus-timer-face { display: grid; gap: 4px; }
.focus-timer-face > strong { color: #4336a4; font: 800 clamp(34px,7vw,48px) Manrope,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.focus-timer-face > p { margin: 0; color: #686477; font-size: 13px; }
.focus-timer-controls { display: grid; justify-items: stretch; gap: 8px; }
.focus-timer-controls > label { display: flex; align-items: center; justify-content: flex-end; gap: 8px; color: #514d63; font-size: 12px; font-weight: 700; }
.focus-timer-controls select { min-height: 40px; padding: 7px 10px; }
.focus-timer-buttons { display: flex; gap: 7px; }
.focus-timer-buttons .button { min-height: 42px; }
.focus-break-button { min-height: 40px; border: 0; border-radius: 9px; background: #eeeaff; color: #493bb2; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.task-finish-card { display: grid; gap: 8px; padding: 15px; border: 1px solid #e3def4; border-radius: 13px; background: #faf9ff; text-align: left; }
.task-finish-card > strong { font-size: 16px; }
.task-finish-card > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.task-finish-card form { margin: 3px 0 0; }
.task-finish-card .button { width: 100%; min-height: 48px; }
@media(max-width:600px) {
 .focus-timer { grid-template-columns: minmax(0,1fr); gap: 12px; padding: 15px; }
 .focus-timer-face > strong { font-size: 42px; }
 .focus-timer-face > p { font-size: 14px; }
 .focus-timer-controls > label { justify-content: space-between; font-size: 14px; }
 .focus-timer-buttons .button { flex: 1; min-height: 48px; font-size: 15px; }
 .focus-break-button { min-height: 48px; font-size: 15px; }
}

/* Make the task workbench readable at a glance on phones. */
@media (max-width: 600px) {
  #tareas { margin: 28px 0 16px; }
  #tareas .eyebrow { font-size: 14px; letter-spacing: 1.4px; }
  #tareas h2 { margin-top: 6px; font-size: 32px; line-height: 1.1; }
  .add-task { gap: 10px; padding: 13px; border-radius: 17px; }
  .add-task input[name="title"] { min-height: 58px; padding: 14px; font-size: 18px; }
  .add-task select { min-height: 54px; padding: 10px 12px; font-size: 16px; }
  .add-task .task-date-field { display: grid; min-width: 0; align-content: center; gap: 4px; color: #514b60; font-size: 13px; font-weight: 650; }
  .add-task input[type="date"] { width: 100%; min-width: 0; min-height: 36px; padding: 3px 7px; border: 1px solid #e4e0eb; border-radius: 9px; background: #fff; color: #383449; color-scheme: light; font: inherit; font-size: 15px; }
  .add-task .button { min-height: 58px; font-size: 18px; }
  .empty-inline { padding: 24px 16px; font-size: 18px; line-height: 1.55; }
  .task-row { padding: 16px; }
  .task-info strong { font-size: 19px; }
  .task-info span { font-size: 16px; }
}

/* Modern guided-session setup: show the essential choices first and tuck away extras. */
.study-page .topbar { position: static; z-index: auto; isolation: isolate; background: #fff; }
.study-page .topbar > .link-button { color: #5141c2; font-weight: 700; text-decoration: none; }
.study-shell { width: min(680px,calc(100% - 36px)); margin-top: 30px; }
.study-intro { margin-bottom: 20px; }
.study-intro .eyebrow { display: inline-flex; align-items: center; min-height: 28px; padding: 5px 10px; border: 1px solid #e1dcf5; border-radius: 999px; background: #f2efff; color: #5141b5; font-size: 11px; letter-spacing: 1px; }
.study-intro h1 { margin: 10px 0 7px; font-size: clamp(32px,5vw,42px); letter-spacing: -1.5px; }
.study-intro p { color: #625d70; font-size: 16px; }
.study-start-form { gap: 17px; padding: 25px; border-color: #e4e0ef; border-radius: 22px; box-shadow: 0 16px 42px #34245c0d; }
.study-start-form .study-field { display: grid; gap: 8px; color: #342e47; font-size: 15px; }
.field-title { display: flex; align-items: center; gap: 8px; }
.optional-label,.required-label { display: inline-flex; align-items: center; min-height: 22px; padding: 2px 8px; border-radius: 999px; background: #f1eff7; color: #6c6679; font-size: 12px; font-weight: 600; }
.required-label { background: #eeeaff; color: #5141b8; }
.study-start-form .study-field select,.study-start-form .study-field input { min-height: 52px; padding: 12px 44px 12px 14px; border-color: #e3dfed; border-radius: 13px; background-color: #fff; color: #29243d; font-size: 16px; }
.study-start-form .study-field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235b4bd6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.study-extra-fields { border: 1px solid #e7e3f0; border-radius: 14px; background: #fbfaff; }
.study-extra-fields > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 54px; padding: 11px 14px; color: #4b3db0; font-size: 15px; font-weight: 700; cursor: pointer; list-style: none; }
.study-extra-fields > summary::-webkit-details-marker { display: none; }
.study-extra-fields > summary::after { content: "+"; order: 2; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: #eeeaff; font-size: 19px; }
.study-extra-fields[open] > summary::after { content: "−"; }
.study-extra-fields .optional-label { margin-left: auto; }
.study-extra-grid { display: grid; gap: 15px; padding: 2px 14px 15px; }
.study-start-form .study-privacy { padding-top: 2px; color: #625d70; font-size: 14px; }
.study-start-form .study-submit { min-height: 56px; border-radius: 13px; font-size: 17px; }
@media(max-width:600px) {
 .study-shell { width: calc(100% - 28px); margin: 22px auto 38px; }
 .study-intro { margin-bottom: 16px; }
 .study-intro .eyebrow { min-height: 27px; font-size: 11px; }
 .study-intro h1 { margin: 9px 0 6px; font-size: 32px; }
 .study-intro p { font-size: 16px; line-height: 1.5; }
 .study-start-form { gap: 15px; padding: 17px; border-radius: 19px; }
 .study-start-form .study-field { gap: 7px; font-size: 15px; }
 .field-title { flex-wrap: wrap; }
 .study-start-form .study-field select,.study-start-form .study-field input { min-height: 54px; padding-left: 13px; font-size: 16px; }
 .study-extra-fields > summary { min-height: 54px; font-size: 15px; }
 .study-start-form .study-privacy { font-size: 14px; }
 .study-start-form .study-submit { min-height: 56px; font-size: 17px; }
 .study-page .topbar > .link-button { font-size: 15px; }
}

/* Labeled, aligned forms for tasks and weekly activities. */
.add-task,.activity-form { align-items: end; }
.add-task { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.activity-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); }
.task-field,.activity-field { display: grid; min-width: 0; gap: 6px; color: #49445b; font-size: 13px; font-weight: 700; }
.task-field > span,.activity-field > span { display: flex; align-items: center; gap: 6px; min-height: 18px; }
.task-field small,.activity-field small { color: #777184; font-size: 11px; font-weight: 500; }
.task-field input,.task-field select,.activity-field input,.activity-field select { width: 100%; min-width: 0; min-height: 46px; padding: 10px 11px; border: 1px solid #e3dfed; border-radius: 11px; background-color: #fff; color: #302b42; font: inherit; font-size: 14px; }
.task-field input[type="date"],.activity-field input[type="time"] { color-scheme: light; }
.task-field-title,.activity-field-title { grid-column: 1 / -1; }
.add-task > button,.activity-form > button { grid-column: 1 / -1; min-height: 50px; }
@media(max-width:600px) {
 .add-task,.activity-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px 10px; padding: 14px; }
 .task-field,.activity-field { gap: 6px; font-size: 14px; }
 .task-field > span,.activity-field > span { min-height: 20px; }
 .task-field small,.activity-field small { font-size: 12px; }
 .task-field input,.task-field select,.activity-field input,.activity-field select { min-height: 50px; padding: 10px; font-size: 15px; }
 .task-field-title input,.activity-field-title input { min-height: 58px; font-size: 17px; }
 .add-task > button,.activity-form > button { min-height: 54px; font-size: 16px; }
 .task-date-field { align-content: initial; }
 .task-date-field > span { display: flex; gap: 6px; }
 .add-task input[type="date"] { min-height: 50px; padding: 8px; }
}

.add-subject-form { display: flex; align-items: end; gap: 10px; margin: 0 0 14px; padding: 13px; border: 1px solid #e3def4; border-radius: 15px; background: linear-gradient(120deg,#f7f5ff,#fff 75%); }
.add-subject-form label { display: grid; flex: 1; min-width: 0; gap: 6px; color: #49445b; font-size: 13px; font-weight: 700; }
.add-subject-form input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #e3dfed; border-radius: 11px; background: #fff; color: #302b42; font: inherit; font-size: 15px; }
.add-subject-form button { min-height: 46px; white-space: nowrap; }
@media(max-width:600px) {
 .add-subject-form { align-items: stretch; flex-direction: column; gap: 10px; padding: 14px; }
 .add-subject-form label { font-size: 14px; }
 .add-subject-form input { min-height: 52px; font-size: 16px; }
 .add-subject-form button { min-height: 52px; font-size: 16px; }
}

/* Profile-owned study timer with switchable panel, compact and immersive views. */
.focus-widget { position: relative; margin: 0 0 22px; padding: 19px; border: 1px solid #ded8f4; border-radius: 22px; background: linear-gradient(135deg,#f4f1ff 0%,#fff 73%); box-shadow: 0 12px 34px #3e2a7b12; }
.focus-widget-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.focus-widget-heading h2 { margin: 4px 0 2px; color: #26213b; font: 750 23px Manrope,sans-serif; letter-spacing: -.5px; }
.focus-widget-heading p { margin: 0; color: #655f73; font-size: 13px; }
.focus-preferences { display: grid; gap: 5px; justify-items: end; color: #625c70; font-size: 11px; }
.focus-view-switcher { display: flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid #e4dff0; border-radius: 11px; background: #fff; }
.focus-view-switcher button { min-height: 34px; padding: 6px 10px; border: 0; border-radius: 8px; background: transparent; color: #5d576d; font: inherit; font-size: 12px; font-weight: 650; cursor: pointer; }
.focus-view-switcher button[aria-pressed="true"] { background: #eeeaff; color: #4c3bb6; }
.focus-idle,.focus-active { display: grid; grid-template-columns: minmax(155px,.7fr) minmax(0,1.3fr); align-items: center; gap: 16px 22px; }
.focus-clock-block { display: grid; align-content: center; gap: 3px; min-width: 0; }
.focus-clock-label { color: #655d79; font-size: 10px; font-weight: 750; letter-spacing: 1.2px; }
.focus-clock { color: #29233f; font: 800 clamp(39px,6vw,56px) Manrope,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -2px; line-height: 1.1; }
.focus-countdown-status { color: #625c70; font-size: 12px; }
.focus-start-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: end; gap: 9px; }
.focus-start-form label { display: grid; min-width: 0; gap: 5px; color: #4e485e; font-size: 11px; font-weight: 700; }
.focus-start-form label > span { display: flex; justify-content: space-between; gap: 5px; }
.focus-start-form label small { color: #817b8d; font-size: 10px; font-weight: 500; }
.focus-start-form select { width: 100%; min-width: 0; min-height: 42px; padding: 8px 9px; font-size: 12px; }
.focus-start-button { grid-column: 1 / -1; min-height: 46px; }
.focus-duration-field[hidden] { display: none; }
[data-focus-duration-field][hidden] { display: none!important; }
.focus-active-info { display: grid; gap: 4px; min-width: 0; }
.focus-active-info strong { overflow-wrap: anywhere; color: #302a47; font-size: 16px; }
.focus-active-info span { color: #615b72; font-size: 13px; }
.focus-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-controls form { margin: 0; }
.focus-controls .button { min-height: 45px; font-size: 13px; }
.focus-stop { border-color: #e7d5d0!important; color: #8e463b!important; }
.focus-totals { display: flex; align-items: center; gap: 12px; margin-top: 15px; padding-top: 12px; border-top: 1px solid #e9e4f3; }
.focus-totals > span { display: grid; gap: 2px; padding-right: 14px; border-right: 1px solid #e5e0ed; }
.focus-totals small { color: #706a7d; font-size: 10px; }
.focus-totals strong { color: #453893; font-size: 13px; }
.focus-sound-setting { margin-left: auto; }
.focus-sound-setting button { padding: 7px 9px; border: 0; border-radius: 9px; background: #f2effa; color: #554b86; font: inherit; font-size: 11px; cursor: pointer; }
.focus-view-compact { padding: 12px 15px; border-radius: 16px; }
.focus-view-compact .focus-widget-heading { align-items: center; margin: 0; }
.focus-view-compact .focus-widget-heading h2 { font-size: 16px; }
.focus-view-compact .focus-widget-heading p,.focus-view-compact .focus-preferences > span { display: none; }
.focus-view-compact .focus-view-switcher button { min-height: 30px; padding: 5px 8px; font-size: 11px; }
.focus-view-compact .focus-active { grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; margin-top: 10px; }
.focus-view-compact .focus-clock { font-size: 32px; letter-spacing: -1px; }
.focus-view-compact .focus-clock-label,.focus-view-compact .focus-totals,.focus-view-compact .focus-controls .button { font-size: 10px; }
.focus-view-compact .focus-controls { flex-wrap: nowrap; }
.focus-view-compact .focus-controls .button { min-height: 40px; white-space: nowrap; }
.focus-view-compact .focus-idle { display: grid; grid-template-columns: auto minmax(0,1fr); margin-top: 10px; }
.focus-view-compact .focus-idle > .focus-clock-block { grid-column: 1; }
.focus-setup-disclosure { grid-column: 2; }
.focus-setup-disclosure > summary { padding: 10px 12px; border-radius: 10px; background: #fff; color: #5141b8; font-size: 13px; font-weight: 700; cursor: pointer; }
.focus-setup-disclosure[open] .focus-start-form { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.focus-setup-disclosure[open] .focus-start-button { grid-column: 1 / -1; }
.focus-view-immersive { display: grid; min-height: min(690px,calc(100vh - 180px)); align-content: center; justify-items: center; padding: 26px; }
.focus-view-immersive .focus-widget-heading { width: 100%; align-items: center; }
.focus-view-immersive .focus-widget-heading > div:first-child { display: none; }
.focus-view-immersive .focus-widget-heading h2 { font-size: 16px; }
.focus-view-immersive .focus-idle,.focus-view-immersive .focus-active { width: min(100%,520px); grid-template-columns: 1fr; justify-items: center; gap: 19px; text-align: center; }
.focus-view-immersive .focus-clock-block { justify-items: center; }
.focus-view-immersive .focus-clock { font-size: clamp(74px,15vw,118px); letter-spacing: -5px; }
.focus-view-immersive .focus-countdown-status { font-size: 15px; }
.focus-view-immersive .focus-start-form { width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); text-align: left; }
.focus-view-immersive .focus-start-form label { font-size: 13px; }
.focus-view-immersive .focus-start-form select { min-height: 48px; font-size: 14px; }
.focus-view-immersive .focus-start-button { min-height: 54px; font-size: 16px; }
.focus-view-immersive .focus-active-info { justify-items: center; }
.focus-view-immersive .focus-active-info strong { font-size: 21px; }
.focus-view-immersive .focus-active-info span { font-size: 15px; }
.focus-view-immersive .focus-controls .button { min-width: 145px; min-height: 52px; font-size: 15px; }
.focus-view-immersive .focus-totals { width: min(100%,460px); justify-content: center; }
.focus-view-immersive .focus-sound-setting { display: none; }
.subject-focus-time,.topic-focus-time { display: block; margin-top: 6px; color: #625a85; font-size: 11px; line-height: 1.4; }
.focus-immersive-content > :not(.focus-widget):not(.level-glance) { display: none!important; }
.focus-immersive-content > .focus-widget { margin-top: 12px; }
.focus-auto-finish { display: none!important; }
.global-focus-bar { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 8px max(18px,calc((100vw - 1120px)/2)); border-bottom: 1px solid #ded8f4; background: rgba(248,246,255,.98); box-shadow: 0 5px 18px #30234f12; }
.global-focus-bar form { margin: 0; }
.focus-live-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #755ee4; box-shadow: 0 0 0 4px #e8e2ff; }
.global-focus-clock { color: #352a69; font: 800 19px Manrope,sans-serif; font-variant-numeric: tabular-nums; }
.global-focus-name { overflow: hidden; color: #342e46; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.global-focus-subject { overflow: hidden; color: #6c6579; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.global-focus-controls { display: flex; gap: 6px; margin-left: auto; }
.global-focus-controls button { min-width: 36px; min-height: 36px; padding: 6px 9px; border: 1px solid #e1dcf0; border-radius: 9px; background: #fff; color: #5141b8; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.global-focus-controls form:last-of-type button { color: #8e463b; }
@media(max-width:700px) {
 .focus-widget { padding: 15px; border-radius: 19px; }
 .focus-widget-heading { display: grid; gap: 10px; }
 .focus-preferences { justify-items: start; }
 .focus-view-switcher button { min-height: 38px; padding-inline: 12px; font-size: 13px; }
 .focus-idle,.focus-active { grid-template-columns: 1fr; gap: 13px; }
 .focus-clock { font-size: 50px; }
 .focus-start-form { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
 .focus-start-form select { min-height: 48px; font-size: 14px; }
 .focus-start-button { min-height: 52px; font-size: 16px; }
 .focus-active-info strong { font-size: 17px; }
 .focus-controls { display: grid; grid-template-columns: 1fr 1fr; }
 .focus-controls .button { width: 100%; min-height: 50px; font-size: 14px; }
 .focus-totals { flex-wrap: wrap; gap: 8px; }
 .focus-sound-setting { width: 100%; margin-left: 0; }
 .focus-sound-setting button { min-height: 40px; font-size: 12px; }
 .focus-view-compact .focus-widget-heading { display: flex; align-items: center; }
 .focus-view-compact .focus-idle,.focus-view-compact .focus-active { grid-template-columns: minmax(0,1fr) auto; }
 .focus-view-compact .focus-clock { font-size: 34px; }
 .focus-view-compact .focus-active-info { grid-column: 1; }
 .focus-view-compact .focus-controls { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; }
 .focus-view-compact .focus-controls .button { min-width: 92px; min-height: 42px; font-size: 12px; }
 .focus-view-compact .focus-idle { grid-template-columns: auto minmax(0,1fr); }
 .focus-view-compact .focus-setup-disclosure { grid-column: 2; }
 .focus-view-compact .focus-setup-disclosure[open] .focus-start-form { grid-template-columns: 1fr; }
 .focus-view-immersive { min-height: calc(100dvh - 150px); padding: 18px; }
 .focus-view-immersive .focus-clock { font-size: clamp(68px,18vw,96px); }
 .focus-view-immersive .focus-controls { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
 .focus-view-immersive .focus-controls .button { min-width: 0; min-height: 56px; }
 .focus-view-immersive .focus-start-form { grid-template-columns: 1fr; }
 .global-focus-bar { position: sticky; top: 0; gap: 7px; min-height: 52px; padding: 7px 10px; }
 .global-focus-clock { font-size: 16px; }
 .global-focus-name { max-width: 31vw; font-size: 12px; }
 .global-focus-subject { display: none; }
 .global-focus-controls { gap: 4px; }
 .global-focus-controls button { min-width: 34px; min-height: 36px; padding: 5px 8px; font-size: 12px; }
}

/* Keep the student's global effort level visible from the first screen. */
.level-glance { display:grid; grid-template-columns:72px minmax(0,1fr) auto; align-items:center; gap:16px; margin:0 0 16px; padding:15px 18px; border:1px solid #dcd5f7; border-radius:18px; background:linear-gradient(115deg,#eeebff 0%,#fff 78%); color:var(--ink); text-decoration:none; box-shadow:0 8px 24px #5142a40d; transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease; }
.level-glance:hover { transform:translateY(-1px); border-color:#bcb0eb; box-shadow:0 12px 28px #5142a41a; }
.level-glance:focus-visible { outline:3px solid #6b57ce; outline-offset:3px; }
.level-glance-emblem { display:grid; align-content:center; justify-items:center; gap:0; width:68px; height:68px; border:1px solid #d8d0fa; border-radius:20px; background:#e9e5ff; color:#4b3caf; }
.level-glance-emblem small { font-size:9px; font-weight:800; letter-spacing:1.3px; }
.level-glance-emblem strong { font:800 30px/1.05 Manrope,sans-serif; font-variant-numeric:tabular-nums; }
.level-glance-main { display:grid; min-width:0; gap:5px; }
.level-glance-overline { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.level-glance-overline .eyebrow { color:#68617f; font-size:10px; }
.level-glance-overline > strong { color:#4d40ad; font-size:12px; white-space:nowrap; }
.level-glance-title { color:#27233a; font:750 17px/1.25 Manrope,sans-serif; }
.level-glance-track { height:8px; margin:2px 0 0; background:#e8e4f4; }
.level-glance-track > span { background:linear-gradient(90deg,#6754c8,#9884f0); }
.level-glance-next { color:#6b667a; font-size:11px; line-height:1.35; }
.level-glance-action { display:flex; align-items:center; gap:6px; padding:10px 12px; border:1px solid #ded8f6; border-radius:12px; background:#fff; color:#5141b2; font-size:12px; font-weight:750; white-space:nowrap; }
.focus-immersive-content > .level-glance { display:grid; }
@media(max-width:700px) {
 .level-glance { grid-template-columns:58px minmax(0,1fr); gap:11px; margin-bottom:13px; padding:13px; border-radius:16px; }
 .level-glance-emblem { width:56px; height:56px; border-radius:16px; }
 .level-glance-emblem small { font-size:8px; }
 .level-glance-emblem strong { font-size:25px; }
 .level-glance-overline .eyebrow { font-size:9px; }
 .level-glance-overline > strong { font-size:11px; }
 .level-glance-title { font-size:16px; }
 .level-glance-track { height:8px; }
 .level-glance-next { font-size:12px; }
 .level-glance-action { grid-column:2; justify-self:start; min-height:36px; margin-top:-2px; padding:7px 10px; font-size:12px; }
}

/* Consistent, touch-friendly controls across the planner. */
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px !important;
  border-color: #e4e0ed;
  border-radius: 12px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236754c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 17px;
  transition: border-color .18s ease, box-shadow .18s ease, background-color .18s ease;
  cursor: pointer;
}
select:hover:not(:disabled) { border-color: #c8c0e0; background-color: #fdfcff; }
select:focus-visible { border-color: #9889df; box-shadow: 0 0 0 4px #6754c81c; outline: 0; }
select:disabled { color: #9b97a8; background-color: #f5f4f7; cursor: not-allowed; }
.focus-view-switcher { gap: 3px; padding: 4px; border-color: #e5e1ee; border-radius: 13px; background: #f7f6fa; }
.focus-view-switcher button { min-height: 38px; padding: 7px 13px; border-radius: 10px; font-size: 13px; transition: color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.focus-view-switcher button[aria-pressed="true"] { background: #fff; color: #4938aa; box-shadow: 0 2px 8px #34246c14; }
.focus-start-button,.focus-controls .button { gap: 9px; border-radius: 13px; }
.focus-start-button svg,.focus-controls svg,.focus-sound-setting svg,.global-focus-controls svg { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.focus-start-button svg path[d^="m8 5"] { fill: currentColor; stroke: none; }
.focus-start-button { box-shadow: 0 5px 12px #6754c82b; }
.focus-sound-setting button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; border: 1px solid #e5e0f0; border-radius: 11px; font-size: 12px; transition: border-color .18s ease, background-color .18s ease; }
.focus-sound-setting button:hover { border-color: #c9c1e1; background: #ebe7f7; }
.focus-sound-setting button[aria-pressed="true"] { border-color: #d8d0f2; background: #f0edff; color: #4e3ab4; }
.focus-sound-setting svg { width: 17px; height: 17px; }
.global-focus-controls button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 11px; transition: border-color .18s ease, background-color .18s ease, transform .18s ease; }
.global-focus-controls button:hover { border-color: #c9c1e1; background: #f8f6ff; }
.global-focus-controls button:active { transform: translateY(1px); }
.global-focus-controls form:last-of-type button { border-color: #ecd9d5; background: #fffaf9; }
.global-focus-controls form:last-of-type button:hover { border-color: #d9b9b1; background: #fff4f1; }
.focus-controls .focus-stop { background: #fffaf9; }
.focus-view-compact .focus-view-switcher button { min-height: 34px; padding-inline: 10px; }
@media(max-width:600px) {
  select { min-height: 48px; padding-right: 42px !important; background-position: right 12px center; }
  .focus-view-switcher { width: 100%; }
  .focus-view-switcher button { flex: 1; min-height: 42px; padding: 7px 9px; font-size: 13px; }
  .focus-view-compact .focus-view-switcher { width: auto; }
  .global-focus-controls button span { display: none; }
  .global-focus-controls button { width: 38px; min-width: 38px; padding: 6px; }
}
