.numbered-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .75rem; }
.numbered-heading h3 { margin: 0; }
.numbered-heading span, .numbered-progress { color: #43584c; font-size: .92rem; }
.numbered-coloring > p { margin: .45rem 0; }
.numbered-mode-switch:not([hidden]) { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 .85rem; }
.numbered-mode-switch a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .43rem .8rem; border: 1px solid #a8bdb0; border-radius: .55rem; background: #fff; color: #125740; font-weight: 650; text-decoration: none; }
.numbered-mode-switch a[aria-current] { background: #17644d; border-color: #17644d; color: white; }
.numbered-mode-switch a:focus-visible { outline: 2px solid #17644d; outline-offset: 2px; }
.ghost-color-r84:has(.sheet-picker[open]) .numbered-mode-switch { display: none; }
.numbered-palette, .numbered-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0; }
.numbered-palette button, .numbered-tools button { min-height: 44px; padding: .45rem .65rem; }
.numbered-palette button { display: inline-flex; align-items: center; gap: .35rem; }
.numbered-swatch { width: 1rem; height: 1rem; border-radius: 50%; border: 1px solid #555; background: var(--swatch); }
.numbered-progress { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; }
.numbered-piece-picker { margin-block: .5rem; }
.numbered-piece-picker summary { cursor: pointer; }
.numbered-piece-list { display: flex; flex-wrap: wrap; gap: .4rem; padding-block: .4rem; }
.numbered-piece-list button { min-height: 44px; }
.numbered-piece-list [hidden] { display: none; }
.numbered-coloring button[aria-pressed="true"] { background: #e4f0e9; border-color: #17644d; box-shadow: inset 0 0 0 1px #17644d; }
.numbered-stage { border: 1px solid #d5ded3; border-radius: .65rem; background: white; }
.numbered-art { width: min(var(--drawing-percent, 100%), var(--drawing-width, 680px)); margin-inline: auto; }
.numbered-stage[data-drawing-zoomed] { max-height: min(66vh, 710px); }
.numbered-zoom { display: flex; align-items: center; gap: .35rem; }
.numbered-zoom button { min-width: 44px; font-size: 1.2rem; }
.numbered-zoom output { min-width: 3.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.numbered-free { display: inline-block; margin-top: .6rem; }
.numbered-art svg { display: block; width: 100%; height: auto; }
.numbered-art [data-number-region] { cursor: pointer; }
.numbered-art [data-number-match] { fill: #d7ede1; }
.numbered-art [data-number-region]:focus-visible { outline: none; stroke: #17644d; stroke-width: 3px; }
@media (max-width: 600px) {
  .numbered-palette { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); }
  .numbered-palette button { justify-content: center; padding-inline: .35rem; }
  .numbered-name { display: none; }
}

.ghost-game h3 { margin: .25rem 0; }
.ghost-game > p { margin: .45rem 0; }
.ghost-game-tools { display: flex; flex-wrap: wrap; gap: .4rem; margin: .65rem 0; }
.ghost-game-tools button { min-height: 44px; padding: .45rem .65rem; }
.ghost-game-tools [aria-pressed="true"] { background: #e4f0e9; border-color: #17644d; box-shadow: inset 0 0 0 1px #17644d; }
.ghost-game-status { min-height: 1.5em; color: #395449; font-weight: 650; }
.ghost-game-stage { overflow: auto; max-width: 100%; border: 1px solid #d5ded3; border-radius: .65rem; background: white; }
.ghost-game-art { position: relative; width: min(100%, 600px); margin-inline: auto; }
.ghost-game-enlarged .ghost-game-art { width: max(140%, 710px); }
.ghost-game-art svg { display: block; width: 100%; height: auto; user-select: none; }
.ghost-game-art [data-game-dot] { cursor: pointer; }
.ghost-dot-halo { stroke: transparent; }
.ghost-game-art [data-dot-next] .ghost-dot-halo,
.ghost-game-art [data-game-dot]:focus-visible .ghost-dot-halo { fill: #ccebdc; stroke: #17644d; stroke-width: 2.5; }
.ghost-game-art [data-game-dot]:focus-visible { outline: none; }
.ghost-game-art [data-mirror-input] { position: absolute; inset: 0 0 0 50%; touch-action: none; cursor: crosshair; }
.ghost-game-art [data-mirror-input]:focus-visible { outline: 2px solid #17644d; outline-offset: -2px; }
.ghost-game-free { display: inline-block; margin-top: .6rem; }

.mandala-editor h3 { margin: .25rem 0; }
.mandala-editor > p { margin: .45rem 0; }
.mandala-editor .mandala-status:empty { display: none; }
.mandala-palette, .mandala-tools { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .65rem 0; }
.mandala-palette button, .mandala-tools button, .mandala-regions button { min-height: 44px; padding: .42rem .65rem; }
.mandala-palette button:has(span) { display: grid; place-items: center; width: 44px; padding: 0; }
.mandala-palette button span { width: 1.2rem; height: 1.2rem; border-radius: 50%; border: 1px solid #536159; background: var(--swatch); }
.mandala-palette button[aria-pressed="true"] { background: #e4f0e9; border-color: #17644d; box-shadow: inset 0 0 0 1px #17644d; }
.mandala-custom { display: inline-flex; align-items: center; gap: .35rem; }
.mandala-custom input { width: 44px; height: 44px; padding: .2rem; cursor: pointer; }
.mandala-zoom { display: inline-flex; align-items: center; gap: .4rem; }
.mandala-zoom button { min-width: 44px; font-size: 1.2rem; }
.mandala-zoom output { min-width: 3.6rem; text-align: center; font-variant-numeric: tabular-nums; }
.mandala-regions { margin-block: .5rem; }
.mandala-regions > div { display: flex; flex-wrap: wrap; align-items: end; gap: .35rem .65rem; padding: .35rem 0; }
.mandala-regions label { min-width: 0; width: min(100%, 22rem); }
.mandala-regions button { margin-bottom: .35rem; }
.mandala-stage { max-width: 100%; overflow: auto; border: 1px solid #d5ded3; border-radius: .65rem; background: white; }
.mandala-stage[data-drawing-zoomed] { max-height: min(66vh, 710px); }
.mandala-art { width: min(var(--drawing-percent, 100%), var(--drawing-width, 640px)); margin-inline: auto; }
.mandala-art svg { display: block; width: 100%; height: auto; }
.mandala-art [data-mandala-region] { cursor: pointer; }
.mandala-art [data-mandala-highlight] { stroke: #166a50; stroke-width: 3px; stroke-dasharray: 4 2.5; }
.mandala-free { display: inline-block; margin-top: .6rem; }
