/* Unified interval/review dashboard widget */
.memory-card {
  margin-bottom: 12px;
  padding: 20px !important;
  border-radius: 24px !important;
  border-color: rgba(0, 0, 0, 0.07) !important;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.055) !important;
}

.memory-card-head {
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.memory-card .dcard-t {
  font-size: 22px;
  letter-spacing: 0;
}

.memory-head-btn {
  flex-shrink: 0;
  padding: 8px 14px !important;
  font-size: 13px !important;
  border-radius: 999px !important;
}

.memory-health {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(0, 0, 0, 0.11);
  background: var(--surface2);
}

.memory-health-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink2);
  font: inherit;
  font-size: 15px;
  font-weight: 950;
  text-align: left;
  cursor: pointer;
}

.memory-health-top i {
  display: inline-flex;
  width: 18px;
  height: 18px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--blue);
  font-size: 12px;
  font-style: normal;
  font-weight: 950;
  box-shadow: 0 1px 5px rgba(30, 80, 255, 0.16);
}

.memory-health-top strong {
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid var(--memory-color);
  background: var(--surface);
  color: var(--memory-color);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.2;
}

.memory-health-bar {
  width: 34%;
  min-width: 78px;
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.memory-health-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  transition: width 0.35s ease;
}

.memory-health-note {
  margin-top: 8px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.memory-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.memory-metrics button {
  min-width: 0;
  padding: 15px 16px;
  border-radius: 17px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--surface2);
  text-align: left;
  cursor: pointer;
}

.memory-metrics strong {
  display: block;
  color: var(--blue);
  font-size: 27px;
  font-weight: 950;
  line-height: 1;
}

.memory-metrics strong.danger {
  color: var(--red);
}

.memory-metrics strong.warn {
  color: var(--amber);
}

.memory-metrics span {
  display: block;
  margin-top: 6px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  text-transform: lowercase;
}

.memory-stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.memory-stage {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: center;
  cursor: pointer;
}

.memory-stage-bar {
  display: block;
  width: 100%;
  height: 7px;
  border-radius: 999px;
  background: var(--blue);
}

.memory-stage-label {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink3);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.memory-stage strong {
  display: block;
  margin-top: 3px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.memory-guidance {
  margin-top: 16px;
  color: var(--ink3);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}

.memory-list-block {
  margin-top: 22px;
  padding-top: 18px;
}

.memory-list-risk {
  border-top: 1px solid rgba(30, 80, 255, 0.12);
}

.memory-list-hard {
  border-top: 1px solid rgba(0, 0, 0, 0.07);
}

.memory-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--ink1);
  font-size: 19px;
  font-weight: 900;
}

.memory-list-head div {
  min-width: 0;
}

.memory-list-head span {
  display: block;
  line-height: 1.12;
}

