@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;500;600;700&family=Noto+Serif+JP:wght@400;500;600&display=swap");

:root {
  color-scheme: light;
  --paper: #f6f3eb;
  --ink: #343c35;
  --muted: #818478;
  --accent: #a64f3c;
  --line: #dfdfd3;
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23746d5c' opacity='.035' filter='url(%23n)' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: not-allowed; opacity: .4; }
button, input, select, a { outline-offset: 5px; }
:focus-visible { outline: 2px solid var(--accent); }
[hidden] { display: none !important; }
.site-header { max-width: 1440px; margin: auto; height: 100px; padding: 0 6%; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; color: var(--ink); text-decoration: none; font-size: 23px; font-weight: 600; letter-spacing: -.9px; }
.brand-light { font-weight: 400; color: #777e70; }
.seal { display: grid; place-items: center; width: 35px; height: 38px; margin-right: 12px; border-radius: 3px; background: var(--accent); color: #fff7e7; font: 24px "Noto Serif JP", serif; transform: rotate(-3deg); }
.header-note, .level { font-size: 10px; letter-spacing: 2px; color: var(--muted); }
.level { color: #616d5b; letter-spacing: 1.4px; }
.level span { padding: 0 9px; color: #b7b9ac; }
.game-link { color: #a64f3c; text-decoration: none; letter-spacing: 1.4px; }
.game-link:hover { text-decoration: underline; text-underline-offset: 3px; }
main { max-width: 1110px; margin: auto; padding: 0 40px; }
.study-tabs { display: flex; gap: 6px; padding: 18px 0 0; border-bottom: 1px solid var(--line); }
.study-tab { min-width: 110px; min-height: 48px; padding: 10px 20px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #667060; font-weight: 600; }
.study-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.study-tab:hover { background: #e9ecdf; }
.text-study { padding: 20px 0 32px; max-width: 740px; }
.text-study textarea { display: block; width: 100%; margin-top: 8px; padding: 12px; border: 1px solid #d5d8c8; border-radius: 8px; background: #fffdf7; color: var(--ink); font: 16px/1.6 "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif; resize: vertical; }
.text-study label { font-size: 14px; }
#text-status { min-height: 1.5em; }
.furigana { padding: 24px 16px 12px; line-height: 3; overflow-wrap: anywhere; background: #fffdf7; border: 1px solid var(--line); border-radius: 8px; font-size: 20px; }
.furigana rt { font-size: 12px; }
.frequency-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: #4b5546; font-size: 12px; }
.legend-swatch { width: 16px; height: 16px; border-radius: 3px; border: 1px solid #a8b19c; }
.frequency-1 { background: #e7efd9; }
.frequency-2 { background: #c2d79f; }
.frequency-3 { background: #91b56b; }
.frequency-kanji { display: inline; min-width: 1.15em; padding: 1px 2px; border: 0; border-radius: 3px; color: #1c3018; font: inherit; line-height: inherit; }
.frequency-kanji[aria-pressed="true"] { outline: 2px solid #a64f3c; outline-offset: 1px; }
.frequency-kanji:focus-visible { outline: 3px solid #593d9c; outline-offset: 2px; }
#frequency-range { margin-left: 4px; }
.unknown-token { text-decoration: underline dotted var(--accent); }
.text-ranking { display: grid; gap: 8px; margin-top: 14px; }
.text-result { display: flex; align-items: center; gap: 12px; padding: 12px; background: #fffdf7; border: 1px solid var(--line); border-radius: 8px; }
.text-result input { flex: none; width: 20px; height: 20px; }
.text-result span span, .text-result strong { display: block; line-height: 1.5; }
.text-result span[lang="ja"] { font-size: 16px; }
@media (max-width: 680px) { .study-tab { min-width: 0; padding-inline: 8px; } }
.study-tab:focus-visible { outline-offset: -3px; }
.section-label { font-size: 10px; font-weight: 600; letter-spacing: 1.8px; }
.workspace { display: grid; grid-template-columns: 315px minmax(0, 1fr); gap: 60px; padding: 35px 0 40px; border-top: 1px solid var(--line); }
.study-panel { padding-top: 5px; }
.section-label { color: #838776; margin: 0; }
.section-label > span { margin-right: 9px; color: #b0b3a5; }
h2 { font: 400 21px Georgia, "Noto Serif JP", serif; margin: 20px 0 25px; letter-spacing: -.35px; }
form label { display: block; font-size: 11px; color: #747b6e; margin-bottom: 10px; }
.input-wrap { display: flex; background: #fffdf7; border: 1px solid #d5d8c8; border-radius: 5px; padding: 6px; }
.input-wrap:focus-within { border-color: #7d886e; box-shadow: 0 0 0 3px #7d886e12; }
input[type="text"], input:not([type]) { min-width: 0; width: 100%; padding: 5px 10px; border: 0; background: transparent; color: var(--ink); font: 22px "Noto Serif JP", serif; }
.input-wrap input:focus-visible { outline: none; }
.submit-button { width: 39px; flex-shrink: 0; background: #6f7d61; color: white; border: 0; border-radius: 3px; font-size: 23px; }
.submit-button:hover { background: #526247; }
.helper { font-size: 10px; line-height: 1.7; color: var(--muted); margin: 10px 0 0; }
.error { color: var(--accent); font-size: 12px; line-height: 1.6; margin: 8px 0; }
.error:empty { display: none; }
.character-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 19px; }
.character-chip { padding: 7px 11px 6px; background: transparent; border: 1px solid var(--line); border-radius: 4px; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.chip-kanji { font: 22px "Noto Serif JP", serif; }
.chip-meaning { font-size: 9px; line-height: 1.3; color: var(--muted); max-width: 82px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip-meaning:empty { display: none; }
.character-chip[aria-pressed="true"] { border-color: #929e80; color: #56664a; background: #e9ecdf; }
.suggestions { margin-top: 35px; padding-top: 26px; border-top: 1px solid var(--line); }
.history { margin-top: 35px; padding-top: 26px; border-top: 1px solid var(--line); }
.history-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.history-heading .text-button { padding: 5px 9px; font-size: 10px; }
.history-list { margin-top: 14px; }
.history-list:empty { margin-top: 0; }
.sessions { margin-top: 35px; padding-top: 26px; border-top: 1px solid var(--line); }
.sessions .helper { margin-top: 12px; }
.session-list { list-style: none; margin: 10px 0 0; padding: 0; }
.session-list:empty { margin: 0; }
.session-list li { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid #e4e4d9; }
.session-list .text-button { padding: 4px 8px; font-size: 10px; flex-shrink: 0; }
.session-load { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; border: 0; background: transparent; padding: 10px 3px; text-align: left; }
.session-load:hover { background: #eceee3; }
.session-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-kanji { font: 15px "Noto Serif JP", serif; color: #56664a; flex-shrink: 0; }
.session-date { margin-left: auto; font-size: 9px; color: var(--muted); flex-shrink: 0; }
.preset-list { margin-top: 14px; }
.preset { width: 100%; border: 0; border-bottom: 1px solid #e4e4d9; background: transparent; padding: 13px 3px; display: flex; gap: 17px; align-items: center; text-align: left; }
.preset:hover { background: #eceee3; }
.preset > span:first-child { font: 25px "Noto Serif JP", serif; min-width: 55px; }
.preset > span:nth-child(2) { font-size: 12px; }
.preset small { display: block; color: var(--muted); font-size: 10px; margin-top: 5px; }
.preset-arrow { margin-left: auto; color: #939b86; font-size: 17px; }
.level-note { font-size: 9px; margin-top: 13px; }
.practice-note { display: flex; gap: 13px; margin-top: 30px; color: #7e8872; }
.note-icon { font-size: 27px; padding-top: 4px; }
.practice-note p { font: italic 14px/1.8 Georgia, serif; margin: 0; }
.practice-note p span { font: 10px "DM Sans", sans-serif; color: var(--muted); }
.drawing-panel { border: 1px solid #dedfd3; padding: 25px 30px 21px; background: #fcfbf580; box-shadow: 0 6px 24px #3e453205; border-radius: 6px; }
.drawing-heading { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.drawing-heading .section-label { font-size: 9px; }
.drawing-heading .section-label span { margin-left: 9px; color: #838776; }
.drawing-heading h2 { display: flex; align-items: center; gap: 13px; margin: 12px 0 3px; }
#current-character { font: 30px "Noto Serif JP", serif; }
#character-meaning { font: 17px Georgia, serif; }
#character-reading { color: #667060; font-size: 16px; line-height: 1.5; margin: 4px 0 0; min-height: 24px; }
.stroke-count { white-space: nowrap; border: 1px solid #dfe3d3; border-radius: 20px; padding: 6px 10px; background: #eff1e7; color: #738264; font-size: 10px; }
.sheet { position: relative; margin: 20px auto 0; width: min(100%, 360px); aspect-ratio: 1; background: #fffdf7; border: 1px solid #e4e2d7; }
#canvas { width: 100%; height: 100%; display: block; padding: 15px; }
.guidelines { fill: none; stroke: #dedfd2; stroke-width: .25; stroke-dasharray: 1 1.3; }
.guidelines .diagonal { opacity: .45; }
.ghost-strokes, .ink-strokes { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 3.1; }
.ghost-strokes { stroke: #e9e9de; }
.ink-strokes { stroke: #364033; }
.ink-strokes .active { stroke: var(--accent); }
.stroke-numbers { fill: #a64f3c; font: 4px system-ui, sans-serif; paint-order: stroke; stroke: #fffdf7; stroke-width: 1px; stroke-linejoin: round; }
/* Parchment and a subtle ink-brush flourish; paths remain the source of truth. */
.sheet { background: linear-gradient(120deg, #eee2c9, #fffaf0 20%, #f8efd9 80%, #eee1c7); border-color: #c9b999; box-shadow: inset 0 0 24px #8c704218, 0 5px 14px #66563812; }
#brush { pointer-events: none; }
.brush-handle { fill: #70503a; stroke: #4c3829; stroke-width: .3; }
.brush-tip { fill: #352e27; }
.slash-trail { fill: none; stroke: var(--accent); stroke-width: .8; stroke-linecap: round; }
.completion-seal { position: absolute; right: 8%; bottom: 9%; display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid #a64f3c; color: #a64f3c; font: 23px "Noto Serif JP", serif; transform: rotate(-9deg); opacity: .8; animation: seal-stamp .35s ease-out; pointer-events: none; }
@keyframes seal-stamp { from { opacity: 0; transform: rotate(-9deg) scale(1.5); } }
@media (prefers-reduced-motion: reduce) { .completion-seal { animation: none; } }
.sheet-corner { position: absolute; width: 9px; height: 9px; border-color: #a7ad95; border-style: solid; pointer-events: none; }
.top-left { left: -1px; top: -1px; border-width: 1px 0 0 1px; }
.bottom-right { right: -1px; bottom: -1px; border-width: 0 1px 1px 0; }
.sheet-caption { position: absolute; bottom: 8px; width: 100%; text-align: center; font-size: 7px; color: #a3a68f; letter-spacing: 2px; pointer-events: none; }
.sheet-caption span { padding: 0 5px; }
.canvas-message { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 30px; color: #6e7664; font-size: 13px; line-height: 1.8; background: #fffdf7ed; }
.retry { position: absolute; bottom: 22%; left: 50%; transform: translateX(-50%); border: 1px solid #929e80; border-radius: 4px; padding: 8px 15px; background: #fffdf7; }
.progress-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 10px; color: var(--muted); }
.progress-row p { margin: 0; }
#progress-count { font-size: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress-track { height: 3px; background: #e5e7db; margin-top: 9px; border-radius: 4px; overflow: hidden; }
.progress-track > span { display: block; height: 100%; width: 0; background: #899779; }
.playback { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 20px 0 17px; }
.icon-button { background: transparent; border: 0; font-size: 20px; padding: 8px; }
#step { font-size: 14px; white-space: nowrap; }
.play-button { background: #6e7c61; border: 0; border-radius: 4px; color: white; padding: 12px 17px; font-size: 11px; min-width: 130px; }
.play-button:hover:not(:disabled) { background: #536447; }
#play-icon { margin-right: 7px; font-size: 10px; }
.control-divider { height: 24px; width: 1px; background: var(--line); margin: 0 4px; }
.speed-label { color: var(--muted); font-size: 9px; }
select { display: block; max-width: 116px; padding: 3px 0; font-size: 10px; color: var(--ink); background: transparent; border: 0; }
.display-options { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 24px; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 9px; }
.display-options label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
input[type="checkbox"] { accent-color: #748266; margin: 0; width: 12px; height: 12px; }
#motion-note { width: 100%; text-align: center; }
.bottom-note { border-top: 1px solid var(--line); padding: 29px 0 37px; display: flex; justify-content: center; gap: 24px; align-items: center; }
.practice-panel { border-top: 1px solid var(--line); padding: 35px 0 40px; }
.practice-panel h2 { margin: 18px 0 6px; }
.practice-help { max-width: 460px; }
.practice-columns { display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: 40px; margin-top: 24px; }
.practice-sheet { position: relative; width: min(100%, 360px); aspect-ratio: 1; background: #fffdf7; border: 1px solid #e4e2d7; touch-action: none; }
.practice-guide { position: absolute; inset: 0; width: 100%; height: 100%; padding: 15px; pointer-events: none; }
.practice-guide path { fill: none; stroke: #e9e9de; stroke-width: 3.1; stroke-linecap: round; stroke-linejoin: round; }
#practice-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.practice-status { min-height: 2.2em; }
.practice-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin-top: 12px; }
.text-button { border: 1px solid #d5d8c8; border-radius: 4px; background: #fffdf7; padding: 8px 13px; font-size: 11px; }
.text-button:hover:not(:disabled) { background: #eceee3; }
.text-button.strong { background: #6f7d61; border-color: #6f7d61; color: white; }
.text-button.strong:hover:not(:disabled) { background: #526247; }
.text-button.danger { color: var(--accent); border-color: #d8c2ba; }
.practice-saved .section-label { margin-bottom: 4px; }
.practice-attempts { list-style: none; margin: 14px 0 0; padding: 0; font-size: 11px; color: var(--ink); }
.practice-attempts li { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-top: 1px solid #e4e4d9; }
.practice-attempts li:first-child { border-top: 0; }
.practice-attempts label { flex: 1; cursor: pointer; }
.practice-attempts .text-button { padding: 5px 9px; font-size: 10px; }
.review-note { color: #56664a; }
.bottom-note > span { font: 19px "Noto Serif JP", serif; color: #859075; letter-spacing: 4px; }
.bottom-note p { font: italic 15px/1.8 Georgia, serif; margin: 0; }
.bottom-note p span { font: 10px "DM Sans", sans-serif; color: var(--muted); }
footer { border-top: 1px solid var(--line); padding: 24px 6%; display: flex; justify-content: space-between; gap: 14px; color: #939889; font-size: 9px; }
footer a { color: #6c7d5e; text-underline-offset: 3px; }
.noscript { text-align: center; color: var(--accent); }
/* Gothic for interface text and readings; Mincho for prominent kanji.
   Stroke-order SVGs retain their original KanjiVG geometry. */
h2, #character-meaning, .practice-note p, .practice-note p span,
.bottom-note p, .bottom-note p span, .tarot-card p, .tarot-deck small,
#character-reading, .tarot-reading {
  font-family: "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
.seal, .chip-kanji, .session-kanji, #characters, #current-character,
#practice-character, .completion-seal, .bottom-note > span {
  font-family: "Noto Serif JP", "Hiragino Mincho ProN", "Yu Mincho", serif;
}

/* A touch-friendly deck and an illustrated reading card. */
.deck-source-label { display: block; margin-top: 14px; font-size: 12px; color: #667060; }
.deck-source { width: 100%; max-width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #d5d8c8; border-radius: 6px; background: #fffdf7; font-size: 14px; }
.tarot-table { display: flex; align-items: flex-start; gap: 12px; margin-top: 14px; }
.tarot-deck { flex: 0 0 100px; min-height: 150px; padding: 10px; border: 3px solid #fffdf7; border-radius: 10px; background: repeating-linear-gradient(45deg, #667a64 0 8px, #596d58 8px 16px); color: #fffdf7; box-shadow: 3px 3px 0 #c7c9ba, 6px 6px 0 #e4e2d7; font-family: "Noto Serif JP", "Hiragino Mincho ProN", serif; }
.tarot-deck > span { display: block; font-size: 25px; line-height: 1.2; }
.tarot-deck small { display: block; margin-top: 8px; font: 600 11px "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif; }
.tarot-card { flex: 1; min-width: 0; padding: 12px; border: 1px solid #bfae88; border-radius: 10px; background: #fffdf7; box-shadow: 0 4px 14px #343c3510; text-align: center; animation: tarot-reveal .3s ease-out; }
.tarot-ornament { display: block; color: var(--accent); }
.tarot-word { display: block; font: 32px "Noto Serif JP", "Hiragino Mincho ProN", serif; color: #59694c; }
.tarot-card strong, .tarot-reading { display: block; font-size: 12px; }
.tarot-reading { margin-top: 4px; color: #667060; font-size: 16px; line-height: 1.5; }
.tarot-card p { margin: 10px 0 0; font: italic 13px/1.5 "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif; }
.tarot-study { min-height: 44px; margin-top: 14px; }
@keyframes tarot-reveal { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .tarot-card { animation: none; } }

/* Earlier character-chip controls remain easy to tap. */
.preset-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.preset {
  position: relative; min-width: 0; min-height: 120px; padding: 14px 12px;
  flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 8px;
  border: 1px solid #d9d9ca; border-radius: 10px; background: #fffdf7;
  box-shadow: 0 3px 10px #343c350a;
}
.preset > span:first-child { min-width: 0; font-size: 30px; line-height: 1.15; color: #59694c; }
.preset > span:nth-child(2) { max-width: 100%; font-weight: 600; }
.preset small { font-weight: 400; line-height: 1.4; }
.preset-arrow { position: absolute; top: 10px; right: 12px; }
.character-chip { min-width: 56px; min-height: 56px; justify-content: center; background: #fffdf7; border-radius: 8px; }
.study-disclosure { margin-top: 16px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: #fffdf780; }
.study-disclosure summary { min-height: 48px; padding: 14px 12px; cursor: pointer; font-size: 12px; font-weight: 600; }
.study-disclosure[open] { padding: 0 12px 14px; }
.study-disclosure[open] summary { margin: 0 -12px 12px; border-bottom: 1px solid var(--line); }
.study-disclosure .history-heading .section-label { display: none; }
.study-disclosure .history-heading { justify-content: flex-end; }

@media (max-width: 900px) {
  .header-note { display: none; }
  .workspace { grid-template-columns: 260px minmax(0, 1fr); gap: 25px; }
  main { padding: 0 25px; }
  .drawing-panel { padding: 22px 18px; }
  .playback { gap: 4px; }
  .play-button { min-width: 110px; padding: 12px 10px; }
}
@media (max-width: 680px) {
  .site-header { height: 75px; padding: 0 22px; }
  .brand { font-size: 20px; }
  .level { font-size: 8px; letter-spacing: 1px; }
  main { padding: 0 20px; }
  .workspace { grid-template-columns: 1fr; gap: 28px; padding-top: 25px; }
  .study-panel h2 { margin: 15px 0 20px; }
  .suggestions { margin-top: 23px; padding-top: 20px; }
  .preset-list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
  .preset { gap: 9px; }
  .preset > span:first-child { min-width: 42px; font-size: 22px; }
  .preset > span:nth-child(2) { font-size: 10px; }
  .preset small { font-size: 9px; }
  .practice-note { display: none; }
  .practice-columns { grid-template-columns: 1fr; gap: 24px; }
  .drawing-panel { padding: 22px 20px; }
  .bottom-note { gap: 15px; }
  .bottom-note > span { font-size: 16px; letter-spacing: 2px; }
  .bottom-note p { font-size: 13px; }
  .bottom-note p span { display: inline-block; font-size: 9px; max-width: 200px; }
  footer { flex-direction: column; align-items: center; text-align: center; line-height: 1.8; }

  /* Keep selection compact so the stroke and handwriting areas are easy to reach. */
  .site-header { height: auto; min-height: 64px; gap: 8px; padding: 10px 16px; }
  .level { text-align: right; line-height: 1.6; }
  .level span { padding: 0 3px; }
  main { padding: 0 16px; }
  .study-tabs { padding-top: 8px; }
  .study-tab { flex: 1; }
  .workspace { gap: 16px; padding: 20px 0 24px; }
  .study-panel { display: contents; }
  .study-panel > * { order: 1; }
  .drawing-panel { order: 2; }
  .study-panel > .suggestions { order: 3; }
  .study-panel > .history, .study-panel > .sessions { order: 4; }
  .study-panel h2 { margin: 0; }
  .study-panel .character-list { margin-top: 0; }
  .input-wrap { min-height: 50px; }
  .submit-button { min-width: 44px; }
  .suggestions { margin-top: 18px; padding-top: 16px; }
  .preset-list { gap: 8px; }
  .preset { min-height: 108px; padding: 12px; gap: 6px; }
  .preset > span:first-child { min-width: 0; font-size: 28px; }
  .preset > span:nth-child(2) { font-size: 12px; }
  .preset small { font-size: 10px; }
  .drawing-panel { padding: 18px 16px; }
  .drawing-heading h2 { flex-wrap: wrap; }
  .sheet, .practice-sheet { width: min(100%, 360px); margin-left: auto; margin-right: auto; }
  .playback { flex-wrap: wrap; gap: 8px; }
  .icon-button, .play-button, .text-button, .retry { min-height: 44px; }
  .icon-button { min-width: 44px; }
  .play-button { flex: 1; min-width: 120px; }
  .speed-label { font-size: 11px; }
  select { min-height: 44px; max-width: 150px; padding: 8px; font-size: 14px; }
  .display-options { font-size: 12px; }
  .display-options label { min-height: 44px; }
  input[type="checkbox"] { width: 18px; height: 18px; }
  .helper { font-size: 12px; }
  .practice-panel { padding: 24px 0; }
  .practice-actions .text-button { font-size: 13px; }
}
