:root {
  --ink: #1b241f;
  --ink-2: #243229;
  --ink-3: #31443a;
  --paper: #f1e8d7;
  --paper-2: #fbf7ed;
  --paper-3: #e9deca;
  --line: #d8cab4;
  --line-strong: #c4b39a;
  --muted: #7b7162;
  --muted-2: #9b8f7c;
  --red: #b24635;
  --red-2: #8f2f24;
  --red-soft: #f2dfd8;
  --jade: #3f6f60;
  --jade-soft: #dfeae3;
  --gold: #a97b35;
  --gold-soft: #f1e6cf;
  --cream: #f6eedf;
  --shadow: 0 18px 50px rgba(43, 34, 20, .10);
  --shadow-soft: 0 8px 24px rgba(43, 34, 20, .07);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --mono: "SFMono-Regular", "Menlo", "Monaco", "Cascadia Mono", monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(1100px 700px at 10% -10%, rgba(255, 252, 242, .9), transparent 60%),
    radial-gradient(900px 600px at 100% 20%, rgba(220, 203, 175, .35), transparent 55%),
    var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.grain {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: .14;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' 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='.22'/%3E%3C/svg%3E");
}

.shell {
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- sidebar ---------- */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 30px 24px 22px;
  color: var(--cream);
  background:
    radial-gradient(420px 300px at 10% 0%, rgba(177, 133, 63, .14), transparent 70%),
    linear-gradient(180deg, #1e2b24 0%, #172019 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
  overflow: hidden;
}

.sidebar::after {
  content: "灯";
  position: absolute;
  right: -24px;
  bottom: 60px;
  font-family: var(--serif);
  font-size: 180px;
  line-height: 1;
  color: rgba(246, 238, 223, .035);
  pointer-events: none;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.seal {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 224, 190, .45);
  background: var(--red);
  color: #fff4e4;
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .06em;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .08);
}

.brand-cn {
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: .14em;
  line-height: 1.1;
}

.brand-en {
  margin-top: 5px;
  color: rgba(246, 238, 223, .52);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .22em;
}

.brand-note {
  margin: 26px 0 0;
  padding-left: 1px;
  color: rgba(246, 238, 223, .62);
  font-size: 12px;
  line-height: 1.9;
  letter-spacing: .06em;
}

.brand-note span { color: rgba(246, 238, 223, .28); }

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 33px;
  position: relative;
  z-index: 1;
}

.nav-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 11px 12px 11px 14px;
  border: 0;
  border-left: 2px solid transparent;
  background: transparent;
  color: rgba(246, 238, 223, .65);
  text-align: left;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.nav-item:hover { color: var(--cream); background: rgba(255, 255, 255, .045); }

.nav-item.is-active {
  color: var(--cream);
  border-left-color: var(--red);
  background: rgba(255, 255, 255, .075);
}

.nav-cn { font-family: var(--serif); font-size: 16px; letter-spacing: .08em; }
.nav-en { font-family: var(--mono); font-size: 8px; letter-spacing: .2em; opacity: .5; }

.sidebar-foot {
  margin-top: auto;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  position: relative;
  z-index: 1;
}

.lamp-dot {
  width: 7px;
  height: 7px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #e0b26d;
  box-shadow: 0 0 0 4px rgba(224, 178, 109, .11), 0 0 18px rgba(224, 178, 109, .65);
}

.sidebar-foot p {
  margin: 0;
  color: rgba(246, 238, 223, .58);
  font-size: 11px;
  line-height: 1.8;
  letter-spacing: .04em;
}

.sidebar-foot p span { color: rgba(246, 238, 223, .32); }

/* ---------- main / topbar ---------- */

.main {
  min-width: 0;
  padding: 0 46px 80px;
}

.topbar {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.top-date {
  margin: 0 0 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.top-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: .06em;
  line-height: 1.2;
}

.topbar-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.sync-badge { display: inline-flex; align-items: center; padding: 4px 7px; border: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .06em; white-space: nowrap; }
.sync-badge.sync-synced { color: var(--jade); border-color: #bcd5ca; background: var(--jade-soft); }
.sync-badge.sync-syncing { color: var(--gold); border-color: #dfcba3; background: var(--gold-soft); }
.sync-badge.sync-local { color: var(--muted); }
.ghost-btn {
  padding: 8px 13px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 247, 237, .42);
  color: var(--ink-2);
  font-size: 12px;
  letter-spacing: .05em;
  transition: background .18s ease, border-color .18s ease;
}

.ghost-btn:hover { background: var(--paper-2); border-color: var(--ink-2); }

.view {
  max-width: 1220px;
  margin: 0 auto;
  padding-top: 32px;
  animation: rise .42s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- shared type ---------- */

.eyebrow {
  display: inline-block;
  color: var(--red);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }

h1, h2, h3, h4, p { margin-top: 0; }
h2 { font-family: var(--serif); font-weight: 500; letter-spacing: .04em; }

.card {
  background: rgba(251, 247, 237, .82);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 0;
}

.card-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: .04em;
}

.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.bar {
  height: 4px;
  overflow: hidden;
  background: var(--paper-3);
}

.bar > span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--red);
  transition: width .4s ease;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 34px 36px 32px;
  color: var(--cream);
  background:
    radial-gradient(500px 280px at 90% 0%, rgba(169, 123, 53, .20), transparent 70%),
    linear-gradient(135deg, #24342b 0%, #172019 100%);
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -76px;
  width: 240px;
  height: 240px;
  border: 1px solid rgba(246, 238, 223, .12);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(246, 238, 223, .025), 0 0 0 58px rgba(246, 238, 223, .018);
  pointer-events: none;
}

.hero::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--red);
}