.memory-list-head small {
  display: block;
  margin-top: 4px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.memory-list-head button {
  flex-shrink: 0;
  padding: 8px 15px;
  border: 0;
  border-radius: 999px;
  background: var(--ink1);
  color: var(--surface);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.memory-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-word {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: var(--surface2);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.memory-word:hover {
  transform: translateY(-1px);
  border-color: var(--border2);
  background: var(--surface);
}

.memory-word-main {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.memory-word-main .d-hard-hz {
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 25px;
  font-weight: 950;
  line-height: 1;
}

.memory-word-main .d-hard-py {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--blue);
  font-size: 14px;
  font-weight: 850;
}

.memory-word-meta {
  min-width: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
  color: var(--ink3);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  text-align: right;
}

.memory-word-meta b {
  color: var(--ink1);
  font-size: 13px;
  font-weight: 950;
}

.memory-word-risk .memory-word-meta b,
.memory-word-risk .memory-word-meta em {
  color: var(--red);
}

.memory-word-hard .memory-word-meta b {
  color: var(--amber);
}

.memory-word-meta em {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.08);
  font-style: normal;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.memory-empty {
  margin-top: 14px;
  padding: 14px 10px;
  border-radius: 14px;
  background: var(--surface2);
  color: var(--ink2);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.memory-empty span {
  color: var(--ink3);
  font-size: 11px;
  font-weight: 700;
}

/* Home concept memory widget */
.hsk-memory-card {
  margin-bottom: 12px;
  padding: 22px !important;
  border-radius: 22px !important;
}

.hsk-memory-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
}

.hsk-section-label {
  margin-bottom: 5px;
  color: var(--ink3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hsk-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.12;
}

.hsk-memory-tabs {
  flex: 0 0 auto;
  margin: 0 !important;
}

.hsk-tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  border-radius: 999px;
  background: var(--surface2);
}

.hsk-tabs button {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.hsk-tabs button.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 7px rgba(0, 0, 0, 0.06);
}

.hsk-tab-badge {
  min-width: 18px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 950;
  line-height: 1.2;
}

.hsk-tab-badge-red {
  background: var(--red-bg);
  color: var(--red);
}

.hsk-tab-badge-amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.hsk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 8px 13px;
  border: 0;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.hsk-btn-primary {
  background: var(--blue);
  color: #fff;
}

.hsk-btn-dark {
  background: var(--ink);
  color: var(--surface);
}

.hsk-mem-overview {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}

.hsk-mem-health {
  grid-column: 1 / -1;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff4f4, #fff8e1);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hsk-mem-health:hover,
.hsk-mem-health:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(20, 20, 20, 0.08);
  outline: none;
}

.hsk-mem-health-good {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.13), rgba(30, 80, 255, 0.08));
}

.hsk-mem-health-warn {
  background: linear-gradient(135deg, #fff8e1, rgba(245, 158, 11, 0.12));
}

.hsk-mem-health-bad {
  background: linear-gradient(135deg, #fff4f4, #fff8e1);
}

.hsk-mem-health-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.hsk-mem-eyebrow {
  color: var(--ink3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hsk-mem-health-title {
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 21px;
  font-weight: 800;
  line-height: 1.1;
}

.hsk-health-pct {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--surface);
  color: var(--red);
  font-family: var(--font-head);
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
}

.hsk-mem-health-good .hsk-health-pct {
  color: var(--green);
}

.hsk-mem-health-warn .hsk-health-pct {
  color: var(--amber);
}

.hsk-health-bar {
  height: 10px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
}

.hsk-health-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), var(--amber));
}

.hsk-mem-health-good .hsk-health-fill {
  background: linear-gradient(90deg, var(--green), #34d399);
}

.hsk-mem-health-warn .hsk-health-fill {
  background: linear-gradient(90deg, var(--amber), #fbbf24);
}

.hsk-mem-hint {
  margin-top: 14px;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
}

.hsk-mem-counts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  grid-column: 1 / -1;
}

.hsk-mem-count {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px;
  border: 0;
  border-radius: 14px;
  text-align: left;
  cursor: pointer;
}

.hsk-mem-count-red {
  background: var(--red-bg);
  color: var(--red);
}

.hsk-mem-count-amber {
  background: var(--amber-bg);
  color: var(--amber);
}

.hsk-mem-count-val {
  font-family: var(--font-head);
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.hsk-mem-count-lbl {
  color: var(--ink2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.hsk-buckets {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hsk-bucket {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 13px 10px;
  border: 0;
  border-radius: 12px;
  background: var(--surface2);
  text-align: left;
  cursor: pointer;
}

.hsk-bucket span {
  overflow: hidden;
  color: var(--ink3);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.hsk-bucket strong {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.hsk-mem-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.hsk-mem-list-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hsk-mem-list-title > span {
  flex-shrink: 0;
  color: var(--red);
}

.hsk-mem-list-title strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.18;
}

.hsk-mem-list-title small {
  display: block;
  margin-top: 3px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.3;
}

.hsk-mem-rows {
  max-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0;
  padding-right: 4px;
  margin: 0;
  list-style: none;
}

.hsk-mem-rows::-webkit-scrollbar {
  width: 6px;
}

.hsk-mem-rows::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(11, 16, 32, 0.14);
}

.hsk-mem-rows li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface2);
}

.hsk-word {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.hsk-word-hz {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.hsk-word-py {
  overflow: hidden;
  color: var(--blue);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.hsk-decay {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.hsk-decay-tag {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--red-bg);
  color: var(--red);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}

.hsk-decay-bar {
  width: 80px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
}

.hsk-decay-bar > div {
  height: 100%;
  border-radius: inherit;
  background: var(--red);
}

.hsk-decay-pct,
.hsk-hard-stats span {
  color: var(--ink3);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.hsk-decay-pct {
  color: var(--red);
}

.hsk-hard-stats {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 8px;
}

.hsk-hard-stats strong {
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.hsk-hard-stats .is-red {
  color: var(--red);
}

.hsk-memory-empty {
  padding: 18px;
  border-radius: 14px;
  background: var(--surface2);
  color: var(--ink3);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
}

@media screen and (max-width: 700px) {
  .hsk-memory-card {
    padding: 18px 14px !important;
  }

  .hsk-memory-head {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .hsk-memory-tabs {
    width: 100%;
  }

  .hsk-section-title {
    font-size: 18px;
  }

  .hsk-tabs {
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .hsk-tabs::-webkit-scrollbar {
    display: none;
  }

  .hsk-tabs button {
    flex: 0 0 auto;
  }

  .hsk-mem-overview,
  .hsk-mem-counts {
    grid-template-columns: 1fr;
  }

  .hsk-mem-health {
    padding: 16px;
  }

  .hsk-mem-health-head {
    align-items: flex-start;
  }

  .hsk-mem-health-title {
    font-size: 19px;
  }

  .hsk-health-pct {
    padding: 9px 12px;
    font-size: 22px;
  }

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

  .hsk-mem-list-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .hsk-mem-list-head .hsk-btn {
    width: 100%;
  }

  .hsk-mem-rows {
    max-height: 320px;
  }

  .hsk-mem-rows li {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .hsk-decay {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hsk-decay-bar {
    flex: 1 1 90px;
    max-width: 220px;
  }

  .hsk-hard-stats {
    flex-wrap: wrap;
  }

  .memory-card {
    padding: 18px 15px !important;
    border-radius: 22px !important;
  }

  .memory-card-head {
    margin-bottom: 14px;
  }

  .memory-card .dcard-t {
    font-size: 20px;
  }

  .memory-health {
    padding: 14px;
  }

  .memory-health-top {
    font-size: 14px;
  }

  .memory-health-top strong {
    font-size: 15px;
  }

  .memory-metrics {
    gap: 9px;
  }

  .memory-metrics button {
    padding: 13px 12px;
  }

  .memory-metrics strong {
    font-size: 24px;
  }

  .memory-list-head {
    font-size: 17px;
  }

  .memory-list-head button {
    padding: 7px 12px;
    font-size: 12px;
  }

  .memory-word {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 13px 14px;
  }

  .memory-word-meta {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
  }

  /* Make the bento word list container and scrolling super smooth */
  .bento-words-scroll {
    max-height: 70vh !important;
    gap: 10px !important;
    padding-bottom: 24px !important;
  }

  /* Beautifully fluid 3-column, 2-row layout to prevent ANY overflow/breakage */
  .bento-word-card {
    grid-template-columns: minmax(65px, auto) 1fr 48px !important;
    grid-template-rows: auto auto !important;
    gap: 6px 12px !important;
    padding: 12px 14px !important;
    align-items: center !important;
  }

  .bento-card-hz {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
    font-size: 19px !important;
    align-self: center !important;
    margin: 0 !important;
  }

  .bento-card-details {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    align-self: end !important;
  }

  .bento-card-srs-col {
    grid-column: 2 !important;
    grid-row: 2 !important;
    justify-content: flex-start !important;
    align-items: center !important;
    align-self: start !important;
  }

  .bento-hsk-badge {
    grid-column: 3 !important;
    grid-row: 1 / span 2 !important;
    font-size: 9.5px !important;
    padding: 3px 6px !important;
    justify-self: end !important;
    align-self: center !important;
    margin: 0 !important;
  }
}

/* ─── DAY STREAK WIDGET ─── */
.streak-card {
  margin-bottom: 12px;
  border-radius: 20px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.streak-card.streak-active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.08), rgba(239, 68, 68, 0.12));
  border: 1px solid rgba(249, 115, 22, 0.25);
}

.streak-card.streak-at-risk {
  background: linear-gradient(135deg, rgba(234, 179, 8, 0.05), rgba(249, 115, 22, 0.08));
  border: 1px dashed rgba(234, 179, 8, 0.35);
}

.streak-card.streak-inactive {
  background: var(--surface);
  border: 1px solid var(--border);
}

.streak-flame-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 26px;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.streak-active .streak-flame-container {
  background: linear-gradient(135deg, #f97316, #ef4444);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
  animation: streakPulse 2s infinite ease-in-out;
}

.streak-active .streak-flame-icon {
  text-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
}

.streak-at-risk .streak-flame-container {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.4), rgba(234, 179, 8, 0.4));
  box-shadow: 0 4px 10px rgba(234, 179, 8, 0.15);
}

.streak-inactive .streak-flame-container {
  background: var(--surface2);
  border: 1px solid var(--border2);
  opacity: 0.6;
}

@keyframes streakPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); box-shadow: 0 6px 18px rgba(239, 68, 68, 0.45); }
  100% { transform: scale(1); }
}

.streak-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
}

.streak-number-display {
  display: flex;
  flex-direction: column;
}

.streak-num-val {
  font-size: 28px;
  font-weight: 950;
  line-height: 1.1;
  color: var(--ink1);
}

.streak-num-lbl {
  font-size: 11px;
  font-weight: 800;
  color: var(--ink3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.streak-desc {
  font-size: 12px;
  color: var(--ink2);
  line-height: 1.45;
  font-weight: 600;
}

.streak-timer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed var(--border2);
  font-size: 11px;
  font-weight: 700;
  color: var(--ink3);
}

.streak-active .streak-timer-row {
  border-top-color: rgba(249, 115, 22, 0.15);
}

.streak-at-risk .streak-timer-row {
  border-top-color: rgba(234, 179, 8, 0.2);
}

/* Home concept: activity chart + KPI stats */
.hsk-card-kicker {
  margin-bottom: 6px;
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hsk-activity-card {
  min-height: 336px;
  padding: 28px !important;
  border-radius: 24px !important;
  background: var(--surface) !important;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.045) !important;
}

.hsk-activity-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.hsk-activity-title {
  min-width: 0;
}

.hsk-activity-title .dcard-t {
  font-family: var(--font-head, inherit);
  font-size: 22px;
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: 0;
  margin-top: 0;
}

.hsk-activity-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 0;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 700;
  flex-wrap: wrap;
}

.hsk-activity-legend span {
  width: 8px;
  height: 8px;
  margin: 0 -10px 0 0;
  border-radius: 50%;
}

.hsk-activity-legend .is-practice {
  background: var(--surface2);
}

.hsk-activity-legend .is-learned {
  background: var(--blue);
}

.hsk-activity-actions {
  display: contents;
  flex-shrink: 0;
}

.hsk-activity-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface2);
  order: 2;
}

.hsk-activity-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink3);
  cursor: pointer;
  font-family: var(--font-head, inherit);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.hsk-activity-switch button.is-active {
  background: var(--surface);
  color: var(--ink1);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.07);
}

.hsk-today-stat {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-left: auto;
  text-align: right;
  order: 4;
}

.hsk-today-stat strong {
  display: inline-block;
  color: var(--blue);
  font-family: var(--font-head, inherit);
  font-size: 26px;
  font-weight: 950;
  line-height: 1;
}

.hsk-today-stat span {
  display: inline-block;
  margin-top: 0;
  color: var(--ink3);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hsk-activity-card .chart-wrap {
  height: 220px !important;
  margin-top: 0 !important;
  display: grid !important;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end !important;
  gap: 6px !important;
}

.hsk-activity-card .bar-wrap {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  height: 100% !important;
  padding: 0 !important;
}

.hsk-activity-card .bar-body {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  background: rgba(11, 16, 32, 0.08) !important;
  border-radius: 6px 6px 0 0 !important;
}

.hsk-activity-card .bar-body > div:last-child {
  border-radius: 5px 5px 0 0 !important;
}

.hsk-activity-card .bar-lbl {
  margin-top: 0 !important;
  font-size: 11px !important;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 700 !important;
  color: var(--ink3) !important;
}

.hsk-activity-card .chart-dot {
  display: none !important;
}

.hsk-activity-card .chart-wrap path {
  opacity: 0 !important;
}

.hsk-stats-card {
  padding: 0 !important;
  border: 1px solid var(--border2) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  background: var(--surface) !important;
  box-shadow: none !important;
}

.hsk-stats-settings {
  display: none;
}

.hsk-stat-row {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border2);
}

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

.hsk-stat-value {
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.hsk-stat-value.is-blue {
  color: var(--blue);
}

.hsk-stat-label {
  justify-self: end;
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

.hsk-rank-row {
  cursor: pointer;
}

.hsk-rank-name {
  font-size: 26px;
}

.hsk-rank-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  margin-top: -8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface2);
}

.hsk-rank-progress div {
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.5s ease;
}

:root:not([data-theme="light"]) .hsk-activity-card .bar-body {
  background: rgba(255, 255, 255, 0.08) !important;
}

:root:not([data-theme="light"]) .hsk-activity-switch button.is-active {
  background: rgba(255, 255, 255, 0.08);
}

:root:not([data-theme="light"]) .hsk-activity-card,
:root:not([data-theme="light"]) .hsk-stats-card {
  box-shadow: none !important;
}

@media(max-width: 700px) {
  .hsk-activity-card {
    min-height: 0;
    padding: 20px !important;
    border-radius: 22px !important;
  }

  .hsk-activity-head {
    gap: 14px 12px;
    margin-bottom: 18px;
  }

  .hsk-activity-title .dcard-t {
    font-size: 22px;
  }

  .hsk-activity-legend {
    width: 100%;
    order: 3;
  }

  .hsk-activity-actions {
    gap: 18px;
  }

  .hsk-activity-switch {
    order: 2;
    width: 100%;
    margin-top: 2px;
  }

  .hsk-activity-switch button {
    flex: 1;
    padding: 0 10px;
  }

  .hsk-activity-card .chart-wrap {
    height: 180px !important;
    gap: 3px !important;
  }

  .hsk-activity-card .bar-body {
    border-radius: 5px 5px 0 0 !important;
  }

  .hsk-stats-card {
    border-radius: 22px !important;
  }

  .hsk-stat-row {
    padding: 16px 18px;
  }
}

/* Reference home page: 1:1 structure from HSK Trainer Home standalone */
.hsk-page {
  --pg: 48px;
  --gap: 24px;
  --r-card: 22px;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px var(--pg) 64px;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  box-sizing: border-box;
}

.hsk-page > .hsk-banner,
.hsk-page > .hsk-card {
  animation: hskHomeCardIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.hsk-page > :nth-child(2) {
  animation-delay: 0.03s;
}

.hsk-page > :nth-child(3) {
  animation-delay: 0.06s;
}

.hsk-page > :nth-child(4) {
  animation-delay: 0.09s;
}

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

.hsk-banner {
  min-height: 80px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  border-radius: var(--r-card);
  background: var(--blue);
  color: #fff;
  box-sizing: border-box;
  overflow: hidden;
}

.hsk-banner[style*="display: none"] {
  min-height: 0;
}

.hsk-banner > div:first-child {
  min-width: 0;
}

.dash-banner-logo {
  width: 44px !important;
  height: 44px !important;
  margin-right: 18px !important;
  flex: 0 0 auto;
  object-fit: contain;
}

.dash-banner-right {
  flex: 0 0 auto;
}

.dash-banner-btn {
  min-height: 38px;
  border-radius: 10px !important;
  font-family: var(--font-head, inherit);
  font-weight: 700 !important;
}

.hsk-card {
  background: var(--surface) !important;
  border: 0 !important;
  border-radius: var(--r-card) !important;
  padding: 28px !important;
  box-shadow: none !important;
  box-sizing: border-box;
}

.hsk-page > .hsk-card {
  margin: 0 !important;
}

.hsk-memory > .hsk-tabs {
  margin-bottom: 18px;
}

.hsk-search-card {
  position: relative;
  overflow: visible;
}

.hsk-search-box {
  position: relative;
  width: 100%;
  height: 50px;
}

.hsk-search-box input {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 14px;
  background: var(--surface2);
  color: var(--ink);
  padding: 0 44px 0 48px;
  font-family: var(--font-body, inherit);
  font-size: 15px;
  font-weight: 700;
  outline: none;
  box-sizing: border-box;
  transition: box-shadow 0.2s ease, background 0.2s ease;
}

.hsk-search-box input:focus {
  box-shadow: 0 0 0 3px rgba(30, 80, 255, 0.14);
}

.hsk-search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  opacity: 0.5;
}

.hsk-search-box button {
  position: absolute;
  right: 14px;
  top: 50%;
  width: 24px;
  height: 24px;
  display: none;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 50%;
  background: var(--surface3);
  color: var(--ink2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
}

.hsk-search-results {
  max-height: 280px;
  margin-top: 10px;
  padding: 6px;
  overflow-y: auto;
  border-radius: 14px;
  background: var(--surface2);
  box-sizing: border-box;
}

.hsk-search-quickview {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border2);
}

.hsk-announcements-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hsk-empty {
  padding: 24px;
  color: var(--ink3);
  font-size: 13px;
  text-align: center;
  opacity: 0.75;
}

.hsk-shead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.hsk-shead-label {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

.hsk-shead-title {
  display: flex;
  align-items: center;
  margin: 6px 0 0;
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.hsk-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 0;
  border-radius: 12px;
  background: var(--surface2);
}

.hsk-tabs button {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink3);
  cursor: pointer;
  font-family: var(--font-head, inherit);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hsk-tabs button:hover,
.hsk-tabs button:focus-visible {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink1);
  outline: none;
}

.hsk-tabs button:active {
  transform: scale(0.98);
}

.hsk-tabs button.is-active {
  background: var(--surface);
  color: var(--ink1);
  box-shadow: 0 2px 6px rgba(11, 16, 32, 0.06);
}

.hsk-memory-tabs {
  align-self: center;
  flex: 0 0 auto;
  gap: 6px;
  margin: 0 !important;
  padding: 5px;
  border-radius: 18px;
  background: var(--surface2);
}

.hsk-memory-tabs button {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 14px;
}

.hsk-memory-tabs .hsk-tab-badge {
  margin-left: 2px;
}

.hsk-memory-tabs button.is-active {
  box-shadow: 0 6px 16px rgba(11, 16, 32, 0.08);
}

.hsk-progress-panel[hidden] {
  display: none !important;
}

.hsk-activity-card.hsk-progress {
  min-height: 0;
  position: relative;
  overflow: visible;
}

.hsk-act-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  color: var(--ink3);
  font-size: 12px;
  font-weight: 700;
}

.hsk-act-legend span {
  display: inline-flex;
  align-items: center;
}

.hsk-act-legend .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
  vertical-align: middle;
}

