
  #sunny-playground {
    --mh-tablet-width: 1024px;
    --mh-tablet-height: 768px;
    --mh-staff-scale: 1;
    --mh-dense-scale: 1;
    --mh-dialog-scale: 1;
    --mh-staff-font: "Segoe UI", system-ui, sans-serif;
    --mh-control-radius: 10px;
    --mh-panel-radius: 12px;
    --mh-heading-font: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    --mh-paper: light-dark(#fff4d9, #322b23);
    --mh-panel: light-dark(#fffdf5, #372e38);
    --mh-ink: light-dark(#302947, #fff0fc);
    --mh-soft: light-dark(#5d5168, #e0cbe7);
    --mh-line: light-dark(#d8cad9, #72557b);
    --mh-hero: light-dark(#e6f4d6, #3f5239);
    --mh-moss: light-dark(#245b45, #bfe5c8);
    --mh-on-moss: light-dark(#fff, #173e2d);
    --mh-done: light-dark(#eeefea, #363b36);
    --mh-done-ink: light-dark(#59645b, #c1c9c1);
    --mh-request: light-dark(#ffdbec, #673953);
    --mh-sun: light-dark(#ffe9a3, #60491e);
    --mh-button-shadow: color-mix(in srgb, var(--mh-ink) 19%, transparent);
    --mh-lift: 0 3px 0 var(--mh-button-shadow), 0 8px 18px light-dark(#343f6013, #0002);
    --mh-sticker-paper: light-dark(#fffdf6, #c6b7ca);
    --mh-sticker-shadow: drop-shadow(0 3px 5px light-dark(#27375132, #100c1870));
    --mh-scene-sky: light-dark(#c0ebff, #263d58);
    --mh-cloud: light-dark(#f6fcff, #405d77);
    color-scheme: light dark;
    padding: clamp(5px, 1.2vw, 12px);
    color: var(--mh-ink);
    font-family: "Nunito", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
    font-size: 16px;
  }
  #sunny-playground, #sunny-playground * { box-sizing: border-box; }
  #sunny-playground .mh-tablet {
    position: relative;
    width: min(100%, var(--mh-tablet-width));
    aspect-ratio: 4 / 3;
    margin-inline: auto;
    overflow: clip;
    border-radius: 20px;
    background: var(--mh-paper);
    box-shadow: 0 2px 5px light-dark(#34536812, #0003), 0 14px 36px light-dark(#34536824, #0005);
  }
  #sunny-playground .mh-app {
    position: absolute;
    inset: 0 auto auto 0;
    width: var(--mh-tablet-width);
    height: var(--mh-scrollport-height, var(--mh-tablet-height));
    transform: scale(var(--mh-tablet-scale, 1));
    transform-origin: top left;
    container: mh-tablet-app / size;
    background: var(--mh-paper);
    overflow: auto;
    overscroll-behavior: none;
    scrollbar-width: thin;
  }
  #sunny-playground .mh-toolbar,
  #sunny-playground .mh-actions,
  #sunny-playground .mh-pin-top,
  #sunny-playground .mh-setup-task {
    display: flex;
    align-items: center;
    gap: 10px;
  }
  #sunny-playground .mh-toolbar {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
  }
  #sunny-playground .mh-main { min-height: 100%; padding: clamp(8px, 2cqw, 18px); }
  #sunny-playground h1,
  #sunny-playground h2,
  #sunny-playground p { margin: 0; color: inherit; }
  #sunny-playground h1 {
    font: 600 clamp(26px, 4.5cqw, 39px)/1.05 var(--mh-heading-font);
    letter-spacing: -.02em;
  }
  #sunny-playground h2 { font-size: 16px; }
  #sunny-playground .mh-sub { margin-top: 7px; color: var(--mh-soft); line-height: 1.4; }
  #sunny-playground .mh-kicker {
    color: var(--mh-soft);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .13em;
    text-transform: uppercase;
  }
  #sunny-playground .mh-hero {
    display: grid;
    gap: 5px;
    padding: 12px clamp(12px, 3cqw, 23px) 16px;
    border-radius: 22px;
    background: var(--mh-hero);
  }
  #sunny-playground .mh-hero .mh-sub { margin-top: 0; }
  #sunny-playground .mh-setup-task {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 16px;
  }
  #sunny-playground .mh-personal {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "animal greeting back";
    align-items: center;
    gap: 8px clamp(10px, 3cqw, 22px);
    padding-block: clamp(12px, 2.8cqw, 20px);
    background: var(--mh-tile);
  }
  #sunny-playground .mh-personal-greeting { grid-area: greeting; }
  #sunny-playground .mh-personal-controls {
    grid-area: back;
    align-self: start;
    justify-self: end;
    justify-content: flex-end;
  }
  #sunny-playground .mh-personal-name {
    font-size: clamp(39px, 8cqw, 80px);
    line-height: 1.2;
    letter-spacing: normal;
    overflow-wrap: anywhere;
    text-shadow: 0 1px 3px light-dark(#fff9, #171327), 0 0 8px light-dark(#fff7, #171327);
  }
  #sunny-playground .mh-personal h2 {
    margin: 4px 0;
    font-size: clamp(18px, 3.6cqw, 23px);
    line-height: 1.2;
  }
  #sunny-playground .mh-personal .mh-personal-art {
    --mh-portrait-angle: -7deg;
    --mh-shape-outline: var(--mh-sticker-paper);
    --mh-shape-stroke: clamp(4px, .6cqw, 6px);
    position: relative;
    isolation: isolate;
    grid-area: animal;
    display: grid;
    place-items: center;
    width: clamp(86px, 22cqw, 200px);
    aspect-ratio: var(--mh-badge-ratio, 1);
    transform: rotate(var(--mh-portrait-angle));
    filter: var(--mh-sticker-shadow);
  }
  #sunny-playground .mh-personal-art.mh-shield { --mh-animal-centre-y: 43%; }
  #sunny-playground .mh-personal-art.mh-cloud-shape { --mh-animal-centre-x: 53%; --mh-animal-centre-y: 57%; }
  #sunny-playground .mh-personal-art.mh-tag { --mh-animal-centre-x: 43%; }
  #sunny-playground .mh-personal-art.mh-arch { --mh-animal-centre-y: 56%; }
  #sunny-playground :is(.mh-portrait-animal, .mh-preview-animal) {
    position: absolute;
    top: var(--mh-animal-centre-y, 49%);
    left: var(--mh-animal-centre-x, 50%);
    width: var(--mh-animal-fill, 77%);
    height: var(--mh-animal-fill, 77%);
    translate: -50% -50%;
    pointer-events: none;
  }
  #sunny-playground .mh-personal-art:is(.mh-arch, .mh-cloud-shape, .mh-leaf, .mh-drop, .mh-shield, .mh-tag) { --mh-animal-fill: 69%; }
  #sunny-playground .mh-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
  }
  #sunny-playground button,
  #sunny-playground input,
  #sunny-playground select,
  #sunny-playground textarea { font: inherit; color: inherit; }
  #sunny-playground button {
    min-height: 44px;
    padding: 8px 13px;
    border: 1px solid var(--mh-line);
    border-radius: 12px;
    background: var(--mh-panel);
    font-weight: 700;
  }
  @media (hover: hover) {
    #sunny-playground button:not(:disabled):hover {
      border-color: color-mix(in srgb, var(--mh-moss) 62%, var(--mh-line));
    }
  }
  #sunny-playground .mh-quiet { border-radius: 16px; font-size: 13px; }
  #sunny-playground .mh-name {
    min-width: 0;
    min-height: 96px;
    background: var(--mh-tile);
    border-color: transparent;
    overflow-wrap: anywhere;
    font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    font-size: 19px;
  }
  #sunny-playground button.mh-name:not(:disabled),
  #sunny-playground .mh-choice,
  #sunny-playground .mh-zone { box-shadow: 0 3px 0 var(--mh-button-shadow); }
  #sunny-playground .mh-animal { font-size: 28px; line-height: 1.22; }
  #sunny-playground .mh-oval { --mh-badge-ratio: 1.48; border-radius: 50%; }
  #sunny-playground .mh-soft-square { --mh-badge-ratio: 1; border-radius: 9%; }
  #sunny-playground .mh-rounded { --mh-badge-ratio: 1.28; border-radius: 14% / 23%; }
  #sunny-playground .mh-arch { --mh-badge-ratio: 1.36; border-radius: 50% 50% 5% 5% / 62% 62% 7% 7%; }
  #sunny-playground .mh-leaf { --mh-badge-ratio: 1.32; border-radius: 5% 70% 5% 70% / 5% 67% 5% 67%; }
  #sunny-playground .mh-circle { --mh-badge-ratio: 1; border-radius: 50%; }
  #sunny-playground .mh-drop { --mh-badge-ratio: 1.13; border-radius: 56% 3% 54% 52% / 59% 3% 54% 51%; }
  #sunny-playground .mh-hexagon {
    --mh-badge-ratio: 1.36;
    --mh-shape-cut: polygon(17% 0, 83% 0, 100% 50%, 83% 100%, 17% 100%, 0 50%);
  }
  #sunny-playground .mh-shield {
    --mh-badge-ratio: 1.1;
    --mh-shape-cut: polygon(5% 0, 95% 0, 100% 8%, 95% 59%, 82% 79%, 50% 100%, 18% 79%, 5% 59%, 0 8%);
  }
  #sunny-playground .mh-tag {
    --mh-badge-ratio: 1.4;
    --mh-shape-cut: polygon(5% 0, 73% 0, 100% 50%, 73% 100%, 5% 100%, 0 92%, 0 8%);
  }
  #sunny-playground .mh-ticket {
    --mh-badge-ratio: 1.4;
    --mh-shape-cut: polygon(
      4% 0, 96% 0, 100% 7%, 100% 36%, 96% 38%, 93% 44%, 93% 56%, 96% 62%, 100% 64%, 100% 93%,
      96% 100%, 4% 100%, 0 93%, 0 64%, 4% 62%, 7% 56%, 7% 44%, 4% 38%, 0 36%, 0 7%
    );
  }
  #sunny-playground .mh-cloud-shape {
    --mh-badge-ratio: 1.46;
    --mh-shape-cut: url(#mh-cloud-outline);
  }
  #sunny-playground .mh-round { font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; }
  #sunny-playground .mh-serif { font-family: Georgia, serif; }
  #sunny-playground .mh-mono { font-family: "Courier New", monospace; }
  #sunny-playground .mh-handwritten { font-family: "Patrick Hand", "Segoe Print", cursive; }
  #sunny-playground .mh-bubble { font-family: "Baloo 2", "Arial Rounded MT Bold", sans-serif; }
  #sunny-playground .mh-tall { font-family: "Barlow Condensed", "Arial Narrow", sans-serif; }
  #sunny-playground .mh-comic { font-family: "Comic Neue", "Comic Sans MS", cursive; }
  #sunny-playground .mh-slab { font-family: "Bree Serif", Rockwell, serif; }
  #sunny-playground .mh-pixel { font-family: "Pixelify Sans", "Courier New", monospace; }
  #sunny-playground .mh-block { font-family: "Luckiest Guy", Impact, sans-serif; }
  #sunny-playground .mh-chalk { font-family: "Schoolbell", "Ink Free", cursive; }
  #sunny-playground .mh-script { font-family: "Caveat", "Brush Script MT", cursive; }
  #sunny-playground .mh-lilac { --mh-tile: light-dark(#ecdef9, #503e5c); }
  #sunny-playground .mh-mint { --mh-tile: light-dark(#d8eedb, #385343); }
  #sunny-playground .mh-peach { --mh-tile: light-dark(#fae0d1, #5a4337); }
  #sunny-playground .mh-sky { --mh-tile: light-dark(#d8ebf9, #354e61); }
  #sunny-playground .mh-pink { --mh-tile: light-dark(#f9d8e9, #614052); }
  #sunny-playground .mh-lemon { --mh-tile: light-dark(#fff0ac, #685620); }
  #sunny-playground .mh-coral { --mh-tile: light-dark(#f5beb0, #754945); }
  #sunny-playground .mh-aqua { --mh-tile: light-dark(#c5efe9, #2f5550); }
  #sunny-playground .mh-periwinkle { --mh-tile: light-dark(#cfd7fb, #414c78); }
  #sunny-playground .mh-sand { --mh-tile: light-dark(#eee2c7, #5b4d36); }
  #sunny-playground .mh-lime { --mh-tile: light-dark(#e4f0b6, #4b592d); }
  #sunny-playground .mh-berry { --mh-tile: light-dark(#e6b8d6, #674057); }
  #sunny-playground .mh-name:disabled { background: var(--mh-done); color: var(--mh-done-ink); }
  #sunny-playground .mh-name:disabled .mh-animal { filter: grayscale(1); opacity: .73; }
  #sunny-playground .mh-zone {
    --mh-zone: var(--mh-panel);
    min-height: 92px;
    background: var(--mh-zone);
    border: 2px solid transparent;
    font-size: 20px;
  }
  #sunny-playground .mh-blue { --mh-zone: light-dark(#d1e9fc, #315774); }
  #sunny-playground .mh-green { --mh-zone: light-dark(#d6efd2, #395a3c); }
  #sunny-playground .mh-yellow { --mh-zone: light-dark(#fae9a3, #645426); }
  #sunny-playground .mh-red { --mh-zone: light-dark(#f9d5cf, #70413f); }
  #sunny-playground .mh-symbol {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: color-mix(in srgb, var(--mh-panel) 64%, transparent);
    font-size: 21px;
    line-height: 1;
  }
  #sunny-playground .mh-actions {
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
  }
  #sunny-playground .mh-personal-page .mh-actions .mh-talk {
    min-width: 0;
    min-height: 48px;
    border: 2px solid #000;
    border-radius: 16px;
    padding: 6px clamp(7px, 2cqw, 12px);
    background: #fff;
    color: #302947;
    filter: var(--mh-sticker-shadow);
    font: 600 clamp(13px, 2.6cqw, 16px)/1.2 var(--mh-heading-font);
  }
  #sunny-playground .mh-talk.mh-unsure { flex-shrink: 0; white-space: nowrap; }
  #sunny-playground .mh-primary { background: var(--mh-moss); color: var(--mh-on-moss); border-color: transparent; }
  #sunny-playground .mh-pin {
    /* Modal dialogs enter the top layer and need an explicit preview scale. */
    zoom: var(--mh-tablet-scale, 1);
    width: min(calc(100% - 24px), 328px);
    max-height: calc(100% - 12px);
    padding: 16px;
    color: var(--mh-ink);
    background: var(--mh-panel);
    border: 1px solid var(--mh-line);
    border-radius: 22px;
    box-shadow: 0 12px 36px #0003;
  }
  #sunny-playground .mh-pin::backdrop {
    background: light-dark(#20263066, #0009);
    backdrop-filter: blur(2px);
  }
  #sunny-playground .mh-pin-top { justify-content: space-between; }
  #sunny-playground .mh-pin h2 { font-size: 19px; }
  #sunny-playground .mh-pin .mh-form { margin-top: 9px; gap: 8px; }
  #sunny-playground .mh-pin input[name="pin"] {
    text-align: center;
    caret-color: transparent;
    font-size: 22px;
    letter-spacing: .36em;
    border-radius: 12px;
    background: color-mix(in srgb, var(--mh-hero) 38%, var(--mh-panel));
  }
  #sunny-playground .mh-pin-hint { text-align: center; color: var(--mh-soft); font-size: 12px; }
  #sunny-playground .mh-pin-hint:empty { display: none; }
  #sunny-playground .mh-pin .mh-error:empty { display: none; }
  #sunny-playground .mh-keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
  #sunny-playground .mh-keypad [data-digit] {
    font-size: 20px;
    background: color-mix(in srgb, var(--mh-paper) 58%, var(--mh-panel));
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--mh-ink) 8%, transparent);
  }
  #sunny-playground .mh-keypad [data-digit="0"] { grid-column: 2; }
  #sunny-playground .mh-keypad [data-action="recover-pin"] { grid-column: 1; grid-row: 4; }
  #sunny-playground .mh-form { display: grid; gap: 12px; margin-top: 16px; }
  #sunny-playground label { display: grid; gap: 5px; font-weight: 700; }
  #sunny-playground input,
  #sunny-playground select,
  #sunny-playground textarea {
    width: 100%;
    min-height: 44px;
    background: var(--mh-panel);
    border: 1px solid var(--mh-line);
    border-radius: 9px;
    padding: 8px 10px;
    font-size: 16px;
  }
  #sunny-playground textarea { resize: vertical; }
  #sunny-playground .mh-setup-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  #sunny-playground .mh-setup-preview {
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: min(100%, 164px);
    min-height: 64px;
    padding: 5px;
    border: 2px solid var(--mh-panel);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--mh-lift);
  }
  #sunny-playground .mh-badge-preview {
    min-height: 45px;
    max-width: 100%;
    box-shadow: 0 2px 4px var(--mh-button-shadow);
  }
  #sunny-playground .mh-badge-preview .mh-animal { font-size: 24px; }
  #sunny-playground .mh-badge-preview:is(.mh-circle, .mh-soft-square) {
    width: 82px;
    min-height: 82px;
  }
  #sunny-playground .mh-animal-options {
    --mh-choice-row: 100px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
  #sunny-playground .mh-choice {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 5px;
    min-height: 96px;
    min-width: 0;
    padding: 8px;
    border-radius: 18px;
    background: var(--mh-tile, var(--mh-panel));
    font-size: 16px;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-choice[data-current="true"] { border: 2px solid var(--mh-moss); }
  #sunny-playground .mh-choice .mh-animal {
    display: grid;
    place-items: center;
    width: 51px;
    height: 51px;
    border-radius: 50%;
    background: var(--mh-request);
    font-size: 34px;
  }
  #sunny-playground .mh-choice:nth-child(3n + 2) .mh-animal { background: var(--mh-hero); }
  #sunny-playground .mh-choice:nth-child(3n + 3) .mh-animal { background: var(--mh-sun); }
  #sunny-playground .mh-animal-options .mh-choice {
    --mh-animal-circle: clamp(36px, min(8cqw, 11cqh), 84px);
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    place-items: center;
    padding: 4px;
  }
  #sunny-playground .mh-animal-options .mh-animal {
    width: var(--mh-animal-circle);
    height: var(--mh-animal-circle);
  }
  #sunny-playground .mh-colour-options .mh-choice { background: var(--mh-panel); }
  #sunny-playground .mh-colour-swatch {
    width: clamp(38px, min(8cqw, 11cqh), 90px);
    aspect-ratio: 1;
    border: 3px solid var(--mh-sticker-paper);
    border-radius: 50%;
    background: var(--mh-tile);
    filter: var(--mh-sticker-shadow);
  }
  #sunny-playground .mh-sample {
    --mh-sample-height: min(var(--mh-sample-height-limit, 90cqh), 96cqw / var(--mh-badge-ratio));
    width: calc(var(--mh-sample-height) * var(--mh-badge-ratio));
    height: var(--mh-sample-height);
    border: 1px solid var(--mh-line);
    background: linear-gradient(150deg, color-mix(in srgb, var(--mh-hero) 65%, var(--mh-panel)), var(--mh-hero));
    box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--mh-ink) 9%, transparent);
  }
  #sunny-playground .mh-shape-options .mh-choice {
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: center;
  }
  #sunny-playground .mh-shape-sample-slot {
    display: grid;
    place-items: center;
    width: min(100%, 132px);
    height: clamp(38px, 10cqh, 88px);
    container-type: size;
  }
  #sunny-playground .mh-sample:is(.mh-circle, .mh-soft-square, .mh-rounded, .mh-oval) { --mh-sample-height-limit: 84cqh; }
  #sunny-playground .mh-letter-sample { font-size: clamp(29px, 4.6cqw, 48px); line-height: 1.05; }
  #sunny-playground .mh-animation-sample {
    display: grid;
    place-items: center;
    --mh-animation-circle: clamp(36px, min(8cqw, 11cqh), 84px);
    width: var(--mh-animation-circle);
    height: var(--mh-animation-circle);
    border-radius: 50%;
    background: var(--mh-hero);
    font: clamp(24px, min(5.5cqw, 7.5cqh), 56px)/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  }
  #sunny-playground .mh-background-options { --mh-choice-row: 126px; }
  #sunny-playground .mh-background-options .mh-choice {
    place-content: stretch;
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    place-items: stretch;
    gap: 0;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
  }
  #sunny-playground .mh-scene-preview { width: 100%; height: 100%; min-height: 0; }
  #sunny-playground .mh-overview-page,
  #sunny-playground .mh-welcome-page,
  #sunny-playground .mh-pin {
    --mh-panel: light-dark(#fff, #24272e);
    --mh-ink: light-dark(#202630, #eff1f5);
    --mh-soft: light-dark(#596574, #c0c7d2);
    --mh-line: light-dark(#dce1e8, #444b57);
    --mh-done: light-dark(#eef1f5, #363e49);
    --mh-done-ink: light-dark(#354150, #e1e6ee);
    color: var(--mh-ink);
    font-family: var(--mh-staff-font);
  }
  #sunny-playground :is(.mh-overview-page, .mh-welcome-page) { background: light-dark(#fff9e8, #352d2f); }
  #sunny-playground .mh-overview-page h1 {
    font-family: inherit;
    font-size: clamp(25px, 4.2cqw, 34px);
    font-weight: 650;
    letter-spacing: -.025em;
  }
  #sunny-playground .mh-overview-page .mh-quiet,
  #sunny-playground .mh-welcome-page .mh-quiet,
  #sunny-playground .mh-overview-page summary {
    border: 1px solid var(--mh-line);
    border-radius: 8px;
  }
  #sunny-playground .mh-overview-header {
    flex: none;
    display: grid;
    padding: 0;
  }
  #sunny-playground .mh-staff-masthead {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    padding-bottom: 6px;
  }
  #sunny-playground .mh-staff-tools {
    grid-area: 1 / 2;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 6px;
    flex-wrap: wrap;
    max-width: 100%;
  }
  #sunny-playground .mh-staff-tools button {
    padding: 6px 10px;
    font-weight: 600;
    white-space: nowrap;
  }
  #sunny-playground .mh-staff-tools [data-action="roster"] {
    background: transparent;
    border-color: color-mix(in srgb, var(--mh-moss) 62%, var(--mh-line));
    color: var(--mh-soft);
  }
  #sunny-playground .mh-staff-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid var(--mh-line);
  }
  #sunny-playground .mh-staff-nav .mh-staff-tab {
    min-width: 0;
    min-height: 52px;
    padding: 8px clamp(4px, 1.5cqw, 12px);
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 5px 5px 0 0;
    background: transparent;
    color: var(--mh-soft);
    font-size: clamp(15px, 3cqw, 20px);
    font-weight: 650;
    line-height: 1.2;
  }
  #sunny-playground .mh-staff-nav .mh-staff-tab[aria-current] {
    border-bottom-color: var(--mh-moss);
    background: color-mix(in srgb, var(--mh-moss) 7%, transparent);
    color: var(--mh-ink);
  }
  @media (hover: hover) {
    #sunny-playground .mh-staff-nav .mh-staff-tab:not([aria-current]):hover {
      border-bottom-color: transparent;
      background: color-mix(in srgb, var(--mh-done) 55%, transparent);
    }
  }
  #sunny-playground .mh-staff-date {
    grid-area: 1 / 1;
    min-width: 0;
    font-size: clamp(16px, 2.8cqw, 21px);
    font-weight: 650;
  }
  #sunny-playground .mh-staff-tally {
    display: inline-flex;
    align-items: center;
    justify-self: center;
    margin-top: 8px;
    gap: 6px;
    padding: 4px 9px 4px 5px;
    border-radius: 20px;
    background: var(--mh-panel);
    color: var(--mh-soft);
    font-size: 13px;
  }
  #sunny-playground .mh-staff-tally strong {
    color: var(--mh-ink);
    font-variant-numeric: tabular-nums;
  }
  #sunny-playground .mh-staff-ring {
    position: relative;
    flex: 0 0 21px;
    width: 21px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--mh-moss) var(--mh-check-share), var(--mh-done) 0);
  }
  #sunny-playground .mh-staff-ring::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--mh-panel);
  }
  #sunny-playground .mh-history-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 8px 12px;
    line-height: 1.25;
  }
  #sunny-playground .mh-history-controls select,
  #sunny-playground .mh-history-controls .mh-history-switch {
    width: 100%;
    min-height: 44px;
    height: 44px;
  }
  #sunny-playground .mh-settings {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding-block-start: 6px;
    line-height: 1.25;
  }
  #sunny-playground .mh-settings-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  #sunny-playground .mh-settings-group,
  #sunny-playground .mh-settings-columns,
  #sunny-playground .mh-settings-stack {
    display: grid;
    min-width: 0;
    gap: 10px;
  }
  #sunny-playground .mh-settings-group { flex: 1; align-content: start; }
  #sunny-playground .mh-settings-group[hidden] { display: none; }
  #sunny-playground .mh-settings-columns {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    align-items: start;
  }
  #sunny-playground .mh-settings-group[data-settings-panel="names"] .mh-settings-columns {
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  }
  #sunny-playground .mh-settings-stack { align-content: start; }
  #sunny-playground .mh-settings-draft {
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--mh-done);
    color: var(--mh-ink);
    font-size: 13px;
    font-weight: 700;
  }
  #sunny-playground .mh-settings-nav .mh-quiet {
    min-width: 0;
    padding: 5px 6px;
    background: transparent;
    font-weight: 600;
  }
  #sunny-playground .mh-settings-nav .mh-quiet[aria-pressed="true"] {
    background: var(--mh-done);
    color: var(--mh-ink);
  }
  #sunny-playground .mh-settings-section {
    min-width: 0;
    padding: 8px clamp(10px, 2.5cqw, 16px);
    border: 1px solid var(--mh-line);
    border-radius: 10px;
    background: var(--mh-panel);
  }
  #sunny-playground .mh-settings-section > .mh-form,
  #sunny-playground .mh-settings-section > .mh-profile-settings { margin-top: 8px; }
  #sunny-playground .mh-settings-section > .mh-form { gap: 8px; }
  #sunny-playground .mh-settings-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 10px;
  }
  #sunny-playground .mh-class-list-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
  #sunny-playground .mh-class-list-form textarea { resize: none; }
  #sunny-playground .mh-class-list-form [role="status"] { grid-column: 1 / -1; }
  #sunny-playground .mh-pupil-editor .mh-form { gap: 8px; margin-top: 0; }
  #sunny-playground .mh-class-roster { display: grid; gap: 8px; margin-top: 8px; }
  #sunny-playground .mh-class-roster .mh-sub { margin: 0; }
  #sunny-playground .mh-class-roster-filters {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 8px;
  }
  #sunny-playground .mh-class-roster-list {
    min-height: 52px;
    border: 1px solid var(--mh-line);
    border-radius: 8px;
    padding: 5px;
  }
  #sunny-playground .mh-class-roster-list .mh-sub { padding: 8px; }
  #sunny-playground .mh-class-roster-list ul {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  #sunny-playground .mh-class-roster-list li > button {
    width: 100%;
    height: 44px;
    padding: 4px 7px;
    text-align: start;
    font-size: 14px;
    line-height: 1.16;
  }
  #sunny-playground .mh-class-roster-list li > button > span {
    display: -webkit-box;
    overflow: hidden;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  #sunny-playground .mh-class-roster-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-top: 5px;
    font-size: 13px;
  }
  #sunny-playground .mh-class-roster-list button[aria-pressed="true"] {
    border-color: var(--mh-moss);
    background: var(--mh-done);
  }
  @container mh-tablet-app (max-width: 465px) {
    #sunny-playground .mh-settings .mh-settings-columns,
    #sunny-playground .mh-settings-group[data-settings-panel="names"] .mh-settings-columns,
    #sunny-playground .mh-class-list-form { grid-template-columns: minmax(0, 1fr); }
  }
  #sunny-playground .mh-settings-section .mh-primary { justify-self: start; }
  #sunny-playground .mh-settings-section [role="status"] {
    color: var(--mh-soft);
    font-size: 14px;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-settings-section [role="status"]:empty { display: none; }
  #sunny-playground .mh-reset-dialog select[size] { padding: 4px; }
  #sunny-playground .mh-reset-dialog option { padding: 5px 7px; }
  #sunny-playground .mh-history-switch {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--mh-line);
    border-radius: 10px;
    background: var(--mh-done);
  }
  #sunny-playground .mh-overview-page .mh-history-switch .mh-quiet {
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 4px 8px;
    border-color: transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--mh-soft);
    font-weight: 600;
  }
  #sunny-playground .mh-history-switch .mh-quiet[aria-pressed="true"] {
    border-color: var(--mh-line);
    background: var(--mh-panel);
    color: var(--mh-ink);
  }
  #sunny-playground .mh-option-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-size: 14px;
  }
  #sunny-playground .mh-option-check input {
    width: 18px;
    min-height: 18px;
    flex: 0 0 auto;
    accent-color: var(--mh-moss);
  }
  #sunny-playground .mh-trial-banner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
    padding: 7px 9px;
    border-radius: 12px;
    background: var(--mh-panel);
  }
  #sunny-playground .mh-trial-banner [role="status"]:empty { display: none; }
  #sunny-playground .mh-checkin-burst {
    position: absolute;
    z-index: 4;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
  }
  #sunny-playground .mh-burst-piece {
    position: absolute;
    left: var(--mh-burst-x);
    top: var(--mh-burst-y);
    --mh-burst-size: calc(var(--mh-burst-scale) * var(--mh-piece-scale));
    width: calc(8px * var(--mh-burst-size));
    height: calc(12px * var(--mh-burst-size));
    border-radius: 2px;
    background: var(--mh-burst-ink);
    animation: mh-burst-out 580ms cubic-bezier(.15, .65, .3, 1) var(--mh-burst-delay) both;
  }
  #sunny-playground .mh-burst-piece:nth-child(5n + 1) { --mh-burst-ink: light-dark(#ed6d9e, #ff9abd); }
  #sunny-playground .mh-burst-piece:nth-child(5n + 2) { --mh-burst-ink: light-dark(#508de1, #87baff); }
  #sunny-playground .mh-burst-piece:nth-child(5n + 3) { --mh-burst-ink: light-dark(#e9a619, #ffd866); }
  #sunny-playground .mh-burst-piece:nth-child(5n + 4) { --mh-burst-ink: light-dark(#34a685, #77dfb2); }
  #sunny-playground .mh-burst-piece:nth-child(5n) { --mh-burst-ink: light-dark(#9363db, #c5a1ff); }
  #sunny-playground .mh-burst-bubbles .mh-burst-piece {
    width: calc(17px * var(--mh-burst-size));
    height: calc(17px * var(--mh-burst-size));
    border: 2px solid var(--mh-burst-ink);
    border-radius: 50%;
    background: radial-gradient(circle at 29% 27%, #fff 0 13%, transparent 17%),
      color-mix(in srgb, var(--mh-burst-ink) 26%, transparent);
  }
  #sunny-playground .mh-burst-symbols .mh-burst-piece {
    width: auto;
    height: auto;
    background: transparent;
    color: var(--mh-burst-ink);
    text-shadow: 0 0 5px var(--mh-panel);
    font: calc(22px * var(--mh-burst-size))/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  }
  #sunny-playground .mh-burst-hearts .mh-burst-piece { color: light-dark(#df437d, #ff93ba); }
  #sunny-playground .mh-burst-snowflakes .mh-burst-piece { color: light-dark(#4f92c4, #d3eeff); }
  #sunny-playground .mh-burst-fireworks .mh-burst-piece {
    width: calc(3px * var(--mh-burst-size));
    height: calc(21px * var(--mh-burst-size));
    border-radius: 4px;
    background: linear-gradient(transparent, var(--mh-burst-ink) 65%);
  }
  #sunny-playground .mh-burst-footballs .mh-burst-piece { animation-name: mh-burst-bounce; }
  #sunny-playground .mh-roster-arriving .mh-meadow { animation: mh-roster-in 160ms ease-out both; }
  @keyframes mh-burst-out {
    0% {
      transform: translate(-50%, -50%) translate(0, 0) rotate(var(--mh-start-spin)) scale(.35);
      opacity: 0;
    }
    15%, 60% { opacity: 1; }
    60% {
      transform: translate(-50%, -50%) translate(calc(var(--mh-dx) * .76), calc(var(--mh-dy) * .76))
        rotate(calc(var(--mh-start-spin) * .24 + var(--mh-spin) * .76));
    }
    100% {
      transform: translate(-50%, -50%) translate(var(--mh-dx), var(--mh-end-y)) rotate(var(--mh-spin));
      opacity: 0;
    }
  }
  @keyframes mh-burst-bounce {
    0% {
      transform: translate(-50%, -50%) translate(0, 0) rotate(0deg) scale(.35);
      opacity: 0;
    }
    15%, 70% { opacity: 1; }
    38% {
      transform: translate(-50%, -50%) translate(calc(var(--mh-dx) * .55), calc(var(--mh-dy) * .55))
        rotate(calc(var(--mh-spin) * .55));
    }
    66% {
      transform: translate(-50%, -50%) translate(calc(var(--mh-dx) * .82), calc(var(--mh-dy) * .82 - 12px))
        rotate(calc(var(--mh-spin) * .82));
    }
    100% {
      transform: translate(-50%, -50%) translate(var(--mh-dx), var(--mh-dy)) rotate(var(--mh-spin));
      opacity: 0;
    }
  }
  @keyframes mh-roster-in {
    from { opacity: .55; }
    to { opacity: 1; }
  }
  @media (prefers-reduced-motion: reduce) {
    #sunny-playground .mh-burst-piece,
    #sunny-playground .mh-roster-arriving .mh-meadow { animation: none; }
  }
  #sunny-playground .mh-unsure { --mh-zone: light-dark(#eee4fb, #524365); }
  #sunny-playground .mh-history-talk { --mh-zone: var(--mh-request); }
  #sunny-playground .mh-overview-page:has(> .mh-history, > .mh-settings, > .mh-today) {
    display: flex;
    flex-direction: column;
  }
  #sunny-playground .mh-history {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 9px;
    padding-block-start: 9px;
  }
  #sunny-playground .mh-history-context {
    display: grid;
    align-items: center;
    min-height: 36px;
  }
  #sunny-playground .mh-history-context:empty { display: none; }
  #sunny-playground .mh-history-context > * { grid-area: 1 / 1; min-width: 0; }
  #sunny-playground .mh-history-context[data-pattern] > .mh-history-legend { visibility: hidden; }
  #sunny-playground .mh-history-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    min-height: calc(52px * var(--mh-staff-scale));
  }
  #sunny-playground .mh-history-footer > .mh-history-context { grid-column: 1; min-width: 0; }
  #sunny-playground .mh-history-footer > .mh-history-page-slot { grid-column: 2; }
  #sunny-playground .mh-history-footer > .mh-history-note { grid-column: 3; min-width: 0; text-align: end; }
  #sunny-playground .mh-history-footer .mh-history-insight {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 13px;
  }
  #sunny-playground .mh-history-footer .mh-pupil-history-pages { justify-content: center; }
  #sunny-playground .mh-history-table {
    display: grid;
    flex: 1 1 0;
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }
  #sunny-playground .mh-history-table > table { height: 100%; }
  #sunny-playground .mh-history-controls > label,
  #sunny-playground .mh-history-view-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
  }
  #sunny-playground .mh-history-period { grid-column: span 2; grid-row: 1; }
  #sunny-playground .mh-history-view-field { grid-column: 3 / 5; grid-row: 1; }
  #sunny-playground .mh-history-pupil { grid-column: 2; grid-row: 1; }
  #sunny-playground .mh-history-year { grid-column: 1 / -1; grid-row: 2; }
  #sunny-playground:not([data-phone]) .mh-history-controls:has(.mh-history-year) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #sunny-playground:not([data-phone]) .mh-history-year { grid-area: 1 / 3 / 2 / 4; }
  #sunny-playground:not([data-phone]) .mh-history-controls:has(.mh-history-year) .mh-history-view-field { grid-column: 4 / 6; }
  @container mh-tablet-app (max-width: 415px) {
    #sunny-playground .mh-history-controls { grid-template-columns: minmax(0, 1fr); }
  }
  #sunny-playground .mh-history-hint { color: var(--mh-soft); font-size: 13px; }
  #sunny-playground .mh-history-insight {
    padding: 10px 12px;
    border-inline-start: 3px solid var(--mh-moss);
    background: var(--mh-panel);
    font-size: 14px;
  }
  #sunny-playground .mh-history-grid {
    width: 100%;
    table-layout: fixed;
    border-spacing: 3px;
    font-size: 13px;
  }
  #sunny-playground .mh-history-grid :is(td, th) { text-align: center; padding: 0; }
  #sunny-playground .mh-history-grid th {
    color: var(--mh-soft);
    font-size: 12px;
    line-height: 1.25;
  }
  #sunny-playground .mh-history-grid th:first-child { width: 62px; }
  #sunny-playground .mh-history-grid thead th { height: 27px; }
  #sunny-playground .mh-history-grid tbody td:not([colspan]) {
    position: relative;
    height: 48px;
    border: 1px solid var(--mh-line);
    border-radius: 8px;
    background: var(--mh-panel);
    vertical-align: middle;
  }
  #sunny-playground .mh-history-grid tbody td:has(> .mh-history-cell) { border-color: transparent; }
  #sunny-playground .mh-history-grid tbody td[data-outside-period] { background: transparent; border-color: transparent; }
  #sunny-playground .mh-history-grid[data-compact] tbody td:not([colspan]) { height: 24px; }
  #sunny-playground .mh-history-cell {
    position: absolute;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 2px;
    min-height: 0;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: var(--mh-zone, var(--mh-panel));
    color: var(--mh-zone-ink, var(--mh-ink));
    font-size: 12px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-history-grid[data-compact] .mh-history-cell {
    grid-template-columns: 1.7em minmax(0, 1fr) 1.7em;
    align-items: center;
    gap: 4px;
  }
  #sunny-playground .mh-history-cell-empty {
    display: block;
    color: var(--mh-soft);
    text-align: center;
  }
  #sunny-playground .mh-history-cell[aria-pressed="true"] { border-color: var(--mh-ink); }
  #sunny-playground .mh-history-mark { font-size: 15px; }
  #sunny-playground .mh-pupil-history .mh-history-controls {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  #sunny-playground .mh-pupil-history .mh-history-period { grid-column: 1; }
  #sunny-playground .mh-pupil-history-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 7px;
    font-weight: 500;
  }
  #sunny-playground .mh-pupil-history-cell .mh-history-mark { flex: 0 0 auto; line-height: 1; }
  #sunny-playground .mh-pupil-history-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 4px 10px;
    color: var(--mh-soft);
    font-size: 13px;
  }
  #sunny-playground .mh-pupil-history-pages button:disabled { opacity: .5; }
  @container mh-tablet-app (max-width: 440px) {
    #sunny-playground .mh-pupil-history-cell { flex-direction: column; }
  }
  #sunny-playground .mh-history-mix {
    display: flex;
    width: 92%;
    height: 7px;
    overflow: hidden;
    border-radius: 6px;
    background: var(--mh-done);
  }
  #sunny-playground .mh-history-mix > span,
  #sunny-playground .mh-history-compare-bar > span { background: var(--mh-zone, var(--mh-done)); }
  #sunny-playground .mh-history-legend,
  #sunny-playground .mh-history-day-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 0;
    margin: 0;
    list-style: none;
    font-size: 13px;
  }
  #sunny-playground .mh-history-legend li,
  #sunny-playground .mh-history-day-list li {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-history-dot {
    flex: 0 0 11px;
    width: 11px;
    height: 11px;
    border: 1px solid var(--mh-line);
    border-radius: 50%;
    background: var(--mh-zone, var(--mh-done));
  }
  #sunny-playground .mh-history-day {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--mh-panel);
    text-align: start;
  }
  #sunny-playground .mh-history-day h2 { font-size: 16px; }
  #sunny-playground .mh-history-compare {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: start;
  }
  #sunny-playground .mh-history-compare thead th { height: 34px; }
  #sunny-playground .mh-history-compare :is(th, td) {
    border-bottom: 1px solid var(--mh-line);
    padding: 7px 4px;
    text-align: start;
  }
  #sunny-playground .mh-history-compare th:first-child,
  #sunny-playground .mh-history-compare :is(th, td):last-child {
    width: 1%;
    white-space: nowrap;
  }
  #sunny-playground .mh-history-compare :is(th, td):last-child {
    text-align: end;
    font-variant-numeric: tabular-nums;
  }
  #sunny-playground .mh-history-compare-bar {
    display: flex;
    height: 18px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--mh-done);
  }
  #sunny-playground .mh-history-compare-bar > span { height: 100%; }
  #sunny-playground .mh-history-compare td:nth-child(2) { padding-block: 0; }
  #sunny-playground .mh-history-compare .mh-history-compare-track {
    display: grid;
    align-content: center;
    width: 100%;
    min-height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  #sunny-playground .mh-weekday-breakdown[hidden] { display: none; }
  #sunny-playground .mh-priority {
    display: grid;
    grid-template-columns: repeat(var(--mh-columns, 4), minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }
  #sunny-playground .mh-priority section {
    --mh-column: var(--mh-panel);
    min-width: 0;
    min-height: 89px;
    overflow: hidden;
    border: 1px solid var(--mh-line);
    border-radius: 9px;
    background: var(--mh-panel);
  }
  @supports (grid-template-rows: subgrid) {
    #sunny-playground .mh-priority section {
      display: grid;
      grid-row: span 2;
      grid-template-rows: subgrid;
      row-gap: 0;
    }
  }
  #sunny-playground .mh-priority .mh-requests { --mh-column: var(--mh-request); }
  #sunny-playground .mh-priority .mh-zone-group {
    --mh-column: color-mix(in srgb, var(--mh-zone) 85%, var(--mh-panel));
  }
  #sunny-playground .mh-priority .mh-custom-zone { --mh-column: var(--mh-zone); }
  #sunny-playground .mh-priority .mh-custom-zone h2 { color: var(--mh-zone-ink); }
  #sunny-playground .mh-priority h2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-height: 56px;
    padding: 7px 9px;
    background: var(--mh-column);
    font-size: 15px;
    line-height: 1.25;
  }
  #sunny-playground .mh-priority h2 > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  #sunny-playground .mh-priority .mh-is-empty h2 {
    background: color-mix(in srgb, var(--mh-column) 30%, var(--mh-panel));
    color: var(--mh-soft);
  }
  #sunny-playground .mh-group.mh-is-empty summary { color: var(--mh-soft); }
  #sunny-playground .mh-priority .mh-needs-attention {
    border-color: light-dark(#b5668c, #d68bac);
    box-shadow: 0 1px 5px light-dark(#a6507421, #0003);
  }
  #sunny-playground .mh-needs-attention .mh-count {
    background: light-dark(#884262, #ffd4e7);
    color: light-dark(#fff, #4e2337);
  }
  #sunny-playground .mh-priority .mh-sub,
  #sunny-playground .mh-priority .mh-list {
    align-self: start;
    margin: 7px 8px 8px;
  }
  #sunny-playground .mh-priority .mh-sub { font-size: 14px; }
  #sunny-playground .mh-count {
    flex: 0 0 auto;
    min-width: 27px;
    padding: 3px 7px;
    border-radius: 18px;
    background: var(--mh-done);
    color: var(--mh-done-ink);
    font-size: 13px;
    text-align: center;
    font-variant-numeric: tabular-nums;
  }
  #sunny-playground .mh-group { margin-top: 8px; }
  #sunny-playground .mh-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 7px 0 0;
  }
  #sunny-playground .mh-row {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    max-width: 100%;
    padding: 4px 9px;
    border: 1px solid var(--mh-line);
    border-radius: 12px;
    background: var(--mh-panel);
    font-size: 14px;
  }
  #sunny-playground .mh-row > span:first-child { overflow-wrap: anywhere; min-width: 0; font-weight: 700; }
  #sunny-playground .mh-row button {
    padding: 3px 0;
    background: transparent;
    border: 0;
    font: inherit;
    font-weight: 700;
    color: inherit;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-row button:hover { text-decoration: underline; }
  #sunny-playground .mh-pill {
    flex: 0 0 auto;
    border-radius: 20px;
    padding: 2px 7px;
    background: var(--mh-zone, var(--mh-done));
    font-size: 13px;
    font-weight: 700;
  }
  #sunny-playground details summary {
    position: relative;
    min-height: 44px;
    padding: 10px 12px;
    padding-inline-end: 52px;
    border-radius: 10px;
    background: var(--mh-panel);
    font-weight: 700;
  }
  #sunny-playground details summary .mh-count {
    position: absolute;
    inset-block-start: 50%;
    inset-inline-end: 12px;
    transform: translateY(-50%);
  }
  #sunny-playground details .mh-list { padding: 0 3px 3px; }
  #sunny-playground .mh-today {
    display: grid;
    align-content: start;
    gap: 8px;
    padding-block-start: 10px;
  }
  #sunny-playground .mh-today .mh-priority,
  #sunny-playground .mh-today .mh-group { margin-top: 0; }
  #sunny-playground .mh-today .mh-priority section { min-height: 56px; }
  #sunny-playground .mh-today .mh-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 96px), 1fr));
    gap: 4px;
    margin: 6px 8px 8px;
    padding: 0;
  }
  #sunny-playground .mh-today .mh-row {
    display: block;
    min-width: 0;
    padding: 0;
    border-radius: 8px;
  }
  #sunny-playground .mh-today .mh-row button {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: 5px 7px;
    text-align: start;
    line-height: 1.2;
  }
  #sunny-playground .mh-today .mh-row button > span,
  #sunny-playground .mh-today .mh-priority h2 > span:first-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-today[data-compact] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground .mh-today[data-compact] > .mh-priority,
  #sunny-playground .mh-today[data-compact] > .mh-group:last-child:nth-child(even) { grid-column: 1 / -1; }
  #sunny-playground .mh-today[data-compact] .mh-priority { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground .mh-today[data-compact] .mh-priority section {
    grid-row: auto;
    grid-template-rows: auto;
    min-height: 40px;
  }
  #sunny-playground .mh-today[data-compact] .mh-priority section:not(.mh-is-empty) {
    display: grid;
    grid-template-columns: 144px minmax(0, 1fr);
  }
  #sunny-playground .mh-today[data-compact] .mh-priority section[data-wide] { grid-column: 1 / -1; }
  #sunny-playground .mh-today[data-compact] .mh-priority .mh-list { margin: 4px 6px; }
  #sunny-playground .mh-today[data-compact] .mh-priority section[data-wide] .mh-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 88px), 1fr));
  }
  #sunny-playground .mh-today[data-compact] .mh-priority h2 { min-height: 40px; font-size: 14px; }
  #sunny-playground .mh-profile-settings {
    display: grid;
    justify-items: start;
    gap: 8px;
  }
  #sunny-playground .mh-profile-settings .mh-sub { margin: 0; font-size: 14px; }
  #sunny-playground .mh-profile-settings [role="status"] {
    color: var(--mh-moss);
    font-size: 14px;
    font-weight: 800;
  }
  #sunny-playground .mh-profile-settings [role="status"]:empty { display: none; }
  #sunny-playground .mh-profile-settings button:disabled {
    background: var(--mh-done);
    color: var(--mh-done-ink);
  }
  #sunny-playground .mh-feeling-settings [hidden] { display: none; }
  #sunny-playground .mh-feeling-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
    align-items: end;
    gap: 8px 12px;
  }
  #sunny-playground .mh-feeling-toolbar .mh-settings-actions { justify-content: flex-end; }
  @container mh-tablet-app (max-width: 610px) {
    #sunny-playground .mh-feeling-toolbar { grid-template-columns: minmax(0, 1fr); }
    #sunny-playground .mh-feeling-toolbar .mh-settings-actions { justify-content: flex-start; }
  }
  #sunny-playground .mh-backdrop-settings [hidden] { display: none; }
  #sunny-playground .mh-backdrop-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    align-items: start;
    gap: 8px 12px;
  }
  #sunny-playground .mh-backdrop-fields { display: grid; gap: 8px; }
  @container mh-tablet-app (max-width: 465px) {
    #sunny-playground .mh-backdrop-editor { grid-template-columns: minmax(0, 1fr); }
  }
  #sunny-playground .mh-backdrop-week {
    display: grid;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #sunny-playground .mh-backdrop-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 3px;
  }
  #sunny-playground .mh-backdrop-days .mh-quiet {
    min-width: 0;
    padding: 5px 0;
    font-size: 12px;
  }
  #sunny-playground .mh-backdrop-days [aria-pressed="true"] {
    background: var(--mh-done);
    border-color: var(--mh-moss);
  }
  #sunny-playground .mh-backdrop-preview {
    display: grid;
    gap: 5px;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
  }
  #sunny-playground .mh-backdrop-preview .mh-meadow {
    min-height: 118px;
    padding: 0;
    border-radius: 9px;
  }
  #sunny-playground .mh-custom-settings,
  #sunny-playground .mh-custom-choice {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
  }
  #sunny-playground .mh-custom-settings { display: grid; gap: 9px; }
  #sunny-playground .mh-custom-toolbar {
    display: grid;
    grid-template-columns: 126px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }
  #sunny-playground .mh-custom-toolbar label { min-width: 0; font-size: 13px; }
  #sunny-playground .mh-custom-picker {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 5px;
  }
  #sunny-playground .mh-custom-picker .mh-custom-edit {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 5px 7px;
    min-height: 44px;
    text-align: start;
    font-size: 14px;
    line-height: 1.15;
  }
  #sunny-playground .mh-custom-picker .mh-custom-edit > span:last-child {
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  #sunny-playground .mh-custom-picker .mh-custom-edit[aria-pressed="true"] {
    border-color: var(--mh-moss);
    background: var(--mh-done);
  }
  #sunny-playground .mh-custom-swatch {
    flex: 0 0 13px;
    height: 13px;
    border: 1px solid var(--mh-line);
    border-radius: 50%;
    background: var(--mh-zone);
  }
  #sunny-playground .mh-custom-choice {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) auto minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    align-items: end;
    gap: 7px;
    padding: 6px 8px;
    border: 1px solid var(--mh-line);
    border-radius: 12px;
  }
  #sunny-playground .mh-custom-choice legend { padding: 0 5px; font-size: 13px; font-weight: 800; }
  #sunny-playground .mh-custom-choice label { min-width: 0; font-size: 13px; }
  #sunny-playground .mh-custom-choice input[type="color"] { width: 48px; padding: 4px; }
  #sunny-playground .mh-custom-preview {
    display: grid;
    gap: 4px;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
  }
  #sunny-playground .mh-custom-preview-sample {
    min-height: 44px;
    line-height: 1.15;
    background: var(--mh-zone);
    color: var(--mh-zone-ink);
    text-align: center;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-custom-preview-sample .mh-shape-content > span:last-child {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  #sunny-playground .mh-custom-preview-sample .mh-symbol {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
  @container mh-tablet-app (max-width: 640px) {
    #sunny-playground .mh-custom-toolbar { grid-template-columns: minmax(0, 1fr); }
    #sunny-playground .mh-custom-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sunny-playground .mh-custom-choice { grid-template-columns: auto minmax(0, 1fr); }
    #sunny-playground .mh-custom-choice label:first-of-type,
    #sunny-playground .mh-custom-picture,
    #sunny-playground .mh-custom-preview { grid-column: 1 / -1; }
  }
  #sunny-playground .mh-error { color: light-dark(#9b2f2a, #ffb1a8); }
  #sunny-playground .mh-sr {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  @container mh-tablet-app (max-width: 590px) {
    #sunny-playground .mh-animal-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  }
  @container mh-tablet-app (max-width: 510px) {
    #sunny-playground .mh-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sunny-playground .mh-animal-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    #sunny-playground .mh-compact-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    #sunny-playground .mh-compact-options .mh-choice { font-size: 13px; }
    #sunny-playground .mh-compact-options:not(.mh-background-options) .mh-choice { min-height: 79px; padding: 5px; }
    #sunny-playground .mh-priority { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sunny-playground .mh-personal {
      grid-template-columns: auto minmax(0, 1fr);
      grid-template-areas: "animal back" "animal greeting";
    }
  }
  @container mh-tablet-app (max-width: 405px) {
    #sunny-playground .mh-animal-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  #sunny-playground .mh-app > .mh-main.mh-meadow-page { height: 100%; min-height: 0; padding: 0; }
  #sunny-playground .mh-meadow-page > .mh-meadow {
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr);
    gap: clamp(6px, 3.4cqh, 23px);
    padding-block: clamp(8px, 3.2cqh, 24px) clamp(10px, 5.5cqh, 42px);
  }
  #sunny-playground .mh-meadow {
    --mh-roster-surface: light-dark(#f7fcff, #2e3e50);
    --mh-roster-line: light-dark(#cadfea, #526a7e);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: clamp(14px, 3.4cqw, 23px);
    min-height: 404px;
    padding: clamp(14px, 3cqw, 24px) clamp(16px, 4.5cqw, 36px) 42px;
    background: var(--mh-scene-sky);
  }
  #sunny-playground .mh-meadow-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(8px, 2cqw, 14px);
    min-height: clamp(64px, min(19cqw, 19cqh), 139px);
    padding-inline-end: clamp(34px, 4cqw, 40px);
  }
  #sunny-playground .mh-staff-icon {
    position: absolute;
    z-index: 1;
    inset: 5px 5px auto auto;
    display: grid;
    place-items: center;
    width: 44px;
    padding: 0;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: light-dark(#3c6078, #c9e3f4);
  }
  #sunny-playground .mh-staff-icon::before {
    content: "";
    position: absolute;
    inset: 6px;
    border: 1px solid var(--mh-roster-line);
    border-radius: 10px;
    background: var(--mh-roster-surface);
    box-shadow: 0 2px 6px light-dark(#31516a16, #0003);
  }
  #sunny-playground .mh-lock-glyph {
    position: relative;
    width: 11px;
    height: 9px;
    margin-top: 4px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
  }
  #sunny-playground .mh-lock-glyph::before {
    content: "";
    position: absolute;
    inset: auto 1px 100%;
    height: 5px;
    border: 1.5px solid currentColor;
    border-bottom: 0;
    border-radius: 5px 5px 0 0;
  }
  #sunny-playground .mh-meadow-title {
    display: grid;
    align-self: center;
    justify-self: start;
    justify-items: start;
    gap: 5px;
    max-width: 100%;
  }
  #sunny-playground .mh-meadow-title h1 {
    font-size: clamp(26px, min(8.8cqw, 10cqh), 76px);
    line-height: 1.05;
    letter-spacing: -.03em;
  }
  #sunny-playground .mh-meadow-title p {
    max-width: 30ch;
    color: var(--mh-soft);
    font-family: inherit;
    font-size: clamp(14px, min(3.6cqw, 3.6cqh), 25px);
    font-weight: 500;
  }
  #sunny-playground .mh-meadow-title,
  #sunny-playground .mh-personal-name {
    color: #302741;
  }
  #sunny-playground .mh-meadow-title p {
    color: #463e55;
  }
  #sunny-playground .mh-stepping-stones {
    --mh-sticker-slant: .13;
    --mh-sticker-turn: 1;
    --mh-shaped-name-scale: .20;
    --mh-shaped-animal-scale: .44;
    display: grid;
    width: min(100%, var(--mh-roster-width, 100%));
    justify-self: center;
    grid-template-columns: repeat(var(--mh-roster-tracks, 2), minmax(0, 1fr));
    grid-auto-rows: minmax(0, 1fr);
    gap: 10px;
    padding: 0 3px 9px;
  }
  #sunny-playground .mh-stepping-stones[data-compact] {
    --mh-sticker-slant: .10;
    --mh-sticker-turn: .75;
    --mh-shaped-name-scale: .15;
    --mh-shaped-animal-scale: .36;
  }
  @container mh-tablet-app (min-width: 1300px) {
    #sunny-playground:not([data-phone]) .mh-stepping-stones:not([data-compact]) {
      width: min(94%, var(--mh-roster-width, 100%));
    }
  }
  #sunny-playground .mh-roster-slot {
    display: grid;
    grid-column: var(--mh-slot-column, auto) / span 2;
    grid-row: var(--mh-slot-row, auto);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    container-type: size;
  }
  #sunny-playground .mh-stepping-stones button.mh-name {
    --mh-stone-surface: var(--mh-tile);
    /* Allow for the rotated corners within each grid slot. */
    --mh-sticker-height: calc(var(--mh-roster-slot-height, 100cqh) / (1 + var(--mh-badge-ratio) * var(--mh-sticker-slant)));
    --mh-sticker-content-height: min(var(--mh-sticker-height), 100cqw / (var(--mh-badge-ratio) + var(--mh-sticker-slant)), var(--mh-badge-max-width, 360px) / var(--mh-badge-ratio));
    --mh-sticker-name-scale: .23;
    --mh-sticker-animal-scale: .49;
    --mh-shape-outline: var(--mh-sticker-paper);
    --mh-shape-stroke: clamp(3.5px, 2.6cqw, 6px);
    position: relative;
    isolation: isolate;
    place-self: center;
    width: calc(var(--mh-sticker-content-height) * var(--mh-badge-ratio));
    height: var(--mh-sticker-content-height);
    rotate: calc(var(--mh-sticker-angle) * var(--mh-sticker-turn));
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    filter: var(--mh-sticker-shadow);
    font-size: clamp(13px, min(17cqw, calc(var(--mh-sticker-content-height) * var(--mh-sticker-name-scale))), 62px);
  }
  #sunny-playground .mh-stepping-stones[data-small-roster] button.mh-name {
    --mh-badge-max-width: min(400px, 90cqw);
  }
  #sunny-playground:not([data-phone]) .mh-stepping-stones:not([data-compact]) button.mh-name {
    --mh-roster-slot-height: min(100cqh, max(112px, 86cqh));
  }
  #sunny-playground .mh-stepping-stones .mh-name:is(.mh-circle, .mh-oval, .mh-drop, .mh-shield, .mh-arch, .mh-leaf, .mh-cloud-shape) {
    --mh-sticker-name-scale: var(--mh-shaped-name-scale);
    --mh-sticker-animal-scale: var(--mh-shaped-animal-scale);
  }
  #sunny-playground .mh-stepping-stones .mh-shape-content {
    gap: clamp(2px, calc(var(--mh-sticker-content-height) * .025), 5px);
    min-height: 0;
  }
  #sunny-playground .mh-stepping-stones .mh-animal {
    flex: none;
    font-size: clamp(15px, min(42cqw, calc(var(--mh-sticker-content-height) * var(--mh-sticker-animal-scale))), 124px);
    line-height: 1;
  }
  #sunny-playground .mh-stepping-stones .mh-pupil-label {
    flex: none;
    max-width: 100%;
    line-height: 1.05;
    text-wrap: balance;
  }
  #sunny-playground .mh-stepping-stones .mh-name[data-name-only] .mh-animal { display: none; }
  #sunny-playground .mh-stepping-stones .mh-name[data-narrow-lettering] .mh-pupil-label {
    font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  }
  #sunny-playground .mh-stepping-stones .mh-name[data-unset] { --mh-stone-surface: var(--mh-roster-surface); }
  #sunny-playground .mh-roster-slot:nth-child(4n + 1) .mh-name[data-unset] {
    --mh-stone-surface: light-dark(#dcecfb, #354b62);
  }
  #sunny-playground .mh-roster-slot:nth-child(4n + 3) .mh-name[data-unset] {
    --mh-stone-surface: light-dark(#ece3f7, #4c405c);
  }
  #sunny-playground .mh-roster-slot:nth-child(4n) .mh-name[data-unset] {
    --mh-stone-surface: light-dark(#deefe4, #365348);
  }
  #sunny-playground .mh-stepping-stones .mh-name:disabled {
    --mh-shape-outline: color-mix(in srgb, var(--mh-done) 87%, var(--mh-done-ink));
    --mh-shape-fill: var(--mh-done);
    filter: none;
  }
  #sunny-playground .mh-stepping-stones .mh-name:disabled .mh-animal { filter: grayscale(.35); opacity: 1; }
  #sunny-playground .mh-personal-page {
    --mh-personal-padding: clamp(14px, 3.5cqw, 26px);
    --mh-feelings-gap: 14px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: var(--mh-personal-padding);
    background: var(--mh-tile);
  }
  #sunny-playground .mh-scene-art {
    position: absolute;
    z-index: -1;
    inset: 0;
    display: block;
    overflow: hidden;
    pointer-events: none;
    container-type: size;
    background: #e3edf3;
  }
  #sunny-playground .mh-scene-art > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right 28%;
  }
  #sunny-playground .mh-scene-art.mh-scene-preview {
    position: relative;
    z-index: auto;
    inset: auto;
  }
  #sunny-playground .mh-preview-background .mh-scene-art { z-index: auto; }
  #sunny-playground :is(.mh-scene-preview, .mh-preview-background .mh-scene-art) > img {
    object-fit: cover;
    object-position: 70% 24%;
  }
  #sunny-playground :is(.mh-personal-page, .mh-meadow-page) .mh-scene-art::after {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 42%;
    background: radial-gradient(ellipse at 12% 12%, #fffdf284 0%, #fffdf232 49%, transparent 71%);
  }
  @container (max-aspect-ratio: 1) {
    #sunny-playground .mh-scene-art[data-scene="sunny-playground"] { --mh-portrait-focus: 90%; }
    #sunny-playground .mh-scene-art[data-scene="football"] { --mh-portrait-focus: 98%; }
    #sunny-playground .mh-scene-art[data-scene="space"] { --mh-portrait-focus: 94%; }
    #sunny-playground .mh-scene-art[data-scene="ocean"] { --mh-portrait-focus: 95%; }
    #sunny-playground .mh-scene-art[data-scene="rainbow"] { --mh-portrait-focus: 90%; }
    #sunny-playground :is(.mh-personal-page, .mh-meadow-page) .mh-scene-art > img {
      object-fit: cover;
      object-position: var(--mh-portrait-focus, 77%) top;
    }
    #sunny-playground :is(.mh-personal-page, .mh-meadow-page) .mh-scene-art::after {
      height: 52%;
      background: radial-gradient(ellipse 100% 100% at 0 0, #fffdf2d9, #fffdf25c 53%, transparent);
    }
  }
  #sunny-playground .mh-painted-icon {
    display: block;
    width: 1em;
    height: 1em;
    object-fit: contain;
  }
  #sunny-playground .mh-animal-options .mh-painted-icon {
    width: 84%;
    height: 84%;
  }
  #sunny-playground :is(.mh-portrait-animal, .mh-preview-animal) .mh-painted-icon {
    width: 100%;
    height: 100%;
  }

  #sunny-playground .mh-personal-top {
    display: flex;
    flex: none;
    flex-direction: column;
    min-height: calc(var(--mh-tablet-height) / 3 - var(--mh-personal-padding) - var(--mh-feelings-gap));
  }
  #sunny-playground .mh-personal {
    flex: 1;
    padding: 0 0 12px;
    background: none;
  }
  #sunny-playground .mh-trial-banner + .mh-personal .mh-personal-art {
    width: clamp(82px, 17cqw, 136px);
  }
  #sunny-playground .mh-personal h2 {
    position: relative;
    font-family: var(--mh-heading-font);
    width: fit-content;
    margin-top: 8px;
    padding: 12px 16px;
    border-radius: 21px;
    background: var(--mh-panel);
    filter: drop-shadow(0 2px 1px var(--mh-button-shadow));
    font-size: clamp(20px, 4cqw, 33px);
  }
  #sunny-playground .mh-personal h2::before {
    content: "";
    position: absolute;
    inset: 50% auto auto -8px;
    translate: 0 -50%;
    border-block: 6px solid transparent;
    border-right: 9px solid var(--mh-panel);
  }
  #sunny-playground .mh-zones {
    flex: 1;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    grid-auto-rows: minmax(178px, 1fr);
    margin-top: var(--mh-feelings-gap);
    padding-bottom: 7px;
  }
  #sunny-playground .mh-zone-slot {
    display: grid;
    grid-column: span var(--mh-zone-span);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr);
    container-type: size;
  }
  #sunny-playground .mh-zones .mh-zone {
    --mh-feeling-size: min(100cqw, 100cqh);
    --mh-feeling-icon-scale: .40;
    --mh-feeling-icon: clamp(32px, calc(var(--mh-feeling-size) * var(--mh-feeling-icon-scale)), 132px);
    --mh-feeling-label: clamp(16px, min(10cqw, 15cqh), 36px);
    --mh-shape-outline: var(--mh-sticker-paper);
    --mh-shape-stroke: clamp(4px, 2.65cqh, 6px);
    --mh-shape-fill: linear-gradient(155deg, color-mix(in srgb, var(--mh-zone) 84%, var(--mh-panel)), var(--mh-zone) 78%);
    position: relative;
    isolation: isolate;
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    filter: var(--mh-sticker-shadow);
    font-family: "Fredoka", ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
    font-weight: 600;
  }
  #sunny-playground .mh-zone:is(.mh-circle, .mh-oval) {
    --mh-feeling-size: min(76cqw, 100cqh);
    place-self: center;
    width: 100%;
    height: min(100%, 76cqw);
  }
  #sunny-playground .mh-zone.mh-custom-zone {
    --mh-shape-fill: var(--mh-zone);
    color: var(--mh-zone-ink);
  }
  #sunny-playground .mh-zone:is(.mh-leaf, .mh-cloud-shape, .mh-shield, .mh-arch) { --mh-feeling-icon-scale: .30; }
  #sunny-playground .mh-zone[data-long-label] {
    --mh-feeling-icon-scale: .27;
    --mh-feeling-label: clamp(13px, min(7cqw, 7.5cqh), 24px);
  }
  #sunny-playground .mh-zone[data-long-label]:is(.mh-leaf, .mh-cloud-shape, .mh-shield, .mh-arch) { --mh-feeling-icon-scale: .21; }
  #sunny-playground .mh-zone .mh-shape-content { gap: clamp(4px, 3cqh, 12px); }
  #sunny-playground .mh-zone-label {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    font-size: var(--mh-feeling-label);
    line-height: 1.15;
    text-align: center;
  }
  #sunny-playground .mh-actions:has(.mh-unsure) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    align-self: center;
    width: min(100%, 464px);
    gap: 10px;
  }
  #sunny-playground .mh-symbol {
    width: 49px;
    height: 49px;
    background: var(--mh-panel);
    font-size: 29px;
  }
  #sunny-playground .mh-setup-header {
    --mh-portrait-slot: clamp(72px, 9cqw, 140px);
    flex: none;
    height: clamp(124px, 19cqh, 154px);
    grid-template: minmax(0, 1fr) / minmax(0, 1fr) minmax(0, min(52%, 740px)) minmax(0, 1fr);
    align-items: center;
    padding: 8px 12px;
    row-gap: 8px;
    column-gap: 14px;
    border: 2px solid var(--mh-cloud);
    background: color-mix(in srgb, var(--mh-scene-sky) 61%, var(--mh-panel));
  }
  #sunny-playground .mh-setup-heading { display: grid; grid-area: 1 / 1; justify-items: start; align-content: center; min-width: 0; }
  #sunny-playground .mh-setup-header > .mh-setup-nav {
    display: grid;
    grid-area: 1 / 3;
    justify-self: end;
    width: 108px;
    gap: 6px;
  }
  #sunny-playground .mh-setup-header .mh-setup-nav > button {
    min-height: 44px;
    height: 44px;
    padding: 5px 8px;
    font-size: 14px;
    white-space: nowrap;
  }
  #sunny-playground .mh-setup-header .mh-setup-nav > [data-action="badge-back"] { font-size: 16px; }
  #sunny-playground .mh-setup-visuals {
    grid-area: 1 / 2;
    display: grid;
    grid-template-columns: var(--mh-portrait-slot) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  #sunny-playground .mh-setup-visuals > .mh-setup-preview { grid-column: 2; width: 100%; height: 100%; min-height: 0; }
  #sunny-playground .mh-preview-portrait { grid-column: 1; display: grid; place-items: center; min-width: 0; height: 100%; container-type: size; }
  #sunny-playground .mh-setup-preview[data-empty] { border-color: transparent; box-shadow: none; }
  #sunny-playground .mh-preview-background { position: absolute; inset: 0; }
  #sunny-playground .mh-preview-design { position: absolute; inset: 8% 5%; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; }
  #sunny-playground .mh-preview-name-shape {
    position: relative;
    isolation: isolate;
    height: 100%;
    max-width: 100%;
    aspect-ratio: max(2.2, 1.85 * var(--mh-badge-ratio));
    --mh-shape-outline: var(--mh-sticker-paper);
    --mh-shape-stroke: 3px;
    filter: var(--mh-sticker-shadow);
  }
  #sunny-playground .mh-preview-name-shape .mh-shape-content { min-height: 0; }
  #sunny-playground .mh-preview-portrait .mh-preview-avatar {
    --mh-portrait-size: min(86cqw, 84cqh);
    position: relative;
    isolation: isolate;
    display: grid;
    place-items: center;
    width: var(--mh-portrait-size);
    height: calc(var(--mh-portrait-size) / var(--mh-badge-ratio));
    min-height: 0;
    --mh-shape-outline: var(--mh-sticker-paper);
    --mh-shape-stroke: 4px;
    transform: rotate(-7deg);
    filter: var(--mh-sticker-shadow);
  }
  #sunny-playground :is(.mh-preview-portrait, .mh-setup-preview):not([data-colour-ready]) :is(.mh-preview-avatar, .mh-preview-name-shape) { --mh-tile: #fff; }
  #sunny-playground .mh-preview-name { flex: none; width: 100%; font-size: 38px; line-height: 1.12; overflow-wrap: anywhere; text-align: center; text-wrap: balance; }
  #sunny-playground :is(#sunny-pin-heading, #sunny-action-title, #sunny-setup-title):focus { outline: none; }
  #sunny-playground .mh-preview-arrival,
  #sunny-playground [data-added="shape"] > :is(.mh-preview-avatar, .mh-preview-name-shape),
  #sunny-playground [data-added="animal"] .mh-preview-animal,
  #sunny-playground [data-added="font"] .mh-pupil-label { animation: mh-preview-appear 220ms ease-out both; }
  @keyframes mh-preview-appear { from { opacity: 0; scale: .86; } to { opacity: 1; scale: 1; } }
  #sunny-playground .mh-setup-header h1 { font-size: clamp(24px, 2.8cqw, 40px); }
  #sunny-playground .mh-setup-page {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
    background: linear-gradient(var(--mh-panel), color-mix(in srgb, var(--mh-hero) 61%, var(--mh-panel)));
  }
  #sunny-playground .mh-setup-page > .mh-grid {
    flex: 1;
    min-height: 0;
    grid-auto-rows: minmax(0, 1fr);
    margin: 0;
  }
  #sunny-playground .mh-setup-page > .mh-grid > .mh-choice { min-height: 0; }
  #sunny-playground .mh-choice {
    border: 2px solid var(--mh-panel);
    box-shadow: var(--mh-lift);
  }
  #sunny-playground .mh-choice[data-current="true"] { border-color: var(--mh-moss); }
  #sunny-playground .mh-setup-page .mh-choice:has(.mh-choice-art-label) { position: relative; }
  #sunny-playground .mh-choice-art-label {
    position: absolute;
    inset: 50% 4px auto;
    transform: translateY(-50%);
    justify-self: center;
    width: fit-content;
    max-width: calc(100% - 8px);
    padding: 3px 6px;
    border-radius: 6px;
    background: var(--mh-panel);
    color: var(--mh-ink);
    font: 600 clamp(11px, 1.5cqw, 16px)/1.2 var(--mh-staff-font);
    text-align: center;
    pointer-events: none;
  }
  #sunny-playground .mh-choice-art-label[hidden] { display: none; }
  @media (hover: hover) and (prefers-reduced-motion: no-preference) {
    #sunny-playground .mh-stepping-stones .mh-name:not(:disabled),
    #sunny-playground .mh-choice,
    #sunny-playground .mh-zone,
    #sunny-playground .mh-talk { transition: translate 120ms ease; }
    #sunny-playground .mh-stepping-stones .mh-name:not(:disabled):hover,
    #sunny-playground .mh-choice:hover,
    #sunny-playground .mh-zone:hover,
    #sunny-playground .mh-talk:hover { translate: 0 -2px; }
  }
  #sunny-playground .mh-stepping-stones .mh-name:not(:disabled):active,
  #sunny-playground .mh-choice:active,
  #sunny-playground .mh-zone:active,
  #sunny-playground .mh-talk:active { translate: 0 1px; }
  @container mh-tablet-app (max-width: 510px) {
    #sunny-playground .mh-zones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #sunny-playground .mh-zone-slot { grid-column: auto; }
    #sunny-playground .mh-zone-slot:last-child:nth-child(odd) { grid-column: 1 / -1; }
    #sunny-playground .mh-cloud-small { opacity: .64; }
    #sunny-playground .mh-cloud-wide { inset-block-start: 142px; }
  }
  #sunny-playground .mh-cut-shape {
    --mh-shape-outline: var(--mh-panel);
    --mh-shape-stroke: 2px;
    isolation: isolate;
  }
  #sunny-playground .mh-cut-shape:is(.mh-name, .mh-zone, .mh-custom-preview-sample, .mh-sample) {
    position: relative;
    border-style: none;
    background: transparent;
    box-shadow: none;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-personal-art) {
    --mh-sticker-colour: var(--mh-stone-surface, var(--mh-tile));
    --mh-shape-fill: linear-gradient(155deg, color-mix(in srgb, var(--mh-sticker-colour) 77%, var(--mh-panel)), var(--mh-sticker-colour) 78%);
  }
  #sunny-playground .mh-cut-shape::before,
  #sunny-playground .mh-cut-shape::after,
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::before,
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::after {
    content: "";
    position: absolute;
    z-index: -1;
    clip-path: var(--mh-shape-cut, none);
    pointer-events: none;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::before,
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::after { border-radius: inherit; }
  #sunny-playground .mh-cut-shape::before {
    box-sizing: border-box;
    padding-top: var(--mh-shape-stroke);
  }
  #sunny-playground .mh-cut-shape::before,
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::before {
    inset: 0;
    background: var(--mh-shape-outline);
  }
  #sunny-playground .mh-cut-shape::after,
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art)::after {
    inset: var(--mh-shape-stroke);
    background: var(--mh-shape-fill);
  }
  #sunny-playground .mh-cut-shape[data-even-border]::after {
    inset: 0;
    clip-path: var(--mh-shape-inner-cut);
  }
  #sunny-playground .mh-zone[data-even-border]::before { visibility: hidden; }
  #sunny-playground .mh-zone-outline {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: var(--mh-shape-outline);
    pointer-events: none;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art).mh-rounded {
    border-radius: clamp(14px, 19cqh, 28px);
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art).mh-soft-square {
    border-radius: clamp(8px, 10cqh, 16px);
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art):not(.mh-cut-shape)::before {
    content: none;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-zones .mh-zone, .mh-personal-art):not(.mh-cut-shape)::after {
    inset: 0;
    border: var(--mh-shape-stroke) solid var(--mh-shape-outline);
    background-clip: padding-box;
  }
  #sunny-playground .mh-sample.mh-cut-shape {
    --mh-shape-outline: var(--mh-line);
    --mh-shape-stroke: 1px;
    --mh-shape-fill: linear-gradient(150deg, color-mix(in srgb, var(--mh-hero) 65%, var(--mh-panel)), var(--mh-hero));
  }
  #sunny-playground .mh-badge-preview.mh-cut-shape { --mh-shape-fill: var(--mh-tile); }
  #sunny-playground .mh-custom-preview-sample.mh-cut-shape { --mh-shape-fill: var(--mh-zone); }
  #sunny-playground [data-bright-shapes] :is(
    .mh-name:not(:disabled), .mh-personal-art, .mh-zone:not(.mh-custom-zone), .mh-sample
  )::after { filter: saturate(2.1); }
  #sunny-playground [data-bright-shapes] .mh-colour-swatch { filter: saturate(2.1); }
  #sunny-playground [data-bright-shapes] .mh-badge-preview:not(.mh-cut-shape) {
    position: relative;
    isolation: isolate;
    background: transparent;
  }
  #sunny-playground [data-bright-shapes] .mh-badge-preview:not(.mh-cut-shape)::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0;
    border-radius: inherit;
    background: var(--mh-tile);
  }
  /* The middle tracks keep the contents clear of curved edges, points and cutouts. */
  #sunny-playground .mh-shape-layout {
    display: grid;
    grid-template-columns: var(--mh-shape-columns, 1fr minmax(0, 12fr) 1fr);
    grid-template-rows: var(--mh-shape-rows, 1fr 10fr 1fr);
    align-content: stretch;
    justify-items: stretch;
    gap: 0;
    padding: 3px;
  }
  #sunny-playground .mh-shape-content {
    grid-area: 2 / 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    text-align: center;
  }
  #sunny-playground .mh-shape-content > span:not(.mh-symbol) {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
  }
  #sunny-playground :is(.mh-badge-preview, .mh-custom-preview-sample) .mh-shape-content {
    flex-direction: row;
    gap: 6px;
  }
  #sunny-playground .mh-badge-preview:is(.mh-circle, .mh-soft-square) .mh-shape-content {
    flex-direction: column;
    gap: 0;
  }
  #sunny-playground .mh-preview-portrait .mh-preview-avatar .mh-shape-content { min-height: 0; gap: 8px; }
  #sunny-playground .mh-preview-portrait .mh-preview-avatar:is(.mh-circle, .mh-soft-square) .mh-shape-content { gap: 0; line-height: 1; }
  #sunny-playground .mh-shape-layout:is(.mh-circle, .mh-oval, .mh-drop, .mh-shield, .mh-arch, .mh-hexagon) {
    --mh-shape-columns: 1fr minmax(0, 4fr) 1fr;
  }
  #sunny-playground .mh-shape-layout:is(.mh-circle, .mh-oval, .mh-drop) { --mh-shape-rows: 1fr 4fr 1fr; }
  #sunny-playground .mh-shape-layout.mh-shield { --mh-shape-rows: 1fr 5fr 2fr; }
  #sunny-playground .mh-shape-layout.mh-arch { --mh-shape-rows: 2fr 5fr 1fr; }
  #sunny-playground .mh-shape-layout.mh-leaf {
    --mh-shape-columns: 1fr minmax(0, 3fr) 1fr;
    --mh-shape-rows: 1fr 2fr 1fr;
  }
  #sunny-playground .mh-shape-layout.mh-tag { --mh-shape-columns: 1fr minmax(0, 7fr) 2.5fr; }
  #sunny-playground .mh-shape-layout.mh-ticket { --mh-shape-columns: 1fr minmax(0, 8fr) 1fr; }
  #sunny-playground .mh-preview-portrait .mh-preview-avatar { --mh-shape-rows: 1px minmax(0, 1fr) 1px; }
  #sunny-playground .mh-shape-layout.mh-cloud-shape {
    --mh-shape-columns: 1fr minmax(0, 3fr) 1fr;
    --mh-shape-rows: 2fr 5fr 1.5fr;
  }
  /* Keep names and animals in the broadest part of each badge. */
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-oval {
    --mh-shape-columns: 1fr minmax(0, 4fr) 1fr;
    --mh-shape-rows: 1fr minmax(0, 5fr) 1fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-shield {
    --mh-shape-columns: 1fr minmax(0, 7fr) 1fr;
    --mh-shape-rows: .7fr minmax(0, 6fr) 2.5fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-leaf {
    --mh-shape-columns: 1fr minmax(0, 3fr) 1fr;
    --mh-shape-rows: 1fr minmax(0, 3fr) 1fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-cloud-shape {
    --mh-shape-columns: 1.5fr minmax(0, 7fr) 1.5fr;
    --mh-shape-rows: 2.5fr minmax(0, 5.5fr) 1fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape):is(.mh-rounded, .mh-soft-square, .mh-ticket) {
    --mh-shape-rows: 1fr minmax(0, 10fr) 1fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape):is(.mh-circle, .mh-drop, .mh-hexagon) {
    --mh-shape-columns: 1.4fr minmax(0, 7.2fr) 1.4fr;
    --mh-shape-rows: 1.3fr minmax(0, 7.4fr) 1.3fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-arch {
    --mh-shape-rows: 2.4fr minmax(0, 6.6fr) 1fr;
  }
  #sunny-playground :is(.mh-stepping-stones .mh-name, .mh-preview-name-shape).mh-tag {
    --mh-shape-columns: .9fr minmax(0, 6.7fr) 2.4fr;
    --mh-shape-rows: 1fr minmax(0, 8fr) 1fr;
  }
  #sunny-playground .mh-preview-name-shape.mh-shield {
    --mh-shape-columns: .6fr minmax(0, 8.8fr) .6fr;
    --mh-shape-rows: .8fr minmax(0, 6.4fr) 2.8fr;
  }
  #sunny-playground .mh-zone .mh-symbol {
    width: var(--mh-feeling-icon);
    height: var(--mh-feeling-icon);
    font-size: calc(var(--mh-feeling-icon) * .76);
  }
  #sunny-playground .mh-symbol-glyph {
    display: block;
    font: 1em/1 "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
  }
  #sunny-playground .mh-traffic-light {
    display: block;
    width: .94em;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle at 64% 32%, var(--mh-light-shine), var(--mh-light-colour) 45%, var(--mh-light-shadow) 82%);
  }
  #sunny-playground .mh-traffic-light[data-light="green"] { --mh-light-shine: #8cecaa; --mh-light-colour: #3ac373; --mh-light-shadow: #16804c; }
  #sunny-playground .mh-traffic-light[data-light="amber"] { --mh-light-shine: #ffdd91; --mh-light-colour: #ffae42; --mh-light-shadow: #d66b14; }
  #sunny-playground .mh-traffic-light[data-light="red"] { --mh-light-shine: #ff8d98; --mh-light-colour: #ec3950; --mh-light-shadow: #a52135; }
  #sunny-playground .mh-settings-nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] { gap: 8px; }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] .mh-profile-settings { gap: 4px; }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] .mh-settings-section { padding-block: 6px; }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] .mh-settings-section > :is(.mh-form, .mh-profile-settings) { margin-top: 6px; }
  #sunny-playground .mh-custom-settings { gap: 7px; }
  #sunny-playground .mh-date-status { display: grid; gap: 1px; min-width: 0; }
  #sunny-playground .mh-save-state { color: var(--mh-soft); font-size: 11px; font-weight: 500; line-height: 1.15; }
  #sunny-playground .mh-save-state[data-state="error"] { color: light-dark(#a32038, #ffb9c7); }
  #sunny-playground .mh-save-state .mh-quiet { min-height: 24px; padding: 2px 6px; }
  #sunny-playground .mh-save-state [data-action="review-backup"] { color: light-dark(#873c12, #ffd3a6); text-decoration: underline; font: inherit; font-weight: 700; background: transparent; border: 0; padding: 2px; min-height: 24px; }
  #sunny-playground .mh-save-state [hidden] { display: none; }
  #sunny-playground .mh-records-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-content: start; }
  #sunny-playground .mh-records-grid .mh-settings-section { display: grid; align-content: start; gap: 10px; }
  #sunny-playground .mh-records-grid .mh-settings-section p { font-size: 14px; }
  #sunny-playground .mh-records-grid .mh-settings-section label { display: grid; gap: 4px; font-size: 13px; font-weight: 700; }
  #sunny-playground .mh-records-grid .mh-sub { font-size: 12px; }
  #sunny-playground .mh-date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #sunny-playground .mh-date-fields > label { min-width: 0; }
  #sunny-playground input[type="date"] {
    display: block; width: 100%; max-width: 100%; min-width: 0; min-inline-size: 0;
    appearance: none; -webkit-appearance: none; overflow: hidden; text-align: start;
  }
  #sunny-playground input[type="date"]::-webkit-date-and-time-value { min-width: 0; text-align: start; }
  #sunny-playground input[type="date"]::-webkit-datetime-edit { min-width: 0; max-width: 100%; padding: 0; }
  #sunny-playground .mh-import-label { position: relative; display: inline-flex!important; align-items: center; justify-content: center; min-height: 44px; padding: 8px 12px; border: 1px solid var(--mh-line); border-radius: 12px; background: var(--mh-panel); font-size: 13px; }
  #sunny-playground .mh-import-label input { position: absolute; inset: 0; width: 100%; opacity: 0; }
  #sunny-playground .mh-import-label:focus-within { outline: 2px solid var(--mh-moss); outline-offset: 2px; }
  #sunny-playground .mh-action-dialog { width: min(620px, calc(100% - 28px)); overflow: auto; }
  #sunny-playground .mh-action-dialog > p { margin-top: 14px; font-size: 15px; line-height: 1.4; }
  #sunny-playground .mh-action-dialog .mh-form { margin-top: 14px; }
  #sunny-playground .mh-dialog-actions { display: grid; gap: 10px; margin-top: 16px; }
  #sunny-playground .mh-dialog-actions > button { width: 100%; }
  #sunny-playground [data-form="restart-class"] .mh-settings-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 8px;
  }
  #sunny-playground [data-form="restart-class"] .mh-settings-actions > button {
    min-width: 0;
    min-height: 44px;
    padding-inline: 8px;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-recovery-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
  #sunny-playground .mh-recovery-code { display: block; margin-top: 16px; padding: 10px; background: var(--mh-done); border-radius: var(--mh-control-radius); text-align: center; font: 700 clamp(18px, 5.7vw, 28px)/1.35 ui-monospace, monospace; user-select: all; }
  #sunny-playground .mh-pin .mh-recovery-row button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding-inline: 10px; color: var(--mh-moss); }
  #sunny-playground .mh-recovery-row button svg { width: 17px; height: 17px; flex: none; }
  #sunny-playground .mh-welcome-form { display: grid; gap: 20px; max-width: 720px; margin: 26px auto 0; padding: 24px; background: var(--mh-panel); border: 1px solid var(--mh-line); border-radius: 16px; }
  #sunny-playground .mh-welcome-form textarea { resize: none; }
  #sunny-playground .mh-loading { padding: 32px; text-align: center; }
  #sunny-playground .mh-export-tools { display: grid; gap: 10px; margin-top: 16px; }
  #sunny-playground .mh-export-tools textarea { width: 100%; font-family: ui-monospace, monospace; font-size: 12px; resize: none; }
  #sunny-playground .mh-custom-choice { grid-template-columns: minmax(0, 1.3fr) 48px repeat(3, minmax(0, 1fr)); }
  #sunny-playground .mh-custom-choice input[type="hidden"] { display: none; }
  #sunny-playground .mh-history-context { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; }
  #sunny-playground .mh-history-page-slot { display: flex; align-items: center; justify-content: center; min-width: calc(326px * var(--mh-staff-scale)); min-height: calc(44px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-footer { margin-top: auto; }
  #sunny-playground .mh-pupil-history-pages [aria-live] { min-width: 0; text-align: center; }
  #sunny-playground .mh-pupil-history-pages button { flex: none; }
  #sunny-playground .mh-history-table[data-long-period] { overflow-y: auto; }
  #sunny-playground .mh-history-table[data-long-period] thead { position: sticky; top: 0; z-index: 1; background: var(--mh-staff-bg, var(--mh-panel)); }
  #sunny-playground .mh-history-note { display: grid; align-content: center; min-height: 36px; }
  #sunny-playground .mh-history-note:empty { min-height: 36px; }
  #sunny-playground .mh-history-note .mh-history-insight { font-size: 13px; line-height: 1.25; }
  #sunny-playground .mh-history-legend li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
  #sunny-playground .mh-scheme-note { padding: 2px 0; border: 0; background: transparent; color: var(--mh-soft); text-decoration: underline; font-size: 12px; min-height: 24px; text-align: start; }
  #sunny-playground .mh-change-list { padding-inline-start: 22px; }
  #sunny-playground .mh-change-list li { padding-block: 6px; font-size: 14px; }
  #sunny-playground .mh-breakdown-list { display: grid; gap: 12px; list-style: none; padding: 0; margin: 18px 0 0; }
  #sunny-playground .mh-breakdown-list li { display: flex; align-items: flex-start; gap: 9px; font-size: 14px; }
  #sunny-playground .mh-breakdown-list li .mh-history-dot { margin-top: 5px; }
  #sunny-playground .mh-breakdown-list p { margin-top: 4px; overflow-wrap: anywhere; color: var(--mh-soft); }
  #sunny-playground .mh-welcome-page h1 { font-family: "Segoe UI", system-ui, sans-serif; font-size: 36px; }
  #sunny-playground .mh-welcome-page { display: flex; flex-direction: column; gap: 18px; height: 100%; min-height: 0; padding: 28px; font-family: "Segoe UI", system-ui, sans-serif; }
  #sunny-playground .mh-onboarding-header {
    --mh-setup-control-size: max(calc(50px * var(--mh-staff-scale)), clamp(44px, 5.4cqw, 68px));
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    min-height: var(--mh-setup-control-size);
  }
  #sunny-playground .mh-onboarding-title { grid-column: 2; min-width: 0; }
  #sunny-playground .mh-onboarding-actions { grid-column: 3; display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
  #sunny-playground .mh-onboarding-actions .mh-primary { min-width: min(calc(130px * var(--mh-staff-scale)), 100%); font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-onboarding-header h1 { line-height: 1.15; text-align: center; }
  #sunny-playground .mh-onboarding-header > button { font-size: 14px; }
  #sunny-playground .mh-onboarding-header > button:first-child { grid-column: 1; justify-self: start; }
  #sunny-playground .mh-onboarding-header > button:last-child { grid-column: 3; justify-self: end; }
  #sunny-playground .mh-onboarding-logo {
    grid-column: 1; justify-self: start; display: block;
    width: clamp(44px, 5.4cqw, 68px); aspect-ratio: 1;
    border: 2px solid #fff; border-radius: 26%;
    box-shadow: 0 0 0 1px #20584340, 0 3px 8px #20584329;
  }
  #sunny-playground .mh-onboarding-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
  #sunny-playground .mh-onboarding-steps li { display: flex; align-items: center; gap: 10px; padding-block: 10px; border-bottom: 2px solid var(--mh-line); color: var(--mh-soft); font-size: 14px; }
  #sunny-playground .mh-onboarding-steps li > span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; border-radius: 50%; background: var(--mh-done); font-weight: 700; }
  #sunny-playground .mh-onboarding-steps [aria-current] { color: var(--mh-ink); border-color: var(--mh-moss); }
  #sunny-playground .mh-onboarding-steps [aria-current] > span { background: var(--mh-moss); color: var(--mh-on-moss); }
  #sunny-playground .mh-onboarding-steps [data-reached] { border-color: color-mix(in srgb, var(--mh-moss) 40%, var(--mh-line)); }
  #sunny-playground .mh-teacher-setup { display: flex; flex: 1; flex-direction: column; gap: 16px; margin: 0; min-height: 0; }
  #sunny-playground .mh-onboarding-panel { min-width: 0; min-height: 0; padding: 20px; border: 1px solid var(--mh-line); border-radius: 14px; background: var(--mh-panel); }
  #sunny-playground .mh-onboarding-panel h2 { font-family: inherit; font-size: 17px; font-weight: 700; }
  #sunny-playground :is(.mh-class-setup-grid, .mh-teacher-options) {
    display: grid;
    flex: 1;
    min-height: 0;
    grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  #sunny-playground .mh-teacher-setup label { font-size: 14px; }
  #sunny-playground .mh-class-setup-grid .mh-setup-label { display: flex; flex-direction: column; height: 100%; min-height: 0; gap: 8px; }
  #sunny-playground .mh-setup-help { color: var(--mh-soft); font-size: 13px; font-weight: 400; }
  #sunny-playground .mh-setup-name-columns {
    display: grid;
    grid-template-columns: repeat(var(--mh-name-columns, 1), minmax(0, 1fr));
    grid-template-rows: minmax(0, 1fr);
    flex: 1;
    min-height: 0;
    column-gap: 2px;
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-control-radius);
    background: var(--mh-panel);
    container-type: size;
  }
  #sunny-playground .mh-setup-name-columns:focus-within { outline: 2px solid #1463c4; outline-offset: 1px; }
  #sunny-playground .mh-setup-name-columns textarea[readonly] { pointer-events: none; }
  #sunny-playground .mh-setup-name-columns textarea[hidden] { display: none; }
  #sunny-playground .mh-class-setup-grid .mh-setup-name-columns textarea {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 8px 7px;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    font-size: clamp(18px, calc((100cqh - 16px) / 12.6), 33px);
    line-height: max(1.2em, calc((100cqh - 16px) / 10));
    scrollbar-width: none;
    resize: none;
  }
  #sunny-playground .mh-class-details { display: flex; flex-direction: column; gap: 22px; }
  #sunny-playground .mh-class-setup-aside { display: grid; grid-template-rows: auto minmax(min-content, 1fr) auto; gap: clamp(6px, 1.4cqh, 12px); min-width: 0; }
  #sunny-playground .mh-setup-names-panel { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 12px; container-type: size; }
  #sunny-playground .mh-class-setup-aside > * { min-width: 0; min-height: 0; }
  #sunny-playground .mh-setup-restore { display: flex; flex-direction: row; justify-content: center; align-items: center; gap: 14px; }
  #sunny-playground .mh-setup-restore svg { width: calc(26px * var(--mh-staff-scale)); height: calc(26px * var(--mh-staff-scale)); color: var(--mh-moss); }
  #sunny-playground .mh-setup-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #sunny-playground .mh-welcome-page .mh-setup-links button { min-width: 0; min-height: 44px; font-size: calc(17px * var(--mh-staff-scale)); white-space: normal; }
  #sunny-playground .mh-setup-links .mh-setup-restore { gap: 8px; }
  #sunny-playground .mh-setup-links .mh-setup-restore svg { flex: none; }
  #sunny-playground .mh-privacy-policy { display: grid; gap: 8px; line-height: 1.5; }
  #sunny-playground .mh-privacy-policy h3 { margin: 8px 0 0; font-size: 1em; }
  #sunny-playground .mh-privacy-policy p { margin: 0; }
  #sunny-playground .mh-class-details p { color: var(--mh-soft); font-size: 14px; line-height: 1.45; }
  #sunny-playground .mh-setup-names-panel .mh-setup-count { padding-top: 10px; border-top: 1px solid var(--mh-line); color: var(--mh-soft); font-size: calc(17px * var(--mh-staff-scale)); font-weight: 600; }
  #sunny-playground .mh-setup-names-panel .mh-setup-error { margin-top: 4px; }
  #sunny-playground .mh-setup-name-columns:has(textarea[aria-invalid="true"]) { border-color: light-dark(#a32038, #ffb9c7); }
  #sunny-playground .mh-app:has(> .mh-welcome-page) { overflow: clip; }
  #sunny-playground .mh-setup-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: auto; }
  #sunny-playground .mh-setup-footer > button { min-width: 130px; font-size: 14px; }
  #sunny-playground .mh-setup-footer > .mh-primary { margin-left: auto; }
  #sunny-playground .mh-setup-error { color: light-dark(#a32038, #ffb9c7); font-size: 14px; }
  #sunny-playground .mh-setup-error:empty { display: none; }
  #sunny-playground .mh-feeling-choice-panel { margin: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px; }
  #sunny-playground .mh-format-options { display: grid; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; }
  #sunny-playground .mh-format-card { position: relative; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px; min-height: 0; padding: 14px 12px 12px; border: 2px solid var(--mh-line); border-radius: 11px; background: var(--mh-panel); }
  #sunny-playground .mh-format-card:has(input:checked) { border-color: var(--mh-moss); background: color-mix(in srgb, var(--mh-moss) 4%, var(--mh-panel)); }
  #sunny-playground .mh-custom-format-card { text-align: left; }
  #sunny-playground .mh-custom-format-card[aria-pressed="true"] { border-color: var(--mh-moss); background: color-mix(in srgb, var(--mh-moss) 7%, var(--mh-panel)); }
  #sunny-playground .mh-format-radio { position: absolute; inset: 16px 12px auto auto; width: 23px; height: 23px; border: 2px solid var(--mh-line); border-radius: 50%; background: var(--mh-panel); }
  #sunny-playground [aria-pressed="true"] > .mh-format-radio { border: 7px solid var(--mh-moss); }
  #sunny-playground .mh-format-card > strong { padding-right: 25px; font-size: 18px; font-weight: 700; line-height: 1.25; }
  #sunny-playground .mh-format-card > input[type="radio"] { position: absolute; inset: 16px 12px auto auto; width: 18px; min-height: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--mh-moss); }
  #sunny-playground .mh-format-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 7px; min-height: 0; }
  #sunny-playground .mh-format-chip { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; padding: 6px; border-radius: 9px; background: var(--mh-zone); color: var(--mh-zone-ink, var(--mh-ink)); font-size: 13px; font-weight: 600; line-height: 1.15; text-align: center; overflow-wrap: anywhere; }
  #sunny-playground .mh-format-mini-icon { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--mh-sticker-paper); font-family: "Segoe UI Emoji", "Apple Color Emoji", sans-serif; font-size: 24px; line-height: 1; }
  #sunny-playground .mh-format-mini-label { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
  #sunny-playground .mh-format-chips[data-format="traffic"] { grid-template-columns: minmax(0, 1fr); }
  #sunny-playground .mh-format-chips[data-format="traffic"] .mh-format-chip { flex-direction: row; gap: 10px; }
  #sunny-playground .mh-format-chips[data-dense] .mh-format-chip { flex-direction: row; gap: 5px; padding: 3px 5px; font-size: 11px; }
  #sunny-playground .mh-format-chips[data-dense] .mh-format-mini-icon { width: 22px; height: 22px; flex-basis: 22px; font-size: 18px; }
  #sunny-playground .mh-format-card:has(.mh-format-note) { grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px; }
  #sunny-playground .mh-format-note { color: var(--mh-soft); font-size: 12px; font-weight: 400; line-height: 1.25; }
  #sunny-playground .mh-custom-format-preview {
    display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px;
    min-height: 0; min-width: 0; padding: 10px; border: 1px dashed var(--mh-line); border-radius: 9px;
    background: color-mix(in srgb, var(--mh-done) 55%, var(--mh-panel)); color: var(--mh-moss); text-align: center;
  }
  #sunny-playground .mh-custom-format-preview svg { flex: 0 1 auto; width: clamp(40px, 28cqh, 72px); height: clamp(40px, 28cqh, 72px); min-height: 24px; }
  #sunny-playground .mh-custom-format-preview > span { max-width: 18ch; font-size: clamp(15px, min(6cqw, 10cqh), 22px); font-weight: 650; line-height: 1.2; }
  #sunny-playground .mh-setup-background { display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0; gap: 16px; overflow: clip; }
  #sunny-playground .mh-setup-background .mh-backdrop-preview { min-height: 0; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; }
  #sunny-playground .mh-setup-background .mh-meadow { height: 100%; min-height: 0; }
  #sunny-playground .mh-setup-background figcaption { font-size: 12px; }
  #sunny-playground .mh-setup-background > p { font-size: 13px; line-height: 1.45; color: var(--mh-soft); }
  #sunny-playground .mh-setup-ready { display: grid; flex: 1; gap: 22px; align-content: center; justify-items: center; text-align: center; }
  #sunny-playground .mh-setup-ready > h2 { font-size: 26px; }
  #sunny-playground .mh-setup-ready > p { max-width: 510px; font-size: 16px; line-height: 1.5; color: var(--mh-soft); }
  #sunny-playground .mh-ready-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 740px); gap: 18px; margin: 0; padding-block: 20px; border-block: 1px solid var(--mh-line); }
  #sunny-playground .mh-ready-details > div { display: grid; gap: 6px; min-width: 0; }
  #sunny-playground .mh-ready-details dt { color: var(--mh-soft); font-size: 12px; }
  #sunny-playground .mh-ready-details dd { margin: 0; font-size: 16px; font-weight: 600; overflow-wrap: anywhere; }
  #sunny-playground .mh-ready-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
  #sunny-playground .mh-ready-actions > .mh-primary { min-width: 240px; }
  #sunny-playground .mh-setup-teacher-grid { display: grid; flex: 1; min-height: 0; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
  #sunny-playground .mh-setup-access { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 20px; }
  #sunny-playground .mh-setup-access-copy { display: grid; gap: 6px; }
  #sunny-playground .mh-setup-access-copy p,
  #sunny-playground .mh-setup-lock-help { color: var(--mh-soft); font-size: calc(15px * var(--mh-staff-scale)); font-weight: 400; line-height: 1.35; }
  #sunny-playground .mh-setup-options-quadrant { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(min-content, 1fr); gap: 14px; }
  #sunny-playground .mh-setup-options-quadrant .mh-setup-option-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-content: center;
    align-items: start;
    gap: 14px;
    min-height: 0;
    padding: calc(16px * var(--mh-staff-scale));
    border: 1px solid var(--mh-line);
    border-radius: var(--mh-panel-radius);
    background: var(--mh-panel);
  }
  #sunny-playground .mh-setup-option-card > span { display: grid; min-width: 0; gap: 7px; }
  #sunny-playground .mh-setup-option-card strong { font-size: calc(20px * var(--mh-staff-scale)); line-height: 1.25; }
  #sunny-playground .mh-setup-option-description { color: var(--mh-soft); font-size: calc(15px * var(--mh-staff-scale)); font-weight: 400; line-height: 1.4; }
  #sunny-playground[data-device-app] {
    --mh-device-bottom-inset: env(safe-area-inset-bottom, 0px);
    padding: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) var(--mh-device-bottom-inset) env(safe-area-inset-left, 0px);
  }
  #sunny-playground[data-native-app]:not([data-phone]) { padding-bottom: 0; }
  #sunny-playground[data-native-app]:not([data-phone]) .mh-app {
    --mh-tablet-bottom-inset: calc(var(--mh-device-bottom-inset) / var(--mh-tablet-scale, 1));
  }
  #sunny-playground[data-native-app]:not([data-phone], [data-keyboard-open]) .mh-app > .mh-main:not(.mh-meadow-page) {
    padding-bottom: max(var(--mh-screen-bottom-padding, clamp(8px, 2cqw, 18px)), calc(var(--mh-tablet-bottom-inset) + 8px));
  }
  #sunny-playground[data-native-app]:not([data-phone]) .mh-welcome-page { --mh-screen-bottom-padding: 20px; }
  #sunny-playground[data-native-app]:not([data-phone]) .mh-personal-page { --mh-screen-bottom-padding: var(--mh-personal-padding); }
  #sunny-playground[data-native-app]:not([data-phone]) .mh-meadow-page > .mh-meadow {
    padding-bottom: max(clamp(10px, 5.5cqh, 42px), calc(var(--mh-tablet-bottom-inset) + 8px));
  }
  #sunny-playground[data-device-app] .mh-tablet {
    width: min(100%, var(--mh-frame-width, 1024px));
    height: var(--mh-frame-height, 768px);
    aspect-ratio: auto;
    border-radius: 0;
    box-shadow: none;
  }
  #sunny-playground[data-keyboard-open] .mh-class-setup-grid .mh-setup-name-columns textarea {
    padding-bottom: min(calc(10px + var(--mh-keyboard-overlap, 0px)), max(10px, calc(100cqh - 200px)));
    scroll-padding-bottom: var(--mh-keyboard-overlap, 0px);
  }
  #sunny-playground[data-keyboard-open] .mh-overview-page { padding-bottom: calc(18px + var(--mh-keyboard-overlap, 0px)); }
  #sunny-playground[data-keyboard-open] .mh-settings-group:not([hidden]) { display: block; overflow: auto; overscroll-behavior: contain; }
  #sunny-playground[data-keyboard-open] .mh-settings-group > :is(.mh-settings-columns, .mh-records-grid) { height: auto; grid-template-rows: auto; }
  @container mh-tablet-app (max-width: 820px) {
    #sunny-playground .mh-welcome-page { padding: 20px; }
    #sunny-playground .mh-onboarding-header h1 { font-size: 30px; }
    #sunny-playground .mh-format-card > strong { font-size: 16px; }
    #sunny-playground .mh-format-mini-icon { flex-basis: 26px; width: 26px; height: 26px; font-size: 21px; }
    #sunny-playground .mh-settings-nav { flex-wrap: wrap; }
  }
  @container mh-tablet-app (max-width: 700px) {
    #sunny-playground .mh-onboarding-header { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
    #sunny-playground .mh-onboarding-header h1 { font-size: 26px; }
    #sunny-playground .mh-onboarding-steps { gap: 8px; }
    #sunny-playground .mh-onboarding-steps li { gap: 6px; font-size: 12px; }
    #sunny-playground .mh-class-details { gap: 12px; }
    #sunny-playground .mh-class-details .mh-setup-count { margin: 0; padding-top: 10px; }
    #sunny-playground .mh-setup-teacher-grid { grid-template-columns: minmax(0, 1fr); }
    #sunny-playground .mh-setup-footer { margin-top: 10px; }
  }
  /* Staff typography grows with the available canvas; dense editors retain enough room for every control. */
  #sunny-playground :is(.mh-welcome-page, .mh-overview-page) { font-size: calc(17px * var(--mh-staff-scale)); }
  #sunny-playground :is(.mh-welcome-page, .mh-overview-page) :is(input, select, textarea, .mh-quiet) { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-welcome-page { --mh-staff-scale: var(--mh-dense-scale); gap: 14px; padding: 20px; }
  #sunny-playground:not([data-phone]) .mh-welcome-page:has(.mh-teacher-setup) { padding-block-start: clamp(12px, 2cqh, 20px); }
  #sunny-playground:not([data-phone]) .mh-class-setup-aside .mh-onboarding-panel { padding: clamp(9px, 1.6cqh, 16px); }
  #sunny-playground:not([data-phone]) .mh-class-setup-aside .mh-setup-option-card { padding: clamp(7px, 1.2cqh, 12px); gap: 8px; }
  #sunny-playground .mh-welcome-page h1 { font-size: calc(42px * var(--mh-staff-scale)); }
  #sunny-playground .mh-onboarding-header > button { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-onboarding-steps li { font-size: calc(17px * var(--mh-staff-scale)); }
  #sunny-playground .mh-onboarding-steps li > span { flex-basis: calc(34px * var(--mh-staff-scale)); height: calc(34px * var(--mh-staff-scale)); }
  #sunny-playground .mh-onboarding-panel h2 { font-size: calc(22px * var(--mh-staff-scale)); }
  #sunny-playground .mh-teacher-setup label { font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-help { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-class-details p { font-size: calc(17px * var(--mh-staff-scale)); }
  #sunny-playground .mh-welcome-page :is(input, select, textarea) { font-size: calc(19px * var(--mh-staff-scale)); }
  #sunny-playground .mh-welcome-page :is(button, input, select) { min-height: calc(50px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-footer > button { min-width: calc(158px * var(--mh-staff-scale)); font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-format-card { container-type: size; }
  #sunny-playground .mh-format-card > strong { font-size: clamp(20px, min(8cqw, 13cqh), 32px); }
  #sunny-playground .mh-format-card > input[type="radio"] { width: 23px; height: 23px; min-height: 23px; }
  #sunny-playground .mh-format-chip { flex-direction: row; justify-content: flex-start; gap: 8px; padding: 7px; font-size: clamp(15px, 5.5cqw, 22px); }
  #sunny-playground .mh-format-mini-label { min-width: 0; }
  #sunny-playground .mh-format-chips .mh-format-chip { overflow-wrap: normal; }
  @container (max-width: 290px) {
    #sunny-playground .mh-format-chips:not([data-format="traffic"]) .mh-format-chip {
      flex-direction: column;
      justify-content: center;
      gap: 4px;
      padding: 4px;
    }
    #sunny-playground .mh-format-chip .mh-format-mini-icon {
      --mh-format-icon: clamp(22px, min(15cqw, 18cqh), 38px);
    }
  }
  #sunny-playground .mh-format-mini-icon {
    --mh-format-icon: clamp(32px, min(18cqw, 24cqh), 60px);
    flex-basis: var(--mh-format-icon); width: var(--mh-format-icon); height: var(--mh-format-icon); font-size: calc(var(--mh-format-icon) * .75);
  }
  #sunny-playground .mh-format-chips[data-format="traffic"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sunny-playground .mh-format-chips[data-format="traffic"] .mh-format-chip { flex-direction: column; justify-content: center; gap: 6px; }
  #sunny-playground .mh-format-chips[data-dense] .mh-format-chip { font-size: clamp(12px, 4cqw, 17px); }
  #sunny-playground .mh-format-note { font-size: clamp(13px, 4cqw, 17px); }
  #sunny-playground .mh-setup-background figcaption { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-class-setup-grid .mh-option-check input { flex: none; width: calc(24px * var(--mh-staff-scale)); height: calc(24px * var(--mh-staff-scale)); min-height: 0; margin: 2px 0 0; }
  #sunny-playground .mh-setup-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 16px; }
  #sunny-playground .mh-setup-details label { font-size: calc(18px * var(--mh-staff-scale)); line-height: 1.3; }
  #sunny-playground .mh-setup-details :is(input, select) { height: calc(50px * var(--mh-staff-scale)); font-size: calc(19px * var(--mh-staff-scale)); }
  #sunny-playground .mh-class-setup-aside .mh-setup-option-card { gap: 10px; padding: calc(14px * var(--mh-staff-scale)); }
  #sunny-playground .mh-class-setup-aside .mh-setup-option-card strong { font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-class-setup-aside .mh-setup-option-description { font-size: calc(15px * var(--mh-staff-scale)); line-height: 1.35; }
  #sunny-playground .mh-setup-custom-editor { display: flex; flex: 1; flex-direction: column; min-height: 0; gap: 12px; }
  #sunny-playground .mh-setup-custom-editor [hidden] { display: none !important; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-settings { flex: 1; min-height: 0; grid-template-rows: auto minmax(0, 1fr); gap: 20px; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-toolbar { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-picker { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); align-self: end; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-edit { justify-content: center; font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-custom-editor .mh-custom-choice { min-height: 0; padding: 0; align-content: center; align-items: start; border: 0; grid-template: repeat(3, auto) / minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 20px; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-words { grid-area: 1 / 1 / 2 / 3; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-colour { grid-area: 2 / 1; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-shape { grid-area: 2 / 2; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-picture { grid-area: 3 / 1 / 4 / 3; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview { grid-area: 1 / 3 / 4 / 4; height: 100%; min-height: 0; padding: 16px; border: 1px solid var(--mh-line); border-radius: 14px; background: var(--mh-done); grid-template-rows: auto minmax(0, 1fr); gap: 12px; font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview > div { display: grid; place-items: center; min-height: 0; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview-sample { width: min(100%, 290px); min-height: 0; height: min(100%, 210px); font-size: clamp(20px, 3cqw, 34px); }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview-sample:is(.mh-circle, .mh-soft-square) { width: auto; aspect-ratio: 1; max-width: 100%; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview-sample .mh-symbol { flex-basis: 56px; width: 56px; height: 56px; font-size: 40px; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-choice input[type="color"] { width: 100%; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-choice label { font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor { margin-bottom: var(--mh-keyboard-overlap, 0px); padding: 12px 16px; overflow: hidden; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-toolbar { display: none; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-settings { grid-template-rows: minmax(0, 1fr); gap: 0; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-choice { grid-template-rows: minmax(0, 1fr); align-items: center; align-content: stretch; gap: 16px; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor :is(.mh-custom-colour, .mh-custom-shape, .mh-custom-picture) { display: none; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-preview { grid-area: 1 / 3; padding: 6px 10px; gap: 4px; font-size: 14px; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-preview-sample { height: 100%; font-size: 18px; }
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-preview-sample .mh-symbol { flex-basis: 28px; width: 28px; height: 28px; font-size: 22px; }
  #sunny-playground .mh-font-options > .mh-choice { display: flex; justify-content: center; align-items: center; padding: clamp(6px, 1.5cqh, 16px); overflow: hidden; }
  #sunny-playground .mh-font-options .mh-letter-sample { display: block; width: 100%; min-width: 0; max-height: 100%; overflow-wrap: anywhere; text-align: center; line-height: 1.2; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview-sample .mh-shape-content > span:last-child { display: block; -webkit-line-clamp: unset; overflow: visible; }
  #sunny-playground .mh-staff-date { font-size: calc(22px * var(--mh-staff-scale)); }
  #sunny-playground .mh-save-state { font-size: calc(12px * var(--mh-staff-scale)); }
  #sunny-playground .mh-staff-tally { font-size: calc(16px * var(--mh-staff-scale)); padding: 6px 12px 6px 6px; }
  #sunny-playground .mh-staff-ring { flex-basis: calc(28px * var(--mh-staff-scale)); width: calc(28px * var(--mh-staff-scale)); }
  #sunny-playground .mh-staff-tools button { min-height: calc(46px * var(--mh-staff-scale)); font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-staff-nav .mh-staff-tab { min-height: calc(60px * var(--mh-staff-scale)); font-size: calc(24px * var(--mh-staff-scale)); }
  #sunny-playground .mh-priority h2 { min-height: calc(66px * var(--mh-staff-scale)); font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-priority .mh-sub { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-count { min-width: calc(32px * var(--mh-staff-scale)); font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-today .mh-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(112px * var(--mh-staff-scale))), 1fr)); }
  #sunny-playground .mh-today .mh-row { font-size: calc(17px * var(--mh-staff-scale)); }
  #sunny-playground .mh-today .mh-row button { min-height: calc(44px * var(--mh-staff-scale)); }
  #sunny-playground .mh-overview-page details summary { min-height: calc(50px * var(--mh-staff-scale)); font-size: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-today[data-compact] .mh-priority h2 { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-today[data-compact] .mh-priority section:not(.mh-is-empty) { grid-template-columns: calc(180px * var(--mh-staff-scale)) minmax(0, 1fr); }
  #sunny-playground .mh-today[data-compact] .mh-priority h2 > span:first-child { display: block; -webkit-line-clamp: unset; }
  #sunny-playground .mh-today[data-compact] > .mh-group[data-wide] { grid-column: 1 / -1; }
  #sunny-playground .mh-today[data-compact]:not([data-layout="cards"]):has(.mh-priority > section:nth-child(5)) { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  #sunny-playground :is(.mh-history-controls > label, .mh-history-view-field) { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-controls :is(select, .mh-history-switch) { min-height: calc(48px * var(--mh-staff-scale)); height: calc(48px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-grid { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-grid th { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-grid th:first-child { width: calc(78px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-cell { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-mark { font-size: calc(20px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-mix { height: calc(10px * var(--mh-staff-scale)); }
  #sunny-playground :is(.mh-history-compare, .mh-history-legend, .mh-history-footer .mh-history-insight, .mh-pupil-history-pages) { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-dot { flex-basis: calc(13px * var(--mh-staff-scale)); width: calc(13px * var(--mh-staff-scale)); height: calc(13px * var(--mh-staff-scale)); }
  #sunny-playground .mh-history-compare-bar { height: calc(24px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings { --mh-staff-scale: var(--mh-dense-scale); }
  #sunny-playground .mh-settings h2 { font-size: calc(20px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings :is(label, legend, .mh-sub, .mh-option-check, .mh-records-grid p, .mh-import-label) { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings .mh-settings-nav .mh-quiet { font-size: calc(18px * var(--mh-staff-scale)); min-height: calc(48px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings .mh-option-check input { width: calc(21px * var(--mh-staff-scale)); height: calc(21px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings .mh-custom-picker .mh-custom-edit { font-size: calc(15px * var(--mh-staff-scale)); }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] > .mh-priority { display: contents; }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] .mh-priority section {
    display: grid;
    grid-column: auto;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] > .mh-group {
    grid-column: auto;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--mh-line);
    border-radius: 9px;
    background: var(--mh-panel);
  }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] :is(.mh-priority h2, .mh-group summary) {
    min-height: calc(56px * var(--mh-staff-scale));
    font-size: calc(16px * var(--mh-staff-scale));
  }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] .mh-priority h2 > span:first-child { display: block; -webkit-line-clamp: unset; }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] .mh-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(96px * var(--mh-staff-scale))), 1fr));
    margin: 6px;
    padding: 0;
  }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] .mh-row { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-main .mh-today[data-compact][data-layout="cards"] .mh-row button { min-height: calc(34px * var(--mh-staff-scale)); }
  #sunny-playground .mh-action-dialog[data-pupil-dialog] {
    width: min(calc(560px * var(--mh-staff-scale)), calc((100vw - 32px) / var(--mh-tablet-scale, 1)));
  }
  #sunny-playground [data-pupil-dialog] .mh-pin-top { align-items: flex-start; gap: 16px; margin-bottom: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground [data-pupil-dialog] .mh-pin-top h2 { min-width: 0; align-self: center; font-size: calc(28px * var(--mh-staff-scale)); line-height: 1.3; overflow-wrap: anywhere; }
  #sunny-playground [data-pupil-dialog] svg { width: calc(21px * var(--mh-staff-scale)); height: calc(21px * var(--mh-staff-scale)); flex: 0 0 auto; }
  #sunny-playground .mh-pupil-status { display: flex; align-items: center; gap: calc(18px * var(--mh-staff-scale)); min-height: calc(104px * var(--mh-staff-scale)); padding: calc(18px * var(--mh-staff-scale)); border-radius: calc(14px * var(--mh-staff-scale)); background: var(--mh-zone, var(--mh-done)); color: var(--mh-zone-ink, var(--mh-ink)); }
  #sunny-playground .mh-pupil-status > strong { min-width: 0; font-size: calc(25px * var(--mh-staff-scale)); font-weight: 650; line-height: 1.2; overflow-wrap: anywhere; }
  #sunny-playground .mh-pupil-status-icon { display: grid; place-items: center; flex: 0 0 auto; width: calc(68px * var(--mh-staff-scale)); height: calc(68px * var(--mh-staff-scale)); border-radius: 50%; background: var(--mh-panel); color: var(--mh-soft); }
  #sunny-playground .mh-pupil-status-icon .mh-history-mark { display: block; font-family: "Apple Color Emoji", "Segoe UI Emoji", sans-serif; font-size: calc(46px * var(--mh-staff-scale)); line-height: 1; }
  #sunny-playground .mh-pupil-status-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--mh-zone, var(--mh-soft)); }
  #sunny-playground .mh-pupil-panel-actions { display: grid; gap: calc(12px * var(--mh-staff-scale)); margin-top: calc(20px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pupil-panel-actions button { font-size: calc(16px * var(--mh-staff-scale)); border-radius: calc(11px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pupil-panel-actions [data-open-history] { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: calc(54px * var(--mh-staff-scale)); padding: calc(12px * var(--mh-staff-scale)) calc(16px * var(--mh-staff-scale)); text-align: start; }
  #sunny-playground .mh-pupil-panel-actions [data-open-history] > span { display: flex; align-items: center; gap: 10px; }
  #sunny-playground .mh-pupil-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(12px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pupil-tools button { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-width: 0; min-height: calc(76px * var(--mh-staff-scale)); padding: calc(12px * var(--mh-staff-scale)); background: var(--mh-panel); text-align: start; line-height: 1.3; }
  #sunny-playground .mh-pupil-tools button > span { min-width: 0; overflow-wrap: anywhere; }
  #sunny-playground .mh-pupil-tools button:disabled { opacity: .45; }
  #sunny-playground :is(.mh-settings-section, .mh-onboarding-panel) { border-radius: var(--mh-panel-radius); }
  #sunny-playground :is(.mh-settings, .mh-welcome-page) :is(button, input, select, textarea) { border-radius: var(--mh-control-radius); }
  #sunny-playground .mh-settings .mh-settings-nav .mh-quiet { border: 1px solid var(--mh-line); background: var(--mh-panel); }
  #sunny-playground :is(.mh-settings-nav .mh-quiet, .mh-custom-edit, .mh-class-roster-list button, .mh-backdrop-days button)[aria-pressed="true"] { border-color: var(--mh-moss); background: color-mix(in srgb, var(--mh-moss) 7%, var(--mh-panel)); color: var(--mh-ink); }
  #sunny-playground .mh-settings .mh-settings-nav .mh-quiet[aria-pressed="true"] { border-color: var(--mh-moss); background: color-mix(in srgb, var(--mh-moss) 7%, var(--mh-panel)); }
  #sunny-playground .mh-format-card:has(input:checked) { background: color-mix(in srgb, var(--mh-moss) 7%, var(--mh-panel)); }
  #sunny-playground .mh-pin {
    --mh-staff-scale: var(--mh-dialog-scale);
    width: min(calc(352px * var(--mh-staff-scale)), calc((100vw - 32px) / var(--mh-tablet-scale, 1)));
    max-width: calc((100vw - 32px) / var(--mh-tablet-scale, 1));
    max-height: calc((var(--mh-frame-height, 768px) - 24px) / var(--mh-tablet-scale, 1));
    padding: calc(22px * var(--mh-staff-scale));
    border: 1px solid var(--mh-line);
    border-radius: calc(18px * var(--mh-staff-scale));
    background: var(--mh-panel);
    font: calc(16px * var(--mh-staff-scale))/1.3 var(--mh-staff-font);
  }
  #sunny-playground .mh-action-dialog { width: min(calc(600px * var(--mh-staff-scale)), calc((100vw - 32px) / var(--mh-tablet-scale, 1))); }
  /* The keypad fits intrinsically; clip the one-pixel overflow caused by fractional zoom rounding. */
  #sunny-playground .mh-pin[data-pin-dialog] { overflow: clip; }
  #sunny-playground .mh-pin .mh-pin-top { align-items: flex-start; gap: 16px; }
  #sunny-playground .mh-pin h2 { min-width: 0; align-self: center; font: 650 calc(24px * var(--mh-staff-scale))/1.3 var(--mh-staff-font); overflow-wrap: anywhere; }
  #sunny-playground .mh-pin :is(p, label, .mh-quiet, input, select, textarea, button) { font-family: var(--mh-staff-font); font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pin :is(input, select, textarea, button) { border-radius: var(--mh-control-radius); }
  #sunny-playground .mh-pin :is(button, input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select) { min-height: calc(44px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pin .mh-form { gap: calc(12px * var(--mh-staff-scale)); margin-top: calc(18px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pin .mh-form > button[type="submit"] { width: 100%; }
  #sunny-playground .mh-pin input[name="pin"] { font-size: calc(24px * var(--mh-staff-scale)); background: var(--mh-done); }
  #sunny-playground .mh-pin .mh-option-check input { width: 21px; height: 21px; min-height: 0; accent-color: var(--mh-moss); }
  #sunny-playground .mh-pin .mh-keypad [data-digit] { font-size: calc(23px * var(--mh-staff-scale)); background: var(--mh-panel); border-color: var(--mh-line); box-shadow: 0 1px 2px color-mix(in srgb, var(--mh-ink) 8%, transparent); }
  @media (hover: hover) {
    #sunny-playground .mh-pin .mh-keypad button:not(:disabled):hover {
      background: color-mix(in srgb, var(--mh-moss) 10%, var(--mh-panel));
      border-color: var(--mh-moss);
    }
  }
  #sunny-playground .mh-pin .mh-keypad button:not(:disabled):active {
    background: color-mix(in srgb, var(--mh-moss) 22%, var(--mh-panel));
    border-color: var(--mh-moss);
  }
  #sunny-playground .mh-pin .mh-keypad { gap: calc(8px * var(--mh-staff-scale)); }
  #sunny-playground .mh-pin .mh-keypad [data-action="recover-pin"] { min-width: 0; font-size: calc(13px * var(--mh-staff-scale)); line-height: 1.2; padding: 4px; white-space: normal; }
  #sunny-playground .mh-pin .mh-dialog-close { display: grid; place-items: center; flex: 0 0 auto; width: calc(40px * var(--mh-staff-scale)); height: calc(40px * var(--mh-staff-scale)); min-height: 0; padding: 0; border: 0; border-radius: 50%; background: var(--mh-done); color: var(--mh-soft); }
  #sunny-playground .mh-pin .mh-dialog-close svg { width: calc(21px * var(--mh-staff-scale)); height: calc(21px * var(--mh-staff-scale)); }
  #sunny-playground :is(.mh-settings, .mh-pin) button:disabled { opacity: .45; }
  #sunny-playground .mh-overview-page:has(> .mh-settings) { height: 100%; min-height: 0; }
  #sunny-playground .mh-settings { display: grid; grid-template-rows: auto minmax(0, 1fr); min-height: 0; }
  #sunny-playground .mh-settings .mh-settings-nav .mh-quiet {
    min-height: calc(40px * var(--mh-staff-scale));
    white-space: normal;
    overflow-wrap: anywhere;
  }
  #sunny-playground .mh-settings-group { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; }
  #sunny-playground .mh-settings-group > * { flex: none; }
  #sunny-playground .mh-settings-group > :is(.mh-settings-columns, .mh-records-grid) { flex: 1 0 auto; align-items: stretch; }
  #sunny-playground .mh-settings-group .mh-records-grid { align-content: stretch; }
  #sunny-playground:not([data-phone]) .mh-manage-layout .mh-settings-stack {
    align-content: stretch;
    grid-template-rows: minmax(max-content, 1fr) auto;
  }
  #sunny-playground .mh-settings-section > .mh-class-roster { flex: 1; grid-template-rows: auto minmax(min-content, 1fr); }
  #sunny-playground .mh-settings .mh-settings-section { display: flex; flex-direction: column; min-height: 0; gap: 8px; padding: 10px 16px; }
  #sunny-playground .mh-settings .mh-settings-section > :is(.mh-form, .mh-profile-settings) { margin-top: 0; }
  #sunny-playground .mh-feeling-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  #sunny-playground .mh-settings .mh-feeling-toolbar > label { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; }
  #sunny-playground .mh-feeling-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; min-height: 0; }
  #sunny-playground .mh-feeling-preview { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; min-width: 0; padding: 10px; border-radius: 10px; background: var(--mh-zone); color: var(--mh-zone-ink, var(--mh-ink)); font-size: calc(19px * var(--mh-staff-scale)); text-align: center; overflow-wrap: anywhere; }
  #sunny-playground .mh-feeling-preview-icon { font: calc(48px * var(--mh-staff-scale))/1 "Apple Color Emoji", "Segoe UI Emoji", sans-serif; }
  #sunny-playground .mh-feeling-preview-icon { display: grid; place-items: center; }
  #sunny-playground .mh-feeling-summary:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sunny-playground .mh-settings .mh-custom-toolbar { grid-template-columns: 200px minmax(0, 1fr); align-items: center; }
  #sunny-playground .mh-settings .mh-custom-toolbar > label { grid-template-columns: minmax(0, 1fr) 76px; align-items: center; }
  #sunny-playground .mh-settings .mh-custom-picker { grid-template-columns: repeat(auto-fit, minmax(64px, 1fr)); }
  #sunny-playground .mh-settings .mh-custom-picker .mh-custom-edit { justify-content: center; }
  #sunny-playground:not([data-phone]) .mh-settings-group[data-settings-panel="pupil"] > .mh-settings-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] .mh-profile-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); justify-items: stretch; }
  #sunny-playground .mh-settings-group[data-settings-panel="pupil"] .mh-option-check { min-height: 0; padding: 6px; border: 1px solid var(--mh-line); border-radius: 8px; font-size: calc(14px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings .mh-backdrop-editor { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
  #sunny-playground .mh-settings .mh-backdrop-fields { align-content: start; }
  #sunny-playground:not([data-phone]) .mh-settings .mh-backdrop-fields:has(> [data-backdrop-fixed]:not([hidden])) {
    align-self: stretch;
    grid-template-rows: repeat(2, 1fr);
  }
  #sunny-playground .mh-settings .mh-backdrop-preview .mh-meadow { height: clamp(118px, 22cqh, 200px); }
  #sunny-playground .mh-backdrop-settings > .mh-settings-actions:has([data-backdrop-draft][hidden]):has([data-backdrop-status]:empty) { display: none; }
  #sunny-playground .mh-settings .mh-pupil-editor .mh-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground .mh-settings .mh-pupil-editor .mh-settings-actions { grid-column: 1 / -1; }
  #sunny-playground .mh-settings .mh-records-grid .mh-settings-section { gap: 8px; }
  #sunny-playground .mh-records-grid .mh-settings-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #sunny-playground .mh-records-grid .mh-settings-actions > button { width: 100%; min-width: 0; padding-inline: 8px; white-space: normal; }
  #sunny-playground .mh-records-grid [data-action="app-storage"] { grid-column: 1 / -1; }
  #sunny-playground .mh-records-grid [data-record-status]:empty { display: none; }
  #sunny-playground .mh-settings :is(button, .mh-quiet) { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground .mh-settings .mh-pupil-editor .mh-settings-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #sunny-playground .mh-settings .mh-pupil-editor .mh-settings-actions > button { width: 100%; min-width: 0; justify-self: stretch; }
  #sunny-playground .mh-settings .mh-pupil-editor [data-pupil-edit-status] { grid-column: 1 / -1; }
  #sunny-playground .mh-settings-section:has(> .mh-class-roster) { position: relative; }
  #sunny-playground .mh-class-roster [data-class-count] { position: absolute; top: 13px; right: 16px; font-size: calc(13px * var(--mh-staff-scale)); }
  #sunny-playground .mh-whole-class-actions { display: grid; gap: 12px; }
  #sunny-playground .mh-whole-class-actions > button { width: 100%; min-height: 48px; }
  #sunny-playground .mh-whole-class-actions [role="status"] { margin: 0; }

  /* Phones use their actual CSS width. Keep one vertical scroll area per page. */
  #sunny-playground[data-phone] {
    --mh-phone-top: env(safe-area-inset-top, 0px);
    --mh-phone-right: env(safe-area-inset-right, 0px);
    --mh-phone-bottom: env(safe-area-inset-bottom, 0px);
    --mh-phone-left: env(safe-area-inset-left, 0px);
    --mh-phone-gutter: 12px;
    padding: 0;
  }
  #sunny-playground[data-phone] .mh-app {
    overflow: hidden auto;
    scroll-padding-block: calc(var(--mh-phone-top) + 8px) calc(var(--mh-phone-bottom) + 8px);
  }
  #sunny-playground[data-phone] .mh-app > .mh-main:not(.mh-meadow-page),
  #sunny-playground[data-phone] .mh-meadow-page > .mh-meadow {
    height: auto;
    min-height: 100%;
    padding: calc(var(--mh-phone-top) + var(--mh-phone-gutter)) calc(var(--mh-phone-right) + var(--mh-phone-gutter))
      calc(var(--mh-phone-bottom) + var(--mh-phone-gutter)) calc(var(--mh-phone-left) + var(--mh-phone-gutter));
  }
  #sunny-playground[data-phone] .mh-pin {
    width: min(420px, calc(100vw - var(--mh-phone-left) - var(--mh-phone-right) - 24px));
    max-height: calc(var(--mh-frame-height) - var(--mh-phone-top) - var(--mh-phone-bottom) - 24px);
    padding: 16px;
    overflow: auto;
    overscroll-behavior: contain;
  }
  #sunny-playground[data-phone] .mh-pin .mh-keypad button { min-height: 48px; min-width: 0; }
  #sunny-playground[data-phone] .mh-pin .mh-dialog-close { width: 44px; height: 44px; }
  #sunny-playground[data-phone] .mh-pupil-tools { grid-template-columns: minmax(0, 1fr); }
  @media (max-height: 450px) {
    #sunny-playground[data-phone] [data-pin-dialog] { padding: 8px 14px; }
    #sunny-playground[data-phone] [data-pin-dialog] .mh-form { margin-top: 8px; gap: 6px; }
    #sunny-playground[data-phone] .mh-pin .mh-keypad { gap: 6px; }
    #sunny-playground[data-phone] .mh-pin :is(.mh-keypad button, input[name="pin"]) {
      min-height: 44px;
      padding-block: 4px;
    }
  }

  #sunny-playground[data-phone] .mh-meadow-page > .mh-meadow { grid-template-rows: auto 1fr; gap: 14px; }
  #sunny-playground[data-phone] .mh-meadow-header { padding-inline-end: 44px; }
  #sunny-playground[data-phone] .mh-staff-icon {
    inset: calc(var(--mh-phone-top) + 8px) calc(var(--mh-phone-right) + 8px) auto auto;
    height: 44px;
  }
  #sunny-playground[data-phone] .mh-stepping-stones {
    display: grid;
    grid-auto-rows: 106px;
    align-content: start;
    gap: 8px;
    padding: 4px 2px;
  }
  #sunny-playground[data-phone] .mh-roster-slot { height: 100%; }
  #sunny-playground[data-phone] .mh-stepping-stones button.mh-name { --mh-badge-max-width: 220px; max-width: var(--mh-badge-max-width); }

  #sunny-playground[data-phone] .mh-app > .mh-main.mh-setup-page { height: 100%; min-height: 0; gap: 6px; background: var(--mh-panel); }
  #sunny-playground[data-phone] .mh-setup-header {
    --mh-portrait-slot: 68px;
    height: auto;
    grid-template: auto auto / minmax(0, 1fr) auto;
    gap: 6px 8px;
    padding: 6px;
  }
  #sunny-playground[data-phone] .mh-setup-header > .mh-setup-nav { grid-area: 1 / 2; width: 82px; gap: 4px; }
  #sunny-playground[data-phone] .mh-setup-header .mh-setup-nav button { font-size: 12px; }
  #sunny-playground[data-phone] .mh-setup-header .mh-setup-nav > [data-action="badge-back"] { font-size: 14px; }
  #sunny-playground[data-phone] .mh-setup-heading h1 { font-size: clamp(20px, 6.2vw, 26px); }
  #sunny-playground[data-phone] .mh-setup-visuals { grid-area: 2 / 1 / 3 / -1; width: min(100%, 430px); height: 86px; justify-self: center; }
  #sunny-playground[data-phone] .mh-preview-name-shape { width: 100%; }
  #sunny-playground[data-phone] .mh-setup-header > .mh-setup-nav { min-height: 92px; align-content: center; }
  #sunny-playground[data-phone] .mh-setup-page > .mh-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: minmax(44px, 1fr);
    gap: 5px;
  }
  #sunny-playground[data-phone] .mh-setup-page > .mh-grid > .mh-choice { min-height: 44px; }
  #sunny-playground[data-phone] .mh-setup-page > .mh-background-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-setup-page > .mh-animal-options { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-setup-page .mh-choice { font-size: 12px; }
  #sunny-playground[data-phone] .mh-setup-page .mh-choice:not(.mh-background-options .mh-choice) { padding: 4px 2px; gap: 3px; }
  #sunny-playground[data-phone] .mh-animal-options .mh-choice { --mh-animal-circle: clamp(28px, min(12cqw, 8cqh), 48px); }
  #sunny-playground[data-phone] .mh-motion-options .mh-animation-sample { --mh-animation-circle: clamp(28px, 8cqh, 48px); font-size: calc(var(--mh-animation-circle) * .7); }
  #sunny-playground[data-phone] .mh-colour-swatch { width: clamp(32px, min(17cqw, 9cqh), 68px); }
  #sunny-playground[data-phone] .mh-personal-top { min-height: 0; }
  #sunny-playground[data-phone] .mh-personal {
    grid-template-columns: 74px minmax(0, 1fr);
    grid-template-areas: "animal back" "animal greeting";
    gap: 6px 12px;
  }
  #sunny-playground[data-phone] .mh-personal .mh-personal-art { width: 74px; }
  #sunny-playground[data-phone] .mh-personal-name { font-size: clamp(28px, 9cqw, 40px); }
  #sunny-playground[data-phone] .mh-personal h2 { padding: 8px 10px; font-size: 20px; border-radius: 13px; }
  #sunny-playground[data-phone] .mh-zones {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: minmax(120px, 1fr);
    gap: 10px;
  }
  #sunny-playground[data-phone] .mh-zone-slot { grid-column: auto; }
  #sunny-playground[data-phone] .mh-zone-slot:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #sunny-playground[data-phone] .mh-personal-page .mh-actions { gap: 8px; }
  #sunny-playground[data-phone] .mh-personal-page .mh-talk { min-height: 44px; white-space: normal; }

  #sunny-playground[data-phone] .mh-welcome-page h1 { font-size: 24px; }
  #sunny-playground[data-phone] .mh-onboarding-header {
    --mh-setup-control-size: 50px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: var(--mh-setup-control-size) auto;
    gap: 8px;
  }
  #sunny-playground[data-phone] .mh-onboarding-header > :first-child { grid-area: 1 / 1; }
  #sunny-playground[data-phone] .mh-onboarding-actions { grid-area: 1 / 2; }
  #sunny-playground[data-phone] .mh-onboarding-title { grid-area: 2 / 1 / 3 / -1; }
  #sunny-playground[data-phone] .mh-onboarding-steps li { font-size: 14px; }
  #sunny-playground[data-phone] .mh-onboarding-panel { padding: 12px; }
  #sunny-playground[data-phone] :is(.mh-class-setup-grid, .mh-class-setup-aside, .mh-teacher-options) {
    grid-template: auto / minmax(0, 1fr);
    gap: 12px;
  }
  #sunny-playground[data-phone] .mh-setup-names-panel { container-type: normal; }
  #sunny-playground[data-phone] .mh-setup-details { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #sunny-playground[data-phone] .mh-setup-options-quadrant { grid-template: auto / minmax(0, 1fr); gap: 8px; }
  #sunny-playground[data-phone] .mh-format-options { grid-template: auto / minmax(0, 1fr); }
  #sunny-playground[data-phone] .mh-format-card { container-type: normal; min-height: 142px; }
  #sunny-playground[data-phone] .mh-format-card > strong { font-size: 18px; }
  #sunny-playground[data-phone] .mh-format-chip { font-size: 15px; }
  #sunny-playground[data-phone] .mh-setup-background .mh-meadow { height: 180px; }
  #sunny-playground[data-phone] :is(.mh-setup-custom-editor, .mh-settings) .mh-custom-toolbar {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  #sunny-playground[data-phone] :is(.mh-setup-custom-editor, .mh-settings) .mh-custom-choice {
    grid-template: auto / repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  #sunny-playground[data-phone] :is(.mh-custom-words, .mh-custom-picture, .mh-custom-preview) { grid-area: auto / 1 / auto / -1; }
  #sunny-playground[data-phone] :is(.mh-custom-colour, .mh-custom-shape) { grid-area: auto; }
  #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-preview { height: auto; padding: 8px; gap: 6px; }
  #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-preview-sample { height: 106px; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-setup-custom-editor { margin-bottom: 0; }

  #sunny-playground[data-phone] .mh-staff-date { font-size: 18px; }
  #sunny-playground[data-phone] .mh-staff-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-staff-nav .mh-staff-tab { min-height: 44px; font-size: 15px; }
  #sunny-playground[data-phone] .mh-today .mh-priority { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-priority h2 { min-height: 44px; font-size: 15px; }
  #sunny-playground[data-phone] .mh-history { min-height: 0; }
  #sunny-playground[data-phone] .mh-history .mh-history-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-history-period { grid-area: 1 / 1 / 2 / -1; }
  #sunny-playground[data-phone] .mh-pupil-history .mh-history-period { grid-column: 1; }
  #sunny-playground[data-phone] .mh-history-view-field { grid-area: 2 / 1 / 3 / -1; }
  #sunny-playground[data-phone] .mh-history-year { grid-row: 2; }
  #sunny-playground[data-phone] .mh-history-controls:has(.mh-history-year) .mh-history-view-field { grid-row: 3; }
  #sunny-playground .mh-pupil-history-name { display: none; }
  @media (max-width: 420px) {
    #sunny-playground[data-phone] .mh-pupil-history-name { display: block; font-size: 16px; overflow-wrap: anywhere; }
  }
  #sunny-playground[data-phone] .mh-history-table { flex: 0 0 auto; }
  #sunny-playground[data-phone] .mh-history-table[data-long-period] { flex: 1 1 auto; max-height: 55cqh; }
  #sunny-playground[data-phone] .mh-pupil-history-pages { font-size: 13px; }
  #sunny-playground[data-phone] .mh-history-grid { border-spacing: 2px; }
  #sunny-playground[data-phone] .mh-history-grid th { font-size: 12px; }
  #sunny-playground[data-phone] .mh-history-grid th:first-child { width: 44px; }
  #sunny-playground[data-phone] .mh-history-cell { min-width: 0; padding: 2px; font-size: 12px; }
  #sunny-playground[data-phone] .mh-pupil-history-cell { flex-direction: column; gap: 2px; }
  #sunny-playground[data-phone] .mh-pupil-history-cell time { white-space: nowrap; }
  #sunny-playground[data-phone] .mh-history-grid[data-compact] .mh-history-cell { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  #sunny-playground[data-phone] .mh-history-grid tbody td:not([colspan]) { height: 48px; }
  #sunny-playground[data-phone] .mh-history-footer { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  #sunny-playground[data-phone] .mh-history-footer > * { grid-column: 1; }
  #sunny-playground[data-phone] .mh-history-page-slot { min-width: 0; }
  #sunny-playground[data-phone] .mh-history-footer > .mh-history-page-slot { grid-row: 3; }
  #sunny-playground[data-phone] .mh-history-page-slot:empty,
  #sunny-playground[data-phone] .mh-history-note:empty { display: none; }
  #sunny-playground[data-phone] .mh-history-footer > .mh-history-note { text-align: start; }

  #sunny-playground[data-phone] .mh-settings .mh-settings-nav .mh-quiet { min-height: 44px; font-size: 14px; }
  #sunny-playground[data-phone] .mh-settings .mh-settings-group :is(.mh-settings-columns, .mh-settings-stack, .mh-records-grid),
  #sunny-playground[data-phone] .mh-settings .mh-backdrop-editor {
    height: auto;
    grid-template: auto / minmax(0, 1fr);
  }
  #sunny-playground[data-phone]:not([data-keyboard-open]) .mh-app > .mh-main:has(> .mh-settings) { height: 100%; min-height: 0; }
  #sunny-playground[data-phone] .mh-settings [data-settings-panel="pupil"] > .mh-settings-columns,
  #sunny-playground[data-phone] .mh-settings .mh-settings-group .mh-manage-layout { grid-template-rows: minmax(max-content, 1fr) auto; }
  #sunny-playground[data-phone] .mh-settings .mh-manage-layout[data-editing-pupil] { grid-template-rows: minmax(max-content, 1fr); }
  #sunny-playground[data-phone] .mh-manage-layout[data-editing-pupil] .mh-settings-stack { align-content: stretch; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-settings { grid-template-rows: auto auto; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-settings-group:not([hidden]) { overflow: visible; }
  #sunny-playground[data-phone] .mh-settings .mh-backdrop-preview .mh-meadow { height: 118px; }
  #sunny-playground[data-phone] .mh-settings .mh-feeling-toolbar > label,
  #sunny-playground[data-phone] .mh-settings .mh-pupil-editor .mh-form,
  #sunny-playground[data-phone] .mh-date-fields { grid-template-columns: minmax(0, 1fr); }
  #sunny-playground[data-phone] .mh-feeling-toolbar { grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); gap: 6px 8px; }
  #sunny-playground[data-phone] .mh-feeling-toolbar .mh-settings-actions { display: contents; }
  #sunny-playground[data-phone] .mh-feeling-toolbar [data-action="try-pupil"] {
    grid-area: 1 / 2;
    min-width: 0;
    width: 100%;
    min-height: 44px;
    padding-inline: 6px;
    white-space: normal;
  }
  #sunny-playground[data-phone] .mh-feeling-toolbar :is([data-feeling-draft], [data-feeling-status]) { grid-column: 1 / -1; }
  #sunny-playground[data-phone] .mh-feeling-toolbar [data-feeling-status]:empty { display: none; }
  #sunny-playground[data-phone] .mh-settings .mh-feeling-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-feeling-preview { font-size: 16px; }
  #sunny-playground[data-phone] .mh-class-roster-list ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #sunny-playground[data-phone] .mh-settings .mh-settings-actions button { min-height: 44px; }
  #sunny-playground .mh-checked-mark {
    position: absolute; z-index: 2; top: 5px; right: 6px;
    display: grid; place-items: center; width: 20px; height: 20px;
    border-radius: 50%; background: #215747; color: white; font: 700 13px/1 system-ui, sans-serif;
  }
  #sunny-playground .mh-meadow-title .mh-check-in-receipt { color: light-dark(#215747, #a5e5ce); font-weight: 700; }
  #sunny-playground .mh-motion-options .mh-choice {
    min-height: 0;
    place-content: center;
    justify-items: center;
    padding: 6px;
  }
  #sunny-playground .mh-personal-page .mh-actions { flex-wrap: wrap; }
  #sunny-playground .mh-personal-page .mh-ask-adult { color: #215747; border-color: #215747; }
  #sunny-playground .mh-talk-pending {
    margin: 0; padding: 6px 10px; background: #fffdf5; border-radius: 10px;
    color: #215747; text-align: center; font: 700 14px/1.35 var(--mh-staff-font);
  }
  #sunny-playground .mh-talk-pending p { margin: 0; }
  #sunny-playground .mh-talk-options { display: flex; flex-wrap: wrap; gap: 4px 6px; justify-content: center; margin-top: 6px; }
  #sunny-playground .mh-talk-options button, #sunny-playground .mh-talk-pending > button { min-height: 44px; }
  #sunny-playground .mh-talk-pending > button { margin-top: 3px; }
  #sunny-playground .mh-personal-page .mh-actions:empty { display: none; }
  #sunny-playground .mh-personal-page:has(.mh-talk-pending) { grid-template-rows: auto auto minmax(0, 1fr) auto; }
  #sunny-playground .mh-paste-backup > summary { cursor: pointer; padding: 12px; font-weight: 700; }
  #sunny-playground .mh-setup-pupil-options { display: grid; grid-template-rows: auto minmax(min-content, 1fr); gap: 10px; padding: clamp(10px, 2.1cqh, 20px); }
  #sunny-playground .mh-setup-pupil-options .mh-setup-options-quadrant { gap: clamp(6px, 1.5cqh, 12px); }
  #sunny-playground .mh-setup-pupil-options .mh-setup-option-card { padding: clamp(8px, 1.8cqh, 16px); }
  #sunny-playground .mh-setup-pupil-options .mh-setup-option-card strong { font-size: calc(20px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-pupil-options .mh-setup-option-description { font-size: calc(16px * var(--mh-staff-scale)); }
  #sunny-playground:not([data-phone]) .mh-class-setup-aside { grid-template-rows: auto minmax(0, 1fr) auto; }
  #sunny-playground:not([data-phone]) .mh-setup-pupil-options { grid-template-rows: auto minmax(0, 1fr); }
  #sunny-playground:not([data-phone]) .mh-setup-options-quadrant { grid-template-rows: repeat(3, minmax(0, 1fr)); }
  #sunny-playground:not([data-phone]) .mh-setup-pupil-options .mh-setup-option-card { padding: clamp(6px, 1cqh, 12px); }
  #sunny-playground:not([data-phone]) .mh-setup-option-card > span { gap: 4px; }
  #sunny-playground:not([data-phone]) .mh-setup-pupil-options .mh-setup-option-card strong { font-size: calc(17px * var(--mh-staff-scale)); }
  #sunny-playground:not([data-phone]) .mh-setup-pupil-options .mh-setup-option-description { font-size: calc(14px * var(--mh-staff-scale)); }
  #sunny-playground .mh-setup-preset-preview { display: none; }
  #sunny-playground .mh-custom-picker-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #sunny-playground .mh-custom-picker-number { flex: none; font-variant-numeric: tabular-nums; }
  #sunny-playground .mh-custom-picker:has(> :nth-child(5)) .mh-custom-picker-label { display: none; }
  #sunny-playground .mh-custom-edit { min-width: 0; }
  #sunny-playground .mh-setup-custom-editor .mh-custom-preview > .mh-custom-set-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); gap: 5px; align-items: stretch;
  }
  #sunny-playground .mh-setup-custom-editor .mh-custom-set-preview > .mh-custom-preview-sample {
    width: 100%; height: 100%; max-height: 100%; aspect-ratio: auto; font-size: 14px;
  }
  #sunny-playground .mh-setup-custom-editor .mh-custom-set-preview .mh-symbol {
    flex-basis: 24px; width: 24px; height: 24px; font-size: 17px;
  }
  #sunny-playground:not([data-keyboard-open]) .mh-setup-custom-editor .mh-custom-preview > [data-custom-preview],
  #sunny-playground[data-keyboard-open] .mh-setup-custom-editor .mh-custom-preview > .mh-custom-set-preview { display: none; }
  #sunny-playground[data-phone]:not([data-keyboard-open]) .mh-setup-custom-editor .mh-custom-settings { gap: 10px; }
  @media (min-width: 375px) {
    #sunny-playground[data-phone]:not([data-keyboard-open]) .mh-setup-custom-editor .mh-custom-toolbar:has(.mh-custom-picker > :last-child:nth-child(-n+4)) {
      grid-template-columns: minmax(94px, 1fr) minmax(191px, 1.7fr);
      align-items: end;
    }
    #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-picker:has(> :last-child:nth-child(-n+4)) {
      grid-template-columns: repeat(auto-fit, minmax(44px, 1fr));
    }
  }
  #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-toolbar :is(select, .mh-custom-edit) {
    height: 44px;
    min-height: 44px;
  }
  #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-picker .mh-custom-edit { padding-inline: 3px; gap: 4px; }
  #sunny-playground[data-phone]:not([data-keyboard-open]) .mh-setup-custom-editor .mh-custom-choice { align-content: start; gap: 8px; }
  #sunny-playground[data-phone] .mh-setup-custom-editor .mh-custom-set-preview { grid-auto-rows: minmax(54px, auto); }
  #sunny-playground .mh-pin-hint:empty { display: none; }
  @media (max-height: 500px) {
    #sunny-playground[data-phone] [data-pin-dialog] [data-form="pin"] {
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 12px;
    }
    #sunny-playground[data-phone] [data-pin-dialog] .mh-keypad { grid-area: 1 / 2 / span 5; align-self: start; }
    #sunny-playground[data-phone] [data-pin-dialog] [data-form="pin"] > :not(.mh-keypad) { grid-column: 1; min-width: 0; }
  }
  #sunny-playground :is([data-copy-status], [data-backup-status]):empty { display: none; }
  #sunny-playground .mh-today-priorities,
  #sunny-playground .mh-today-feelings { display: grid; min-width: 0; gap: 8px; }
  #sunny-playground .mh-today { display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; gap: 10px; }
  #sunny-playground .mh-today-feelings { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)); align-items: start; }
  #sunny-playground .mh-today-feelings .mh-group[open] { grid-column: 1 / -1; }
  #sunny-playground .mh-today :is(.mh-today-feelings, .mh-today-priorities) summary {
    display: flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 8px;
    background: var(--mh-zone, var(--mh-panel)); color: var(--mh-zone-ink, var(--mh-ink)); padding: 6px 10px;
  }
  #sunny-playground .mh-today summary > span:first-child::before { content: '▸'; margin-inline-end: 6px; }
  #sunny-playground .mh-today summary > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  #sunny-playground .mh-today summary .mh-count { flex: none; }
  #sunny-playground .mh-request-follow-up { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-block: 8px; }
  #sunny-playground .mh-request-follow-up button { min-height: 44px; }
  #sunny-playground .mh-today details[open] > summary > span:first-child::before { content: '▾'; }
  #sunny-playground .mh-today .mh-needs-attention summary { background: #f9dce6; color: #611c3c; }
  #sunny-playground .mh-today :is(.mh-today-priorities, .mh-today-feelings) .mh-list {
    grid-template-columns: repeat(auto-fill, min(100%, calc(142px * var(--mh-staff-scale))));
    margin: 4px 6px;
  }
  #sunny-playground .mh-today .mh-row button {
    display: flex;
    align-items: center;
    height: calc(50px * var(--mh-staff-scale));
    padding-block: 3px;
  }
  #sunny-playground .mh-today .mh-row button:has(.mh-today-request-mark) { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
  #sunny-playground .mh-today .mh-today-request-mark { flex: none; }
  #sunny-playground .mh-requests .mh-row button { flex-direction: column; justify-content: center; align-items: flex-start; }
  #sunny-playground .mh-requests .mh-row button > span { -webkit-line-clamp: 1; }
  #sunny-playground .mh-requests time { font-size: .78em; font-weight: 500; }
  #sunny-playground .mh-today-note { margin: 0; padding: 8px 12px; color: var(--mh-soft); }
  #sunny-playground .mh-today-weekend-note { text-align: center; }
  #sunny-playground .mh-adult-request { margin: 4px 0; color: #611c3c; font-weight: 700; }
  #sunny-playground .mh-history-cell-empty time, #sunny-playground .mh-pupil-history-cell time { font-size: .8em; opacity: .85; }
  #sunny-playground .mh-history-cell-empty time { display: block; }
  #sunny-playground .mh-history-cell-empty[data-upcoming] { opacity: .55; background: transparent; }
  #sunny-playground .mh-class-roster-filters { grid-template-columns: minmax(0, 2fr) minmax(0, 1.25fr) minmax(0, 1fr); }
  #sunny-playground .mh-class-roster-filters button { align-self: end; min-height: 44px; }
  #sunny-playground .mh-class-roster-filters :is(button, input, select) { height: max(44px, calc(46px * var(--mh-staff-scale))); }
  #sunny-playground [data-add-pupils-dialog] .mh-class-list-form { grid-template-columns: minmax(0, 1fr); }
  #sunny-playground:not([data-phone]) .mh-class-roster { min-height: 0; }
  #sunny-playground:not([data-phone]) .mh-class-roster-list { overflow: auto; border: 0; padding: 0; }
  #sunny-playground .mh-class-roster-list li > button { height: calc(50px * var(--mh-staff-scale)); min-height: 44px; padding-block: 3px; }
  #sunny-playground .mh-pupil-editor :is(.mh-pupil-save, .mh-pupil-admin) { grid-column: 1 / -1; min-width: 0; }
  #sunny-playground .mh-pupil-save { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  #sunny-playground .mh-pupil-save button { min-height: 44px; }
  #sunny-playground .mh-pupil-save [data-action="close-pupil-editor"] { display: none; }
  #sunny-playground:not([data-phone]) .mh-pupil-save > [type="submit"] { margin-inline-start: auto; }
  #sunny-playground .mh-pupil-save > p { flex-basis: 100%; }
  #sunny-playground .mh-pupil-save p:empty { display: none; }
  #sunny-playground .mh-pupil-admin { padding-top: 6px; border-top: 1px solid var(--mh-line); }
  #sunny-playground .mh-settings .mh-pupil-admin h3 { font: inherit; font-size: .86em; font-weight: 700; margin: 0 0 5px; }
  #sunny-playground:not([data-phone]) .mh-settings .mh-pupil-admin .mh-settings-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  #sunny-playground:not([data-phone]) .mh-pupil-admin button { padding-inline: 5px; }
  #sunny-playground .mh-pupil-admin .mh-settings-actions { align-items: stretch; }
  #sunny-playground .mh-pupil-admin [data-action="change-pupil-archive"] { color: light-dark(#8a222d, #ffb9c7); }
  #sunny-playground:not([data-phone]) .mh-whole-class-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
  #sunny-playground:not([data-phone]) .mh-whole-class-actions > button { grid-row: 1; }
  #sunny-playground:not([data-phone]) .mh-whole-class-actions > p { grid-row: 2; }
  #sunny-playground .mh-class-roster > [data-add-pupils-status]:empty,
  #sunny-playground .mh-whole-class-actions > p:empty,
  #sunny-playground [data-year-status]:empty { display: none; }
  #sunny-playground:not([data-phone]) .mh-whole-class-actions > [data-profile-reset-status] { grid-column: 2; }
  #sunny-playground .mh-settings .mh-profile-settings { align-content: start; grid-auto-rows: auto; gap: 4px; }
  #sunny-playground .mh-settings .mh-profile-settings label { min-height: 44px; padding: 4px 8px; }
  #sunny-playground:not([data-phone]) .mh-settings .mh-profile-settings { flex: 1; grid-auto-rows: minmax(44px, 1fr); }
  #sunny-playground:not([data-phone]) .mh-settings .mh-backdrop-settings:has([data-backdrop-fixed]:not([hidden])) {
    flex: 1;
    grid-template-rows: minmax(min-content, 1fr);
  }
  #sunny-playground:not([data-phone]) .mh-settings .mh-backdrop-settings:has([data-backdrop-fixed]:not([hidden])) .mh-backdrop-preview {
    align-self: stretch;
    grid-template-rows: minmax(118px, 1fr);
  }
  #sunny-playground:not([data-phone]) .mh-settings .mh-backdrop-settings:has([data-backdrop-fixed]:not([hidden])) .mh-meadow {
    height: auto;
  }
  #sunny-playground .mh-records-choice { display: grid; gap: 4px; }
  #sunny-playground .mh-records-choice p { margin: 0; }
  #sunny-playground .mh-records-danger { border-top: 1px solid var(--mh-line); padding-top: 8px; }
  #sunny-playground .mh-records-danger .mh-settings-actions > button { color: light-dark(#8a222d, #ffb9c7); }
  #sunny-playground button.mh-destructive { background: #9b2931; color: white; border-color: #9b2931; }
  #sunny-playground button.mh-destructive:hover { background: #81232b; }
  #sunny-playground [data-action="restart-class"] { color: #8a222d; }
  #sunny-playground .mh-import-label.mh-primary { background: #215747; color: white; padding: 10px; min-height: 44px; }
  #sunny-playground .mh-paste-backup { margin-top: 8px; }
  #sunny-playground .mh-paste-backup > summary { padding-inline: 0; }
  #sunny-playground[data-phone] .mh-stepping-stones { grid-auto-rows: 88px; gap: 5px; }
  @media (max-width: 600px) and (orientation: portrait) {
    #sunny-playground[data-phone] .mh-stepping-stones { width: 100%; grid-auto-rows: 112px; gap: 7px; }
    #sunny-playground[data-phone] .mh-stepping-stones[data-small-roster]:has(> :nth-child(3)) {
      align-content: center;
      grid-auto-rows: clamp(104px, var(--mh-roster-row-height), 170px);
    }
  }
  @media (min-width: 620px) and (orientation: landscape) {
    #sunny-playground[data-phone] .mh-stepping-stones { grid-auto-rows: 104px; }
  }
  #sunny-playground[data-phone] .mh-stepping-stones[data-small-roster] {
    width: 100%;
    grid-auto-rows: max(104px, var(--mh-roster-row-height));
  }
  #sunny-playground[data-phone] .mh-stepping-stones[data-small-roster] button.mh-name {
    --mh-badge-max-width: min(320px, 90cqw);
  }
  #sunny-playground[data-phone] .mh-setup-header {
    position: sticky; z-index: 4; top: var(--mh-phone-top);
  }
  #sunny-playground .mh-setup-heading [data-action="skip-badge"] { min-height: 44px; padding-inline: 0; background: transparent; border-color: transparent; box-shadow: none; font-size: 14px; text-decoration: underline; text-underline-offset: .2em; }
  #sunny-playground[data-phone] .mh-preview-name { font-size: clamp(20px, 7vw, 28px); }
  #sunny-playground[data-phone] .mh-setup-header[data-scrolled] h1 { font-size: 20px; }
  #sunny-playground[data-phone] .mh-setup-header[data-scrolled] .mh-setup-visuals { height: 82px; }
  @media (max-width: 600px) {
    #sunny-playground[data-phone] .mh-setup-header {
      --mh-portrait-slot: clamp(32px, 12cqw, 52px);
      grid-template: auto auto / minmax(0, 1fr) auto;
      column-gap: 9px;
      align-content: center;
      padding: 7px 8px;
    }
    #sunny-playground[data-phone] .mh-setup-header > .mh-setup-nav {
      grid-area: 1 / 2 / 3 / 3;
      width: 76px;
      min-height: 0;
    }
    #sunny-playground[data-phone] .mh-setup-heading h1 { font-size: clamp(18px, 5.7vw, 24px); }
    #sunny-playground[data-phone] .mh-setup-header .mh-setup-visuals {
      grid-area: 2 / 1;
      gap: 6px;
      height: clamp(48px, 16cqw, 82px);
    }
    #sunny-playground[data-phone] .mh-setup-page > :is(.mh-font-options, .mh-colour-options) {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    #sunny-playground[data-phone] .mh-setup-page .mh-font-options .mh-choice { padding-inline: 8px; }
    #sunny-playground[data-phone] .mh-font-options .mh-letter-sample { font-size: clamp(22px, 7cqw, 36px); }
  }
  @media (min-width: 620px) and (max-height: 500px) {
    #sunny-playground[data-phone] .mh-setup-page > .mh-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    #sunny-playground[data-phone] .mh-setup-page > .mh-background-options { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    #sunny-playground[data-phone] .mh-setup-page > .mh-animal-options { grid-template-columns: repeat(8, minmax(0, 1fr)); }
    #sunny-playground[data-phone] .mh-animal-options .mh-choice {
      --mh-animal-circle: clamp(26px, 8.5cqh, 42px);
    }
    #sunny-playground[data-phone] .mh-setup-header {
      grid-template: auto / minmax(0, 1fr) minmax(0, 51%) minmax(0, 1fr);
    }
    #sunny-playground[data-phone] .mh-setup-header .mh-setup-heading h1 { font-size: 22px; }
    #sunny-playground[data-phone] .mh-setup-header > .mh-setup-nav { grid-area: 1 / 3; }
    #sunny-playground[data-phone] .mh-setup-header .mh-setup-visuals { grid-area: 1 / 2; height: 94px; }
  }
  #sunny-playground[data-phone] .mh-custom-picker-label { display: none; }
  #sunny-playground[data-phone] .mh-settings .mh-custom-choice {
    grid-template: auto / repeat(2, minmax(0, 1fr)); align-items: start; gap: 10px;
  }
  #sunny-playground[data-phone] .mh-settings .mh-custom-choice :is(.mh-custom-words, .mh-custom-picture, .mh-custom-preview) {
    grid-area: auto / 1 / auto / -1;
  }
  #sunny-playground[data-phone] .mh-settings .mh-custom-choice :is(.mh-custom-colour, .mh-custom-shape) { grid-area: auto; }
  #sunny-playground[data-phone] .mh-settings .mh-custom-choice :is(input, select) { width: 100%; min-width: 0; }
  #sunny-playground .mh-export-tools > summary { cursor: pointer; padding-block: 10px; font-weight: 700; }
  #sunny-playground[data-phone] .mh-personal-name { font-size: clamp(24px, 8cqw, 34px); }
  #sunny-playground[data-phone] .mh-personal h2 { font-size: 17px; padding-block: 6px; }
  #sunny-playground[data-phone] .mh-personal-page .mh-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  #sunny-playground[data-phone] .mh-personal-page .mh-talk { width: 100%; }
  #sunny-playground[data-phone] .mh-zones { grid-auto-rows: minmax(96px, 1fr); }
  @media (max-width: 600px) and (orientation: portrait) {
    #sunny-playground[data-phone] .mh-zones {
      max-height: calc(var(--mh-feeling-rows) * (clamp(96px, 46cqw, 186px) + 10px));
      margin-block: auto;
    }
  }
  #sunny-playground[data-phone] .mh-app > .mh-welcome-page:has(:is([data-form="setup-class"], [data-form="setup-options"])) {
    height: 100%;
    min-height: 0;
  }
  #sunny-playground[data-phone] .mh-teacher-setup:is([data-form="setup-class"], [data-form="setup-options"]) { flex: 1; gap: 6px; }
  #sunny-playground[data-phone] .mh-teacher-setup:is([data-form="setup-class"], [data-form="setup-options"]) .mh-onboarding-header { flex: none; gap: 2px 8px; }
  #sunny-playground[data-phone] .mh-onboarding-steps li { padding-block: 2px 4px; font-size: 12px; }
  #sunny-playground[data-phone] .mh-onboarding-steps li > span { flex-basis: 22px; height: 22px; }
  #sunny-playground[data-phone] .mh-class-setup-grid,
  #sunny-playground[data-phone] .mh-class-setup-aside { gap: 6px; }
  #sunny-playground[data-phone] .mh-class-setup-grid { grid-template-rows: minmax(150px, 1fr) auto; min-height: 0; }
  #sunny-playground[data-phone] .mh-class-setup-aside { display: flex; flex-direction: column; min-height: auto; }
  #sunny-playground[data-phone] .mh-class-setup-aside > * { flex: none; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-onboarding-panel { padding: 7px; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-setup-names-panel { gap: 4px; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-setup-label { height: auto; gap: 3px; }
  #sunny-playground[data-phone] .mh-setup-names-panel h2 { font-size: 17px; }
  #sunny-playground[data-phone] .mh-class-setup-grid :is(.mh-setup-help, .mh-setup-count) { font-size: 12px; }
  #sunny-playground[data-phone] .mh-setup-name-columns { flex-basis: 52px; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-setup-name-columns textarea { font-size: 18px; line-height: 1.3; padding: 5px 7px; scrollbar-width: auto; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-setup-name-columns { min-height: 52px; }
  #sunny-playground[data-phone] .mh-setup-names-panel { min-height: 124px; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-class-setup-grid:has(.mh-setup-names-panel:focus-within) {
    grid-template: minmax(172px, 1fr) / minmax(0, 1fr);
  }
  #sunny-playground[data-phone][data-keyboard-open] .mh-class-setup-grid:has(.mh-setup-names-panel:focus-within) .mh-class-setup-aside { display: none; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-class-setup-grid .mh-setup-names-panel:focus-within { grid-area: 1 / 1; }
  #sunny-playground[data-phone][data-keyboard-open] .mh-class-setup-grid .mh-setup-name-columns textarea {
    padding-bottom: 5px;
    scroll-padding-bottom: 0;
  }
  #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-header {
    grid-template: 44px / minmax(44px, 1fr) minmax(0, 3fr) minmax(62px, 1fr);
  }
  #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-title { grid-area: 1 / 2; }
  #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-title h1 { font-size: clamp(16px, 4.5vw, 24px); }
  #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-actions { grid-area: 1 / 3; }
  #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-actions .mh-primary { min-height: 44px; padding-inline: 6px; font-size: 14px; }
  @media (orientation: landscape) {
    #sunny-playground[data-phone][data-keyboard-open] [data-form="setup-class"]:has(.mh-setup-names-panel:focus-within) .mh-onboarding-steps { display: none; }
    #sunny-playground[data-phone][data-keyboard-open] .mh-class-setup-grid:has(.mh-setup-names-panel:focus-within) { grid-template-rows: minmax(124px, 1fr); }
    #sunny-playground[data-phone][data-keyboard-open] .mh-setup-names-panel:focus-within { min-height: 124px; }
  }
  #sunny-playground[data-phone] .mh-setup-names-panel .mh-setup-count { padding-top: 3px; }
  #sunny-playground[data-phone] .mh-setup-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
  #sunny-playground[data-phone] .mh-setup-details label { gap: 3px; font-size: 12px; }
  #sunny-playground[data-phone] .mh-setup-details :is(input, select) { height: 44px; min-height: 44px; padding: 5px 7px; }
  #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-pupil-options { grid-template-rows: auto auto; gap: 5px; }
  #sunny-playground[data-phone] .mh-setup-pupil-options h2 { font-size: 16px; }
  #sunny-playground[data-phone] .mh-setup-pupil-options .mh-setup-options-quadrant { grid-template: none / repeat(2, minmax(0, 1fr)); grid-auto-rows: minmax(64px, 1fr); gap: 5px; }
  #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card { min-height: 44px; padding: 5px; gap: 5px; }
  #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card > span { display: contents; }
  #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card strong { font-size: 13px; line-height: 1.15; }
  #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-description { grid-column: 1 / -1; font-size: 12px; line-height: 1.2; }
  #sunny-playground[data-phone] .mh-class-setup-grid .mh-option-check input { width: 16px; height: 16px; margin-top: 0; }
  #sunny-playground[data-phone] .mh-setup-links button { min-height: 44px; }
  @media (max-height: 650px) {
    #sunny-playground[data-phone] .mh-teacher-setup .mh-onboarding-header {
      grid-template: minmax(50px, auto) / minmax(80px, 1fr) minmax(0, 2fr) minmax(80px, 1fr);
      column-gap: 4px;
    }
    #sunny-playground[data-phone] .mh-onboarding-title { grid-area: 1 / 2; }
    #sunny-playground[data-phone] .mh-onboarding-title h1 { font-size: clamp(16px, 4.5vw, 24px); }
    #sunny-playground[data-phone] .mh-onboarding-actions { grid-area: 1 / 3; }
    #sunny-playground[data-phone] .mh-onboarding-actions .mh-primary { padding-inline: 6px; font-size: 13px; }
    #sunny-playground[data-phone] .mh-app > .mh-welcome-page:has(:is([data-form="setup-class"], [data-form="setup-options"])) { padding-block: calc(var(--mh-phone-top) + 6px) calc(var(--mh-phone-bottom) + 6px); }
    #sunny-playground[data-phone] .mh-setup-details label { display: flex; flex-direction: column; flex-wrap: nowrap; }
    #sunny-playground[data-phone] .mh-setup-links .mh-quiet { min-height: 44px; padding: 3px 6px; font-size: 12px; }
    #sunny-playground[data-phone] .mh-setup-links .mh-setup-restore { font-size: 12px; }
  }
  @media (max-width: 360px) and (max-height: 650px) {
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card > span { display: contents; }
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-description { font-size: 11px; }
    #sunny-playground[data-phone] .mh-setup-option-description { grid-column: 1 / -1; }
    #sunny-playground[data-phone] .mh-setup-pupil-options .mh-setup-options-quadrant { grid-auto-rows: minmax(60px, 1fr); }
  }
  @media (min-width: 620px) and (max-height: 500px) {
    #sunny-playground[data-phone] :is(.mh-class-setup-grid, .mh-teacher-options) {
      grid-template: minmax(0, 1fr) / repeat(2, minmax(0, 1fr));
      gap: 6px;
    }
    #sunny-playground[data-phone] .mh-setup-pupil-options .mh-setup-options-quadrant { grid-auto-rows: minmax(48px, auto); gap: 4px; }
    #sunny-playground[data-phone] .mh-class-setup-grid .mh-onboarding-panel { padding: 5px; }
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card { padding: 4px; }
    #sunny-playground[data-phone] .mh-class-setup-aside { gap: 4px; }
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-description { overflow-wrap: normal; }
    #sunny-playground[data-phone] .mh-class-setup-grid { grid-template-rows: auto; }
  }
  @media (min-width: 620px) and (max-width: 730px) and (max-height: 400px) {
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card > span { display: contents; }
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-card strong { font-size: 12px; }
    #sunny-playground[data-phone] .mh-class-setup-aside .mh-setup-option-description { grid-column: 1 / -1; font-size: 11px; }
  }
  #sunny-playground[data-phone] .mh-welcome-page .mh-setup-links .mh-quiet { padding-inline: 6px; font-size: clamp(12px, 3.3vw, 13px); }
  #sunny-playground[data-phone] .mh-setup-restore svg { width: 18px; height: 18px; }
  #sunny-playground[data-phone] .mh-format-options { min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #sunny-playground[data-phone] .mh-format-options .mh-format-card { min-height: 48px; grid-template-rows: auto; align-content: center; gap: 3px; padding: 6px 9px; }
  #sunny-playground[data-phone] .mh-format-options .mh-format-card strong { font-size: 14px; padding-right: 16px; }
  #sunny-playground[data-phone] .mh-format-card > input[type="radio"] { inset: 50% 7px auto auto; width: 15px; height: 15px; min-height: 15px; transform: translateY(-50%); }
  #sunny-playground[data-phone] .mh-format-options :is(.mh-format-chips, .mh-format-note, .mh-custom-format-preview svg, .mh-format-radio) { display: none; }
  #sunny-playground[data-phone] .mh-custom-format-preview { justify-content: start; background: transparent; border: 0; padding: 0; }
  #sunny-playground[data-phone] .mh-custom-format-preview > span { max-width: none; font-size: 11px; text-align: start; }
  #sunny-playground[data-phone] .mh-setup-preset-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; margin-top: 8px; }
  #sunny-playground[data-phone] .mh-setup-preset-preview :is(.mh-feeling-preview, .mh-custom-preview-sample) { min-height: 42px; padding: 3px 6px; font-size: 13px; }
  #sunny-playground[data-phone] .mh-setup-preset-preview .mh-custom-preview-sample { width: 100%; }
  #sunny-playground[data-phone] .mh-setup-preset-preview .mh-feeling-preview-icon { font-size: 22px; }
  #sunny-playground[data-phone] .mh-teacher-options { grid-template-rows: auto minmax(100px, 1fr); gap: 6px; }
  #sunny-playground[data-phone] .mh-teacher-options .mh-onboarding-panel { padding: 7px; gap: 6px; }
  #sunny-playground[data-phone] .mh-teacher-options .mh-onboarding-panel h2 { font-size: 16px; }
  #sunny-playground[data-phone] .mh-setup-background .mh-meadow { height: 100%; }
  @media (min-width: 620px) and (max-height: 500px) {
    #sunny-playground[data-phone] .mh-teacher-options { grid-template-rows: minmax(0, 1fr); }
  }
  #sunny-playground[data-phone] .mh-teacher-setup:is([data-form="setup-class"], [data-form="setup-options"]) .mh-onboarding-header { position: sticky; top: var(--mh-phone-top); z-index: 3; background: var(--mh-staff-bg, #fff9e8); }
  #sunny-playground[data-phone] .mh-settings .mh-profile-settings { grid-template-columns: minmax(0, 1fr); }
  #sunny-playground[data-phone] .mh-settings .mh-profile-settings label { min-height: 44px; }
  #sunny-playground[data-phone] .mh-class-roster-filters { grid-template-columns: minmax(0, 1fr) auto; }
  #sunny-playground[data-phone] .mh-class-roster-filters label:last-child { grid-column: 1 / -1; }
  #sunny-playground[data-phone] .mh-manage-layout:not([data-editing-pupil]) .mh-settings-stack > :first-child,
  #sunny-playground[data-phone] .mh-manage-layout[data-editing-pupil] > :first-child,
  #sunny-playground[data-phone] .mh-manage-layout[data-editing-pupil] .mh-settings-stack > :last-child { display: none; }
  #sunny-playground[data-phone] .mh-pupil-save { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: 8px; }
  #sunny-playground[data-phone] .mh-pupil-save [data-action="close-pupil-editor"] { display: block; }
  #sunny-playground[data-phone] .mh-pupil-save button { min-width: 0; justify-self: stretch; padding-inline: 6px; }
  #sunny-playground[data-phone] .mh-pupil-save h2 { grid-column: 1 / -1; }
  #sunny-playground[data-phone] .mh-pupil-save p { grid-column: 1 / -1; }

