/* 9000/Spot: the canvas takes the stage; controls stay close to your hand. */
.spot-game{--spot-ink:#fff4e8;--spot-muted:#bbb2c9;--spot-bg:#201b30;--spot-card:#2c263e;--spot-line:#ffffff24;--spot-accent:#ff946d;--spot-mint:#83dec9;color:var(--spot-ink);max-width:1360px;margin:0 auto 2rem;font-family:inherit}
.spot-game *{box-sizing:border-box}.spot-game [hidden]{display:none!important}.spot-game button,.spot-game input,.spot-game a{font:inherit}.spot-game button,.spot-game a{touch-action:manipulation}.spot-game button{cursor:pointer;box-shadow:none;text-shadow:none}.spot-game button:disabled{cursor:not-allowed;opacity:.5}.spot-game :is(button,a,input,[tabindex]):focus-visible{outline:3px solid var(--spot-mint);outline-offset:3px}.spot-game svg{width:22px;height:22px;flex-shrink:0}.spot-game h1,.spot-game h2,.spot-game h3,.spot-game p{margin:0}.spot-game canvas{display:block;image-rendering:pixelated}.spot-header{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.spot-brand{display:flex;align-items:center;gap:1rem}.spot-brand h1{font-size:clamp(1.55rem,3vw,2.3rem);font-weight:850;letter-spacing:-.075em;line-height:1.1}.spot-brand h1 span{color:var(--spot-accent);margin:0 .09em}.spot-brand p{font-size:.8rem;color:var(--spot-muted);margin-top:.3rem}.spot-brand-mark{display:grid;grid-template-columns:repeat(2,16px);gap:4px;transform:rotate(-6deg)}.spot-brand-mark i{display:block;width:16px;height:16px;background:var(--spot-accent);border-radius:3px}.spot-brand-mark i:nth-child(2){background:var(--spot-mint)}.spot-brand-mark i:nth-child(3){background:#b29aff}.spot-brand-mark i:nth-child(4){background:#f6d777}.spot-header-actions{display:flex;align-items:center;gap:.75rem}.spot-balance{display:flex;align-items:center;gap:.6rem;text-align:left;min-height:48px;padding:.4rem .7rem;background:var(--spot-bg);border:1px solid var(--spot-line);border-radius:12px;color:var(--spot-ink)}.spot-balance svg{color:var(--spot-mint)}.spot-balance strong,.spot-balance small{display:block}.spot-balance strong{font-size:.9rem}.spot-balance small{font-size:.67rem;color:var(--spot-muted);margin-top:2px}.spot-button{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;padding:.7rem 1rem;min-height:44px;border:1px solid transparent;border-radius:12px;font-size:.85rem;font-weight:750;text-align:center;text-decoration:none;line-height:1.4}.spot-game .spot-primary{color:#231b26!important;background:var(--spot-accent)!important;border-color:var(--spot-accent)!important}.spot-secondary{background:var(--spot-card);border-color:var(--spot-line);color:var(--spot-ink)}.spot-wide{width:100%;margin-top:1rem}.spot-board-shell{position:relative;display:grid;grid-template-rows:auto minmax(0,1fr) auto;height:min(72svh,780px);min-height:360px;border:1px solid #9d83c866;border-radius:20px;overflow:hidden;background:#181422;box-shadow:0 8px 0 #100d1899,0 18px 50px #0003}.spot-toolbar,.spot-board-footer{display:flex;align-items:center;justify-content:space-between;gap:1rem;z-index:2;padding:.55rem .8rem;background:var(--spot-bg)}.spot-toolbar{border-bottom:1px solid var(--spot-line)}.spot-board-footer{border-top:1px solid var(--spot-line);min-height:52px}.spot-brush{display:flex;align-items:center;gap:.65rem;border:0;border-radius:10px;padding:.25rem .5rem .25rem .25rem;background:transparent;color:var(--spot-ink);text-align:left}.spot-brush>canvas{width:36px;height:36px;border-radius:6px;outline:1px solid #ffffff36}.spot-brush>span{min-width:115px}.spot-brush strong,.spot-brush small{display:block}.spot-brush strong{font-size:.8rem}.spot-brush small{font-size:.7rem;color:var(--spot-muted);margin-top:3px}.spot-brush>svg{width:19px;color:var(--spot-accent)}.spot-tool-group,.spot-zoom{display:flex;align-items:center;gap:.35rem}.spot-icon-button{display:inline-grid;place-items:center;width:40px;height:40px;padding:0;border:1px solid var(--spot-line);border-radius:10px;background:var(--spot-card);color:var(--spot-ink);font-size:1.5rem;line-height:1}.spot-zoom-value{padding:.3rem .5rem;min-width:64px;min-height:40px;border:0;background:transparent;color:var(--spot-ink);font-size:.77rem;font-variant-numeric:tabular-nums}.spot-viewport{position:relative;overflow:hidden;touch-action:none;cursor:crosshair;background:#181422;outline-offset:-3px!important}.spot-viewport.is-dragging{cursor:grabbing}.spot-viewport>canvas{width:100%;height:100%}.spot-board-loading{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);padding:.7rem 1rem;border-radius:10px;background:#201b30eb;color:var(--spot-ink);font-size:.8rem;pointer-events:none}.spot-board-location{font-size:.75rem;font-variant-numeric:tabular-nums;color:var(--spot-muted)}.spot-pause-banner{position:absolute;top:78px;left:50%;transform:translateX(-50%);width:max-content;max-width:85%;padding:.6rem 1rem;border-radius:10px;background:#f6d777;color:#352b19;font-size:.78rem;z-index:3;text-align:center;pointer-events:none}.spot-footnote{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:1rem;font-size:.72rem;color:var(--spot-muted);line-height:1.5}.spot-sync{white-space:nowrap}.spot-sync:before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--spot-mint);margin-right:6px}.spot-sync.is-offline:before{background:#f6d777}.spot-notice{padding:.8rem 1rem;margin-top:.75rem!important;background:var(--spot-card);border:1px solid var(--spot-line);border-radius:12px;font-size:.85rem;line-height:1.5}.spot-notice.is-error{border-color:#f28d9c}
.spot-dialog{--spot-ink:#fff4e8;--spot-muted:#bbb2c9;--spot-bg:#201b30;--spot-card:#2c263e;--spot-line:#ffffff24;--spot-accent:#ff946d;--spot-mint:#83dec9;color:var(--spot-ink);background:var(--spot-bg);width:min(520px,calc(100vw - 24px));max-height:calc(100dvh - 32px);padding:1.35rem;border:1px solid #9d83c880;border-radius:20px;box-shadow:0 25px 100px #0009;overflow:auto;overscroll-behavior:contain}.spot-dialog::backdrop{background:#0c0916c9;backdrop-filter:blur(4px)}.spot-dialog[open]{animation:spot-appear .16s ease-out}.spot-dialog-head{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1rem}.spot-dialog h2{font-size:1.5rem;letter-spacing:-.045em;line-height:1.2}.spot-dialog h3{font-size:.92rem;margin:1.1rem 0 .6rem}.spot-dialog p{font-size:.87rem;line-height:1.65;color:var(--spot-muted)}.spot-dialog .spot-eyebrow{font-size:.66rem;letter-spacing:.07em;text-transform:uppercase;color:var(--spot-accent);font-weight:750;margin-bottom:.3rem}.spot-dialog label{display:grid;gap:.4rem;font-size:.77rem;font-weight:650}.spot-dialog input:not([type=hidden]){min-width:0;width:100%;border:1px solid var(--spot-line);border-radius:10px;padding:.65rem;background:#161220;color:var(--spot-ink);min-height:44px;font-size:1rem}.spot-dialog input[type=color]{padding:3px;width:100%;height:45px;cursor:pointer}.spot-dialog-note{display:block;margin-top:.8rem!important;font-size:.74rem!important;line-height:1.6!important;color:var(--spot-muted)}.spot-color-row{display:grid;grid-template-columns:1fr 1fr;gap:.75rem;margin:1rem 0}.spot-brush-preview{display:flex;align-items:center;gap:1.25rem;padding:1rem;background:#181422;border:1px solid var(--spot-line);border-radius:14px}.spot-brush-preview canvas{width:84px;height:84px;flex-shrink:0;border-radius:9px;outline:1px solid var(--spot-line)}.spot-brush-preview strong{font-size:.95rem}.spot-brush-preview p{font-size:.78rem;margin-top:.3rem}.spot-palette{display:grid;grid-template-columns:repeat(10,1fr);gap:5px}.spot-palette button{aspect-ratio:1;min-width:0;min-height:28px;border:2px solid #ffffff40;border-radius:7px;padding:0}.spot-palette button[aria-pressed=true]{outline:2px solid var(--spot-ink);outline-offset:2px}.spot-patterns{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:.45rem}.spot-pattern-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.3rem;min-width:0;padding:.5rem .2rem;border:1px solid var(--spot-line);border-radius:10px;background:var(--spot-card);color:var(--spot-ink);font-size:.66rem;line-height:1.2}.spot-pattern-choice canvas{width:36px;height:36px;border-radius:5px}.spot-pattern-choice[aria-pressed=true]{border-color:var(--spot-accent);box-shadow:inset 0 0 0 1px var(--spot-accent)}.spot-pattern-choice small{font-size:.59rem;color:var(--spot-muted)}.spot-pattern-choice.is-locked{opacity:.55}.spot-placement-preview{display:flex;align-items:center;justify-content:center;gap:1.25rem;padding:1rem 0}.spot-placement-preview canvas{width:90px;height:90px;border:1px solid var(--spot-line);border-radius:10px}.spot-placement-preview small{display:block;margin-top:.5rem;text-align:center;color:var(--spot-muted);font-size:.7rem}.spot-placement-preview>span{color:var(--spot-accent);font-size:1.6rem}.spot-place-actions,.spot-dialog-actions{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1rem}.spot-place-actions>*{flex:1}.spot-inline-error{padding:.7rem;margin-top:.75rem!important;background:#66374666;border:1px solid #f28d9c77;color:#ffd9df!important;border-radius:10px;font-size:.8rem!important}.spot-wallet-cards{display:grid;grid-template-columns:1fr 1fr;gap:.65rem;margin:.75rem 0 1rem}.spot-wallet-cards>div{display:grid;gap:.5rem;padding:1rem;background:var(--spot-card);border:1px solid var(--spot-line);border-radius:14px}.spot-wallet-cards strong{font-size:2rem;line-height:1.1;color:var(--spot-mint)}.spot-wallet-cards span,.spot-wallet-cards small{font-size:.72rem;color:var(--spot-muted)}.spot-quantity-label{margin-top:1rem}.spot-packs{display:grid;grid-template-columns:repeat(4,1fr);gap:.5rem;margin:.8rem 0}.spot-packs button{display:grid;gap:.3rem;min-height:54px;padding:.5rem .3rem;border:1px solid var(--spot-line);border-radius:10px;background:var(--spot-card);color:var(--spot-ink);font-size:.85rem}.spot-packs small{font-size:.62rem;color:var(--spot-mint)}.spot-price{display:flex;align-items:center;justify-content:space-between;gap:.7rem;padding:1rem 0;border-top:1px solid var(--spot-line);border-bottom:1px solid var(--spot-line)}.spot-price span,.spot-price small{display:block;font-size:.78rem}.spot-price small{color:var(--spot-mint);margin-top:.35rem}.spot-price strong{font-size:1.6rem;letter-spacing:-.04em;white-space:nowrap}.spot-help-steps{display:grid;gap:1rem;padding-left:1.3rem;margin:1rem 0}.spot-help-steps li{padding-left:.2rem;font-size:.9rem}.spot-help-steps p{margin-top:.3rem}.spot-board-shell.is-fullscreen{height:100dvh;width:100vw;min-height:0;border:0;border-radius:0;box-shadow:none}.spot-board-shell.is-fullscreen-fallback{position:fixed;inset:0;z-index:2147483647}.spot-board-shell.is-fullscreen .spot-toolbar,.spot-board-shell.is-fullscreen .spot-board-footer{padding-left:max(.8rem,env(safe-area-inset-left));padding-right:max(.8rem,env(safe-area-inset-right))}.spot-board-shell.is-fullscreen .spot-board-footer{padding-bottom:max(.55rem,env(safe-area-inset-bottom))}
@media(max-width:640px){.spot-header{align-items:flex-start}.spot-header-actions{gap:.4rem}.spot-header-actions>.spot-button{padding:.65rem}.spot-header-actions>.spot-button svg{display:none}.spot-brand{gap:.6rem}.spot-brand-mark{grid-template-columns:repeat(2,11px);gap:3px}.spot-brand-mark i{width:11px;height:11px;border-radius:2px}.spot-brand p{max-width:17ch;font-size:.68rem}.spot-balance{padding:.4rem .5rem}.spot-balance svg{display:none}.spot-balance small{max-width:110px;font-size:.6rem}.spot-board-shell{height:66svh;min-height:330px;border-radius:14px}.spot-toolbar{padding:.4rem;gap:.35rem}.spot-brush{gap:.4rem}.spot-brush>span{min-width:85px}.spot-brush>svg{display:none}.spot-tool-group{gap:.2rem}.spot-icon-button{width:36px;height:36px}.spot-footnote{align-items:flex-start;font-size:.64rem}.spot-footnote>span:first-child{max-width:31ch}.spot-dialog{padding:1rem}.spot-patterns{gap:.3rem}.spot-pattern-choice{font-size:.59rem}.spot-pattern-choice canvas{width:32px;height:32px}.spot-board-location{font-size:.64rem}.spot-board-footer{gap:.4rem;padding:.4rem}.spot-palette{grid-template-columns:repeat(10,1fr);gap:4px}.spot-palette button{min-height:24px;border-radius:5px}}
@keyframes spot-appear{from{opacity:.6;transform:translateY(7px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.spot-game *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

/* The three pixel actions stay together; secondary canvas controls sit below. */
.spot-game .spot-header{margin-bottom:.8rem}
.spot-game .spot-brand h1{font-size:clamp(1.45rem,2.5vw,1.9rem)}
.spot-game .spot-brand p{font-size:.75rem}
.spot-game .spot-toolbar{justify-content:flex-start;gap:.65rem;padding:.65rem .8rem}
.spot-game .spot-toolbar>.spot-brush,.spot-game .spot-toolbar>.spot-balance,.spot-game .spot-toolbar>.spot-buy-button{min-height:50px;margin:0;flex:0 0 auto}
.spot-game .spot-toolbar>.spot-brush{padding:.4rem .65rem;border:1px solid var(--spot-line);border-radius:12px;background:var(--spot-card)}
.spot-game .spot-toolbar>.spot-brush>span{min-width:86px}
.spot-game .spot-toolbar>.spot-brush>svg{display:none}
.spot-game .spot-toolbar>.spot-balance{min-width:124px;padding:.5rem .75rem;background:var(--spot-card)}
.spot-game .spot-toolbar>.spot-buy-button{padding:.6rem .85rem;font-size:.85rem}
.spot-game .spot-board-footer{gap:.75rem;padding:.6rem .8rem;flex-wrap:wrap}
.spot-game .spot-canvas-instruction{font-size:.78rem;line-height:1.5;color:var(--spot-ink);flex:1 1 230px}
.spot-game .spot-canvas-navigation{display:flex;align-items:center;gap:.75rem;flex:0 0 auto}
.spot-game .spot-overview-button{min-height:40px;padding:.45rem .75rem;border:1px solid var(--spot-line);border-radius:10px;background:var(--spot-card);color:var(--spot-ink);font-size:.76rem;line-height:1.3;white-space:nowrap}
.spot-game .spot-overview-button[aria-pressed=true]{border-color:var(--spot-mint);color:var(--spot-mint)}
.spot-game .spot-footnote{justify-content:flex-end;margin-top:.7rem;font-size:.67rem}
@media(max-width:640px){
 .spot-game .spot-toolbar{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr) minmax(0,.9fr);gap:.35rem;padding:.5rem}
 .spot-game .spot-toolbar>.spot-brush,.spot-game .spot-toolbar>.spot-balance,.spot-game .spot-toolbar>.spot-buy-button{min-width:0;width:100%;min-height:50px;border-radius:10px;padding:.35rem;justify-content:center}
 .spot-game .spot-toolbar>.spot-brush>span{min-width:0}
 .spot-game .spot-toolbar>.spot-brush>canvas{width:28px;height:28px}
 .spot-game .spot-toolbar>.spot-brush strong{font-size:.69rem}
 .spot-game .spot-toolbar>.spot-brush small{font-size:.6rem;max-width:72px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 .spot-game .spot-toolbar>.spot-balance svg,.spot-game .spot-toolbar>.spot-buy-button svg{display:none}
 .spot-game .spot-toolbar>.spot-balance strong{font-size:.77rem}
 .spot-game .spot-toolbar>.spot-balance small{font-size:.6rem}
 .spot-game .spot-toolbar>.spot-buy-button{font-size:.73rem}
 .spot-game .spot-board-footer{padding:.5rem;gap:.5rem}
 .spot-game .spot-canvas-instruction{flex-basis:100%;font-size:.7rem}
 .spot-game .spot-canvas-navigation{width:100%;justify-content:space-between;gap:.5rem}
 .spot-game .spot-overview-button{min-height:36px;padding:.4rem .65rem;font-size:.7rem}
 .spot-game .spot-board-shell{height:70svh;min-height:370px}
}

/* Let the shared canvas use the page, with no surrounding card frame. */
body.spot-game-page{width:calc(100% - 24px);max-width:none}
body.spot-game-page .spot-game{width:100%;max-width:none}
.spot-game .spot-board-shell{height:82svh;min-height:460px;border:0;border-radius:0;box-shadow:none}
.spot-game .spot-toolbar{padding-inline:.25rem;background:transparent;border-bottom:0}
.spot-game .spot-board-footer{padding-inline:.25rem;background:transparent;border-top:0}
.spot-game .spot-board-shell{background:transparent}
.spot-game .spot-board-shell.is-fullscreen{height:100dvh;min-height:0;background:var(--spot-bg)}
.spot-game .spot-board-shell.is-fullscreen .spot-toolbar,.spot-game .spot-board-shell.is-fullscreen .spot-board-footer{background:var(--spot-bg)}
@media(max-width:640px){body.spot-game-page{width:calc(100% - 12px)}.spot-game .spot-board-shell{height:82svh;min-height:400px}.spot-game .spot-board-shell.is-fullscreen{height:100dvh;min-height:0}}

/* Pixel history and searchable motifs keep the customizer small on touch screens. */
.spot-game .spot-palette{grid-template-columns:repeat(10,minmax(0,1fr));margin-bottom:.75rem}
.spot-game .spot-history-choice{overflow:hidden;background:transparent;min-width:0}
.spot-game .spot-history-choice canvas{width:100%;height:100%;border-radius:4px}
.spot-game .spot-history-choice.is-empty{border:1px dashed var(--spot-line);background:#ffffff04;opacity:1;cursor:default}
.spot-game .spot-pattern-search{margin-bottom:.65rem}
.spot-game .spot-patterns{max-height:240px;max-height:min(32svh,280px);overflow-y:scroll;overscroll-behavior:contain;scrollbar-gutter:stable;scrollbar-width:thin;scrollbar-color:var(--spot-accent) var(--spot-card);padding:3px 6px 3px 3px;align-content:start}
.spot-game .spot-patterns::-webkit-scrollbar{width:8px}
.spot-game .spot-patterns::-webkit-scrollbar-thumb{background:var(--spot-accent);border:2px solid var(--spot-card);border-radius:8px}
.spot-game .spot-patterns::-webkit-scrollbar-track{background:var(--spot-card);border-radius:8px}
.spot-game .spot-pattern-choice{min-height:88px}
.spot-game .spot-pattern-status:not(:empty){margin-top:.65rem;color:var(--spot-accent)}
.spot-game .spot-viewport{min-height:0;overscroll-behavior:none}
.spot-game .spot-board-shell{grid-template-rows:auto minmax(0,1fr) auto}
@media(max-width:640px){
 .spot-game .spot-dialog[data-spot-modal=brush]{padding:.8rem;max-height:calc(100svh - 20px)}
 .spot-game .spot-brush-preview{padding:.7rem;gap:.8rem}
 .spot-game .spot-brush-preview canvas{width:64px;height:64px}
 .spot-game .spot-color-row{gap:.5rem;margin:.75rem 0}
 .spot-game .spot-pattern-choice{min-height:82px}
 .spot-game .spot-patterns{grid-template-columns:repeat(4,minmax(0,1fr));max-height:28svh}
 .spot-game .spot-palette{grid-template-columns:repeat(10,minmax(0,1fr));gap:4px}
 .spot-game .spot-palette button{min-height:0}
}
