html,
body.tool-page-body,
body:has(.typing-tutor-reference) {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(54, 116, 255, 0.12), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(40, 82, 180, 0.12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0a1320 100%);
}

html:has(.typing-tutor-reference),
body:has(.typing-tutor-reference) {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 18%, rgba(54, 116, 255, 0.12), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(40, 82, 180, 0.12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0a1320 100%) !important;
}

body:has(.typing-tutor-reference) .tool-support-section {
  display: none;
}

body:has(.typing-tutor-reference) .site-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 18%, rgba(54, 116, 255, 0.12), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(40, 82, 180, 0.12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0a1320 100%);
}

.typing-reference-visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.typing-reference-hidden {
  display: none !important;
}

.typing-page-main--tutor {
  min-height: auto;
  padding: 0;
}

.typing-reference-stage {
  padding: 8px 0 calc(14px + env(safe-area-inset-bottom));
  min-height: 0;
  box-sizing: border-box;
  background:
    radial-gradient(circle at 18% 18%, rgba(54, 116, 255, 0.12), transparent 28%),
    radial-gradient(circle at 84% 76%, rgba(40, 82, 180, 0.12), transparent 24%),
    linear-gradient(180deg, #08111f 0%, #0a1320 100%);
}

.typing-reference-container {
  max-width: 1480px;
}

.typing-tutor-reference {
  --reference-bg: #0b1320;
  --reference-panel: rgba(14, 22, 36, 0.94);
  --reference-panel-soft: rgba(18, 29, 47, 0.9);
  --reference-line: rgba(255, 255, 255, 0.09);
  --reference-line-strong: rgba(255, 255, 255, 0.14);
  --reference-text: #f5f8ff;
  --reference-text-soft: rgba(223, 230, 245, 0.84);
  --reference-muted: rgba(173, 185, 206, 0.62);
  --reference-accent: #4f8dff;
  --reference-accent-strong: #2e6cf5;
  --reference-accent-soft: rgba(79, 141, 255, 0.16);
  --reference-success: #8ddb8a;
  --reference-danger: #ff7575;
  --reference-shadow: 0 34px 70px rgba(2, 7, 18, 0.38);
  position: relative;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(17, 28, 44, 0.96), rgba(11, 19, 31, 0.98)),
    #0b1320;
  box-shadow: var(--reference-shadow);
  color: var(--reference-text);
  overflow: hidden;
}

.typing-tutor-reference[data-typing-theme="light"] {
  --reference-bg: #eef3fb;
  --reference-panel: rgba(250, 252, 255, 0.96);
  --reference-panel-soft: rgba(245, 248, 252, 0.94);
  --reference-line: rgba(24, 36, 56, 0.1);
  --reference-line-strong: rgba(24, 36, 56, 0.16);
  --reference-text: #172235;
  --reference-text-soft: rgba(31, 44, 64, 0.82);
  --reference-muted: rgba(84, 96, 118, 0.68);
  --reference-accent: #3e7dff;
  --reference-accent-strong: #2e6cf5;
  --reference-accent-soft: rgba(62, 125, 255, 0.14);
  --reference-success: #2f8d4d;
  --reference-danger: #d94e4e;
  background:
    linear-gradient(180deg, rgba(245, 248, 253, 0.98), rgba(231, 237, 247, 0.98)),
    #eef3fb;
}

.typing-tutor-reference[data-sidebar-open="false"] .typing-reference-sidebar-body {
  display: none;
}

.typing-reference-layout {
  display: grid;
  grid-template-columns: 296px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-width: 0;
}

.typing-reference-sidebar,
.typing-reference-board-shell,
.typing-reference-stat,
.typing-reference-bottom,
.typing-reference-progress,
.typing-reference-privacy {
  border: 1px solid var(--reference-line);
  background: var(--reference-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.typing-reference-board,
.typing-reference-stats {
  min-width: 0;
}

.typing-reference-sidebar {
  display: grid;
  gap: 18px;
  min-width: 0;
  padding: 16px 16px 18px;
  border-radius: 24px;
}

.typing-reference-sidebar-body {
  display: grid;
  gap: 18px;
}

.typing-reference-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--reference-line);
}

.typing-reference-brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.typing-reference-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 18px;
  background: linear-gradient(180deg, #4f8dff, #2b66f1);
  color: #ffffff;
  box-shadow: 0 16px 28px rgba(48, 112, 255, 0.28);
}

.typing-reference-brand-mark svg {
  width: 24px;
  height: 24px;
}

.typing-reference-brand-copy {
  min-width: 0;
}

.typing-reference-brand-copy h1 {
  margin: 0;
  font-size: 22px;
  line-height: 1.08;
  letter-spacing: 0;
}

.typing-reference-brand-copy p {
  margin: 4px 0 0;
  color: var(--reference-text-soft);
  font-size: 15px;
}

