/* The new play shell shares the original controller, dialogs, and saved games. */
[hidden] { display: none !important; }
.play-brand, .clean-only, .clean-actions, .tile-value { display: none; }
.ui-icon, .menu-heading .icon-button img, #open-menu img { width: 21px; height: 21px; }
.classic-new-entry { font-size: 11px; }
body[data-ui='clean'] { display: flow-root; font-family: -apple-system, BlinkMacSystemFont, 'Noto Sans CJK SC', 'PingFang SC', system-ui, sans-serif; }
body[data-ui='clean'] .ambient,
body[data-ui='clean'] > .topbar,
body[data-ui='clean'] main > .theme-picker,
body[data-ui='clean'] .game > .game-actions,
body[data-ui='clean'] .game > .social-actions,
body[data-ui='clean'] .controls-hint,
body[data-ui='clean'] .hud .best,
body[data-ui='clean'] #world-stage { display: none; }
body[data-ui='clean'] main { width: 100%; max-width: 432px; padding: 0 19px; margin: max(48px, 7dvh) auto 30px; }
body[data-ui='clean'] .hud { gap: 10px; margin: 0 0 29px; align-items: center; }
body[data-ui='clean'] .world-heading { min-width: 0; }
body[data-ui='clean'] .play-brand { display: block; margin: 0 0 7px; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); font-size: 11px; line-height: 1.3; letter-spacing: 1px; text-decoration: none; }
body[data-ui='clean'][data-theme] h1 { font-size: 25px; line-height: 1.25; letter-spacing: -.6px; font-weight: 700; margin: 0; }
body[data-ui='clean'] .scores { margin-left: auto; gap: 0; flex-shrink: 0; }
body[data-ui='clean'][data-theme] .score-box { background: none; border: none; padding: 0; }
body[data-ui='clean'][data-theme] .score-box > span { font-size: 10px; line-height: 1.2; letter-spacing: 0; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); }
body[data-ui='clean'][data-theme] .score-box strong { font: 600 25px/1.2 Arial, sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
body[data-ui='clean'] #score-gain { font-size: 13px; }
body[data-ui='clean'] #open-menu { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: none; background: none; border-radius: 12px; color: var(--ink); }
body[data-ui='clean'] .board-wrap { padding: 0; perspective: none; }
body[data-ui='clean'][data-theme] .board { --gap: 5px; --pad: 6px; --cell: calc((100% - 2 * var(--pad) - 3 * var(--gap)) / 4); border: none; border-radius: 12px; box-shadow: none; transform: none; transform-style: flat; background: color-mix(in srgb, var(--paper) 78%, var(--edge)); }
body[data-ui='clean'][data-theme] .grid > div { background: color-mix(in srgb, var(--paper) 90%, var(--edge)); box-shadow: none; border: none; border-radius: 7px; }
body[data-ui='clean'][data-theme] .tile-inner { border: none; border-radius: 7px; background: var(--card); box-shadow: none; transform: none; }
body[data-ui='clean'][data-theme] .tile .world-sprite { position: absolute; width: 94%; height: 77%; top: 0; margin: 0; object-fit: contain; pointer-events: none; transform-origin: center 80%; }
body[data-ui='clean'] .tile-label { display: none; }
body[data-ui='clean'] .tile-value { display: flex; align-items: center; justify-content: center; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); height: 19px; min-width: 33px; padding: 0 4px; border-radius: 3px; background: color-mix(in srgb, var(--paper) 88%, var(--edge)); color: var(--ink); font: 600 15px/1 Arial, sans-serif; letter-spacing: -.2px; font-variant-numeric: tabular-nums; }
body[data-ui='clean'] .tile.is-highest .tile-inner { background: color-mix(in srgb, var(--card) 90%, #dbb74f); }
body[data-ui='clean'] .tile.is-highest .tile-value { background: color-mix(in srgb, var(--paper) 77%, #c5a13d); }
body[data-ui='clean'] .tile.merge::after { display: none; }
body[data-ui='clean'] .play-hint { display: flex; align-items: center; justify-content: center; height: 43px; text-align: center; font-size: 11px; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); }
body[data-ui='clean'] .play-hint.is-hidden { visibility: hidden; }
body[data-ui='clean'] .clean-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
body[data-ui='clean'] :is(#clean-undo, #clean-sound) { flex: 0 0 54px; }
body[data-ui='clean'] :is(#undo, #sound) { width: 54px; height: 49px; border: 0; border-radius: 9px; background: transparent; color: color-mix(in srgb, var(--ink) 73%, var(--paper)); padding: 0 5px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; font-size: 0; box-shadow: none; transform: none; }
body[data-ui='clean'] #undo span { font-size: 10px; }
body[data-ui='clean'] :is(#undo, #sound)::before, .concert-button::before { content: ''; display: block; width: 18px; height: 18px; background: currentColor; mask: var(--control-icon) center / contain no-repeat; -webkit-mask: var(--control-icon) center / contain no-repeat; }
body[data-ui='clean'] #undo { --control-icon: url('assets/ui/undo.svg'); }
body[data-ui='clean'] #sound { --control-icon: url('assets/ui/sound.svg'); }
body[data-ui='clean'] #sound::after { content: 'Sound'; font-size: 10px; line-height: 1.3; }
body[data-ui='clean'] #sound[aria-pressed='false'] { --control-icon: url('assets/ui/muted.svg'); }
body[data-ui='clean'] #sound[aria-pressed='false']::after { content: 'Muted'; }
.concert-button { --control-icon: url('assets/ui/play.svg'); height: 44px; padding: 0 21px; border-radius: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; background: color-mix(in srgb, var(--paper) 90%, var(--edge)); border: 1px solid color-mix(in srgb, var(--paper) 58%, var(--edge)); color: var(--ink); font-size: 13px; line-height: 1.2; }
.concert-button::before { width: 17px; height: 17px; flex-shrink: 0; }
.concert-button.is-playing { --control-icon: url('assets/ui/stop.svg'); color: #8a422e; background: #efe1d5; border-color: #dfc6b8; }
#quick-guide { --control-icon: url('assets/ui/guide.svg'); }
body[data-ui='clean'] .discovery-toast { bottom: -34px; padding: 0; height: 22px; line-height: 22px; border: none; background: var(--paper); box-shadow: none; color: color-mix(in srgb, var(--ink) 70%, var(--paper)); font-size: 11px; }
body[data-ui='clean'] .discovery-toast.show + .overlay { z-index: 10; }
body[data-ui='clean'] .overlay { inset: 0; border: none; border-radius: 12px; box-shadow: none; }
body[data-ui='clean'] .overlay > span { display: none; }
body[data-ui='clean'] #challenge-banner { margin-top: 24px; border-radius: 10px; padding: 10px 12px; font-size: 12px; }
body[data-ui='clean'] #challenge-progress { margin: 0 0 8px; }
body[data-ui='clean'] dialog { border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 18px 70px #29251c22; max-height: min(90dvh, 900px); }
body[data-ui='clean'] dialog::backdrop { background: #24272055; backdrop-filter: blur(4px); }
body[data-ui='clean'] dialog .eyebrow { letter-spacing: 1px; font-size: 10px; }
body[data-ui='clean'] dialog h2 { font-weight: 650; font-size: 22px; letter-spacing: -.4px; }
body[data-ui='clean'] dialog .icon-button { min-width: 42px; min-height: 42px; justify-content: center; border: none; background: transparent; }
.game-menu { width: 384px; padding: 23px; }
.menu-heading { display: flex; align-items: center; justify-content: space-between; }
.menu-heading h2 { margin: 6px 0 0; }
.menu-heading .icon-button { padding: 9px; }
.menu-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 22px 0 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); color: color-mix(in srgb, var(--ink) 70%, var(--paper)); font-size: 12px; }
.menu-summary strong { margin-left: 4px; color: var(--ink); font: 600 16px/1.2 Arial, sans-serif; }
.menu-options { display: grid; }
.menu-options button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 49px; padding: 10px 1px; border: none; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; font-size: 14px; }
.menu-options button img { width: 19px; height: 19px; opacity: .68; }
.menu-options button small { margin-left: auto; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); font-size: 11px; }
.concert-rule { font-size: 11px; line-height: 1.7; margin: 17px 0 0; }
.interface-link { display: block; margin: 13px auto 0; border: none; background: transparent; color: color-mix(in srgb, var(--ink) 65%, var(--paper)); min-height: 44px; padding: 8px; font-size: 11px; }
body[data-ui='clean'] .world-card { min-width: 0; }
body[data-ui='clean'] .world-card-art { height: 78px; }
.nature-raster { width: 100%; height: 100%; object-fit: contain; }
.world-card-art .nature-raster { width: 32%; height: 72px; object-fit: contain; }
#current-theme-preview .nature-raster { width: 46px; height: 46px; }
.guide-item .sculpture-sprite { width: 62px; height: 67px; object-fit: contain; }
.guide-detail-icon .sculpture-sprite { width: 100%; height: 100%; object-fit: contain; margin: 0; }
.snapshot-board > div { position: relative; }
.snapshot-board .sculpture-sprite { width: 86%; height: 84%; object-fit: contain; margin: 0; }
.snapshot-value { display: block; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); color: var(--ink); background: color-mix(in srgb, var(--paper) 90%, var(--edge)); border-radius: 3px; padding: 1px 4px; font: 600 11px/1.15 Arial, sans-serif; }
body[data-theme='orchestra'] .tile-inner { background: #fbfaf6; }
body[data-theme='orchestra'] .tile-value { display: flex; }
body[data-theme='orchestra'] .tile-label { display: none; }
body[data-theme='orchestra'][data-ui='clean'] .board { background: #e9e5da; }
body[data-theme='orchestra'][data-ui='clean'] .grid > div { background: #efede5; }
body[data-theme='orchestra'][data-ui='clean'] .tile-value { background: #efede5; color: #3d4039; }
body[data-theme='orchestra'][data-ui='clean'] .tile.is-highest .tile-inner { background: #f8efd6; }
body[data-theme='orchestra'][data-ui='clean'] .tile.is-highest .tile-value { background: #ecdfb7; color: #5f4a1d; }
body[data-theme='orchestra'] .tile.merge .tile-inner { animation: none; }
body[data-theme='orchestra'] .tile.merge .world-sprite { animation: sculpture-merge 440ms cubic-bezier(.2,.7,.3,1); }
body[data-theme='orchestra'] .tile.merge::after { display: none; }
body[data-theme='orchestra'] .tile.is-sounding .tile-inner { background: #f4e4bb; transition: background 160ms; }
body[data-theme='orchestra'] .tile.is-sounding .world-sprite { transform: translateY(-3px) rotate(-3deg); transition: transform 180ms ease-out; }
body[data-theme='orchestra'] .tile.is-lead { z-index: 4; }
body[data-theme='orchestra'] .tile.is-lead .world-sprite { transform: translateY(-5px) scale(1.12); }
body[data-ui='classic'][data-theme='orchestra'] .tile-value { position: absolute; bottom: 2px; padding: 1px 5px; border-radius: 3px; background: #efede5; color: #3d4039; font: 600 13px/1.2 Arial, sans-serif; }
@keyframes sculpture-merge { 0% { transform: scale(.84); } 45% { transform: translateY(-3px) scale(1.11); } 100% { transform: scale(1); } }
@media (max-width: 520px) {
  body[data-ui='clean'] main { margin-top: calc(34px + env(safe-area-inset-top, 0px)); padding: 0 19px; margin-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
  body[data-ui='clean'] .hud { margin-bottom: 27px; }
  body[data-ui='clean'] .world-picker, body[data-ui='clean'] .field-guide { padding: 21px 17px; }
  body[data-ui='clean'] #guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body[data-ui='clean'] .social-dialog { padding: 0; }
  body[data-ui='clean'] .social-top { padding: 22px 21px 15px; }
  body[data-ui='clean'] .social-content { padding: 18px 21px 24px; }
}
@media (max-width: 350px) {
  body[data-ui='clean'] main { padding: 0 13px; }
  body[data-ui='clean'][data-theme] h1 { font-size: 22px; }
  body[data-ui='clean'] .tile-value { font-size: 13px; height: 17px; bottom: 3px; }
  body[data-ui='clean'] .concert-button { padding: 0 15px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  body[data-theme='orchestra'] .tile .world-sprite, body[data-ui='clean'] .tile, body[data-ui='clean'] .tile-inner { animation: none !important; transition: none !important; }
  body[data-theme='orchestra'] .tile.is-sounding .world-sprite, body[data-theme='orchestra'] .tile.is-lead .world-sprite { transform: none; }
}
