:root {
  --paper: #F2EDE2;
  --paper-deep: #E8E0D0;
  --card: #FFFCF5;
  --ink: #1E2A24;
  --ink-soft: #3A463F;
  --muted: #7B8178;
  --muted-2: #969B92;
  --line: rgba(35, 52, 42, .11);
  --line-soft: rgba(35, 52, 42, .07);
  --green: #2F5D4A;
  --green-deep: #1E4135;
  --green-soft: #E4EDE3;
  --amber: #D99A43;
  --amber-soft: #F6E8CD;
  --clay: #BF6A4B;
  --clay-soft: #F3DFD5;
  --blue: #416D8C;
  --shadow: 0 28px 60px -38px rgba(30, 42, 36, .55);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--sans);
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(246, 220, 165, .62) 0%, rgba(246, 220, 165, 0) 58%),
    radial-gradient(900px 620px at -12% 18%, rgba(196, 216, 194, .55) 0%, rgba(196, 216, 194, 0) 55%),
    linear-gradient(180deg, #F5F0E5 0%, var(--paper) 55%, #EFE8DA 100%);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .38;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.045'/%3E%3C/svg%3E");
  z-index: 0;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
a { color: inherit; }

/* ---------------- boot ---------------- */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; background: var(--paper); color: var(--muted); font-size: 13px;
  letter-spacing: .08em;
}
.boot-mark {
  width: 54px; height: 54px; border-radius: 18px; background: var(--green);
  color: #FBF6E8; display: grid; place-items: center;
  font-family: var(--serif); font-size: 26px; font-weight: 700;
  box-shadow: 0 18px 40px -18px rgba(47, 93, 74, .7);
  animation: breathe 2.2s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: scale(1); box-shadow: 0 18px 40px -18px rgba(47, 93, 74, .55); }
  50% { transform: scale(1.045); box-shadow: 0 20px 46px -14px rgba(47, 93, 74, .72); }
}

