:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-soft: #f8fafb;
  --text: #202733;
  --muted: #65717f;
  --line: #dfe6ee;
  --line-strong: #cbd6e2;
  --dark: #19231f;
  --dark-2: #223028;
  --accent: #24706f;
  --accent-soft: #e7f3f2;
  --blue: #4d79a6;
  --green: #2f7d62;
  --red: #bd5264;
  --yellow: #d79b2d;
  --purple: #7a6aa8;
  --shadow: 0 10px 24px rgba(31, 40, 51, .052);
  --shadow-soft: 0 4px 12px rgba(31, 40, 51, .04);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
}

button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: rgba(255, 255, 255, .96);
  color: var(--text);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-right: 1px solid rgba(223, 230, 238, .75);
  box-shadow: 12px 0 28px rgba(31, 40, 51, .035);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 12px;
}

.brand strong {
  display: block;
  line-height: 1.25;
  color: #17212b;
}

.brand small,
.profile span {
  display: block;
  color: #8b96a3;
  margin-top: 4px;
}

.mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffc44c, #eda826);
  color: #171914;
  font-weight: 900;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(215, 155, 45, .2);
}

.nav {
  display: grid;
  gap: 11px;
}

.nav-group {
  display: grid;
  gap: 6px;
}

.nav-group + .nav-group {
  padding-top: 14px;
  border-top: 1px solid #eef2f6;
}

.nav-group-title {
  padding: 0 0 3px;
  color: #b8c1cb;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.nav button,
.tabbar button {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
}

.nav button {
  color: #718092;
  min-height: 40px;
  padding: 10px 14px;
  position: relative;
  display: flex;
  align-items: center;
  font-weight: 700;
}

.nav button:hover {
  background: #f8fafc;
  color: #263241;
}

.nav button.active {
  background: #fff8eb;
  color: #d99018;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(220, 158, 44, .075);
}

.nav-link-inner {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #8a97a6;
  transition: color .15s ease;
}

.nav-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav button:hover .nav-icon {
  color: #596879;
}

.nav button.active .nav-icon {
  color: #eba72d;
}

.nav-children {
  display: grid;
  gap: 4px;
  margin: 1px 0 7px 14px;
  padding-left: 11px;
  border-left: 1px solid #edf1f5;
}

.nav-children button {
  padding: 9px 10px;
  font-size: 14px;
  color: #788697;
}

.nav-children button.active {
  background: #fff8eb;
  color: #d99018;
  font-weight: 800;
}

.profile {
  margin-top: auto;
  padding: 14px;
  border: 1px solid #edf1f5;
  background: #fbfcfd;
  border-radius: 8px;
}

.profile strong {
  color: #263241;
}

.main {
  min-width: 0;
  padding: 22px 24px;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(260px, auto) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.icon {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
}

.menu-toggle {
  background: linear-gradient(145deg, #17343a, #10252a);
  color: #fff;
  border: 0;
  box-shadow: 0 10px 20px rgba(11, 32, 37, .18);
  display: inline-grid;
  place-content: center;
  gap: 4px;
}

.menu-toggle span {
  width: 15px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: .86;
}

.header-quote {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(560px, 100%);
  color: #28342e;
  font-size: 14px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.header-quote[hidden] {
  display: none;
}

.header-quote strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-mark {
  color: #d99a26;
  font-size: 22px;
  line-height: 1;
  font-family: Georgia, serif;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 10px;
}

.header-action,
.header-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(213, 223, 232, .78);
  box-shadow: 0 10px 20px rgba(31, 40, 51, .055);
}

.header-action {
  cursor: pointer;
  color: #1a2a30;
  padding: 0;
}

.header-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.header-avatar {
  background: linear-gradient(145deg, #f8efe3, #f9fbfd);
  color: #153334;
  overflow: hidden;
}

.header-avatar svg {
  width: 27px;
  height: 27px;
  fill: #17343a;
  stroke: none;
  opacity: .86;
}

.primary {
  border: 1px solid var(--dark);
  background: var(--dark);
  color: #fff;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
}

.primary:hover:not(:disabled) {
  background: var(--dark-2);
}

.secondary {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.secondary:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--panel-soft);
}

.danger {
  border: 1px solid #edcbd1;
  background: #fff7f8;
  color: var(--red);
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.danger:hover:not(:disabled) {
  background: #fff0f2;
}

.full {
  width: 100%;
  margin-top: 12px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid.kpis {
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 16px;
}

.card,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
}

.kpi {
  min-height: 88px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, #fbfcfb 100%);
  border-color: rgba(213, 223, 232, .86);
  box-shadow: 0 8px 18px rgba(31, 40, 51, .045);
}

.kpi::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
}

.kpi .value {
  font-size: 28px;
  font-weight: 900;
  line-height: 1.05;
}

.kpi .label {
  color: var(--muted);
  margin-top: 6px;
  font-size: 13px;
}

.kpi-button {
  width: 100%;
  text-align: center;
  color: var(--text);
  cursor: pointer;
}

.kpi-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 6px;
}

.home-kpi {
  min-height: 106px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  justify-items: stretch;
  gap: 18px;
  padding: 20px 20px 20px 22px;
  text-align: left;
  background: rgba(255, 255, 255, .9);
  border-color: rgba(216, 224, 232, .72);
  box-shadow: 0 14px 30px rgba(31, 40, 51, .07);
}

.home-kpi::before {
  content: none;
}

.home-kpi-countdown,
.home-kpi-study {
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(255, 252, 245, .94));
}

.home-kpi-score {
  grid-template-columns: 58px minmax(170px, 1fr) 128px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(246, 251, 250, .94));
}

