.activity-browser [data-toddler-marks-open] .activity-preview { align-items: center; padding: 12px; }
.activity-browser [data-toddler-marks-open] .activity-preview > svg { display: block; width: 100%; max-width: 220px; height: auto; max-height: 167px; border-radius: 12px; }
.toddler-marks-dialog { width: min(1040px, calc(100vw - 24px)); max-width: 1040px; max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: auto; border: 1px solid #dce3d5; border-radius: 24px; background: #fffdf7; color: #233d35; box-shadow: 0 18px 80px #17332645; font-family: 'Nunito', sans-serif; }
.toddler-marks-dialog::backdrop { background: #163b2d80; backdrop-filter: blur(5px); }
.toddler-marks-dialog *, .toddler-marks-dialog *::before, .toddler-marks-dialog *::after { box-sizing: border-box; }
.toddler-marks-dialog [hidden] { display: none !important; }
.toddler-marks-dialog button, .toddler-marks-dialog .tm-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 48px; padding: 12px 17px; border: 1px solid #b8cbb3; border-radius: 13px; background: #fffefb; color: #286744; font: 800 16px/1.3 'Nunito', sans-serif; text-decoration: none; cursor: pointer; }
.toddler-marks-dialog button:hover:enabled, .toddler-marks-dialog .tm-button:hover { background: #edf4e8; border-color: #44764d; }
.toddler-marks-dialog button:disabled { opacity: .45; cursor: default; }
.toddler-marks-dialog :is(button,a,summary):focus-visible { outline: 3px solid #3768b6; outline-offset: 3px; }
.tm-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid #e2e7db; position: sticky; top: 0; z-index: 3; background: #fffdf7; }
.tm-eyebrow { margin: 0 0 6px; color: #58704f; font-size: 11px; font-weight: 900; letter-spacing: .9px; }
.tm-header h3 { margin: 0; font-size: clamp(24px, 4vw, 31px); line-height: 1.25; }
.toddler-marks-dialog .tm-close { flex: 0 0 48px; width: 48px; padding: 0; border-radius: 50%; font-size: 30px; font-weight: 600; line-height: 1; }
.tm-body { max-width: 852px; margin: 0 auto; padding: 22px 26px 28px; }
.tm-exercises { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tm-exercises button { flex-direction: column; gap: 5px; min-width: 0; min-height: 84px; padding: 10px 6px; background: #f4f7ed; }
.tm-exercises button[aria-pressed='true'] { background: #eaf3e2; border: 2px solid #44764d; box-shadow: inset 0 -3px 0 #44764d; }
.tm-exercise-picture { display: flex; align-items: center; justify-content: center; width: 40px; height: 33px; overflow: hidden; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif; font-size: 27px; line-height: 1.2; }
.tm-exercise-picture svg { display: block; width: 40px; height: 30px; overflow: visible; }
.tm-exercise-picture svg > rect { fill: transparent; }
.tm-progress { margin: 23px 0 6px; color: #58704f; font-size: 12px; font-weight: 800; text-align: center; }
.tm-exercise-title { margin: 0; font-size: clamp(21px, 3.5vw, 27px); line-height: 1.3; text-align: center; scroll-margin-top: 110px; }
.tm-exercise-title:focus, .tm-header h3:focus { outline: none; }
.tm-instruction { margin: 10px 0 15px; font-size: clamp(19px, 3vw, 24px); font-weight: 800; line-height: 1.45; text-align: center; }
.tm-listen-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; min-height: 48px; margin-bottom: 18px; }
.toddler-marks-dialog .tm-hear { background: #eef3e7; }
.toddler-marks-dialog .tm-stop { padding: 10px 12px; font-size: 14px; }
.tm-pad { position: relative; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border: 2px solid #b5c6ad; border-radius: 20px; background: #fff; isolation: isolate; }
.tm-art, .tm-art svg, .tm-pad canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.tm-art { pointer-events: none; }
.tm-pad canvas { z-index: 1; background: transparent; cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tm-drawing-help { margin: 10px 0 15px; color: #536b4d; font-size: 14px; line-height: 1.5; text-align: center; }
.tm-colors { min-width: 0; margin: 0 0 18px; padding: 0; border: 0; text-align: center; }
.tm-colors legend { width: 100%; margin-bottom: 8px; color: #536b4d; font-size: 13px; font-weight: 800; }
.tm-colors > div { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; }
.toddler-marks-dialog .tm-color { flex: 0 0 46px; width: 46px; height: 46px; min-height: 46px; padding: 7px; border: 2px solid transparent; border-radius: 50%; background: #fff; }
.tm-color > span:first-child { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: var(--tm-crayon); }
.toddler-marks-dialog .tm-color[aria-pressed='true'] { border-color: #233d35; box-shadow: 0 0 0 2px #fffdf7, 0 0 0 3px #b8cbb3; }
.tm-mark-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.7fr); gap: 10px; }
.tm-mark-actions button { min-width: 0; min-height: 58px; }
.toddler-marks-dialog .tm-primary { color: #fff; background: #286744; border-color: #286744; }
.toddler-marks-dialog .tm-primary:hover:enabled { background: #205738; border-color: #205738; }
.tm-feedback { position: relative; display: flex; align-items: center; justify-content: center; min-height: 76px; padding: 11px 8px; margin-top: 8px; border-radius: 16px; text-align: center; }
.tm-feedback p { margin: 0; color: #536b4d; font-size: 14px; line-height: 1.5; }
.tm-feedback.is-celebrating { min-height: 100px; padding-top: 38px; background: #f5f0d9; }
.tm-feedback.is-celebrating p { color: #286744; font-size: 23px; font-weight: 900; }
.tm-celebration { position: absolute; top: 3px; left: 0; right: 0; color: #ac7e13; font-size: 28px; letter-spacing: 12px; animation: tm-celebrate 700ms ease-out; }
.tm-celebration > span { font-size: 32px; }
.tm-picture-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 23px; }
.tm-picture-actions button { flex: 1 1 0; min-width: 0; font-size: 14px; }
.tm-parent { padding: 22px; border: 1px solid #dedfcf; border-radius: 18px; background: #f4f5eb; }
.tm-parent h4 { margin: 0 0 10px; font-size: 22px; line-height: 1.3; }
.tm-parent p { margin: 0 0 12px; font-size: 16px; line-height: 1.65; }
.tm-parent .tm-parent-note { color: #52674d; font-size: 13px; }
.tm-development { margin: 12px 0 20px; color: #52674d; font-size: 13px; line-height: 1.5; }
.tm-development summary { cursor: pointer; font-weight: 800; }
.tm-development p { margin: 10px 0 0; font-size: 13px; }
.tm-print-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; }
.tm-download { display: inline-flex; align-items: center; min-height: 48px; color: #286744; font-size: 16px; font-weight: 900; text-decoration: underline; text-underline-offset: 4px; }
.tm-parent .tm-print-help { margin: 12px 0 0; color: #52674d; font-size: 12px; line-height: 1.5; }
.tm-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes tm-celebrate { 0% { opacity: 0; transform: scale(.75) translateY(8px); } 60% { opacity: 1; transform: scale(1.08) translateY(-2px); } 100% { opacity: 1; transform: scale(1) translateY(0); } }
@media (max-width: 520px) {
  .toddler-marks-dialog { width: calc(100vw - 12px); max-height: calc(100dvh - 12px); border-radius: 18px; }
  .tm-header { padding: 13px 13px; gap: 10px; }
  .tm-eyebrow { font-size: 9px; letter-spacing: .55px; }
  .tm-header h3 { font-size: 24px; }
  .tm-body { padding: 15px 10px 18px; }
  .tm-exercises { gap: 6px; }
  .tm-exercises button { min-height: 77px; padding: 8px 3px; font-size: 12px; }
  .tm-exercise-picture { font-size: 25px; }
  .tm-progress { margin-top: 19px; font-size: 11px; }
  .tm-exercise-title { font-size: 21px; }
  .tm-instruction { margin-top: 9px; font-size: 20px; }
  .tm-listen-row { margin-bottom: 13px; gap: 8px; }
  .toddler-marks-dialog .tm-hear { padding: 12px; font-size: 15px; }
  .tm-pad { border-radius: 15px; }
  .tm-drawing-help { font-size: 12px; }
  .tm-colors > div { gap: 4px; }
  .toddler-marks-dialog .tm-color { flex-basis: 43px; width: 43px; height: 46px; }
  .tm-mark-actions { gap: 7px; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tm-mark-actions button { min-height: 52px; padding: 12px 8px; font-size: 15px; }
  .tm-mark-actions .tm-primary { grid-column: 1 / -1; min-height: 58px; font-size: 18px; }
  .tm-feedback { min-height: 64px; }
  .tm-picture-actions { gap: 7px; }
  .tm-picture-actions button { padding: 10px 6px; font-size: 12px; }
  .tm-parent { padding: 18px 14px; }
  .tm-parent h4 { font-size: 21px; }
  .tm-parent p { font-size: 15px; }
  .tm-print-actions { gap: 6px 16px; }
}
@media (prefers-reduced-motion: reduce) { .tm-celebration { animation: none; } }