html, body { margin:0; width:100%; height:100%; overflow:hidden; overscroll-behavior:none; background:#fff9e8; color-scheme:light; }
body { position:fixed; inset:0; }
#sunny-playground { color-scheme:light; height:100%; min-height:0; display:grid; place-items:start stretch; padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); overscroll-behavior:none; }
#sunny-playground textarea { overscroll-behavior:contain; }
#sunny-playground button, #sunny-playground label, #sunny-playground summary { -webkit-tap-highlight-color:transparent; touch-action:manipulation; }
#sunny-playground :is(button,input,textarea,select,summary):focus-visible { outline:3px solid #1463c4; outline-offset:3px; }
#sunny-playground input, #sunny-playground textarea, #sunny-playground select { font-size:max(16px,1em); }
#sunny-playground .mh-format-card:focus-within { outline:3px solid #1463c4; outline-offset:2px; }
#sunny-playground .mh-choice[aria-pressed=true] { border:2px solid var(--mh-moss); }
#sunny-playground .mh-option-check { min-height:44px; }
#sunny-playground .mh-dialog-actions { display:flex; flex-wrap:wrap; gap:10px; margin-block:18px; }
@media (prefers-reduced-motion:reduce) { #sunny-playground *, #sunny-playground *::before, #sunny-playground *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; } }
