.typing-dashboard-shell {
  width: min(1440px, calc(100% - 32px));
  padding-top: 18px;
}

.typing-dashboard-hero {
  min-height: 190px;
  padding: 26px 300px 26px 34px;
  border-color: #efc49f;
  background: linear-gradient(110deg, #fffaf4 0%, #fffdf8 58%, #fff4ed 100%);
}

.typing-dashboard-hero h1 {
  max-width: 800px;
  font-size: clamp(2.7rem, 5vw, 4.7rem);
  color: #367b42;
}

.typing-dashboard-hero .hero-subtitle {
  max-width: 760px;
}

.typing-dashboard-hero .hsk6-hero-cat {
  width: min(230px, 22vw);
  right: 54px;
  bottom: -8px;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero {
  display: block;
  min-height: 190px;
  padding: 28px 300px 24px 34px;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero > div {
  padding: 34px 0 0;
  text-align: left;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero .eyebrow {
  width: min(460px, 100%);
  margin: 0 0 10px;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero h1 {
  max-width: 760px;
  margin: 0;
  color: #367b42;
  font-size: clamp(2.7rem, 5vw, 4.4rem);
  line-height: 1.02;
  text-align: left;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero .hero-subtitle {
  max-width: 760px;
  margin: 12px 0 0;
  text-align: left;
}

#typing-shell.typing-dashboard-shell .typing-dashboard-hero .hsk6-hero-cat {
  position: absolute;
  width: min(230px, 22vw);
  max-height: 190px;
  right: 48px;
  bottom: -6px;
}

.typing-dashboard-workspace {
  padding: 18px 0 34px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

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

.typing-dashboard-stats article {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #f1d4c3;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(109, 72, 48, 0.06);
}

.typing-dashboard-stats article:nth-child(1) { background: #fff0f4; }
.typing-dashboard-stats article:nth-child(2) { background: #edf8ee; }
.typing-dashboard-stats article:nth-child(3) { background: #fff6eb; }
.typing-dashboard-stats article:nth-child(4) { background: #fff; }

.typing-dashboard-stats i {
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(145deg, #ff668b, #ef3667);
  color: #fff;
  font-size: 1.8rem;
  font-style: normal;
}

.typing-dashboard-stats article:nth-child(2) i,
.typing-dashboard-stats article:nth-child(4) i { background: linear-gradient(145deg, #68bf74, #318d49); }
.typing-dashboard-stats article:nth-child(3) i { background: linear-gradient(145deg, #ffae59, #f36f2e); }

.typing-dashboard-stats span { min-width: 0; color: #765c4c; font-weight: 800; }
.typing-dashboard-stats strong { display: block; margin-top: 3px; color: #ee3c69; font-size: 2rem; line-height: 1.05; }
.typing-dashboard-stats article:nth-child(2) strong,
.typing-dashboard-stats article:nth-child(4) strong { color: #348747; }
.typing-dashboard-stats article:nth-child(3) strong { color: #ee652c; }
.typing-dashboard-stats small { display: block; margin-top: 5px; color: #988579; }
.typing-dashboard-stats b { display: block; height: 10px; margin-top: 10px; overflow: hidden; border-radius: 999px; background: #ded8d4; }
.typing-dashboard-stats em { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f45c65, #ffb62f); transition: width 0.25s ease; }

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

.typing-dashboard-nav button {
  position: relative;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid #eebc9b;
  border-radius: 14px;
  background: #fffdf9;
  color: #694d3c;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.typing-dashboard-nav button > span { font-size: 1.55rem; }
.typing-dashboard-nav button small { min-width: 26px; padding: 2px 7px; border-radius: 999px; background: #ffe8ee; color: #e64370; }
.typing-dashboard-nav button.is-active { border-color: #f64e77; background: linear-gradient(145deg, #ff637f, #f33168); color: #fff; box-shadow: 0 5px 0 #d92f58; }
.typing-dashboard-nav button.is-active small { background: rgba(255,255,255,.22); color: #fff; }

.typing-dashboard-catalog,
.typing-dashboard-practice {
  border: 1px solid #f0d0c5;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 30px rgba(109, 72, 48, 0.07);
}

.typing-dashboard-catalog[hidden],
.typing-dashboard-practice[hidden] { display: none !important; }

.typing-dashboard-catalog { padding: 18px; }
.typing-dashboard-catalog > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.typing-dashboard-catalog > header > div { display: flex; align-items: center; gap: 14px; }
.typing-dashboard-catalog > header i { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 13px; background: #f74172; color: #fff; font-size: 1.6rem; font-style: normal; }
.typing-dashboard-catalog h2 { margin: 0; color: #633c4b; font-size: 1.55rem; }
.typing-dashboard-catalog p { margin: 3px 0 0; color: #88736a; font-weight: 700; }
#typing-catalog-practice { min-height: 46px; padding: 8px 18px; border: 1px solid #f3a9bd; border-radius: 12px; background: #fff7fa; color: #ed3d6e; font: inherit; font-weight: 900; cursor: pointer; }

.typing-catalog-tools label { min-height: 54px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border: 1px solid #ded7d4; border-radius: 12px; background: #fff; }
.typing-catalog-tools label > span { width: 22px; height: 22px; border: 3px solid #8b8988; border-radius: 50%; position: relative; }
.typing-catalog-tools label > span::after { content: ""; position: absolute; width: 9px; height: 3px; right: -7px; bottom: -4px; transform: rotate(45deg); border-radius: 2px; background: #8b8988; }
.typing-catalog-tools input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-weight: 700; }

.typing-catalog-table-wrap { margin-top: 14px; overflow: hidden; border: 1px solid #f0ddd4; border-radius: 14px; }
.typing-catalog-table-wrap table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.typing-catalog-table-wrap th { padding: 12px 14px; background: #fff0dc; color: #6f4a35; text-align: left; }
.typing-catalog-table-wrap td { height: 60px; padding: 9px 14px; border-top: 1px solid #f2e4de; color: #694f42; font-weight: 700; }
.typing-catalog-table-wrap th:nth-child(1), .typing-catalog-table-wrap td:nth-child(1) { width: 70px; color: #8f817a; }
.typing-catalog-table-wrap th:nth-child(2), .typing-catalog-table-wrap td:nth-child(2) { width: 18%; }
.typing-catalog-table-wrap td:nth-child(2) { color: #14110f; font-family: "Noto Sans SC", sans-serif; font-size: 1.45rem; font-weight: 900; }
.typing-catalog-table-wrap th:nth-child(3), .typing-catalog-table-wrap td:nth-child(3) { width: 20%; color: #8d8079; }
.typing-catalog-table-wrap th:nth-child(5), .typing-catalog-table-wrap td:nth-child(5) { width: 150px; }
.typing-catalog-table-wrap td:nth-child(5) span { display: inline-flex; margin: 2px 4px 2px 0; padding: 5px 9px; border-radius: 999px; background: #f4f1ef; color: #7f716a; font-size: .82rem; }
.typing-catalog-table-wrap td:nth-child(5) .is-saved { background: #ffe8ef; color: #e64170; }
.typing-catalog-table-wrap td:nth-child(5) .is-mistake { background: #fff0d9; color: #c26923; }
.typing-catalog-empty { padding: 54px 20px; color: #8b766d; text-align: center; font-weight: 800; }
.typing-dashboard-catalog > footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 14px; color: #8b766d; font-weight: 700; }
#typing-catalog-pages { display: flex; align-items: center; gap: 5px; }
#typing-catalog-pages button { min-width: 38px; height: 38px; border: 1px solid #eadbd4; border-radius: 10px; background: #fff; color: #694f42; font: inherit; font-weight: 800; cursor: pointer; }
#typing-catalog-pages button.is-active { border-color: #f34a73; background: #f34a73; color: #fff; }
#typing-catalog-pages button:disabled { opacity: .4; cursor: default; }

.typing-dashboard-practice { padding: 18px; }
.typing-dashboard-practice > .typing-course-switcher[hidden] { display: none !important; }
.typing-dashboard-practice .typing-mode-switch { max-width: 720px; margin: 0 auto 14px; }
.typing-dashboard-practice .typing-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

#typing-shell .typing-dashboard-practice .typing-mode-switch {
  width: 100%;
  max-width: 720px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 8px;
}

#typing-shell .typing-dashboard-practice .typing-mode-switch button {
  width: 100%;
  min-height: 52px;
  margin: 0;
}

@media (max-width: 760px) {
  .typing-dashboard-shell { width: min(100% - 16px, 520px); padding-top: 8px; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero { min-height: 300px; padding: 132px 16px 18px; }
  .typing-dashboard-hero .back-link { position: absolute; z-index: 2; left: 16px; top: 14px; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero > div { padding: 0; text-align: left; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero .hsk6-hero-cat { width: 145px; max-height: 118px; right: 10px; top: 12px; bottom: auto; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero .eyebrow { width: min(210px, 62%); height: 16px; margin: 0 0 9px; font-size: .78rem; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero h1 { margin: 0 0 8px; font-size: 2.35rem; line-height: 1.02; text-align: left; }
  #typing-shell.typing-dashboard-shell .typing-dashboard-hero .hero-subtitle { margin: 0; font-size: .86rem; line-height: 1.45; text-align: left; }
  .typing-dashboard-workspace { gap: 12px; padding-top: 12px; }
  .typing-dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .typing-dashboard-stats article { min-height: 92px; gap: 10px; padding: 12px; border-radius: 14px; }
  .typing-dashboard-stats i { flex-basis: 42px; width: 42px; height: 42px; font-size: 1.25rem; }
  .typing-dashboard-stats span { font-size: .82rem; }
  .typing-dashboard-stats strong { font-size: 1.42rem; }
  .typing-dashboard-stats small { display: none; }
  .typing-dashboard-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .typing-dashboard-nav button { min-height: 56px; justify-content: flex-start; gap: 8px; padding: 8px 11px; font-size: .86rem; }
  .typing-dashboard-nav button > span { font-size: 1.15rem; }
  .typing-dashboard-nav button small { margin-left: auto; min-width: 22px; }
  .typing-dashboard-catalog { padding: 12px; border-radius: 15px; }
  .typing-dashboard-catalog > header { align-items: flex-start; }
  .typing-dashboard-catalog > header i { width: 42px; height: 42px; }
  .typing-dashboard-catalog h2 { font-size: 1.2rem; }
  .typing-dashboard-catalog p { font-size: .82rem; }
  #typing-catalog-practice { padding: 7px 10px; font-size: .82rem; }
  .typing-catalog-tools label { min-height: 48px; }
  .typing-catalog-table-wrap { border: 0; overflow: visible; }
  .typing-catalog-table-wrap table, .typing-catalog-table-wrap tbody { display: block; }
  .typing-catalog-table-wrap thead { display: none; }
  .typing-catalog-table-wrap tr { display: grid; grid-template-columns: 36px minmax(64px, .7fr) minmax(72px, .8fr) minmax(0, 1.4fr); align-items: center; min-height: 62px; margin-bottom: 7px; padding: 7px 8px; border: 1px solid #f2e0dc; border-radius: 12px; background: #fff; }
  .typing-catalog-table-wrap td { width: auto !important; height: auto; min-width: 0; padding: 3px 5px; border: 0; overflow-wrap: anywhere; }
  .typing-catalog-table-wrap td:nth-child(1) { width: 30px !important; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #fff0f4; }
  .typing-catalog-table-wrap td:nth-child(2) { font-size: 1.2rem; }
  .typing-catalog-table-wrap td:nth-child(3) { font-size: .82rem; }
  .typing-catalog-table-wrap td:nth-child(4) { font-size: .86rem; }
  .typing-catalog-table-wrap td:nth-child(5) { grid-column: 2 / -1; padding-top: 0; }
  .typing-catalog-table-wrap td:nth-child(5) span { padding: 3px 7px; font-size: .72rem; }
  .typing-dashboard-catalog > footer { align-items: flex-start; flex-direction: column; font-size: .8rem; }
  #typing-catalog-pages { align-self: stretch; justify-content: center; }
  #typing-catalog-pages button { min-width: 34px; height: 34px; }
  .typing-dashboard-practice { padding: 10px; }
  .typing-dashboard-practice .typing-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #typing-shell .typing-dashboard-practice .typing-mode-switch { max-width: none; }
}