.home-kpi-study {
  grid-template-columns: 58px minmax(0, 1fr) 58px;
}

.home-kpi-icon {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}

.home-kpi-icon-countdown,
.home-kpi-icon-study {
  background: #fff4da;
}

.home-kpi-icon-countdown {
  width: 58px;
  height: 58px;
}

.home-kpi-icon-score {
  background: #eaf5f2;
}

.home-kpi-icon svg {
  width: 50px;
  height: 50px;
  overflow: visible;
}

.home-kpi-icon-countdown svg {
  width: 50px;
  height: 50px;
}

.home-kpi-icon .icon-bg {
  fill: transparent;
  stroke: rgba(230, 171, 50, .24);
  stroke-width: 1.2;
}

.home-kpi-icon-score .icon-bg {
  stroke: rgba(36, 112, 111, .18);
}

.home-kpi-icon-countdown .icon-ring,
.home-kpi-icon-study .icon-ring {
  fill: none;
  stroke: #e7a51f;
  stroke-width: 3.2;
}

.home-kpi-icon .icon-line {
  fill: none;
  stroke: #e7a51f;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-kpi-icon-score .icon-line {
  stroke: #fff;
}

.home-kpi-icon .icon-fill {
  fill: #e7a51f;
  stroke: none;
}

.home-kpi-icon-score .icon-fill {
  fill: #24706f;
}

.home-kpi-icon-score .icon-cut {
  fill: none;
  stroke: #d7eeea;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-kpi-copy {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.home-kpi-label {
  color: #6b7582;
  font-size: 13px;
  font-weight: 700;
}

.home-kpi-value {
  color: #111a24;
  font-size: 30px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  white-space: nowrap;
}

.home-kpi-value em {
  font-style: normal;
  font-size: 16px;
  margin-left: 6px;
  font-weight: 900;
}

.home-kpi-study .home-kpi-value {
  font-size: 28px;
}

.home-kpi-note {
  color: #6b7582;
  font-size: 12px;
  font-weight: 600;
}

.home-kpi-chevron {
  color: #b8c2cd;
  font-size: 30px;
  line-height: 1;
  padding-left: 4px;
}

.home-kpi-chart {
  justify-self: end;
  align-self: center;
}

.sparkline {
  width: 122px;
  height: 54px;
}

.sparkline svg {
  width: 100%;
  height: 100%;
}

.sparkline path {
  fill: none;
  stroke: #24706f;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 6px 8px rgba(36, 112, 111, .14));
}

.mini-bars {
  height: 56px;
  min-width: 58px;
  display: inline-flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 7px;
}

.mini-bars i {
  width: 7px;
  border-radius: 999px 999px 2px 2px;
  background: linear-gradient(180deg, #f7d59b, #e9aa37);
  opacity: .78;
}

.mock-kpi .home-kpi-value,
.mock-kpi .home-kpi-label {
  transition: opacity .26s ease, transform .26s ease;
}

.mock-kpi.is-switching .home-kpi-value,
.mock-kpi.is-switching .home-kpi-label {
  opacity: 0;
  transform: translateY(6px);
}

.mock-kpi {
  background: linear-gradient(135deg, #fff, #f4faf9);
}

.kpi-with-logo,
.study-kpi {
  padding-left: 76px;
  padding-right: 28px;
}

.kpi-svg-logo {
  position: absolute;
  left: 28px;
  top: 50%;
  width: 36px;
  height: 36px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
}

.kpi-svg-logo svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: #ffc400;
  stroke-width: 4.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 4px 8px rgba(245, 181, 0, .18));
}

.kpi-svg-logo .kpi-ring,
.kpi-svg-logo .kpi-paper {
  fill: #ffc400;
  stroke: none;
}

.kpi-svg-logo .kpi-line {
  fill: none;
  stroke: #fff;
}

.kpi-svg-logo .kpi-accent-line {
  fill: none;
  stroke: #ffc400;
}

.kpi-svg-logo .kpi-paper + .kpi-line,
.kpi-svg-logo .kpi-paper ~ .kpi-line {
  stroke: #fff;
}

.sun-logo .sun-core {
  fill: #ffc400;
  stroke: none;
}

.sun-logo .sun-rays {
  fill: none;
}

.mock-kpi .value,
.mock-kpi .label {
  transition: opacity .22s ease, transform .22s ease;
}

.mock-kpi.is-switching .value,
.mock-kpi.is-switching .label {
  opacity: 0;
  transform: translateY(6px);
}

.daily-quote {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  padding: 4px 12px 8px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.daily-quote p {
  margin: 0;
  color: #263129;
  font-weight: 700;
  line-height: 1.55;
  font-size: 14px;
  text-align: center;
}

.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, .95fr);
  gap: 14px;
}

.home-layout .card {
  min-width: 0;
}