.typing-reference-menu {
  display: inline-grid;
  flex: 0 0 42px;
  gap: 4px;
  width: 42px;
  height: 42px;
  padding: 12px 11px;
  border: 1px solid var(--reference-line);
  border-radius: 14px;
  background: transparent;
  color: inherit;
}

.typing-reference-menu span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.9;
}

.typing-reference-menu span:nth-child(2) {
  width: 14px;
  justify-self: end;
}

.typing-reference-sidebar-copy h2 {
  margin: 0;
  color: var(--reference-text-soft);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.typing-reference-lesson-list {
  display: grid;
  gap: 12px;
}

.typing-reference-lesson {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 22px;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--reference-line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.014));
  color: inherit;
  text-align: left;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.typing-reference-lesson:hover {
  border-color: rgba(88, 132, 255, 0.24);
  transform: translateY(-1px);
}

.typing-reference-lesson[aria-current="true"] {
  border-color: rgba(102, 145, 255, 0.36);
  background: linear-gradient(135deg, rgba(89, 134, 255, 0.9), rgba(57, 101, 224, 0.94));
  box-shadow: 0 18px 28px rgba(52, 88, 181, 0.26);
}

.typing-reference-lesson-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  border: 1px solid var(--reference-line);
  background: rgba(255, 255, 255, 0.06);
}

.typing-reference-lesson[aria-current="true"] .typing-reference-lesson-icon {
  background: rgba(255, 255, 255, 0.14);
}

.typing-reference-lesson-icon svg {
  width: 22px;
  height: 22px;
}

.typing-reference-lesson-copy {
  min-width: 0;
}

.typing-reference-lesson-title {
  display: block;
  margin-bottom: 4px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

.typing-reference-lesson-summary {
  display: block;
  color: var(--reference-text-soft);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.typing-reference-lesson[aria-current="true"] .typing-reference-lesson-summary {
  color: rgba(255, 255, 255, 0.92);
}

.typing-reference-lesson-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  position: relative;
  opacity: 0;
}

.typing-reference-lesson[aria-current="true"] .typing-reference-lesson-check {
  opacity: 1;
}

.typing-reference-lesson-check::before,
.typing-reference-lesson-check::after {
  content: "";
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
}

.typing-reference-lesson-check::before {
  left: 7px;
  top: 10px;
  width: 3px;
  height: 6px;
  transform: rotate(-38deg);
}

.typing-reference-lesson-check::after {
  left: 9px;
  top: 9px;
  width: 7px;
  height: 3px;
  transform: rotate(-40deg);
}

.typing-reference-progress,
.typing-reference-privacy {
  border-radius: 22px;
  padding: 18px;
}

.typing-reference-progress h3,
.typing-reference-privacy h3 {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
}

.typing-reference-progress-list {
  display: grid;
  gap: 14px;
}

.typing-reference-progress-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 15px;
  color: var(--reference-text-soft);
}

.typing-reference-progress-item strong {
  color: var(--reference-text);
  font-size: 16px;
}

.typing-reference-privacy {
  display: flex;
  gap: 12px;
  align-items: start;
}

.typing-reference-privacy-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: #8ddf8d;
}

.typing-reference-privacy-icon svg {
  width: 28px;
  height: 28px;
}

.typing-reference-privacy p {
  margin: 0;
  color: var(--reference-text-soft);
  font-size: 15px;
  line-height: 1.55;
}

.typing-reference-main {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 1120px;
  justify-self: center;
}

.typing-reference-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
}

.typing-reference-heading {
  min-width: 0;
}

.typing-reference-kicker {
  margin: 0 0 4px;
  color: var(--reference-text);
  font-size: 14px;
  font-weight: 600;
}

.typing-reference-heading h2 {
  margin: 0;
  font-size: 34px;
  line-height: 1.06;
  letter-spacing: 0;
}

.typing-reference-summary {
  margin: 5px 0 0;
  color: var(--reference-text-soft);
  font-size: 15px;
}

.typing-reference-helper-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.typing-reference-helper {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--reference-line-strong);
  border-radius: 999px;
  color: var(--reference-text);
  font-size: 12px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.02);
}

.typing-reference-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.typing-reference-theme,
.typing-reference-progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--reference-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.typing-reference-theme-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 76px;
  height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--reference-text);
  font-size: 13px;
  font-weight: 700;
}

.typing-reference-theme-button[aria-pressed="true"] {
  background: linear-gradient(180deg, #4dc4f3, #2c9bd8);
  color: #08111f;
}

.typing-reference-theme-moon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset -5px -2px 0 0 currentColor;
  opacity: 0.9;
}

.typing-reference-progress-pill {
  min-height: 46px;
  padding: 0 12px;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
}