.hero-kicker {
  margin-bottom: 14px;
  color: rgba(246, 238, 223, .57);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 760px;
  font-family: var(--serif);
  font-size: clamp(30px, 3.5vw, 45px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .03em;
}

.hero-sub {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 15px 0 0;
  color: rgba(246, 238, 223, .66);
  font-size: 13px;
  line-height: 1.85;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid rgba(246, 238, 223, .18);
  color: rgba(246, 238, 223, .76);
  background: rgba(246, 238, 223, .055);
  font-size: 10px;
  letter-spacing: .05em;
  white-space: nowrap;
}

.pill--red { color: #f0c9be; border-color: rgba(210, 112, 93, .4); background: rgba(178, 70, 53, .18); }
.pill--jade { color: #c7e0d7; border-color: rgba(113, 163, 145, .34); background: rgba(63, 111, 96, .18); }
.pill--gold { color: #e8d4ac; border-color: rgba(190, 148, 77, .3); background: rgba(169, 123, 53, .14); }

.hero--rest { background: linear-gradient(135deg, #3f4a40, #232c26); }
.hero--rest::before { background: var(--gold); }
.hero--exam::before { background: #d6a24e; }

/* ---------- today layout ---------- */

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(270px, .72fr);
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}

.today-main { min-width: 0; }
.today-rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.tasks-card { margin-top: 18px; }

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
}

.progress-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: .04em;
}

.progress-sub { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.progress-count { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.progress-count strong { color: var(--ink); font-size: 18px; font-weight: 500; }
.progress-bar-wrap { padding: 0 20px 18px; }

.task-list { border-top: 1px solid var(--line); }

.task {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 247, 237, .18);
  transition: background .18s ease;
}

.task:last-child { border-bottom: 0; }
.task:hover { background: rgba(255, 252, 245, .55); }
.task.is-next { background: rgba(178, 70, 53, .045); }
.task.is-next::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--red); }
.task.is-done { opacity: .62; }
.task.is-done .task-title { text-decoration: line-through; text-decoration-color: rgba(27, 36, 31, .25); }

.task-num {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding-top: 3px;
}

.task-body { min-width: 0; }

.task-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 7px;
}

.chip {
  display: inline-block;
  padding: 2px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper-2);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chip--course { color: var(--red-2); border-color: #e1bfb4; background: var(--red-soft); }
.chip--ielts { color: var(--jade); border-color: #bcd5ca; background: var(--jade-soft); }
.chip--review { color: var(--gold); border-color: #dfcba3; background: var(--gold-soft); }
.chip--admin { color: #5b5f54; border-color: #cfcbbd; background: #eeeade; }
.chip--thesis { color: #6b4e77; border-color: #d4c3d8; background: #f0e8f1; }
.chip--exam { color: #7b4b18; border-color: #dfc18e; background: #f5e7cc; }
.chip--rest { color: var(--jade); border-color: #bcd5ca; background: var(--jade-soft); }

.task-title {
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.45;
  letter-spacing: .02em;
  overflow-wrap: anywhere;
}

.task-focus {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.72;
}

.task-output {
  margin: 7px 0 0;
  color: var(--ink-3);
  font-size: 11.5px;
  line-height: 1.65;
}

.task-output span {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .12em;
  margin-right: 5px;
  text-transform: uppercase;
}

.task-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  min-width: 102px;
}

.task-minutes { color: var(--muted); font-family: var(--mono); font-size: 10px; white-space: nowrap; }

.task-action {
  padding: 7px 10px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink-2);
  font-size: 11px;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.task-action:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.task-action.is-running { border-color: var(--jade); color: var(--jade); background: var(--jade-soft); }
.task-action.is-done { border-color: transparent; color: var(--jade); background: transparent; cursor: default; font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }

.task-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  color: transparent;
  font-size: 12px;
  background: var(--paper-2);
}

.task.is-done .task-check { color: var(--cream); background: var(--jade); border-color: var(--jade); }

.task--exam { grid-template-columns: 44px minmax(0, 1fr); }
.task--exam .task-side { display: none; }

/* note */

.note-card {
  margin-top: 18px;
  padding: 18px 20px 16px;
}

.note-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.note-label strong { font-family: var(--serif); font-size: 16px; font-weight: 500; letter-spacing: .04em; }
.note-label span { color: var(--muted); font-size: 10px; }

.note-card textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  border: 1px solid var(--line);
  outline: none;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 253, 247, .72);
  font-size: 13px;
  line-height: 1.7;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.note-card textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169, 123, 53, .10); }
.note-card textarea::placeholder { color: #a89b87; }

/* rail */

.rail-card { padding: 17px 18px; box-shadow: var(--shadow-soft); }
.rail-label { margin: 0 0 10px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .16em; text-transform: uppercase; }

.next-exam { position: relative; overflow: hidden; }
.next-exam::after {
  content: "";
  position: absolute;
  right: -26px;
  top: -26px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(178, 70, 53, .18);
  border-radius: 50%;
}
.exam-code { color: var(--red); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.exam-name { margin: 4px 0 9px; font-family: var(--serif); font-size: 17px; line-height: 1.45; }
.countdown { display: flex; align-items: baseline; gap: 5px; color: var(--muted); font-size: 11px; }
.countdown strong { color: var(--ink); font-family: var(--serif); font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -.02em; }
.exam-date-line { margin: 9px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.7; }

.rail-title { margin: 0; font-family: var(--serif); font-size: 16px; line-height: 1.55; letter-spacing: .02em; }
.rail-text { margin: 8px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.75; }

.rail-list { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.rail-list li { display: flex; gap: 8px; color: var(--muted); font-size: 11.5px; line-height: 1.65; }
.rail-list li::before { content: "—"; color: var(--line-strong); flex: 0 0 auto; }

.rule-card { background: rgba(233, 222, 202, .38); }
.rule-card .rail-title { font-size: 15px; }

/* rest bar */

.rest-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 13px 14px 13px 18px;
  color: var(--cream);
  background: rgba(27, 36, 31, .96);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 16px 40px rgba(27, 36, 31, .18);
}

.rest-summary { font-size: 11px; color: rgba(246, 238, 223, .63); }
.rest-summary strong { color: var(--cream); font-family: var(--mono); font-size: 12px; font-weight: 500; }

.rest-btn {
  flex: 0 0 auto;
  padding: 10px 15px;
  border: 1px solid rgba(246, 238, 223, .22);
  background: rgba(246, 238, 223, .08);
  color: rgba(246, 238, 223, .65);
  font-size: 11px;
  letter-spacing: .04em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.rest-btn.is-ready {
  color: #fff9ec;
  border-color: var(--red);
  background: var(--red);
}
.rest-btn.is-ready:hover { background: var(--red-2); border-color: var(--red-2); }
.rest-btn:disabled { cursor: not-allowed; }

/* ---------- roadmap ---------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 8px 0 20px;
}

.section-head h2 { margin: 0; font-size: 30px; }
.section-head p { max-width: 590px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }

.callout {
  display: flex;
  gap: 12px;
  padding: 15px 17px;
  border: 1px solid #dfcba3;
  background: rgba(241, 230, 207, .62);
  color: #6f5429;
  font-size: 12px;
  line-height: 1.75;
}

.callout strong { color: #513b1a; }
.callout--red { border-color: #e1bfb4; background: rgba(242, 223, 216, .55); color: #75483d; }
.callout--red strong { color: #5f2c22; }

.roadmap {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 22px 0 28px;
  padding-left: 26px;
}

.roadmap::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--line-strong);
}

.phase {
  position: relative;
  padding: 17px 19px;
  border: 1px solid var(--line);
  background: rgba(251, 247, 237, .64);
}

.phase::before {
  content: "";
  position: absolute;
  left: -25px;
  top: 23px;
  width: 9px;
  height: 9px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
}

.phase.is-current { border-color: #d3b9a9; background: rgba(251, 247, 237, .95); box-shadow: var(--shadow-soft); }
.phase.is-current::before { border-color: var(--red); background: var(--red); box-shadow: 0 0 0 4px rgba(178, 70, 53, .12); }
.phase.is-done { opacity: .6; }
.phase.is-done::before { background: var(--jade); border-color: var(--jade); }

.phase-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.phase-name { margin: 0; font-family: var(--serif); font-size: 19px; letter-spacing: .04em; }
.phase-date { flex: 0 0 auto; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.phase-goal { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.phase-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 11px; }
.phase-week { margin: 11px 0 0; padding-top: 10px; border-top: 1px dashed var(--line); color: var(--ink-3); font-size: 11px; }
.phase-week span { color: var(--gold); font-family: var(--mono); font-size: 8px; letter-spacing: .12em; margin-right: 7px; }

.keydates { margin-top: 26px; }
.keydates h3 { margin-bottom: 12px; font-size: 22px; }
.keydate-list { border-top: 1px solid var(--line); }
.keydate {
  display: grid;
  grid-template-columns: 106px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 13px 4px;
  border-bottom: 1px solid var(--line);
}
.keydate-date { color: var(--muted); font-family: var(--mono); font-size: 9.5px; line-height: 1.7; letter-spacing: .04em; }
.keydate-title { margin: 0; font-family: var(--serif); font-size: 15px; letter-spacing: .02em; }
.keydate-detail { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.keydate-status { padding: 2px 7px; border: 1px solid var(--line); color: var(--muted); font-size: 8px; font-family: var(--mono); letter-spacing: .08em; white-space: nowrap; }
.keydate-status.is-active { border-color: #d7b5a8; color: var(--red-2); background: var(--red-soft); }
.keydate-status.is-done { border-color: #bcd5ca; color: var(--jade); background: var(--jade-soft); }

/* ---------- courses ---------- */

.course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.course-card { padding: 18px 19px 16px; position: relative; }
.course-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.course-code { color: var(--red); font-family: var(--mono); font-size: 9px; letter-spacing: .13em; }
.course-name { margin: 4px 0 0; font-family: var(--serif); font-size: 19px; line-height: 1.45; letter-spacing: .02em; }
.course-exam { flex: 0 0 auto; text-align: right; color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.7; }
.course-exam strong { display: block; color: var(--ink); font-family: var(--sans); font-size: 11px; font-weight: 500; }

.degree-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px;
  border: 1px solid #dfcba3;
  color: var(--gold);
  background: var(--gold-soft);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: .08em;
  vertical-align: 2px;
}

.course-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.course-target { margin: 11px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.65; }
.course-textbook { margin: 5px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.course-progress { margin-top: 14px; }
.course-progress-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; font-family: var(--mono); margin-bottom: 5px; }
.course-note { margin: 10px 0 0; padding-top: 9px; border-top: 1px dashed var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.65; }

details.unit-wrap { margin-top: 12px; }
details.unit-wrap summary {
  cursor: pointer;
  list-style: none;
  color: var(--ink-3);
  font-size: 11px;
  letter-spacing: .04em;
  user-select: none;
}
details.unit-wrap summary::-webkit-details-marker { display: none; }
details.unit-wrap summary::before { content: "+ "; color: var(--red); font-family: var(--mono); }
details.unit-wrap[open] summary::before { content: "− "; }

.unit-list { margin-top: 9px; border-top: 1px solid var(--line); }
.unit-row { display: grid; grid-template-columns: 13px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.unit-row:last-child { border-bottom: 0; }
.unit-dot { width: 6px; height: 6px; margin-top: 5px; border: 1px solid var(--line-strong); border-radius: 50%; }
.unit-row.is-done { color: var(--ink-3); }
.unit-row.is-done .unit-dot { background: var(--jade); border-color: var(--jade); }

/* ---------- IELTS ---------- */

.ielts-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 22px;
  align-items: stretch;
}

.ielts-target {
  position: relative;
  overflow: hidden;
  padding: 28px 30px;
  color: var(--cream);
  background: linear-gradient(135deg, #2b3d33 0%, #1a241e 100%);
  box-shadow: var(--shadow);
}
.ielts-target::after {
  content: "7.0";
  position: absolute;
  right: -8px;
  bottom: -30px;
  color: rgba(246, 238, 223, .06);
  font-family: var(--serif);
  font-size: 150px;
  line-height: 1;
}
.ielts-target h2 { position: relative; z-index: 1; margin: 5px 0 8px; font-size: 30px; color: var(--cream); }
.ielts-target p { position: relative; z-index: 1; margin: 0; max-width: 540px; color: rgba(246, 238, 223, .62); font-size: 12px; line-height: 1.8; }

.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; position: relative; z-index: 1; margin-top: 20px; }
.band-box { padding: 10px 9px; border: 1px solid rgba(246, 238, 223, .14); background: rgba(246, 238, 223, .045); }
.band-box span { display: block; color: rgba(246, 238, 223, .48); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.band-box strong { display: block; margin-top: 3px; color: #f3e4c8; font-family: var(--serif); font-size: 24px; font-weight: 500; line-height: 1.1; }

.mock-card { padding: 19px 20px; }
.mock-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.mock-title h3 { margin: 0; font-size: 20px; }
.mock-latest { display: flex; align-items: baseline; gap: 7px; color: var(--muted); font-size: 10px; }
.mock-latest strong { color: var(--ink); font-family: var(--serif); font-size: 27px; font-weight: 500; }

.mock-form { display: grid; grid-template-columns: 1.5fr repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }
.field input, .field select {
  width: 100%;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--line);
  outline: none;
  background: rgba(255, 253, 247, .7);
  font-size: 12px;
}
.field input:focus, .field select:focus { border-color: var(--gold); }
.mock-form .field--wide { grid-column: span 3; }
.mock-form button { align-self: end; white-space: nowrap; }

.mock-table { width: 100%; margin-top: 15px; border-collapse: collapse; font-size: 11px; }
.mock-table th { padding: 7px 5px; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-family: var(--mono); font-size: 8px; text-align: left; letter-spacing: .08em; font-weight: 500; }
.mock-table td { padding: 8px 5px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.mock-table td strong { color: var(--ink); font-family: var(--serif); font-size: 15px; font-weight: 500; }

.skill-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.skill-card { padding: 15px 15px 14px; }
.skill-card .eyebrow { color: var(--jade); }
.skill-card h3 { margin: 6px 0 6px; font-family: var(--serif); font-size: 17px; }
.skill-card p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.7; }

.next-ielts-list { margin-top: 8px; border-top: 1px solid var(--line); }
.next-ielts-item { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.next-ielts-item time { flex: 0 0 57px; color: var(--muted); font-family: var(--mono); font-size: 8px; line-height: 1.7; }
.next-ielts-item p { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 1.6; }

/* ---------- records ---------- */

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.stat { padding: 16px 17px; }
.stat-label { margin: 0; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 6px; font-family: var(--serif); font-size: 31px; font-weight: 500; line-height: 1.1; }
.stat span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.recent-list { border-top: 1px solid var(--line); margin-top: 10px; }
.recent-row { display: grid; grid-template-columns: 98px minmax(0, 1fr) 90px; gap: 14px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--line); }
.recent-date { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.recent-title { margin: 0; color: var(--ink-3); font-size: 11px; line-height: 1.5; }
.recent-bar { display: flex; gap: 3px; margin-top: 5px; }
.recent-bar span { width: 10px; height: 4px; background: var(--paper-3); }
.recent-bar span.is-on { background: var(--jade); }
.recent-meta { text-align: right; color: var(--muted); font-family: var(--mono); font-size: 9px; }

.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }

/* ---------- buttons ---------- */

.primary-btn, .secondary-btn, .text-btn {
  border: 1px solid transparent;
  padding: 9px 14px;
  font-size: 11.5px;
  letter-spacing: .03em;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.primary-btn { color: #fff9ed; background: var(--red); border-color: var(--red); }
.primary-btn:hover { background: var(--red-2); border-color: var(--red-2); }
.primary-btn:disabled { cursor: not-allowed; opacity: .38; }
.secondary-btn { color: var(--ink-2); background: transparent; border-color: var(--line-strong); }
.secondary-btn:hover { border-color: var(--ink-2); background: rgba(255, 253, 247, .7); }
.secondary-btn:disabled { cursor: not-allowed; opacity: .38; }
.text-btn { padding: 4px 0; color: var(--red-2); background: transparent; border: 0; font-size: 10.5px; }
.text-btn:hover { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.wide { width: 100%; }
.icon-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; }
.icon-btn:hover { color: var(--ink); }

.fine { margin: 10px 0 0; color: var(--muted); font-size: 9.5px; line-height: 1.7; }
.empty { padding: 26px 18px; color: var(--muted); font-size: 11.5px; text-align: center; border: 1px dashed var(--line); }

/* ---------- practice ---------- */

.chip--practice { color: #46635a; border-color: #b9d2c6; background: #e3eee8; }

.practice-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 26px;
  padding: 28px 30px;
  color: var(--cream);
  background:
    radial-gradient(500px 260px at 90% 0%, rgba(169, 123, 53, .18), transparent 70%),
    linear-gradient(135deg, #263a30 0%, #172019 100%);
  box-shadow: var(--shadow);
}
.practice-hero h2 { margin: 5px 0 7px; color: var(--cream); font-size: clamp(26px, 3vw, 36px); }
.practice-hero p { max-width: 700px; margin: 0; color: rgba(246, 238, 223, .62); font-size: 12px; line-height: 1.8; }
.practice-hero .eyebrow { color: #e5c38e; }
.practice-hero-stat { flex: 0 0 auto; text-align: right; padding-bottom: 3px; }
.practice-hero-stat strong { display: block; color: #f4d8a9; font-family: var(--serif); font-size: 46px; font-weight: 500; line-height: 1; }
.practice-hero-stat span { display: block; margin-top: 6px; color: rgba(246, 238, 223, .52); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; }

.practice-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 14px; margin-top: 18px; }
.practice-card { padding: 18px 19px; }
.practice-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.practice-card h3 { margin: 4px 0 0; font-family: var(--serif); font-size: 22px; font-weight: 500; letter-spacing: .02em; }
.practice-card-sub { margin: 9px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.75; }
.practice-card-stats { display: flex; gap: 16px; margin: 16px 0; color: var(--muted); font-size: 10px; font-family: var(--mono); }
.practice-card-stats span strong { color: var(--ink); }

.weak-list { margin-top: 12px; }
.weak-row { display: grid; grid-template-columns: minmax(0, 1fr) 80px 34px; gap: 9px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.weak-row:last-child { border-bottom: 0; }
.weak-label { min-width: 0; }
.weak-label strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-3); font-family: var(--serif); font-size: 12px; font-weight: 500; }
.weak-label span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-family: var(--mono); }
.weak-bar { height: 4px; background: var(--paper-3); overflow: hidden; }
.weak-bar span { display: block; height: 100%; background: var(--red); }
.weak-row em { color: var(--muted); font-family: var(--mono); font-size: 9px; font-style: normal; text-align: right; }

.mode-section { margin-top: 25px; }
.mode-section .section-head { margin-bottom: 12px; }
.mode-section .section-head h3 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.mode-section .section-head p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.mode-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.mode-btn { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 12px 13px; border: 1px solid var(--line); background: rgba(251, 247, 237, .55); text-align: left; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.mode-btn:hover { background: var(--paper-2); border-color: var(--gold); transform: translateY(-1px); }
.mode-btn .mode-code { color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.mode-btn strong { color: var(--ink-3); font-family: var(--serif); font-size: 15px; font-weight: 500; }
.mode-btn small { color: var(--muted); font-size: 9.5px; }
.mode-btn--accent { border-color: #d7b5a8; background: var(--red-soft); }
.mode-btn--accent .mode-code { color: var(--red-2); }

.practice-wrong { margin-top: 18px; padding: 18px 20px; }
.wrong-list { margin-top: 12px; border-top: 1px solid var(--line); }
.wrong-row { display: flex; flex-direction: column; gap: 2px; padding: 9px 0; border-bottom: 1px dashed var(--line); }
.wrong-row span { color: var(--ink-3); font-family: var(--serif); font-size: 12px; line-height: 1.6; }
.wrong-row small { color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .03em; }
.practice-recent { margin-top: 18px; padding: 18px 20px; }
.session-table { width: 100%; margin-top: 13px; border-collapse: collapse; font-size: 10.5px; }
.session-table th { padding: 7px 5px; border-bottom: 1px solid var(--line-strong); color: var(--muted); font-family: var(--mono); font-size: 8px; text-align: left; letter-spacing: .08em; font-weight: 500; }
.session-table td { padding: 8px 5px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.session-table td:first-child { color: var(--muted); font-family: var(--mono); font-size: 9px; white-space: nowrap; }

.practice-modal { width: min(820px, calc(100vw - 30px)); }
.practice-topline { display: flex; justify-content: space-between; gap: 16px; margin-top: 18px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }
.practice-progress { margin-top: 7px; height: 5px; }
.practice-source { margin-top: 22px; color: var(--red-2); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; }
.practice-question { margin: 8px 0 18px; font-family: var(--serif); font-size: 25px; line-height: 1.5; letter-spacing: .02em; }
.practice-options { display: flex; flex-direction: column; gap: 8px; }
.practice-option { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 11px 13px; border: 1px solid var(--line); background: rgba(255, 253, 247, .62); color: var(--ink-3); text-align: left; font-size: 12.5px; line-height: 1.6; transition: background .16s ease, border-color .16s ease; }
.practice-option:hover:not(.is-locked) { border-color: var(--gold); background: var(--paper-2); }
.practice-option.is-locked { cursor: default; }
.option-letter { flex: 0 0 auto; width: 21px; height: 21px; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); font-family: var(--mono); font-size: 9px; }
.practice-option.is-correct { border-color: #8eb7a4; background: #e5f0e9; color: #2f5b49; }
.practice-option.is-correct .option-letter { border-color: #8eb7a4; background: var(--jade); color: #fff; }
.practice-option.is-wrong { border-color: #dfb2a7; background: #f6e5df; color: #793f33; }
.practice-option.is-wrong .option-letter { border-color: #dfb2a7; background: var(--red); color: #fff; }
.practice-feedback { margin-top: 15px; padding: 12px 14px; border-left: 3px solid var(--jade); background: rgba(223, 234, 227, .5); }
.practice-feedback.is-wrong { border-left-color: var(--red); background: rgba(242, 223, 216, .5); }
.practice-feedback strong { font-family: var(--serif); font-size: 14px; font-weight: 500; }
.practice-feedback p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.practice-passage, .practice-transcript { margin: 10px 0 16px; padding: 11px 13px; border: 1px solid var(--line); background: rgba(233, 222, 202, .25); }
.practice-passage summary, .practice-transcript summary { cursor: pointer; color: var(--gold); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.practice-passage p, .practice-transcript p { margin: 9px 0 0; color: var(--ink-3); font-family: var(--serif); font-size: 12px; line-height: 1.85; }
.practice-listening { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.practice-listening span { color: var(--muted); font-size: 10px; }
.practice-summary { text-align: center; padding: 6px 0 0; }
.practice-summary h2 { margin: 8px 0 6px; font-size: 29px; }
.practice-summary > p { max-width: 590px; margin: 0 auto; color: var(--muted); font-size: 12px; line-height: 1.75; }
.practice-score strong { display: block; color: var(--red-2); font-family: var(--serif); font-size: 56px; font-weight: 500; line-height: 1; }
.practice-score span { display: block; margin-top: 4px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .1em; }
.practice-summary .weak-list { max-width: 560px; margin: 18px auto 0; text-align: left; }
.practice-summary .modal-actions { justify-content: center; }

/* ---------- speaking / writing ---------- */

.speaking-modal { width: min(760px, calc(100vw - 30px)); }
.speaking-part, .writing-task { margin-top: 18px; color: var(--gold); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.speaking-prompt, .writing-prompt { margin: 8px 0 10px; font-family: var(--serif); font-size: 25px; line-height: 1.5; }
.speaking-follow { margin: 0 0 14px; padding-left: 18px; color: var(--muted); font-size: 11px; line-height: 1.8; }
.speaking-clock-wrap { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 14px; }
.speaking-clock { font-family: var(--mono); font-size: 54px; font-weight: 500; line-height: 1; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.speaking-clock-wrap span { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.speaking-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.speaking-audio { width: 100%; margin: 10px 0 14px; }
.rating-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rating-grid label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .06em; }
.rating-grid select { width: 100%; padding: 7px 6px; border: 1px solid var(--line); background: var(--paper-2); font-size: 12px; }
.speaking-note, .writing-text { width: 100%; border: 1px solid var(--line); outline: none; padding: 10px 12px; background: rgba(255, 253, 247, .72); color: var(--ink); font-size: 12.5px; line-height: 1.75; resize: vertical; }
.speaking-note { min-height: 64px; margin-top: 10px; }
.speaking-note:focus, .writing-text:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169, 123, 53, .10); }

.writing-modal { width: min(860px, calc(100vw - 30px)); }
.writing-data { width: 100%; margin: 10px 0 4px; border-collapse: collapse; font-size: 10.5px; }
.writing-data th { padding: 7px 8px; border: 1px solid var(--line); background: rgba(233, 222, 202, .4); color: var(--muted); font-family: var(--mono); font-size: 8px; font-weight: 500; text-align: left; letter-spacing: .04em; }
.writing-data td { padding: 7px 8px; border: 1px solid var(--line); color: var(--ink-3); }
.writing-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; margin: 12px 0; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.writing-meta strong { margin-left: auto; color: var(--red-2); font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.writing-text { min-height: 300px; font-family: var(--sans); }
.writing-footer { display: flex; align-items: center; gap: 9px; margin-top: 9px; }
.writing-footer > span { margin-right: auto; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.writing-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 16px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.writing-checks label { display: flex; align-items: flex-start; gap: 7px; color: var(--muted); font-size: 10.5px; line-height: 1.5; }
.writing-checks input { margin-top: 2px; accent-color: var(--jade); }

@media (max-width: 620px) {
  .speaking-prompt, .writing-prompt { font-size: 21px; }
  .speaking-clock { font-size: 44px; }
  .rating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .writing-checks { grid-template-columns: 1fr; }
  .writing-text { min-height: 240px; }
}

/* ---------- dialogs ---------- */

.modal {
  width: min(560px, calc(100vw - 30px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: auto;
  padding: 24px 25px 22px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink);
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(233, 222, 202, .45), transparent 65%),
    var(--paper-2);
  box-shadow: 0 30px 90px rgba(20, 24, 21, .33);
}
.modal::backdrop { background: rgba(22, 29, 24, .58); backdrop-filter: blur(3px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal h2 { margin: 7px 0 0; font-size: 27px; line-height: 1.3; }
.modal-sub { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.75; }
.modal-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 19px; }

.timer-modal { width: min(510px, calc(100vw - 30px)); }
.timer-face { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 12px; }
.timer-clock { font-family: var(--mono); font-size: clamp(47px, 9vw, 70px); line-height: 1; letter-spacing: -.05em; color: var(--ink); font-variant-numeric: tabular-nums; }
.timer-clock.is-running { color: var(--red-2); }
.timer-required { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.timer-bar { height: 5px; }
.timer-actions { margin-top: 20px; }
.timer-actions .primary-btn { min-width: 108px; }

.remaining-list { margin-top: 14px; border-top: 1px solid var(--line); }
.remaining-item { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; line-height: 1.6; }
.remaining-item span { flex: 0 0 auto; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.sleep-btn { margin-left: auto; color: var(--muted); }
.sleep-btn:hover { color: var(--red-2); }

.rest-modal { text-align: center; width: min(520px, calc(100vw - 30px)); padding-top: 30px; }
.rest-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 12px; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--gold); font-family: var(--serif); font-size: 30px; }
.rest-modal h2 { font-size: 32px; }
.rest-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 14px; }
.rest-stat { padding: 10px 7px; border: 1px solid var(--line); background: rgba(255, 253, 247, .55); }
.rest-stat strong { display: block; font-family: var(--serif); font-size: 23px; font-weight: 500; line-height: 1.2; }
.rest-stat span { display: block; margin-top: 2px; color: var(--muted); font-size: 8px; font-family: var(--mono); letter-spacing: .06em; }
.rest-tomorrow { margin-top: 14px; padding: 12px 14px; text-align: left; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; line-height: 1.7; }
.rest-tomorrow strong { color: var(--ink-3); font-family: var(--serif); font-size: 13px; font-weight: 500; }

.steps { margin: 16px 0 0; padding-left: 19px; color: var(--ink-3); font-size: 11.5px; line-height: 1.9; }
.steps li { padding-left: 2px; }
.path-box { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 10px 11px; border: 1px solid var(--line); background: rgba(233, 222, 202, .3); }
.sync-key-input { width: 100%; min-width: 0; padding: 7px 8px; border: 1px solid var(--line); outline: none; background: rgba(255, 253, 247, .75); font-family: var(--mono); font-size: 10px; letter-spacing: .04em; }
.sync-key-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(169, 123, 53, .10); }
.path-box code { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: var(--mono); font-size: 9px; }
.path-box .text-btn { flex: 0 0 auto; }

/* ---------- toast / floating timer ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 12000;
  max-width: min(480px, calc(100vw - 30px));
  padding: 10px 15px;
  color: var(--cream);
  background: rgba(27, 36, 31, .96);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 12px 40px rgba(20, 24, 21, .24);
  font-size: 11.5px;
  line-height: 1.55;
  opacity: 0;
  transform: translate(-50%, 10px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.floating-timer {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  box-shadow: 0 14px 40px rgba(20, 24, 21, .22);
}
.floating-timer button {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 360px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .09);
  color: var(--cream);
  background: rgba(27, 36, 31, .96);
  font-size: 10px;
}
.floating-timer strong { font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: .03em; color: #f4d8a9; }
.floating-task { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: rgba(246, 238, 223, .55); }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: #d9a25e; animation: pulse 1.8s ease infinite; }
.pulse-dot.is-paused { animation: none; background: #8b938b; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(217, 162, 94, .3); } 50% { box-shadow: 0 0 0 5px rgba(217, 162, 94, 0); } }

/* ---------- mobile nav ---------- */

.mobile-nav { display: none; }

/* ---------- responsive ---------- */

@media (max-width: 1120px) {
  .main { padding-left: 30px; padding-right: 30px; }
  .today-grid { grid-template-columns: minmax(0, 1.5fr) minmax(250px, .72fr); }
  .skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ielts-hero { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 0 18px 108px; }
  .topbar { min-height: 88px; }
  .top-title { font-size: 25px; }
  .topbar-actions .ghost-btn:first-child { display: none; }
  .view { padding-top: 22px; }
  .today-grid { grid-template-columns: 1fr; }
  .today-main { order: 0; }
  .today-rail { order: 1; }
  .hero { padding: 27px 24px 25px; }
  .course-grid { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice-hero { display: block; }
  .practice-hero-stat { text-align: left; margin-top: 18px; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mobile-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 70;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 7px 5px calc(7px + env(safe-area-inset-bottom));
    background: rgba(23, 32, 25, .97);
    border-top: 1px solid rgba(255, 255, 255, .08);
    backdrop-filter: blur(14px);
  }
  .mobile-nav-item { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border: 0; background: transparent; color: rgba(246, 238, 223, .52); }
  .mobile-nav-item span { font-family: var(--serif); font-size: 13px; letter-spacing: .05em; }
  .mobile-nav-item small { font-family: var(--mono); font-size: 7px; letter-spacing: .08em; opacity: .55; }
  .mobile-nav-item.is-active { color: #f5dfbd; }
  .floating-timer { right: 14px; bottom: 76px; }
  .toast { bottom: 84px; }
  .rest-bar { bottom: 74px; }
  .modal { margin-bottom: 80px; }
}

@media (max-width: 620px) {
  body { font-size: 14px; }
  .main { padding-left: 13px; padding-right: 13px; }
  .topbar { min-height: 78px; gap: 10px; }
  .top-title { font-size: 22px; }
  .top-date { font-size: 8px; }
  .ghost-btn { padding: 7px 9px; font-size: 10px; }
  .hero { padding: 24px 20px 22px; }
  .hero h1 { font-size: 28px; }
  .hero-sub { font-size: 11.5px; }
  .task { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; padding: 15px 14px; }
  .task-num { display: none; }
  .task-title { font-size: 15.5px; }
  .task-side { min-width: 0; flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; justify-content: space-between; }
  .task-action { padding: 6px 9px; }
  .task--exam { grid-template-columns: 1fr; }
  .progress-head { padding: 15px 14px 12px; }
  .progress-bar-wrap { padding: 0 14px 14px; }
  .card-head { padding-left: 14px; padding-right: 14px; }
  .note-card { padding: 15px 14px; }
  .rail-card { padding: 15px 14px; }
  .section-head { display: block; margin-bottom: 15px; }
  .section-head h2 { font-size: 26px; }
  .phase { padding: 14px 14px; }
  .phase-date { font-size: 8px; }
  .keydate { grid-template-columns: 84px minmax(0, 1fr); gap: 9px; }
  .keydate-status { grid-column: 2; justify-self: start; }
  .course-card { padding: 15px 14px; }
  .ielts-target { padding: 23px 20px; }
  .ielts-target h2 { font-size: 27px; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mock-form .field--wide { grid-column: span 2; }
  .mock-form button { grid-column: span 2; }
  .skill-grid { grid-template-columns: 1fr; }
  .practice-hero { padding: 22px 19px; }
  .practice-hero h2 { font-size: 27px; }
  .practice-hero-stat strong { font-size: 38px; }
  .practice-question { font-size: 21px; }
  .practice-modal { width: calc(100vw - 18px); }
  .session-table th:nth-child(1), .session-table td:nth-child(1) { display: none; }
  .stats-grid { gap: 8px; }
  .stat { padding: 13px 12px; }
  .stat strong { font-size: 26px; }
  .recent-row { grid-template-columns: 78px minmax(0, 1fr); gap: 9px; }
  .recent-meta { display: none; }
  .rest-bar { flex-direction: column; align-items: stretch; gap: 8px; padding: 12px 13px; }
  .rest-summary { font-size: 10px; line-height: 1.7; }
  .rest-btn { width: 100%; padding: 9px 10px; font-size: 10px; white-space: nowrap; }
  .floating-timer button { max-width: calc(100vw - 28px); }
  .floating-task { max-width: 100px; }
  .rest-stats { gap: 5px; }
  .rest-modal h2 { font-size: 28px; }
}

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