/* 我的学习 (home) */

.home-svg { display: block; flex: none; }

/* ---------- Hero ---------- */
.home-hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 132px; padding: 22px 32px; margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(100deg, #f2f5fb 0%, #f3f8f6 48%, var(--brand-50) 100%);
  border: 1px solid var(--line);
}
.home-hero-text { position: relative; z-index: 1; min-width: 0; }
.home-hero h1 { font-size: 30px; letter-spacing: 0.02em; }
.home-slogan { margin-top: 6px; color: var(--muted); font-size: 14px; letter-spacing: 0.04em; }
.home-hero-art { position: absolute; right: 12px; bottom: -8px; opacity: 0.9; pointer-events: none; }
.home-hero-art svg { display: block; }

/* ---------- Points cards ---------- */
.home-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.home-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; }
.home-card + .home-card { margin-top: 0; }
.home-card-top { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.home-card-name { font-weight: 600; }
.home-card-ico {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff;
}
.home-card-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-variant-numeric: tabular-nums; }
.home-detail-btn { border-color: var(--brand-100); color: var(--brand-600); }
.home-lock { background: linear-gradient(160deg, #fff 45%, #f3f9e9); }
.home-lock-text { display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; padding-left: 44px; }
.home-lock-text b { font-size: 26px; font-weight: 600; color: var(--brand-600); font-variant-numeric: tabular-nums; line-height: 1.2; }
.home-lock-text span { color: var(--brand-600); font-size: 13px; }
.home-lock-weeks { margin-left: 2px; }
.home-lock-go { padding-left: 44px; font-weight: 600; font-size: 15px; }
.home-lock.is-open { background: linear-gradient(160deg, #fff 40%, var(--brand-50)); }

/* ---------- 学习空间 ---------- */
.home-space { margin-bottom: 18px; }
.home-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.home-sec-head h2 { font-size: 15px; }
.home-quiet-link { color: var(--muted); }
.home-space .grid { gap: 12px; }
.home-space-card {
  display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 76px; padding: 16px;
  text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: linear-gradient(180deg, #fff, #fbfcfc);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.home-space-card + .home-space-card { margin-top: 0; }
.home-space-card:hover { border-color: var(--brand-100); box-shadow: 0 4px 18px rgba(16, 40, 32, 0.08); }
.home-space-card .home-card-ico { background: var(--brand-50); color: var(--brand-600); border-radius: 8px; }
.home-space-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-space-lock { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12px; white-space: nowrap; padding-top: 6px; }
.home-space-modal { display: flex; flex-direction: column; gap: 12px; line-height: 1.8; }

/* ---------- First-time checklist ---------- */
.home-check { margin-bottom: 18px; }
.home-check-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; }
.home-check-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.home-check-mark {
  flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff;
}
.home-check-text { flex: 1; min-width: 0; }
.home-check-list li.is-done .home-check-mark { background: var(--brand); border-color: var(--brand); }
.home-check-list li.is-done .home-check-text { color: var(--muted); }

/* ---------- Tabs and panel ---------- */
.home-tabs { display: flex; justify-content: center; margin-bottom: 14px; overflow-x: auto; }
.home-tabs .seg { box-shadow: var(--shadow); }
.home-tabs .seg button { padding: 7px 24px; font-size: 13px; }
.home-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 2px; border-radius: 999px; background: var(--brand); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-weight: 500; }
.home-panel { padding: 16px 18px 18px; }
.home-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.home-subbar { display: flex; gap: 16px; flex-wrap: wrap; margin: -4px 0 14px; }
.home-chips-sm .chip { padding: 2px 10px; font-size: 12px; }
.home-search { width: 240px; height: 32px; }
.home-progress-btn.has { border-color: var(--brand-100); color: var(--brand-600); }
.home-go-link { color: var(--brand-600); font-weight: 600; font-size: 13px; }
.home-go-link:disabled { color: var(--muted); cursor: not-allowed; }

/* ---------- Grouped lists ---------- */
.home-groups { display: flex; flex-direction: column; gap: 10px; }
.home-group { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.home-group-head {
  width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border: 0; background: #f6f8f8; cursor: pointer; text-align: left; font-weight: 600; font-size: 13px;
}
.home-group-head:hover { background: var(--brand-50); }
.home-caret { color: var(--muted); width: 12px; display: inline-block; font-size: 12px; }
.home-list { border-top: 1px solid var(--line); }

/* Record rows */
.home-rec-wrap { border-bottom: 1px solid var(--line); }
.home-rec-wrap:last-child { border-bottom: 0; }
.home-rec {
  display: grid; grid-template-columns: 26px minmax(120px, 1.1fr) minmax(150px, 1.3fr) 1fr 0.7fr 0.9fr 14px; align-items: center; gap: 12px;
  padding: 12px 14px; cursor: pointer; transition: background 0.12s; font-size: 13px;
}
.home-rec:hover, .home-rec:focus-visible { background: #f8fbfa; outline: none; }
.home-rec-wrap.is-expanded > .home-rec { background: #f6faf8; }
.home-rec-icon { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; background: var(--bg); color: var(--muted); }
.home-ico-listening { background: #fff1e4; color: #e07a1f; }
.home-ico-reading { background: #eef1f6; color: #4b5b73; }
.home-ico-translation { background: #f3edfb; color: #7a4fc4; }
.home-ico-writing { background: #eef1f0; color: #3d4a46; }
.home-ico-dictation { background: #eaf1fc; color: #2f6fd6; }
.home-ico-review { background: var(--danger-50); color: var(--danger); }
.home-rec-title { font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.home-rec-meta { color: var(--muted); font-size: 12px; }
.home-rec-cell { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-k { color: var(--muted); font-size: 12px; }
.home-plus { color: var(--brand-600); font-weight: 600; }
.home-rec-detail { padding: 4px 14px 14px 52px; background: #f6faf8; display: flex; flex-direction: column; gap: 10px; }
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.home-stat { background: #fff; padding: 10px 14px; display: flex; flex-direction: column; gap: 2px; }
.home-stat b { font-size: 16px; font-variant-numeric: tabular-nums; }
.home-rec-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Points table */
.home-pts-title { font-size: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--text); margin-bottom: 0; }
.home-table-wrap { overflow-x: auto; }
.home-pts-table td { font-size: 13px; }
.home-num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.home-pts-link { cursor: pointer; }
.home-pts-link:hover, .home-pts-link:focus-visible { background: #f8fbfa; outline: none; }
.home-pts-rules { margin-top: 12px; line-height: 1.7; }

/* Drawer */
.home-drawer-mask { position: fixed; inset: 0; z-index: 90; background: rgba(18, 30, 26, 0.32); animation: fade 0.15s; }
.home-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100%);
  background: #fff; box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
  display: flex; flex-direction: column; animation: home-slide 0.2s ease-out;
}
@keyframes home-slide { from { transform: translateX(40px); opacity: 0.4; } }
.home-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.home-drawer-head h3 { font-size: 18px; }
.home-drawer-list { flex: 1; overflow: auto; padding: 8px 20px 20px; }
.home-drawer-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.home-drawer-item:last-child { border-bottom: 0; }
.home-drawer-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-drawer-time { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.home-drawer-item .btn { flex: none; align-self: center; }

/* Word rows */
.home-word { border-bottom: 1px solid var(--line); }
.home-word:last-child { border-bottom: 0; }
.home-word-row { display: grid; grid-template-columns: 140px 130px minmax(0, 1fr) auto auto 14px; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; }
.home-word-row:hover { background: #f8fbfa; }
.home-word-w { font-size: 16px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.home-word-ipa { font-size: 13px; }
.home-word-pos { color: var(--muted); }
.home-word-zh { font-size: 13px; color: var(--text); overflow-wrap: anywhere; line-height: 1.6; }
.home-speak { border-radius: 999px; border-color: var(--brand-100); color: var(--brand-600); }
.home-word-detail { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 10px; background: #fbfdfc; }
.home-example { font-size: 15px; line-height: 1.7; padding: 8px 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; }
.home-word-detail .select { height: 32px; }

/* Mistake rows */
.home-mis { border-bottom: 1px solid var(--line); }
.home-mis:last-child { border-bottom: 0; }
.home-mis-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; cursor: pointer; }
.home-mis-row:hover, .home-mis-row:focus-visible { background: #f8fbfa; outline: none; }
.home-mis-main { flex: 1; min-width: 0; }
.home-mis-title b { font-weight: 600; }
.home-mis-ans { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; margin-top: 1px; }
.home-arrow-sm { margin: 0 2px; }
.home-mis-status { font-size: 12px; color: var(--text); white-space: nowrap; }
.home-mis-status.is-done { color: var(--ok); }
.home-mis-detail { padding: 6px 16px 16px; display: flex; flex-direction: column; gap: 12px; background: #fbfdfc; }
.home-mis-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.home-gap { margin-left: 14px; }
.home-stem { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.home-stem p { margin: 0; line-height: 1.8; font-size: 15px; }
.home-opts { margin: 8px 0 0; padding-left: 22px; line-height: 1.8; }
.home-blank { color: var(--brand-600); font-weight: 600; border-bottom: 2px solid var(--brand); padding: 0 4px; }

/* ---------- Ability matrix ---------- */
.home-mx-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.home-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.home-pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 16px; font-size: 13px; cursor: pointer; color: var(--text); }
.home-pill:hover { border-color: var(--brand-100); }
.home-pill.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.home-pill.outline.active { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.home-mx-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); gap: 14px; margin-bottom: 16px; }
.home-mx-status { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: linear-gradient(160deg, #f7f9f8, #eef4f1); display: flex; flex-direction: column; gap: 6px; }
.home-mx-status.is-full { background: linear-gradient(160deg, #fff, var(--brand-50)); }
.home-mx-status-title { font-weight: 600; }
.home-mx-est { margin-top: auto; padding-top: 12px; }
.home-mx-est b { font-size: 26px; color: var(--brand-600); font-variant-numeric: tabular-nums; }
.home-mx-est span { color: var(--muted); }
.home-mx-chart { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.home-mx-chart-head, .home-mx-chart-foot { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.home-chart svg { width: 100%; height: auto; display: block; }
.home-mx-summary { border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; background: #f7f9f8; margin-bottom: 18px; }
.home-mx-summary h3 { font-size: 17px; margin-bottom: 2px; }
.home-mx-text { margin: 10px 0; line-height: 1.85; }
.home-mx-basis { border-top: 1px solid var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.home-mx-basis h3 { font-size: 15px; }
.home-mx-panel { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.home-mx-panel-title { font-weight: 600; margin-bottom: 10px; }
.home-dims { display: flex; flex-direction: column; gap: 14px; }
.home-part { display: flex; flex-direction: column; gap: 6px; padding-bottom: 12px; border-bottom: 1px dashed var(--line); }
.home-part:last-child { padding-bottom: 0; border-bottom: 0; }
.home-part-links { display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
.home-mx-coach { display: flex; flex-direction: column; gap: 4px; margin-top: 2px; padding: 8px 12px; border-radius: 8px; background: #fafcfb; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.65; color: var(--text); }
.home-mx-coach-row { display: flex; align-items: baseline; gap: 8px; }
.home-mx-badge { flex: none; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: var(--brand-50); color: var(--brand-600); }
.home-mx-badge.drill { background: #eef3fc; color: var(--info); }
.home-mx-badge.check { background: var(--bg); color: var(--muted); }
.home-dim { display: grid; grid-template-columns: 200px minmax(0, 1fr) 110px; align-items: center; gap: 14px; }
.home-dim .bar { height: 8px; }
.home-dim-name { font-size: 13px; }
.home-dim-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.home-mx-recs { display: flex; flex-direction: column; }
.home-mx-rec { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto 70px; gap: 12px; align-items: center; padding: 8px 4px; border-bottom: 1px dashed var(--line); color: var(--text); }
.home-mx-rec:last-child { border-bottom: 0; }
.home-mx-rec:hover { background: #f8fbfa; color: var(--text); }
.home-mx-rec b { text-align: right; font-variant-numeric: tabular-nums; }
.home-mx-rec-title { overflow-wrap: anywhere; }
.home-method { margin: 0; padding-left: 18px; line-height: 1.85; color: var(--muted); font-size: 13px; }
.home-mx-cross { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; }
.home-mx-cross-head { width: 100%; text-align: left; border: 0; background: none; padding: 12px 16px; font-weight: 600; cursor: pointer; }
.home-mx-cross-head:hover { background: #f8fbfa; }
.home-mx-cross-body { padding: 0 16px 14px; }

/* ---------- Empty ---------- */
.home-empty { padding: 36px 16px; }
.home-empty p { max-width: 420px; line-height: 1.7; }
.home-empty-art { opacity: 0.9; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .home-hero { padding: 20px; min-height: 110px; }
  .home-hero h1 { font-size: 24px; }
  .home-hero-art { right: -70px; opacity: 0.4; }
  .home-cards { grid-template-columns: 1fr; }
  .home-check-list { grid-template-columns: 1fr; }
  .home-tabs { justify-content: flex-start; }
  .home-tabs .seg button { padding: 6px 14px; }
  .home-panel { padding: 14px; }
  .home-search { width: 100%; }
  .home-toolbar .spacer { display: none; }
  .home-rec { grid-template-columns: 26px minmax(0, 1fr) 14px; gap: 4px 10px; }
  .home-rec-title { grid-column: 2; }
  .home-rec-chev { grid-column: 3; grid-row: 1; }
  .home-rec-meta, .home-rec-cell { grid-column: 2 / 4; }
  .home-rec-detail { padding-left: 14px; }
  .home-word-row { grid-template-columns: minmax(0, 1fr) auto 14px; }
  .home-word-ipa, .home-word-zh { grid-column: 1 / -1; }
  .home-mx-top { grid-template-columns: 1fr; }
  .home-dim { grid-template-columns: 1fr auto; }
  .home-dim .bar { grid-column: 1 / -1; grid-row: 2; }
  .home-mx-rec { grid-template-columns: minmax(0, 1fr) auto; }
  .home-check-list .link-btn,
  .home-quiet-link,
  .home-part-links .link-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 4px 4px;
  }
}