.hsk-act-legend .dot-gray {
  background: rgba(11, 16, 32, 0.08);
}

.hsk-act-legend .dot-blue {
  background: var(--blue);
}

.hsk-act-today {
  margin-left: auto;
  display: inline-flex !important;
  align-items: baseline !important;
  gap: 8px;
}

.hsk-today-num {
  color: var(--blue);
  font-family: var(--font-head, inherit);
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hsk-today-label {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hsk-chart {
  height: 220px;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  align-items: end;
  gap: 6px;
}

.hsk-bar {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: crosshair;
  outline: none;
}

.hsk-bar-stack {
  flex: 1;
  width: 100%;
  min-height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  position: relative;
}

.hsk-bar-fill {
  width: 100%;
  min-height: 4px;
  position: relative;
  border-radius: 6px 6px 0 0;
  background: rgba(11, 16, 32, 0.08);
  transform-origin: bottom;
  transition: height 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.18s ease, transform 0.18s ease;
}

.hsk-bar:hover .hsk-bar-fill,
.hsk-bar:focus-visible .hsk-bar-fill {
  background: rgba(30, 80, 255, 0.18);
  transform: scaleY(1.02);
}

.hsk-bar:focus-visible .hsk-bar-stack {
  border-radius: 10px;
  box-shadow: 0 0 0 3px rgba(30, 80, 255, 0.16);
}

.hsk-bar-label {
  margin-bottom: 4px;
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
}

.hsk-bar-dot {
  position: absolute;
  bottom: -4px;
  left: 50%;
  min-width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  padding: 0 5px;
  border: 2px solid var(--surface);
  border-radius: 4px;
  background: var(--blue);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
}

.hsk-bar-day {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.hsk-levels {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hsk-level-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 110px;
  gap: 16px;
  align-items: center;
  cursor: pointer;
  border-radius: 12px;
  transition: color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.hsk-level-row:hover,
.hsk-level-row:focus-visible {
  box-shadow: 0 0 0 8px rgba(30, 80, 255, 0.045);
  outline: none;
}

.hsk-level-row:active {
  transform: translateY(1px);
}

.hsk-level-label {
  color: var(--ink1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.hsk-level-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface2);
}

.hsk-level-fill {
  height: 100%;
  min-width: 1%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.hsk-level-count {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.hsk-level-count span:first-child {
  color: var(--ink1);
}

.hsk-status-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  cursor: pointer;
  border-radius: 16px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.hsk-status-head:hover,
.hsk-status-head:focus-visible {
  background: rgba(30, 80, 255, 0.04);
  box-shadow: 0 0 0 8px rgba(30, 80, 255, 0.04);
  outline: none;
}

.hsk-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(30, 80, 255, 0.12), var(--surface2));
  color: var(--blue);
}

.hsk-avatar span {
  font-family: var(--font-head, inherit);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.hsk-status-user {
  min-width: 0;
  flex: 1;
}

.hsk-status-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.01em;
}

.hsk-status-meta {
  margin-top: 4px;
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hsk-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.hsk-pill-blue {
  background: rgba(30, 80, 255, 0.1);
  color: var(--blue);
}

.hsk-icon-btn {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: var(--surface2);
  color: var(--ink1);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.18s ease, transform 0.18s ease;
}

.hsk-icon-btn:hover,
.hsk-icon-btn:focus-visible {
  background: rgba(30, 80, 255, 0.1);
  outline: none;
}

.hsk-icon-btn:active {
  transform: scale(0.96);
}

.hsk-guest-note {
  display: grid;
  gap: 6px;
  margin: -6px 0 20px;
  padding: 14px 16px;
  border: 1px solid rgba(229, 72, 77, 0.16);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(229, 72, 77, 0.05), rgba(245, 165, 36, 0.05));
}

.hsk-guest-note strong {
  color: var(--ink1);
  font-size: 13px;
  font-weight: 850;
}

.hsk-guest-note span {
  color: var(--ink2);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.hsk-guest-note button {
  justify-self: start;
  margin-top: 4px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}

.hsk-status-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
}

.hsk-streak {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 16px;
  background: var(--surface2);
  min-height: 100%;
}

.hsk-streak-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.hsk-streak-flame {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff7a3d, #e5484d);
  color: #fff;
  font-size: 22px;
}

.hsk-streak-days {
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 36px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hsk-streak-days span {
  margin-left: 8px;
  color: var(--ink3);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0;
}

.hsk-streak-text {
  margin-top: 8px;
  color: var(--ink2);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
}

.hsk-streak-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: auto;
}

.hsk-reset {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hsk-reset span {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hsk-reset strong {
  color: var(--ink1);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 13px;
  font-weight: 800;
}

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

.hsk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-head, inherit);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.hsk-btn:hover,
.hsk-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(11, 16, 32, 0.08);
  outline: none;
}

.hsk-btn:active {
  transform: translateY(0) scale(0.98);
}

.hsk-btn-primary {
  background: var(--blue);
  color: #fff;
}

.hsk-btn-ghost {
  background: var(--surface);
  color: var(--ink1);
}

.hsk-kpi {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border2);
  border-radius: 16px;
}

.hsk-kpi-item {
  min-height: 66px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.hsk-kpi-item + .hsk-kpi-item {
  border-top: 1px solid var(--border2);
}

.hsk-kpi-value {
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 32px;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}

.hsk-kpi-value.is-blue {
  color: var(--blue);
}

.hsk-kpi-rank {
  font-size: 26px;
}

.hsk-kpi-label {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

.hsk-rank-kpi {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
  cursor: pointer;
  transition: background 0.18s ease;
}

.hsk-rank-kpi:hover,
.hsk-rank-kpi:focus-visible {
  background: rgba(30, 80, 255, 0.04);
  outline: none;
}

.hsk-rank-kpi .hsk-rank-progress {
  grid-column: 1 / -1;
  width: 100%;
  height: 5px;
  margin-top: -6px;
}

.hsk-rank-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 0.5s ease;
}

.hsk-kpi-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  padding: 0 !important;
  border: 1px solid var(--border2) !important;
  border-radius: 16px !important;
  overflow: hidden !important;
  box-shadow: none !important;
}

.hsk-kpi-card .hsk-stat-row {
  min-height: 66px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border2);
}

.hsk-kpi-card .hsk-stat-row:last-child {
  border-bottom: 0;
}

.hsk-kpi-card .hsk-rank-row {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr);
  align-items: center;
}

.hsk-kpi-card .hsk-stat-value {
  color: var(--ink1);
  font-family: var(--font-head, inherit);
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

.hsk-kpi-card .hsk-stat-value.is-blue {
  color: var(--blue);
}

.hsk-kpi-card .hsk-stat-label {
  color: var(--ink3);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.25;
  text-align: right;
  text-transform: uppercase;
}

@media(max-width: 540px) {
  .hsk-page {
    --pg: 16px;
    --gap: 18px;
    --r-card: 18px;
    padding-top: 16px;
    padding-bottom: 92px;
  }

  .hsk-banner {
    padding: 16px;
    align-items: flex-start;
  }

  .dash-banner-right,
  .dash-banner-btn {
    width: 100%;
  }

  .hsk-card {
    padding: 20px !important;
  }

  .hsk-tabs {
    width: 100%;
  }

  .hsk-tabs button {
    flex: 1;
    justify-content: center;
    min-width: 0;
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hsk-chart {
    height: 180px;
    gap: 3px;
  }

  .hsk-bar-day {
    font-size: 9px;
  }

  .hsk-bar-label {
    font-size: 8px;
  }

  .hsk-bar-dot {
    min-width: 14px;
    height: 14px;
    font-size: 9px;
  }

  .hsk-level-row {
    grid-template-columns: 56px minmax(0, 1fr) 80px;
    gap: 10px;
  }

  .hsk-level-count {
    font-size: 11px;
  }

  .hsk-status-grid {
    grid-template-columns: 1fr;
  }

  .hsk-streak {
    padding: 20px;
  }

  .hsk-streak-bottom,
  .hsk-actions {
    align-items: stretch;
  }

  .hsk-streak-bottom {
    margin-top: 0;
  }

  .hsk-actions,
  .hsk-actions .hsk-btn {
    width: 100%;
  }
}
