.aesthetic-page { max-width: 58rem; }
.aesthetic-intro { max-width: 44rem; }
.theme-lab { margin: 2rem 0 2.5rem; }
.lab-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.lab-heading h2 { margin: 0; font-size: 1rem; }
.lab-heading > span, .preview-top, .test-stats { font-family: 'JetBrains Mono', monospace; font-size: .75rem; }
.lab-heading > span { color: var(--sub); }
.theme-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; margin-bottom: .8rem; }
.theme-choice { min-height: 64px; border: 2px solid transparent; border-radius: 10px; background: var(--choice-bg); color: var(--choice-text); font: inherit; font-size: .82rem; text-align: left; padding: .7rem .85rem; cursor: pointer; }
.theme-choice:disabled { cursor: default; }
.theme-choice[aria-pressed="true"] { border-color: var(--choice-accent); }
.theme-choice::after { content: '○'; float: right; color: var(--choice-accent); }
.theme-choice[aria-pressed="true"]::after { content: '●'; }
.theme-choice:focus-visible, .theme-continue:focus-visible, #aesthetic-restart:focus-visible { outline: 3px solid var(--main); outline-offset: 3px; }
.typing-preview { --preview-bg: #1e1e2e; --preview-text: #cdd6f4; --preview-main: #cba6f7; --preview-caret: #f38ba8; --preview-error: #f38ba8; background: var(--preview-bg); color: var(--preview-text); border: 1px solid var(--line); border-radius: 16px; padding: 1.4rem; }
.preview-top { display: flex; justify-content: space-between; gap: 1rem; color: var(--preview-main); padding-bottom: 1rem; border-bottom: 1px solid currentColor; }
.preview-mode { color: var(--preview-text); }
.test-stats { display: flex; gap: 1.25rem; flex-wrap: wrap; margin: 1rem 0; font-variant-numeric: tabular-nums; }
.test-stats b { font-size: 1.2rem; font-weight: 500; color: var(--preview-main); }
.test-label { display: block; font-size: .8rem; margin-bottom: .8rem; }
.test-window { height: 7.2rem; overflow: hidden; position: relative; cursor: text; border-radius: 4px; }
#aesthetic-words { position: relative; font: 1.4rem/2.4rem 'JetBrains Mono', monospace; letter-spacing: .01em; }
.test-word { display: inline-block; white-space: pre; }
.test-char { opacity: 1; }
.test-char.correct { font-weight: 700; }
.test-char.incorrect { opacity: 1; color: var(--preview-error); text-decoration: underline; text-decoration-thickness: 2px; }
.test-char.current { opacity: 1; border-left: 2px solid var(--preview-caret); margin-left: -2px; }
.test-input { display: block; width: 100%; height: 44px; margin: .6rem 0; border: 1px solid var(--preview-main); border-radius: 6px; background: transparent; color: var(--preview-text); font: 16px 'JetBrains Mono', monospace; padding: .5rem .7rem; }
.test-input:focus-visible { outline: 2px solid var(--preview-caret); outline-offset: 2px; }
.test-input:disabled { opacity: .6; }
.test-bottom { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.test-bottom p { margin: 0; font-size: .75rem; opacity: 1; }
#aesthetic-restart { flex-shrink: 0; min-height: 44px; background: transparent; color: var(--preview-main); border: 1px solid var(--preview-main); border-radius: 6px; padding: .5rem .8rem; font: inherit; font-size: .8rem; cursor: pointer; }
.test-result { margin: .8rem 0 0; font-weight: 600; opacity: 1; }
.test-result:empty { display: none; }
.theme-continue { display: inline-block; color: var(--preview-bg); background: var(--preview-text); padding: .8rem 1.1rem; border-radius: 8px; margin-top: 1.2rem; font-weight: 600; font-size: .85rem; }
.theme-continue:hover { text-decoration: none; filter: brightness(1.08); }
.theme-continue:active, .theme-choice:active, #aesthetic-restart:active { transform: translateY(1px); }
.lab-note { color: var(--sub); font-size: .78rem; margin-top: .8rem; }
.aesthetic-page .mode-grid { margin-bottom: 1rem; }
.aesthetic-page .mode-card h3 { color: var(--text); }
@media (max-width: 34rem) {
  .theme-choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .typing-preview { padding: 1rem; }
  .test-stats { gap: .8rem; }
  .test-bottom { align-items: flex-start; }
  .lab-heading { flex-wrap: wrap; gap: .3rem; }
}