.typing-reference-progress-pill strong {
  font-size: 15px;
}

.typing-reference-progress-ring {
  --typing-progress: 0%;
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--reference-accent) var(--typing-progress), rgba(255, 255, 255, 0.1) 0);
}

.typing-reference-progress-ring::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: var(--reference-panel);
}

.typing-reference-board-shell {
  position: relative;
  min-width: 0;
  min-height: 104px;
  padding: 12px 18px 14px;
  border-radius: 16px;
}

.typing-reference-guide {
  position: absolute;
  inset: 12px 14px auto;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 12px 14px 12px 16px;
  border-radius: 16px;
  border: 1px solid rgba(111, 162, 255, 0.32);
  background:
    linear-gradient(135deg, rgba(31, 47, 76, 0.98), rgba(18, 31, 51, 0.98)),
    #122033;
  box-shadow:
    0 20px 42px rgba(2, 7, 18, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.typing-reference-guide-copy strong {
  display: block;
  font-size: 15px;
  line-height: 1.2;
}

.typing-reference-guide-copy p {
  margin: 5px 0 0;
  color: var(--reference-text-soft);
  font-size: 13px;
  line-height: 1.4;
}

.typing-reference-guide-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: max-content;
}

.typing-reference-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--reference-text-soft);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.typing-reference-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--reference-accent);
}

.typing-reference-guide .typing-reference-primary {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
}

.typing-tutor-reference[data-typing-theme="light"] .typing-reference-guide {
  border-color: rgba(62, 125, 255, 0.24);
  background:
    linear-gradient(135deg, rgba(246, 250, 255, 0.98), rgba(229, 237, 250, 0.98)),
    #eef4ff;
  box-shadow:
    0 20px 42px rgba(36, 60, 100, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.typing-reference-prompt {
  min-height: 42px;
  text-align: center;
  color: var(--reference-text);
}

.typing-reference-prompt .typing-prompt-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 6px;
}

.typing-reference-prompt .typing-prompt-line--secondary {
  display: none;
}

.typing-reference-prompt .typing-char {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  padding: 0 2px;
  color: rgba(232, 237, 247, 0.56);
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  background: transparent;
  border-radius: 12px;
}

.typing-reference-prompt .typing-char.is-correct {
  color: var(--reference-success);
}

.typing-reference-prompt .typing-char.is-incorrect {
  color: #ff8c8c;
}

.typing-reference-prompt .typing-char.is-current {
  min-width: 28px;
  min-height: 30px;
  padding: 0 7px;
  color: #ffffff;
  background: linear-gradient(180deg, #4f8dff, #2c63f0);
  box-shadow: 0 0 0 1px rgba(121, 164, 255, 0.34), 0 0 18px rgba(76, 129, 255, 0.42);
}

.typing-reference-prompt .typing-char.is-shadow {
  color: rgba(176, 186, 205, 0.26);
}

.typing-reference-prompt .typing-char.is-shadow.is-space {
  min-width: 20px;
}

.typing-reference-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin: 0 0 8px;
  color: var(--reference-text-soft);
  font-size: 11px;
  font-weight: 700;
}

.typing-reference-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.typing-reference-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
}

.typing-reference-legend-item i.is-correct {
  background: var(--reference-success);
}

.typing-reference-legend-item i.is-wrong {
  background: var(--reference-danger);
}

.typing-reference-legend-item i.is-current {
  background: var(--reference-accent);
}

.typing-reference-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.typing-reference-stat {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 9px 12px;
  border-radius: 14px;
}

.typing-reference-stat p {
  margin: 0 0 3px;
  color: var(--reference-text-soft);
  font-size: 12px;
}

.typing-reference-stat strong {
  font-size: 18px;
  line-height: 1;
}

.typing-reference-stat-icon {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--reference-line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.typing-reference-stat-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid currentColor;
}

.typing-reference-stat-icon--time {
  color: #7ea3ff;
}

.typing-reference-stat-icon--speed {
  color: #f2c54e;
}

.typing-reference-stat-icon--accuracy {
  color: #8ad48a;
}

.typing-reference-stat-icon--errors {
  color: #ff7777;
}

.typing-reference-stat-icon--streak {
  color: #7897ff;
}

.typing-reference-stat-icon--speed::before {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid currentColor;
  border-bottom-color: transparent;
  border-radius: 50%;
  transform: rotate(-45deg);
}

.typing-reference-stat-icon--speed::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 8px;
  background:
    radial-gradient(circle at 3px 50%, currentColor 0 3px, transparent 3.2px),
    linear-gradient(currentColor, currentColor) 4px 50% / 12px 2px no-repeat;
  transform: translate(-3px, -50%) rotate(-28deg);
  transform-origin: 3px 50%;
}

