:root {
  color-scheme: light;
  --ink: #302821;
  --muted: #8c7e70;
  --line: #efe5d8;
  --paper: #fffdfa;
  --canvas: #fff5e8;
  --purple: #f28c38;
  --purple-deep: #db7022;
  --purple-soft: #ffead6;
  --green: #58a879;
  --shadow: 0 5px 24px rgba(75, 52, 32, .07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "DM Sans", system-ui, -apple-system, sans-serif; font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 17px 14px; background: #fff; border-right: 1px solid #eff0f5; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 10px; margin-bottom: 42px; color: var(--ink); font: 800 22px Nunito, sans-serif; letter-spacing: -1px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--purple); color: white; box-shadow: 0 5px 13px #f28c3840; }
.brand-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand-accent { color: var(--purple); }
.sidebar-label, .eyebrow, .stat-caption { color: #a0a3b1; font-size: 9px; font-weight: 700; letter-spacing: 1.15px; }
.sidebar-label { padding: 0 10px; }
.main-nav { display: grid; gap: 5px; margin: 12px 0 29px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 10px 11px; color: #73778a; border-radius: 8px; text-decoration: none; font-size: 12px; font-weight: 600; transition: background .2s, color .2s, transform .2s; }
.nav-link:hover { background: #f8f6ff; color: var(--purple); transform: translateX(2px); }
.nav-link.active { color: var(--purple); background: #ffead6; }
.nav-icon { width: 17px; text-align: center; font-size: 16px; }
.nav-count { display: grid; place-items: center; width: 19px; height: 19px; margin-left: auto; border-radius: 6px; background: #fff; color: #888b9d; font-size: 10px; }
.sidebar-section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sidebar-section-heading .sidebar-label { padding-left: 10px; }
.icon-button { width: 29px; height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #73778a; font-size: 19px; line-height: 1; transition: .18s; }
.icon-button:hover { color: var(--purple); border-color: #d9d0ff; background: #faf9ff; }
.subject-list { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.subject-item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 7px; color: #62677a; font-size: 12px; }
.subject-dot { width: 8px; height: 8px; border-radius: 3px; flex: 0 0 auto; }
.subject-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.subject-delete { margin-left: auto; border: 0; background: none; color: #b4b5c1; opacity: 0; transition: opacity .15s; }
.subject-item:hover .subject-delete, .subject-delete:focus-visible { opacity: 1; }
.subject-empty { padding: 7px 10px; color: #a0a3b1; font-size: 11px; line-height: 1.5; }
.sidebar-note { margin: auto 4px 17px; padding: 15px 13px; border: 1px solid #f5dfc6; border-radius: 11px; background: linear-gradient(135deg, #fff0df, #fffaf2); }
.note-sparkle { display: block; margin-bottom: 8px; color: var(--purple); font-size: 16px; }
.sidebar-note strong { font-size: 11px; }
.sidebar-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.profile { display: flex; align-items: center; gap: 9px; padding: 12px 5px 2px; border-top: 1px solid var(--line); }
.avatar, .top-avatar { display: grid; place-items: center; border-radius: 50%; background: #f1eaff; color: #7253d8; font-weight: 700; }
.avatar { width: 33px; height: 33px; font-size: 12px; }
.profile strong, .profile span { display: block; }
.profile strong { font-size: 11px; }
.profile div:nth-child(2) span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-dot { width: 7px; height: 7px; margin-left: auto; border-radius: 50%; background: #60c79e; }
.main-content { min-width: 0; max-width: 1680px; width: 100%; margin: 0 auto; padding: 0 34px 18px; }
.topbar { height: 65px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eceef4; }
.mobile-nav-toggle { display: none; }
.breadcrumb { color: #a0a3b1; font-size: 11px; }
.breadcrumb span { padding: 0 8px; color: #c7c8d1; }
.breadcrumb strong { color: #666a7c; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 13px; border: 1px solid transparent; border-radius: 8px; font-size: 11px; font-weight: 700; transition: transform .18s, box-shadow .18s, background .18s; }
.button:hover { transform: translateY(-1px); }
.button-quiet { padding: 7px 9px; background: transparent; color: #797d8e; }
.button-quiet:hover { background: #fff; }
.top-avatar { width: 29px; height: 29px; margin-left: 8px; font-size: 11px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 28px 0 22px; animation: rise-in .5s both; }
.eyebrow { margin: 0 0 8px; }
h1, h2 { font-family: Nunito, "DM Sans", sans-serif; letter-spacing: -.55px; }
h1 { margin: 0; font-size: clamp(23px, 2.3vw, 29px); font-weight: 800; }
.wave { display: inline-block; color: #f2b751; font-size: 20px; transform-origin: 70% 70%; animation: sparkle 2.8s ease-in-out infinite; }
.welcome-copy { margin: 7px 0 0; color: #8b8e9e; font-size: 12px; }
.button-primary { padding: 11px 16px; color: #fff; background: var(--purple); box-shadow: 0 5px 13px #f28c3835; }
.button-primary:hover { background: var(--purple-deep); box-shadow: 0 7px 17px #e879273d; }
.button-primary span { font-size: 14px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; margin-bottom: 17px; }
.stat-card, .panel { border: 1px solid #eff0f5; border-radius: 11px; background: var(--paper); box-shadow: var(--shadow); }
.stat-card { min-height: 119px; padding: 15px 17px 13px; animation: rise-in .45s both; }
.stat-card:nth-child(2) { animation-delay: .07s; }.stat-card:nth-child(3) { animation-delay: .14s; }
.stat-top { display: flex; align-items: center; gap: 9px; }
.stat-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; font-size: 13px; }
.stat-icon.lilac { color: #c66a24; background: #fff0df; }.stat-icon.mint { color: #408b60; background: #edf6e9; }.stat-icon.peach { color: #bd672b; background: #ffeddd; }
.stat-caption { font-size: 8px; }
.stat-value { margin-top: 10px; font: 800 23px Nunito, sans-serif; letter-spacing: -.7px; }
.stat-value small { color: #888b9c; font: 500 10px "DM Sans", sans-serif; letter-spacing: 0; }
.stat-foot { margin-top: 3px; color: #a0a3b1; font-size: 9px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.56fr) minmax(285px, .9fr); align-items: start; gap: 15px; }
.panel { padding: 17px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 15px; }
.panel-heading h2 { margin: 0; font-size: 16px; font-weight: 800; }
.panel-heading .eyebrow { margin-bottom: 5px; font-size: 8px; }
.week-controls { display: flex; align-items: center; gap: 7px; }
.week-controls .icon-button { width: 25px; height: 25px; font-size: 20px; }
#weekLabel { min-width: 110px; text-align: center; color: #777b8d; font-size: 10px; font-weight: 600; }
.week-scroll { overflow-x: auto; padding-bottom: 3px; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(76px, 1fr)); gap: 7px; min-width: 570px; }
.day { min-height: 205px; padding: 8px 6px; border: 1px solid #f0f0f5; border-radius: 8px; background: #fdfdff; transition: border-color .2s, background .2s, transform .2s; }
.day.today { border-color: #d9d0ff; background: #faf9ff; }
.day:hover { transform: translateY(-2px); }
.day-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 2px 2px 8px; border-bottom: 1px solid #f0f0f5; }
.day-name { color: #8b8e9e; font-size: 9px; font-weight: 600; text-transform: capitalize; }
.day-number { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 7px; color: #64687a; font-size: 10px; font-weight: 700; }
.day.today .day-number { color: white; background: var(--purple); }
.day-items { display: grid; align-content: start; gap: 5px; padding-top: 7px; }
.session-card { position: relative; width: 100%; padding: 6px 6px 6px 7px; border-left: 2px solid #f28c38; border-radius: 4px; background: #fff0df; color: #774319; transition: .18s; animation: card-in .25s both; }
.session-card:hover { filter: saturate(1.2); transform: translateX(1px); }
.session-card.completed { border-left-color: #61ad7b; background: #edf6e9; color: #397550; }
.session-time { display: block; margin-bottom: 3px; font-size: 8px; font-weight: 700; }
.session-title { display: -webkit-box; overflow: hidden; font-size: 9px; font-weight: 700; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.session-subject { display: block; overflow: hidden; margin-top: 3px; color: inherit; font-size: 8px; opacity: .72; text-overflow: ellipsis; white-space: nowrap; }
.session-actions { display: grid; gap: 3px; margin-top: 6px; }
.session-actions button { padding: 3px 4px; border: 0; border-radius: 4px; background: #ffffffa8; color: #6555a1; text-align: left; font-size: 8px; line-height: 1.25; }
.session-actions button:hover { background: #fff; }
.session-actions .session-missed { color: #aa6870; }
.session-actions .session-done { color: #547b6f; }
.empty-day { padding: 13px 2px; color: #c0c2cd; text-align: center; font-size: 8px; line-height: 1.5; }
.plan-message { min-height: 18px; margin-top: 9px; color: #828698; font-size: 10px; line-height: 1.5; }
.plan-message.warning { color: #a66a21; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; margin-top: 7px; color: #888b9a; font-size: 9px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 3px; }.legend-dot.violet { background: #f28c38; }.legend-dot.green { background: #61ad7b; }
.legend .legend-hint { margin-left: auto; color: #a4a6b2; }
.right-column { display: grid; gap: 14px; }
.compact { margin-bottom: 9px; }
.counter-pill { display: grid; place-items: center; min-width: 24px; height: 23px; padding: 0 6px; border-radius: 7px; background: #f3f1ff; color: var(--purple); font-size: 10px; font-weight: 700; }
.materials-heading-actions { display: flex; align-items: center; gap: 5px; }
.subject-add-button { padding: 6px 7px; color: var(--purple); font-size: 9px; white-space: nowrap; }
.panel-description { margin: 0 0 13px; color: #9093a2; font-size: 10px; line-height: 1.55; }
.task-form { display: grid; gap: 9px; }
.task-form label { display: block; margin: 0 0 5px; color: #686c7c; font-size: 9px; font-weight: 700; }
.task-form input, .task-form select { width: 100%; min-width: 0; height: 34px; padding: 0 9px; border: 1px solid #e9eaf1; border-radius: 6px; outline: 0; background: white; color: #4f5364; font-size: 10px; transition: border-color .2s, box-shadow .2s; }
.task-form input:focus, .task-form select:focus, .availability-row input:focus { border-color: #f2ae70; box-shadow: 0 0 0 3px #f28c3818; }
.task-form input::placeholder { color: #b1b3bf; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.button-dark { color: white; background: #252738; }
.button-dark:hover { background: #3a3c4f; box-shadow: 0 5px 12px #2426381c; }
.button-full { width: 100%; min-height: 35px; margin-top: 2px; }
.materials-divider { height: 1px; margin: 14px 0 11px; background: var(--line); }
.materials-list-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 5px; }
.materials-list-heading strong { font-size: 10px; }
.materials-list-heading span { color: #a0a3b1; font-size: 9px; }
.task-progress { margin: 0 0 10px; }
.task-progress[hidden] { display: none; }
.task-progress-label { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #796f62; font-size: 10px; font-weight: 700; }
.task-progress-label span:last-child { color: #c66a24; }
.task-progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #f3e8da; }
.task-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f28c38, #e6a558); transition: width .35s ease; }
.tasks-list { display: grid; gap: 6px; max-height: 230px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.task-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 9px; border: 1px solid #f0f0f5; border-radius: 7px; animation: card-in .25s both; }
.task-item-main { min-width: 0; }
.task-complete-toggle { width: 18px; height: 18px; margin: 0; accent-color: #e87927; cursor: pointer; }
.task-complete-toggle:focus-visible { outline: 2px solid #df7425; outline-offset: 3px; }
.task-item.is-complete { border-color: #dce8d4; background: #f6faf1; }
.task-item.is-complete .task-title { color: #756f64; text-decoration: line-through; text-decoration-color: #a7b49b; }
.task-title { display: block; overflow: hidden; color: #525667; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.task-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; color: #9a9dac; font-size: 8px; }
.priority-label { color: #c8873d; }
.task-actions { display: flex; align-items: center; gap: 2px; }
.task-actions button { padding: 3px 5px; border: 0; border-radius: 5px; background: transparent; color: #a3a5b2; font-size: 12px; }
.task-actions button:hover { background: #f6f5fb; color: var(--purple); }
.task-actions .delete-task:hover { color: #da6d6d; }
.empty-list { padding: 11px 4px; color: #a0a3b1; text-align: center; font-size: 9px; line-height: 1.6; }
.availability-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; background: #e9f8f2; color: #3eaa85; font-size: 15px; }
.availability-list { display: grid; gap: 5px; }
.availability-row { display: grid; grid-template-columns: 15px minmax(46px, 1fr) 61px 10px 61px; align-items: center; gap: 5px; min-height: 27px; color: #707486; font-size: 9px; }
.availability-row input[type="checkbox"] { width: 12px; height: 12px; margin: 0; accent-color: var(--purple); }
.availability-row label { text-transform: capitalize; }
.availability-row input[type="time"] { width: 100%; min-width: 0; height: 25px; padding: 0 3px; border: 1px solid #ececf2; border-radius: 5px; outline: none; color: #686c7c; background: #fff; font-size: 9px; }
.availability-row .time-separator { color: #aeb0bb; text-align: center; }
.availability-row.disabled { opacity: .42; }
.availability-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line); color: #a0a3b1; font-size: 8px; }
.saved-indicator { display: flex; align-items: center; gap: 4px; }
.task-complete-label { color: #389879; }
.tutor-panel { margin-top: 16px; padding: 20px; scroll-margin-top: 20px; }
.tutor-intro { display: flex; align-items: center; gap: 13px; padding-bottom: 15px; border-bottom: 1px solid var(--line); }
.tutor-avatar { display: grid; place-items: center; width: 60px; height: 60px; flex: 0 0 auto; border: 1px solid #f3d5b8; border-radius: 18px; background: #fff0df; animation: sparkle 3s ease-in-out infinite; }
.tutor-intro h2 { margin: 0; font-size: 17px; }
.tutor-intro .eyebrow { margin-bottom: 4px; font-size: 8px; }
.tutor-intro p:last-child { margin: 4px 0 0; color: #8b8e9e; font-size: 10px; line-height: 1.5; }
.local-badge { margin-left: auto; padding: 6px 9px; border: 1px solid #e3f3ec; border-radius: 20px; background: #f1fbf6; color: #469878; font-size: 9px; font-weight: 700; white-space: nowrap; }
.chat-messages { display: grid; gap: 10px; max-height: 340px; overflow-y: auto; padding: 14px 2px; }
.chat-message { width: fit-content; max-width: min(720px, 90%); padding: 10px 13px; border-radius: 10px; animation: card-in .2s both; }
.chat-message.assistant { border: 1px solid #ece9fa; border-top-left-radius: 3px; background: #faf9ff; }
.chat-message.user { justify-self: end; border-top-right-radius: 3px; background: #f1edff; }
.chat-speaker { display: block; margin-bottom: 4px; color: #795be1; font-size: 9px; font-weight: 700; }
.chat-message.user .chat-speaker { color: #777b8d; }
.chat-message p { margin: 0; color: #55596a; font-size: 11px; line-height: 1.65; white-space: pre-line; }
.chat-suggestions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; color: #a0a3b1; font-size: 9px; }
.chat-suggestions button { padding: 6px 9px; border: 1px solid #eceaf5; border-radius: 20px; background: #fff; color: #706a8c; font-size: 9px; transition: .18s; }
.chat-suggestions button:hover { border-color: #d6cefa; background: #faf9ff; color: var(--purple); }
.chat-form { display: flex; gap: 8px; padding: 6px; border: 1px solid #e9eaf1; border-radius: 9px; background: #fff; }
.chat-form:focus-within { border-color: #f2ae70; box-shadow: 0 0 0 3px #f28c3818; }
.chat-form input { min-width: 0; flex: 1; padding: 0 6px; border: 0; outline: 0; color: #4f5364; font-size: 11px; }
.chat-form input::placeholder { color: #b1b3bf; }
.chat-form .button { flex: 0 0 auto; padding: 8px 12px; }
.tutor-disclaimer { margin: 8px 0 0; color: #a0a3b1; text-align: center; font-size: 8px; }
.visually-hidden { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.saved-indicator i { width: 5px; height: 5px; border-radius: 50%; background: #56bc94; }
footer { padding: 18px 0 0; color: #a2a4b1; text-align: center; font-size: 9px; }
footer span { padding: 0 4px; }
.toast { position: fixed; z-index: 5; right: 24px; bottom: 22px; max-width: min(360px, calc(100vw - 32px)); padding: 11px 15px; border-radius: 8px; background: #27283a; color: #fff; box-shadow: 0 8px 24px #2021322c; font-size: 11px; opacity: 0; pointer-events: none; transform: translateY(9px); transition: opacity .2s, transform .2s; }
.toast.visible { opacity: 1; transform: translateY(0); }
.subject-dialog { width: min(390px, calc(100vw - 32px)); padding: 24px; border: 1px solid #eff0f5; border-radius: 14px; box-shadow: 0 18px 60px #20213230; }
.subject-dialog::backdrop { background: #20213255; backdrop-filter: blur(3px); }
.subject-dialog h2 { margin: 0 0 18px; font-size: 19px; }
.subject-dialog label { display: block; margin-bottom: 6px; color: #686c7c; font-size: 10px; font-weight: 700; }
.subject-dialog input { width: 100%; height: 39px; padding: 0 11px; border: 1px solid #e9eaf1; border-radius: 7px; outline: 0; font: inherit; font-size: 12px; }
.subject-dialog input:focus { border-color: #f2ae70; box-shadow: 0 0 0 3px #f28c3818; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
@keyframes rise-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes card-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sparkle { 0%, 100% { transform: rotate(0) scale(1); } 50% { transform: rotate(12deg) scale(1.15); } }
@media (min-width: 1500px) { .main-content { padding-right: 45px; padding-left: 45px; }.week-grid { grid-template-columns: repeat(7, minmax(90px, 1fr)); }.day { min-height: 240px; } }
@media (max-width: 1100px) { .app-shell { grid-template-columns: 210px minmax(0, 1fr); }.sidebar { padding-right: 12px; padding-left: 12px; }.main-content { padding-right: 20px; padding-left: 20px; }.content-grid { grid-template-columns: minmax(0, 1.2fr) minmax(275px, .9fr); gap: 11px; }.panel { padding: 13px; }.week-grid { min-width: 540px; } }
@media (max-width: 800px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: relative; z-index: 2; width: 100%; height: auto; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 14px; padding: 9px 16px; border-right: 0; border-bottom: 1px solid var(--line); }.brand { margin: 0; }.sidebar > .sidebar-label, .sidebar-section-heading, .subject-list, .sidebar-note, .profile { display: none; }.main-nav { display: flex; justify-content: flex-end; gap: 4px; margin: 0; }.nav-link { padding: 8px 9px; font-size: 11px; }.nav-icon { font-size: 14px; }.main-content { padding: 0 17px 17px; }.content-grid { grid-template-columns: 1fr; }.right-column { grid-template-columns: 1fr 1fr; align-items: start; }.week-grid { grid-template-columns: repeat(7, minmax(73px, 1fr)); } }
@media (max-width: 580px) { .sidebar { display: block; padding: 10px 12px 7px; }.brand { display: none; }.main-nav { justify-content: space-around; }.nav-link { flex-direction: column; gap: 3px; padding: 5px 6px; font-size: 9px; }.nav-icon { font-size: 15px; }.nav-count { position: absolute; margin: -22px 0 0 45px; width: 15px; height: 15px; font-size: 8px; }.main-content { padding: 0 12px 14px; }.topbar { height: 48px; }.breadcrumb { font-size: 9px; }.button-quiet { padding: 6px; font-size: 10px; }.button-quiet span { display: none; }.top-avatar { margin-left: 2px; }.welcome-row { align-items: flex-start; padding: 22px 0 16px; }.welcome-copy { max-width: 235px; line-height: 1.5; }.button-primary { align-self: center; padding: 9px 10px; font-size: 9px; white-space: nowrap; }.button-primary span { display: none; }.stats-grid { gap: 7px; margin-bottom: 11px; }.stat-card { min-height: 96px; padding: 10px 9px; }.stat-icon { width: 21px; height: 21px; }.stat-caption { font-size: 7px; letter-spacing: .5px; }.stat-top { gap: 5px; }.stat-value { font-size: 19px; }.stat-value small { display: block; margin-top: 1px; font-size: 8px; }.stat-foot { font-size: 8px; line-height: 1.4; }.right-column { grid-template-columns: 1fr; }.week-panel { padding: 12px 9px; }.panel-heading h2 { font-size: 14px; }.week-controls { gap: 3px; }#weekLabel { min-width: 94px; font-size: 9px; }.week-grid { min-width: 560px; }.legend { gap: 8px; font-size: 8px; }.legend .legend-hint { width: 100%; margin-left: 0; }.panel { padding: 13px; }.task-form input, .task-form select { font-size: 11px; }.task-form label { font-size: 10px; }.availability-row { grid-template-columns: 17px minmax(65px, 1fr) 76px 10px 76px; font-size: 10px; }.availability-row input[type="time"] { height: 29px; font-size: 10px; }.availability-footer { font-size: 9px; } }
@media (max-width: 580px) { .tutor-panel { padding: 13px; }.tutor-intro { align-items: flex-start; gap: 9px; }.tutor-avatar { width: 39px; height: 39px; font-size: 20px; }.tutor-intro h2 { font-size: 15px; }.tutor-intro p:last-child { font-size: 9px; }.local-badge { padding: 5px 6px; font-size: 8px; }.chat-message { max-width: 96%; }.chat-form .button { padding: 8px; }.chat-form input { font-size: 10px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* eStudyante's warm study-desk details */
:root {
  --study-orange: #f28c38;
  --study-orange-deep: #cc6927;
  --study-cream: #fff5e8;
  --study-peach: #ffe4c7;
}
body {
  background-image:
    radial-gradient(circle at 1px 1px, rgba(204, 105, 39, .075) 1px, transparent 1.4px),
    radial-gradient(ellipse at 92% 8%, rgba(255, 201, 145, .22), transparent 30%);
  background-size: 24px 24px, auto;
}
.brand { gap: 9px; margin-bottom: 36px; }
.brand-mark.fox-brand-mark {
  width: 38px;
  height: 38px;
  border: 2px solid #fff0df;
  border-radius: 13px;
  background: #ffe5ca;
  box-shadow: 0 5px 13px rgba(204, 105, 39, .2), inset 0 0 0 1px rgba(255, 255, 255, .8);
}
.fox-brand-mark svg { width: 31px; height: 31px; overflow: visible; }
.fox-icon-fur { fill: #f28c38; stroke: #c86d34; stroke-width: 1.4; stroke-linejoin: round; }
.fox-icon-ear { fill: #ffd2a6; }
.fox-icon-eye { fill: none; stroke: #75462f; stroke-width: 1.8; stroke-linecap: round; }
.fox-icon-muzzle { fill: #fff5e8; }
.fox-icon-nose { fill: #75462f; }
.fox-icon-smile { fill: none; stroke: #75462f; stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; }
.brand-accent, .device-choice-brand .brand-accent { color: var(--study-orange); }
.breadcrumb-brand { display: inline-block; white-space: nowrap; color: #49372b; font-weight: 900; letter-spacing: -.3px; }
.sidebar {
  border-right-color: #f0dfcd;
  background:
    linear-gradient(180deg, rgba(255, 247, 237, .42), transparent 28%),
    #fff;
}
.sidebar-label { color: #a16f4a; }
.nav-link { border-radius: 11px; }
.nav-link.active {
  background: linear-gradient(100deg, #fff0df, #fff8f0);
  box-shadow: inset 3px 0 #f28c38;
}
.nav-icon { color: #c27543; }
.sidebar-note {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(157, 95, 43, .07);
}
.sidebar-note::after {
  content: "✦";
  position: absolute;
  right: 12px;
  bottom: -19px;
  color: rgba(204, 105, 39, .13);
  font-size: 68px;
  line-height: 1;
  pointer-events: none;
}
.profile { border-top-color: #f0dfcd; }
.avatar, .top-avatar {
  border: 2px solid #fff;
  background: #ffe5ca;
  color: var(--study-orange-deep);
  box-shadow: 0 2px 8px rgba(157, 95, 43, .12);
}
.main-content { position: relative; }
.topbar { border-bottom-color: #eedfce; }
.welcome-row { position: relative; }
.welcome-row::after {
  content: "✦  ·  ✧";
  position: absolute;
  top: 27px;
  right: 5px;
  color: rgba(204, 105, 39, .25);
  font-size: 19px;
  letter-spacing: 8px;
  pointer-events: none;
}
.welcome-row > * { position: relative; z-index: 1; }
.eyebrow { color: #a66a3c; }
.wave { color: var(--study-orange); }
.panel, .stat-card {
  position: relative;
  border-color: #f0e2d3;
  border-radius: 16px;
  box-shadow: 0 7px 22px rgba(91, 61, 36, .055), 0 1px 3px rgba(91, 61, 36, .04);
}
.panel::before, .stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 42px;
  height: 3px;
  border-radius: 0 0 5px 5px;
  background: linear-gradient(90deg, #f28c38, #ffd09d);
}
.stat-card { overflow: hidden; }
.stat-card::after {
  content: "✧";
  position: absolute;
  top: 8px;
  right: 13px;
  color: rgba(204, 105, 39, .17);
  font-size: 25px;
  pointer-events: none;
}
.stat-icon { border: 1px solid rgba(204, 105, 39, .08); }
.button-primary {
  border: 1px solid #dc792f;
  background: linear-gradient(135deg, #f59a4c, #e87927);
}
.button-primary:hover { background: linear-gradient(135deg, #ec8b3b, #d96f24); }
.device-choice-brand .brand-mark.fox-brand-mark { width: 42px; height: 42px; }
.device-choice-brand .fox-brand-mark svg { width: 35px; height: 35px; }
.device-choice-option {
  box-shadow: 0 7px 18px rgba(91, 61, 36, .045);
}
.device-choice-option:hover { box-shadow: 0 10px 24px rgba(204, 105, 39, .13); }
@media (max-width: 580px) {
  .welcome-row::after { top: 8px; right: 0; font-size: 14px; }
  .panel, .stat-card { border-radius: 13px; }
}

/* Warm orange-and-cream theme */
body { background: var(--canvas); color: #302821; }
.sidebar { background: #fffaf2; border-color: #efe5d8; }
.topbar { border-color: #eee2d2; }
.brand-mark { background: #f28c38; box-shadow: 0 5px 13px #f28c3840; }
.brand-accent, .nav-link:hover, .nav-link.active, .icon-button:hover,
.note-sparkle, .button-quiet:hover, .subject-add-button, .task-actions button:hover { color: #e87927; }
.nav-link:hover { background: #fff0df; }
.nav-link.active { background: #ffead6; }
.nav-count { background: #fffaf2; }
.sidebar-note { border-color: #f5dfc6; background: linear-gradient(135deg, #fff0df, #fffaf2); }
.icon-button:hover { border-color: #f4c69c; background: #fff7ee; }
.profile-dot, .saved-indicator i { background: #62ae79; }
.avatar, .top-avatar { background: #ffe5c9; color: #704321; }
.button-primary { background: #f28c38; box-shadow: 0 5px 13px #f28c3835; }
.button-primary:hover { background: #df7425; box-shadow: 0 7px 17px #e879273d; }
.stat-icon.lilac { color: #c66a24; background: #fff0df; }
.stat-icon.mint { color: #408b60; background: #edf6e9; }
.stat-icon.peach { color: #bd672b; background: #ffeddd; }
.day { border-color: #f1e7dc; background: #fffdfa; }
.day.today { border-color: #f3bf8f; background: #fff8ef; }
.day-head { border-color: #f1e7dc; }
.day.today .day-number { background: #f28c38; }
.session-card { border-left-color: #f28c38; background: #fff0df; color: #774319; }
.session-card.completed { border-left-color: #61ad7b; background: #edf6e9; color: #397550; }
.session-actions button { background: #fffaf2; color: #744b2d; }
.session-actions .session-missed { color: #aa5e4c; }
.session-actions .session-done { color: #477a54; }
.counter-pill { background: #fff0df; color: #c66a24; }
.subject-add-button:hover { background: #fff3e6; }
.task-form input, .task-form select, .subject-dialog input, .availability-row input[type="time"] { border-color: #eee3d6; background: #fffefa; color: #302821; }
.task-form input:focus, .task-form select:focus, .availability-row input:focus, .subject-dialog input:focus { border-color: #f2ae70; box-shadow: 0 0 0 3px #f28c3818; }
.task-form input::placeholder, .chat-form input::placeholder { color: #b5a797; }
.button-dark { background: #302821; }
.button-dark:hover { background: #47392e; }
.task-item { border-color: #f0e6da; background: #fffdfa; }
.priority-label { color: #b96b27; }
.availability-icon { background: #edf6e9; color: #43875a; }
.availability-row input[type="checkbox"] { accent-color: #f28c38; }
.availability-row input[type="time"] { border-color: #eee3d6; background: #fffefa; }
.tutor-panel { border-color: #f0e2d2; background: linear-gradient(145deg, #fffdfa, #fff8ee); }
.tutor-avatar { overflow: visible; }
.mascot-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mascot-calendar, .mascot-bicep, .mascot-star { opacity: 0; transform-box: fill-box; transform-origin: center; }
.mascot-calendar { transform: translate(7px, 7px) scale(.3) rotate(12deg); }
.mascot-bicep { transform: translate(-5px, 4px) scale(.35); }
.mascot-star { transform: scale(.25) rotate(-25deg); }
.mascot-body { transform-box: fill-box; transform-origin: 50% 90%; animation: mascot-breathe 3s ease-in-out infinite; }
.mascot-eye { transform-box: fill-box; transform-origin: center; animation: mascot-blink 4.8s ease-in-out infinite; }
.mascot-pupil { transform-box: fill-box; transform-origin: center; animation: mascot-blink 4.8s ease-in-out infinite; }
.mascot-frown { opacity: 0; }
.mascot-smile { opacity: 0; }
.mascot-mouth { transform-box: fill-box; transform-origin: center; }
.mascot--explaining .mascot-star, .chat-message.assistant.explaining .mascot-star { opacity: 1; animation: mascot-star-pop .9s ease-in-out infinite; }
.mascot--explaining .mascot-body, .chat-message.assistant.explaining .mascot-body { animation: mascot-teach .7s ease-in-out infinite alternate; }
.mascot--thinking .mascot-brow-left, .chat-message.assistant.thinking .mascot-brow-left { transform: rotate(18deg) translateY(2px); }
.mascot--thinking .mascot-brow-right, .chat-message.assistant.thinking .mascot-brow-right { transform: rotate(-18deg) translateY(2px); }
.mascot--thinking .mascot-eye, .chat-message.assistant.thinking .mascot-eye { transform: scaleY(.75); }
.mascot--thinking .mascot-pupil, .chat-message.assistant.thinking .mascot-pupil { transform: scaleY(.7); }
.mascot--thinking .mascot-smile, .chat-message.assistant.thinking .mascot-smile { opacity: 0; }
.mascot--thinking .mascot-frown, .chat-message.assistant.thinking .mascot-frown { opacity: 1; }
.mascot--thinking .mascot-mouth, .chat-message.assistant.thinking .mascot-mouth { opacity: 0; }
.mascot--thinking .mascot-body, .chat-message.assistant.thinking .mascot-body { animation: mascot-think 1s ease-in-out infinite; }
.mascot--planning .mascot-calendar, .chat-message.assistant.planning .mascot-calendar { opacity: 1; animation: mascot-calendar-pop .55s ease-out both; }
.mascot--planning .mascot-body, .chat-message.assistant.planning .mascot-body { animation: mascot-plan .65s ease-in-out infinite alternate; }
.mascot--celebrating .mascot-bicep, .chat-message.assistant.celebrating .mascot-bicep { opacity: 1; animation: mascot-flex .45s ease-out both; }
.mascot--celebrating .mascot-body, .chat-message.assistant.celebrating .mascot-body { animation: mascot-hop .45s ease-in-out 3; }
.mascot--motivating .mascot-bicep, .chat-message.assistant.motivating .mascot-bicep { opacity: 1; animation: mascot-flex .5s ease-out both, mascot-flex-hold 1.2s .5s ease-in-out infinite alternate; }
.mascot--motivating .mascot-star, .chat-message.assistant.motivating .mascot-star { opacity: 1; animation: mascot-star-pop 1.1s ease-in-out infinite; }
.mascot--motivating .mascot-body, .chat-message.assistant.motivating .mascot-body { animation: mascot-strong 1.2s ease-in-out infinite alternate; }
.chat-message.assistant { border-color: #f2e3d1; background: #fffaf2; }
.chat-message.user { background: #ffead6; }
.chat-message p { color: #44372d; }
.chat-speaker { color: #cf6c23; }
.chat-suggestions button { border-color: #f0e4d7; color: #76583e; }
.chat-suggestions button:hover { border-color: #f2c294; background: #fff4e8; color: #d86e22; }
.chat-form { border-color: #eee3d6; background: #fffefa; }
.chat-form:focus-within { border-color: #f2ae70; box-shadow: 0 0 0 3px #f28c3818; }
.local-badge { border-color: #e3eedc; background: #f2f8ed; color: #4c8055; }
.subject-dialog { border-color: #f0e2d2; background: #fffdfa; }
.subject-dialog::backdrop { background: #30282166; }
.dialog-actions .button-quiet { color: #796b5d; }
.toast { background: #302821; }
.plan-message.warning { color: #a25b21; }
@keyframes mascot-breathe { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-1.5px) rotate(-1deg); } }
@keyframes mascot-blink { 0%, 44%, 48%, 100% { transform: scaleY(1); } 46% { transform: scaleY(.12); } }
@keyframes mascot-star-pop { 0%, 100% { opacity: .65; transform: scale(.72) rotate(-12deg); filter: drop-shadow(0 0 1px #ffd86b); } 50% { opacity: 1; transform: scale(1.12) rotate(12deg); filter: drop-shadow(0 0 7px #ffcb54); } }
@keyframes mascot-teach { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-2px); } }
@keyframes mascot-think { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-4deg) translateY(-1px); } }
@keyframes mascot-calendar-pop { from { opacity: 0; transform: translate(3px, 12px) scale(.55) rotate(18deg); } to { opacity: 1; transform: translate(0) scale(1) rotate(0); } }
@keyframes mascot-plan { from { transform: rotate(-2deg) translateY(0); } to { transform: rotate(2deg) translateY(-2px); } }
@keyframes mascot-flex { from { opacity: 0; transform: translate(-7px, 9px) scale(.3) rotate(-25deg); } to { opacity: 1; transform: translate(0) scale(1) rotate(0); } }
@keyframes mascot-flex-hold { from { transform: rotate(-5deg) scale(1); } to { transform: rotate(5deg) scale(1.08); } }
@keyframes mascot-hop { 0%, 100% { transform: translateY(0) rotate(0); } 48% { transform: translateY(-8px) rotate(-4deg); } }
@keyframes mascot-strong { from { transform: rotate(-2deg) scale(1); } to { transform: rotate(2deg) scale(1.04); } }
.chat-message { display: flex; align-items: flex-start; gap: 9px; }
.chat-message .message-copy { min-width: 0; }
.message-mascot { width: 35px; height: 35px; flex: 0 0 auto; }
.session-card.completed .session-actions .session-done { background: #f7fff4; }
.week-panel, .materials-panel, .availability-panel, .stat-card { animation: warm-arrive .55s both; }
.materials-panel { animation-delay: .06s; }.availability-panel { animation-delay: .12s; }
.button-primary:active, .button-dark:active, .session-actions button:active { transform: scale(.97); }
@keyframes warm-arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) {
  .mascot-body, .mascot-eye, .mascot-pupil, .mascot--explaining .mascot-star, .mascot--planning .mascot-calendar,
  .mascot--celebrating .mascot-bicep, .mascot--celebrating .mascot-body,
  .mascot--motivating .mascot-star, .mascot--motivating .mascot-bicep { animation: none !important; }
}

/* Clearer weekly planner and softer, more dimensional mascot */
.main-content { padding-right: clamp(22px, 4vw, 58px); padding-left: clamp(22px, 4vw, 58px); }
.welcome-row { padding-top: 32px; padding-bottom: 24px; }
.welcome-copy { color: #796b5c; font-size: 13px; }
.week-panel { margin-bottom: 18px; padding: 21px; }
.week-panel .panel-heading { margin-bottom: 19px; }
.week-panel .panel-heading h2 { font-size: 20px; }
.week-grid { min-width: 0; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { min-height: 245px; padding: 11px 9px; border-color: #eee2d3; border-radius: 12px; background: #fffefa; }
.day.today { border: 1.5px solid #f28c38; background: linear-gradient(180deg, #fff8ef 0%, #fffdfa 100%); box-shadow: inset 0 3px #f28c38; }
.day-head { padding: 1px 1px 10px; }
.day-name { color: #766858; font-size: 11px; }
.day-number { width: 28px; height: 28px; border-radius: 9px; background: #f8f0e5; color: #514235; font-size: 12px; }
.day.today .day-number { background: #f28c38; color: #fff; box-shadow: 0 3px 8px #f28c3844; }
.day-items { gap: 7px; padding-top: 9px; }
.empty-day { padding: 20px 3px; color: #a99b8a; font-size: 10px; }
.session-card { padding: 9px 8px; border-left-width: 3px; border-radius: 8px; box-shadow: 0 2px 7px #513c2410; }
.session-card:hover { box-shadow: 0 5px 12px #513c2417; }
.session-card.completed { background: #f0f7eb; }
.session-time { margin-bottom: 5px; color: #8a5728; font-size: 10px; }
.session-title { font-size: 11px; line-height: 1.4; }
.session-subject { margin-top: 4px; font-size: 9px; }
.session-actions { gap: 4px; margin-top: 8px; }
.session-actions button { padding: 5px 6px; border-radius: 6px; font-size: 9px; }
.plan-message { min-height: 20px; margin-top: 12px; color: #6e6256; font-size: 11px; }
.legend { gap: 16px; margin-top: 9px; color: #766858; font-size: 10px; }
.legend .legend-hint { color: #8f806f; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }
.content-grid { display: block; }
.right-column { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; gap: 16px; }
.right-column > .panel { padding: 20px; }
.panel-heading h2 { font-size: 18px; }
.panel-description { color: #796f62; font-size: 11px; line-height: 1.65; }
.task-form { gap: 11px; }
.task-form label { color: #514539; font-size: 10px; line-height: 1.4; }
.task-form input, .task-form select { height: 40px; padding-right: 11px; padding-left: 11px; border-radius: 8px; font-size: 12px; }
.button-full { min-height: 41px; }
.materials-list-heading { margin-bottom: 8px; }
.materials-list-heading strong { font-size: 12px; }
.materials-list-heading span { font-size: 10px; }
.tasks-list { max-height: 280px; gap: 8px; }
.task-item { padding: 10px; border-radius: 9px; }
.task-title { font-size: 11px; }
.task-meta { gap: 7px; font-size: 9px; }
.availability-list { gap: 7px; }
.availability-row { grid-template-columns: 17px minmax(60px, 1fr) 69px 12px 69px; gap: 6px; min-height: 32px; color: #594c3f; font-size: 10px; }
.availability-row input[type="time"] { height: 30px; padding: 0 5px; border-radius: 7px; font-size: 10px; }
.availability-footer { font-size: 9px; }
.tutor-panel { padding: 24px; }
.tutor-intro { gap: 16px; padding-bottom: 19px; }
.tutor-avatar { width: 76px; height: 76px; border-radius: 23px; box-shadow: 0 7px 18px #9d5f2b18; }
.tutor-intro h2 { font-size: 20px; }
.tutor-intro p:last-child { max-width: 650px; color: #766858; font-size: 12px; line-height: 1.6; }
.chat-messages { gap: 12px; max-height: 400px; padding: 18px 2px; }
.chat-message { padding: 12px 15px; border-radius: 13px; }
.chat-message p { font-size: 12px; line-height: 1.75; }
.chat-speaker { font-size: 10px; }
.message-mascot { width: 42px; height: 42px; }
.chat-suggestions { gap: 8px; margin: 0 0 12px; font-size: 10px; }
.chat-suggestions button { padding: 7px 11px; border-radius: 22px; font-size: 10px; }
.chat-form { padding: 7px; border-radius: 11px; }
.chat-form input { padding: 0 9px; font-size: 12px; }
.chat-form .button { padding: 10px 15px; }
.tutor-disclaimer { margin-top: 10px; font-size: 9px; }
.local-badge { padding: 7px 11px; font-size: 10px; }
.stat-foot { color: #796b5c; font-size: 10px; }
.stat-caption { color: #796b5c; font-size: 9px; }
.stat-card { padding: 17px 19px; border-color: #eee2d3; border-radius: 13px; }
.stat-value { color: #302821; }
.toast { padding: 13px 17px; border-radius: 11px; font-size: 12px; }
@media (max-width: 1000px) {
  .week-grid { grid-template-columns: repeat(7, minmax(105px, 1fr)); }
  .week-scroll { overflow-x: auto; }
}
@media (max-width: 800px) {
  .main-content { padding-right: 20px; padding-left: 20px; }
  .right-column { grid-template-columns: 1fr 1fr; }
  .week-panel { padding: 16px; }
  .week-panel .panel-heading h2 { font-size: 17px; }
  .tutor-panel { padding: 18px; }
}
@media (max-width: 580px) {
  .main-nav .nav-link { position: relative; }
  .nav-link .nav-count { top: -2px; right: 4px; margin: 0; }
  .main-content { padding-right: 12px; padding-left: 12px; }
  .week-grid { min-width: 0; grid-template-columns: 1fr; gap: 8px; }
  .day { min-height: 0; padding: 10px 12px; }
  .day-head { padding-bottom: 7px; }
  .day-items { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
  .empty-day { padding: 9px 3px; text-align: left; }
  .session-actions { grid-template-columns: 1fr 1fr; }
  .week-controls #weekLabel { min-width: 100px; }
  .week-panel .panel-heading h2 { font-size: 15px; }
  .right-column { grid-template-columns: 1fr; }
  .tutor-avatar { width: 58px; height: 58px; }
  .tutor-intro h2 { font-size: 16px; }
  .tutor-intro p:last-child { font-size: 10px; }
  .message-mascot { width: 34px; height: 34px; }
  .chat-message { max-width: 100%; padding: 9px; }
}

/* Extra cozy finish */
:root {
  --line: #ecdfcf;
  --shadow: 0 7px 24px rgba(101, 69, 38, .07);
}
body {
  background:
    radial-gradient(ellipse at 92% 3%, rgba(255, 222, 183, .34), transparent 28rem),
    #fff5e8;
}
.topbar { border-color: #eadbc8; }
.breadcrumb, .welcome-copy, .panel-description, .tutor-intro p:last-child { color: #705f50; }
.eyebrow, .stat-caption { color: #967d65; }
.panel, .stat-card {
  border-color: #eddfcf;
  border-radius: 16px;
  box-shadow: 0 7px 23px rgba(101, 69, 38, .055);
}
.week-panel {
  padding: 24px;
  background: linear-gradient(145deg, #fffdfa, #fffaf2);
}
.week-panel .panel-heading h2 { color: #302821; font-size: 21px; }
.week-controls .icon-button {
  width: 34px;
  height: 34px;
  border-color: #eddfcf;
  border-radius: 11px;
  color: #6c5845;
  font-size: 22px;
}
.week-controls .icon-button:hover { border-color: #f2c294; background: #fff0df; color: #c86a28; }
#weekLabel { min-width: 130px; color: #604f40; font-size: 11px; }
.day {
  min-height: 215px;
  padding: 11px 8px;
  border-color: #eee2d3;
  border-radius: 13px;
  background: #fffefa;
}
.day.today {
  border-color: #efb77e;
  background: linear-gradient(180deg, #fff3e4, #fffdfa 78%);
}
.day-name { color: #766653; font-size: 10px; }
.day-number { background: #f6eddf; color: #554737; }
.day.today .day-number { background: #f28c38; box-shadow: 0 3px 8px #f28c3835; }
.empty-day { padding: 13px 2px; color: #9d8d7a; font-size: 9px; }
.session-card {
  border: 1px solid #f0d6b9;
  border-left: 3px solid #f28c38;
  border-radius: 9px;
  background: linear-gradient(135deg, #fff3e5, #fffaf4);
  box-shadow: 0 3px 9px rgba(110, 73, 39, .08);
}
.session-card.completed {
  border-color: #d9e6ce;
  border-left-color: #73a879;
  background: linear-gradient(135deg, #f2f7ec, #fbfcf7);
}
.session-time { color: #a65c27; font-size: 9px; }
.session-title { color: #403329; font-size: 10px; }
.session-subject { color: #806e5b; }
.session-actions button {
  border: 1px solid #f0e2d1;
  border-radius: 7px;
  background: rgba(255, 253, 248, .9);
  color: #675342;
}
.session-actions .session-missed { border-color: #f0ddd2; color: #9a6150; }
.session-actions .session-done { border-color: #dce8d4; color: #537951; }
.legend { color: #705f50; }
.legend .legend-hint { color: #8f7e6b; }
.stat-card {
  min-height: 125px;
  background: linear-gradient(145deg, #fffdfa, #fffaf2);
}
.stat-value { color: #302821; }
.right-column > .panel { border-radius: 16px; }
.task-item { border-color: #eee2d3; border-radius: 11px; background: #fffdfa; }
.task-form input, .task-form select {
  min-height: 42px;
  border-color: #e9ddce;
  border-radius: 9px;
  background: #fffefa;
}
.task-form label { color: #514333; }
.button-dark {
  border-radius: 10px;
  background: #49382c;
  box-shadow: 0 4px 10px rgba(63, 46, 32, .12);
}
.button-dark:hover { background: #302821; }
.availability-row { color: #514333; }
.availability-row input[type="time"] { border-radius: 8px; }
.tutor-panel {
  overflow: hidden;
  border-color: #edddca;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 0 0, rgba(255, 226, 194, .42), transparent 28rem),
    linear-gradient(145deg, #fffdfa, #fff7eb);
}
.tutor-intro { border-color: #eddfcf; }
.tutor-avatar {
  width: 82px;
  height: 82px;
  border: 1px solid #f0d6bb;
  border-radius: 27px;
  background: radial-gradient(circle at 35% 22%, #fff6e8, #ffead5);
  box-shadow: 0 8px 18px rgba(122, 75, 36, .12);
}
.message-mascot { width: 46px; height: 46px; }
.chat-message.assistant {
  border-color: #eddfcf;
  border-radius: 14px;
  background: #fffdfa;
  box-shadow: 0 3px 10px rgba(101, 69, 38, .045);
}
.chat-message.user { border-radius: 14px; background: #ffead6; }
.chat-message p { color: #4d3d30; }
.chat-speaker { color: #c76727; }
.local-badge { border-radius: 20px; background: #f4f7ec; color: #57774d; }
.chat-form {
  border-color: #eadcc9;
  border-radius: 13px;
  background: #fffefa;
}
.chat-form input { color: #302821; }
.chat-suggestions button {
  border-color: #eddfcf;
  border-radius: 20px;
  background: #fffdfa;
  color: #705b46;
}
.chat-suggestions button:hover { border-color: #efbd8d; background: #fff0df; color: #c86a28; }
@media (max-width: 580px) {
  .week-panel { padding: 15px 12px; }
  .week-panel .panel-heading { align-items: flex-start; gap: 6px; }
  .week-panel .panel-heading h2 { font-size: 16px; }
  .week-controls { gap: 4px; }
  .week-controls .icon-button { width: 30px; height: 30px; }
  #weekLabel { min-width: 93px; font-size: 9px; }
  .day { min-height: 0; padding: 10px 12px; }
  .day-head { padding-bottom: 7px; }
  .day-items { grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); }
  .empty-day { padding: 8px 2px; }
  .session-actions { grid-template-columns: 1fr 1fr; }
  .tutor-avatar { width: 66px; height: 66px; border-radius: 21px; }
  .message-mascot { width: 38px; height: 38px; }
  .day.no-sessions { padding: 8px 12px; }
  .day.no-sessions .day-head { padding-bottom: 0; border-bottom: 0; }
  .day.no-sessions .day-items { padding-top: 2px; }
  .day.no-sessions .empty-day { padding: 0 2px; }
}

/* Higher-contrast reading colors and clearer planner hierarchy */
:root {
  --ink: #302821;
  --muted: #635242;
  --line: #dfcbb5;
  --paper: #fffefa;
}
body { color: #302821; }
.sidebar { background: #fffaf2; border-color: #dfcbb5; }
.topbar { border-color: #dfcbb5; }
.breadcrumb, .breadcrumb strong, .welcome-copy, .panel-description,
.tutor-intro p:last-child, .availability-row, .task-meta,
.materials-list-heading span, .profile div:nth-child(2) span {
  color: #5f4d3d;
}
.eyebrow, .stat-caption { color: #715a42; }
h1, h2, .panel-heading h2, .tutor-intro h2 { color: #302821; }
.stat-foot, .legend, .legend .legend-hint, .availability-footer,
.tutor-disclaimer, footer { color: #62503f; }
.panel, .stat-card, .task-item, .day {
  border-color: #dfcbb5;
}
.stat-card { background: #fffdf8; }
.stat-value, .stat-value small { color: #302821; }
.nav-link { color: #534536; }
.nav-link.active { color: #8b4315; background: #ffe4c6; }
.nav-link:hover { color: #8b4315; background: #ffeddb; }
.icon-button, .week-controls .icon-button {
  border-color: #d8c2a8;
  color: #514131;
}
#weekLabel { color: #46382c; font-weight: 700; }
.day {
  border-width: 1.5px;
  background: #fffefa;
}
.day-name { color: #514131; font-weight: 700; }
.day-number { background: #f1e4d2; color: #403125; font-weight: 800; }
.day.today {
  border: 2px solid #df7425;
  background: #fff4e6;
  box-shadow: inset 0 4px #f28c38, 0 4px 12px #8c57221a;
}
.day.today .day-name { color: #773e16; }
.empty-day { color: #6e5a45; }
.session-card {
  border-color: #e6bd94;
  border-left: 4px solid #db7022;
  background: #ffebd5;
  color: #302821;
}
.session-card.completed {
  border-color: #b9d1a9;
  border-left-color: #43804e;
  background: #eaf3e3;
  color: #294d30;
}
.session-time, .session-title, .session-subject { color: inherit; }
.session-time { font-weight: 800; }
.session-subject { opacity: 1; }
.session-actions button { border-color: #ddc7ac; color: #453626; font-weight: 700; }
.session-actions .session-missed { color: #8d4237; }
.session-actions .session-done { color: #34623a; }
.legend-dot.violet { background: #db7022; }
.legend-dot.green { background: #43804e; }
.task-form label, .subject-dialog label, .materials-list-heading strong { color: #403326; }
.task-form input, .task-form select, .availability-row input[type="time"],
.subject-dialog input, .chat-form {
  border-color: #d8c2a8;
  color: #302821;
}
.task-form input::placeholder, .chat-form input::placeholder { color: #75624e; opacity: 1; }
.counter-pill { background: #ffe4c6; color: #813f13; }
.subject-add-button, .chat-speaker { color: #974714; }
.chat-message p, .chat-form input { color: #302821; }
.chat-message.assistant { border-color: #dfcbb5; background: #fffdf8; }
.chat-message.user { background: #ffe4c6; }
.chat-suggestions, .chat-suggestions button { color: #584431; }
.chat-suggestions button { border-color: #dfcbb5; }
.local-badge { color: #385d38; border-color: #bfd0ad; }
.plan-message { color: #514131; }
.plan-message.warning { color: #853c12; font-weight: 700; }
.saved-indicator i, .profile-dot { background: #43804e; }
.availability-row input[type="checkbox"] { accent-color: #db7022; }
.availability-row input[type="time"] { color: #302821; }
.button-quiet { color: #514131; }
.task-actions button { color: #62503f; }
.empty-list, .subject-empty { color: #62503f; }
.tutor-panel { border-color: #dfc6a9; }
.toast { background: #302821; }

.app-view { display: none; }
.app-view.active-view { display: block; animation: warm-arrive .35s both; }
.conversation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}
.conversation-toolbar > span { color: #584431; font-size: 12px; font-weight: 800; }
.conversation-toolbar .button { border-color: #dfcbb5; }
.chat-form .button:disabled { cursor: wait; opacity: .65; transform: none; }
.local-badge.unavailable { border-color: #edcbb9; background: #fff1e8; color: #8c3c20; }
.nav-icon svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-ai-label {
  margin-left: -5px;
  padding: 2px 5px;
  border: 1px solid #efc294;
  border-radius: 6px;
  background: #fff2e3;
  color: #974714;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .35px;
}
.archive-panel { margin-top: 24px; padding: 22px; border-color: #dfcbb5; }
.archive-retention {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid #ead9c4;
  border-radius: 13px;
  background: linear-gradient(110deg, #fff7ec, #fffdfa);
}
.archive-retention label { color: #403326; font-size: 14px; font-weight: 800; }
.archive-retention p { margin: 3px 0 0; color: #6b5847; font-size: 12px; }
.archive-retention select {
  min-width: 170px;
  min-height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid #d8c2a8;
  border-radius: 9px;
  outline: none;
  background: #fffefa;
  color: #302821;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
}
.archive-retention select:focus-visible { border-color: #df7425; box-shadow: 0 0 0 3px #f28c3820; }
.archive-layout { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.55fr); gap: 16px; align-items: start; }
.archive-list { display: grid; gap: 8px; max-height: 580px; overflow-y: auto; }
.archive-item {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 12px;
  border: 1px solid #dfcbb5;
  border-radius: 10px;
  background: #fffefa;
  color: #302821;
  text-align: left;
  transition: border-color .18s, background .18s, transform .18s;
}
.archive-item:hover, .archive-item.selected { border-color: #e39a5b; background: #fff4e6; transform: translateY(-1px); }
.archive-item strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.archive-item span { color: #6b5847; font-size: 9px; }
.archive-preview { min-width: 0; padding: 14px; border: 1px solid #ead9c4; border-radius: 13px; background: #fffaf2; }
.archive-preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid #ead9c4; }
.archive-preview-heading h3 { overflow: hidden; margin: 0; font: 800 14px Nunito, sans-serif; text-overflow: ellipsis; }
.archive-preview-heading .button { flex: 0 0 auto; }
.archive-transcript { display: grid; gap: 10px; max-height: 460px; overflow-y: auto; padding-top: 12px; }
.archive-message { width: fit-content; max-width: 90%; padding: 10px 12px; border: 1px solid #e6d8c7; border-radius: 10px; background: #fffefa; }
.archive-message.user { justify-self: end; border-color: #e8cbaa; background: #ffead6; }
.archive-message strong { color: #974714; font-size: 9px; }
.archive-message p { margin: 4px 0 0; color: #403326; font-size: 11px; line-height: 1.6; white-space: pre-line; }

body.intro-open { overflow: hidden; }
.nexi-welcome {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 32px;
  background:
    radial-gradient(ellipse at 50% 43%, rgba(100, 67, 46, .32), transparent 44%),
    linear-gradient(145deg, #211a16, #30231d 56%, #1c1714);
  color: #fff5e8;
  transition: opacity .45s ease, visibility .45s ease;
}
.nexi-welcome[hidden] { display: none; }
.nexi-welcome--leaving { visibility: hidden; opacity: 0; }
.nexi-welcome-glow {
  position: absolute;
  width: min(62vw, 650px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 140, 56, .14), rgba(242, 140, 56, .035) 47%, transparent 70%);
  animation: nexi-glow 5s ease-in-out infinite;
  pointer-events: none;
}
.nexi-welcome-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 330px) minmax(280px, 440px);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  width: min(940px, 100%);
  animation: nexi-arrive .75s cubic-bezier(.2, .75, .25, 1) both;
}
.nexi-welcome .tutor-avatar {
  width: min(100%, 320px);
  height: auto;
  aspect-ratio: 1;
  justify-self: center;
  animation: nexi-float 4s ease-in-out infinite;
}
.nexi-welcome .tutor-avatar .mascot-svg {
  overflow: visible;
  filter: drop-shadow(0 20px 20px rgba(0, 0, 0, .3)) drop-shadow(0 0 22px rgba(242, 140, 56, .12));
}
.nexi-welcome .mascot-book {
  opacity: 1;
  transform: translateY(1px);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .35s ease;
}
.nexi-welcome .mascot-calendar,
.nexi-welcome .mascot-bicep,
.nexi-welcome .mascot-star { opacity: 0; }
.nexi-welcome .mascot--explaining .mascot-book { animation: nexi-book-bob 1.8s ease-in-out infinite; }
.nexi-welcome .mascot--celebrating .mascot-book { transform: translateY(-4px) rotate(-5deg); }
.nexi-welcome-copy { max-width: 440px; }
.nexi-welcome-eyebrow {
  margin: 0 0 14px;
  color: #e8b487;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2.3px;
}
.nexi-welcome-copy h1 {
  margin: 0;
  color: #fff5e8;
  font-size: clamp(38px, 5vw, 58px);
  font-weight: 900;
  letter-spacing: -2px;
  line-height: 1.08;
}
.nexi-welcome-copy h1 span { color: #f28c38; }
.nexi-welcome-star {
  display: inline-block;
  margin-left: 8px;
  color: #ffd978;
  font-size: .45em;
  font-style: normal;
  vertical-align: top;
  animation: nexi-star-twinkle 2s ease-in-out infinite;
}
.nexi-mood-line {
  min-height: 28px;
  margin: 20px 0 8px;
  color: #ffd2a6;
  font-size: 19px;
  font-weight: 800;
  transition: opacity .38s ease, transform .38s cubic-bezier(.2, .75, .25, 1), filter .38s ease;
}
.nexi-mood-line--changing { opacity: 0; transform: translateY(9px); filter: blur(5px); }
.nexi-welcome-description {
  max-width: 390px;
  margin: 0;
  color: #d1c0b1;
  font-size: 16px;
  line-height: 1.75;
}
.nexi-enter-button {
  display: inline-flex;
  align-items: center;
  gap: 25px;
  min-height: 54px;
  margin-top: 28px;
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  background: #f28c38;
  box-shadow: 0 9px 26px rgba(242, 140, 56, .23);
  color: #2b2018;
  font-size: 16px;
  font-weight: 900;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.nexi-enter-button:hover { transform: translateY(-3px); background: #ffa04f; box-shadow: 0 13px 30px rgba(242, 140, 56, .3); }
.nexi-enter-button:focus-visible { outline: 3px solid #fff5e8; outline-offset: 4px; }
.nexi-enter-button span { font-size: 22px; transition: transform .2s ease; }
.nexi-enter-button:hover span { transform: translateX(4px); }
.nexi-welcome-footnote { display: block; margin-top: 17px; color: #a99583; font-size: 13px; }
.nexi-welcome-spark { position: absolute; color: #ffd978; pointer-events: none; }
.nexi-welcome-spark-one { top: 18%; left: 17%; font-size: 25px; animation: nexi-star-twinkle 2.7s ease-in-out infinite; }
.nexi-welcome-spark-two { right: 17%; bottom: 19%; color: #f2b18a; font-size: 33px; animation: nexi-star-twinkle 3.2s .5s ease-in-out infinite; }
@keyframes nexi-arrive { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes welcome-text-in { from { opacity: 0; transform: translateY(15px); filter: blur(5px); } to { opacity: 1; transform: translateY(0); filter: blur(0); } }
@keyframes nexi-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-9px) rotate(1deg); } }
@keyframes nexi-glow { 0%, 100% { opacity: .72; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes nexi-book-bob { 0%, 100% { transform: translateY(1px) rotate(0); } 50% { transform: translateY(-2px) rotate(-2deg); } }
@keyframes nexi-star-twinkle { 0%, 100% { opacity: .6; transform: scale(.85) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.14) rotate(8deg); } }
@media (max-width: 700px) {
  .nexi-welcome { padding: 26px 22px; }
  .nexi-welcome-content { grid-template-columns: minmax(0, 1fr); gap: 4px; justify-items: center; text-align: center; }
  .nexi-welcome .tutor-avatar,
  body.device-mobile .nexi-welcome .tutor-avatar {
    width: min(76vw, 330px);
    height: auto;
    aspect-ratio: 1;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .nexi-welcome .tutor-avatar .mascot-svg,
  body.device-mobile .nexi-welcome .tutor-avatar .mascot-svg {
    filter: drop-shadow(0 0 22px rgba(242, 140, 56, .38));
  }
  .nexi-welcome-copy h1 { font-size: clamp(37px, 10vw, 52px); }
  .nexi-welcome-eyebrow { margin-bottom: 9px; font-size: 10px; }
  .nexi-mood-line { margin-top: 13px; font-size: 16px; }
  .nexi-welcome-description { font-size: 14px; }
  .nexi-enter-button { min-height: 49px; margin-top: 20px; }
  .nexi-welcome-footnote { margin-top: 12px; font-size: 11px; }
  .nexi-welcome-spark-one { top: 8%; left: 9%; }
  .nexi-welcome-spark-two { right: 8%; bottom: 8%; }
}
@media (max-width: 400px) {
  .nexi-welcome .tutor-avatar,
  body.device-mobile .nexi-welcome .tutor-avatar { width: min(84vw, 300px); }
}
@media (max-height: 650px) and (min-width: 701px) {
  .nexi-welcome-content { grid-template-columns: minmax(180px, 250px) minmax(280px, 440px); gap: 34px; }
  .nexi-welcome .tutor-avatar { width: min(100%, 245px); }
  .nexi-welcome-copy h1 { font-size: 44px; }
  .nexi-mood-line { margin-top: 12px; }
  .nexi-enter-button { min-height: 47px; margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .nexi-welcome *,
  .nexi-welcome *::before,
  .nexi-welcome *::after { animation: none !important; }
  .nexi-mood-line { transition: none; }
}
.nexi-welcome-copy > * { animation: none; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > * { animation: welcome-text-in .7s cubic-bezier(.2, .75, .25, 1) both; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(1) { animation-delay: .18s; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(2) { animation-delay: .32s; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(3) { animation-delay: .48s; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(4) { animation-delay: .62s; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(5) { animation-delay: .76s; }
.nexi-welcome:not([hidden]) .nexi-welcome-copy > :nth-child(6) { animation-delay: .9s; }

.availability-list { gap: 12px; }
.availability-day {
  display: grid;
  grid-template-columns: minmax(160px, .75fr) minmax(220px, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #eee2d3;
  border-radius: 12px;
  background: #fffdfa;
}
.availability-day.disabled { opacity: .58; }
.availability-day-heading, .availability-day-name { display: flex; align-items: center; }
.availability-day-name { min-height: 36px; gap: 9px; flex-wrap: wrap; }
.availability-day-name input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #f28c38;
}
.availability-day-name label { color: #514333; font-size: 13px; font-weight: 800; text-transform: capitalize; }
.availability-add {
  padding: 6px 9px;
  border: 1px solid #f1dfca;
  border-radius: 8px;
  background: #fff7ec;
  color: #a75b22;
  font-size: 11px;
  font-weight: 800;
}
.availability-add:hover { border-color: #e8b17f; background: #ffefdc; }
.availability-intervals { display: grid; gap: 7px; }
.availability-interval {
  display: grid;
  grid-template-columns: minmax(76px, 1fr) 14px minmax(76px, 1fr) 30px;
  align-items: center;
  gap: 7px;
}
.availability-interval input[type="time"] {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 7px;
  border: 1px solid #e9ddce;
  border-radius: 8px;
  background: #fffefa;
  color: #302821;
  font: inherit;
  font-size: 12px;
}
.availability-interval input[type="time"]:focus-visible { outline: 2px solid #f2ae70; outline-offset: 1px; }
.availability-interval .time-separator { color: #9c8873; text-align: center; }
.availability-remove {
  width: 30px;
  height: 30px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #987e69;
  font-size: 19px;
  line-height: 1;
}
.availability-remove:hover { border-color: #f0ddd2; background: #fff3ec; color: #a9573f; }
.availability-empty { align-self: center; color: #8f806f; font-size: 12px; }
@media (max-width: 700px) {
  .availability-day { grid-template-columns: 1fr; gap: 8px; padding: 11px; }
  .availability-day-name { justify-content: space-between; }
  .availability-interval { max-width: 360px; }
}
@media (max-width: 400px) {
  .availability-interval { grid-template-columns: minmax(0, 1fr) 10px minmax(0, 1fr) 28px; gap: 4px; }
  .availability-interval input[type="time"] { padding: 0 3px; font-size: 11px; }
}
@media (max-width: 800px) {
  .main-nav { gap: 2px; }
  .nav-link { min-width: 0; justify-content: center; gap: 6px; padding: 8px 6px; }
  .nav-count { width: 17px; height: 17px; }
}
@media (max-width: 580px) {
  .main-nav { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .nav-link { min-height: 46px; position: relative; }
  .nav-count { position: absolute; top: 0; right: 2px; margin: 0; width: 15px; height: 15px; font-size: 8px; }
  .tutor-intro { align-items: flex-start; flex-wrap: wrap; }
  .local-badge { margin: 0 0 0 78px; }
  .conversation-toolbar { align-items: flex-start; flex-direction: column; }
  .archive-panel { padding: 15px 12px; }
  .archive-retention { align-items: stretch; flex-direction: column; gap: 10px; padding: 12px; }
  .archive-retention select { width: 100%; }
  .archive-layout { grid-template-columns: 1fr; }
  .archive-list { max-height: 220px; }
  .archive-preview-heading { align-items: flex-start; flex-direction: column; }
  .archive-preview-heading .button { width: 100%; }
}

/* Softer, more lifelike movement for Eduo */
.mascot-svg { overflow: visible; filter: drop-shadow(0 2px 2px rgba(112, 67, 33, .08)); }
.mascot-body {
  transform-box: fill-box;
  transform-origin: 50% 85%;
  animation: mascot-soft-breathe 5.4s ease-in-out infinite;
}
.mascot-fur { stroke-linecap: round; stroke-linejoin: round; }
.mascot-ground-shadow { transform-box: fill-box; transform-origin: center; animation: mascot-shadow-breathe 5.4s ease-in-out infinite; }
.mascot-tail { transform-box: fill-box; transform-origin: 80% 50%; animation: mascot-tail-wag 4.7s ease-in-out infinite; }
.mascot-tail-highlight { opacity: .75; }
.mascot-antenna { transform-box: fill-box; transform-origin: 100% 100%; animation: mascot-antenna-sway 4.1s ease-in-out infinite; }
.mascot-antenna-tip { transform-box: fill-box; transform-origin: center; animation: mascot-tip-bob 4.1s ease-in-out infinite; }
.mascot-eye-group { transform-box: fill-box; transform-origin: center; animation: none; }
.mascot-eye { transform: none; }
.mascot-pupil { transform-box: fill-box; transform-origin: center; animation: mascot-gaze 8.2s ease-in-out infinite; }
.mascot-pupil-right { animation-delay: .08s; }
.mascot-brow { transform-box: fill-box; transform-origin: center; transition: transform .35s ease; }
.mascot-mouth, .mascot-frown { transition: opacity .3s ease, d .3s ease; }
.mascot-mouth { opacity: 1; }
.mascot-frown { opacity: 0; }
.mascot-arm { transform-box: fill-box; transform-origin: 50% 20%; }
.mascot-arm-left { animation: mascot-arm-settle 5.2s ease-in-out infinite; }
.mascot-arm-right { animation: mascot-arm-settle 5.2s .3s ease-in-out infinite; }
.mascot-foot { transform-box: fill-box; transform-origin: 50% 10%; }
.mascot-foot-left { animation: mascot-foot-shift 6.1s ease-in-out infinite; }
.mascot-foot-right { animation: mascot-foot-shift 6.1s .2s ease-in-out infinite; }
.mascot-cheek { transform-box: fill-box; transform-origin: center; animation: mascot-cheek-warm 5.4s ease-in-out infinite; }
.mascot--idle .mascot-body, .chat-message.assistant.idle .mascot-body { animation: mascot-soft-breathe 5.4s ease-in-out infinite; }
.mascot--explaining .mascot-body, .chat-message.assistant.explaining .mascot-body { animation: mascot-gentle-teach 1.8s ease-in-out infinite; }
.mascot--explaining .mascot-arm-left, .chat-message.assistant.explaining .mascot-arm-left { animation: mascot-explain-arm 1.8s ease-in-out infinite; }
.mascot--thinking .mascot-body, .chat-message.assistant.thinking .mascot-body { animation: mascot-soft-think 2.4s ease-in-out infinite; }
.mascot--thinking .mascot-brow-left, .chat-message.assistant.thinking .mascot-brow-left { transform: rotate(12deg) translateY(1px); }
.mascot--thinking .mascot-brow-right, .chat-message.assistant.thinking .mascot-brow-right { transform: rotate(-12deg) translateY(1px); }
.mascot--thinking .mascot-mouth, .chat-message.assistant.thinking .mascot-mouth { opacity: 0; }
.mascot--thinking .mascot-frown, .chat-message.assistant.thinking .mascot-frown { opacity: 1; }
.mascot--planning .mascot-body, .chat-message.assistant.planning .mascot-body { animation: mascot-gentle-plan 1.6s ease-in-out infinite; }
.mascot--planning .mascot-arm-left, .chat-message.assistant.planning .mascot-arm-left { animation: mascot-plan-arm 1.6s ease-in-out infinite; }
.mascot--celebrating .mascot-body, .chat-message.assistant.celebrating .mascot-body { animation: mascot-soft-hop .65s ease-in-out 3; }
.mascot--motivating .mascot-body, .chat-message.assistant.motivating .mascot-body { animation: mascot-soft-strong 2.2s ease-in-out infinite; }
.mascot--curious .mascot-body { animation: mascot-curious-tilt 1.7s ease-in-out both; }
.mascot--curious .mascot-eye-group-left { animation: mascot-curious-look 1.7s ease-in-out both; }
.mascot--curious .mascot-eye-group-right { animation: mascot-curious-look 1.7s .04s ease-in-out both; }
.mascot--curious .mascot-tail { animation: mascot-curious-tail 1.7s ease-in-out both; }
.mascot--curious .mascot-brow-left { transform: translateY(-1px) rotate(-5deg); }
.mascot--curious .mascot-brow-right { transform: translateY(-1px) rotate(5deg); }
.mascot-calendar { border-radius: 6px; }
.mascot-star { filter: drop-shadow(0 0 4px rgba(255, 216, 107, .62)); }

@keyframes mascot-soft-breathe {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  24% { transform: translateY(-.6px) rotate(-.7deg) scale(1.008, .996); }
  48% { transform: translateY(-1.8px) rotate(.4deg) scale(.995, 1.01); }
  72% { transform: translateY(-.5px) rotate(.8deg) scale(1.006, .998); }
}
@keyframes mascot-shadow-breathe {
  0%, 100% { transform: scaleX(1); opacity: .12; }
  48% { transform: scaleX(.88); opacity: .08; }
}
@keyframes mascot-tail-wag {
  0%, 68%, 100% { transform: rotate(0); }
  74% { transform: rotate(-13deg); }
  81% { transform: rotate(8deg); }
  88% { transform: rotate(-5deg); }
}
@keyframes mascot-antenna-sway {
  0%, 100% { transform: rotate(0); }
  28% { transform: rotate(5deg); }
  62% { transform: rotate(-4deg); }
}
@keyframes mascot-tip-bob {
  0%, 100% { transform: translateY(0); }
  28% { transform: translateY(1px); }
  62% { transform: translateY(-.8px); }
}
@keyframes mascot-blink {
  0%, 34%, 37%, 69%, 72%, 100% { transform: scaleY(1); }
  35.5%, 70.5% { transform: scaleY(.12); }
}
@keyframes mascot-gaze {
  0%, 14%, 25%, 64%, 76%, 100% { transform: translate(0, 0); }
  18%, 22% { transform: translate(-1px, -.3px); }
  68%, 72% { transform: translate(1px, .1px); }
}
@keyframes mascot-arm-settle {
  0%, 100% { transform: rotate(0); }
  32% { transform: rotate(-3deg); }
  67% { transform: rotate(2deg); }
}
@keyframes mascot-foot-shift {
  0%, 100% { transform: rotate(0); }
  45% { transform: rotate(-2deg); }
  72% { transform: rotate(1deg); }
}
@keyframes mascot-cheek-warm {
  0%, 100% { opacity: .75; }
  50% { opacity: .94; }
}
@keyframes mascot-gentle-teach {
  0%, 100% { transform: translateY(0) rotate(-1deg) scale(1); }
  50% { transform: translateY(-1.2px) rotate(1.3deg) scale(1.008); }
}
@keyframes mascot-explain-arm {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(-12deg); }
}
@keyframes mascot-soft-think {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  38% { transform: translateY(-1.4px) rotate(-3deg); }
  72% { transform: translateY(-.4px) rotate(-1deg); }
}
@keyframes mascot-gentle-plan {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-1.5px) rotate(1deg); }
}
@keyframes mascot-plan-arm {
  0%, 100% { transform: rotate(-1deg); }
  50% { transform: rotate(-9deg); }
}
@keyframes mascot-soft-hop {
  0%, 100% { transform: translateY(0) rotate(0) scale(1); }
  42% { transform: translateY(-5px) rotate(-2deg) scale(1.015, .99); }
  68% { transform: translateY(-1px) rotate(1deg) scale(.99, 1.01); }
}
@keyframes mascot-soft-strong {
  0%, 100% { transform: rotate(-1deg) scale(1); }
  50% { transform: rotate(1deg) scale(1.018); }
}
@keyframes mascot-curious-tilt {
  0%, 100% { transform: rotate(0) translateY(0); }
  28% { transform: rotate(5deg) translateY(-1px); }
  60% { transform: rotate(3deg) translateY(-.4px); }
}
@keyframes mascot-curious-look {
  0%, 100% { transform: translate(0, 0) scaleY(1); }
  25% { transform: translate(1px, 0) scaleY(.94); }
  54% { transform: translate(-.7px, 0) scaleY(1); }
}
@keyframes mascot-curious-tail {
  0%, 100% { transform: rotate(0); }
  30% { transform: rotate(17deg); }
  58% { transform: rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .mascot-body, .mascot-ground-shadow, .mascot-tail, .mascot-antenna, .mascot-antenna-tip,
  .mascot-eye-group, .mascot-pupil, .mascot-arm, .mascot-foot, .mascot-cheek {
    animation: none !important;
  }
  .mascot--curious .mascot-brow-left, .mascot--curious .mascot-brow-right { transform: none; }
}

/* Let Eduo move freely, without an avatar tile */
.tutor-avatar {
  width: 104px;
  height: 108px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  animation: none;
}
.tutor-avatar .mascot-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 5px rgba(112, 67, 33, .12));
  transform-box: view-box;
  transform-origin: center;
  animation: mascot-free-drift 6.7s ease-in-out infinite;
}
.message-mascot .mascot-svg {
  transform-box: view-box;
  transform-origin: center;
  animation: mascot-free-drift 6.7s ease-in-out infinite;
}
.mascot-body {
  transform-origin: 50% 88%;
  animation-name: mascot-organic-breathe;
  animation-duration: 4.8s;
}
.mascot--idle .mascot-body, .chat-message.assistant.idle .mascot-body {
  animation: mascot-organic-breathe 4.8s ease-in-out infinite;
}
.mascot--explaining .mascot-body, .chat-message.assistant.explaining .mascot-body {
  animation: mascot-gentle-teach 2.2s ease-in-out infinite;
}
.mascot--thinking .mascot-body, .chat-message.assistant.thinking .mascot-body {
  animation: mascot-soft-think 2.8s ease-in-out infinite;
}
.mascot--planning .mascot-body, .chat-message.assistant.planning .mascot-body {
  animation: mascot-gentle-plan 2s ease-in-out infinite;
}
.mascot--motivating .mascot-body, .chat-message.assistant.motivating .mascot-body {
  animation: mascot-soft-strong 2.5s ease-in-out infinite;
}
.mascot-tail { animation-duration: 6.3s; }
.mascot-arm-left { animation-duration: 7.2s; }
.mascot-arm-right { animation-duration: 6.8s; }
.mascot-foot-left { animation-duration: 7.8s; }
.mascot-foot-right { animation-duration: 7.2s; }
.mascot-antenna, .mascot-antenna-tip { animation-duration: 5.8s; }
.mascot--thinking .mascot-brow-left, .chat-message.assistant.thinking .mascot-brow-left {
  transform: rotate(9deg) translateY(.5px);
}
.mascot--thinking .mascot-brow-right, .chat-message.assistant.thinking .mascot-brow-right {
  transform: rotate(-9deg) translateY(.5px);
}
.mascot-calendar, .mascot-bicep { stroke-linecap: round; stroke-linejoin: round; }
@keyframes mascot-free-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0) scale(1); }
  22% { transform: translate3d(-1px, -1.5px, 0) rotate(-1.2deg) scale(1.008); }
  48% { transform: translate3d(.4px, -3px, 0) rotate(.5deg) scale(.995, 1.012); }
  76% { transform: translate3d(1px, -1px, 0) rotate(1.1deg) scale(1.006, .998); }
}
@keyframes mascot-organic-breathe {
  0%, 100% { transform: translateY(0) rotate(0) scale(1, 1); }
  23% { transform: translateY(-.5px) rotate(-.6deg) scale(1.01, .99); }
  52% { transform: translateY(-1.2px) rotate(.35deg) scale(.99, 1.015); }
  79% { transform: translateY(-.35px) rotate(.6deg) scale(1.008, .995); }
}
@media (max-width: 580px) {
  .tutor-avatar { width: 78px; height: 82px; }
}
@media (prefers-reduced-motion: reduce) {
  .tutor-avatar .mascot-svg, .message-mascot .mascot-svg { animation: none !important; }
  .mascot-body { animation: none !important; }
}

/* Welcoming studyplan typography and readable type scale */
body {
  font-family: "Nunito", "DM Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
h1, h2, h3, .brand { font-family: "Nunito", "DM Sans", system-ui, sans-serif; }
.brand { font-size: 25px; font-weight: 900; letter-spacing: -.9px; }
.sidebar-label { font-size: 10px; }
.nav-link { font-size: 14px; }
.sidebar-note strong, .profile strong { font-size: 13px; }
.sidebar-note p, .profile div:nth-child(2) span { font-size: 12px; }
.breadcrumb { font-size: 13px; }
.button { font-size: 13px; }
.welcome-row { padding-top: 38px; padding-bottom: 29px; }
h1 { font-size: clamp(30px, 3vw, 40px); line-height: 1.15; }
.welcome-copy { font-size: 16px; line-height: 1.6; }
.eyebrow, .stat-caption { font-size: 10px; letter-spacing: 1.2px; }
.stat-caption { font-size: 10px; }
.stat-value { font-size: 27px; }
.stat-value small { font-size: 12px; }
.stat-foot { font-size: 12px; }
.panel-heading h2 { font-size: 21px; line-height: 1.25; }
.panel-heading .eyebrow { font-size: 10px; }
.panel-description { font-size: 14px; line-height: 1.65; }
#weekLabel { font-size: 12px; }
.day-name { font-size: 12px; }
.day-number { font-size: 13px; }
.session-time { font-size: 11px; }
.session-title { font-size: 12px; line-height: 1.45; }
.session-subject { font-size: 10px; }
.session-actions button { font-size: 10px; }
.empty-day, .legend { font-size: 11px; }
.plan-message { font-size: 13px; }
.task-form label { font-size: 13px; }
.task-form input, .task-form select, .subject-dialog input { font-size: 14px; }
.materials-list-heading strong { font-size: 14px; }
.materials-list-heading span, .task-title { font-size: 12px; }
.task-meta { font-size: 11px; }
.availability-row { font-size: 12px; }
.availability-row input[type="time"] { font-size: 12px; }
.availability-footer { font-size: 11px; }
.tutor-intro h2 { font-size: 25px; }
.tutor-intro p:last-child { font-size: 15px; line-height: 1.6; }
.local-badge { font-size: 11px; }
.conversation-toolbar > span { font-size: 14px; }
.chat-message p { font-size: 15px; line-height: 1.75; }
.chat-speaker { font-size: 12px; }
.chat-suggestions, .chat-suggestions button { font-size: 12px; }
.chat-form input { font-size: 15px; }
.tutor-disclaimer, footer { font-size: 11px; line-height: 1.6; }
.archive-item strong { font-size: 13px; }
.archive-item span { font-size: 11px; }
.archive-message p { font-size: 14px; line-height: 1.7; }
.archive-message strong { font-size: 11px; }
.toast { font-size: 13px; }
.empty-list, .subject-empty { font-size: 12px; }
.mascot-arm-left { transform-origin: 82% 25%; }
.mascot-arm-right { transform-origin: 18% 25%; }
.mascot--explaining .mascot-arm-right, .chat-message.assistant.explaining .mascot-arm-right {
  animation: mascot-friendly-gesture 2.4s ease-in-out infinite;
}
.mascot--celebrating .mascot-arm-left, .chat-message.assistant.celebrating .mascot-arm-left {
  animation: mascot-celebrate-arm .65s ease-in-out 3;
}
.mascot--motivating .mascot-arm-left, .chat-message.assistant.motivating .mascot-arm-left {
  animation: mascot-friendly-gesture 2s ease-in-out infinite;
}
@keyframes mascot-friendly-gesture {
  0%, 100% { transform: rotate(0); }
  35% { transform: rotate(-15deg); }
  65% { transform: rotate(-6deg); }
}
@keyframes mascot-celebrate-arm {
  0%, 100% { transform: rotate(0); }
  42% { transform: rotate(-20deg); }
  70% { transform: rotate(7deg); }
}
@media (max-width: 800px) {
  .nav-link { font-size: 12px; }
}
@media (max-width: 580px) {
  .brand { font-size: 22px; }
  .nav-link { font-size: 10px; }
  h1 { font-size: clamp(27px, 8vw, 33px); }
  .welcome-copy { font-size: 14px; }
  .button { font-size: 12px; }
  .panel-heading h2 { font-size: 18px; }
  .panel-description { font-size: 13px; }
  .day-name { font-size: 12px; }
  .session-title { font-size: 12px; }
  .tutor-intro h2 { font-size: 21px; }
  .tutor-intro p:last-child { font-size: 14px; }
  .chat-message p { font-size: 14px; }
  .chat-form input { font-size: 14px; }
  .task-form label { font-size: 12px; }
}

body.device-choice-open { overflow: hidden; }
.device-choice[hidden] { display: none; }
.device-choice {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: 32px 20px;
  background:
    radial-gradient(ellipse at 50% 38%, rgba(255, 190, 124, .34), transparent 38%),
    linear-gradient(145deg, #fff8ef, #f8e9d8);
  color: #38291e;
}
.device-choice-glow {
  position: absolute;
  top: 10%;
  left: 50%;
  width: min(68vw, 680px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 140, 56, .11), transparent 68%);
  transform: translateX(-50%);
  pointer-events: none;
}
.device-choice-content {
  position: relative;
  width: min(640px, 100%);
  text-align: center;
  animation: nexi-arrive .55s ease-out both;
}
.device-choice-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  color: #302821;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -.8px;
  text-decoration: none;
}
.device-choice-brand .brand-mark { width: 36px; height: 36px; }
.device-choice-brand .brand-accent { color: #e87927; }
.device-choice-eyebrow {
  position: relative;
  display: table;
  margin: 0 auto 15px;
  padding: 9px 18px;
  border: 1px solid rgba(189, 113, 54, .2);
  border-radius: 999px;
  background: rgba(255, 253, 250, .76);
  box-shadow: 0 7px 19px rgba(157, 95, 43, .09);
  color: #bd7136;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 2px;
  transform-origin: center;
  animation: welcome-bubble-expand .8s cubic-bezier(.18, .89, .32, 1.24) both;
}
.device-choice-eyebrow::before,
.device-choice-eyebrow::after { position: absolute; left: 50%; width: 0; height: 0; content: ""; transform: translateX(-50%); }
.device-choice-eyebrow::before { bottom: -11px; border-top: 11px solid rgba(189, 113, 54, .38); border-right: 11px solid transparent; border-left: 11px solid transparent; }
.device-choice-eyebrow::after { bottom: -8px; border-top: 9px solid #fffaf3; border-right: 9px solid transparent; border-left: 9px solid transparent; }
@keyframes welcome-bubble-expand { from { opacity: 0; transform: scale(.35); } 70% { opacity: 1; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }
.device-choice-content h1 {
  margin: 0;
  color: #34271e;
  font-size: clamp(29px, 5vw, 40px);
  font-weight: 900;
  letter-spacing: -1.3px;
  line-height: 1.15;
}
.device-choice-description {
  margin: 12px auto 28px;
  color: #796858;
  font-size: 15px;
}
.device-choice-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.device-choice-option {
  min-height: 205px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid #ead8c4;
  border-radius: 20px;
  background: rgba(255, 253, 250, .88);
  box-shadow: 0 8px 25px rgba(100, 67, 46, .06);
  color: inherit;
  text-align: left;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.device-choice-option:hover { transform: translateY(-4px); border-color: #efaa6e; box-shadow: 0 14px 30px rgba(100, 67, 46, .12); }
.device-choice-option:focus-visible { outline: 3px solid #e87927; outline-offset: 3px; }
.device-preview {
  position: relative;
  display: block;
  height: 70px;
  margin: 0 auto 13px;
  border: 2px solid #9a7f68;
  border-radius: 9px;
  background: #fff6eb;
}
.device-preview i, .device-preview b, .device-preview em, .device-preview small { position: absolute; display: block; border-radius: 4px; background: #f3c49e; }
.device-preview i { top: 8px; left: 7px; width: 22%; height: calc(100% - 16px); background: #f5dfc9; }
.device-preview b { top: 8px; left: 31%; width: 60%; height: 15%; }
.device-preview em { top: 29%; left: 31%; width: 60%; height: 23%; background: #f28c38; }
.device-preview small { top: 58%; left: 31%; width: 60%; height: 27%; }
.phone-preview { width: 44px; height: 70px; border-radius: 10px; }
.phone-preview i { top: 11px; left: 5px; width: 8px; height: 9px; }
.phone-preview b { top: 11px; left: 17px; width: 19px; height: 8px; }
.phone-preview em { top: 24px; left: 5px; width: 31px; height: 18px; }
.phone-preview small { top: 47px; left: 5px; width: 31px; height: 12px; }
.desktop-preview { width: 112px; }
.device-choice-option-copy { display: grid; gap: 3px; }
.device-choice-option-copy strong { font-size: 17px; font-weight: 900; }
.device-choice-option-copy small { color: #796858; font-size: 12px; line-height: 1.45; }
.device-choice-arrow { align-self: flex-end; margin-top: -22px; color: #de782a; font-size: 20px; font-weight: 900; }
.device-choice-note { margin: 20px 0 0; color: #998675; font-size: 12px; }

body.device-mobile { background: #f5ede3; }
body.device-mobile .app-shell {
  display: block;
  width: min(100%, 480px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--canvas);
  box-shadow: 0 0 35px rgba(75, 52, 32, .08);
}
body.device-mobile .sidebar {
  position: fixed;
  z-index: 10;
  top: 0;
  right: auto;
  bottom: 0;
  left: max(0px, calc((100vw - 480px) / 2));
  width: min(300px, calc(100vw - 52px));
  height: 100dvh;
  display: flex;
  padding: 24px 16px max(16px, env(safe-area-inset-bottom));
  border: 0;
  border-right: 1px solid #eadbca;
  background: #fffaf2;
  box-shadow: 8px 0 30px rgba(75, 52, 32, .14);
  transform: translateX(calc(-100% - 12px));
  transition: transform .32s cubic-bezier(.2, .75, .25, 1);
  overflow-y: auto;
}
body.device-mobile.mobile-nav-open .sidebar { transform: translateX(0); }
body.device-mobile.mobile-nav-open { overflow: hidden; }
body.device-mobile .sidebar-backdrop {
  position: fixed;
  z-index: 9;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(35, 25, 18, .38);
  opacity: 0;
  transition: opacity .32s ease;
}
body.device-mobile .sidebar-backdrop:not([hidden]) { display: block; opacity: 1; }
body.device-mobile .sidebar .brand { display: flex; margin-bottom: 30px; }
body.device-mobile .sidebar > .sidebar-label,
body.device-mobile .sidebar-section-heading,
body.device-mobile .subject-list,
body.device-mobile .sidebar-note,
body.device-mobile .profile { display: flex; }
body.device-mobile .sidebar > .sidebar-label,
body.device-mobile .sidebar-section-heading { flex: 0 0 auto; }
body.device-mobile .sidebar-section-heading { display: flex; }
body.device-mobile .subject-list { display: grid; }
body.device-mobile .sidebar-note { display: block; margin-top: auto; }
body.device-mobile .profile { display: grid; }
body.device-mobile .main-nav {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin: 12px 0 24px;
}
body.device-mobile .nav-link {
  position: relative;
  min-width: 0;
  min-height: 46px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  gap: 11px;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.3;
}
body.device-mobile .nav-link.active { background: #ffead6; }
body.device-mobile .nav-icon { height: auto; font-size: 18px; }
body.device-mobile .nav-icon svg { width: 19px; height: 19px; }
body.device-mobile .nav-count { position: static; flex: 0 0 auto; width: 19px; height: 19px; margin: 0 0 0 auto; font-size: 10px; }
body.device-mobile .main-content { width: 100%; margin: 0 auto; padding: 0 14px 18px; }
body.device-mobile .topbar { position: sticky; z-index: 5; top: 0; height: 54px; margin: 0 -14px; padding: 0 14px; background: rgba(255, 253, 250, .94); backdrop-filter: blur(12px); }
body.device-mobile .mobile-nav-toggle { display: inline-flex; width: 36px; height: 36px; flex: 0 0 auto; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 0; border: 1px solid #eadbca; border-radius: 11px; background: #fffaf2; cursor: pointer; }
body.device-mobile .mobile-nav-toggle span { width: 15px; height: 2px; border-radius: 2px; background: #75462f; }
body.device-mobile .topbar { justify-content: flex-start; gap: 10px; }
body.device-mobile .breadcrumb { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body.device-mobile .topbar-actions { gap: 5px; margin-left: auto; }
body.device-mobile .topbar-actions button span { display: none; }
body.device-mobile .device-mode-button { min-width: 36px; min-height: 36px; padding: 5px 8px; }
body.device-mobile .device-mode-button span { display: none; }
body.device-mobile .top-avatar { width: 29px; height: 29px; margin-left: 1px; }
body.device-mobile .sidebar-backdrop[hidden] { display: none; }
body.device-mobile .welcome-row { align-items: stretch; flex-direction: column; gap: 14px; padding: 26px 0 20px; }
body.device-mobile .welcome-row h1 { font-size: clamp(27px, 8vw, 34px); }
body.device-mobile .welcome-copy { max-width: 310px; font-size: 14px; }
body.device-mobile #generatePlan { min-height: 45px; align-self: stretch; justify-content: center; border-radius: 13px; font-size: 13px; }
body.device-mobile #generatePlan span { display: inline; }
body.device-mobile .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 14px; }
body.device-mobile .stat-card { min-width: 0; min-height: 110px; padding: 12px; border-radius: 15px; }
body.device-mobile .stat-card:last-child { grid-column: 1 / -1; min-height: 94px; }
body.device-mobile .stat-caption { font-size: 8px; letter-spacing: .7px; }
body.device-mobile .stat-value { font-size: 24px; }
body.device-mobile .stat-value small { font-size: 10px; }
body.device-mobile .stat-foot { font-size: 10px; }
body.device-mobile .panel { margin-bottom: 14px; padding: 15px 13px; border-radius: 17px; }
body.device-mobile .panel-heading { align-items: flex-start; gap: 10px; }
body.device-mobile .panel-heading h2 { font-size: 18px; }
body.device-mobile .week-panel { padding: 15px 12px; }
body.device-mobile .week-scroll { overflow: visible; }
body.device-mobile .week-grid { min-width: 0; grid-template-columns: minmax(0, 1fr); gap: 8px; }
body.device-mobile .day { min-width: 0; min-height: 0; padding: 10px; border-radius: 13px; }
body.device-mobile .day-head { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding-bottom: 8px; }
body.device-mobile .day-number { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; background: #fff0df; font-size: 12px; }
body.device-mobile .day-items { gap: 7px; }
body.device-mobile .session-card { padding: 9px; border-radius: 10px; }
body.device-mobile .session-title { white-space: normal; }
body.device-mobile .session-actions { flex-wrap: wrap; }
body.device-mobile .session-actions button { min-height: 34px; padding: 7px 9px; border-radius: 9px; }
body.device-mobile .legend { gap: 8px; padding-top: 6px; font-size: 10px; }
body.device-mobile .legend .legend-hint { width: 100%; margin: 0; }
body.device-mobile .task-form { gap: 10px; }
body.device-mobile .task-form label { margin-top: 2px; font-size: 12px; }
body.device-mobile .task-form input,
body.device-mobile .task-form select,
body.device-mobile .archive-retention select { min-height: 45px; border-radius: 11px; font-size: 14px; }
body.device-mobile .task-form .button { min-height: 46px; border-radius: 11px; }
body.device-mobile .form-two { grid-template-columns: 1fr; gap: 9px; }
body.device-mobile .availability-day { padding: 11px; border-radius: 12px; }
body.device-mobile .availability-interval input[type="time"] { min-height: 40px; }
body.device-mobile .tutor-intro { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px; }
body.device-mobile .tutor-avatar { width: 50px; height: 52px; }
body.device-mobile .tutor-intro h2 { font-size: 19px; }
body.device-mobile .tutor-intro p:last-child { font-size: 13px; }
body.device-mobile .local-badge { grid-column: 2; margin: 0; }
body.device-mobile .chat-messages { min-height: 240px; max-height: 48dvh; }
body.device-mobile .chat-form { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); gap: 7px; padding: 8px; border-radius: 14px; background: #fffaf3; box-shadow: 0 5px 20px rgba(75, 52, 32, .1); }
body.device-mobile .chat-form input { min-width: 0; min-height: 42px; font-size: 14px; }
body.device-mobile .chat-form .button { min-height: 42px; padding: 8px 11px; }
body.device-mobile .chat-suggestions { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 5px; }
body.device-mobile .chat-suggestions button { flex: 0 0 auto; min-height: 36px; }
body.device-mobile .archive-layout { grid-template-columns: minmax(0, 1fr); }
body.device-mobile .archive-list { max-height: 220px; }
body.device-mobile .archive-preview { min-height: 180px; }
body.device-mobile footer { padding: 10px 3px 4px; font-size: 10px; }
body.device-mobile .toast { right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); left: 12px; max-width: none; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .mascot--explaining .mascot-arm-right, .chat-message.assistant.explaining .mascot-arm-right,
  .mascot--celebrating .mascot-arm-left, .chat-message.assistant.celebrating .mascot-arm-left,
  .mascot--motivating .mascot-arm-left, .chat-message.assistant.motivating .mascot-arm-left {
    animation: none !important;
  }
}

.device-mode-button { min-height: 38px; padding: 7px 12px; border-color: #efb47d; background: #fff1e2; color: #a64e15; font-size: 11px; font-weight: 800; box-shadow: 0 2px 7px #8c4a1920; }
.device-mode-button:hover { background: #ffe5ca; box-shadow: 0 4px 11px #8c4a192b; }
.device-mode-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.task-photo-field { display: grid; gap: 5px; }
.task-photo-field > label:first-child { margin-bottom: 0; }
.visually-hidden-file { position: absolute; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.photo-file-picker { display: flex !important; align-items: center; gap: 10px; min-height: 39px; margin: 0 !important; padding: 5px 8px; border: 1px solid #e8d5c2; border-radius: 8px; background: #fffaf3; cursor: pointer; }
.photo-file-picker:focus-within { outline: 2px solid #df7425; outline-offset: 2px; }
.photo-file-picker-button { padding: 7px 10px; border-radius: 6px; background: #f28c38; color: white; font-size: 11px; font-weight: 800; }
.photo-file-selection { overflow: hidden; color: #514539; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.task-photo-field > span { color: #796f62; font-size: 10px; }
.task-photo-gallery { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.task-photo-thumb { position: relative; width: 58px; height: 58px; }
.task-photo-thumb img { width: 100%; height: 100%; border: 1px solid #eadbca; border-radius: 7px; object-fit: cover; cursor: zoom-in; }
.task-photo-remove, .task-photo-close { position: absolute; top: -6px; right: -6px; display: grid; width: 21px; height: 21px; place-items: center; padding: 0; border: 1px solid white; border-radius: 50%; background: #a64e15; color: white; font-size: 16px; line-height: 1; cursor: pointer; }
.task-photo-dialog { position: relative; width: min(92vw, 900px); max-width: none; max-height: 90dvh; padding: 14px; border: 0; border-radius: 14px; background: #fffaf3; box-shadow: 0 15px 70px #0005; }
.task-photo-dialog::backdrop { background: #21180fc9; }
.task-photo-dialog img { display: block; max-width: 100%; max-height: calc(90dvh - 28px); margin: auto; object-fit: contain; }
.task-photo-close { z-index: 1; top: 8px; right: 8px; width: 30px; height: 30px; font-size: 22px; }

/* Lively details, with a static fallback for reduced-motion preferences. */
.main-content > .topbar,
.main-content > .app-view { position: relative; z-index: 1; }
.main-content::before {
  position: absolute;
  z-index: 0;
  top: 72px;
  left: 0;
  width: 100%;
  height: 440px;
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 32% 42%, rgba(242, 140, 56, .12), transparent 68%),
    radial-gradient(ellipse at 72% 58%, rgba(255, 210, 166, .2), transparent 66%);
  content: "";
  pointer-events: none;
  animation: ambient-drift 12s ease-in-out infinite alternate;
}
.app-view.active-view { animation: lively-arrive .48s cubic-bezier(.2, .75, .25, 1) both; }
.nav-link, .panel, .stat-card { transition: transform .28s ease, box-shadow .28s ease, background-color .28s ease; }
.nav-link.active { animation: nav-highlight .5s ease-out both; }
.button:active, .icon-button:active, .nav-link:active,
.chat-suggestions button:active, .session-actions button:active,
.device-choice-option:active { transform: scale(.95); }
@media (hover: hover) and (pointer: fine) {
  .panel:hover, .stat-card:hover { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(91, 61, 36, .12); }
}
@keyframes ambient-drift {
  from { transform: translate3d(-1.5%, -1%, 0) scale(.96); opacity: .58; }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.04); opacity: 1; }
}
@keyframes lively-arrive {
  from { opacity: 0; transform: translate3d(14px, 5px, 0) scale(.99); }
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes nav-highlight {
  0% { box-shadow: inset 3px 0 #f28c38, 0 0 0 rgba(242, 140, 56, 0); }
  55% { box-shadow: inset 3px 0 #f28c38, 0 0 16px rgba(242, 140, 56, .2); }
  100% { box-shadow: inset 3px 0 #f28c38, 0 0 0 rgba(242, 140, 56, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .main-content::before { animation: none; }
  .app-view.active-view, .nav-link.active { animation: none; }
  .nav-link, .panel, .stat-card { transition: none; }
  .button:active, .icon-button:active, .nav-link:active,
  .chat-suggestions button:active, .session-actions button:active,
  .device-choice-option:active,
  .panel:hover, .stat-card:hover { transform: none; }
}

/* Clearer typography and bolder visual hierarchy across devices. */
:root {
  --ink: #302318;
  --muted: #68594c;
  --line: #ead9c7;
  --shadow: 0 10px 28px rgba(111, 65, 24, .1);
}
body {
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  background:
    radial-gradient(ellipse at 82% 8%, rgba(255, 195, 126, .28), transparent 34rem),
    linear-gradient(135deg, #fff7ec 0%, #fff2df 52%, #fffaf3 100%);
}
.sidebar { background: rgba(255, 253, 249, .97); border-color: #ebdac7; }
.sidebar-label, .eyebrow, .stat-caption { color: #674a32; }
.nav-link, .subject-item { color: #514333; }
.nav-link { min-height: 46px; font-size: 16px; }
.nav-link.active { color: #813d12; background: linear-gradient(100deg, #ffdbb4, #ffedda); box-shadow: inset 3px 0 #e97827; }
.sidebar-note { background: linear-gradient(135deg, #fff0d9, #fff9ee 72%); box-shadow: 0 8px 22px rgba(157, 78, 20, .09); }
.sidebar-note strong, .profile strong { font-size: 14px; }
.sidebar-note p, .profile div:nth-child(2) span { color: #594735; font-size: 13px; }
.breadcrumb { color: #594735; font-size: 14px; }
.breadcrumb-brand { color: #49372b; }
.breadcrumb-brand .brand-accent { color: #b94f10; }
.button { font-size: 14px; }
.welcome-row { padding-top: 40px; padding-bottom: 30px; }
h1 { color: #352217; font-size: clamp(34px, 3.2vw, 46px); line-height: 1.15; }
.welcome-copy { color: #594735; font-size: 17px; line-height: 1.6; }
.eyebrow, .stat-caption { font-size: 11px; }
.button-primary {
  background: linear-gradient(115deg, #f8a34c, #e87927, #d9651b, #f8a34c);
  background-size: 220% 100%;
  box-shadow: 0 8px 20px rgba(214, 103, 39, .3);
}
.button-primary:hover { background-position: 100% 0; box-shadow: 0 11px 26px rgba(214, 103, 39, .35); transform: translateY(-2px); }
.stats-grid { gap: 14px; }
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 132px;
  border-color: #f0dfcc;
  background: linear-gradient(145deg, #fffefb, #fff6ea);
  box-shadow: 0 9px 24px rgba(111, 65, 24, .08);
  transition: transform .22s ease, box-shadow .22s ease;
}
.stat-card::after {
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 140, 56, .19), transparent 70%);
  content: "";
  pointer-events: none;
}
.stat-value { color: #a94d16; font-size: 31px; }
.stat-value small, .stat-foot { color: #594735; font-size: 13px; }
.panel-heading h2 { color: #352519; font-size: 23px; }
.panel-heading .eyebrow { font-size: 11px; }
.panel, .stat-card { border-radius: 16px; }
.panel { border-color: #edddcb; background: rgba(255, 254, 251, .96); box-shadow: 0 10px 30px rgba(111, 65, 24, .08); }
.week-panel { padding: 21px; }
.week-grid { gap: 10px; }
.day { min-height: 215px; border-color: #efdfcd; background: linear-gradient(155deg, #fffefa, #fff9f0); }
.day.today { border-color: #e98a46; background: linear-gradient(155deg, #fff2e1, #fffaf2); box-shadow: inset 0 4px #e87927, 0 5px 16px rgba(233, 138, 70, .16); }
.day-name, .day-number { color: #554333; font-size: 13px; }
.day.today .day-number { background: #e97827; box-shadow: 0 3px 9px rgba(217, 101, 34, .3); }
.session-card { padding: 8px 9px; border-left: 4px solid #e97827; border-radius: 9px; background: linear-gradient(120deg, #ffe5c7, #fff3e4); color: #59351d; box-shadow: 0 3px 9px rgba(111, 65, 24, .08); }
.session-card:hover { transform: translateY(-2px); box-shadow: 0 7px 16px rgba(111, 65, 24, .13); }
.session-time { font-size: 12px; }
.session-title { font-size: 14px; line-height: 1.45; }
.session-subject { color: #634d38; font-size: 12px; opacity: 1; }
.session-actions button { min-height: 30px; padding: 5px 7px; color: #503c2c; font-size: 11px; }
.empty-day, .legend, .plan-message { color: #594735; font-size: 13px; }
.legend-dot { width: 10px; height: 10px; }
.panel-description { color: #594735; font-size: 15px; line-height: 1.65; }
.task-form { gap: 12px; }
.task-form label { color: #473628; font-size: 14px; line-height: 1.5; }
.task-form input, .task-form select, .subject-dialog input {
  min-height: 43px;
  border-color: #dfcbb5;
  background-color: #fffefa;
  color: #35271d;
  font-size: 15px;
}
.task-form input::placeholder { color: #786756; }
.task-form input:focus, .task-form select:focus, .subject-dialog input:focus { border-color: #d96522; box-shadow: 0 0 0 4px rgba(233, 121, 39, .18); }
.button-dark { background: linear-gradient(110deg, #75462f, #543323); }
.button-dark:hover { background: linear-gradient(110deg, #603924, #3e271b); }
.photo-file-picker { min-height: 50px; border-color: #d7b99b; background: #fff8ee; }
.photo-file-picker-button { background: linear-gradient(110deg, #e97827, #d65b2b); font-size: 14px; }
.photo-file-selection, .task-photo-field > span { color: #51402f; font-size: 13px; }
.materials-list-heading strong { color: #39291d; font-size: 15px; }
.materials-list-heading span, .task-title { color: #433529; font-size: 13px; }
.task-item { border-color: #ecddca; background: #fffefa; box-shadow: 0 3px 10px rgba(111, 65, 24, .05); }
.task-item:hover { border-color: #e7b27c; box-shadow: 0 6px 16px rgba(111, 65, 24, .08); }
.task-meta { color: #625241; font-size: 12px; }
.task-actions button { color: #634b37; font-size: 16px; }
.availability-row, .availability-footer, footer { color: #594735; font-size: 13px; }
.availability-row input[type="time"] { min-height: 38px; color: #35271d; font-size: 13px; }
.tutor-intro h2 { font-size: 27px; }
.tutor-intro p:last-child { color: #594735; font-size: 16px; }
.local-badge { font-size: 12px; }
.chat-message p { color: #3f3329; font-size: 16px; }
.chat-speaker, .chat-suggestions, .chat-suggestions button, .chat-form input { color: #514333; font-size: 14px; }
.chat-form { border-color: #dfcbb5; box-shadow: 0 5px 15px rgba(111, 65, 24, .07); }
.chat-form input { min-height: 44px; }
.archive-item strong, .archive-message p { color: #403226; font-size: 15px; }
.archive-item span, .archive-message strong { color: #594735; font-size: 13px; }
.empty-list, .subject-empty, .toast { font-size: 13px; }
.toast { background: #49301f; box-shadow: 0 12px 30px rgba(65, 38, 21, .3); }
:where(button, a, input, select):focus-visible { outline: 3px solid #d96522; outline-offset: 3px; }
@media (hover: hover) {
  .nav-link:not(.active):hover { background: #fff0df; color: #873f12; }
  .icon-button:hover, .task-actions button:hover { border-color: #e8ad73; color: #963f12; }
  .stat-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(111, 65, 24, .13); }
}
@media (max-width: 800px) {
  body { font-size: 16px; }
  .nav-link { font-size: 15px; }
  .main-content { padding-right: 20px; padding-left: 20px; }
  .right-column { gap: 14px; }
  .session-card { padding: 11px; }
  .session-title { font-size: 15px; }
  .session-time, .session-subject, .session-actions button { font-size: 13px; }
}
@media (max-width: 580px) {
  body, body.device-mobile { font-size: 17px; }
  body.device-mobile .main-content, .main-content { padding-right: 15px; padding-left: 15px; }
  .topbar { min-height: 58px; }
  .breadcrumb, body.device-mobile .breadcrumb { font-size: 13px; }
  .button { font-size: 14px; }
  .welcome-row { padding-top: 27px; padding-bottom: 22px; }
  h1, .welcome-row h1 { font-size: clamp(32px, 9vw, 39px); line-height: 1.12; }
  .welcome-copy { font-size: 16px; line-height: 1.6; }
  .stats-grid { gap: 9px; }
  .stat-card { min-height: 116px; padding: 13px 11px; }
  .stat-value { font-size: 27px; }
  .stat-value small, .stat-foot { font-size: 12px; line-height: 1.45; }
  .stat-icon { width: 27px; height: 27px; font-size: 15px; }
  .panel, .week-panel { padding: 16px 13px; }
  .panel-heading h2, body.device-mobile .panel-heading h2 { font-size: 21px; }
  .panel-description { font-size: 14px; }
  #weekLabel { min-width: 108px; color: #4e3b2a; font-size: 12px; }
  .icon-button { min-width: 36px; min-height: 36px; font-size: 23px; }
  .day { min-height: 0; padding: 12px; }
  .day-name, .day-number { font-size: 14px; }
  .session-title, body.device-mobile .session-title { font-size: 15px; }
  .session-time, .session-subject, .session-actions button { font-size: 13px; }
  .session-actions button { min-height: 38px; padding: 7px 9px; }
  .legend, .plan-message, .empty-day { font-size: 13px; }
  .task-form { gap: 11px; }
  .task-form label, body.device-mobile .task-form label { font-size: 14px; }
  .task-form input, .task-form select, .subject-dialog input,
  body.device-mobile .task-form input, body.device-mobile .task-form select { min-height: 48px; font-size: 16px; }
  .task-form .button, .button-full { min-height: 49px; font-size: 15px; }
  .materials-list-heading { align-items: flex-start; gap: 6px; }
  .materials-list-heading strong, .task-title { font-size: 14px; }
  .materials-list-heading span, .task-meta { font-size: 12px; }
  .task-item { padding: 11px 9px; }
  .task-complete-toggle { width: 21px; height: 21px; }
  .task-actions button { min-width: 36px; min-height: 36px; font-size: 18px; }
  .availability-row, .availability-footer { font-size: 13px; }
  .availability-row input[type="time"] { min-height: 41px; font-size: 14px; }
  .tutor-intro h2, body.device-mobile .tutor-intro h2 { font-size: 22px; }
  .tutor-intro p:last-child, .chat-message p { font-size: 15px; }
  .chat-speaker, .chat-suggestions, .chat-suggestions button { font-size: 13px; }
  .chat-form input, body.device-mobile .chat-form input { min-height: 46px; font-size: 16px; }
  .local-badge { font-size: 11px; }
  .archive-item strong, .archive-message p { font-size: 14px; }
  .archive-item span, .archive-message strong { font-size: 12px; }
  .empty-list, .subject-empty, footer, .toast { font-size: 13px; }
  body.device-mobile .nav-link { min-height: 50px; font-size: 16px; }
  body.device-mobile .nav-count { width: 22px; height: 22px; font-size: 11px; }
  body.device-mobile .mobile-nav-toggle { width: 42px; height: 42px; }
  body.device-mobile .device-mode-button { min-width: 44px; min-height: 44px; }
}
@media (prefers-reduced-motion: no-preference) {
  .stat-card, .panel, .task-item, .session-card { animation: vivid-arrive .45s cubic-bezier(.2, .7, .25, 1) both; }
  .stat-card:nth-child(2) { animation-delay: .06s; }
  .stat-card:nth-child(3) { animation-delay: .12s; }
}
@keyframes vivid-arrive {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .stat-card, .panel, .task-item, .session-card, .day:not(.today):hover { animation: none !important; transform: none; }
}
