:root{--felt:#1d5b4f;--felt-dark:#123d35;--ink:#1f2433;--cream:#fffaf0;--gold:#f0a500;--red:#c42b2b;--blue:#1d5aa6;--font:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;--safe-top:env(safe-area-inset-top,0px);--safe-bottom:env(safe-area-inset-bottom,0px)}*{box-sizing:border-box}html,body{background:var(--felt-dark);height:100%;font-family:var(--font);color:var(--cream);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;overscroll-behavior:none;margin:0;overflow:hidden}#app{background:radial-gradient(ellipse at 50% 40%, #2a7565 0%, var(--felt) 45%, var(--felt-dark) 100%);flex-direction:column;display:flex;position:fixed;inset:0}[hidden]{display:none!important}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:0}svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;flex:none;width:22px;height:22px}#hud{padding:calc(6px + var(--safe-top)) 10px 6px;background:#00000038;align-items:center;gap:10px;min-height:48px;display:flex}.icon-btn{background:#ffffff1a;border-radius:12px;place-items:center;width:40px;height:40px;display:grid}.icon-btn:hover{background:#ffffff2e}.icon-btn.light{color:var(--ink);background:#0000000f}.hud-title{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;font-size:17px;font-weight:700;overflow:hidden}.hud-stats{font-variant-numeric:tabular-nums;gap:14px;display:flex}.hud-stats span{opacity:.95;align-items:center;gap:5px;display:flex}.hud-stats svg{opacity:.75;width:18px;height:18px}.hud-stats b{min-width:2ch;font-size:16px}#stage{flex:1;min-height:0;position:relative}#board{touch-action:manipulation;width:100%;height:100%;display:block;position:absolute;inset:0}#fx{pointer-events:none;z-index:30;width:100%;height:100%;position:fixed;inset:0}#notice{color:#fff;text-align:center;background:#c42b2beb;border-radius:999px;max-width:calc(100% - 24px);padding:7px 14px;font-size:14px;font-weight:600;position:absolute;top:8px;left:50%;transform:translate(-50%);box-shadow:0 4px 14px #0000004d}#tools{padding:6px 8px calc(8px + var(--safe-bottom));background:#00000038;justify-content:center;gap:8px;display:flex}.tool{background:#ffffff1a;border-radius:14px;flex-direction:column;flex:1;align-items:center;gap:2px;max-width:120px;padding:7px 4px 6px;font-size:13px;font-weight:600;display:flex;position:relative}.tool:hover:not(:disabled){background:#ffffff2e}.tool:active:not(:disabled){transform:translateY(1px)}.tool:disabled{opacity:.4;cursor:default}.badge{background:var(--gold);min-width:19px;height:19px;color:var(--ink);border-radius:99px;padding:0 5px;font-size:12px;font-weight:800;line-height:19px;position:absolute;top:3px;right:calc(50% - 28px)}.badge.ad{background:#fff;align-items:center;padding:0 4px;display:flex}.badge.ad svg{width:11px;height:11px;fill:var(--ink);stroke:none}.screen{z-index:20;position:absolute;inset:0}.screen.dim{background:#0814129e;place-items:center;padding:16px;display:grid}#menu{background:radial-gradient(ellipse at 50% 0%, #2a7565 0%, var(--felt) 50%, var(--felt-dark) 100%);-webkit-overflow-scrolling:touch;overflow-y:auto}.menu-inner{max-width:980px;min-height:100%;padding:calc(10px + var(--safe-top)) 12px calc(10px + var(--safe-bottom));flex-direction:column;gap:10px;margin:0 auto;display:flex}.menu-head{flex-wrap:wrap;align-items:center;gap:10px 14px;display:flex}.menu-head .icon-btn{color:var(--cream);background:#ffffff1f}h1{letter-spacing:-.5px;white-space:nowrap;margin:0;font-size:clamp(24px,4.2vw,34px);line-height:1.05}h1 span{color:#ffd479}.menu-actions{flex:300px;gap:8px;display:flex}.menu-actions .btn{flex:1 1 0;min-height:46px;padding:5px 12px;font-size:16px}.btn{background:#ffffff24;border-radius:16px;flex-direction:column;flex:200px;justify-content:center;align-items:center;min-height:52px;padding:8px 22px;font-size:17px;font-weight:700;display:inline-flex}.btn small{opacity:.85;font-size:12.5px;font-weight:500}.btn.primary{color:#3a2a00;background:#ffd479;box-shadow:0 4px #c99a2e}.btn.daily{color:#fff;background:#c84b4b;box-shadow:0 4px #8f2d2d}.btn.ghost{color:var(--ink);box-shadow:none;background:#0000000f}.btn:active{box-shadow:none;transform:translateY(2px)}.layouts{flex:auto;grid-template-columns:repeat(4,minmax(0,1fr));grid-auto-rows:minmax(104px,1fr);gap:8px;min-height:0;display:grid}.layout-card{text-align:left;background:#0003;border-radius:14px;outline:2px solid #0000;flex-direction:column;min-height:0;padding:8px 10px;display:flex}.layout-card:hover{background:#0000004d}.layout-card.current{outline-color:#ffd479}.layout-card canvas{object-fit:contain;flex:1 1 0;width:100%;min-height:30px;margin-bottom:4px;display:block}.layout-card .name{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:0 4px;font-size:15px;font-weight:700;display:flex}.layout-card .stars{color:#ffd479;letter-spacing:1px;white-space:nowrap;font-size:11px}.layout-card .meta{opacity:.8;white-space:nowrap;text-overflow:ellipsis;font-size:12px;overflow:hidden}.menu-foot{flex-wrap:wrap;align-items:center;gap:8px 18px;font-size:14.5px;display:flex}.menu-foot label{cursor:pointer;align-items:center;gap:7px;display:flex}.menu-foot input{accent-color:#ffd479;width:18px;height:18px;margin:0}.link-btn{text-underline-offset:3px;opacity:.9;margin-left:auto;padding:4px 2px;text-decoration:underline}@media (aspect-ratio<=1){.layouts{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:minmax(92px,1fr)}.menu-head h1{flex:1}#btn-close-menu{order:1}.menu-actions{flex-basis:100%;order:2}}@media (aspect-ratio<=1) and (height<=780px){.layouts{grid-template-columns:repeat(3,minmax(0,1fr))}.layout-card{grid-template-rows:minmax(30px,1fr) auto auto;grid-template-columns:minmax(0,1fr) auto;column-gap:4px;display:grid}.layout-card canvas{grid-column:1/-1;height:0;min-height:100%}.layout-card .name{display:contents}.layout-card .name span:first-child{text-overflow:ellipsis;white-space:nowrap;grid-column:1/-1;overflow:hidden}.layout-card .stars{letter-spacing:0;grid-area:3/2;align-self:center;font-size:10px}.layout-card .meta{grid-area:3/1}}@media (aspect-ratio<=1) and (height<=600px){.menu-inner{padding-top:calc(7px + var(--safe-top));padding-bottom:calc(7px + var(--safe-bottom));gap:7px}h1{font-size:22px}.menu-actions .btn{min-height:40px;padding:3px 8px;font-size:14.5px}.menu-actions .btn small{font-size:11px}.layouts{grid-auto-rows:minmax(64px,1fr);gap:6px}.layout-card{border-radius:12px;padding:5px 8px}.layout-card .name,.layout-card .name span:first-child{font-size:13.5px;line-height:1.15}.layout-card .meta{font-size:11px}.menu-foot{gap:6px 12px;font-size:13px}.menu-foot input{width:16px;height:16px}}@media (aspect-ratio>=3/2) and (height<=500px){.menu-inner{padding-top:calc(7px + var(--safe-top));padding-bottom:calc(7px + var(--safe-bottom));gap:7px}.menu-actions .btn{min-height:40px;padding:3px 8px;font-size:14.5px}.menu-actions .btn small{font-size:11px}.layouts{grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(72px,1fr);gap:6px}.layout-card{border-radius:12px;padding:5px 8px}.layout-card .name{font-size:13.5px;line-height:1.15}.layout-card .stars{letter-spacing:0;font-size:10px}.layout-card .meta{font-size:11px}}.panel{background:var(--cream);width:min(380px,100%);color:var(--ink);text-align:center;border-radius:22px;padding:22px 20px 18px;animation:.22s ease-out pop;box-shadow:0 20px 50px #00000073}@keyframes pop{0%{opacity:0;transform:scale(.9)}}.panel h2{margin:0 0 8px;font-size:24px}#dialog-body{color:#4a5160;font-size:15.5px;line-height:1.45}#dialog-body .big{color:var(--ink);font-variant-numeric:tabular-nums;margin:6px 0 2px;font-size:34px;font-weight:800}#dialog-body .newbest{color:#c47f00;font-weight:800}#dialog-buttons{flex-direction:column;gap:9px;margin-top:18px;display:flex}#dialog-buttons .btn{flex:none;width:100%}#dialog-buttons .btn:not(.primary):not(.daily){background:#ece4d0}.btn.ad-btn:before{content:"";vertical-align:middle;border-top:6px solid #0000;border-bottom:6px solid #0000;border-left:10px solid;width:0;height:0;margin-right:8px;display:inline-block}.btn.ad-btn{flex-direction:row}#toast{left:50%;bottom:calc(86px + var(--safe-bottom));color:#fff;z-index:40;pointer-events:none;text-align:center;background:#0f191ee6;border-radius:999px;max-width:calc(100% - 32px);padding:9px 16px;font-size:14px;font-weight:600;position:fixed;transform:translate(-50%)}.fake-ad{z-index:100;color:#fff;font:700 22px var(--font);background:#000000d9;place-items:center;display:grid;position:fixed;inset:0}@media (width<=420px){.hud-stats{gap:9px}.hud-stats svg{width:15px;height:15px}.hud-stats span{gap:3px}.hud-title{font-size:15px}}@media (height<=500px) and (orientation:landscape){#app{grid-template-columns:auto 1fr auto;display:grid}#hud{padding:calc(8px + var(--safe-top)) 6px 8px calc(6px + env(safe-area-inset-left,0px));flex-direction:column;justify-content:flex-start;gap:12px;width:92px}.hud-title{text-align:center;white-space:normal;flex:none;width:100%;font-size:13px}.hud-stats{flex-direction:column;gap:8px}.hud-stats svg{width:16px;height:16px;display:block}#tools{padding:8px calc(8px + env(safe-area-inset-right,0px)) 8px 8px;flex-direction:column;justify-content:center}.tool{flex:none;width:76px;padding:6px 4px;font-size:12px}.badge{right:6px}#toast{bottom:16px}}
