.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.modal-content{background:#fff;border-radius:12px;padding:32px;max-width:500px;width:90%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px #0000004d}.modal-title{margin:0 0 20px;font-size:24px;font-weight:600;color:#333}.puzzle-stats{display:flex;gap:24px;padding:16px;background:#f5f5f5;border-radius:8px;margin-bottom:24px}.stat{display:flex;flex-direction:column;gap:4px}.stat-label{font-size:12px;color:#666;text-transform:uppercase;letter-spacing:.5px}.stat-value{font-size:18px;font-weight:600;color:#333}.save-form{display:flex;flex-direction:column;gap:20px}.form-group{display:flex;flex-direction:column;gap:8px}.form-group label{font-size:14px;font-weight:500;color:#333}.form-group input,.form-group textarea{padding:10px 12px;border:2px solid #e0e0e0;border-radius:6px;font-size:14px;font-family:inherit;color:#333;background:#fff;transition:border-color .2s}.form-group input:focus,.form-group textarea:focus{outline:none;border-color:#667eea}.form-group input:disabled,.form-group textarea:disabled{background:#f5f5f5;cursor:not-allowed}.form-group textarea{resize:vertical;min-height:80px}.radio-group{display:flex;flex-direction:column;gap:12px}.radio-label{display:flex;align-items:center;gap:8px;cursor:pointer;padding:10px;border:2px solid #e0e0e0;border-radius:6px;transition:all .2s}.radio-label:hover{border-color:#667eea;background:#f9f9f9}.radio-label input[type=radio]{width:18px;height:18px;cursor:pointer}.radio-label input[type=radio]:checked+span{font-weight:600;color:#667eea}.radio-label span{font-size:14px;color:#333}.modal-actions{display:flex;gap:12px;justify-content:flex-end;margin-top:8px}.btn{padding:10px 24px;border:none;border-radius:6px;font-size:14px;font-weight:500;cursor:pointer;transition:all .2s}.btn-secondary{background:#e0e0e0;color:#333}.btn-secondary:hover:not(:disabled){background:#d0d0d0}.btn-primary{background:#667eea;color:#fff}.btn-primary:hover:not(:disabled){background:#5568d3;transform:translateY(-1px);box-shadow:0 4px 12px #667eea66}.btn-primary:active:not(:disabled){transform:translateY(0)}.actions{display:flex;align-items:center;gap:.75rem}.actions .btn{padding:.5rem 1rem;border:1px solid #ced4da;border-radius:6px;background:#fff;color:#1f2937;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease}.actions .btn:hover{background:#f8f9fa;border-color:#adb5bd;color:#1f2937}.actions .btn:disabled{opacity:.5;cursor:not-allowed;background:#f8f9fa;color:#1f2937}.actions .btn.primary{background:#007bff;border-color:#007bff;color:#fff}.actions .btn.primary:hover:not(:disabled){background:#0056b3;border-color:#0056b3;color:#fff}.actions .btn.primary:disabled{background:#6c757d;border-color:#6c757d;color:#fff}.actions label{font-size:.875rem;font-weight:500;color:#1f2937;cursor:pointer;transition:opacity .15s ease}.actions label input[type=checkbox]{margin-right:.25rem}.segmented{display:flex;border:1px solid #ced4da;border-radius:6px;overflow:hidden}.segmented button{padding:.5rem .75rem;border:none;background:#fff;color:#1f2937;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .15s ease;border-right:1px solid #ced4da}.segmented button:last-child{border-right:none}.segmented button:hover{background:#f8f9fa;color:#1f2937}.segmented button.active{background:#007bff;color:#fff}.muted{color:#6c757d;font-size:.875rem}.shape-header .actions{margin-left:auto;display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}.segmented{display:inline-flex;border:1px solid #ced4da;border-radius:.375rem;overflow:hidden}.segmented button{padding:.4rem .7rem;background:#f8fafc;border:0;cursor:pointer;color:#1f2937;font-weight:500}.segmented button.active{background:#3b82f6;color:#fff}.segmented button+button{border-left:1px solid #ced4da}.btn{padding:.5rem .75rem;border-radius:.375rem;border:1px solid #ced4da;background:#f5f7fa;color:#1f2937;font-weight:500}.btn.primary{background:#3b82f6;color:#fff;border-color:#3b82f6}.btn:disabled{opacity:.5;cursor:not-allowed}.viewport{position:relative;flex:1 1 auto;min-height:0}.viewport>*{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;display:block}input[type=checkbox]{cursor:pointer}input[type=text],input[type=number],input[type=email],input[type=password],input[type=file],select{color:#1f2937;background-color:#fff;border:1px solid #d1d5db;border-radius:4px;padding:.5rem}input[type=text]:disabled,input[type=number]:disabled,select:disabled{opacity:.6;cursor:not-allowed;background-color:#f3f4f6;color:#6b7280}label{color:#1f2937}input[type=range]{cursor:pointer}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.shape-header{position:sticky;top:0;z-index:20;padding:max(8px,env(safe-area-inset-top)) 12px 8px;background:#0b0f17;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;box-shadow:0 1px #ffffff0f,0 8px 24px #00000040}.header-left,.header-right{display:flex;align-items:center;gap:8px}.header-center{display:flex;align-items:center;gap:8px;white-space:nowrap;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;overscroll-behavior-x:contain;-webkit-mask-image:linear-gradient(to right,transparent 0,black 14px,black calc(100% - 14px),transparent 100%);mask-image:linear-gradient(to right,transparent 0,black 14px,black calc(100% - 14px),transparent 100%)}.header-center::-webkit-scrollbar{display:none}.header-center{scrollbar-width:none}.pill{height:44px;padding:0 14px;border-radius:10px;border:0;color:#fff;font-weight:600;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:transform .15s ease,box-shadow .2s ease,background-color .2s ease}.pill:active{transform:translateY(1px)}.pill:focus-visible{outline:2px solid #2f6ff4;outline-offset:2px}.pill--primary{background:linear-gradient(90deg,#2f6ff4,#1f4fb5);box-shadow:0 6px 18px #2f6ff447}.pill--ghost{background:#ffffff1a;color:#fffffff2}.pill--chrome{background:#ffffff14;color:#ffffffe0;border:1px solid rgba(255,255,255,.12);box-shadow:none}.pill[disabled]{opacity:.45;cursor:not-allowed;box-shadow:none}.canvas-wrap{position:relative}.cells-chip{position:absolute;top:10px;left:12px;padding:6px 10px;border-radius:10px;font-size:.9rem;color:#ffffffe6;background:#ffffff14;box-shadow:0 2px 10px #00000040;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);pointer-events:none;-webkit-user-select:none;user-select:none;transition:background-color .3s ease,box-shadow .3s ease}.cells-chip.is-valid{background:#22c55e1f;box-shadow:0 2px 10px #22c55e40}.hud-chip{position:absolute;top:10px;left:12px;padding:6px 10px;border-radius:10px;background:#000000bf;color:#fffffff2;font-size:.9rem;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);pointer-events:none;-webkit-user-select:none;user-select:none;box-shadow:0 2px 8px #0000004d}.hud-legacy,.hud-center,.hud-mode{display:none!important}.solution-dock{position:fixed;bottom:0;left:0;right:0;z-index:15;padding:10px 12px;background:#0b0f17f5;box-shadow:0 -8px 24px #00000059;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}.dock-inner{display:flex;justify-content:center;align-items:center;gap:32px;flex-wrap:wrap;max-width:980px;margin:0 auto}.slider-group{display:flex;flex-direction:column;align-items:center;gap:4px}.dock-label{color:#ffffffd9;font-size:.9rem;font-weight:500}.dock-slider{width:180px;accent-color:#2f6ff4}@media (max-width: 540px){.dock-inner{flex-direction:column;gap:10px}.dock-slider{width:100%}}@media (max-width: 768px){.pill{padding:0 10px;font-size:.85rem;height:40px}.shape-header{padding:8px 10px;display:flex!important;flex-wrap:wrap!important;gap:8px;align-content:flex-start;grid-template-columns:none!important}.header-left{gap:6px;flex:0 0 auto;order:1;max-width:40%}.header-right{gap:6px;flex:0 0 auto;order:2;justify-content:flex-end;margin-left:auto;max-width:50%}.header-center{gap:6px;flex:1 0 100%;min-width:100%;order:3;max-width:100%;overflow-x:auto;-webkit-mask-image:none;mask-image:none;justify-content:flex-start}.canvas-wrap{padding-top:0!important;width:100%!important;height:100%!important;position:relative!important;touch-action:none!important}.hud-chip{top:16px!important;font-size:.85rem!important;padding:8px 12px!important}.canvas-wrap canvas{display:block!important;width:100%!important;height:100%!important}html,body{overflow:hidden!important;position:fixed!important;width:100%!important;height:100%!important}#root{width:100%!important;height:100%!important;overflow:hidden!important}}@media (max-width: 768px) and (max-height: 700px){.solve-page .canvas-wrap>div[style*=bottom]{bottom:80px!important}}@media (min-width: 480px){.button-full-text{display:inline!important}}@media (max-width: 480px){.gallery-page h1{font-size:1.75rem!important;margin-bottom:12px!important}.gallery-page p{font-size:.95rem!important;margin-bottom:20px!important}.gallery-header-tabs{flex-direction:column!important;align-items:stretch!important;gap:8px!important;padding-bottom:12px!important;border-bottom:2px solid rgba(255,255,255,.1)!important}.gallery-header-tabs>div:first-child{width:100%!important;justify-content:space-between!important;gap:8px!important;order:1;border-bottom:none!important}.gallery-header-tabs>div:first-child button{flex:1 1 0;font-size:.9rem!important;padding:12px 16px!important;min-width:0}.gallery-header-tabs>div:last-child{width:100%!important;justify-content:space-between!important;gap:8px!important;order:2;margin-top:4px!important}.gallery-header-tabs>div:last-child button{flex:1 1 0;max-width:48%}}.shape-header .pill{transition:all .2s ease}.shape-header .pill:hover:not(:disabled){transform:translateY(-1px);box-shadow:0 4px 12px #0003}.shape-header .pill:active:not(:disabled){transform:translateY(0)}.shape-header .pill--primary{box-shadow:0 2px 8px #3b82f64d}.shape-header .pill--primary:hover:not(:disabled){box-shadow:0 4px 16px #3b82f666}.shape-header .pill:disabled{opacity:.4;cursor:not-allowed}.shape-header .pill--primary[title*=Add],.shape-header .pill--primary[title*=Remove]{font-weight:600}@keyframes modeSwitch{0%{transform:scale(1)}50%{transform:scale(1.05)}to{transform:scale(1)}}.shape-header .pill.pill--primary{animation:modeSwitch .3s ease}.shape-header .pill[title*=Undo]:not(:disabled){border:1px solid rgba(147,197,253,.2)}.shape-header .pill[title*=Save]:not(:disabled){background:linear-gradient(135deg,#3b82f6,#2563eb);font-weight:600}.shape-header .pill[title*=Save]:hover:not(:disabled){background:linear-gradient(135deg,#2563eb,#1d4ed8);box-shadow:0 6px 20px #2563eb80}@keyframes infoPulse{0%,to{opacity:1}50%{opacity:.6}}.shape-header .pill--chrome[title*=About]:not(:hover){animation:infoPulse 2s ease-in-out 3;animation-delay:2s}.shape-header .pill[title*="new puzzle" i]{border:1px solid rgba(59,130,246,.3);font-weight:500}.shape-header .pill[title*="new puzzle" i]:hover:not(:disabled){border-color:#3b82f680;background:#3b82f61a}html,body,#root{height:100%;margin:0;overflow:hidden;position:fixed;width:100%}.home-page{overflow-y:auto;position:static;height:auto;min-height:100vh}body:has(.home-page){overflow-y:auto;position:static}#root:has(.home-page){overflow-y:auto;position:static;height:auto}:root{font-family:Inter,system-ui,Avenir,Helvetica,Arial,sans-serif;line-height:1.5;font-weight:400;color-scheme:light dark;color:#ffffffde;background-color:#242424;font-synthesis:none;text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-webkit-text-size-adjust:100%}a{font-weight:500;color:#646cff;text-decoration:inherit}a:hover{color:#535bf2}body{margin:0;min-width:320px}h1{font-size:3.2em;line-height:1.1}button{border-radius:8px;border:1px solid transparent;padding:.6em 1.2em;font-size:1em;font-weight:500;font-family:inherit;background-color:#1a1a1a;color:inherit;cursor:pointer;transition:border-color .25s}button:hover{border-color:#646cff}button:focus,button:focus-visible{outline:4px auto -webkit-focus-ring-color}@media (prefers-color-scheme: light){:root{color:#213547;background-color:#fff}a:hover{color:#747bff}button{background-color:#f9f9f9}}