.typing-reference-stat-icon--accuracy::after {
  content: "";
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.typing-reference-stat-icon--errors::before,
.typing-reference-stat-icon--streak::before {
  border: 0;
  width: 18px;
  height: 18px;
}

.typing-reference-stat-icon--errors::before {
  background:
    linear-gradient(currentColor, currentColor) center/18px 2px no-repeat,
    linear-gradient(currentColor, currentColor) center/2px 18px no-repeat;
  transform: rotate(45deg);
}

.typing-reference-stat-icon--streak::before {
  background: conic-gradient(from 90deg, currentColor 0 25%, transparent 25% 100%);
  -webkit-mask: radial-gradient(circle at center, transparent 6px, #000 6px);
  mask: radial-gradient(circle at center, transparent 6px, #000 6px);
}

.typing-reference-keyboard {
  width: 100%;
  min-width: 0;
  max-width: 860px;
  justify-self: center;
  overflow-x: auto;
  padding-bottom: 4px;
}

.typing-reference-keyboard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 2px 6px;
}

.typing-reference-keyboard-instruction {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--reference-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--reference-text-soft);
  font-size: 12px;
  font-weight: 600;
}

.typing-reference-keyboard-instruction strong {
  color: var(--reference-text);
  font-size: 12px;
}

.typing-reference-hands-toggle {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--reference-line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--reference-text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.typing-reference-hands-toggle[aria-pressed="false"] {
  color: var(--reference-text-soft);
}

.typing-reference-keyboard-shell {
  position: relative;
  min-width: 720px;
  padding: 9px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(20, 31, 49, 0.96), rgba(10, 17, 29, 0.94)),
    rgba(15, 23, 42, 0.9);
  overflow: hidden;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 rgba(15, 23, 42, 0.18),
    0 14px 28px rgba(2, 7, 18, 0.26);
}

.typing-reference-keyboard-shell::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(242, 247, 252, 0.96) 48%, rgba(225, 234, 243, 0.98) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -1px 0 rgba(148, 163, 184, 0.22);
  z-index: 0;
}

.typing-tutor-reference[data-typing-theme="light"] .typing-reference-keyboard-shell {
  background: rgba(226, 235, 248, 0.84);
  border-color: rgba(24, 36, 56, 0.12);
}

.typing-tutor-reference[data-typing-theme="light"] .typing-reference-keyboard-instruction,
.typing-tutor-reference[data-typing-theme="light"] .typing-reference-hands-toggle {
  background: rgba(255, 255, 255, 0.7);
}

.typing-reference-keyboard-shell .typing-keyboard {
  position: relative;
  z-index: 2;
  gap: 5px;
  max-width: 100%;
  margin: 0 auto;
}

.typing-reference-keyboard-shell .typing-keyboard-row {
  gap: 5px;
}

.typing-reference-keyboard-shell .typing-key {
  --key-edge: rgba(124, 140, 164, 0.26);
  --key-shadow: rgba(43, 57, 78, 0.16);
  position: relative;
  z-index: 2;
  min-height: 36px;
  padding: 3px 5px;
  border: 1px solid rgba(170, 186, 207, 0.88);
  border-bottom-color: rgba(132, 149, 174, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(237, 243, 250, 0.94)),
    var(--key-base, #eef4fb);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.98),
    inset 0 -2px 0 var(--key-edge),
    0 5px 11px var(--key-shadow);
  color: #102035;
  align-content: center;
  justify-items: center;
  gap: 2px;
  isolation: isolate;
}

.typing-reference-keyboard-shell .typing-key::before {
  content: "";
  position: absolute;
  inset: 2px 3px auto;
  height: 36%;
  border-radius: 7px 7px 5px 5px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: -1;
}

.typing-reference-keyboard-shell .typing-key-label {
  width: 100%;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.58);
}

.typing-reference-keyboard-shell .typing-key-finger,
.typing-reference-keyboard-shell .typing-key-home-label {
  display: none !important;
}

.typing-reference-keyboard-shell .typing-key[data-code="Tab"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="CapsLock"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="Backspace"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="Enter"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="ShiftLeft"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="ShiftRight"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="ControlLeft"] .typing-key-label,
.typing-reference-keyboard-shell .typing-key[data-code="ControlRight"] .typing-key-label {
  font-size: 10px;
  letter-spacing: 0;
}

