/* Piece by Piece: a quiet, photo-first interface with familiar native controls. */
:root,html:root{--paper:#f5f5f7;--surface:#fff;--ink:#1d1d1f;--muted:#6e6e73;--green:#007aff;--line:#dfe2e8;--soft:#eef1f5;--shadow:0 12px 38px #17223509;--accent-soft:#e8f2ff;--font:-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif}
html.dark:root{color-scheme:dark;--paper:#101114;--surface:#1c1e23;--ink:#f5f5f7;--muted:#a0a5af;--green:#409cff;--line:#333740;--soft:#292d35;--accent-soft:#173453;--shadow:0 16px 40px #0002}
html,body{touch-action:pan-x pan-y;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
body,.dark body{background:var(--paper);font-family:var(--font);font-size:15px;line-height:1.45;-webkit-font-smoothing:antialiased}
button,input,select,textarea{font-family:var(--font)}button,a{touch-action:manipulation}img{-webkit-user-drag:none;user-drag:none}
input,textarea,[contenteditable=true]{-webkit-user-select:text;user-select:text;-webkit-touch-callout:default;touch-action:pan-x pan-y}
button{border-radius:12px;font-weight:550;transition:background .2s,box-shadow .2s,transform .2s;color:var(--ink)}button:hover,.dark button:hover{background:var(--soft)}button:active{transform:scale(.98)}button:disabled{transform:none;opacity:.38}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid var(--green);outline-offset:4px}label:focus-within{outline:0}
h1,h2,h3,.brand,.difficulty b{font-family:var(--font);font-style:normal}h2,h3{font-weight:650;letter-spacing:-.6px}p{color:var(--muted)}
header{max-width:1280px;height:76px;padding:0 32px;margin:auto;border-bottom:1px solid var(--line);gap:10px}.brand{font-size:21px;font-weight:650;letter-spacing:-.8px;gap:10px}.brand .logo{width:34px;height:34px;background:var(--ink);color:var(--surface);border-radius:11px}.brand .logo svg{width:27px;height:27px}.brand .tag{display:none}header .quiet{height:40px;min-height:40px;padding:0 13px!important;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line)!important;background:var(--surface);font-size:12px;font-weight:550}header .quiet svg{width:17px;height:17px}header #theme-toggle:after,header #sound:after{display:none}header #theme-toggle{margin-left:auto}
main{max-width:1280px;padding:0 32px;margin:auto}#lobby{display:flex;flex-direction:column;gap:0}.intro{order:0;display:grid;grid-template-columns:1.08fr 1fr;gap:48px;align-items:center;min-height:530px;padding:54px 10px 48px;margin:0;text-align:left}.intro:before,.intro:after{display:none}.hero-copy>.eyebrow{display:inline-flex;color:var(--muted);background:var(--soft);font-size:10px;letter-spacing:1px;font-weight:650;border-radius:20px;padding:7px 11px}.hero-copy>.eyebrow i{display:none}.intro h1{font-size:clamp(48px,5.8vw,76px);font-weight:700;letter-spacing:-4px;line-height:1.04;margin:20px 0}.intro h1 span{color:var(--muted)}.intro p{font-size:18px;line-height:1.55;max-width:410px;margin:0 0 25px}.hero-cta{margin:0;padding:14px 21px;min-height:50px;border-radius:28px;background:var(--green);color:white;font-size:14px;gap:22px;box-shadow:none}.hero-cta:hover{background:#0067db;transform:translateY(-1px)}.hero-upload{margin:0 0 0 8px;min-height:50px;vertical-align:top;padding:12px 18px;border-radius:28px;background:var(--surface);font-size:14px}.hero-notes{display:flex;gap:17px;margin-top:23px;color:var(--muted);font-size:11px}.hero-notes span:before{color:var(--muted)}
.hero-art{height:390px}.hero-orbit,.hero-sticker,.hero-spark{display:none}.hero-photo{padding:0;border:4px solid var(--surface);border-radius:28px;overflow:hidden;box-shadow:0 20px 50px #1625361c}.hero-photo img{height:100%;width:100%;object-fit:cover}.hero-photo figcaption{display:none}.hero-photo-front{width:88%;height:315px;left:0;top:4px;transform:rotate(-4deg);z-index:1}.hero-photo-back{width:51%;height:195px;right:-1%;top:195px;transform:rotate(5deg);z-index:2}.dark .hero-photo{border-color:#30343b;box-shadow:0 20px 50px #0005}
.bottom-grid{order:1;display:flex;gap:16px;margin:0 0 20px}.bottom-grid .upload,.bottom-grid .resume{border:1px solid var(--line);background:var(--surface);border-radius:20px;box-shadow:none;padding:22px;min-height:96px;gap:15px}.bottom-grid .upload:hover,.bottom-grid .resume:hover{border-color:#a6c8f2;background:var(--surface);box-shadow:0 7px 26px #16253608}.action-icon{width:48px;height:48px;border-radius:14px;background:var(--accent-soft);color:var(--green);font-size:28px}.action-icon svg{width:25px;height:25px}#upload-open .action-copy strong,#resume .action-copy strong{font-size:16px;font-weight:650;color:var(--ink)}.action-copy>span,#upload-open .action-copy>span{font-size:12px;color:var(--muted);line-height:1.45}.action-arrow,.bottom-grid .upload .action-arrow{color:var(--muted);font-size:21px}.bottom-grid #phone-load{display:none}
.quick-play{order:2;display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:0 0 42px}.quick-play .daily-card,.dark .quick-play .daily-card{display:flex;align-items:center;gap:16px;margin:0;background:var(--surface);color:var(--ink);border:1px solid var(--line);box-shadow:none;border-radius:20px;padding:22px}.quick-play .daily-card>div{min-width:0;flex:1}.quick-play .eyebrow{color:var(--green);font-size:9px;letter-spacing:1.2px}.quick-play h2{font-size:20px;margin:7px 0}.quick-play p,.dark .quick-play p{color:var(--muted);font-size:12px;line-height:1.5;margin:6px 0}.quick-play small,.dark .quick-play small{color:var(--muted);font-size:10px;line-height:1.5;display:block}.quick-play .daily-card>button,.quick-play .daily-card>.primary{background:var(--soft);color:var(--ink);border:0;border-radius:22px;min-width:102px;width:auto;min-height:44px;font-size:12px;padding:11px 16px;white-space:nowrap}.quick-play .daily-card>button:hover{background:var(--accent-soft);color:var(--green)}
.section-title{order:3;align-items:end;margin:0 0 22px;gap:16px}.section-title h2{font-size:32px;letter-spacing:-1.2px;font-weight:700}.section-title>span{font-size:13px;color:var(--muted)}.library-tools{order:4;grid-template-columns:1fr 1.5fr;gap:8px 16px;margin:0 0 24px}.library-tools label{font-size:11px;font-weight:600;color:var(--muted);gap:8px}.library-tools input,.library-tools select{font:16px var(--font);height:52px;padding:13px 17px;border-radius:14px;box-shadow:none;background:var(--surface)}.library-tools input::placeholder{color:var(--muted)}#library-summary{font-size:11px;margin:2px 0 0;color:var(--muted)}
.gallery{order:5;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;margin:0 0 26px}.gallery .card,.gallery .card:hover,.dark .gallery .card,.dark .gallery .card:hover{display:block;background:var(--surface);border:1px solid var(--line);border-radius:22px;box-shadow:none;min-height:0;overflow:hidden}.gallery .card:hover{transform:translateY(-4px);box-shadow:0 14px 35px #16253612}.gallery .card .photo{aspect-ratio:3/2;height:auto;min-height:0}.gallery .card img{width:100%;height:100%;object-fit:cover;display:block}.badge{top:13px;left:13px;border-radius:20px;background:#ffffffdf;color:#24272b;backdrop-filter:blur(16px);font-size:9px;font-weight:600;letter-spacing:0;padding:7px 11px}.gallery .card-body{padding:19px 20px 17px}.gallery .card h3{font:650 19px/1.3 var(--font);letter-spacing:-.45px;min-height:49px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}.gallery .card p{font-size:12px;line-height:1.45;margin:9px 0 17px;min-height:0}.card-foot{font-size:10px;letter-spacing:.5px;margin:0}.card-foot b{width:30px;height:30px;min-width:30px;border:0;background:var(--soft);color:var(--ink)}.library-pages{order:6;gap:18px;margin:0 0 38px}.library-pages button{border-radius:24px;padding:11px 18px;min-height:44px;font-size:12px}#pictures-page{font-size:12px;color:var(--muted)}footer{order:7;display:flex;justify-content:space-between;border-top:1px solid var(--line);margin:0;padding:24px 0;font-size:9px;letter-spacing:.8px;color:var(--muted)}footer span:last-child{font-style:normal;letter-spacing:0}
dialog{background:var(--surface);border:1px solid var(--line);border-radius:28px;padding:28px;box-shadow:0 30px 100px #0003;width:calc(100% - 32px);max-height:calc(100dvh - 36px);overscroll-behavior:contain}dialog::backdrop{background:#10172270;backdrop-filter:blur(12px)}dialog h2{font:700 29px/1.15 var(--font);letter-spacing:-1px;margin:10px 0 0}dialog .eyebrow{font-size:9px;letter-spacing:1.3px;color:var(--muted)}dialog p{font-size:14px}dialog .close{width:36px;height:36px;min-height:36px;right:40px;top:40px;background:#ffffffdf;color:#24272b;border:0;font-size:23px;line-height:1;box-shadow:0 2px 8px #0001}#setup-image{height:190px;object-fit:cover;border-radius:19px;margin:0 0 22px}.difficulty{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:18px 0}.difficulty button,.difficulty button:last-child:nth-child(7){grid-column:auto;min-height:82px;border:1px solid var(--line);border-radius:14px;background:var(--paper);padding:12px 5px}.difficulty b{font-size:26px;font-weight:650;letter-spacing:-1px}.difficulty span{font-size:10px;line-height:1.25;margin-top:5px;color:var(--muted)}.difficulty .selected,.dark .difficulty .selected{background:var(--accent-soft);border-color:var(--green);box-shadow:inset 0 0 0 1px var(--green);color:var(--green)}.timed-option,.dark .timed-option{background:var(--soft);padding:13px 15px;border-radius:14px;font-size:13px}.timed-option small{font-size:11px;margin:5px 0 0 25px}.timed-option input{width:17px;height:17px;vertical-align:middle;margin:0 6px 0 0;accent-color:var(--green)}.primary{background:var(--green);border-radius:14px;min-height:50px;font-size:15px;font-weight:600;color:#fff}.primary:hover,.dark .primary:hover{background:#006cde}dialog small{font-size:11px;line-height:1.5;color:var(--muted)}dialog label{font-size:13px;font-weight:550}dialog label input:not([type=checkbox]),#saved-number{font:16px var(--font);border:1px solid var(--line);border-radius:13px;background:var(--paper);color:var(--ink);min-height:50px;padding:13px;width:100%}.code-actions{display:flex;gap:10px;margin-top:20px}.code-actions button{flex:1}.code-actions .primary{width:auto}#saved-number{font-weight:650;font-variant-numeric:tabular-nums;font-size:19px;letter-spacing:.5px}.win-icon{font-family:var(--font);font-size:56px;color:var(--green)}#toast{background:#25282e;color:white;box-shadow:0 8px 30px #0002;border:1px solid #ffffff18;font-size:13px;z-index:150;padding:13px 21px}
.game-playing header{height:64px}.game-playing main{max-width:1640px;padding:0 26px}.game-top{padding:20px 0;gap:20px}.game-top h2{font:650 25px/1.25 var(--font);letter-spacing:-.7px}.game-top #game-sub{font-size:11px;color:var(--muted)}.game-top #back{background:var(--surface);border:1px solid var(--line);border-radius:24px;font-size:13px;padding:10px 16px;display:flex;align-items:center;gap:8px}.game-top #back svg{width:17px;height:17px}.stats{background:var(--surface);border:1px solid var(--line);border-radius:15px;padding:10px 16px;min-width:130px}.stats b{font-size:17px;font-weight:600}.stats span{font-size:11px}.room-bar{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 14px;gap:8px;margin:0 0 16px}.room-bar>span{font-size:12px}.room-bar>span:before{background:var(--green)}.room-bar button{font-size:12px;border:0;border-radius:10px;background:var(--soft);padding:10px 13px;min-height:38px}.room-bar #room-create{background:var(--green);color:white}.play-layout{grid-template-columns:204px minmax(0,1fr);gap:18px;align-items:start}.play-layout>aside{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:16px;box-shadow:none}.preview-wrap,.dark .preview-wrap{padding:0;margin-bottom:20px;border-radius:14px;overflow:hidden;transform:none;background:var(--soft);box-shadow:none}.preview-wrap img{border-radius:0;width:100%;display:block}.play-layout>aside .eyebrow{font-size:9px}.play-layout>aside p{font-size:12px;line-height:1.55}.play-layout>aside button{border-radius:11px;font-size:12px;min-height:44px;padding:11px 8px}.play-layout>aside button.active,.dark aside button.active{background:var(--accent-soft);color:var(--green)}.play-layout>aside small{font-size:10px;line-height:1.6}.progress{background:var(--soft);height:5px;margin-top:18px}.progress i{background:var(--green)}.board-area{width:auto;margin:0;border:1px solid var(--line);background:var(--surface);border-radius:22px;padding:14px;min-width:0;box-shadow:none}.tray-bar{margin:0 0 9px}.tray-bar>div:first-child{background:var(--soft);padding:3px;border-radius:11px}.tray-bar>div:first-child button{background:transparent;border:0}.tray-bar>div:first-child button.active,.dark .tray-bar button.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #0001}.tray-bar button,.tray-bar select{background:var(--paper);border-color:var(--line);color:var(--ink);font-size:11px;min-height:36px;border-radius:10px;padding:8px 10px}.tray-pages{font-size:11px;margin:0;justify-content:space-between}.tray-pages button{font-size:11px;min-height:34px;border:0}.tray-help{font-size:10px;line-height:1.4;margin:4px 0 12px}.canvas-viewport,.dark .canvas-viewport{height:calc(100dvh - 410px);min-height:330px;max-height:900px;max-width:100%;overflow:auto;border-radius:15px;background:#e9edf1;outline:1px solid #17223508;scrollbar-width:thin;scrollbar-color:#b2bdc9 transparent;touch-action:none}.dark .canvas-viewport{background:#1b1e25}canvas{border-radius:15px;touch-action:none;box-shadow:none}.board-bottom{padding:12px 2px 0;gap:16px}.board-bottom>span{font-size:10px}.board-bottom>div{background:var(--soft);border-radius:10px;padding:3px;min-width:145px;justify-content:space-between}.board-bottom button{min-width:36px;min-height:30px;font-size:17px;border:0}#zoom-label{font-size:11px;min-width:42px;text-align:center;font-variant-numeric:tabular-nums}.sheet-heading{display:none}
@media(min-width:801px) and (max-width:1100px){.intro{gap:30px;min-height:470px;padding:42px 0}.intro h1{font-size:59px;letter-spacing:-3px}.intro p{font-size:16px}.hero-art{height:340px}.hero-photo-front{height:270px}.hero-photo-back{top:170px;height:170px}.hero-upload{font-size:12px;padding:12px}.hero-notes{gap:10px;font-size:10px}.quick-play .daily-card{display:block}.quick-play .daily-card>button{margin-top:14px}.gallery .card-body{padding:16px}.gallery .card h3{font-size:18px}.gallery{gap:17px}.play-layout{grid-template-columns:176px minmax(0,1fr);gap:12px}.play-layout>aside{padding:13px}.board-area{padding:11px}}
@media(max-width:800px),(max-height:600px) and (max-width:1100px){
 header{margin:0 20px;padding:0;height:68px;gap:8px}.brand{font-size:20px;gap:9px}.brand .logo{width:32px;height:32px}header .quiet{width:40px;min-width:40px;padding:0!important;display:grid;place-items:center;border-radius:50%}header .quiet svg{width:18px;height:18px}.control-label{display:none}main{padding:0 20px}.intro{display:block;min-height:0;padding:30px 0 24px}.intro h1{font-size:45px;line-height:1.03;letter-spacing:-2.3px;margin:0 0 15px}.intro p{font-size:15px;line-height:1.5;margin:0;max-width:340px}.intro .eyebrow,.hero-art,.hero-notes,.hero-cta,.hero-upload{display:none}.bottom-grid{display:flex;flex-direction:column;gap:10px;margin:0 0 15px}.bottom-grid .upload{min-height:84px;padding:17px;background:var(--green);border:0;color:#fff;border-radius:20px}.bottom-grid .upload:hover,.dark .bottom-grid .upload{background:var(--green);border:0}.bottom-grid .upload .action-icon{width:45px;height:45px;background:#ffffff25;color:#fff}#upload-open .action-copy strong{font-size:16px;color:#fff}#upload-open .action-copy>span{font-size:12px;color:#ffffffdf}.bottom-grid .upload .action-arrow{color:#fff}.bottom-grid .resume{order:1;min-height:77px;padding:16px;border-radius:20px;background:var(--surface)}#resume .action-copy strong{font-size:15px}.resume .action-icon{width:43px;height:43px}.quick-play{order:2;grid-template-columns:1fr 1fr;gap:10px;margin:0 0 31px}.quick-play .daily-card,.dark .quick-play .daily-card{display:flex;flex-direction:column;align-items:stretch;gap:0;padding:16px;border-radius:20px}.quick-play h2{font-size:16px;letter-spacing:-.4px;margin:6px 0}.quick-play .eyebrow{font-size:8px;letter-spacing:.7px}.quick-play p{font-size:11px;line-height:1.5}.quick-play #daily-record{display:none}.quick-play .daily-card>button,.quick-play .daily-card>.primary{margin-top:13px;min-width:0;min-height:40px;width:100%;padding:9px 8px;font-size:11px;white-space:normal}.section-title{margin-bottom:19px;display:block}.section-title h2{font-size:28px;letter-spacing:-1px}.section-title>span{display:block;font-size:12px;margin-top:5px}.library-tools{grid-template-columns:1fr;gap:12px;margin-bottom:19px}.library-tools label{font-size:11px;gap:6px}.library-tools input,.library-tools select{height:50px;min-height:50px;font-size:16px;border-radius:13px}#library-summary{font-size:11px;margin:0}.gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;margin-bottom:22px}.gallery .card,.gallery .card:hover{border-radius:18px;display:block;min-height:0}.gallery .card .photo{height:auto;aspect-ratio:1.25;min-height:0}.gallery .card-body{padding:12px}.gallery .card h3{font-size:14px;line-height:1.3;min-height:37px;letter-spacing:-.2px}.gallery .card p{display:none}.badge{font-size:7px;padding:5px 7px;top:8px;left:8px;max-width:calc(100% - 16px);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.card-foot{margin:12px 0 0;font-size:7px;letter-spacing:.1px;gap:4px}.card-foot b{width:23px;height:23px;min-width:23px;font-size:14px}.library-pages{gap:8px;justify-content:space-between;margin-bottom:28px}.library-pages button{font-size:11px;min-height:42px;padding:10px 13px}#pictures-page{min-width:36px;font-size:11px}footer{display:block;font-size:8px;padding:23px 0}footer span{display:block;margin-bottom:7px}
 dialog{padding:20px;border-radius:25px;width:calc(100% - 24px);max-height:calc(100dvh - 28px)}dialog h2{font-size:25px;letter-spacing:-.8px}dialog .close{right:31px;top:31px;width:34px;height:34px;min-width:34px;min-height:34px;font-size:24px}#setup-image{height:150px;border-radius:17px;margin-bottom:19px}dialog p{font-size:13px}.difficulty{grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:16px 0}.difficulty button{min-height:74px;padding:10px 3px;border-radius:12px}.difficulty b{font-size:23px}.difficulty span{font-size:8px;line-height:1.3}.timed-option{font-size:12px;padding:12px}.timed-option small{font-size:10px}dialog small{font-size:10px;line-height:1.5}.primary{min-height:48px;font-size:15px;border-radius:13px}dialog label input:not([type=checkbox]),#saved-number{font-size:16px;min-height:50px}.code-actions{margin-top:16px}#phone-picture-dialog img{max-height:60dvh;border-radius:16px}
 .phone-playing #phone-hud{height:calc(68px + env(safe-area-inset-top));padding:calc(11px + env(safe-area-inset-top)) 96px 11px max(12px,env(safe-area-inset-left));gap:11px;background:var(--surface);border-bottom:1px solid var(--line)}#phone-hud>button{width:40px;min-width:40px;min-height:42px;height:42px;border:0;border-radius:13px;background:var(--soft);display:grid;place-items:center}#phone-hud>button svg{width:20px;height:20px}#phone-title{font-size:13px;font-weight:650;letter-spacing:-.2px}#phone-progress{font-size:11px;color:var(--muted)}.phone-playing #game-menu-toggle{top:calc(11px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right));min-height:42px;min-width:74px;background:var(--soft);border:0;border-radius:13px;font-size:12px;padding:10px;display:flex;justify-content:center;align-items:center;gap:6px;box-shadow:none}.phone-playing #game-menu-toggle svg{width:15px;height:15px}.phone-playing .canvas-viewport{top:calc(68px + env(safe-area-inset-top));bottom:calc(254px + env(safe-area-inset-bottom));left:0;right:0;width:100%;height:auto;min-height:0;max-height:none;border-radius:0;background:#e9edf1;outline:0}.dark .phone-playing .canvas-viewport{background:#1b1e25}.phone-playing canvas{border-radius:0}.phone-playing #piece-shelf{height:calc(254px + env(safe-area-inset-bottom));padding:9px 12px calc(8px + env(safe-area-inset-bottom));border:1px solid var(--line);border-left:0;border-right:0;border-bottom:0;border-radius:24px 24px 0 0;background:var(--surface);box-shadow:0 -8px 30px #1625360a}.shelf-tools{gap:9px}.shelf-filters{background:var(--soft);border-radius:12px;padding:3px;gap:1px}.shelf-tools button{font-size:12px;min-height:34px;padding:6px 10px;border:0;border-radius:9px;background:transparent}.shelf-filters [aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #0001}.shelf-tools #phone-picture{background:var(--soft);border:0;border-radius:11px;min-height:40px;padding:9px 12px;font-size:12px}#phone-instruction{font-size:10px;line-height:1.4;height:15px;margin:6px 0;color:var(--muted)}#shelf-pieces{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,60px);gap:5px;height:125px}.shelf-piece,.dark .shelf-piece{height:60px;min-height:60px;border-radius:13px;background:var(--soft);border:2px solid transparent;touch-action:none}.shelf-piece[aria-pressed=true],.dark .shelf-piece[aria-pressed=true]{background:var(--accent-soft);border-color:var(--green);box-shadow:0 0 0 1px var(--green)}.shelf-piece canvas{background:none;border-radius:0;box-shadow:none}.shelf-bottom{height:40px;margin-top:7px;gap:5px}.shelf-bottom button{height:38px;min-height:38px;min-width:38px;background:var(--soft);border:0;border-radius:10px;font-size:20px}.shelf-bottom #phone-fit{font-size:12px;min-width:43px}#shelf-page{min-width:40px;font-size:11px;color:var(--muted)}
 .phone-playing #game-menu{left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));top:auto;width:auto;max-height:calc(83dvh - env(safe-area-inset-top));border-radius:26px;padding:19px 19px 20px;background:var(--surface);border:1px solid var(--line);box-shadow:0 16px 60px #0003;transform:translateY(28px);transition:transform .28s,opacity .25s,visibility .25s}.phone-playing #game-menu:before{display:none}.phone-playing #game-menu.menu-visible{transform:translateY(0)}.phone-playing .sheet-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 17px}.sheet-heading h2{font:700 24px var(--font);letter-spacing:-.8px}.sheet-heading button{width:34px;height:34px;min-height:34px;border:0;border-radius:50%;background:var(--soft);display:grid;place-items:center;padding:0}.sheet-heading svg{width:17px;height:17px}.view-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:16px}.view-actions button{background:var(--soft);border:0;border-radius:12px;min-height:44px;font-size:12px;padding:11px 8px}.view-actions #hide-game-menu{display:none}.phone-playing #new-puzzle-actions{padding:0 0 15px;gap:8px}.phone-playing #new-puzzle-actions button{min-height:46px;border-radius:12px;font-size:13px;padding:12px 14px}.phone-playing #new-puzzle-actions #menu-upload{background:var(--green);color:white}.phone-playing #game-menu .room-bar{border-radius:0;background:none;border:0;border-top:1px solid var(--line);padding:16px 0;margin:0;gap:8px}.phone-playing #game-menu .room-bar>span{font-size:12px;line-height:1.5}.phone-playing #game-menu .room-bar button{min-height:44px;font-size:13px;text-align:left;border-radius:12px}.phone-playing #game-menu aside{padding:13px 0 0;border-top:1px solid var(--line);background:none;box-shadow:none}.phone-playing #game-menu aside button{min-height:44px;padding:11px 8px;font-size:13px;border-radius:11px}.phone-playing #game-menu aside small{font-size:11px}.phone-menu-open #phone-menu-shade{background:#0b101a66;backdrop-filter:blur(6px)}#toast{bottom:calc(268px + env(safe-area-inset-bottom));font-size:12px;max-width:calc(100% - 32px)}
}
@media(max-width:350px){header{margin:0 15px;gap:5px}.brand{font-size:18px;gap:7px}.brand .logo{width:29px;height:29px}header .quiet{width:36px;min-width:36px;height:36px;min-height:36px}main{padding:0 15px}.intro{padding-top:25px}.intro h1{font-size:40px;letter-spacing:-2px}.intro p{font-size:14px}.bottom-grid .upload{padding:15px;gap:11px}#upload-open .action-copy strong{font-size:14px}#upload-open .action-copy>span{font-size:10px}.quick-play .daily-card{padding:13px}.quick-play h2{font-size:15px}.quick-play p{font-size:10px}.gallery{gap:12px 9px}.gallery .card-body{padding:10px}.gallery .card h3{font-size:13px;min-height:34px}.card-foot{font-size:6px}.card-foot b{width:21px;height:21px;min-width:21px}.badge{font-size:6px}#setup-image{height:115px}.difficulty b{font-size:21px}.difficulty span{font-size:7px}.shelf-tools button{font-size:11px;padding:6px 8px}#phone-instruction{font-size:9px}.phone-playing #phone-hud{padding-right:88px;gap:8px}#phone-title{font-size:12px}.phone-playing #game-menu-toggle{min-width:66px;font-size:11px}#saved-number{font-size:14px}}
@media(max-width:800px) and (orientation:landscape),(max-height:600px) and (max-width:1100px) and (orientation:landscape){.phone-playing #piece-shelf{left:auto;right:0;top:calc(68px + env(safe-area-inset-top));width:212px;height:auto;border-radius:20px 0 0 0;padding:8px;overflow:auto}.phone-playing .canvas-viewport{right:212px;bottom:0;width:auto}.shelf-tools{display:block}.shelf-tools #phone-picture{width:100%;margin-top:5px}.shelf-filters{justify-content:space-between}#phone-instruction{white-space:normal;height:auto;font-size:10px;margin:6px 0}#shelf-pieces{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,54px);height:113px}.shelf-piece{height:54px;min-height:54px}.shelf-bottom{display:grid;grid-template-columns:repeat(3,1fr);height:auto;gap:4px}.shelf-bottom button{min-width:0;min-height:33px;height:33px}.shelf-spacer{display:none}#shelf-page{min-width:0}.shelf-bottom #phone-fit{min-width:0}.phone-playing #game-menu{left:auto;width:min(430px,calc(100% - 20px));max-height:calc(100dvh - 20px)}#toast{bottom:18px;max-width:calc(100% - 230px);left:38%}}
.quick-play{order:7;margin:12px 0 34px}footer{order:8}.intro{min-height:490px}.board-bottom>div{min-width:206px}.board-bottom #desktop-reset{font-size:11px;padding:5px 10px;border-left:1px solid var(--line);border-radius:0 7px 7px 0}.dark .bottom-grid .resume{background:var(--surface)}
@media(max-width:800px),(max-height:600px) and (max-width:1100px){.intro{min-height:0}.quick-play{order:7;margin:5px 0 27px}}
.shelf-tools #phone-picture{display:inline-flex;align-items:center;justify-content:center;gap:6px}.shelf-tools #phone-picture svg{width:16px;height:16px}
@media(max-width:800px) and (orientation:landscape),(max-height:600px) and (max-width:1100px) and (orientation:landscape){.phone-playing #piece-shelf .shelf-tools{display:flex;gap:4px}.phone-playing #piece-shelf #phone-picture{width:36px;min-width:36px;min-height:36px;margin:0;padding:0}.phone-playing #phone-picture .picture-label{display:none}.phone-playing .shelf-tools .shelf-filters{padding:2px;gap:0}.phone-playing .shelf-tools .shelf-filters button{font-size:11px;padding:6px 8px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}*,*:before,*:after{animation:none!important;transition:none!important}.card:hover,.hero-cta:hover,button:active{transform:none}}
