:root {
  font-family:Inter,"PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  color:#272a3d;
  background:#f8f9fe;
  font-size:16px;
  font-synthesis:none;
  --purple:#6554f5;
  --muted:#83899e;
  --line:#edf0f7
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
button,input,a {
   -webkit-tap-highlight-color:transparent
}
button,input {
  font:inherit
}
button,a {
  touch-action:manipulation
}
button {
  cursor:pointer
}
button:disabled {
  cursor:default;
  opacity:.55
}
a {
  color:inherit;
  text-decoration:none
}
button:focus-visible,a:focus-visible {
  outline:3px solid #a69bff;
  outline-offset:4px
}
button {
  color:inherit
}
h1,h2,h3,p {
  margin:0
}
h1 {
  font-size:32px;
  line-height:1.45;
  letter-spacing:-.8px
}
h2 {
  font-size:20px;
  letter-spacing:-.4px
}
h3 {
  font-size:17px
}
p {
  line-height:1.8
}
svg {
  flex-shrink:0;
  vertical-align:middle
}
.sidebar {
  width:108px;
  position:fixed;
  inset:0 auto 0 0;
  background:#fff;
  border-right:1px solid var(--line);
  display:flex;
  align-items:center;
  flex-direction:column;
  padding:32px 12px;
  z-index:2
}
.logo {
  font-size:24px;
  font-weight:850;
  letter-spacing:-1.4px;
  position:relative
}
.logo span {
  color:var(--purple)
}
.logo i {
  position:absolute;
  font-size:16px;
  color:#f7b644;
  right:-9px;
  top:-10px;
  font-style:normal
}
.nav-items {
  display:grid;
  gap:18px;
  margin-top:58px;
  width:100%
}
.nav-item {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:17px 8px;
  border-radius:16px;
  color:#989db1;
  font-size:16px;
  min-height:76px
}
.nav-item.active {
  background:#f0edff;
  color:var(--purple);
  font-weight:650
}
.sidebar-bottom {
  margin-top:auto;
  display:grid;
  justify-items:center;
  gap:10px;
  font-size:16px;
  color:var(--muted)
}
.sidebar-bottom small {
  font-size:16px;
  color:#b2b7c7;
  margin-top:20px
}
.avatar {
  width:42px;
  height:42px;
  background:#fff2dc;
  border:4px solid #fff8ed;
  border-radius:50%;
  color:#e7a648;
  font-size:24px;
  text-align:center
}
#main {
  margin-left:108px;
  min-height:100vh;
  background:radial-gradient(ellipse at 70% 0,#fff0f3aa,transparent 48%),radial-gradient(ellipse at 0 5%,#edeaff80,transparent 50%)
}
.page {
  max-width:1136px;
  margin:auto;
  padding:48px 52px 20px
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:32px
}
.page-heading h1 {
  margin:7px 0 10px
}
.page-heading p {
  font-size:16px;
  color:#81869c
}
.eyebrow {
  font-size:16px;
  font-weight:650;
  letter-spacing:1px;
  color:var(--purple)
}
.sun {
  color:#f8b842;
  font-size:34px;
  vertical-align:middle;
  margin-left:8px
}
.date-pill {
  display:flex;
  align-items:center;
  gap:12px;
  background:#fff9;
  padding:6px 16px;
  min-height:48px;
  border:1px solid white;
  border-radius:28px;
  color:#86849e
}
.date-pill svg {
  width:18px
}
.date-pill input {
  border:0;
  outline:none;
  background:transparent;
  width:155px;
  color:#555973;
  font-size:16px;
  min-height:36px
}
.date-strip {
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:20px;
  max-width:100%;
  flex-wrap:wrap
}
.date-chip {
  border:0;
  padding:12px 20px;
  min-height:44px;
  border-radius:14px;
  background:#f0f2fa;
  color:#777e99;
  font-size:16px
}
.date-chip.selected {
  color:var(--purple);
  background:#eae7ff;
  font-weight:650
}
.quiet {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:transparent;
  border:0;
  min-width:44px;
  min-height:44px;
  border-radius:12px;
  color:#858ca5;
  padding:9px;
  font-size:20px
}
.quiet:hover {
  background:#f0effb
}
.panel {
  background:white;
  border:1px solid #eceef6;
  border-radius:23px;
  box-shadow:0 3px 8px #38467a03
}
.task-panel {
  padding:26px 28px 20px
}
.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px
}
.section-heading h2 {
  display:flex;
  align-items:center;
  gap:12px
}
.section-heading h2>svg {
  color:var(--purple);
  width:21px
}
.count {
  font-size:16px;
  color:var(--purple);
  margin-left:8px
}
.count small {
  color:#a4a9ba;
  font-weight:400;
  font-size:16px
}
.primary,.secondary,.danger {
  min-height:48px;
  border-radius:13px;
  padding:12px 23px;
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:9px;
  font-weight:600;
  font-size:16px;
  border:1px solid transparent;
  white-space:nowrap
}
.primary {
  background:linear-gradient(120deg,#7965ff,#5d4cf5);
  color:white;
  box-shadow:0 4px 8px #6554f519;
  border:1px solid #6554f5
}
.primary:hover {
  background:#5846ea
}
.primary svg {
  width:18px
}
.secondary {
  background:#f1f3fa;
  color:#5c6380
}
.secondary:hover {
  background:#e9e7fb
}
.danger {
  color:#c65860;
  background:#fff1f1;
  padding:12px
}
.small {
  min-height:44px;
  padding:9px 16px
}
.task-row {
  display:flex;
  align-items:center;
  gap:16px;
  min-height:70px;
  border-bottom:1px solid #f0f2f8
}
.task-row:last-child {
  border:0
}
.checkbox {
  width:26px;
  height:26px;
  border:1.5px solid #b5bbd2;
  border-radius:7px;
  flex-shrink:0;
  background:white;
  padding:0;
  display:grid;
  place-items:center;
  position:relative
}
.checkbox:before {
  content:'';
  position:absolute;
  inset:-10px
}
.checkbox svg {
  width:19px;
  color:white
}
.done .checkbox {
  background:linear-gradient(135deg,#8473ff,#6654fa);
  border-color:#7162f8;
  box-shadow:0 3px 8px #6654fa22
}
.task-title {
  font-size:16px;
  overflow-wrap:anywhere
}
.done .task-title {
  color:#a2a5b5;
  text-decoration:line-through
}
.badge {
  padding:4px 9px;
  border-radius:7px;
  font-size:16px;
  white-space:nowrap
}
.homework {
  background:#fff1e1;
  color:#d69252
}
.todo {
  background:#e9f6fa;
  color:#5996a9
}
.row-action {
  margin-left:auto;
  font-size:18px
}
.row-action svg {
  width:18px
}
.task-bottom {
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between;
  margin-top:20px;
  font-size:16px;
  color:#9096ad
}
.mini-track {
  width:130px;
  height:5px;
  background:#f0edf9;
  border-radius:8px;
  overflow:hidden;
  flex-shrink:0
}
.mini-track i {
  display:block;
  height:100%;
  background:#a18bf7;
  border-radius:8px
}
.empty-state {
  text-align:center;
  padding:28px 16px 38px
}
.empty-state h3 {
  font-size:17px;
  margin:12px 0 6px
}
.empty-state p {
  color:#989db0;
  font-size:16px
}
.empty-icon {
  display:grid;
  place-items:center;
  background:#f3f0ff;
  width:56px;
  height:56px;
  border-radius:18px;
  margin:auto;
  color:#9585e7
}
.empty-icon svg {
  width:27px;
  height:27px
}
.learning-section {
  margin-top:30px
}
.learning-section>.section-heading {
  margin-bottom:18px;
  padding:0 4px
}
.muted {
  color:var(--muted);
  font-size:16px;
  line-height:1.8
}
.app-card {
  padding:28px 30px;
  display:flex;
  align-items:center;
  gap:24px;
  border:1px solid #f1eadf;
  border-radius:23px;
  background:linear-gradient(110deg,#f2f9ff 0%,#fdf7ff 35%,#fff9e9 100%)
}
.app-icon {
  width:86px;
  height:86px;
  border-radius:23px;
  position:relative;
  background:linear-gradient(135deg,#dcf1d5,#e9e4ff 80%);
  flex-shrink:0;
  box-shadow:inset 0 0 0 1px #dff1e5
}
.app-icon span {
  position:absolute;
  display:grid;
  place-items:center;
  width:43px;
  height:52px;
  font-weight:850;
  font-size:32px;
  border-radius:9px;
  border:3px solid white;
  box-shadow:0 5px 0 #b6b5df;
  transform:rotate(-12deg);
  top:14px;
  left:13px;
  color:#279c79;
  background:#ffed90
}
.app-icon span+span {
  left:36px;
  top:27px;
  transform:rotate(12deg);
  color:#7970cf;
  background:#fff
}
.app-info h3 {
  font-size:22px;
  margin:6px 0 6px
}
.app-info p {
  font-size:16px;
  color:#85859f
}
.estimate {
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:5px
}
.estimate svg {
  width:15px;
  height:15px
}
.app-card>.primary {
  margin-left:auto
}
footer {
  text-align:center;
  font-size:16px;
  color:#adb0c0;
  padding:32px 0 14px
}
footer span {
  margin:0 10px;
  color:#c6badf
}
.back-link {
  display:inline-flex;
  align-items:center;
  min-height:44px;
  font-size:16px;
  color:#969bb0;
  margin-bottom:8px
}
.app-home .page-heading {
  margin-bottom:22px
}
.word-label {
  font-size:16px;
  color:#8f91a7;
  padding:12px 16px;
  border:1px solid #eee8ef;
  border-radius:24px;
  background:#ffffff90
}
.study-hero {
  display:grid;
  grid-template-columns:1fr .9fr;
  background:linear-gradient(115deg,#f0edff,#fff7ed);
  border-radius:26px;
  overflow:hidden;
  border:1px solid #e9e3f6;
  padding:32px 38px;
  min-height:300px
}
.hero-copy h2 {
  font-size:30px;
  line-height:1.6;
  margin:12px 0 12px
}
.hero-copy p {
  font-size:16px;
  color:#83849b
}
.goal {
  display:grid;
  gap:6px;
  margin-top:20px;
  font-size:16px;
  color:#9290a6
}
.goal b {
  font-size:16px;
  color:#605b7a
}
.word-art {
  position:relative;
  min-height:270px
}
.floating-word {
  position:absolute;
  border-radius:10px;
  background:#fff;
  padding:10px 20px;
  font-size:22px;
  font-weight:750;
  color:#6960ee;
  box-shadow:0 5px 12px #6554f510;
  transform:rotate(-12deg)
}
.w1 {
  top:54px;
  left:12%
}
.w2 {
  top:22px;
  left:56%;
  transform:rotate(9deg)
}
.w3 {
  top:151px;
  left:2%;
  transform:rotate(-15deg)
}
.w4 {
  top:198px;
  left:66%;
  color:#e9a355;
  transform:rotate(12deg)
}
.art-sun {
  position:absolute;
  right:1%;
  top:75px;
  color:#f2bd57;
  font-size:42px
}
.art-star {
  position:absolute;
  left:25%;
  bottom:30px;
  color:#e6b348;
  font-size:27px
}
.book-art {
  position:absolute;
  top:94px;
  left:34%;
  display:flex;
  transform:rotate(8deg);
  filter:drop-shadow(0 12px 14px #6b5bc326)
}
.book-art div {
  display:grid;
  place-items:center;
  width:71px;
  height:100px;
  background:#ffeba7;
  font-size:46px;
  color:#da995a;
  border:7px solid white;
  border-radius:15px 4px 4px 15px;
  box-shadow:0 5px 0 #ac9cce;
  transform:rotate(-9deg)
}
.book-art div+div {
  background:#ddd8ff;
  color:#7162d0;
  border-radius:4px 15px 15px 4px;
  transform:rotate(6deg);
  margin-left:-4px
}
.art-caption {
  position:absolute;
  bottom:0;
  width:100%;
  text-align:center;
  font-size:16px;
  letter-spacing:3px;
  color:#aaa0ba
}
.mode-grid {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:12px;
  margin:22px 0
}
.mode-card {
  display:grid;
  grid-template-columns:1fr auto;
  text-align:left;
  padding:20px 18px;
  border-radius:18px;
  background:white;
  border:1px solid #e8e9f3;
  gap:10px
}
.mode-card strong {
  grid-column:1/-1;
  font-size:16px
}
.mode-card small {
  grid-column:1/-1;
  color:#a0a3b5;
  font-size:16px
}
.mode-card>svg {
  grid-row:1;
  grid-column:2;
  width:16px;
  color:#a4a1bc
}
.mode-number {
  font-size:16px;
  color:#a9a5c0
}
.mode-card.featured {
  background:linear-gradient(135deg,#7965ff,#6554f5);
  color:white;
  border-color:var(--purple)
}
.featured small,.featured .mode-number,.featured>svg {
  color:#e0daff
}
.stats-grid {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px
}
.stat {
  padding:23px 24px
}
.stat h3 {
  font-size:16px;
  margin-bottom:22px
}
.stat p {
  font-size:16px;
  color:#9397ac;
  margin:12px 0 3px
}
.progress-ring {
  width:88px;
  height:88px;
  border-radius:50%;
  background:conic-gradient(#89bc9e var(--progress),#eef1f7 0);
  display:grid;
  place-items:center
}
.progress-ring b {
  display:grid;
  place-content:center;
  width:73px;
  height:73px;
  background:white;
  border-radius:50%;
  font-size:22px
}
.progress-ring small {
  font-size:16px;
  display:contents
}
.review-pill {
  border-radius:9px;
  padding:8px 14px;
  background:#fff0ee;
  margin-bottom:8px;
  max-width:170px;
  font-size:16px;
  color:#d68b7d;
  display:flex;
  gap:16px
}
.review-pill span {
  color:#6d6371
}
.stat .stat-empty {
  line-height:2.3;
  margin-top:32px
}
.big-stat {
  font-size:42px;
  font-weight:650;
  margin:12px 0 18px
}
.big-stat small {
  font-size:16px;
  font-weight:400;
  margin-left:4px;
  color:#83899e
}
.resume-bar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  background:#eeebff;
  border-radius:14px;
  padding:14px 20px;
  margin-top:20px;
  font-size:16px;
  color:#6a6292
}
.study-page {
  padding-top:35px
}
.study-top {
  display:flex;
  align-items:center;
  gap:22px;
  margin-bottom:32px
}
.study-top span {
  font-size:16px;
  font-weight:600;
  white-space:nowrap
}
.study-top small {
  font-weight:400;
  color:#9395aa
}
.study-track {
  height:8px;
  border-radius:10px;
  background:#eaeafa;
  overflow:hidden;
  flex:1
}
.study-track i {
  display:block;
  height:100%;
  border-radius:10px;
  background:linear-gradient(90deg,#8977ff,#6554f5)
}
.study-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:28px
}
.game {
  padding:24px 30px;
  min-height:480px
}
.game-heading {
  display:flex;
  justify-content:space-between;
  font-size:16px;
  color:#aaa6be
}
.game-heading span:first-child {
  color:#8274bc
}
.prompt {
  text-align:center;
  padding:28px 0
}
.prompt p {
  color:#8f8da5;
  font-size:16px
}
.prompt h1 {
  font-size:54px;
  font-weight:750;
  letter-spacing:-1.8px;
  margin:5px 0 14px
}
.prompt>span {
  font-size:16px;
  color:#8c879f
}
.options {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px
}
.option {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:66px;
  border:1.5px solid #e9e6f7;
  border-radius:14px;
  background:#fcfcff;
  font-size:21px;
  color:#4e496b
}
.option:not(:disabled):hover {
  background:#f3f0ff;
  border-color:#a59aed
}
.option:disabled {
  opacity:1
}
.option.correct {
  border-color:#8dc9a0;
  background:#effaf1;
  color:#448458
}
.option.incorrect {
  border-color:#e9b1a8;
  background:#fff3f0;
  color:#bb786b
}
.option>svg {
  position:absolute;
  right:14px;
  width:18px
}
.feedback-space {
  margin-top:28px;
  min-height:90px
}
.feedback {
  display:flex;
  align-items:center;
  gap:14px;
  border-radius:15px;
  background:#f3f3ff;
  padding:18px
}
.feedback-icon {
  width:40px;
  height:40px;
  display:grid;
  place-items:center;
  background:#fff0c6;
  color:#dfaf43;
  flex-shrink:0;
  border-radius:13px;
  font-size:26px
}
.feedback h3 {
  font-size:16px
}
.feedback p {
  font-size:16px;
  color:#888297;
  margin-top:5px
}
.feedback .primary {
  margin-left:auto;
  padding:10px 15px;
  min-height:44px
}
.feedback.bad {
  background:#fff4ee
}
.gentle-note {
  text-align:center;
  padding-top:14px
}
.handbook {
  padding:16px 0
}
.handbook h3 {
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:16px;
  margin-bottom:24px
}
.handbook h3 span {
  font-size:16px;
  font-weight:400;
  background:#efebf9;
  color:#9384ab;
  padding:5px 8px;
  border-radius:7px
}
.tip {
  border-bottom:1px solid #e9e8f0;
  padding-bottom:18px;
  margin-bottom:20px
}
.tip b {
  font-size:16px;
  color:#68647e
}
.tip p {
  font-size:16px;
  color:#9993aa;
  margin-top:8px;
  line-height:2
}
.handbook>.muted {
  font-size:16px
}
.spell {
  display:flex;
  gap:10px
}
.spell input {
  width:100%;
  min-width:0;
  min-height:60px;
  border-radius:13px;
  border:1.5px solid #e3dff3;
  background:#fdfcff;
  padding:14px;
  font-size:20px;
  color:#554c72
}
.flashcard {
  display:grid;
  place-content:center;
  gap:12px;
  width:100%;
  min-height:140px;
  border:1px dashed #c3b9ed;
  border-radius:18px;
  background:#f8f6ff;
  color:#8b7ab2;
  font-size:16px
}
.flashcard.flipped {
  background:#f1eeff;
  border-style:solid
}
.flashcard strong {
  font-size:35px;
  color:#6e5ce2
}
.flashcard small {
  font-size:16px
}
.actions {
  display:flex;
  justify-content:center;
  gap:16px
}
.result-page {
  max-width:930px;
  text-align:center;
  padding-top:38px
}
.result-medal {
  width:86px;
  height:86px;
  margin:0 auto 18px;
  background:linear-gradient(135deg,#ffdc87,#ffc054);
  border:8px solid #fff1bf;
  border-radius:50%;
  color:white;
  font-size:55px;
  line-height:65px;
  box-shadow:0 5px 0 #eab155;
  font-weight:800
}
.result-page h1 {
  font-size:30px;
  margin:8px 0
}
.result-page h1 span {
  font-size:24px
}
.result-stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  margin:32px auto;
  max-width:600px
}
.result-stats>div {
  display:grid;
  gap:8px;
  border-right:1px solid #e8e6ef
}
.result-stats>div:last-child {
  border:0
}
.result-stats b {
  font-size:33px
}
.result-stats small {
  font-size:16px;
  font-weight:400;
  color:#8f8a9d
}
.result-stats span {
  font-size:16px;
  color:#928ca3
}
.result-columns {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  text-align:left
}
.result-box {
  border-radius:18px;
  padding:22px 25px;
  background:#eef9f1;
  border:1px solid #e4f3e8;
  color:#70a380
}
.result-box.bad {
  background:#fff4ed;
  border-color:#ffeadc;
  color:#cb926e
}
.result-box h3 {
  font-size:16px;
  margin-bottom:12px
}
.result-box p {
  font-size:16px;
  line-height:2.1
}
.result-box b {
  color:#4e5364;
  margin:0 8px;
  font-weight:500
}
.result-box p span {
  color:#7c8090
}
.result-summary {
  display:flex;
  gap:18px;
  text-align:left;
  margin:24px 0;
  padding:23px 26px;
  background:#f6f5ff
}
.summary-icon {
  display:grid;
  place-items:center;
  color:#8d7fdc;
  background:#ebe6ff;
  border-radius:13px;
  flex-shrink:0;
  width:42px;
  height:42px;
  font-size:25px
}
.result-summary h3 {
  font-size:16px;
  margin-bottom:7px
}
.result-summary p {
  font-size:16px;
  color:#898299
}
.result-actions {
  display:flex;
  gap:14px;
  margin-bottom:20px
}
.result-actions>* {
  flex:1
}
.task-dialog {
  width:430px;
  max-width:calc(100vw - 32px);
  border:1px solid #efedf5;
  border-radius:22px;
  padding:26px;
  box-shadow:0 20px 70px #2f2a4c33;
  color:#2f3042
}
.task-dialog::backdrop {
  background:#24263866;
  backdrop-filter:blur(3px)
}
.task-dialog h2 {
  font-size:20px
}
.task-dialog>.dialog-actions {
  margin-top:22px
}
.task-dialog>p {
  font-size:16px;
  color:#898399;
  margin-top:14px
}
.field {
  display:grid;
  gap:10px;
  margin:22px 0;
  font-size:16px;
  font-weight:600
}
.field input {
  min-height:48px;
  border-radius:11px;
  border:1px solid #dedfee;
  padding:12px;
  font-weight:400;
  color:#40445c;
  background:#fcfcff;
  width:100%
}
input:focus {
  outline:3px solid #e2dcff;
  border-color:#9b8bf2
}
fieldset {
  padding:0;
  border:0;
  margin:0
}
legend {
  font-size:16px;
  font-weight:600;
  margin-bottom:12px
}
.type-options {
  display:flex;
  gap:12px
}
.type-options label {
  flex:1;
  position:relative;
  cursor:pointer
}
.type-options input {
  position:absolute;
  opacity:0
}
.type-options span {
  display:block;
  text-align:center;
  padding:13px;
  border:1px solid #e9eaf3;
  background:#f1f3fa;
  border-radius:11px;
  font-size:16px;
  color:#7d819a
}
.type-options input:checked+span {
  background:var(--purple);
  color:white;
  border-color:var(--purple)
}
.type-options input:focus-visible+span {
  outline:3px solid #c4bbff;
  outline-offset:3px
}
.dialog-actions {
  display:flex;
  gap:10px;
  justify-content:flex-end
}
.dialog-actions>.secondary,.dialog-actions>.primary {
  flex:1
}
.error {
  color:#bd6671;
  font-size:16px;
  margin-bottom:14px
}
.error:empty {
  display:none
}
.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
}
#notice {
  position:fixed;
  bottom:25px;
  left:50%;
  transform:translateX(-50%);
  background:#373149;
  color:white;
  box-shadow:0 5px 20px #0002;
  z-index:10;
  padding:14px 22px;
  border-radius:12px;
  font-size:16px;
  max-width:90vw
}

@media(min-width:1400px) {
  .page {
  padding-top:65px
}
.today-page {
  max-width:1136px
}
.task-row {
  min-height:76px
}
.app-card {
  padding:32px
}

}
@media(max-width:1100px) {
  .sidebar {
  width:84px;
  padding:28px 10px
}
.logo {
  font-size:21px
}
#main {
  margin-left:84px
}
.page {
  padding:32px 32px 16px
}
.study-layout {
  grid-template-columns:minmax(0,1fr);
  gap:22px
}
.game {
  padding:22px
}
.feedback {
  flex-wrap:wrap
}
.feedback .primary {
  margin-left:auto
}
.study-hero {
  padding:26px
}
.hero-copy h2 {
  font-size:26px
}
.word-art {
  min-height:280px
}
.mode-card {
  padding:18px 12px
}
.mode-card small {
  font-size:16px
}
.stats-grid {
  gap:12px
}
.stat {
  padding:20px
}
.page-heading h1 {
  font-size:29px
}

}
@media(max-width:850px) {
  .study-layout {
  grid-template-columns:1fr
}
.handbook {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:16px
}
.handbook h3 {
  grid-column:1/-1;
  margin-bottom:0
}
.handbook>.muted {
  grid-column:1/-1
}
.tip {
  margin:0;
  border:0
}
.page-heading {
  gap:12px
}
.page-heading h1 {
  font-size:26px
}
.date-pill {
  padding:5px 12px
}
.app-card {
  gap:18px;
  padding:24px
}
.app-info h3 {
  font-size:20px
}
.section-heading>.muted {
  display:none
}
.hero-copy h2 {
  font-size:23px
}
.study-hero {
  grid-template-columns:1.1fr 1fr
}
.floating-word {
  font-size:18px;
  padding:8px 15px
}
.book-art {
  left:28%
}
.book-art div {
  width:59px;
  height:87px;
  font-size:35px
}
.stat {
  padding:18px
}
.stat .muted {
  font-size:16px
}

}
@media(max-width:620px) {
  .sidebar {
  width:64px;
  padding:23px 6px
}
.logo {
  font-size:16px
}
.nav-item {
  font-size:16px;
  padding:13px 4px;
  min-height:66px
}
.nav-items {
  margin-top:36px
}
.sidebar-bottom {
  font-size:16px
}
.avatar {
  width:34px;
  height:34px;
  font-size:18px
}
#main {
  margin-left:64px
}
.page {
  padding:24px 16px 10px
}
.page-heading {
  align-items:flex-start;
  flex-direction:column;
  margin-bottom:22px
}
.page-heading h1 {
  font-size:25px
}
.page-heading p {
  font-size:16px
}
.date-pill {
  align-self:flex-end;
  margin-top:-2px
}
.date-strip {
  gap:4px
}
.date-chip {
  padding:10px 12px;
  font-size:16px
}
.date-strip>.quiet {
  min-width:32px;
  padding:4px
}
.task-panel {
  padding:18px 16px
}
.section-heading h2 {
  font-size:17px;
  gap:7px
}
.section-heading {
  gap:7px
}
.count {
  margin-left:0;
  font-size:16px
}
.small {
  font-size:16px;
  padding:9px 10px;
  gap:4px
}
.task-row {
  gap:10px;
  flex-wrap:wrap;
  padding:10px 0;
  min-height:66px
}
.task-title {
  font-size:16px;
  flex:1;
  min-width:80px
}
.badge {
  font-size:16px;
  padding:4px 6px
}
.row-action {
  padding:6px;
  min-width:36px
}
.checkbox {
  width:23px;
  height:23px
}
.task-bottom {
  font-size:16px;
  gap:10px
}
.mini-track {
  width:65px
}
.app-card {
  flex-wrap:wrap;
  gap:15px;
  padding:20px
}
.app-icon {
  width:70px;
  height:70px
}
.app-icon span {
  width:36px;
  height:44px;
  font-size:26px;
  left:7px;
  top:10px
}
.app-icon span+span {
  left:28px;
  top:23px
}
.app-info {
  flex:1
}
.app-info h3 {
  font-size:18px
}
.app-info p {
  font-size:16px
}
.app-info .eyebrow {
  font-size:16px
}
.app-card>.primary {
  width:100%;
  margin:0
}
.study-hero {
  grid-template-columns:1fr;
  padding:24px
}
.word-art {
  display:none
}
.mode-grid {
  grid-template-columns:1fr 1fr
}
.mode-card {
  padding:18px
}
.stats-grid {
  grid-template-columns:1fr
}
.stat {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center
}
.stat h3 {
  grid-column:1/-1;
  margin-bottom:12px
}
.stat p {
  grid-column:1
}
.stat>.muted {
  grid-column:1
}
.progress-ring {
  grid-column:2;
  grid-row:2/4;
  width:74px;
  height:74px
}
.progress-ring b {
  width:62px;
  height:62px;
  font-size:18px
}
.big-stat {
  margin:0;
  grid-column:2;
  grid-row:2
}
.stat .stat-empty {
  margin-top:0
}
.review-pill {
  min-width:130px
}
.resume-bar {
  gap:12px;
  flex-wrap:wrap
}
.game {
  padding:20px 16px;
  min-height:430px
}
.study-top {
  gap:10px;
  margin-bottom:20px
}
.prompt h1 {
  font-size:46px
}
.option {
  font-size:18px;
  min-height:60px
}
.feedback {
  padding:14px;
  gap:12px
}
.feedback p {
  font-size:16px
}
.feedback .primary {
  width:100%;
  margin:4px 0 0
}
.feedback-icon {
  width:32px;
  height:32px
}
.handbook {
  grid-template-columns:1fr
}
.handbook>.muted {
  grid-column:1
}
.spell {
  flex-direction:column
}
.result-page h1 {
  font-size:24px
}
.result-stats b {
  font-size:27px
}
.result-columns {
  grid-template-columns:1fr;
  gap:14px
}
.result-box {
  padding:18px
}
.result-actions {
  flex-wrap:wrap
}
.result-actions>* {
  flex-basis:45%
}
.result-summary {
  padding:18px;
  gap:10px
}
.result-summary p {
  font-size:16px
}
.dialog-actions {
  flex-wrap:wrap
}
.dialog-actions .danger {
  width:100%
}

}

@media(prefers-reduced-motion:reduce) {
  * {
  scroll-behavior:auto!important
}

}


/* Photo homework import belongs to daily tasks, not to a Learning App. */
.task-heading-actions, .photo-select-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-dialog {
  width: 760px;
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
}
.photo-description {
  font-size:16px;
  color: #85819a;
  margin-bottom: 18px;
}
.photo-select-actions {
  margin-bottom: 12px;
}
.photo-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 22px;
  margin-top: 22px;
}
.photo-review[hidden] { display: none; }
.photo-preview {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f6fc;
  display: grid;
  place-items: center;
  padding: 10px;
  min-height: 240px;
}
.photo-preview img {
  width: 100%;
  height: 280px;
  object-fit: contain;
  border-radius: 6px;
}
.photo-review .field { margin: 0; }
.field textarea {
  width: 100%;
  resize: vertical;
  min-height: 220px;
  font: inherit;
  font-weight: 400;
  line-height: 1.9;
  color: #40445c;
  padding: 12px;
  border: 1px solid #dedfee;
  border-radius: 11px;
  background: #fcfcff;
}
.field textarea:focus {
  outline: 3px solid #e2dcff;
  border-color: #9b8bf2;
}
.photo-status {
  color: var(--purple);
  font-size:16px;
  margin: 18px 0 12px;
}
.photo-date { max-width: 240px; }
@media (max-width: 620px) {
  .task-panel > .section-heading { flex-wrap: wrap; }
  .task-heading-actions { width: 100%; }
  .task-heading-actions > button { flex: 1; }
  .photo-review { grid-template-columns: 1fr; gap: 16px; }
  .photo-preview { min-height: 120px; }
  .photo-preview img { height: 170px; }
  .photo-dialog { padding: 20px; }
}
.login-page{min-height:100dvh;display:grid;place-items:center;padding:28px;background:#f6f5fc}.login-card{width:min(100%,440px);padding:36px}.login-card .logo{display:block;margin-bottom:28px}.login-card h1{font-size:30px}.login-card .field{margin-top:22px}.login-card button{width:100%;min-height:48px}.login-card input{min-height:48px}.sidebar-bottom #logout{font-size:16px;min-height:44px}

/* Keep the interface focused on the next action. */
.nav-item span { white-space: nowrap; }
.task-title, .chat-message { overflow-wrap: anywhere; }
.chat-page { max-width: 960px; }
.chat-log { padding: 24px; min-height: 220px; display: grid; align-content: start; gap: 20px; margin-bottom: 16px; }
.chat-empty { color: #697087; align-self: center; text-align: center; padding: 60px 0; }
.chat-message { white-space: pre-wrap; line-height: 1.8; }
.chat-message strong { display: block; font-size:16px; color: #697087; margin-bottom: 4px; }
.chat-user { background: #f4f2ff; border-radius: 12px; padding: 12px 16px; }
.chat-compose { padding: 16px; }
.chat-compose .field { margin: 0 0 12px; }
.chat-compose .field textarea { min-height: 90px; line-height: 1.6; background: white; }
.chat-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.chat-actions .muted { margin-right: auto; font-size:16px; }
.chat-actions #stop-chat:disabled { display: none; }
.chat-privacy { font-size:16px; padding: 12px 4px; }
@media (max-width: 620px) {
  .sidebar { position: fixed; inset: auto 0 0; width: 100%; height: 68px; padding: 0; border-right: 0; border-top: 1px solid var(--line); }
  .sidebar > .logo, .sidebar-bottom { display: none; }
  .nav-items { display: flex; margin: 0; gap: 0; height: 100%; }
  .nav-item { flex: 1; border-radius: 0; min-height: 64px; padding: 10px 4px; gap: 4px; font-size:16px; }
  #main { margin-left: 0; padding-bottom: 80px; }
  .page { padding: 24px 20px; }
  .chat-log { padding: 16px; min-height: 200px; }
  .chat-actions .muted { width: 100%; }
  .date-pill { align-self: flex-start; }
  .study-top span { font-size:16px; }
}
@media (max-width: 620px) {
  .sidebar { height: 108px; }
  .nav-items { height: 68px; flex-shrink: 0; }
  .sidebar-bottom { display: flex; width: 100%; justify-content: flex-end; gap: 12px; padding: 0 16px; margin: 0; height: 40px; border-top: 1px solid var(--line); }
  .sidebar-bottom .avatar, .sidebar-bottom small { display: none; }
  .sidebar-bottom #logout { min-height: 36px; }
  #main { padding-bottom: 120px; }
}
.result-stats.cards-stats { grid-template-columns: 1fr; }
:root { --muted: #626b80; }
.muted, .page-heading p, .empty-state p, .task-bottom, .sidebar-bottom small,
.back-link, .word-label, .stat p, .stat .muted, .mode-card:not(.featured) small,
.mode-number, .study-top small, .prompt p, .prompt > span, .tip p,
.handbook > .muted, .game-heading, .result-stats span, .result-stats small,
.result-summary p, .photo-description { color: var(--muted); }
.nav-item:not(.active), .quiet { color: #626b80; }
.homework { color: #925619; }
.todo { color: #326779; }
.error { color: #a33445; }
.task-dialog { max-height: calc(100dvh - 32px); overflow-y: auto; }
#main:focus { outline: none; }
@media (max-width: 620px) {
  .sidebar { height: calc(108px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  #main { padding-bottom: calc(120px + env(safe-area-inset-bottom)); }
}
.sidebar-bottom #logout { white-space: nowrap; padding-inline: 0; }
