@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:wght@400;500;600;700;800&family=Lora:ital,wght@0,500;0,600;1,500;1,600&display=swap');

:root {
  --bg: #f7f6ef;
  --paper: #fffefb;
  --ink: #30463a;
  --muted: #8a968a;
  --muted-dark: #65776a;
  --line: #e8e8dc;
  --sage: #b6c9aa;
  --sage-deep: #6e8c68;
  --sage-pale: #e8efe2;
  --cream: #f4ecdc;
  --peach: #f4e2d7;
  --lilac: #eae5f3;
  --rose: #f4e3e4;
  --shadow: 0 10px 35px rgba(54, 74, 56, .045);
  --radius: 20px;
  font-family: 'Nunito Sans', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #9ab28c; outline-offset: 3px; }
.app-shell { min-height: 100vh; }
.sidebar { width: 240px; position: fixed; inset: 0 auto 0 0; background: #f2f2e9; border-right: 1px solid #e5e6d9; padding: 28px 16px 18px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 0 9px; margin-bottom: 50px; }
.brand-mark { width: 43px; height: 43px; border-radius: 15px; display: grid; place-items: center; color: #577657; background: #dfe9d8; }
.brand-mark svg { width: 36px; height: 36px; }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-family: 'Lora', Georgia, serif; font-size: 18px; font-weight: 600; letter-spacing: -.55px; }
.brand-copy small { color: #859184; font-size: 10px; letter-spacing: .7px; text-transform: uppercase; }
.nav-label, .eyebrow, .stat-label, .summary-kicker, .paper-overline, .welcome-kicker { letter-spacing: 1.35px; font-size: 9px; font-weight: 700; }
.nav-label { color: #a0aa9d; padding: 0 14px; margin-bottom: 12px; }
.main-nav { display: grid; gap: 5px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; border: 0; width: 100%; text-align: left; padding: 13px 14px; border-radius: 12px; background: transparent; color: #788678; font-size: 12px; transition: .2s ease; }
.nav-item:hover { background: rgba(222, 232, 214, .65); color: var(--ink); }
.nav-item.active { background: #e1ead9; color: #3d5a43; font-weight: 700; }
.nav-icon { display: grid; place-items: center; width: 17px; font-family: Georgia, serif; font-size: 18px; }
.nav-dot { margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #779572; opacity: 0; }
.nav-item.active .nav-dot { opacity: 1; }
.sidebar-grow { flex: 1; }
.sidebar-note { overflow: hidden; position: relative; padding: 18px 16px 17px; border-radius: 16px; background: #e7ebdc; margin-bottom: 20px; }
.sidebar-note:after { content: '✿'; position: absolute; right: -8px; bottom: -24px; font-size: 74px; color: #d3dec8; transform: rotate(-15deg); }
.tiny-sun { font-size: 21px; color: #a88350; margin-bottom: 8px; }
.sidebar-note p { margin: 0 0 9px; font-family: 'Lora', Georgia, serif; font-size: 15px; line-height: 1.35; }
.sidebar-note span { color: #87937c; font-size: 9px; letter-spacing: .8px; text-transform: uppercase; }
.sidebar-bottom { display: flex; align-items: center; gap: 8px; padding: 0 6px; color: #8b9688; font-size: 10px; }
.status-lamp { width: 7px; height: 7px; border-radius: 50%; background: #85a57b; box-shadow: 0 0 0 3px #dfe8d9; }
.main-content { max-width: 1600px; margin-left: 240px; padding: 0 clamp(24px, 4.2vw, 64px); min-height: 100vh; }
.topbar { height: 78px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9e9df; }
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; color: #7f8d80; }
.breadcrumb-home { color: #a3ab9e; }
.crumb-slash { color: #c2c9bc; }
.topbar-right { display: flex; align-items: center; gap: 13px; }
.date-pill { display: flex; align-items: center; gap: 7px; color: #7e8b7a; background: #eeefe5; border-radius: 20px; padding: 9px 12px; font-size: 10px; }
.date-pill span:first-child { color: #b28b59; font-size: 15px; }
.avatar { height: 31px; width: 31px; border-radius: 50%; border: 1px solid #d9dfd1; background: #dfe8d9; color: #577156; font-family: 'Lora', Georgia, serif; font-weight: 600; }
.view { display: none; padding: 35px 0 0; animation: fade-in .25s ease; }
.view.active { display: block; }
@keyframes fade-in { from { opacity: .6; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 25px; }
.eyebrow { color: #91a087; margin: 0 0 10px; }
.eyebrow-flower { color: #c69c6c; font-size: 12px; margin-left: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-family: 'Lora', Georgia, serif; font-size: clamp(32px, 3.3vw, 46px); font-weight: 500; line-height: 1.05; letter-spacing: -1.5px; margin: 0 0 11px; }
h1 em, .welcome-copy h2 em { font-weight: 500; color: #7b9972; }
.page-subtitle { font-size: 12px; line-height: 1.7; color: #8b9689; margin: 0; max-width: 590px; }
.welcome-card { min-height: 245px; border-radius: 24px; overflow: hidden; position: relative; display: flex; justify-content: space-between; background: #dfe9d6; box-shadow: var(--shadow); margin-bottom: 34px; }
.welcome-copy { position: relative; z-index: 2; padding: 30px 34px; width: 62%; }
.welcome-kicker { color: #84977a; margin-bottom: 16px; font-size: 8px; }
.sparkle { color: #bd9866; font-size: 14px; margin-right: 5px; }
.welcome-copy h2 { font-family: 'Lora', Georgia, serif; font-size: clamp(25px, 2.3vw, 32px); font-weight: 500; letter-spacing: -.7px; line-height: 1.2; margin: 0 0 11px; }
.welcome-copy h2 em { color: #647e5e; }
.welcome-copy p { color: #7b8a75; font-size: 11px; line-height: 1.65; max-width: 370px; margin-bottom: 19px; }
.button { border: 0; border-radius: 10px; padding: 10px 15px; font-size: 10px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 10px; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-light { background: #fffef9; color: #567152; box-shadow: 0 5px 15px rgba(58, 77, 55, .07); }
.button-light:hover { background: white; box-shadow: 0 7px 18px rgba(58, 77, 55, .11); }
.button-primary { background: #6e8b67; color: #fffef9; box-shadow: 0 5px 12px rgba(75, 110, 69, .15); }
.button-primary:hover { background: #5e7c57; }
.button-quiet { background: #f1f2e9; color: #72856c; }
.button-light-bordered { color: #61765b; background: #fffefa; border: 1px solid #e2e8dc; }
.button-danger-quiet { background: #f9eeee; color: #ad777b; }
.button-danger { color: white; background: #b8797b; }
.welcome-art { position: absolute; inset: 0 0 0 auto; width: 43%; overflow: hidden; }
.art-moon { position: absolute; width: 78px; height: 78px; border-radius: 50%; right: 23%; top: 22px; background: rgba(250, 241, 204, .9); box-shadow: 0 0 0 14px rgba(249, 241, 204, .16); }
.art-star { position: absolute; color: #c5ad78; z-index: 2; }
.star-a { top: 34px; left: 24%; font-size: 18px; }.star-b { top: 71px; right: 12%; font-size: 23px; }
.art-hill { position: absolute; bottom: -65px; border-radius: 50% 50% 0 0; }
.hill-back { width: 115%; height: 145px; background: #c8d9b9; right: -24%; bottom: -60px; transform: rotate(-5deg); }
.hill-front { width: 105%; height: 105px; background: #afc79f; right: -9%; bottom: -55px; transform: rotate(8deg); }
.art-lantern { position: absolute; z-index: 3; bottom: 53px; right: 30%; width: 49px; height: 94px; }
.lantern-cap { position: absolute; width: 33px; height: 8px; left: 8px; top: 8px; border-radius: 4px 4px 2px 2px; background: #627d5b; }
.lantern-cap:before { content: ''; position: absolute; left: 13px; top: -8px; width: 7px; height: 9px; border: 2px solid #627d5b; border-bottom: 0; border-radius: 8px 8px 0 0; }
.lantern-glow { position: absolute; top: 15px; left: 7px; width: 35px; height: 52px; border: 3px solid #627d5b; border-radius: 8px 8px 10px 10px; background: #f9dca0; box-shadow: 0 0 24px rgba(249, 220, 160, .7); }
.lantern-glow:after { content: ''; position: absolute; top: 7px; left: 11px; width: 7px; height: 34px; border-radius: 50%; background: #fff5d0; filter: blur(3px); }
.lantern-base { position: absolute; bottom: 8px; left: 4px; width: 41px; height: 6px; border-radius: 5px; background: #627d5b; }
.art-leaf { position: absolute; z-index: 2; bottom: 64px; background: #83a47a; width: 27px; height: 11px; border-radius: 100% 0 100% 0; }
.leaf-a { right: 48%; transform: rotate(28deg); }.leaf-b { right: 16%; transform: rotate(-42deg) scale(1.2); }
.art-flower { z-index: 4; position: absolute; color: #f9eac2; font-size: 18px; bottom: 39px; }.flower-a { left: 28%; }.flower-b { right: 12%; bottom: 67px; font-size: 13px; }
.section-line { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.section-line h2, .panel-heading h2, .toolbar-top h2, .revision-controls h2 { font-family: 'Lora', Georgia, serif; font-size: 21px; font-weight: 500; letter-spacing: -.4px; margin: 0; }
.line-note { color: #9ba692; font-family: 'Lora', Georgia, serif; font-size: 12px; font-style: italic; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--paper); border: 1px solid #eeeee5; border-radius: 17px; padding: 17px 19px 16px; min-height: 146px; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-label { color: #a0aa9c; font-size: 8px; }
.stat-icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; font-size: 14px; }
.stat-icon.sage { background: #e8efe2; color: #71906a; }.stat-icon.peach { background: #f6e7df; color: #b68b73; }.stat-icon.lilac { background: #eee9f5; color: #8d7aa7; }
.stat-number { font-family: 'Lora', Georgia, serif; font-size: 31px; letter-spacing: -1px; margin: 8px 0 5px; line-height: 1; }
.stat-number small { font-family: 'Nunito Sans', sans-serif; font-size: 11px; letter-spacing: 0; color: #a1aa9b; margin-left: 4px; }
.stat-number .stat-unit { font-family: 'Nunito Sans', sans-serif; font-size: 10px; }
.progress-track { height: 5px; border-radius: 5px; background: #edf0e8; overflow: hidden; margin: 9px 0 7px; }
.progress-track span { display: block; height: 100%; background: #8eab81; border-radius: inherit; transition: width .3s ease; }
.stat-card p { font-size: 9px; color: #98a194; margin: 6px 0 0; }
.stat-caption { margin-top: 8px !important; }
.mini-flower-row { display: flex; gap: 8px; color: #c7d4bd; font-size: 13px; margin-top: 10px; }
.mini-flower-row span:nth-child(2), .mini-flower-row span:nth-child(4) { color: #e4c9b9; }.mini-flower-row span:nth-child(3) { color: #e2d7eb; }
.needles { height: 21px; display: flex; align-items: flex-end; gap: 5px; margin-top: 5px; }
.needles span { width: 7px; background: #e4d9eb; border-radius: 5px 5px 2px 2px; height: 8px; }.needles span:nth-child(2) { height: 13px; background: #d9cce5; }.needles span:nth-child(3) { height: 17px; background: #e4d9eb; }.needles span:nth-child(4) { height: 11px; }.needles span:nth-child(5) { height: 15px; background: #f0dfd6; }.needles span:nth-child(6) { height: 9px; }.needles span:nth-child(7) { height: 12px; background: #d9cce5; }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(270px, .75fr); gap: 15px; margin-bottom: 23px; align-items: stretch; }
.panel { background: var(--paper); border: 1px solid #edeee4; border-radius: var(--radius); box-shadow: var(--shadow); }
.next-panel, .timer-panel { padding: 22px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading .eyebrow { font-size: 8px; margin-bottom: 8px; }.panel-heading h2 { font-size: 19px; }
.text-button { border: 0; background: transparent; color: #7b9571; font-size: 10px; font-weight: 700; padding: 4px; white-space: nowrap; }
.text-button:hover { color: #4d6e46; }
.panel-intro { color: #a0a99d; font-size: 10px; line-height: 1.6; margin: 8px 0 17px; }
.step-list { display: grid; gap: 9px; }
.step-item { display: flex; align-items: center; gap: 11px; border: 1px solid #f0f0e9; background: #fffefa; padding: 10px; border-radius: 13px; min-width: 0; }
.step-icon { flex: 0 0 34px; width: 34px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: #eaf0e4; color: #84a077; font-size: 16px; }
.step-icon-1 { background: #f7eae1; color: #ba927d; }.step-icon-2 { background: #eee8f5; color: #9a88b2; }
.step-copy { min-width: 0; flex: 1; display: grid; gap: 3px; }
.step-meta { color: #9aa593; font-size: 8px; }.step-copy strong { font-family: 'Lora', Georgia, serif; font-size: 13px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }.step-copy small { color: #a6ada0; font-size: 8px; }
.round-arrow { width: 29px; height: 29px; flex: 0 0 29px; border: 1px solid #e5eadf; border-radius: 50%; background: #fff; color: #73906b; font-size: 12px; }.round-arrow:hover { background: #e9f0e3; }
.all-done { border-radius: 14px; padding: 18px; text-align: center; background: #f5f7ef; }.all-done > span { display: block; color: #9cb491; font-size: 24px; }.all-done strong { display: block; font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 15px; margin: 6px 0; }.all-done p { color: #899685; font-size: 10px; line-height: 1.6; }
.timer-panel { background: #f3f0f7; border-color: #eee9f1; }
.timer-sparkle { color: #b7a5ca; font-size: 22px; }
.timer-visual { display: grid; place-items: center; padding: 6px 0 15px; }
.timer-ring { --timer-progress: 0%; width: 150px; height: 150px; padding: 8px; border-radius: 50%; background: conic-gradient(#a9c49b var(--timer-progress), #e4dfee var(--timer-progress)); display: grid; place-items: center; position: relative; }
.timer-ring:before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px dashed rgba(132, 151, 122, .5); }
.timer-inner { width: 100%; height: 100%; border-radius: 50%; background: #fbf9fb; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative; }
.timer-label { font-size: 7px; letter-spacing: 1px; font-weight: 700; color: #a29aaf; }
.timer-inner strong { font-family: 'Lora', Georgia, serif; font-size: 32px; font-weight: 500; letter-spacing: -.8px; color: #52684f; }
.timer-inner span:last-child { font-size: 9px; color: #a49aae; }
.timer-actions { display: flex; justify-content: center; gap: 8px; }
.timer-footer { display: flex; gap: 7px; justify-content: center; align-items: center; border-top: 1px solid #e8e2ec; margin-top: 18px; padding-top: 13px; color: #a29aab; font-size: 8px; line-height: 1.5; }
.timer-footer span { font-size: 13px; }
.source-strip { display: flex; align-items: center; gap: 13px; border: 1px solid #e9eddf; background: #eff2e8; border-radius: 15px; padding: 14px 17px; margin-bottom: 28px; }
.source-seal { flex: 0 0 31px; width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; color: #749169; background: #dfe9d8; font-size: 12px; }
.source-strip > div:nth-child(2) { flex: 1; min-width: 0; }.source-strip strong { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 13px; }.source-strip p { margin: 3px 0 0; color: #899587; font-size: 9px; line-height: 1.5; }.source-strip a { color: #6b8765; white-space: nowrap; font-size: 9px; text-decoration: none; font-weight: 700; }.source-strip a:hover, .official-link:hover { text-decoration: underline; }
/* Syllabus library */
.syllabus-heading { align-items: center; }
.syllabus-stamp { padding: 10px 13px; border: 1px solid #dfe6d9; border-radius: 12px; text-align: center; color: #80947a; font-size: 7px; line-height: 1.8; letter-spacing: 1.4px; transform: rotate(3deg); background: rgba(255, 254, 251, .55); flex: 0 0 auto; }.syllabus-stamp strong { display: block; font-size: 19px; font-family: 'Lora', Georgia, serif; letter-spacing: 0; line-height: 1.25; color: #607a59; }
.subject-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
.subject-tab { text-align: left; display: flex; align-items: center; gap: 11px; min-width: 0; padding: 12px; border: 1px solid #eceee4; background: #fffefa; border-radius: 14px; color: #7b8a79; }
.subject-tab.active { border-color: #bfcfb5; box-shadow: inset 0 0 0 1px #dfe9d8; background: #f8fbf4; }.subject-tab:disabled { cursor: not-allowed; opacity: .62; }
.subject-tab-icon { flex: 0 0 35px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #e5eddf; color: #64855e; font-size: 19px; font-family: 'Lora', Georgia, serif; }.physics-icon { background: #f8e9dd; color: #b9886c; }.cs-icon { background: #eae5f5; color: #8978aa; font-family: 'Nunito Sans', sans-serif; font-size: 11px; font-weight: 700; }
.subject-tab > span:nth-child(2) { display: grid; gap: 4px; min-width: 0; flex: 1; }.subject-tab strong { color: #50644f; font-size: 10px; font-weight: 700; }.subject-tab small { font-size: 8px; color: #9ea99b; }.tab-check { color: #789770; font-size: 11px; opacity: 0; }.subject-tab.active .tab-check { opacity: 1; }.soon-label { color: #a8a99d; font-size: 7px; letter-spacing: .8px; }
.library-toolbar { padding: 21px 21px 16px; margin-bottom: 19px; }
.toolbar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }.toolbar-top .eyebrow { font-size: 8px; margin-bottom: 6px; }.toolbar-top h2 { font-size: 20px; }.official-link { color: #6f8a68; text-decoration: none; font-size: 9px; font-weight: 700; white-space: nowrap; }
.filters-grid { display: grid; grid-template-columns: minmax(130px, .85fr) minmax(220px, 1.4fr) minmax(180px, 1.2fr) minmax(130px, .9fr); gap: 11px; }
.filter-field { display: flex; min-width: 0; flex-direction: column; gap: 7px; }.filter-field > span { font-size: 9px; color: #899786; font-weight: 600; }.filter-field select, .search-wrap { min-width: 0; width: 100%; height: 38px; border: 1px solid #e7e9df; border-radius: 9px; color: #60745e; background: #fffefa; padding: 0 10px; font-size: 9px; outline-offset: 2px; }.filter-field select { cursor: pointer; }.search-wrap { display: flex; align-items: center; gap: 7px; padding: 0 10px; }.search-wrap > span { color: #9eaf94; font-size: 21px; line-height: 1; }.search-wrap input { background: transparent; border: 0; outline: 0; min-width: 0; width: 100%; font-size: 9px; color: var(--ink); }.search-wrap input::placeholder { color: #b0b6aa; }
.route-hint { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; background: #f2f5ed; border-radius: 9px; margin-top: 14px; color: #83947d; font-size: 9px; line-height: 1.55; }.route-hint > span:first-child { color: #b18b5e; font-size: 13px; }
.syllabus-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 25px 0 14px; padding: 0 3px; }.syllabus-summary > div:first-child { display: grid; gap: 4px; }.summary-kicker { color: #a0aa9b; font-size: 7px; }.syllabus-summary strong { font-family: 'Lora', Georgia, serif; font-size: 16px; font-weight: 500; }.syllabus-summary small { color: #96a091; font-size: 9px; }.summary-numbers { display: flex; gap: 21px; }.summary-numbers > div { display: grid; gap: 4px; text-align: right; }.summary-numbers strong { font-family: 'Lora', Georgia, serif; font-size: 19px; color: #63845d; }.summary-numbers small { font-size: 8px; }
.syllabus-groups { display: grid; gap: 13px; }.paper-card { background: var(--paper); border: 1px solid #eceee4; border-radius: 17px; overflow: hidden; box-shadow: var(--shadow); }.paper-card-head { display: flex; align-items: center; gap: 13px; padding: 17px 18px; background: #fafbf6; border-bottom: 1px solid #eff0e8; }.paper-number { flex: 0 0 43px; width: 43px; height: 43px; display: grid; place-items: center; border-radius: 13px; background: #e3ecdc; color: #66855e; font-family: 'Lora', Georgia, serif; font-size: 15px; }.paper-title-wrap { min-width: 0; flex: 1; }.paper-overline { display: block; color: #a0aa9b; font-size: 7px; margin-bottom: 4px; }.paper-title-wrap h3 { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 16px; margin: 0 0 4px; }.paper-title-wrap small { font-size: 8px; color: #9ba696; }.paper-mini-progress { flex: 0 0 65px; height: 5px; border-radius: 6px; overflow: hidden; background: #e9eee4; }.paper-mini-progress span { display: block; height: 100%; border-radius: inherit; background: #90ad83; transition: width .25s ease; }
.topics-list { padding: 0 17px; }.topic-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 14px 3px; border-bottom: 1px solid #f0f0e9; transition: background .25s ease; }.topic-row:last-child { border-bottom: 0; }.topic-row.topic-highlight { background: #f4f8ed; box-shadow: 0 0 0 8px #f4f8ed; border-radius: 8px; }.topic-main { display: flex; align-items: center; gap: 11px; min-width: 0; }.topic-code { flex: 0 0 35px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #f3f2e9; color: #83947d; font-size: 10px; font-weight: 700; }.topic-text { display: grid; min-width: 0; gap: 4px; }.topic-text strong { color: #526450; font-family: 'Lora', Georgia, serif; font-size: 13px; font-weight: 500; }.topic-text small { color: #abb2a6; font-size: 8px; }.topic-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }.topic-status { min-width: 112px; max-width: 130px; border-radius: 8px; border: 1px solid #e6e9df; background: #fffefb; color: #7d8b77; padding: 8px 7px; font-size: 8px; cursor: pointer; }.topic-status.status-learning { background: #fbf0df; border-color: #f0e0c1; color: #9c8054; }.topic-status.status-practising { background: #f7e9df; border-color: #f0ddd0; color: #ad7d65; }.topic-status.status-confident { background: #eaf2e5; border-color: #dce8d5; color: #63865a; }.topic-status.status-not-started { background: #f4f3ed; }.note-toggle, .review-toggle { border: 0; background: transparent; color: #98a292; font-size: 8px; padding: 7px 4px; white-space: nowrap; }.note-toggle:hover, .review-toggle:hover { color: #5b7d54; }.review-toggle.reviewed { color: #72936a; }
.topic-note-wrap { display: none; grid-column: 1 / -1; margin: 0 0 3px 46px; }.topic-note-wrap.is-open { display: grid; gap: 6px; }.topic-note-wrap label { font-size: 8px; color: #9aa692; }.topic-note { width: 100%; resize: vertical; border: 1px solid #e6ebdf; background: #fbfcf8; padding: 10px; border-radius: 9px; color: #657761; font-size: 10px; line-height: 1.5; }.hidden { display: none !important; }
.empty-state { text-align: center; padding: 45px 20px; background: #fffefa; border-radius: 16px; border: 1px dashed #e0e6d9; }.empty-state > span { font-size: 28px; color: #9caf91; }.empty-state h3 { font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 19px; margin: 9px 0 5px; }.empty-state p { color: #9aa594; font-size: 10px; }
.syllabus-footnote { display: flex; gap: 11px; padding: 18px 8px 5px; margin-bottom: 20px; }.footnote-flower { color: #bb9b71; font-size: 18px; }.syllabus-footnote p { color: #96a08f; font-size: 9px; line-height: 1.7; margin: 0; }.syllabus-footnote strong { color: #71836c; }
/* Revision nook */
.revision-intro { display: flex; align-items: center; gap: 18px; padding: 22px 26px; background: #e8eddf; border-radius: 20px; margin-bottom: 26px; }.revision-intro-art { flex: 0 0 55px; width: 55px; height: 55px; display: grid; place-items: center; border-radius: 17px; color: #8ca47f; background: #d7e3cc; font-size: 28px; }.revision-intro h2 { font-family: 'Lora', Georgia, serif; font-size: 20px; font-weight: 500; margin: 0 0 6px; }.revision-intro p { font-size: 10px; line-height: 1.6; color: #8b9a83; margin: 0; max-width: 590px; }.revision-controls { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 14px; }.revision-controls .eyebrow { font-size: 8px; margin-bottom: 6px; }.revision-controls h2 { font-size: 21px; }
.revision-list { display: grid; gap: 10px; margin-bottom: 23px; }.revision-card { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid #eceee4; border-radius: 15px; background: #fffefa; box-shadow: var(--shadow); }.revision-rank { align-self: flex-start; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 11px; background: #f3f0e7; color: #9b9c81; font-family: 'Lora', Georgia, serif; font-size: 14px; }.revision-card-copy { flex: 1; min-width: 0; }.revision-label-row { display: flex; gap: 9px; align-items: center; margin-bottom: 6px; }.revision-label { padding: 4px 7px; border-radius: 5px; background: #f0f2e8; color: #829477; font-size: 7px; font-weight: 700; }.revision-label.learning { background: #fbf0df; color: #9c8054; }.revision-label.practising { background: #f7e9df; color: #ad7d65; }.revision-paper { color: #a2ab9c; font-size: 8px; }.revision-card h3 { font-family: 'Lora', Georgia, serif; font-size: 15px; font-weight: 500; margin: 0 0 4px; }.revision-card p { color: #99a294; font-size: 9px; line-height: 1.55; margin: 0; }.revision-card-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }.revision-card-actions .topic-status { max-width: none; width: 130px; }.revision-card-actions .button { padding: 8px 9px; font-size: 8px; }
.revision-empty { padding: 38px 20px; background: #f1f5ec; border-radius: 17px; text-align: center; }.revision-empty > span { color: #8da782; font-size: 30px; }.revision-empty h3 { font-family: 'Lora', Georgia, serif; font-size: 21px; font-weight: 500; margin: 9px 0; }.revision-empty p { max-width: 460px; margin: 0 auto 15px; color: #8e9b86; font-size: 10px; line-height: 1.6; }
.settings-panel { padding: 18px 20px; display: flex; gap: 20px; justify-content: space-between; align-items: center; margin-bottom: 27px; }.settings-copy { display: flex; align-items: center; gap: 12px; }.settings-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #9d8ab7; background: #eee8f5; font-size: 19px; }.settings-copy h3 { font-family: 'Lora', Georgia, serif; font-size: 15px; font-weight: 500; margin: 0 0 4px; }.settings-copy p { color: #98a193; font-size: 9px; line-height: 1.5; margin: 0; max-width: 480px; }.settings-actions { display: flex; gap: 8px; flex-shrink: 0; }.settings-actions .button { font-size: 8px; padding: 10px; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 20px 2px 22px; color: #a3ab9e; font-size: 8px; border-top: 1px solid #e9e9df; }.footer-heart { color: #c59c9a; margin-left: 2px; }
.toast { position: fixed; z-index: 50; bottom: 24px; right: 25px; max-width: min(400px, calc(100vw - 30px)); padding: 13px 17px; border: 1px solid #dce6d5; border-radius: 13px; background: #fffefb; color: #61765d; box-shadow: 0 10px 35px rgba(49, 69, 46, .15); font-size: 11px; line-height: 1.5; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .25s ease; }.toast.show { opacity: 1; transform: translateY(0); }
.reset-dialog { width: min(420px, calc(100vw - 30px)); border: 1px solid #e6e8dc; border-radius: 21px; padding: 28px; background: #fffefa; color: var(--ink); box-shadow: 0 20px 80px rgba(37, 50, 38, .2); }.reset-dialog::backdrop { background: rgba(45, 56, 42, .28); backdrop-filter: blur(3px); }.dialog-flower { color: #b4c7a8; font-size: 28px; }.reset-dialog h2 { font-family: 'Lora', Georgia, serif; font-size: 23px; font-weight: 500; margin: 8px 0; }.reset-dialog p { color: #8e9a88; font-size: 11px; line-height: 1.7; }.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }.dialog-actions .button { font-size: 9px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (min-width: 1500px) { .main-content { padding-left: 70px; padding-right: 70px; } }
@media (max-width: 1220px) { .sidebar { width: 210px; }.main-content { margin-left: 210px; padding: 0 27px; }.filters-grid { grid-template-columns: 1fr 1.5fr; }.dashboard-columns { grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); }.topic-row { grid-template-columns: minmax(0, 1fr); }.topic-actions { justify-content: flex-start; padding-left: 45px; } }
@media (max-width: 900px) { .sidebar { width: 72px; padding: 20px 9px 14px; align-items: center; }.brand { padding: 0; margin-bottom: 42px; }.brand-mark { width: 43px; }.brand-copy, .nav-label, .nav-item > span:not(.nav-icon), .sidebar-note, .sidebar-bottom { display: none; }.main-nav { width: 100%; }.nav-item { justify-content: center; padding: 14px 5px; }.nav-icon { font-size: 20px; }.nav-dot { position: absolute; right: 8px; top: 10px; }.main-content { margin-left: 72px; }.welcome-copy { width: 70%; }.welcome-art { width: 37%; }.dashboard-columns { grid-template-columns: 1fr; }.timer-panel { display: grid; grid-template-columns: 1fr auto; column-gap: 20px; }.timer-panel .panel-heading, .timer-panel .panel-intro { grid-column: 1 / -1; }.timer-visual { grid-column: 1; grid-row: 3 / span 2; }.timer-actions { grid-column: 2; align-self: center; flex-direction: column; }.timer-footer { grid-column: 1 / -1; }.revision-card { align-items: flex-start; }.revision-card-actions { flex-direction: row; flex-wrap: wrap; } }
@media (max-width: 640px) { .main-content { padding: 0 15px; }.topbar { height: 62px; }.date-pill { padding: 8px 9px; font-size: 9px; }.topbar-right { gap: 8px; }.view { padding-top: 25px; }.page-heading { align-items: flex-start; margin-bottom: 19px; }h1 { font-size: 34px; }.page-subtitle { font-size: 11px; }.welcome-card { min-height: 270px; }.welcome-copy { padding: 24px 20px; width: 100%; }.welcome-copy h2 { font-size: 27px; }.welcome-copy p { max-width: 75%; }.welcome-art { width: 49%; opacity: .76; }.art-moon { right: 20%; width: 63px; height: 63px; }.art-lantern { right: 34%; transform: scale(.83); transform-origin: bottom; }.stats-grid { grid-template-columns: 1fr; gap: 9px; }.stat-card { min-height: 115px; padding: 15px 17px; }.stat-number { font-size: 27px; }.stat-card:not(.stat-progress) { position: relative; }.mini-flower-row, .needles { position: absolute; right: 19px; bottom: 22px; }.dashboard-columns { gap: 12px; }.next-panel, .timer-panel { padding: 17px; }.timer-panel { display: block; }.timer-visual { padding: 12px 0 16px; }.timer-actions { flex-direction: row; }.source-strip { align-items: flex-start; padding: 13px; flex-wrap: wrap; }.source-strip > div:nth-child(2) { flex-basis: calc(100% - 50px); }.source-strip a { margin-left: 44px; }.syllabus-heading { align-items: flex-start; }.syllabus-stamp { transform: rotate(2deg) scale(.85); transform-origin: top right; margin-right: -7px; }.subject-tabs { grid-template-columns: 1fr; gap: 8px; }.subject-tab { padding: 10px; }.subject-tab-icon { width: 32px; height: 32px; flex-basis: 32px; }.subject-tab > span:nth-child(2) { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 5px; }.subject-tab strong { font-size: 10px; }.subject-tab small { font-size: 8px; }.library-toolbar { padding: 17px 13px 13px; }.toolbar-top { align-items: flex-start; }.toolbar-top h2 { font-size: 18px; }.official-link { white-space: normal; text-align: right; max-width: 110px; line-height: 1.5; }.filters-grid { grid-template-columns: 1fr 1fr; gap: 10px; }.route-field { grid-column: 1 / -1; grid-row: 2; }.search-field { grid-column: 1 / -1; grid-row: 3; }.status-field { grid-column: 1 / -1; grid-row: 4; }.syllabus-summary { align-items: flex-start; }.summary-numbers { gap: 12px; }.summary-numbers strong { font-size: 17px; }.summary-numbers small { font-size: 7px; }.paper-card-head { padding: 14px; gap: 10px; }.paper-number { width: 37px; height: 37px; flex-basis: 37px; }.paper-title-wrap h3 { font-size: 14px; }.paper-mini-progress { flex-basis: 39px; }.topics-list { padding: 0 12px; }.topic-row { padding: 13px 0; }.topic-actions { padding-left: 0; display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 4px 9px; }.topic-status { width: 100%; max-width: none; grid-column: 1 / -1; }.note-toggle, .review-toggle { text-align: left; }.topic-note-wrap { margin-left: 0; }.revision-intro { padding: 17px; align-items: flex-start; }.revision-intro-art { width: 44px; height: 44px; flex-basis: 44px; }.revision-intro h2 { font-size: 18px; }.revision-controls { align-items: flex-start; }.revision-controls h2 { font-size: 19px; }.revision-card { gap: 9px; padding: 13px; flex-wrap: wrap; }.revision-rank { width: 30px; height: 30px; flex-basis: 30px; }.revision-card-copy { flex: 1 1 calc(100% - 45px); }.revision-card-actions { width: 100%; padding-left: 39px; }.revision-card-actions .topic-status { width: 100%; }.settings-panel { align-items: flex-start; flex-direction: column; }.settings-actions { width: 100%; flex-wrap: wrap; }.settings-actions .button { flex: 1; }.app-footer { flex-direction: column; gap: 6px; }.toast { right: 15px; bottom: 15px; }.dialog-actions { flex-direction: column-reverse; }.dialog-actions .button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }


/* Study notes and practice: deliberately roomy, readable, and softly styled. */
.study-toggle { border: 1px solid #dbe6d3; border-radius: 9px; background: #edf3e8; color: #54734d; padding: 8px 10px; font-size: 9px; font-weight: 800; white-space: nowrap; transition: background .2s ease, transform .2s ease; }
.study-toggle:hover { background: #e1ecd9; transform: translateY(-1px); }
.notes-coming { color: #a6afa0; font-size: 8px; white-space: nowrap; }
.study-dialog { width: min(920px, calc(100vw - 28px)); max-width: 920px; max-height: min(91vh, 980px); padding: 0; border: 1px solid #e0e7d9; border-radius: 24px; background: #fffdf8; color: var(--ink); box-shadow: 0 28px 100px rgba(47, 63, 47, .23); overflow: hidden; }
.study-dialog::backdrop { background: rgba(42, 54, 42, .43); backdrop-filter: blur(5px); }
#studyContent { max-height: min(91vh, 980px); overflow-y: auto; padding: clamp(20px, 4vw, 38px); font-family: 'Nunito Sans', 'Segoe UI', sans-serif; font-size: 14px; line-height: 1.75; }
.study-dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 22px; border-bottom: 1px solid #ebede4; }
.study-dialog-top .eyebrow { font-size: 10px; letter-spacing: 1.2px; margin-bottom: 9px; }
.study-dialog-top h2 { margin: 0 0 8px; font-family: 'Lora', Georgia, serif; font-weight: 500; letter-spacing: -.5px; line-height: 1.2; font-size: clamp(27px, 4vw, 36px); }
.study-subtitle { color: #899584; font-size: 12px; margin: 0; }
.study-close { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border: 1px solid #e4e9dd; border-radius: 13px; background: #f4f5ed; color: #677761; font-size: 25px; line-height: 1; }
.study-close:hover { background: #e8efe1; }
.study-section { margin-top: 24px; }
.study-section h3, .practice-heading h3 { margin: 0 0 10px; font-family: 'Lora', Georgia, serif; font-weight: 500; font-size: 21px; letter-spacing: -.25px; color: #415741; }
.study-section p { margin: 0 0 12px; color: #596b5b; line-height: 1.8; font-size: 14px; }
.study-section ul, .solution-content ul { padding-left: 22px; margin: 8px 0 0; color: #5d6c5d; }
.study-section li, .solution-content li { padding-left: 3px; margin: 7px 0; line-height: 1.75; }
.study-intro { padding: 18px 20px; border: 1px solid #e3eadc; border-radius: 17px; background: #f2f6ed; }
.study-intro h3 { margin-bottom: 7px; }
.study-intro p { margin-bottom: 0; }
.study-prerequisite { margin-top: 16px; padding: 13px 16px; border-radius: 13px; border: 1px solid #f0e3c9; background: #fcf5e7; color: #856d48; font-size: 12px; }
.study-prerequisite p { margin: 4px 0 0; line-height: 1.6; }
.formula-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.formula-card { min-height: 46px; display: flex; align-items: center; padding: 12px 15px; border: 1px solid #e6e8df; border-radius: 12px; background: #fbfaf4; color: #4d634d; font-family: 'Lora', Georgia, serif; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.worked-example { padding: 19px 20px; border-radius: 17px; background: #f8f1e5; border: 1px solid #efe4d2; }
.worked-example h3 { color: #80684b; }
.worked-example .example-question { color: #6c5c49; font-weight: 800; }
.worked-example ul { color: #776752; }
.example-answer { margin: 16px 0 0 !important; padding-top: 13px; border-top: 1px solid #e9dbc6; color: #6a614d !important; }
.common-traps { padding: 18px 20px; border-radius: 17px; background: #f8eff0; border: 1px solid #f0e2e4; }
.common-traps h3 { color: #966c70; }
.common-traps li { color: #7f6265; }
.practice-section { padding-top: 22px; border-top: 1px solid #e8ebe1; }
.practice-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.practice-heading .eyebrow { margin: 0 0 5px; font-size: 9px; }
.practice-heading h3 { margin-bottom: 0; }
.practice-badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #e8efe1; color: #66845f; font-size: 10px; font-weight: 800; }
.study-section p.practice-intro { margin: 8px 0 16px; color: #899384; font-size: 12px; }
.practice-card { padding: 17px 18px; margin-top: 11px; border: 1px solid #e8e9df; border-radius: 15px; background: #fffefa; }
.practice-card-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.practice-level { border-radius: 7px; padding: 4px 8px; font-size: 10px; font-weight: 800; }
.level-1 { background: #eaf2e4; color: #67885e; }
.level-2 { background: #fbf0de; color: #9b7a4e; }
.level-3 { background: #eee8f6; color: #8070a4; }
.level-4 { background: #f2e7e1; color: #9a6f59; }
.practice-number { color: #a3ad9e; font-size: 11px; font-weight: 800; }
.practice-card p.practice-question { white-space: pre-line; color: #4d5e4d; font-size: 14px; font-weight: 700; line-height: 1.75; margin: 0 0 14px; }
.solution-details { border-top: 1px solid #eff0e8; padding-top: 10px; }
.solution-details summary { cursor: pointer; color: #6e8c68; font-weight: 800; font-size: 12px; }
.solution-content { margin-top: 11px; border-radius: 10px; background: #f4f7ef; padding: 13px 15px; }
.solution-content p { font-size: 13px; }
.solution-content .solution-answer { color: #476b43; margin-bottom: 8px; }
.study-dialog-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 28px; padding-top: 20px; border-top: 1px solid #e7eae0; }
.study-dialog-footer > span { color: #9aa48f; font-family: 'Lora', Georgia, serif; font-style: italic; font-size: 13px; }
.study-dialog-footer > div { display: flex; gap: 8px; flex-wrap: wrap; }
.study-dialog-footer .button { font-size: 11px; }
.study-source-note { margin: 19px 0 0; font-size: 10px; color: #a1a99b; line-height: 1.7; }

@media (max-width: 640px) {
  .study-dialog { width: calc(100vw - 14px); max-height: 94vh; border-radius: 18px; }
  #studyContent { max-height: 94vh; padding: 18px 15px 22px; font-size: 13px; }
  .formula-grid { grid-template-columns: 1fr; }
  .study-section h3, .practice-heading h3 { font-size: 19px; }
  .study-section p { font-size: 13px; }
  .practice-card { padding: 14px; }
  .study-dialog-footer { align-items: flex-start; flex-direction: column; }
  .study-dialog-footer > div { width: 100%; }
  .study-dialog-footer .button { flex: 1; }
  .study-toggle { grid-column: 1 / -1; width: 100%; text-align: center; }
}

/* Opening welcome screen: a soft lantern-lit entrance to the existing study nook. */
.opening-screen { display: none; min-height: 100vh; overflow: hidden; padding: clamp(22px, 4vw, 52px) clamp(18px, 5vw, 76px) 28px; background: radial-gradient(circle at 83% 12%, rgba(229, 237, 218, .65), transparent 27%), linear-gradient(135deg, #fbfaf4 0%, #f6f6ed 52%, #f3f1e6 100%); color: var(--ink, #344635); }
.intro-pending .opening-screen { display: block; }
.intro-pending .app-shell { display: none; }
.intro-dismissed .opening-screen { display: none; }
.intro-dismissed .app-shell { display: block; }
.opening-shell { width: min(1160px, 100%); margin: 0 auto; }
.opening-topline { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.opening-brand { display: inline-flex; align-items: center; gap: 12px; color: #526b50; text-decoration: none; }
.opening-brand > span:last-child { display: grid; gap: 3px; }
.opening-brand strong { font: 500 21px/1.1 'Lora', Georgia, serif; letter-spacing: -.45px; }
.opening-brand small { color: #9ba693; font-size: 9px; letter-spacing: 1.7px; text-transform: uppercase; }
.opening-brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid #dce5d3; border-radius: 15px; background: #f1f5e9; color: #688562; }
.opening-brand-mark svg { width: 30px; height: 30px; }
.opening-motto { display: inline-flex; align-items: center; gap: 8px; color: #8b9987; font-size: 11px; }
.motto-dot { width: 7px; height: 7px; border-radius: 50%; background: #d5a55d; box-shadow: 0 0 0 4px rgba(213,165,93,.12); }
.opening-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); align-items: center; gap: clamp(24px, 5vw, 68px); padding: clamp(30px, 5vw, 64px) 0 36px; }
.opening-copy { position: relative; z-index: 1; }
.opening-copy .eyebrow { color: #89997d; font-size: 10px; letter-spacing: 2.2px; }
.opening-copy h1 { margin: 18px 0 20px; max-width: 570px; color: #344c37; font: 500 clamp(42px, 5.4vw, 69px)/1.12 'Lora', Georgia, serif; letter-spacing: -2.2px; }
.opening-copy h1 em { color: #7d9a70; font-weight: 400; }
.opening-description { max-width: 465px; color: #788775; font-size: 15px; line-height: 1.9; }
.opening-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 28px; }
.opening-cta { padding: 15px 20px; border-radius: 13px; box-shadow: 0 8px 18px rgba(77, 105, 71, .13); font-size: 12px; }
.opening-cta span { margin-left: 13px; font-size: 15px; }
.opening-skip { border: 0; padding: 10px 0; background: transparent; color: #879482; font-size: 11px; }
.opening-skip:hover { color: #526b50; text-decoration: underline; text-underline-offset: 4px; }
.opening-trust { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 29px; color: #9ca697; font-size: 9px; }
.opening-trust > span:first-child { color: #d2a45e; font-size: 13px; }
.opening-art { position: relative; min-height: 370px; isolation: isolate; border: 1px solid rgba(220, 227, 209, .75); border-radius: 38% 38% 26px 26px; background: linear-gradient(180deg, #e9efe0 0%, #e5ebdb 62%, #dce7d2 100%); box-shadow: inset 0 -15px 50px rgba(110, 137, 97, .07); overflow: hidden; }
.opening-art::before { content: ''; position: absolute; inset: 9% 11% 14%; border: 1px solid rgba(150, 171, 137, .26); border-radius: 50%; transform: rotate(-16deg); }
.opening-art::after { content: ''; position: absolute; left: 9%; right: 9%; bottom: 13%; height: 1px; background: rgba(133, 158, 122, .35); }
.opening-orbit { position: absolute; left: 18%; top: 13%; width: 67%; aspect-ratio: 1; border: 1px solid rgba(146, 169, 132, .35); border-radius: 50%; }
.orbit-two { left: 29%; top: 23%; width: 45%; border-style: dashed; opacity: .55; }
.opening-moon { position: absolute; top: 12%; right: 17%; width: 62px; height: 62px; border-radius: 50%; background: #f9f0d8; box-shadow: 0 0 0 12px rgba(248,239,212,.18), 0 0 40px rgba(240,201,121,.2); }
.opening-star { position: absolute; color: #f7f0d8; text-shadow: 0 0 12px rgba(217,173,100,.42); }
.star-a { top: 24%; left: 19%; font-size: 20px; }.star-b { top: 38%; right: 15%; font-size: 24px; }.star-c { top: 16%; left: 54%; font-size: 39px; }
.opening-lantern { position: absolute; z-index: 2; left: 50%; top: 20%; width: 130px; height: 235px; transform: translateX(-50%); filter: drop-shadow(0 16px 18px rgba(87, 105, 73, .16)); }
.lantern-top { position: absolute; left: 48px; top: 0; width: 34px; height: 29px; border: 3px solid #718b66; border-bottom: 0; border-radius: 28px 28px 0 0; }
.lantern-cap { position: absolute; top: 24px; left: 24px; width: 82px; height: 19px; border: 2px solid #66815e; border-radius: 8px 8px 4px 4px; background: linear-gradient(90deg, #78956d, #a9bf93 50%, #6d8963); }
.lantern-glass { position: absolute; top: 40px; left: 29px; width: 72px; height: 143px; border: 3px solid #718b66; border-radius: 18px 18px 13px 13px; background: linear-gradient(135deg, rgba(248,249,218,.75), rgba(241,222,161,.5) 45%, rgba(174,198,142,.42)); overflow: hidden; }
.lantern-glass::before, .lantern-glass::after { content: ''; position: absolute; top: 5px; bottom: 5px; width: 2px; background: rgba(107, 135, 91, .7); }.lantern-glass::before { left: 8px; }.lantern-glass::after { right: 8px; }
.lantern-flame { position: absolute; z-index: 2; left: 26px; top: 48px; width: 17px; height: 28px; border-radius: 80% 15% 75% 20%; transform: rotate(42deg); background: #efba66; box-shadow: 0 0 22px 10px rgba(242,188,91,.42); animation: lantern-flicker 3.2s ease-in-out infinite; }
.lantern-glow { position: absolute; inset: 25px 11px; border-radius: 50%; background: rgba(255, 232, 153, .28); filter: blur(10px); }
.lantern-base { position: absolute; left: 19px; bottom: 0; width: 92px; height: 19px; border: 2px solid #6e8963; border-radius: 3px 3px 11px 11px; background: linear-gradient(90deg, #718a64, #a1b98d, #718a64); }
.opening-leaf { position: absolute; z-index: 1; bottom: 17%; width: 70px; height: 34px; border: 1px solid rgba(114, 149, 95, .45); border-radius: 100% 0 100% 0; background: linear-gradient(135deg, rgba(151,181,128,.72), rgba(196,214,177,.38)); transform-origin: bottom right; }
.leaf-a { left: 12%; transform: rotate(24deg); }.leaf-b { left: 18%; bottom: 22%; transform: rotate(-22deg) scale(.82); }.leaf-c { right: 11%; bottom: 17%; transform: scaleX(-1) rotate(29deg); }
.opening-ground { position: absolute; z-index: 0; bottom: -19%; left: -10%; width: 120%; height: 38%; border-radius: 50%; background: #d4e1c8; }
.art-caption { position: absolute; z-index: 3; bottom: 8%; left: 50%; display: flex; align-items: center; gap: 11px; width: max-content; padding: 12px 16px; transform: translateX(-50%); border: 1px solid rgba(216,225,204,.8); border-radius: 15px; background: rgba(255, 254, 248, .78); box-shadow: 0 8px 25px rgba(80, 106, 73, .08); backdrop-filter: blur(8px); }
.caption-spark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; background: #f7efda; color: #c39b54; }
.art-caption > span:last-child { display: grid; gap: 3px; }.art-caption strong { color: #526850; font: 500 12px 'Lora', Georgia, serif; }.art-caption small { color: #98a391; font-size: 9px; }
.opening-subject-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 5px 0 13px; }
.opening-subject-heading .eyebrow { margin-bottom: 5px; font-size: 9px; letter-spacing: 1.8px; }.opening-subject-heading h2 { margin: 0; color: #465e45; font: 500 23px 'Lora', Georgia, serif; }.opening-subject-heading > p { margin: 0 0 3px; color: #929c8c; font-size: 10px; }
.opening-subjects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.opening-subject-card { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid #e4e9dc; border-radius: 17px; background: rgba(255, 254, 249, .8); text-align: left; color: #60755c; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.opening-subject-card:hover { transform: translateY(-3px); border-color: #bfcfb3; box-shadow: 0 12px 24px rgba(62, 88, 55, .08); }
.opening-subject-icon { display: grid; place-items: center; flex: 0 0 43px; width: 43px; height: 43px; border-radius: 13px; background: #eaf1e3; color: #63835b; font: 21px 'Lora', Georgia, serif; }
.physics-symbol { background: #f8e9dd; color: #b9886c; }.cs-symbol { background: #eae5f5; color: #8978aa; font: 700 12px 'Nunito Sans', 'Segoe UI', sans-serif; }
.opening-subject-copy { display: grid; min-width: 0; flex: 1; gap: 4px; }.opening-subject-copy strong { color: #51664e; font-size: 12px; font-weight: 700; }.opening-subject-copy small { color: #9aa593; font-size: 9px; }
.opening-subject-arrow { color: #93a18a; font-size: 17px; }.opening-footnote { margin: 22px 0 0; color: #a2a99d; text-align: center; font-size: 9px; }
@keyframes lantern-flicker { 0%, 100% { transform: rotate(42deg) scale(1); opacity: .96; } 50% { transform: rotate(45deg) scale(.94); opacity: .82; } }
@media (max-width: 800px) { .opening-screen { padding: 22px 18px 26px; }.opening-hero { grid-template-columns: 1fr; gap: 26px; padding-top: 38px; }.opening-art { min-height: 300px; width: min(470px, 100%); justify-self: center; }.opening-copy h1 { font-size: clamp(42px, 9vw, 60px); }.opening-subjects { grid-template-columns: 1fr; }.opening-subject-heading { align-items: flex-start; flex-direction: column; gap: 6px; }.opening-subject-card { padding: 12px 14px; }.opening-motto { display: none; } }
@media (max-width: 420px) { .opening-art { min-height: 260px; border-radius: 34% 34% 23px 23px; }.opening-lantern { transform: translateX(-50%) scale(.83); transform-origin: top center; }.opening-moon { width: 46px; height: 46px; }.opening-trust { line-height: 1.7; }.opening-brand strong { font-size: 19px; } }
@media (prefers-reduced-motion: reduce) { .lantern-flame { animation: none; } }


/* -------------------------------------------------------------------------
   Little Lantern · Hearthlight refresh
   A warmer parchment-and-sage palette with quieter contrast, softer edges,
   comfortable reading widths and visible interactive states.
   ------------------------------------------------------------------------- */
:root {
  --bg: #f5f0e6;
  --paper: #fffaf1;
  --ink: #3d493d;
  --muted: #858878;
  --muted-dark: #626c5c;
  --line: #e8dfd0;
  --sage: #b9c5a6;
  --sage-deep: #6f8061;
  --sage-pale: #edf0e3;
  --cream: #f5ead7;
  --peach: #f5e5d9;
  --lilac: #eee8f1;
  --rose: #f3e6e2;
  --shadow: 0 12px 32px rgba(74, 63, 43, .055), 0 2px 6px rgba(74, 63, 43, .025);
  --radius: 22px;
}
html { background: var(--bg); }
body {
  background:
    radial-gradient(ellipse at 84% 4%, rgba(222, 215, 188, .30), transparent 32rem),
    radial-gradient(ellipse at 8% 45%, rgba(224, 226, 205, .22), transparent 30rem),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.65;
}
::selection { background: #e8d8b9; color: #394739; }
button, input, select, textarea { color: inherit; }
button { min-height: 36px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #a28b65;
  outline-offset: 3px;
}
.sidebar {
  background: linear-gradient(180deg, #f2eee3 0%, #eeebdf 100%);
  border-right-color: #e4dccd;
  box-shadow: 5px 0 22px rgba(86, 75, 56, .025);
}
.brand-mark { background: #e5e8d7; color: #657a5d; border: 1px solid #d8dfcd; }
.nav-item { min-height: 44px; border-radius: 14px; color: #717767; font-size: 12px; }
.nav-item.active { background: #e4e8d8; color: #435642; box-shadow: inset 3px 0 0 #9aa984; }
.sidebar-note { background: linear-gradient(145deg, #e8eadb, #e2e6d6); border: 1px solid #dce1d1; }
.main-content { max-width: 1640px; }
.topbar {
  position: sticky; top: 0; z-index: 15;
  background: rgba(245, 240, 230, .88);
  backdrop-filter: blur(16px);
  border-bottom-color: rgba(224, 216, 202, .78);
}
.breadcrumb, .date-pill { color: #747968; }
.date-pill { background: #ece9dd; }
.avatar { background: #e4e8d9; border-color: #d9dece; color: #51684e; }
.view { padding-top: 43px; padding-bottom: 18px; }
h1 { color: #39493b; letter-spacing: -1.2px; line-height: 1.12; }
h1 em, .welcome-copy h2 em { color: #7b8c6a; }
.page-subtitle { color: #777a6c; font-size: 13px; line-height: 1.8; }
.eyebrow { color: #879176; letter-spacing: 1.55px; }
.panel, .stat-card, .paper-card, .revision-card {
  border-color: #e9e1d4;
  background: rgba(255, 251, 243, .94);
  box-shadow: var(--shadow);
}
.panel { border-radius: 21px; }
.welcome-card {
  background: linear-gradient(118deg, #e5e8d7 0%, #e9e5d4 52%, #f0e5d4 100%);
  border: 1px solid rgba(219, 220, 201, .85);
  box-shadow: 0 15px 42px rgba(83, 81, 57, .08);
  border-radius: 28px;
}
.welcome-copy { padding: 35px 38px; }
.welcome-copy p { color: #697563; font-size: 12px; line-height: 1.85; }
.button { border-radius: 12px; min-height: 40px; font-size: 11px; padding: 11px 16px; }
.button-primary { background: #6d8061; box-shadow: 0 6px 16px rgba(77, 95, 64, .16); }
.button-primary:hover { background: #596d50; }
.button-quiet { background: #f1ecdf; color: #68745f; }
.button-light-bordered { background: #fffaf1; border-color: #e7ddcc; color: #586a50; }
.button-danger-quiet { background: #f6eae5; color: #9e6b64; }
.stat-card { border-radius: 20px; padding: 19px 21px; }
.stat-label, .summary-kicker { color: #8c8c7b; }
.stat-number { color: #455746; }
.progress-track { background: #ece9dc; }
.progress-track span { background: linear-gradient(90deg, #8ea17b, #bdad83); }
.dashboard-columns { gap: 17px; }
.next-panel, .timer-panel { padding: 22px; }
.panel-heading h2, .section-line h2, .toolbar-top h2, .revision-controls h2 { color: #405141; }
.step-item { border-bottom-color: #eee7dc; }
.step-copy strong { color: #465545; font-size: 13px; }
.step-copy small, .step-meta { color: #858779; }
.timer-panel { background: linear-gradient(155deg, #eee9db, #f4ecdc); border-color: #e9dfcc; }
.timer-ring { background: conic-gradient(#829472 var(--timer-progress), #e4ddca 0); }
.timer-inner { background: #f4efdf; }
.source-strip { background: #ecefe3; border-color: #dfe4d4; border-radius: 17px; }
.source-strip p { color: #747c6d; font-size: 10px; }
.subject-tabs { gap: 13px; }
.subject-tab { border-radius: 17px; border-color: #e8e0d3; background: #fcf8ef; min-height: 78px; }
.subject-tab.active { border-color: #aebc9c; background: #edf0e4; box-shadow: 0 8px 22px rgba(80, 99, 68, .07); }
.subject-tab strong { color: #465745; }
.subject-tab small { color: #818374; }
.library-toolbar { background: #fcf8ef; }
.library-toolbar, .syllabus-summary { border-color: #e8dfd1; }
.filter-field > span { color: #737768; font-size: 11px; }
.filter-field select, .filter-field input, .topic-status, .topic-note {
  border-color: #e6ddcf;
  background: #fffdf7;
  color: #4f5c4b;
  border-radius: 11px;
  font-size: 12px;
}
.filter-field select, .filter-field input { min-height: 42px; padding: 9px 12px; }
.search-wrap { border-color: #e6ddcf; background: #fffdf7; }
.search-wrap input { min-height: 40px; }
.route-hint { color: #757968; background: #f3efe2; border-color: #ebe2d2; }
.syllabus-summary { background: #f0eee2; border-radius: 16px; }
.paper-card { border-radius: 19px; overflow: hidden; }
.paper-card-head { background: linear-gradient(90deg, #f2efe3, #f8f3e9); border-bottom-color: #ece5d9; }
.paper-title-wrap h3 { color: #435342; }
.paper-overline { color: #8d8c7b; }
.topic-row { border-bottom-color: #eee8dc; }
.topic-row.topic-highlight { background: #f4f0df; box-shadow: 0 0 0 8px #f4f0df; }
.topic-code { background: #f1ecdf; color: #7d886c; }
.topic-text strong { color: #465645; font-size: 14px; }
.topic-text small { color: #858779; font-size: 10px; }
.topic-status { font-size: 10px; min-height: 36px; }
.study-toggle { border-color: #dfe4d3; background: #edf0e4; color: #546c4d; min-height: 36px; font-size: 10px; }
.note-toggle, .review-toggle { font-size: 10px; min-height: 34px; }
.revision-intro { border-radius: 20px; background: linear-gradient(120deg, #ebeede, #f2eadb); border: 1px solid #e3e2d1; }
.revision-intro p, .revision-card p { color: #75796b; }
.revision-card { border-radius: 18px; }
.revision-card h3 { color: #435342; }
.settings-panel { border-radius: 19px; }
.settings-copy p { color: #747a6d; font-size: 10px; }
.app-footer { color: #858678; border-top-color: #e7dfd1; font-size: 10px; }
.study-dialog { background: #fffaf1; border-color: #e7dece; }
.study-dialog::backdrop { background: rgba(49, 52, 39, .43); }
#studyContent { font-size: 15px; line-height: 1.82; }
.study-section p, .study-section li, .solution-content li { color: #535e4e; line-height: 1.85; font-size: 14px; }
.study-section h3 { color: #435342; }
.study-intro { background: #eef0e4; border-color: #dfe5d4; }
.formula-card { background: #f3f0e5; border-color: #e8e0cf; }
.worked-example { background: #f4ead9; border-color: #eadcc6; }
.common-traps { background: #f5eae5; border-color: #ebddd6; }
.practice-card { background: #fffdf7; border-color: #e9e1d4; border-radius: 17px; }
.solution-content { background: #f0f1e7; }
.study-source-note { color: #7c7e70; }
.toast { background: #fffaf1; border-color: #e6ddca; color: #536b4c; box-shadow: 0 14px 36px rgba(71, 61, 43, .16); font-size: 12px; }

/* New study tools */
.planner-intro, .practice-intro-card { display: flex; align-items: flex-start; gap: 17px; padding: 22px 24px; background: linear-gradient(130deg, #e9eddf, #f2eadb); border-color: #e2e3d4; }
.planner-sun, .practice-intro-icon { display: grid; place-items: center; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 16px; background: #f7f0df; color: #b38c59; font: 25px 'Lora', Georgia, serif; }
.planner-intro h2, .practice-intro-card h2 { margin: 0 0 5px; color: #435342; font: 500 20px 'Lora', Georgia, serif; }
.planner-intro p, .practice-intro-card p { margin: 0; max-width: 690px; color: #707969; font-size: 12px; line-height: 1.8; }
.planner-builder { margin-top: 17px; padding: 22px; }
.planner-form { display: grid; grid-template-columns: 1fr 1.5fr 1fr .8fr auto; align-items: end; gap: 12px; margin-top: 18px; }
.planner-form .filter-field { display: grid; gap: 7px; }
.planner-add { white-space: nowrap; min-height: 42px; }
.planner-form-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: #f0eadc; color: #8c856d; }
.planner-list-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 28px 0 13px; }
.planner-list-heading h2 { margin: 0; color: #435342; font: 500 22px 'Lora', Georgia, serif; }
.planner-list { display: grid; gap: 10px; }
.planner-session { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 15px; padding: 16px 18px; border: 1px solid #e8dfd1; border-radius: 17px; background: #fffaf1; box-shadow: var(--shadow); }
.planner-date-badge { display: grid; place-items: center; min-height: 62px; padding: 8px; border-radius: 13px; background: #eff0e4; color: #627257; text-align: center; }
.planner-date-badge strong { font: 500 22px 'Lora', Georgia, serif; line-height: 1.1; }
.planner-date-badge small { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; }
.planner-session h3 { margin: 0 0 4px; color: #435342; font: 500 16px 'Lora', Georgia, serif; }
.planner-session p { margin: 0; color: #7d7f70; font-size: 11px; }
.planner-session.is-done { opacity: .68; }
.planner-session.is-done h3 { text-decoration: line-through; }
.planner-actions { display: flex; align-items: center; gap: 7px; }
.planner-actions button { min-height: 36px; border: 1px solid #e7dfd1; border-radius: 10px; background: #f6f2e8; color: #65745b; padding: 7px 10px; font-size: 10px; }
.planner-actions .planner-delete { color: #966c64; background: #f7ece6; }
.planner-empty { padding: 32px 20px; text-align: center; border: 1px dashed #dcd7c7; border-radius: 18px; background: rgba(255,250,241,.65); color: #7f806f; }
.planner-empty strong { display: block; margin-bottom: 5px; color: #59674f; font: 500 18px 'Lora', Georgia, serif; }
.flashcard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding: 18px 20px; }
.flashcard-toolbar .filter-field { width: min(340px, 100%); display: grid; gap: 7px; }
.flashcard-stats { display: flex; gap: 22px; }
.flashcard-stats span { display: grid; gap: 2px; text-align: right; }
.flashcard-stats strong { color: #4e604b; font: 500 22px 'Lora', Georgia, serif; }
.flashcard-stats small { color: #808273; font-size: 10px; }
.flashcard-stage { display: grid; justify-items: center; margin-top: 20px; }
.flashcard {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: min(720px, 100%); min-height: 320px; padding: 36px clamp(20px, 6vw, 65px);
  border: 1px solid #e6dcc9; border-radius: 28px;
  background: radial-gradient(circle at 85% 12%, rgba(239,226,195,.42), transparent 30%), linear-gradient(145deg, #fffaf0, #f4eedf);
  box-shadow: 0 20px 55px rgba(82, 68, 43, .08), inset 0 1px rgba(255,255,255,.8);
  text-align: center; cursor: pointer;
}
.flashcard:focus-visible { outline: 3px solid #a28b65; outline-offset: 4px; }
.flashcard-kicker { margin-bottom: 18px; color: #8c8c78; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; }
.flashcard-question { max-width: 570px; color: #435342; font: 500 clamp(22px, 3vw, 30px)/1.45 'Lora', Georgia, serif; }
.flashcard-answer { max-width: 590px; margin-top: 16px; padding-top: 17px; border-top: 1px solid #e5dac7; color: #596653; font-size: 14px; line-height: 1.85; white-space: pre-line; }
.flashcard-topic { margin-top: 18px; color: #8a8978; font-size: 10px; }
.flashcard-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; }
.flashcard-actions button { min-height: 42px; padding: 10px 17px; border: 1px solid #e6dccb; border-radius: 13px; background: #fffaf1; color: #68725f; font-size: 11px; font-weight: 800; }
.flashcard-actions .flashcard-again { background: #f7ece5; color: #986f61; border-color: #edddd3; }
.flashcard-actions .flashcard-known { background: #e9eee0; color: #536c4b; border-color: #dce5d2; }
.flashcard-help { margin: 14px auto 0; max-width: 640px; color: #828373; font-size: 11px; text-align: center; }
.flashcard-empty { width: min(720px,100%); padding: 34px; border: 1px dashed #ddd7c7; border-radius: 23px; background: #fbf6ea; text-align: center; color: #777b6d; }
.flashcard-empty h3 { margin: 6px 0; color: #435342; font: 500 21px 'Lora', Georgia, serif; }
.flashcard-empty p { margin: 0; font-size: 12px; }
.cs-quiz-card { margin-top: 17px; padding: clamp(18px, 3vw, 30px); }
.quiz-topline { display: flex; justify-content: space-between; gap: 14px; align-items: center; margin-bottom: 18px; }
.quiz-topic { color: #8b8b78; font-size: 10px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.quiz-count { color: #6b775f; background: #edf0e3; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 800; }
.quiz-question { max-width: 780px; color: #425342; font: 500 clamp(19px, 2.4vw, 25px)/1.5 'Lora', Georgia, serif; }
.quiz-options { display: grid; gap: 9px; margin: 18px 0; }
.quiz-option { display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border: 1px solid #e8dfd1; border-radius: 13px; background: #fffdf7; color: #586251; cursor: pointer; font-size: 12px; line-height: 1.6; }
.quiz-option input { margin-top: 3px; accent-color: #718363; }
.quiz-option.is-selected { border-color: #aebb9a; background: #f0f2e7; }
.quiz-option.is-correct { border-color: #a8b99a; background: #edf2e7; }
.quiz-option.is-wrong { border-color: #d6b5a9; background: #f7eeea; }
.quiz-feedback { margin: 14px 0; padding: 14px 16px; border-radius: 13px; background: #eef1e6; color: #526449; font-size: 12px; line-height: 1.75; }
.quiz-feedback.is-wrong { background: #f6ebe6; color: #936b61; }
.quiz-controls { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 17px; }
.quiz-controls p { margin: 0; color: #898a7a; font-size: 10px; }
.quiz-empty { padding: 35px; text-align: center; color: #747967; }

/* Softer motion, readable touch targets and sensible small-screen layouts. */
@media (hover: hover) {
  .panel, .stat-card, .paper-card, .revision-card { transition: box-shadow .2s ease, transform .2s ease; }
  .stat-card:hover, .paper-card:hover { box-shadow: 0 16px 38px rgba(74, 63, 43, .075); }
}
@media (max-width: 1080px) { .planner-form { grid-template-columns: 1fr 1fr; }.planner-add { grid-column: 1 / -1; } }
@media (max-width: 720px) {
  .view { padding-top: 30px; }
  .planner-form { grid-template-columns: 1fr; }
  .planner-add { grid-column: auto; width: 100%; }
  .planner-session { grid-template-columns: 58px minmax(0,1fr); gap: 11px; padding: 13px; }
  .planner-date-badge { min-height: 55px; }
  .planner-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .flashcard-toolbar { align-items: stretch; flex-direction: column; }
  .flashcard-toolbar .filter-field { width: 100%; }
  .flashcard-stats { justify-content: space-between; }
  .flashcard-stats span { text-align: left; }
  .flashcard { min-height: 290px; border-radius: 22px; padding: 26px 19px; }
  .planner-intro, .practice-intro-card { padding: 18px; }
  .planner-list-heading { align-items: flex-start; }
}
@media (max-width: 640px) {
  .sidebar { width: 100%; height: auto; min-height: 60px; inset: auto 0 0; padding: 6px 7px max(6px, env(safe-area-inset-bottom)); flex-direction: row; border-right: 0; border-top: 1px solid #e2d9c9; background: rgba(246, 241, 231, .96); backdrop-filter: blur(14px); }
  .brand, .sidebar-grow, .sidebar-note, .sidebar-bottom, .nav-label { display: none; }
  .main-nav { display: flex; width: 100%; justify-content: space-around; gap: 2px; }
  .nav-item { display: grid; justify-items: center; gap: 1px; flex: 1; min-width: 0; min-height: 48px; padding: 5px 2px; border-radius: 12px; font-size: 9px; }
  .nav-item > span:not(.nav-icon) { display: inline; }
  .nav-icon { font-size: 17px; height: 19px; }
  .nav-dot { display: none; }
  .main-content { margin-left: 0; padding: 0 14px 80px; }
  .topbar { height: 58px; }
  .date-pill { font-size: 9px; }
  .avatar { display: none; }
  .view { padding-top: 25px; }
  .app-footer { padding-bottom: 15px; }
}
@media (max-width: 420px) {
  .nav-item { font-size: 8px; }
  .nav-icon { font-size: 16px; }
  .main-content { padding-left: 11px; padding-right: 11px; }
  .planner-list-heading h2 { font-size: 19px; }
  .flashcard-question { font-size: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media (max-width: 640px) { .toast { bottom: calc(72px + env(safe-area-inset-bottom)); } .nav-item > span:last-child { white-space: nowrap; letter-spacing: -.15px; } }

.trace-lab { margin-top: 17px; padding: clamp(18px, 3vw, 28px); }
.trace-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 13px; background: #f0eadc; color: #9a875f; font: 24px 'Lora', Georgia, serif; }
.trace-intro { margin: 3px 0 14px; color: #777b6c; font-size: 12px; }
.trace-code { overflow-x: auto; padding: 17px 19px; border: 1px solid #e8dfd1; border-radius: 14px; background: #f1eee3; color: #4c5e4a; font: 12px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.trace-table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid #e8dfd1; border-radius: 13px; }
.trace-table { width: 100%; min-width: 430px; border-collapse: collapse; font-size: 11px; text-align: center; }
.trace-table th, .trace-table td { padding: 9px; border-bottom: 1px solid #eee7dc; border-right: 1px solid #eee7dc; }
.trace-table thead th { background: #f0eee2; color: #69745f; font-weight: 800; }
.trace-table tbody th { background: #f7f2e8; color: #7c826e; }
.trace-table td:last-child, .trace-table th:last-child { border-right: 0; }
.trace-table tr:last-child th, .trace-table tr:last-child td { border-bottom: 0; }
.trace-cell { width: min(100%, 74px); min-height: 36px; border: 1px solid #e5dccd; border-radius: 9px; background: #fffdf7; text-align: center; color: #4b5a48; }
.trace-cell.trace-correct { background: #edf2e7; border-color: #a9bd99; }
.trace-cell.trace-incorrect { background: #f8ede8; border-color: #d8b9aa; }
.trace-controls { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.trace-feedback { margin: 13px 0 0; padding: 12px 14px; border-radius: 12px; background: #f0eee2; color: #7a7a6a; font-size: 11px; line-height: 1.7; }
.trace-feedback.is-correct { background: #edf2e7; color: #556d4c; }
.trace-feedback.is-wrong { background: #f7eee6; color: #8c6d5d; }

/* Final comfort pass: warmer welcome, a little more breathing room, legible details. */
.opening-screen {
  background:
    radial-gradient(circle at 78% 23%, rgba(244, 222, 181, .40), transparent 25rem),
    radial-gradient(circle at 10% 78%, rgba(221, 228, 207, .38), transparent 28rem),
    linear-gradient(135deg, #fbf7ee 0%, #f4f0e5 58%, #eeeade 100%);
}
.opening-art { background: linear-gradient(180deg, #ecebdc 0%, #e6e9d9 62%, #e4e6d6 100%); border-color: rgba(221, 215, 194, .9); }
.opening-moon { background: #f8edcf; box-shadow: 0 0 0 12px rgba(248,239,212,.24), 0 0 46px rgba(240,201,121,.28); }
.opening-subject-card { background: rgba(255, 251, 243, .9); border-color: #e8dfd1; box-shadow: 0 5px 18px rgba(77, 69, 48, .035); }
.opening-subject-card:hover { border-color: #c4c7ae; box-shadow: 0 14px 25px rgba(77, 69, 48, .075); }
.opening-subject-copy small { color: #7f806f; font-size: 10px; }
.opening-description { color: #6e7567; }
.opening-footnote { color: #858474; font-size: 10px; }
.stat-label { font-size: 9px; }
.paper-overline { font-size: 9px; }
.notes-coming { font-size: 9px; }
.settings-actions .button { font-size: 10px; min-height: 38px; }
.study-section li, .solution-content li { font-size: 14px; }
.topic-note-wrap label { color: #707666; font-size: 10px; }
@media (max-width: 640px) {
  .opening-screen { padding-bottom: 24px; }
  .opening-subject-copy small { font-size: 9px; }
}