/* ---------------- login ---------------- */
.login-layer {
  position: fixed; inset: 0; z-index: 70;
  display: grid; place-items: start center;
  overflow-y: auto; padding: max(26px, 8vh) 24px 28px;
  background:
    radial-gradient(800px 460px at 82% 8%, rgba(246, 220, 165, .7), transparent 60%),
    radial-gradient(700px 500px at 8% 90%, rgba(196, 216, 194, .65), transparent 60%),
    var(--paper);
}
.login-card {
  width: min(430px, 100%);
  background: rgba(255, 252, 245, .88);
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 34px 34px 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  animation: rise .55s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.login-brand .brand-mark { width: 46px; height: 46px; border-radius: 15px; }
.login-card h1 {
  font-family: var(--serif); font-size: 33px; line-height: 1.2;
  margin: 0 0 10px; font-weight: 600; letter-spacing: -.01em;
}
.login-card h1 em { font-style: normal; color: var(--clay); }
.login-card p { margin: 0 0 24px; color: var(--muted); font-size: 14px; line-height: 1.75; }
.pin-input {
  width: 100%; padding: 16px 18px; border-radius: 15px;
  border: 1px solid var(--line); background: #FBF7ED;
  font-size: 24px; letter-spacing: .42em; text-align: center;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.pin-input:focus { border-color: rgba(47, 93, 74, .55); box-shadow: 0 0 0 4px rgba(47, 93, 74, .09); }
.login-btn {
  width: 100%; margin-top: 12px; padding: 15px;
  border: 0; border-radius: 15px; background: var(--green); color: #FAF6E9;
  font-weight: 600; font-size: 15px; letter-spacing: .06em;
  transition: transform .18s, background .18s;
}
.login-btn:hover { background: #274E3D; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-err { min-height: 20px; margin-top: 10px; color: #A94F38; font-size: 12.5px; text-align: center; }
.login-foot { margin-top: 22px; text-align: center; font-size: 11.5px; color: var(--muted-2); line-height: 1.7; }

/* ---------------- shell ---------------- */
.app {
  position: relative; z-index: 1;
  max-width: 1440px; margin: 0 auto;
  padding: 26px 36px 44px;
}
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: var(--green); color: #FAF6E9;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: 0 12px 26px -14px rgba(47, 93, 74, .8);
}
.brand-mark svg { width: 23px; height: 23px; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 700; letter-spacing: .06em; }
.brand-meta { margin-top: 3px; font-size: 10.5px; letter-spacing: .16em; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 10px; }
.sync {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: rgba(255, 252, 245, .55);
  color: var(--muted); border-radius: 999px; padding: 8px 13px;
  font-size: 11.5px; letter-spacing: .02em;
  transition: color .25s, border-color .25s;
}
.sync .dot { width: 6px; height: 6px; border-radius: 50%; background: #C39A4E; transition: background .25s, box-shadow .25s; }
.sync.online { color: #356A50; border-color: rgba(76, 139, 103, .24); }
.sync.online .dot { background: #4C8B67; box-shadow: 0 0 0 3px rgba(76, 139, 103, .13); }
.sync.offline { color: #9A5A43; border-color: rgba(181, 106, 78, .22); }
.sync.offline .dot { background: #B56A4E; }
.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-soft); font-size: 11.5px; text-decoration: none;
  transition: background .2s, border-color .2s;
}
.ghost-btn:hover { background: rgba(255, 252, 245, .65); border-color: rgba(35, 52, 42, .2); }

/* ---------------- hero ---------------- */
.hero {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 30px; padding: 8px 2px 30px;
}
.eyebrow {
  margin: 0 0 14px; color: var(--green);
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
}
.hero h1 {
  margin: 0; font-family: var(--serif); font-weight: 600;
  font-size: clamp(42px, 5vw, 66px); line-height: 1.08; letter-spacing: -.025em;
}
.hero h1 em { font-style: normal; color: var(--clay); }
.hero-sub { margin: 17px 0 0; color: var(--muted); font-size: 13.5px; line-height: 1.7; letter-spacing: .01em; }
.hero-clock { text-align: right; flex: 0 0 auto; padding-bottom: 3px; }
.clock {
  font-size: clamp(58px, 7.2vw, 96px); font-weight: 250;
  line-height: .95; letter-spacing: -.06em; font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.clock .colon { display: inline-block; transform: translateY(-.03em); opacity: .55; }
.date-line { margin-top: 10px; font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.hero-progress { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.hero-progress .track { width: 132px; height: 4px; border-radius: 99px; background: rgba(35, 52, 42, .1); overflow: hidden; }
.hero-progress .fill { height: 100%; border-radius: 99px; background: var(--green); transition: width .6s cubic-bezier(.2, .8, .2, 1); }
.hero-progress span { font-size: 10.5px; color: var(--muted); letter-spacing: .04em; }

/* ---------------- grid + panels ---------------- */
.dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1.52fr) minmax(340px, .88fr);
  grid-template-areas: "homework side" "routine side";
  gap: 18px;
  align-items: start;
}
.homework { grid-area: homework; }
.side { grid-area: side; display: flex; flex-direction: column; gap: 18px; }
.routine-panel { grid-area: routine; }
.panel {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 252, 246, .97) 0%, rgba(255, 251, 243, .9) 100%);
  border: 1px solid var(--line);
  border-radius: 25px;
  box-shadow: var(--shadow);
  padding: 25px 26px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.label {
  margin: 0 0 7px; color: var(--muted);
  font-size: 10.5px; font-weight: 600; letter-spacing: .18em;
}
.panel h2 { margin: 0; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: .01em; }
.panel-sub { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

/* homework */
.hw-count { text-align: right; flex: 0 0 auto; }
.hw-count b { display: inline-flex; align-items: baseline; white-space: nowrap; font-family: var(--serif); font-size: 33px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hw-count b i { font-style: normal; color: var(--muted-2); font-size: 16px; margin: 0 3px; }
.hw-count > span { display: block; margin-top: 5px; color: var(--muted); font-size: 10.5px; letter-spacing: .1em; }
.progress-track { height: 5px; border-radius: 99px; background: rgba(35, 52, 42, .08); overflow: hidden; margin: 18px 0 4px; }
.progress-fill {
  height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--green), #6C9577);
  transition: width .65s cubic-bezier(.2, .8, .2, 1);
}
.task-list { list-style: none; margin: 0; padding: 0; }
.task {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 6px 14px 2px;
  border-bottom: 1px dashed var(--line-soft);
  cursor: pointer; position: relative;
  transition: background .18s, padding .18s, border-radius .18s;
}
.task:last-child { border-bottom: 0; }
.task:hover { background: rgba(228, 237, 227, .36); border-radius: 14px; padding-left: 10px; padding-right: 10px; }
.task:focus-visible { outline: 2px solid rgba(47, 93, 74, .5); outline-offset: 2px; border-radius: 14px; }
.check {
  width: 29px; height: 29px; flex: 0 0 auto;
  border: 1.5px solid #C6CDC4; border-radius: 9px;
  background: transparent; display: grid; place-items: center;
  color: #fff; padding: 0;
  transition: background .22s, border-color .22s, transform .22s;
}
.check svg { width: 15px; height: 15px; opacity: 0; transform: scale(.55); transition: opacity .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.task:hover .check { border-color: #8FA195; }
.task.done .check { background: var(--green); border-color: var(--green); }
.task.done .check svg { opacity: 1; transform: scale(1); }
.task-main { min-width: 0; flex: 1; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.subject { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; color: var(--ink-soft); letter-spacing: .04em; }
.subject-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.est { color: var(--muted-2); font-size: 10.5px; letter-spacing: .02em; }
.task-title {
  font-size: 16px; font-weight: 500; letter-spacing: .005em; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color .22s;
}
.task.done .task-title { color: #9FA79D; text-decoration: line-through; text-decoration-color: rgba(120, 130, 120, .45); }
.task-state { flex: 0 0 auto; text-align: right; color: var(--muted-2); font-size: 10.5px; letter-spacing: .03em; min-width: 72px; }
.task.done .task-state { color: #5E876E; }
.task-state .wait { color: var(--muted-2); }
.task.done .task-state .wait { color: #5E876E; }
.task-burst {
  position: absolute; right: 10px; top: 50%; width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber); opacity: 0; pointer-events: none;
}
.task.just-done .task-burst { animation: burst .55s ease-out; }
@keyframes burst {
  0% { opacity: .9; transform: translate(0, -50%) scale(1); box-shadow: 0 0 0 0 rgba(217, 154, 67, .35); }
  100% { opacity: 0; transform: translate(16px, -50%) scale(.4); box-shadow: 0 0 0 20px rgba(217, 154, 67, 0); }
}
.empty { padding: 32px 6px 22px; text-align: center; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: #A9B4A5; margin-bottom: 10px; }
.empty b { display: block; font-family: var(--serif); color: var(--ink-soft); font-size: 18px; font-weight: 600; margin-bottom: 5px; }
.empty span { font-size: 12px; }
.hw-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.hw-total { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.hw-total b { color: var(--ink-soft); font-weight: 600; }
.week-mini { display: flex; align-items: flex-end; gap: 7px; flex: 0 0 auto; }
.week-mini .wk { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.week-mini .bar { width: 8px; height: 25px; border-radius: 4px; background: rgba(35, 52, 42, .08); display: flex; align-items: flex-end; overflow: hidden; }
.week-mini .bar i { display: block; width: 100%; background: #A9BFA8; border-radius: 4px; transition: height .5s; }
.week-mini .wk.today .bar { background: rgba(47, 93, 74, .12); }
.week-mini .wk.today .bar i { background: var(--green); }
.week-mini .lbl { font-size: 8.5px; color: var(--muted-2); }
.week-mini .wk.today .lbl { color: var(--green); font-weight: 700; }

/* focus */
.focus-card {
  border: 1px solid rgba(255, 255, 255, .08);
  background:
    radial-gradient(420px 280px at 85% -20%, rgba(217, 154, 67, .22), transparent 65%),
    linear-gradient(155deg, #264E3F 0%, #1B3A2F 58%, #163128 100%);
  color: #F8F3E6;
  box-shadow: 0 34px 60px -36px rgba(25, 52, 41, .8);
  overflow: hidden;
}
.focus-card::after {
  content: ""; position: absolute; right: -40px; bottom: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 0 0 24px rgba(255, 255, 255, .025), 0 0 0 52px rgba(255, 255, 255, .018);
  pointer-events: none;
}
.focus-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.focus-card .label { color: rgba(248, 243, 230, .52); }
.focus-card h2 { color: #F8F3E6; font-size: 23px; }
.next-break { text-align: right; font-size: 10.5px; color: rgba(248, 243, 230, .55); line-height: 1.55; }
.next-break b { display: block; color: #F0C27C; font-weight: 600; font-size: 12px; letter-spacing: .03em; }
.timer-wrap { position: relative; width: 166px; height: 166px; margin: 12px auto 10px; }
.timer-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-svg circle { fill: none; stroke-width: 7; stroke-linecap: round; }
.timer-track { stroke: rgba(255, 255, 255, .1); }
.timer-bar { stroke: #E3AC5D; transition: stroke-dashoffset .28s linear, stroke .3s; }
.timer-wrap.break-mode .timer-bar { stroke: #9AC7AD; }
.timer-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
}
#timerText { font-size: 35px; font-weight: 250; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1; }
#timerState { font-size: 9.5px; color: rgba(248, 243, 230, .5); letter-spacing: .12em; }
.focus-actions { display: flex; gap: 8px; align-items: center; }
.btn-focus {
  flex: 1; padding: 11px 14px; border-radius: 12px; border: 0;
  background: #E3AC5D; color: #203528; font-size: 12.5px; font-weight: 700; letter-spacing: .04em;
  transition: transform .18s, background .18s;
}
.btn-focus:hover { background: #EDBA70; transform: translateY(-1px); }
.btn-focus.paused { background: rgba(255, 255, 255, .12); color: #F8F3E6; }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 auto; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(255, 255, 255, .04);
  color: rgba(248, 243, 230, .7); display: grid; place-items: center;
  transition: background .18s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .1); }
.icon-btn svg { width: 15px; height: 15px; }
.quick-breaks {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .09);
}
.quick {
  border: 1px solid rgba(255, 255, 255, .09); background: rgba(255, 255, 255, .035);
  color: rgba(248, 243, 230, .76); border-radius: 11px;
  padding: 8px 3px 7px; font-size: 9.5px; letter-spacing: .02em;
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  transition: background .18s, border-color .18s, transform .18s;
}
.quick:hover { background: rgba(255, 255, 255, .09); border-color: rgba(255, 255, 255, .16); transform: translateY(-1px); }
.quick svg { width: 17px; height: 17px; stroke: #E3AC5D; }

/* course */
.course-card { padding-bottom: 18px; }
.course-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.course-head h2 { font-size: 23px; }
.tab-btn {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 11px; font-size: 10px; letter-spacing: .04em;
}
.tab-btn:hover { color: var(--green); border-color: rgba(47, 93, 74, .3); }
.course-list { list-style: none; margin: 0; padding: 0; max-height: 282px; overflow-y: auto; scrollbar-width: thin; }
.lesson {
  display: grid; grid-template-columns: 63px minmax(0, 1fr) auto;
  align-items: center; gap: 9px;
  padding: 7px 8px; border-radius: 10px; min-height: 35px;
}
.lesson + .lesson { border-top: 1px solid rgba(35, 52, 42, .045); }
.lesson-time { font-size: 8.8px; color: var(--muted-2); font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
.lesson-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lesson-tag {
  font-size: 8.5px; padding: 3px 6px; border-radius: 5px;
  color: var(--muted); background: rgba(35, 52, 42, .05); letter-spacing: .03em;
}
.lesson.current { background: var(--green-soft); }
.lesson.current .lesson-name { color: var(--green-deep); font-weight: 700; }
.lesson.current .lesson-tag { background: var(--green); color: #F7F3E6; }
.lesson.next .lesson-tag { background: var(--amber-soft); color: #8A6125; }
.course-empty { padding: 22px 4px; color: var(--muted); font-size: 12px; text-align: center; }
.week-table { width: 100%; border-collapse: collapse; font-size: 9.5px; margin-top: 4px; }
.week-table th { font-weight: 600; color: var(--muted); padding: 5px 2px; font-size: 9px; letter-spacing: .05em; }
.week-table th.today { color: var(--green); }
.week-table td { padding: 3px; text-align: center; vertical-align: middle; }
.week-table .pcell {
  color: var(--muted-2); font-variant-numeric: tabular-nums; font-size: 8.5px;
  width: 28px; text-align: left; padding-left: 4px;
}
.week-table .cell {
  border-radius: 6px; padding: 5px 2px; background: rgba(35, 52, 42, .035);
  color: var(--ink-soft); font-size: 9px; line-height: 1.2;
  min-width: 40px;
}
.week-table .cell.today { background: var(--green-soft); color: var(--green-deep); font-weight: 600; }
.week-table .cell.empty-cell { background: transparent; }
.week-scroll { overflow-x: auto; scrollbar-width: thin; }

/* routine */
.routine-panel { padding: 21px 25px 16px; overflow: hidden; }
.routine-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 2px; }
.routine-now { text-align: right; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.routine-now b { display: block; color: var(--green); font-weight: 600; font-size: 11.5px; }
.routine-track {
  display: flex; overflow-x: auto; padding: 8px 0 2px; position: relative;
  scrollbar-width: none;
}
.routine-track::-webkit-scrollbar { display: none; }
.routine-track::before {
  content: ""; position: absolute; left: 8px; right: 8px; top: 40px;
  height: 1px; background: linear-gradient(90deg, rgba(35, 52, 42, .14), rgba(35, 52, 42, .06));
}
.ritem {
  position: relative; min-width: 108px; flex: 1 0 108px;
  padding: 0 10px 2px 0; background: none; border: 0; text-align: left;
}
.ritem .rtime { display: block; height: 17px; color: var(--muted-2); font-size: 9.5px; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.ritem .rdot {
  display: block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--dot, #C9CFC5); border: 2px solid var(--card);
  margin: 7px 0 9px; position: relative; z-index: 1;
  box-shadow: 0 0 0 1px rgba(35, 52, 42, .1);
}
.ritem .rtitle { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem .rnote { display: block; margin-top: 3px; font-size: 9px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ritem.current .rdot { width: 9px; height: 9px; background: var(--green); box-shadow: 0 0 0 5px rgba(47, 93, 74, .11); }
.ritem.next .rdot { background: var(--amber); box-shadow: 0 0 0 4px rgba(217, 154, 67, .12); }
.ritem.next .rtime { color: #9A6A25; font-weight: 600; }
.ritem.next .rtitle { color: var(--ink-soft); }
.ritem.current .rtime { color: var(--green); font-weight: 600; }
.ritem.current .rtitle { color: var(--green-deep); font-weight: 700; }
.ritem.current .rnote { color: #72806F; }
.ritem.past { opacity: .6; }

/* footer */
.page-foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 24px 4px 0; color: var(--muted-2);
  font-size: 10px; letter-spacing: .06em;
}
.page-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: currentColor; display: inline-block; margin: 0 8px; }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 30px; z-index: 60;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 9px;
  background: #1F3B30; color: #F8F2E4;
  border: 1px solid rgba(255, 255, 255, .1);
  padding: 11px 18px; border-radius: 999px;
  font-size: 12px; letter-spacing: .02em;
  box-shadow: 0 20px 40px -18px rgba(20, 40, 30, .7);
  transition: opacity .25s, transform .3s cubic-bezier(.2, .8, .2, 1);
  max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 14px; height: 14px; color: #E3AC5D; flex: 0 0 auto; }

/* ---------------- break overlay ---------------- */
.break-overlay {
  position: fixed; inset: 0; z-index: 80;
  display: flex; flex-direction: column;
  padding: clamp(22px, 4.5vw, 52px);
  color: #F8F3E6;
  background:
    radial-gradient(900px 620px at 82% 12%, rgba(217, 154, 67, .22), transparent 60%),
    radial-gradient(700px 500px at 8% 95%, rgba(122, 168, 139, .16), transparent 60%),
    linear-gradient(150deg, #244B3C 0%, #1A392E 55%, #142F26 100%);
  opacity: 0; visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.break-overlay.open { opacity: 1; visibility: visible; }
.break-overlay::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 50%, transparent 0%, rgba(10, 25, 18, .28) 100%);
  pointer-events: none;
}
.break-top { display: flex; align-items: center; justify-content: space-between; gap: 18px; position: relative; z-index: 1; }
.break-brand { display: flex; align-items: center; gap: 9px; font-size: 11px; letter-spacing: .12em; color: rgba(248, 243, 230, .62); }
.break-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; box-shadow: none; }
.break-brand .brand-mark svg { width: 17px; height: 17px; }
.break-steps { display: flex; gap: 7px; }
.break-step {
  display: flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px; padding: 6px 11px;
  color: rgba(248, 243, 230, .45); font-size: 10px; letter-spacing: .03em;
  transition: background .3s, color .3s, border-color .3s;
}
.break-step svg { width: 13px; height: 13px; }
.break-step.active { background: rgba(227, 172, 93, .16); border-color: rgba(227, 172, 93, .38); color: #F0C27C; }
.break-step.done { color: rgba(248, 243, 230, .7); border-color: rgba(255, 255, 255, .16); }
.break-step.done svg { color: #9AC7AD; }
.break-main {
  position: relative; z-index: 1;
  flex: 1; width: 100%; max-width: 1120px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: clamp(28px, 6vw, 90px);
  padding: 16px 0 10px;
}
.break-icon {
  width: 68px; height: 68px; border-radius: 22px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #E3AC5D; margin-bottom: 26px;
}
.break-icon svg { width: 32px; height: 32px; }
.break-kicker { font-size: 11px; letter-spacing: .2em; color: rgba(248, 243, 230, .45); margin: 0 0 12px; }
.break-title {
  font-family: var(--serif); font-weight: 600;
  font-size: clamp(38px, 5.4vw, 68px); line-height: 1.08; letter-spacing: -.02em;
  margin: 0 0 18px; max-width: 12em;
}
.break-desc { margin: 0; max-width: 26em; color: rgba(248, 243, 230, .64); font-size: clamp(13px, 1.4vw, 16px); line-height: 1.9; }
.break-count { text-align: center; min-width: clamp(190px, 24vw, 300px); }
.break-count b {
  display: block; font-size: clamp(90px, 15vw, 178px); font-weight: 200;
  line-height: .88; letter-spacing: -.07em; font-variant-numeric: tabular-nums;
  color: #F8F3E6;
}
.break-count span { display: block; margin-top: 14px; font-size: 10px; letter-spacing: .2em; color: rgba(248, 243, 230, .42); }
.break-bottom { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.break-hint { color: rgba(248, 243, 230, .38); font-size: 10.5px; letter-spacing: .04em; }
.break-controls { display: flex; gap: 9px; }
.break-btn {
  border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .05);
  color: rgba(248, 243, 230, .8); border-radius: 999px; padding: 10px 18px;
  font-size: 11.5px; letter-spacing: .04em; transition: background .2s;
}
.break-btn:hover { background: rgba(255, 255, 255, .1); }
.break-btn.primary { background: #E3AC5D; border-color: #E3AC5D; color: #1E3528; font-weight: 700; }
.break-btn.primary:hover { background: #EDBA70; }

/* ---------------- responsive ---------------- */
@media (max-width: 1120px) {
  .dashboard { grid-template-columns: 1fr; grid-template-areas: "homework" "side" "routine"; }
  .side { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(300px, 1.1fr); align-items: start; }
  .app { padding: 24px 26px 40px; }
}
@media (max-width: 820px) {
  .side { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; flex-direction: column-reverse; gap: 18px; }
  .hero-clock { text-align: left; }
  .hero-progress { justify-content: flex-start; }
  .clock { font-size: 64px; }
  .hero h1 { font-size: 47px; }
  .break-main { grid-template-columns: 1fr; gap: 16px; align-content: center; }
  .break-count { text-align: left; min-width: 0; }
  .break-count b { font-size: 108px; }
  .break-count span { margin-top: 6px; }
  .break-steps { display: none; }
}
@media (max-width: 620px) {
  .app { padding: 18px 16px 34px; }
  .topbar { margin-bottom: 22px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 12px; }
  .brand-name { font-size: 18px; }
  .brand-meta { font-size: 9.5px; }
  .sync { padding: 7px 10px; font-size: 10px; }
  .ghost-btn { padding: 7px 10px; font-size: 10px; }
  .hero { padding-bottom: 24px; }
  .hero h1 { font-size: 40px; }
  .hero-sub { font-size: 12.5px; }
  .clock { font-size: 56px; }
  .panel { padding: 20px 18px; border-radius: 21px; }
  .panel h2 { font-size: 22px; }
  .hw-count b { font-size: 27px; }
  .task { gap: 11px; padding: 13px 2px; }
  .task-title { font-size: 14.5px; }
  .task-state { display: none; }
  .task-list .task:last-child { border-bottom: 0; }
  .hw-foot { flex-wrap: wrap; }
  .week-mini { margin-left: auto; }
  .focus-card { padding-bottom: 18px; }
  .timer-wrap { width: 152px; height: 152px; }
  .break-overlay { padding: 22px 20px; }
  .break-bottom { flex-direction: column; align-items: flex-start; gap: 12px; }
  .break-controls { width: 100%; }
  .break-btn { flex: 1; text-align: center; }
  .login-card { padding: 28px 22px 24px; border-radius: 24px; }
  .login-card h1 { font-size: 28px; }
  .page-foot { flex-direction: column; align-items: flex-start; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
.pair-code-input { font-size: 28px; letter-spacing: .35em; }
.login-foot a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