.home-side {
  align-content: start;
}

.home-card {
  padding: 14px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
  border-color: rgba(213, 223, 232, .86);
  box-shadow: 0 8px 18px rgba(31, 40, 51, .045);
}

.home-card .section-head {
  margin-bottom: 10px;
}

.section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-card .section-head h2 {
  font-size: 21px;
  letter-spacing: 0;
}

.home-layout .day {
  min-height: 86px;
}

.home-layout .event {
  font-size: 12px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.space-top {
  margin-top: 14px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-head h2 {
  margin: 0;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.quick-card .section-head {
  margin: 0;
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.quick-action {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-align: left;
  padding: 7px 10px;
}

.quick-action span {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(215, 155, 45, .14);
  color: #8d6217;
  font-weight: 900;
}

.quick-action b {
  font-size: 14px;
  line-height: 1.2;
}

.quick-action.primary span {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.pomodoro {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, #eef7f6, #f8fbfb);
  border: 1px solid #d5e9e7;
  border-radius: 8px;
}

.pomodoro strong {
  display: block;
  margin-top: 4px;
  font-size: 27px;
  line-height: 1;
}

.pomodoro p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.pomodoro-actions {
  display: flex;
  gap: 8px;
}

.tiny {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.task {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(223, 230, 238, .78);
}

.task:last-child {
  border-bottom: 0;
}

.task-done {
  opacity: .72;
}

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

.task-main b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-meta,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.timer-line {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dot {
  width: 4px;
  height: 42px;
  border-radius: 99px;
  background: var(--yellow);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eef4f7;
  color: #35566a;
  font-size: 12px;
  border: 1px solid #dce9ef;
}

.today-plan-card {
  padding: 16px;
}

.today-plan-card .section-head {
  align-items: flex-start;
}

.today-plan-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.today-plan-summary {
  display: grid;
  grid-template-columns: minmax(115px, auto) minmax(115px, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  row-gap: 9px;
  padding: 13px 14px;
  margin: 10px 0 14px;
  border: 1px solid rgba(223, 230, 238, .88);
  border-radius: 8px;
  background: rgba(255, 255, 255, .7);
}

.today-plan-summary div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: #7a8592;
  font-size: 12px;
  font-weight: 800;
}

.today-plan-summary b {
  color: #23303d;
  font-size: 13px;
}

.today-plan-summary > strong {
  color: #2f8a68;
  font-size: 13px;
}

.today-plan-progress {
  grid-column: 2 / -1;
  height: 4px;
  border-radius: 999px;
  background: #e7ecef;
  overflow: hidden;
}

.today-plan-progress em {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4fb08a, #12786f);
  transition: width .25s ease;
}

.today-timeline {
  position: relative;
  display: grid;
}

.today-timeline::before {
  content: "";
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 5px;
  width: 1px;
  background: #dce4ec;
}

.today-task {
  position: relative;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 58px auto;
  align-items: center;
  column-gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(223, 230, 238, .75);
}

.today-task:last-child {
  border-bottom: 0;
}

.today-task-node {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--task-color, #e4b53d);
  box-shadow: 0 0 0 4px #fff;
}

.today-task-done .today-task-node {
  background: #bac5d1;
}

.today-task-running .today-task-node {
  background: #51b96f;
}

.today-task-doing .today-task-node {
  background: #4b9ce8;
}

.today-task-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.today-task-title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}

.today-task-title-row strong {
  color: #1b2632;
  font-size: 15px;
  line-height: 1.35;
}

.today-task p,
.today-task small {
  margin: 0;
  color: #7a8592;
  font-size: 12px;
  line-height: 1.35;
}

.today-task p {
  word-break: keep-all;
}

.today-task small b {
  color: #536273;
}

.task-progress-wrap {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 54px;
}

.task-progress-wrap small {
  color: #8b98a6;
  font-size: 11px;
  line-height: 1;
}

.task-progress {
  --ring-color: #b8c4cf;
  --task-progress: 0%;
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--ring-color) 0 var(--task-progress), #e8eef3 var(--task-progress) 100%);
  box-shadow: inset 0 0 0 1px rgba(211, 221, 230, .75), 0 8px 16px rgba(31, 40, 51, .055);
  transition: background .25s ease;
}

.task-progress::before {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: inherit;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(228, 234, 240, .85);
}

.task-progress b {
  position: relative;
  z-index: 1;
  color: #556372;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
}

.task-progress-running {
  --ring-color: #1c8a78;
}

.task-progress-doing {
  --ring-color: #4b9ce8;
}

.task-progress-done {
  --ring-color: #8fa0ae;
}

.task-progress-running b {
  color: #137668;
}

.task-progress-done b {
  color: #6d7d8c;
}

.soft-pill {
  background: #f3f7fa;
  color: #627282;
  border-color: #e6edf2;
}

.status-pill {
  background: #edf7f4;
  color: #28765c;
  border-color: #d8eee7;
}

.today-task-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.today-task-actions .secondary {
  min-width: 88px;
  padding: 8px 11px;
}

.active-timer {
  border-color: #9cc9bd;
  color: #176a5f;
  background: #f2faf8;
  font-weight: 800;
}

.action-icon {
  width: 36px;
  height: 36px;
  color: #5d6b78;
  background: #fff;
}

.completed-fold {
  width: 100%;
  min-height: 42px;
  margin-top: 6px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(223, 230, 238, .86);
  background: rgba(255, 255, 255, .75);
  color: #6f7c89;
  border-radius: 8px;
  cursor: pointer;
}

.compact-empty {
  min-height: 44px;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.month-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.month-switch strong {
  min-width: 92px;
  text-align: center;
  font-size: 16px;
}

.calendar-weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(76px, 1fr));
  gap: 7px;
}

.calendar-weekdays {
  margin-bottom: 8px;
}

.weekday {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  padding: 4px 0;
  font-size: 14px;
}

.day {
  min-height: 112px;
  background: rgba(255, 255, 255, .42);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.day:hover,
.day:focus {
  background: #fff;
  border-color: rgba(36, 112, 111, .35);
  box-shadow: none;
  outline: 0;
  transform: translateY(-1px);
}

.day b {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.day.muted {
  background: rgba(241, 244, 246, .56);
  color: #9aa5b1;
}

.day.day-empty {
  visibility: hidden;
  pointer-events: none;
}

.day.is-today {
  background: #fff;
  border-color: rgba(36, 112, 111, .62);
  box-shadow: inset 0 0 0 1px rgba(36, 112, 111, .22);
}

.event {
  font-size: 12px;
  margin: 4px 0;
  padding: 4px 6px;
  border-left: 4px solid var(--yellow);
  background: #fff7e7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.event-more {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart {
  width: 100%;
  height: 300px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}

.segmented button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 11px;
  cursor: pointer;
}

.segmented button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.compact-segmented {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 0;
}

.compact-segmented button {
  padding: 7px 10px;
  font-size: 13px;
}

.bars {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 58px;
  gap: 10px;
  align-items: center;
}

.bar-track {
  height: 11px;
  background: #eef2f5;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--muted);
  font-weight: 800;
  background: var(--panel-soft);
}

.table th:first-child {
  border-top-left-radius: 8px;
}

.table th:last-child {
  border-top-right-radius: 8px;
}

.table tr:hover td {
  background: #fbfcfd;
}

.clickable-table tbody tr {
  cursor: pointer;
}

.clickable-table tbody tr:focus-visible td {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.clickable-table tbody tr:hover td {
  background: #f5faf9;
}

.history-table .note-cell {
  max-width: 240px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-grid > div {
  border: 1px solid var(--line);
  background: var(--panel-soft);
  border-radius: 8px;
  padding: 10px;
}

.detail-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.detail-grid p {
  margin: 0;
  line-height: 1.7;
}

.screenshot-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screenshot-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact {
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.image-modal {
  width: min(920px, calc(100vw - 24px));
}

.image-preview {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.day-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.day-detail-head strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.day-detail-list {
  display: grid;
  gap: 10px;
}

.day-detail-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.day-detail-item p {
  margin: 8px 0 0;
  color: var(--muted);
}

.mistake {
  display: grid;
  gap: 8px;
}

.mistake .stem {
  font-size: 18px;
  font-weight: 700;
}

.resource {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: start;
}

.resource p {
  margin: 4px 0 12px;
  color: var(--muted);
}

.plan-course-layout {
  display: grid;
  gap: 16px;
}

.resource-tabs {
  margin-bottom: 14px;
}

.exam-filter {
  margin-bottom: 14px;
}

.plan-section,
.course-section {
  overflow: hidden;
}

.resource-list {
  display: grid;
  gap: 10px;
}

.resource-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.resource-item h3,
.resource-item p,
.course-card h3,
.course-card p {
  margin: 0;
}

.resource-item p,
.course-card p {
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}

.course-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.member-lock {
  padding: 28px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--panel-soft);
}

.member-lock strong {
  display: block;
  font-size: 22px;
  margin-bottom: 6px;
}

.member-lock p {
  margin: 0;
  color: var(--muted);
}

.plan-board {
  display: grid;
  gap: 14px;
}

.plan-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.plan-stats div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.plan-stats span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.plan-stats strong {
  font-size: 24px;
  line-height: 1.1;
}

.plan-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.plan-panel h3,
.plan-panel p {
  margin: 0;
}

.plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.plan-table strong {
  font-weight: 800;
}

.plan-table .check-cell {
  width: 36px;
  text-align: center;
}

.plan-table input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.gantt {
  display: grid;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.gantt-header,
.gantt-row {
  display: grid;
  grid-template-columns: 230px minmax(640px, 1fr);
  gap: 12px;
  align-items: center;
}

.gantt-label {
  color: var(--muted);
  font-weight: 800;
}

.gantt-dates,
.gantt-track {
  display: grid;
  grid-template-columns: repeat(var(--gantt-cols), minmax(44px, 1fr));
  gap: 4px;
}

.gantt-dates span {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.gantt-task {
  min-width: 0;
  padding: 10px 0;
}

.gantt-task b {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gantt-task span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.gantt-track {
  min-height: 36px;
  align-items: center;
  background:
    repeating-linear-gradient(
      to right,
      rgba(219, 226, 232, .7) 0,
      rgba(219, 226, 232, .7) 1px,
      transparent 1px,
      transparent calc((100% / var(--gantt-cols)))
    );
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
}

.gantt-bar {
  height: 22px;
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(18, 47, 52, .12);
}

.gantt-outside {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

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

.course-admin-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.course-card {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.course-card.course-selecting {
  border-color: rgba(215, 155, 45, .42);
  background: linear-gradient(180deg, #fff, #fffdf8);
}

.course-select-check {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  border: 1px solid #efd5a6;
  border-radius: 8px;
  background: rgba(255, 252, 245, .96);
  color: #7d581f;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(114, 82, 28, .1);
  cursor: pointer;
}

.course-select-check input {
  width: 15px;
  height: 15px;
  accent-color: var(--yellow);
}

.course-cover,
.course-preview-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(135deg, #f5faf8, #eaf2ef);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 900;
}

.course-cover img,
.course-preview-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.course-card h3 {
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.35;
}

.course-meta {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.course-preview {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  background: #fbfaf7;
  border-radius: 8px;
  padding: 10px;
}

.course-preview[hidden] {
  display: none;
}

.course-preview p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.link-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
}

.more-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.more-hero h2,
.more-hero p {
  margin: 0;
}

.more-hero p {
  margin-top: 6px;
  color: var(--muted);
}

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

.more-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.more-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff7df;
  color: #1f281f;
  font-size: 20px;
  font-weight: 900;
  border: 1px solid #f0dfac;
}

.more-card h3,
.more-card p {
  margin: 0;
}

.more-card h3 {
  margin-top: 6px;
  font-size: 20px;
}

.more-card p {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.65;
}

.more-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.community-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.community-hero h2,
.community-hero p {
  margin: 0;
}

.community-hero p {
  margin-top: 5px;
  color: var(--muted);
}

.community-filter {
  margin-bottom: 14px;
}

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

.group-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.05;
  margin-top: 8px;
}

.group-card p {
  color: var(--muted);
  margin: 8px 0 0;
}

.rank-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.rank-row:last-child {
  border-bottom: 0;
}

.rank-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.rank-no {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #fff2cf;
  color: #73510c;
  font-weight: 900;
}

.partner-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
}

.partner-card p {
  margin: 3px 0 8px;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.member-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff, #f5faf9);
}

.member-hero h2,
.member-hero p {
  margin: 0;
}

.member-hero h2 {
  margin-top: 6px;
  font-size: 32px;
}

.member-hero p {
  margin-top: 8px;
  color: var(--muted);
}

.member-plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.plan-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow-soft);
}

.plan-card h3,
.plan-card p {
  margin: 0;
}

.plan-card strong {
  font-size: 30px;
  color: var(--dark);
}

.plan-card p,
.flow-list p,
.order-card p {
  color: var(--muted);
  line-height: 1.6;
}

.flow-list {
  display: grid;
  gap: 10px;
}

.flow-list p {
  margin: 0;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.order-card h3,
.order-card p {
  margin: 0;
}

.order-card h3 {
  margin-top: 8px;
}

.order-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.order-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid var(--line);
}

.order-status.pending {
  background: #fff7dd;
  color: #9a6a00;
  border-color: #f0d98e;
}

.order-status.success {
  background: #e8f5ee;
  color: #21764b;
  border-color: #cbe8d8;
}

.order-status.danger {
  background: #fff0f2;
  color: var(--red);
  border-color: #edcbd1;
}

.admin-layout {
  display: grid;
  gap: 14px;
}

.admin-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(229, 168, 54, .14), transparent 32%),
    linear-gradient(135deg, #ffffff, #f6fbf9);
}

.admin-hero h2,
.admin-hero p {
  margin: 0;
}

.admin-hero h2 {
  margin-top: 6px;
}

.admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-kpis .card {
  padding: 16px;
}

.admin-kpis span {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.admin-kpis strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.success-pill {
  border-color: #cbe8d8;
  background: #e8f5ee;
  color: #21764b;
}

.admin-user-table td strong {
  display: block;
}

.wrongbook-shell {
  margin-bottom: 16px;
  padding: 18px 22px 20px;
  background: #fff;
  border-color: rgba(224, 231, 240, .88);
  box-shadow: 0 12px 32px rgba(22, 32, 45, .055);
}

.wrongbook-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.wrongbook-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0;
}

.wrongbook-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.wrongbook-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.wrong-upload-btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #006c5f 0%, #06493f 100%);
  color: #fff;
  padding: 0 20px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 93, 79, .22);
}

.wrong-upload-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrong-upload-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px rgba(0, 93, 79, .28);
}

.wrongbook-summary {
  display: grid;
  gap: 20px;
}

.wrongbook-summary.star-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.wrong-stat-card {
  --stat-color: #f05232;
  --stat-border: rgba(255, 111, 103, .5);
  --stat-arc: rgba(240, 82, 50, .13);
  --stat-focus: rgba(240, 82, 50, .28);
  --stat-orb: radial-gradient(circle at 36% 28%, #fff6f1 0%, #ffd9d5 54%, #ffd0cc 100%);
  position: relative;
  overflow: hidden;
  min-height: 138px;
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 22px 24px 22px 22px;
  border: 1px solid var(--stat-border);
  border-radius: 10px;
  background: linear-gradient(135deg, #fff 0%, #fffefd 62%, rgba(255, 247, 244, .62) 100%);
  box-shadow: 0 22px 46px rgba(23, 35, 51, .045);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.wrong-stat-card:hover,
.wrong-stat-card.active {
  border-color: var(--stat-color);
  box-shadow: 0 26px 54px rgba(23, 35, 51, .07);
  transform: translateY(-1px);
}

.wrong-stat-card:focus-visible {
  outline: 2px solid var(--stat-focus);
  outline-offset: 3px;
}

.wrong-stat-medium {
  --stat-color: #f49b09;
  --stat-border: rgba(248, 177, 73, .55);
  --stat-arc: rgba(244, 155, 9, .14);
  --stat-focus: rgba(244, 155, 9, .28);
  --stat-orb: radial-gradient(circle at 36% 28%, #fff9ed 0%, #ffe5bd 54%, #ffdaa2 100%);
  background: linear-gradient(135deg, #fff 0%, #fffefd 62%, rgba(255, 250, 242, .72) 100%);
}

.wrong-stat-low {
  --stat-color: #0f9d68;
  --stat-border: rgba(122, 194, 165, .58);
  --stat-arc: rgba(15, 157, 104, .13);
  --stat-focus: rgba(15, 157, 104, .25);
  --stat-orb: radial-gradient(circle at 36% 28%, #f3fff8 0%, #d7f0e4 54%, #cbe9db 100%);
  background: linear-gradient(135deg, #fff 0%, #fffefd 62%, rgba(245, 252, 248, .74) 100%);
}

.wrong-stat-orb {
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stat-orb);
  box-shadow: inset 0 0 22px rgba(255, 255, 255, .38);
  z-index: 1;
}

.wrong-stat-stars {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--stat-color);
  line-height: 1;
}

.wrong-stat-stars span {
  color: inherit;
  font-size: 21px;
  line-height: 1;
  text-shadow: 0 4px 12px rgba(240, 82, 50, .16);
}

.wrong-stat-medium .wrong-stat-stars span {
  text-shadow: 0 4px 12px rgba(244, 155, 9, .18);
}

.wrong-stat-low .wrong-stat-stars span {
  text-shadow: 0 4px 12px rgba(15, 157, 104, .14);
}

.wrong-stat-stars-2 span {
  font-size: 22px;
}

.wrong-stat-stars-1 span {
  font-size: 24px;
}

.wrong-stat-copy {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  justify-items: start;
}

.wrong-stat-title {
  color: #172331;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 800;
}

.wrong-stat-card strong {
  display: block;
  margin: 0;
  color: #101a25;
  font-size: 48px;
  line-height: .9;
  font-weight: 900;
  letter-spacing: 0;
}

.wrong-stat-card p {
  margin: 0;
  color: #566575;
  font-size: 15px;
  line-height: 1.2;
  font-weight: 500;
}

.star-icons {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #e65f3a;
  line-height: 1;
}

.star-icons span {
  font-size: 15px;
}

.wrong-stat-main .star-icons span,
.wrong-stat-card small .star-icons span {
  font-size: 13px;
  color: #f0643b;
}

.wrongbook-filterbar {
  min-height: 42px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.wrongbook-filterbar select,
.filter-chip,
.filter-select,
.filter-layout-btn {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid rgba(223, 230, 238, .92);
  border-radius: 8px;
  background: #fff;
  color: #536173;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(22, 32, 45, .03);
  white-space: nowrap;
}

.wrongbook-filterbar select {
  width: auto !important;
  min-width: 118px;
  max-width: 150px;
  appearance: auto;
}

.filter-chip.active,
.filter-select.active {
  border-color: rgba(36, 112, 111, .45);
  color: #176a61;
  background: #f3fbf9;
}

.filter-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 88px;
}

.filter-select span {
  color: #9aa5b1;
  font-size: 13px;
}

.wrongbook-filterbar select[data-wrongbook-filter="sort"] {
  margin-left: auto;
  min-width: 124px;
}

.wrongbook-countbar {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0 0 12px;
  padding-left: 2px;
  color: #657386;
  font-size: 14px;
  font-weight: 700;
}

.filter-layout-btn {
  width: 40px;
  padding: 0;
  color: #7a8794;
  display: inline-grid;
  place-items: center;
  gap: 3px;
}

.filter-layout-btn span {
  width: 14px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

.wrong-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 210px;
  background: #fff;
  border: 1px solid rgba(223, 230, 238, .86);
  border-radius: 8px;
  padding: 18px 20px 14px;
  box-shadow: 0 12px 28px rgba(31, 40, 51, .045);
  cursor: pointer;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}

.wrong-card:hover {
  border-color: rgba(36, 112, 111, .26);
  background: linear-gradient(180deg, #fff, #fbfdfc);
  box-shadow: 0 14px 30px rgba(31, 40, 51, .065);
  transform: translateY(-1px);
}

.wrong-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.wrong-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wrong-star-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  letter-spacing: 0;
}

.wrong-star-high {
  background: #fff3ef;
  color: #ef5537;
  border: 1px solid #ffd7ce;
}

.wrong-star-medium {
  background: #fff5e5;
  color: #f2940a;
  border: 1px solid #ffe0ad;
}

.wrong-star-low {
  background: #eff9f3;
  color: #168a60;
  border: 1px solid #cdebd9;
}

.wrong-card-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 700;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #182331;
}

.wrong-card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.wrong-status-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.wrong-status-row .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  background: #eaf7f6;
  border-color: #d1e9e7;
  color: #18746a;
  font-weight: 800;
}

.wrong-status-row .review-pill {
  background: #f4f7f9;
  border-color: #e2e9ef;
  color: #607083;
}

.wrong-status-row .review-pill svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill-overdue {
  background: #fff0f2;
  color: var(--red);
  border-color: #edcbd1;
}

.wrong-note-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  background: #fcfdfe;
  border: 1px solid rgba(223, 230, 238, .88);
  border-radius: 8px;
  min-height: 36px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.wrong-note-box p {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.note-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: #8fa1b2;
}

.note-empty-text {
  color: #9aa5b1;
  font-style: italic;
}

.wrong-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
  padding-top: 2px;
}

.wrong-card-actions button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid rgba(214, 226, 233, .95);
  border-radius: 8px;
  background: #fff;
  color: #17756c;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}

.wrong-card-actions button:hover:not(:disabled) {
  border-color: rgba(32, 127, 118, .34);
  background: #f5fbfa;
}

.wrong-card-actions button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wrong-thumb {
  min-height: 118px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 0;
  color: #f0643b;
}

.wrong-thumb .star-icons {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  gap: 0;
  color: #f0643b;
}

.wrong-thumb .star-icons span {
  font-size: 23px;
  line-height: 1;
  color: #f0643b;
}

.wrong-thumb .star-count-1 {
  grid-template-columns: 1fr;
}

.wrong-thumb .star-count-2 {
  grid-template-columns: repeat(2, 1fr);
  column-gap: 8px;
}

.wrong-thumb .star-count-3 {
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  width: 66px;
  height: 58px;
  row-gap: 2px;
}

.wrong-thumb .star-count-3 span:first-child {
  grid-column: 1 / -1;
  justify-self: center;
}

.wrong-content {
  min-width: 0;
  display: grid;
  align-content: start;
  gap: 9px;
}

.wrong-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.wrong-card-top b {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  color: #182331;
  font-size: 16px;
  line-height: 1.45;
}

.wrong-card-top p,
.analysis-text {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.wrong-menu-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b96a3;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.wrong-menu-btn:hover:not(:disabled) {
  background: #f4f7f9;
}

.priority,
.star-badge {
  white-space: nowrap;
  border-radius: 999px;
  background: #fff3ea;
  color: #e65f3a;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #f6d1c5;
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.answer-grid div {
  background: #fbfcfd;
  border: 1px solid rgba(223, 230, 238, .82);
  border-radius: 8px;
  padding: 8px;
}

.answer-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 3px;
  font-size: 12px;
}

.reason-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 0;
}

.reason-list span {
  background: #fff4d9;
  border: 1px solid #f0d99d;
  border-radius: 999px;
  padding: 4px 9px;
  color: #76540e;
  font-size: 12px;
}

.wrong-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
}

.wrong-card-bottom .analysis-text {
  flex: 1;
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.55;
}

.wrong-card-bottom > span {
  flex: 0 0 auto;
  color: #176a61;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: translateX(-3px);
  transition: opacity .18s ease, transform .18s ease;
}

.wrong-card:hover .wrong-card-bottom > span,
.wrong-card:focus-visible .wrong-card-bottom > span {
  opacity: 1;
  transform: translateX(0);
}

.modal {
  border: 0;
  background: transparent;
  width: min(760px, calc(100vw - 24px));
}

.modal::backdrop {
  background: rgba(20, 24, 28, .48);
}

.panel {
  padding: 18px;
}

.narrow-panel {
  max-width: 480px;
  margin: 0 auto;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-head h2 {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

[hidden],
.form-grid label[hidden],
.form-grid label.is-hidden {
  display: none !important;
}

.wide {
  grid-column: 1 / -1;
}

.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}

.inline-form input {
  max-width: 420px;
}

.inline-form button {
  white-space: nowrap;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(36, 112, 111, .18);
  border-color: var(--accent);
}

.recognition-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hint {
  color: var(--muted);
  font-size: 13px;
}

.empty {
  color: var(--muted);
  padding: 18px;
  border: 1px dashed var(--line-strong);
  background: var(--panel-soft);
  border-radius: 8px;
}

.empty-inline {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
}

.warn {
  background: #fff7e7;
  border: 1px solid #f1dca6;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.tabbar {
  display: none;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  max-width: min(360px, calc(100vw - 32px));
  background: var(--dark);
  color: #fff;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.context-menu {
  position: fixed;
  z-index: 60;
  min-width: 132px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(19, 33, 45, .18);
}

.context-menu button {
  width: 100%;
  border: 0;
  background: transparent;
  border-radius: 6px;
  padding: 9px 10px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
}

.context-menu button:hover {
  background: var(--panel-soft);
}

.context-menu button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.context-menu .danger-text {
  color: var(--red);
}

/* ---- Idiom Practice ---- */
.idiom-shell {
  max-width: 620px;
  margin: 0 auto;
}
.idiom-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.idiom-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
}
.idiom-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}
.idiom-progress-label {
  flex: 0 0 auto;
}
.idiom-progress-track {
  flex: 1;
  height: 6px;
  background: #eef2f5;
  border-radius: 999px;
  overflow: hidden;
}
.idiom-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #3a9d8f);
  border-radius: inherit;
  transition: width .3s ease;
}
.idiom-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px 28px;
}
.idiom-word {
  font-size: 40px;
  font-weight: 900;
  text-align: center;
  color: var(--dark);
  margin-bottom: 6px;
  letter-spacing: 3px;
}
.idiom-hint {
  text-align: center;
  color: var(--muted);
  margin: 0 0 22px;
  font-size: 14px;
}
.idiom-options {
  display: grid;
  gap: 10px;
}
.idiom-opt {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: start;
  text-align: left;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
  font: inherit;
  color: var(--text);
  line-height: 1.5;
}
.idiom-opt:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.idiom-opt-letter {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  margin-top: 1px;
}
.idiom-opt-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.idiom-opt-word {
  font-size: 16px;
  color: var(--dark);
}
.idiom-opt-meaning {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.idiom-opt-badge {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 4px;
  white-space: nowrap;
  margin-top: 2px;
}
.idiom-opt-badge-correct {
  background: #eaf6ee;
  color: var(--green);
}
.idiom-opt-badge-wrong {
  background: #fff0f2;
  color: var(--red);
}
.idiom-opt-correct {
  border-color: var(--green) !important;
  background: #eaf6ee !important;
}
.idiom-opt-correct .idiom-opt-letter {
  background: var(--green);
}
.idiom-opt-wrong {
  border-color: var(--red) !important;
  background: #fff0f2 !important;
}
.idiom-opt-wrong .idiom-opt-letter {
  background: var(--red);
}
.idiom-opt:disabled {
  cursor: default;
  opacity: 1;
}
.idiom-fb {
  text-align: center;
  font-size: 16px;
  font-weight: 800;
  margin-top: 18px;
  padding: 12px;
  border-radius: 8px;
}
.idiom-fb-ok {
  background: #eaf6ee;
  color: var(--green);
}
.idiom-fb-no {
  background: #fff0f2;
  color: var(--red);
}
.idiom-next {
  display: block;
  margin: 16px auto 0;
  min-width: 140px;
  padding: 12px 24px;
  font-weight: 800;
}
.idiom-result {
  text-align: center;
  padding: 36px 28px;
}
.idiom-result h2 {
  margin: 0 0 24px;
  font-size: 24px;
}
.idiom-result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.idiom-result-stats div {
  display: grid;
  gap: 4px;
}
.idiom-result-num {
  font-size: 32px;
  font-weight: 900;
  color: var(--dark);
}
.idiom-result-lbl {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 980px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    z-index: 10;
    transform: translateX(-102%);
    transition: .2s;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    padding: 14px 12px 86px;
  }

  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
  }

  .topbar-left {
    min-width: 0;
  }

  .header-quote {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    width: 100%;
    justify-content: center;
    white-space: normal;
  }

  .header-quote strong {
    white-space: normal;
  }

  .topbar-actions {
    justify-self: end;
  }

  .topbar .primary {
    grid-column: 1 / -1;
    width: 100%;
  }

  .topbar h1 {
    font-size: 22px;
  }

  .grid.kpis {
    grid-template-columns: 1fr;
  }

  .home-kpi,
  .home-kpi-score {
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 96px;
  }

  .home-kpi-chart,
  .home-kpi-chevron {
    display: none;
  }

  .daily-quote {
    justify-content: center;
  }

  .home-layout,
  .split {
    grid-template-columns: 1fr;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .wrongbook-summary {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrongbook-summary.star-summary {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .plan-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .wrongbook-board,
  .group-grid,
  .partner-grid,
  .course-grid,
  .more-grid,
  .admin-kpis,
  .member-plan-grid,
  .order-card,
  .resource-item,
  .more-card,
  .wrong-card {
    grid-template-columns: 1fr;
  }

  .wrongbook-head,
  .community-hero,
  .more-hero,
  .admin-hero,
  .member-hero,
  .day-detail-head,
  .resource-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-weekdays,
  .calendar {
    grid-template-columns: repeat(7, minmax(42px, 1fr));
    gap: 5px;
  }

  .day {
    min-height: 78px;
    padding: 6px;
  }

  .event {
    font-size: 11px;
    padding: 3px 4px;
  }

  .task {
    grid-template-columns: auto 1fr;
  }

  .today-task {
    grid-template-columns: 12px minmax(0, 1fr) 54px;
  }

  .today-task-actions {
    grid-column: 2 / -1;
    justify-content: flex-start;
  }

  .task-actions {
    grid-column: 2;
  }

  .pomodoro {
    grid-template-columns: 1fr;
  }

  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    border-top: 1px solid var(--line);
    z-index: 8;
    box-shadow: 0 -8px 22px rgba(31, 40, 51, .08);
  }

  .tabbar button {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
  }

  .tabbar button.active {
    color: var(--accent);
    font-weight: 800;
  }
}
