@import url('./fonts.css');
:root {
  --bg: #eef1f7;
  --panel: #fff;
  --paper: #ffffff;
  --ink: #18243e;
  --muted: #56647c;
  --line: #cdd5e3;
  --accent: #2249b6;
  --accent-soft: #dce6ff;
  --soft: #edf2ff;
  --correction: #ab3046;
  --warning: #fff0f2;
  --shadow: 0 12px 40px #15294f0a;
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button {
  color: inherit;
}
a {
  color: inherit;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid #426df0;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 28px 22px 22px;
  border-left: 7px solid var(--accent);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 30px;
  letter-spacing: -1.6px;
  font-family: Georgia, serif;
  font-weight: 400;
}
.brand svg {
  width: 34px;
  fill: var(--accent);
}
.brand-dot {
  color: #4265c0;
}
.nav-button.active {
  box-shadow: inset 3px 0 var(--accent);
}
.section-label, .eyebrow, .mini-label {
  font-family: ui-monospace, monospace;
}
.side-caption {
  font-size: 11px;
  color: var(--muted);
  margin: 14px 0 36px;
}
.navigation {
  display: grid;
  gap: 6px;
}
.nav-button {
  border: 0;
  background: transparent;
  border-radius: 3px;
  padding: 13px 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  font-size: 13px;
  font-weight: 550;
}
.nav-button:hover,
.page-button:hover {
  background: var(--soft);
}
.nav-button.active {
  background: var(--soft);
  color: var(--accent);
}
.nav-icon {
  font-size: 20px;
  width: 21px;
}
.nav-count {
  margin-left: auto;
  font-size: 10px;
  background: var(--panel);
  padding: 3px 6px;
  border-radius: 4px;
}
.side-section {
  margin-top: 32px;
  overflow: auto;
}
.section-label {
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 650;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.icon-button {
  background: transparent;
  border: 0;
  min-width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  font-size: 18px;
}
.icon-button:hover {
  background: var(--soft);
}
.notebook-head {
  display: flex;
  align-items: center;
  gap: 5px;
  margin: 10px 0 5px;
}
.book-button {
  background: none;
  border: 0;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
  flex: 1;
  padding: 8px 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rename-book {
  font-size: 12px;
}
.page-button {
  display: block;
  width: 100%;
  background: none;
  border: 0;
  border-radius: 6px;
  text-align: left;
  padding: 9px 10px 9px 18px;
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.page-button.active {
  background: var(--soft);
  color: var(--accent);
  border-left: 2px solid #4265c0;
}
.text-button {
  border: 0;
  background: none;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
  padding: 8px 0;
}
.text-button:hover {
  color: var(--ink);
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 24px;
}
.focus-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 13px;
}
.focus-card .section-label {
  font-size: 8px;
  letter-spacing: 1px;
}
.focus-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0;
}
.focus-row #timer {
  font-size: 28px;
  letter-spacing: -1.3px;
  margin-right: auto;
  font-variant-numeric: tabular-nums;
}
.small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.7;
}
.side-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 9px;
}
.local-badge {
  font-size: 9px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
}
.local-badge span,
.quiet-row .dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: #4265c0;
  border-radius: 50%;
}
.content {
  min-width: 0;
}
.topbar {
  height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.topbar #breadcrumb {
  color: var(--muted);
}
#breadcrumb span {
  margin: 0 12px;
  color: #8390a7;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 15px;
}
#save-status {
  color: var(--muted);
  font-size: 10px;
}
#mobile-menu {
  display: none;
}
main {
  padding: 26px 36px 20px;
  max-width: 1800px;
  margin: auto;
}
.heading-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--muted);
  font-weight: 650;
  margin: 0 0 12px;
}
h1,
#page-title {
  font-family: Georgia, 'Times New Roman', serif;
  letter-spacing: -1px;
  font-weight: 400;
  font-size: 40px;
  margin: 0;
}
#page-title {
  background: transparent;
  border: 0;
  width: 100%;
  padding: 0;
  color: var(--ink);
  max-width: 600px;
  text-overflow: ellipsis;
}
h2,
h3,
p {
  margin-top: 0;
}
.subtitle {
  font-size: 12px;
  color: var(--muted);
  margin: 10px 0 0;
}
.heading-actions {
  display: flex;
  gap: 9px;
  flex-shrink: 0;
}
.button {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 15px;
  font-size: 11px;
  font-weight: 550;
  display: inline-flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  background: var(--panel);
}
.button:hover {
  filter: brightness(0.97);
}
.button.primary {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.button.subtle {
  background: var(--panel);
}
.button.full {
  width: 100%;
  justify-content: space-between;
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 22px;
  align-items: start;
}
.paper-panel {
  border: 1px solid var(--line);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--panel);
}
.toolbar {
  min-height: 57px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--line);
  padding-right: 9px;
  margin-right: 3px;
}
.tool-group:last-child {
  border: 0;
  padding: 0;
  margin: 0;
}
.tool {
  width: 31px;
  height: 31px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  font-size: 21px;
}
.tool.active {
  background: var(--soft);
  color: var(--accent);
}
.tool:hover {
  background: var(--soft);
}
.swatch {
  border: 3px solid var(--panel);
  outline: 1px solid transparent;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  background: var(--swatch);
  padding: 0;
  margin: 0 1px;
}
.swatch.active {
  outline-color: #4265c0;
}
.toolbar input[type='range'] {
  width: 49px;
  accent-color: var(--accent);
  margin-left: 4px;
}
.toolbar select {
  font-size: 10px;
  background: var(--panel);
  color: var(--muted);
  border: 0;
  max-width: 63px;
}
.canvas-scroll {
  height: 550px;
  overflow: auto;
  background: var(--paper);
  scrollbar-width: thin;
}
.paper {
  position: relative;
  width: 100%;
  min-height: 100%;
  background: var(--paper);
  transform-origin: top left;
}
.paper.dot {
  background-image: radial-gradient(circle, #bcc9e1 1px, transparent 1.2px);
  background-size: 22px 22px;
}
.paper.line {
  background-image: linear-gradient(to bottom, transparent 31px, #d0dbed 32px);
  background-size: 100% 32px;
}
.paper canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}
.blank-hint {
  position: absolute;
  top: 105px;
  left: 20px;
  right: 20px;
  text-align: center;
  pointer-events: none;
}
.blank-hint button {
  pointer-events: auto;
  margin-top: 8px;
}
.paper-star {
  display: inline-block;
  font: italic 32px Georgia, serif;
  color: #2249b6;
  border-bottom: 2px solid #ab3046;
  padding: 0 10px 8px;
}
.blank-hint h2 {
  font-family: Georgia, serif;
  letter-spacing: -1px;
  font-weight: 400;
  font-size: 25px;
  margin: 10px 0;
}
.blank-hint p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.paper-footer {
  height: 42px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  font-size: 9px;
  color: var(--muted);
}
.paper-footer > div {
  display: flex;
  align-items: center;
  gap: 5px;
}
.paper-footer .icon-button {
  font-size: 14px;
  min-width: 22px;
}
.check-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 21px;
  border-radius: 4px;
  box-shadow: var(--shadow);
}
.check-header {
  display: flex;
  gap: 11px;
  align-items: center;
}
.compass {
  width: 38px;
  height: 38px;
  border-radius: 3px;
  background: var(--soft);
  display: grid;
  place-items: center;
  font: 25px Georgia, serif;
  color: var(--accent);
}
.check-header h2 {
  font-size: 15px;
  font-weight: 550;
  margin: 0 0 5px;
  letter-spacing: -0.3px;
}
.check-header p {
  font-size: 9px;
  color: var(--muted);
  margin: 0;
}
.quiet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  margin: 18px 0;
  color: var(--muted);
}
.quiet-row .dot {
  margin-right: 5px;
}
.switch input {
  width: 30px;
  height: 17px;
  accent-color: var(--accent);
}
.transcript-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 7px;
}
.transcript-heading label {
  font-size: 10px;
  font-weight: 600;
}
.transcript-heading .text-button {
  font-size: 9px;
  padding: 4px 0;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 150px;
  max-height: 450px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  padding: 12px;
  line-height: 1.8;
  font-family: ui-monospace, monospace;
  font-size: 12px;
  color: var(--ink);
}
textarea::placeholder {
  color: #56647c;
  font-size: 12px;
}
.check-panel .small {
  font-size: 9px;
  margin: 7px 0 15px;
}
.results {
  margin-top: 22px;
}
.check-empty {
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
}
.mini-label {
  font-size: 9px;
  letter-spacing: 1.1px;
  color: var(--muted);
  font-weight: 600;
}
.check-empty h3 {
  font-family: Georgia, serif;
  font-size: 21px;
  letter-spacing: -0.3px;
  font-weight: 450;
  line-height: 1.35;
  margin: 12px 0;
}
.check-empty p {
  font-size: 10px;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
}
.step-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 9px;
  overflow-wrap: anywhere;
}
.step-result .step-line {
  font:
    11px ui-monospace,
    monospace;
  margin-bottom: 9px;
  color: var(--muted);
}
.step-result h3 {
  font-size: 11px;
  margin-bottom: 6px;
}
.step-result p {
  font-size: 10px;
  line-height: 1.7;
  margin: 0;
  color: var(--muted);
}
.step-result.correct {
  background: var(--soft);
}
.step-result.incorrect,
.step-result.unverified {
  background: var(--warning);
  border-color: #e5b3bd;
}
.step-result.incorrect h3 {
  color: var(--correction);
}
.step-result .text-button {
  font-size: 10px;
  color: var(--accent);
  margin-top: 7px;
}
.scope {
  font-size: 10px;
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 15px;
  color: var(--muted);
  line-height: 1.8;
}
.scope summary {
  cursor: pointer;
}
.scope p {
  margin-top: 12px;
  margin-bottom: 0;
}
.app-footer {
  display: flex;
  justify-content: space-between;
  margin: 20px 36px 24px;
  color: var(--muted);
  font-size: 9px;
}
.topic-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.topic-button {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 25px;
  padding: 10px 16px;
  font-size: 11px;
}
.topic-button.active {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}
.practice-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(200px, 1fr);
  gap: 24px;
}
.practice-card,
.progress-card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 32px;
  border-radius: 15px;
}
.practice-card h2 {
  font-size: 27px;
  letter-spacing: -1px;
  font-weight: 450;
  margin: 36px 0;
}
.practice-card label {
  display: block;
  font-size: 11px;
  margin-bottom: 10px;
}
.practice-card input {
  width: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--bg);
  font:
    20px ui-monospace,
    monospace;
  color: var(--ink);
}
.practice-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.practice-card details {
  font-size: 11px;
  margin-top: 25px;
  line-height: 1.8;
}
.practice-card details summary {
  cursor: pointer;
}
.practice-card details p {
  margin: 15px 0;
}
.hint-text {
  background: var(--warning);
  padding: 16px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.7;
  margin: 20px 0;
}
.practice-aside {
  border-radius: 15px;
  background: var(--soft);
  padding: 30px;
  align-self: start;
}
.large-star {
  font-size: 60px;
  color: #4265c0;
}
.practice-aside h2 {
  font:
    500 25px Manrope,
    sans-serif;
  letter-spacing: -1px;
  margin: 20px 0;
}
.practice-aside p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.practice-aside .small {
  font-size: 10px;
}
.review-item {
  font-size: 11px;
  border-top: 1px solid var(--line);
  padding: 12px 0;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 25px 0;
}
.stat {
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat strong {
  font-size: 38px;
  font-weight: 400;
  display: block;
  margin-bottom: 10px;
}
.stat span {
  font-size: 11px;
  color: var(--muted);
}
.progress-card {
  margin-bottom: 20px;
}
.progress-card h2 {
  font-size: 18px;
  font-weight: 500;
}
.mastery-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 100px;
  gap: 20px;
  align-items: center;
  font-size: 12px;
  margin: 26px 0;
}
.mastery-track {
  height: 7px;
  background: var(--bg);
  border-radius: 7px;
  overflow: hidden;
}
.mastery-track span {
  display: block;
  height: 100%;
  background: #4265c0;
  border-radius: 7px;
}
.mastery-row small {
  text-align: right;
  color: var(--muted);
  font-size: 10px;
}
.attempt-row {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  gap: 12px;
}
.attempt-row span {
  color: var(--muted);
}
dialog {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  width: min(570px, calc(100vw - 32px));
  padding: 28px;
  max-height: 85vh;
  overflow: auto;
  box-shadow: 0 30px 100px #0003;
}
dialog::backdrop {
  background: #14213c66;
  backdrop-filter: blur(3px);
}
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.dialog-header h2 {
  font:
    500 24px Manrope,
    sans-serif;
  letter-spacing: -0.8px;
  margin: 0;
}
dialog > p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.settings-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 23px 0;
  border-top: 1px solid var(--line);
  align-items: center;
}
.settings-row h3 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.settings-row p {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}
.privacy-note {
  background: var(--soft);
  padding: 18px;
  border-radius: 10px;
  font-size: 12px;
}
.privacy-note p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.9;
  margin: 10px 0 0;
}
.help-steps {
  padding-left: 20px;
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
}
.help-steps li {
  margin: 14px 0;
}
.help-steps strong {
  color: var(--ink);
}
.shortcuts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-size: 11px;
  gap: 14px;
  background: var(--bg);
  padding: 20px;
  border-radius: 10px;
}
.shortcuts dd {
  margin: 0;
  color: var(--muted);
}
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #ffffff;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 12px;
  max-width: calc(100vw - 40px);
  z-index: 10;
  box-shadow: 0 10px 30px #0002;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 20;
  background: var(--accent);
  color: white;
  padding: 12px;
}
.skip:focus {
  top: 10px;
}
:root[data-theme='dark'] {
  --bg: #111827;
  --panel: #1a2437;
  --ink: #edf2ff;
  --muted: #afbed7;
  --line: #34435e;
  --accent: #dce6ff;
  --accent-soft: #2249b6;
  --soft: #26354f;
  --warning: #412735;
  --correction: #ffb0c0;
  color-scheme: dark;
}
.dark-note {
  color: var(--correction);
}
:root[data-theme='dark'] .button.primary,
:root[data-theme='dark'] .topic-button.active {
  color: #2249b6;
}
:root[data-theme='dark'] .paper {
  --paper: #ffffff;
  color: #18243e;
}
:root[data-theme='dark'] .blank-hint p {
  color: #56647c;
}
:root[data-theme='dark'] .blank-hint h2 {
  color: #18243e;
}
:root[data-theme='dark'] .toast {
  color: #2249b6;
}
@media (min-width: 1500px) {
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .canvas-scroll {
    height: 650px;
  }
}
@media (max-width: 1150px) {
  .shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .sidebar {
    padding: 26px 16px;
  }
  .studio-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 14px;
  }
  main {
    padding: 28px 22px;
  }
  .topbar {
    padding: 0 22px;
  }
  .heading-actions {
    gap: 6px;
  }
  .heading-actions .button {
    font-size: 10px;
    padding: 10px;
  }
  .check-panel {
    padding: 16px;
  }
  #page-title {
    font-size: 29px;
  }
  .history {
    border: 0;
  }
  .toolbar {
    padding: 7px;
  }
  .tool-group {
    gap: 1px;
    padding-right: 5px;
    margin-right: 0;
  }
  .toolbar input[type='range'] {
    width: 35px;
  }
  .canvas-scroll {
    height: 510px;
  }
  .app-footer {
    margin-left: 22px;
    margin-right: 22px;
  }
}
@media (max-width: 950px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
  .check-panel {
    display: block;
  }
  .check-header {
    margin-bottom: 15px;
  }
  .quiet-row {
    margin: 15px 0;
  }
  .canvas-scroll {
    height: 480px;
  }
  .practice-layout {
    grid-template-columns: 1fr;
  }
  .practice-aside {
    display: none;
  }
  .heading-row {
    align-items: flex-start;
  }
  .heading-actions {
    flex-direction: column;
  }
  .sidebar {
    width: 200px;
  }
  .mastery-row {
    grid-template-columns: 130px 1fr 75px;
    gap: 12px;
  }
}
@media (max-width: 650px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 238px;
    z-index: 8;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 10px 0 40px #0002;
  }
  .sidebar.open {
    transform: translateX(0);
  }
  #mobile-menu {
    display: inline-grid;
    margin-right: 8px;
  }
  .topbar {
    height: 61px;
    padding: 0 15px;
    justify-content: flex-start;
  }
  .topbar-right {
    margin-left: auto;
    gap: 8px;
  }
  #breadcrumb {
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 42vw;
  }
  .topbar #breadcrumb span {
    margin: 0 7px;
  }
  #save-status {
    font-size: 8px;
  }
  main {
    padding: 25px 15px 10px;
  }
  .heading-row {
    gap: 10px;
    margin-bottom: 23px;
  }
  #page-title,
  h1 {
    font-size: 27px;
    letter-spacing: -1px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.6px;
  }
  .subtitle {
    font-size: 10px;
    line-height: 1.8;
  }
  .heading-actions .button {
    font-size: 9px;
    padding: 9px;
    gap: 5px;
  }
  .toolbar {
    gap: 3px;
    padding: 7px;
  }
  .tool-group {
    padding-right: 3px;
  }
  .tool {
    width: 26px;
  }
  .toolbar input[type='range'] {
    width: 32px;
  }
  .toolbar select {
    max-width: 50px;
  }
  .canvas-scroll {
    height: 400px;
  }
  .blank-hint {
    top: 110px;
  }
  .blank-hint h2 {
    font-size: 21px;
  }
  .blank-hint p {
    font-size: 10px;
  }
  .paper-footer {
    padding: 0 10px;
    font-size: 8px;
  }
  .paper-footer > span:nth-child(2) {
    display: none;
  }
  .check-panel {
    padding: 20px;
  }
  .app-footer {
    margin: 20px 15px;
    font-size: 8px;
  }
  .practice-card,
  .progress-card {
    padding: 23px;
  }
  .practice-card h2 {
    font-size: 23px;
  }
  .stats {
    gap: 8px;
  }
  .stat {
    padding: 15px;
  }
  .stat strong {
    font-size: 27px;
  }
  .stat span {
    font-size: 9px;
  }
  .mastery-row {
    grid-template-columns: 110px 1fr 60px;
    font-size: 10px;
    gap: 10px;
  }
  .mastery-row small {
    font-size: 8px;
  }
  .settings-row {
    gap: 10px;
  }
  .settings-row .button {
    font-size: 9px;
    white-space: nowrap;
    padding: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .sidebar,
  .topbar,
  .heading-actions,
  .toolbar,
  .check-panel,
  .paper-footer,
  .app-footer,
  dialog,
  .toast,
  .skip {
    display: none !important;
  }
  .shell {
    display: block;
  }
  main {
    padding: 0;
  }
  .studio-grid {
    display: block;
  }
  .paper-panel {
    box-shadow: none;
    border: 0;
  }
  .canvas-scroll {
    height: auto;
    overflow: visible;
  }
  .paper {
    width: 100% !important;
  }
  .heading-row {
    margin: 0 0 15px;
  }
  .subtitle,
  .eyebrow {
    display: none;
  }
  body {
    background: white;
  }
  .view[hidden] {
    display: none !important;
  }
}
.quiet-reading {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin: -5px 0 16px;
}
.quiet-reading .small {
  font-size: 9px;
  margin: 0;
}
.ink-suggestion {
  font-size: 10px;
  line-height: 1.7;
  margin-top: 9px;
}
.ink-suggestion strong {
  color: var(--correction);
}
.ink-suggestion p {
  margin: 7px 0 0;
  color: var(--muted);
}
#ink-marks {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: auto;
  aspect-ratio: 5 / 6;
  pointer-events: none;
}
.ink-mark {
  position: absolute;
  outline: 2px dashed #ab3046;
  outline-offset: 8px;
  border-radius: 3px;
}
.ink-mark span {
  position: absolute;
  top: -27px;
  right: 0;
  background: #fff0f2;
  color: #98253a;
  padding: 4px 7px;
  border-radius: 5px;
  font:
    10px system-ui,
    sans-serif;
  white-space: nowrap;
}
#tutor-open {
  display: block;
  margin-top: 15px;
  color: var(--accent);
}
#tutor-model {
  display: block;
  width: 100%;
  padding: 10px;
  margin: 8px 0 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-size: 12px;
}
.tutor-messages {
  max-height: 350px;
  overflow: auto;
  margin: 15px 0;
  display: grid;
  gap: 12px;
}
.tutor-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  background: var(--soft);
  padding: 14px 16px;
  border-radius: 9px;
  font-size: 12px;
  line-height: 1.8;
}
.tutor-message.user {
  background: var(--bg);
  margin-left: 25px;
}
.tutor-message strong {
  display: block;
  font-size: 9px;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 7px;
}