.typing-reference-keyboard-shell .typing-key[data-code="Space"] .typing-key-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.typing-reference-keyboard-shell .typing-key[data-finger="left-pinky"] {
  --key-base: #deedff;
  --key-edge: rgba(90, 130, 175, 0.26);
  background: linear-gradient(180deg, #f7fbff, #dbeafe 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="left-ring"] {
  --key-base: #ffdedd;
  --key-edge: rgba(177, 105, 100, 0.24);
  background: linear-gradient(180deg, #fff8f7, #ffd9d6 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="left-middle"] {
  --key-base: #ddf1d0;
  --key-edge: rgba(105, 148, 82, 0.24);
  background: linear-gradient(180deg, #f7fff1, #ddefd1 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="left-index"] {
  --key-base: #e5d6ff;
  --key-edge: rgba(128, 96, 182, 0.24);
  background: linear-gradient(180deg, #fbf7ff, #e4d2ff 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="right-index"] {
  --key-base: #dfd2ff;
  --key-edge: rgba(118, 91, 178, 0.24);
  background: linear-gradient(180deg, #fbf7ff, #dfd0ff 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="right-middle"] {
  --key-base: #dff1d1;
  --key-edge: rgba(103, 147, 82, 0.24);
  background: linear-gradient(180deg, #f7fff1, #dcefcf 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="right-ring"] {
  --key-base: #ffdcd3;
  --key-edge: rgba(178, 107, 91, 0.24);
  background: linear-gradient(180deg, #fff8f5, #ffd8cc 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="right-pinky"] {
  --key-base: #dceaff;
  --key-edge: rgba(88, 125, 174, 0.24);
  background: linear-gradient(180deg, #f7fbff, #dbe8fb 100%);
}

.typing-reference-keyboard-shell .typing-key[data-finger="thumbs"],
.typing-reference-keyboard-shell .typing-key[data-finger="left-thumb"],
.typing-reference-keyboard-shell .typing-key[data-finger="right-thumb"] {
  --key-base: #eee0c8;
  --key-edge: rgba(155, 125, 80, 0.24);
  background: linear-gradient(180deg, #fffaf0, #eadcc3 100%);
}

.typing-reference-keyboard-shell .typing-key[data-code="Backspace"],
.typing-reference-keyboard-shell .typing-key[data-code="Tab"],
.typing-reference-keyboard-shell .typing-key[data-code="CapsLock"],
.typing-reference-keyboard-shell .typing-key[data-code="Enter"],
.typing-reference-keyboard-shell .typing-key[data-code="ShiftLeft"],
.typing-reference-keyboard-shell .typing-key[data-code="ShiftRight"],
.typing-reference-keyboard-shell .typing-key[data-code="ControlLeft"],
.typing-reference-keyboard-shell .typing-key[data-code="ControlRight"] {
  color: #173154;
  background: linear-gradient(180deg, #f8fbff, #dceafb 100%);
}

.typing-reference-keyboard-shell .typing-key[data-code="KeyF"]::after,
.typing-reference-keyboard-shell .typing-key[data-code="KeyJ"]::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: rgba(17, 35, 59, 0.28);
  transform: translateX(-50%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
}

.typing-reference-keyboard-shell .typing-key.is-next,
.typing-reference-keyboard-shell .typing-key.is-pressed,
.typing-reference-keyboard-shell .typing-key.is-hit,
.typing-reference-keyboard-shell .typing-key.is-flash {
  z-index: 5;
}

.typing-reference-keyboard-shell .typing-key.is-next {
  border-color: #4084ff;
  background: linear-gradient(180deg, #68a4ff 0%, #316cf2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    inset 0 -2px 0 rgba(11, 61, 167, 0.34),
    0 0 0 1px rgba(79, 141, 255, 0.32),
    0 0 0 4px rgba(79, 141, 255, 0.13),
    0 12px 20px rgba(56, 101, 215, 0.32);
  color: #ffffff;
  transform: translateY(-1px);
}

.typing-reference-keyboard-shell .typing-key.is-pressed {
  border-color: #2f7bff;
  background: linear-gradient(180deg, #78acff, #3f78f2);
  box-shadow:
    inset 0 2px 5px rgba(9, 39, 103, 0.28),
    0 2px 6px rgba(44, 58, 79, 0.16);
  color: #ffffff;
  transform: translateY(1px);
}

.typing-reference-keyboard-shell .typing-key.is-next .typing-key-label,
.typing-reference-keyboard-shell .typing-key.is-pressed .typing-key-label {
  text-shadow: 0 1px 0 rgba(5, 24, 68, 0.28);
}

.typing-reference-keyboard-shell .typing-key.is-error {
  animation: typing-key-error 0.28s ease;
}

.typing-reference-keyboard-shell .typing-key.is-support {
  border-style: dashed;
  border-color: rgba(251, 191, 36, 0.38);
  box-shadow: 0 0 0 3px rgba(251, 191, 36, 0.08);
}

.typing-reference-keyboard-shell [data-typing-fingers].typing-finger-grid {
  --hand-guide-size: 500px;
  --hand-guide-offset-y: -176px;
  position: relative;
  inset: auto;
  z-index: 3;
  display: block;
  width: 100%;
  height: 168px;
  margin: 8px auto 0;
  overflow: hidden;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 0 0 12px 12px;
  background: #f8fbfe;
  pointer-events: none;
  transition: height 0.2s ease, margin 0.2s ease, opacity 0.2s ease;
}

.typing-reference-keyboard-shell [data-typing-fingers].typing-finger-grid::before {
  content: "";
  position: absolute;
  left: 50%;
  top: var(--hand-guide-offset-y);
  width: var(--hand-guide-size);
  height: var(--hand-guide-size);
  background: url("../img/hand.png") center top / contain no-repeat;
  filter: saturate(1.04) contrast(1.03) drop-shadow(0 10px 16px rgba(35, 49, 68, 0.1));
  transform: translateX(-50%);
}

.typing-reference-keyboard-shell[data-hands-visible="false"] [data-typing-fingers].typing-finger-grid {
  height: 0;
  margin-top: 0;
  opacity: 0;
}

.typing-reference-keyboard-shell .typing-hand-stage {
  position: absolute;
  left: 50%;
  top: var(--hand-guide-offset-y);
  display: block;
  width: var(--hand-guide-size);
  height: var(--hand-guide-size);
  min-height: 0;
  transform: translateX(-50%);
}

.typing-reference-keyboard-shell .typing-hand-stage::before,
.typing-reference-keyboard-shell .typing-hand-palm,
.typing-reference-keyboard-shell .typing-hand-name,
.typing-reference-keyboard-shell .typing-hand-home {
  display: none !important;
}

.typing-reference-keyboard-shell .typing-hand {
  position: absolute;
  inset: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.typing-reference-keyboard-shell .typing-hand-finger {
  position: absolute;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0 !important;
  border-radius: 999px;
  background: transparent !important;
  box-shadow: none !important;
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%);
  transform-origin: center;
}

.typing-reference-keyboard-shell .typing-hand .typing-hand-finger {
  right: auto;
  bottom: auto;
  width: 22px;
  height: 22px;
}

.typing-reference-keyboard-shell .typing-hand-finger::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(100, 45, 210, 0.86);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.42), transparent 34%),
    rgba(174, 119, 255, 0.88);
  box-shadow:
    0 0 0 3px rgba(134, 92, 246, 0.18),
    0 8px 16px rgba(88, 40, 160, 0.2);
  opacity: 0;
  transform: scale(0.72);
  transition: transform 0.18s ease, opacity 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.typing-reference-keyboard-shell .typing-hand-finger.is-active::after {
  opacity: 1;
  transform: scale(1);
}

.typing-reference-keyboard-shell .typing-hand-finger.is-active {
  animation: none;
}

.typing-reference-keyboard-shell .typing-hand-finger.is-pressing::after {
  border-color: rgba(27, 115, 214, 0.86);
  background: rgba(94, 177, 255, 0.86);
  opacity: 1;
  transform: scale(0.92);
}

.typing-reference-keyboard-shell .typing-hand-finger.is-locked::after {
  border-color: rgba(204, 47, 47, 0.78);
  background: rgba(255, 108, 108, 0.84);
  opacity: 1;
}

.typing-reference-keyboard-shell .typing-hand-left [data-finger="left-pinky"] {
  left: 13.8%;
  top: 46.4%;
}

.typing-reference-keyboard-shell .typing-hand-left [data-finger="left-ring"] {
  left: 18.9%;
  top: 39.2%;
}

.typing-reference-keyboard-shell .typing-hand-left [data-finger="left-middle"] {
  left: 23.6%;
  top: 35.9%;
}

.typing-reference-keyboard-shell .typing-hand-left [data-finger="left-index"] {
  left: 29.8%;
  top: 37.6%;
}

.typing-reference-keyboard-shell .typing-hand-left [data-finger="left-thumb"] {
  left: 40%;
  top: 51.2%;
}

.typing-reference-keyboard-shell .typing-hand-right [data-finger="right-thumb"] {
  left: 55.7%;
  top: 51.2%;
}

.typing-reference-keyboard-shell .typing-hand-right [data-finger="right-index"] {
  left: 65.9%;
  top: 37.6%;
}

.typing-reference-keyboard-shell .typing-hand-right [data-finger="right-middle"] {
  left: 71.6%;
  top: 35.6%;
}

.typing-reference-keyboard-shell .typing-hand-right [data-finger="right-ring"] {
  left: 76.9%;
  top: 38.5%;
}

.typing-reference-keyboard-shell .typing-hand-right [data-finger="right-pinky"] {
  left: 83.4%;
  top: 46.3%;
}

.typing-reference-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px 10px 8px 12px;
  border-radius: 14px;
}

.typing-reference-tip {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.typing-reference-tip-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.typing-reference-tip-icon::before,
.typing-reference-tip-icon::after {
  content: "";
  position: absolute;
}

.typing-reference-tip-icon::before {
  inset: 0;
  border: 2px solid #f6c43f;
  border-radius: 10px 10px 8px 8px;
  border-bottom-width: 1px;
}

.typing-reference-tip-icon::after {
  left: 7px;
  bottom: -3px;
  width: 4px;
  height: 5px;
  background: #f6c43f;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.typing-reference-tip-copy {
  color: var(--reference-text);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.typing-reference-tip-copy strong {
  color: #f6c43f;
}

.typing-reference-actions {
  display: flex;
  gap: 8px;
  min-width: 0;
}

.typing-reference-primary,
.typing-reference-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
}

.typing-reference-primary {
  border: 0;
  background: linear-gradient(180deg, #5a94ff, #356fe6);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(53, 111, 230, 0.28);
}

.typing-reference-secondary {
  border: 1px solid var(--reference-line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--reference-text);
}

.typing-reference-primary,
.typing-reference-secondary {
  text-decoration: none;
}

.typing-speed-reference .typing-reference-layout {
  grid-template-columns: 278px minmax(0, 1fr);
}

.typing-speed-reference .typing-reference-sidebar,
.typing-speed-reference .typing-reference-sidebar-body {
  gap: 14px;
}

.typing-speed-settings {
  display: grid;
  gap: 10px;
}

.typing-speed-control {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--reference-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.typing-speed-control h3,
.typing-speed-custom-panel strong,
.typing-speed-results h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
}

.typing-speed-option-grid {
  display: grid;
  gap: 7px;
}

.typing-speed-duration-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.typing-speed-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--reference-line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--reference-text-soft);
  font-size: 12px;
  font-weight: 800;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.typing-speed-option:hover {
  border-color: rgba(102, 145, 255, 0.32);
  transform: translateY(-1px);
}

.typing-speed-option[aria-pressed="true"] {
  border-color: rgba(102, 145, 255, 0.42);
  background: linear-gradient(180deg, #5b8dff, #3569e5);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(52, 88, 181, 0.22);
}

.typing-speed-weak-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.typing-speed-reference .typing-weak-pill {
  min-height: 28px;
  padding: 0 9px;
  border-color: var(--reference-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--reference-text-soft);
  font-size: 11px;
}

.typing-speed-reference .typing-weak-pill strong {
  color: var(--reference-text);
  font-size: 12px;
}

.typing-speed-custom-panel,
.typing-speed-results {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--reference-line);
  border-radius: 16px;
  background: var(--reference-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.typing-speed-custom-panel {
  grid-template-columns: minmax(0, 0.55fr) minmax(280px, 1fr);
  align-items: center;
}

.typing-speed-custom-panel p,
.typing-speed-results p {
  margin: 4px 0 0;
  color: var(--reference-text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.typing-speed-custom-panel textarea {
  width: 100%;
  min-height: 84px;
  padding: 12px;
  border: 1px solid var(--reference-line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--reference-text);
  resize: vertical;
  outline: none;
}

.typing-speed-custom-panel textarea:focus {
  border-color: rgba(79, 141, 255, 0.46);
  box-shadow: 0 0 0 4px rgba(79, 141, 255, 0.12);
}

.typing-speed-reference .typing-reference-board-shell {
  min-height: 124px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.typing-speed-reference .typing-reference-prompt {
  min-height: 78px;
  max-height: 82px;
  padding: 2px 4px 0;
  overflow: hidden;
  text-align: left;
  color: rgba(232, 237, 247, 0.72);
  font-family: "Cascadia Code", "Consolas", "SFMono-Regular", ui-monospace, monospace;
  font-size: 18px;
  line-height: 1.48;
  white-space: pre-wrap;
  word-break: break-word;
}

.typing-speed-reference .typing-reference-prompt .typing-char {
  display: inline;
  min-width: 0;
  min-height: 0;
  padding: 0 1px;
  border-radius: 6px;
  color: rgba(232, 237, 247, 0.58);
  font-size: inherit;
  font-weight: 600;
  line-height: inherit;
}

.typing-speed-reference .typing-reference-prompt .typing-char.is-correct {
  color: var(--reference-success);
  background: rgba(141, 219, 138, 0.12);
}

.typing-speed-reference .typing-reference-prompt .typing-char.is-incorrect {
  color: #ffb0b0;
  background: rgba(255, 117, 117, 0.16);
}

.typing-speed-reference .typing-reference-prompt .typing-char.is-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 25px;
  padding: 0 5px;
  color: #ffffff;
  vertical-align: baseline;
}

.typing-speed-reference .typing-reference-prompt .typing-char.is-space {
  display: inline-block;
  min-width: 10px;
}

.typing-speed-focus {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding: 7px 9px;
  border: 1px dashed var(--reference-line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.typing-speed-focus.is-focused {
  border-color: rgba(79, 141, 255, 0.48);
  background: rgba(79, 141, 255, 0.1);
}

.typing-speed-focus .typing-focus-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.typing-speed-focus .typing-focus-copy strong {
  color: var(--reference-text);
  font-size: 12px;
}

.typing-speed-focus .typing-focus-copy span {
  color: var(--reference-text-soft);
  font-size: 11px;
}

.typing-speed-results {
  animation: typing-fade-up 0.22s ease;
}

.typing-speed-results-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 14px;
}

.typing-speed-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.typing-speed-result-metric {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--reference-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.typing-speed-result-metric span {
  display: block;
  color: var(--reference-text-soft);
  font-size: 11px;
  font-weight: 800;
}

.typing-speed-result-metric strong {
  display: block;
  margin-top: 4px;
  color: var(--reference-text);
  font-size: 20px;
  line-height: 1;
}

.typing-speed-reference .typing-reference-keyboard {
  max-width: 100%;
}

@media (max-width: 1180px) {
  .typing-reference-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 900px) {
  .typing-tutor-reference {
    padding: 16px;
  }

  .typing-reference-layout {
    grid-template-columns: 1fr;
  }

  .typing-speed-reference .typing-reference-layout {
    grid-template-columns: 1fr;
  }

  .typing-speed-reference .typing-speed-option-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .typing-speed-reference .typing-speed-duration-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .typing-speed-custom-panel {
    grid-template-columns: 1fr;
  }

  .typing-reference-topbar,
  .typing-reference-bottom {
    grid-template-columns: 1fr;
  }

  .typing-reference-controls {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .typing-reference-sidebar {
    gap: 14px;
  }

  .typing-reference-sidebar-body {
    gap: 14px;
  }

  .typing-reference-lesson-list {
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 78vw);
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .typing-reference-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .typing-reference-stat:last-child {
    grid-column: 1 / -1;
  }

  .typing-reference-keyboard-head {
    flex-wrap: wrap;
  }

  .typing-reference-keyboard-shell {
    min-width: 720px;
  }

  .typing-reference-keyboard-shell [data-typing-fingers].typing-finger-grid {
    --hand-guide-size: 500px;
    --hand-guide-offset-y: -176px;
    inset: auto;
    width: min(100%, 580px);
    height: 168px;
  }

  .typing-reference-keyboard-shell [data-typing-fingers].typing-finger-grid::before {
    opacity: 1;
  }

  .typing-reference-keyboard-shell .typing-hand-stage,
  .typing-reference-keyboard-shell .typing-hand {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .typing-reference-stage {
    padding: 8px 0 calc(20px + env(safe-area-inset-bottom));
  }

  .typing-tutor-reference {
    padding: 14px;
    border-radius: 22px;
  }

  .typing-reference-heading h2 {
    font-size: 30px;
  }

  .typing-reference-summary {
    font-size: 14px;
  }

  .typing-reference-theme {
    flex: 1 1 100%;
    width: 100%;
    justify-content: stretch;
  }

  .typing-reference-theme-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .typing-reference-progress-pill {
    width: 100%;
    justify-content: space-between;
  }

  .typing-speed-reference .typing-speed-option-grid,
  .typing-speed-reference .typing-speed-duration-grid,
  .typing-speed-result-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .typing-speed-focus {
    display: grid;
  }

  .typing-reference-keyboard-head {
    flex-direction: column;
    align-items: stretch;
  }

  .typing-reference-keyboard {
    justify-self: stretch;
    max-width: 100%;
  }

  .typing-reference-hands-toggle {
    align-self: flex-start;
  }

  .typing-reference-keyboard-instruction {
    font-size: 12px;
  }

  .typing-reference-keyboard-instruction strong {
    font-size: 13px;
  }

  .typing-reference-keyboard-shell {
    min-width: 720px;
    padding: 8px;
  }

  .typing-reference-keyboard-shell::before {
    inset: 6px;
  }

  .typing-reference-guide {
    position: static;
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 0;
    margin-bottom: 10px;
  }

  .typing-reference-check {
    white-space: normal;
  }

  .typing-reference-keyboard-shell [data-typing-fingers].typing-finger-grid::before {
    opacity: 1;
  }

  .typing-reference-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .typing-reference-stat:last-child {
    grid-column: 1 / -1;
  }

  .typing-reference-prompt .typing-char {
    font-size: 23px;
  }

  .typing-reference-guide-actions,
  .typing-reference-actions {
    display: grid;
  }

  .typing-reference-tip {
    align-items: flex-start;
  }

  .typing-reference-primary,
  .typing-reference-secondary {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .typing-reference-stats {
    grid-template-columns: 1fr;
  }

  .typing-reference-stat:last-child {
    grid-column: auto;
  }
}

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