@import url('/src/design/tokens.css');
:root{--play-shell-bg:var(--ui-shell);--play-shell-bottom:var(--ui-safe-bottom)}

#app,.sheet{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}input,textarea{-webkit-user-select:text;user-select:text}img,svg{-webkit-user-drag:none}
*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overscroll-behavior:none;background:var(--play-shell-bg)}body{color:var(--color-ink);font:15px/1.5 var(--font-ui)}button,a,summary{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;touch-action:manipulation}button:disabled{opacity:.42;cursor:default}button:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--ui-focus);outline-offset:3px}[hidden]{display:none!important}#app{height:100svh;max-width:520px;margin:auto;background:var(--play-shell-bg);position:relative;overflow:hidden}.cover{height:100%;background:url('/public/assets/brand/title-keyboard-v2.png') center/cover no-repeat;position:relative}.cover-content{position:absolute;top:max(7%,env(safe-area-inset-top));left:24px;right:24px;display:flex;flex-direction:column;align-items:center}.cover img{width:76px;mix-blend-mode:darken}.cover h1{font-size:30px;letter-spacing:-1.5px;margin:3px 0 24px;line-height:1.2}.cover .primary{min-width:145px}.cover .primary span{margin-left:32px}.stage{height:100%;display:flex;flex-direction:column;padding:calc(12px + env(safe-area-inset-top)) 18px 0}.topbar{display:flex;align-items:center;gap:7px;flex-shrink:0}.topbar img{width:30px;mix-blend-mode:darken}.topbar strong{font-size:13px;letter-spacing:-.25px;margin-right:auto}.icon-button{border:0;background:transparent;color:var(--ui-muted);min-width:44px;min-height:44px;padding:4px;font-size:11px}.heading{text-align:center;padding:16px 0 8px;flex-shrink:0}.eyebrow{font-size:10px;letter-spacing:.16em;font-weight:650;color:var(--ui-muted)}.heading h2{font-size:26px;letter-spacing:-1px;margin:5px 0 4px;line-height:1.15}.heading p{font-size:12px;color:var(--ui-muted);margin:0}.board-space{position:relative;flex:1;min-height:85px;display:flex;align-items:center;justify-content:center;margin:10px 0 16px}.board-surface{position:relative;touch-action:none;user-select:none;flex-shrink:0}canvas{width:100%;height:100%;display:block;pointer-events:none}.board-cell{position:absolute;border:0;background:transparent;padding:0;touch-action:none;border-radius:11px}.board-cell:focus-visible{outline-offset:-3px}.progress-area{padding:0 3px 12px;flex-shrink:0}.progress-area>div{display:flex;justify-content:space-between;font-size:11px;color:var(--ui-muted)}.progress-area b{font-weight:600;font-variant-numeric:tabular-nums}progress{appearance:none;width:100%;height:4px;border:0;display:block;margin-top:8px;accent-color:var(--ui-progress-end);border-radius:4px;overflow:hidden}progress::-webkit-progress-bar{background:var(--ui-border)}progress::-webkit-progress-value{background:var(--ui-progress-end)}progress::-moz-progress-bar{background:var(--ui-progress-end)}.placement{padding:3px 0 8px;flex-shrink:0}.art{background-image:url('/public/assets/keycaps/conservatory-studies-v2.png');background-size:300% 200%;border-radius:12px;aspect-ratio:1}.art.chalk{background:linear-gradient(145deg,var(--ui-surface),var(--ui-preview-empty));border:1px solid var(--ui-border-strong);box-shadow:0 4px 0 var(--ui-border-strong),inset 1px 1px 2px var(--ui-highlight)}.play-actions{display:flex;gap:12px;padding:8px 0 12px;flex-shrink:0}.play-actions .primary{flex:1}.play-actions .primary span{display:block;font-size:10px;font-weight:400;opacity:.72;margin-top:1px}.notice{height:23px;flex-shrink:0;font-size:10px;text-align:center;color:var(--ui-muted);overflow:hidden}.ad{flex-shrink:0;height:calc(50px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:var(--play-shell-bottom);border-top:1px solid var(--ui-border);margin:0 -18px;display:flex;align-items:center;justify-content:center;color:var(--ui-subtle);letter-spacing:.17em;font-size:8px}.sheet{border:1px solid var(--ui-border);background:var(--ui-sheet);color:var(--ui-text);border-radius:26px;padding:27px;max-width:440px;width:calc(100% - 24px);max-height:calc(100svh - 80px);overflow:auto;text-align:center;box-shadow:0 25px 70px var(--ui-shadow-strong)}.sheet::backdrop{background:var(--ui-backdrop);backdrop-filter:blur(4px)}.sheet h2{font-size:25px;letter-spacing:-.9px;margin:8px 0 18px;line-height:1.2}.sheet>p:not(.eyebrow){font-size:13px;color:var(--ui-muted)}.sheet .primary{display:block;width:100%;margin-top:20px}.sheet .secondary{margin-top:18px;min-width:140px}.sheet details{text-align:left;font-size:12px;margin:20px 0;border-block:1px solid var(--ui-border);padding:12px 0}.sheet summary{cursor:pointer;min-height:28px}.sheet li{margin:4px 0}.text-link{display:block;padding:12px;color:var(--ui-muted);font-size:12px}.sheet .fine{font-size:11px!important}.sheet-grip{width:32px;height:4px;border-radius:4px;background:var(--ui-border-strong);margin:-13px auto 20px}.reel-window{position:relative;overflow:hidden;height:180px;margin:20px -27px;background:var(--ui-soft-fill)}.reel{display:flex;gap:12px;height:100%;align-items:center;width:max-content;will-change:transform}.reel .reel-card{width:136px;flex:0 0 136px}.reel .art{width:136px}.reel-marker{position:absolute;inset:8px calc(50% - 73px);border:1.5px solid var(--ui-focus);border-radius:17px;pointer-events:none}.reel-marker:before{content:'';position:absolute;top:-8px;left:calc(50% - 4px);border-left:5px solid transparent;border-right:5px solid transparent;border-top:7px solid var(--ui-focus)}.gacha #result h3{font-size:24px;letter-spacing:-.8px;margin:5px 0}.gacha #result p{font-size:12px;color:var(--ui-muted);margin:4px}.gacha #result{min-height:77px}
@media(min-width:600px){#app{box-shadow:0 0 70px var(--ui-shadow)}.heading{padding-top:24px}.cover-content{top:8%}}@media(max-height:650px){.stage{padding-top:5px}.heading{padding:5px 0 0}.heading h2{font-size:22px}.heading .eyebrow{display:none}.board-space{margin:7px 0 11px}.notice{height:18px}.placement{padding-bottom:4px}.topbar{height:40px}.play-actions{padding:4px 0 8px}}@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important}}
/* Play surface: compact status, a physical board, and a thumb-reachable dock. */
.stage{padding:calc(10px + env(safe-area-inset-top)) 16px 0;background:var(--theme-background,none) center/cover no-repeat,var(--ui-stage-gradient)}
.topbar{gap:5px;height:48px}.app-brand{display:flex;align-items:center;gap:5px;margin-right:auto}.app-brand strong{font-size:12px;letter-spacing:.03em}.app-brand img{width:28px}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
.icon-button{display:grid;place-items:center;width:40px;min-width:40px;height:44px;color:var(--ui-icon)}.icon-button circle{fill:var(--ui-stage-bottom)}.sound-slash{display:none}#sound[aria-pressed=true] .sound-slash{display:block}#sound[aria-pressed=true] .sound-waves{display:none}
.ticket-balance{display:flex;align-items:center;gap:7px;padding:5px 10px;background:var(--ui-soft-fill);border-radius:20px;font-size:13px;font-variant-numeric:tabular-nums}.ticket-balance svg{width:18px;height:18px}
.heading{padding:12px 0 0;text-align:left;position:relative}.heading .eyebrow{display:none}.heading h2{font-size:17px;letter-spacing:-.35px;margin:0 0 3px}.heading p{font-size:11px;line-height:1.4;min-height:16px}
.board-space{margin:12px 0 18px}.board-surface{filter:drop-shadow(0 10px 12px var(--ui-board-shadow))}
.control-dock{flex-shrink:0;margin:0 -16px;padding:15px 16px 5px;border-radius:26px 26px 0 0;background:var(--ui-sheet);box-shadow:0 -1px 0 var(--ui-highlight),0 -8px 30px var(--ui-shadow-soft)}
.progress-area{padding:0 2px 9px}.progress-area>div{font-size:10px}progress{height:5px;margin-top:7px}
.play-actions{gap:10px;padding:5px 0 8px}.play-actions .secondary{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-width:80px;font-size:10px;padding:7px 14px}.play-actions .primary{font-size:14px}.play-actions .primary span{font-size:10px}
.placement{padding:0 0 5px}
.art{background:none!important;box-shadow:none!important;border:0!important;aspect-ratio:1;height:auto}.reel .art{height:136px}.notice{height:20px;font-size:10px;line-height:20px}.ad{margin:0 -16px;background:var(--ui-ad-surface);border-color:var(--ui-border)}
.sheet{position:fixed;inset:auto 0 0;margin:0 auto;width:100%;max-width:520px;border:0;border-radius:28px 28px 0 0;padding:27px 24px calc(24px + env(safe-area-inset-bottom));max-height:calc(100svh - 44px);background:var(--ui-sheet);box-shadow:0 -12px 50px var(--ui-shadow)}.sheet h2{font-size:22px}.sheet-grip{margin:-15px auto 20px}.reel-window{margin-inline:-24px}.volume-control{padding:16px;border-radius:18px;background:var(--ui-soft-fill);margin-bottom:20px;text-align:left}.volume-control label{display:flex;justify-content:space-between;font-size:13px;font-weight:600}.volume-control input{width:100%;height:44px;accent-color:var(--ui-action);cursor:pointer}.volume-control .secondary{min-height:44px;margin:0;padding:7px 14px;font-size:12px}.volume-control p:empty{display:none}
@media(max-height:650px){.stage{padding-top:env(safe-area-inset-top)}.topbar{height:44px}.heading{padding:5px 0 0}.heading h2{font-size:15px}.board-space{margin:8px 0 12px}.control-dock{padding-top:10px}.notice{height:17px;line-height:17px}.play-actions{padding:3px 0 6px}}
/* Boards and collection remain compact, in-app sheets. */
.board-picker{position:absolute;right:0;top:8px;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-sheet);padding:8px 11px;color:var(--ui-icon);font-size:12px;min-height:38px}.heading h2{padding-right:100px}.heading p{padding-top:4px}.play-actions .secondary{min-width:64px;padding-inline:9px}.play-actions .primary{padding-inline:8px}.play-actions{gap:8px}
.sheet-top{display:flex;align-items:center;justify-content:space-between;margin-top:-6px}.sheet-top h2{margin:0}.sheet-top .icon-button{font-size:18px}.level-summary{background:var(--ui-soft-fill);border-radius:16px;padding:13px 15px;text-align:left;margin:14px 0}.level-summary strong,.level-summary span{display:block;font-size:12px}.level-summary span{font-size:11px;color:var(--ui-muted);margin-top:4px}.level-summary small{display:block;font-size:9px;color:var(--ui-muted);margin-top:7px}.board-list{display:flex;gap:8px;overflow-x:auto;padding:3px 2px 8px;scrollbar-width:thin}.board-option{border:1px solid var(--ui-border);border-radius:14px;background:var(--ui-soft-fill);padding:12px 14px;flex:0 0 auto;text-align:left;color:var(--ui-text)}.board-option strong,.board-option span{display:block;font-size:12px}.board-option span{font-size:10px;margin-top:3px;color:var(--ui-muted)}.board-option[aria-pressed=true]{border-color:var(--ui-focus);box-shadow:0 0 0 1px var(--ui-focus)}.editor-top{display:flex;align-items:center;justify-content:space-between;gap:10px}.editor-top h3{font-size:14px}.subtle{background:none;border:0;color:var(--ui-icon);font:inherit;font-size:12px;padding:10px;min-height:40px}.size-controls{display:flex;align-items:end;justify-content:center;gap:16px}.size-controls>span{padding-bottom:10px;color:var(--ui-subtle)}.size-controls label{text-align:left;flex:1}.size-preview{display:grid;gap:2px;height:70px;margin:14px auto 10px;max-width:140px}.size-preview i{background:var(--ui-preview-empty);border-radius:2px}.board-editor .primary{margin-top:10px}.board-editor .fine{min-height:30px;line-height:1.5;color:var(--ui-muted)}.collection-filters{display:flex;gap:6px;overflow-x:auto;margin:12px 0 4px;padding:2px}.collection-summary{display:flex;justify-content:space-between;margin:20px 0 0;font-size:13px}.collection-summary span{font-variant-numeric:tabular-nums}.collection-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px 8px;margin:18px 0}.collection-cap{min-width:0}.mood-title{text-align:left;font-size:14px;margin:24px 0 10px}.theme-list{display:grid;gap:8px}

