*{box-sizing:border-box}html,body{margin:0;padding:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,sans-serif;background:#f6f6f8;color:#222}#root{min-height:100vh;padding:24px 16px}.menu,.view{max-width:560px;margin:0 auto;display:flex;flex-direction:column;gap:16px}h1{margin:0;font-size:28px}h2{margin:0;font-size:18px;font-weight:600}.view__header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:8px}.view__header>:first-child{justify-self:start}.view__header>:last-child{justify-self:end}.hint{margin:0;color:#666;font-size:14px}.btn{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:1px solid #ccc;background:#fff;padding:8px 14px;border-radius:6px;font-size:14px;cursor:pointer;font-family:inherit;color:#222}.btn:hover{background:#f0f0f3}.btn:disabled{opacity:.5;cursor:not-allowed}.btn--primary{background:#2b6cff;color:#fff;border-color:#2b6cff}.btn--primary:hover{background:#1f5be0}.btn--active{background:#ffd84a;border-color:#e9c33b;color:#222}.btn--danger{border-color:#d33;color:#d33}.btn--danger:hover{background:#fde7e7}.saved-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}.saved-item{display:flex;gap:8px;align-items:stretch}.saved-item__open{flex:1;text-align:left;display:flex;justify-content:space-between;align-items:center;gap:12px;background:#fff;border:1px solid #ddd;border-radius:6px;padding:10px 14px;cursor:pointer;font-family:inherit;font-size:14px}.saved-item__open:hover{background:#f0f0f3}.saved-item__main{display:flex;flex-direction:column;gap:2px}.saved-item__name{font-weight:600}.saved-item__date{color:#888;font-size:12px}.status{font-size:12px;font-weight:600;padding:3px 8px;border-radius:999px;white-space:nowrap}.status--solved{background:#d8f5d4;color:#1e6e1e}.status--started{background:#fff2c9;color:#8a6d00}.status--empty{background:#ececec;color:#666}.loading{max-width:560px;margin:0 auto;padding:32px;text-align:center;color:#666}.error-banner{max-width:560px;margin:0 auto 12px;padding:10px 14px;background:#ffe1e1;border:1px solid #f0b3b3;color:#a33;border-radius:6px;font-size:13px}.actions{display:flex;gap:8px;flex-wrap:wrap}.grid{display:grid;grid-template-columns:repeat(9,1fr);grid-template-rows:repeat(9,1fr);width:100%;max-width:480px;aspect-ratio:1 / 1;background:#222;gap:1px;padding:2px;border:2px solid #222;margin:0 auto;-webkit-user-select:none;user-select:none}.cell{background:#fff;position:relative;display:flex;align-items:center;justify-content:center;font-size:clamp(16px,4.5vw,24px);font-weight:500}.grid>.cell:nth-child(3n):not(:nth-child(9n)){margin-right:2px}.grid>.cell:nth-child(n+19):nth-child(-n+27),.grid>.cell:nth-child(n+46):nth-child(-n+54){margin-bottom:2px}.cell--locked{background:#fafafa}.cell--conflict{background:#ffe1e1}.cell--conflict .cell-value,.cell--conflict .cell-input{color:#d33!important}.cell--erasable{cursor:pointer;background:#fff7d6}.cell--erasable:hover{background:#ffeaa0}.cell-value{color:#2b6cff}.cell-value--locked{color:#222;font-weight:600}.cell-input{width:100%;height:100%;border:0;background:transparent;text-align:center;font:inherit;font-size:inherit;color:#2b6cff;padding:0;outline:none}.cell-input:focus{background:#e8f0ff}.cell-input--overlay{position:absolute;top:0;right:0;bottom:0;left:0;color:transparent;caret-color:transparent;pointer-events:auto}.cell-input--overlay:focus{background:#2b6cff14}.candidates{position:absolute;top:3px;right:3px;bottom:3px;left:3px;display:grid;grid-template-columns:repeat(3,1fr);grid-template-rows:repeat(3,1fr);font-size:clamp(8px,1.8vw,11px);color:#777;font-weight:500;pointer-events:none;min-height:0}.candidate{display:flex;align-items:center;justify-content:center;line-height:1;min-height:0;min-width:0}