@media(max-height:650px){.board-picker{top:0;min-height:34px;padding:5px 10px}.board-editor .size-preview{height:45px}.level-summary{margin:8px 0}.sheet .board-editor .primary{margin-top:6px}}
/* Board camera: clipped play area, separate movement mode, fixed thumb controls. */
/* The camera clips only while zoomed in; at rest the plate's drop shadow may fall past the edge. */
.board-space{overflow:visible;touch-action:none;margin-bottom:4px;isolation:isolate}.board-space[data-zoomed=true]{overflow:clip}
.board-surface{position:absolute;left:0;top:0}
.board-space[data-moving=true],.board-space[data-moving=true] .board-cell{cursor:grab}
.board-space[data-moving=true]:active,.board-space[data-moving=true]:active .board-cell{cursor:grabbing}
.board-space:focus-visible{outline:2px solid var(--ui-focus);outline-offset:0;border-radius:14px}
.board-tools{display:flex;align-items:center;justify-content:center;gap:4px;flex-shrink:0}
.board-tools button{min-width:44px;height:44px;padding:0 10px;border:0;border-radius:13px;background:var(--ui-soft-fill);color:var(--ui-icon);font-size:12px;font-weight:600;touch-action:manipulation}
.board-tools #zoom-in,.board-tools #zoom-out{font-size:22px;font-weight:400}
.board-tools #move-board{min-width:94px;margin-left:3px}
.board-tools #move-board[aria-pressed=true]{background:var(--ui-selection);color:var(--ui-selection-ink)}
#zoom-level{width:40px;text-align:center;font-size:10px;color:var(--ui-muted);font-variant-numeric:tabular-nums}
.view-hint{flex-shrink:0;text-align:center;margin:4px 0 8px;font-size:10px;line-height:14px;color:var(--ui-muted)}


@media(max-height:650px){.view-hint{margin:2px 0 5px}}
.share-preview{display:block;width:auto;max-width:100%;height:180px;border-radius:12px;margin:12px auto}
.share-actions{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.share-actions .primary,.share-actions .secondary{margin:0;min-width:0;display:grid;place-items:center;font-size:12px;text-decoration:none}
.share-actions .primary{grid-column:1/-1}
.share-url-label{display:block;text-align:left;font-size:10px;color:var(--ui-muted)}
.share-url-label input{display:block;width:100%;margin-top:5px;border:1px solid var(--ui-border);border-radius:10px;background:var(--ui-soft-fill);padding:10px;font-size:12px;color:var(--ui-muted);min-height:44px}
.guest-stage .heading h2{padding-right:0}.guest-dock>.primary{display:block;width:100%;text-align:center;text-decoration:none}
body[data-theme=metal-workbench-v1] .guest-stage :is(.topbar,.topbar .app-brand,.topbar .subtle,.heading,.heading p){color:var(--ui-on-art);text-shadow:0 1px 4px var(--ui-art-shadow)}
body[data-theme=metal-workbench-v1] .guest-dock .text-link{color:var(--ui-on-art);text-shadow:0 1px 4px var(--ui-art-shadow)}
.guest-dock .text-link{padding:14px}.guest-dock{padding-bottom:8px}
@media(max-height:650px){.share-preview{height:120px}}
.install-card{padding:16px;border-radius:18px;background:var(--ui-soft-fill);text-align:left;margin-bottom:8px}.install-card>strong{display:block;font-size:13px}.install-card>p{font-size:11px;color:var(--ui-muted);margin:5px 0 0}.install-card>.secondary{width:100%;margin:12px 0 0;min-height:44px;padding:7px 14px}.install-card details{margin:10px 0 0;padding:8px 0 0;border-block:1px solid var(--ui-border);border-bottom:0}.install-card details p{margin-bottom:0;color:var(--ui-muted)}

