:root{--text:#6b6375;--text-h:#08060d;--bg:#fbfaf8;--border:#dbd6d0;--code-bg:#f4f3ec;--accent:#c8333c;--accent-bg:#c8333c1f;--accent-border:#c8333c73;--civic-green:#2f8f4e;--civic-green-bg:#2f8f4e1f;--civic-green-border:#2f8f4e73;--shadow:#0000001a 0 10px 15px -3px, #0000000d 0 4px 6px -2px;--sans:system-ui, "Segoe UI", Roboto, sans-serif;--heading:system-ui, "Segoe UI", Roboto, sans-serif;--mono:ui-monospace, Consolas, monospace;font-family:var(--sans);letter-spacing:.18px;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light;color:var(--text);background:var(--bg);font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-size:18px;line-height:1.45}#root{min-height:100vh}body{color:var(--text);background:var(--bg);margin:0}button,input,textarea,select{font:inherit}h1,h2{font-family:var(--heading);color:var(--text-h);font-weight:500}h1{letter-spacing:-1.68px;margin:32px 0;font-size:56px}h2{letter-spacing:-.24px;margin:0 0 8px;font-size:24px;line-height:118%}p{margin:0}code,.counter{font-family:var(--mono);color:var(--text-h);border-radius:4px;display:inline-flex}code{background:var(--code-bg);padding:4px 8px;font-size:15px;line-height:135%}@media (width<=520px){:root{font-size:16px}h1{margin:20px 0;font-size:36px}h2{font-size:20px}}.app-shell{box-sizing:border-box;isolation:isolate;flex-direction:column;flex:1;gap:28px;min-height:100vh;padding:24px clamp(14px,2.8vw,32px) 32px;display:flex;position:relative}.app-shell:before{content:"";z-index:-1;background:linear-gradient(165deg,#c8333c47 0% 24%,#ebb4b86b 35%,#ffffffe6 44% 56%,#cde3d46b 65%,#2f8f4e47 76% 100%);position:absolute;inset:0}.notification-banner{z-index:1100;background:var(--accent);color:#fff;box-shadow:var(--shadow);border-radius:999px;padding:10px 16px;font-size:14px;font-weight:700;position:fixed;top:16px;left:50%;transform:translate(-50%)}.page-header{text-align:center;flex-direction:column;align-items:center;gap:20px;display:flex}.board-section{flex-direction:column;align-items:center;gap:18px;display:flex}.board-grid{-webkit-user-select:none;user-select:none;grid-template-columns:repeat(5,minmax(0,1fr));gap:clamp(6px,1.2vw,14px);width:min(100%,min(740px,100vh - 300px));margin:0 auto;display:grid}.board-cell{aspect-ratio:1;min-height:0;color:var(--text-h);text-align:center;background:#fffffffa;border:1px solid #08060d38;border-radius:18px;flex-direction:column;justify-content:center;align-items:stretch;gap:12px;padding:18px;transition:transform .18s,border-color .18s,box-shadow .18s,background .18s;display:flex;box-shadow:0 8px 22px #08060d1f}.board-cell,.board-cell .cell-text{color:var(--text-h);-webkit-user-select:none;user-select:none}.board-cell:hover:not(:disabled){border-color:var(--accent-border);box-shadow:var(--shadow);transform:translateY(-1px)}.board-cell:not(:disabled){cursor:pointer}.board-cell:disabled{opacity:1;cursor:not-allowed}.board-cell--selected{border-color:var(--accent-border);background:#c8333c3d}.board-cell--free{letter-spacing:.04em;font-weight:700}.board-cell--winning{background:#2f8f4e52;border-color:#2f8f4ebf}.board-cell--empty{color:var(--text);background:#ece9e4fa}.cell-text{text-align:center;flex:1;justify-content:center;align-items:center;font-size:.96rem;line-height:1.45;display:flex;overflow:hidden}.cell-placeholder{color:var(--text);opacity:.72}.new-game-button{align-self:center}.button-group{flex-wrap:wrap;justify-content:center;gap:12px;display:flex}.new-game-button,.edit-board-button,.share-button,.modal-close-button,.modal-secondary-button{cursor:pointer;border-radius:12px;font-size:16px;font-weight:600;transition:box-shadow .2s,background .2s,color .2s}.new-game-button,.modal-close-button{background:var(--accent);color:#fff;border:none}.edit-board-button{color:var(--text-h);background:#fff;border:2px solid #08060d33}.share-button,.modal-secondary-button{background:var(--civic-green);color:#fff;border:2px solid var(--civic-green)}.new-game-button,.modal-close-button,.edit-board-button,.share-button,.modal-secondary-button{padding:10px 24px}.modal-close-button,.modal-secondary-button{padding-inline:32px}.new-game-button:hover,.modal-close-button:hover,.edit-board-button:hover,.share-button:hover,.modal-secondary-button:hover{box-shadow:var(--shadow)}.edit-board-button:hover{border-color:var(--accent-border);color:var(--accent)}.custom-editor-overlay{z-index:1200;background:#00000073;justify-content:center;align-items:center;padding:20px;display:flex;position:fixed;inset:0;overflow:hidden}.custom-editor-content{box-sizing:border-box;background:#fffffff7;border:1px solid #08060d33;border-radius:20px;flex-direction:column;gap:16px;width:min(980px,100%);height:min(88vh,100vh - 40px);max-height:88vh;padding:20px;display:flex;overflow:hidden;box-shadow:0 18px 48px #08060d38}.custom-editor-scroll-area{flex-direction:column;flex:auto;gap:12px;min-height:0;display:flex}.custom-editor-content p{color:var(--text);margin:0}.custom-editor-selected-badge{z-index:2;max-width:100%;color:var(--accent);white-space:normal;overflow-wrap:anywhere;background:#c8333c1f;border:1px solid #c8333c59;border-radius:999px;align-self:flex-start;padding:6px 12px;font-size:.8rem;font-weight:700;display:none;position:sticky;top:0}.custom-editor-selected-badge--inactive{color:var(--text);background:#08060d0f;border-color:#08060d33}.custom-editor-layout{flex-direction:column;flex:auto;align-items:stretch;gap:12px;min-width:0;min-height:0;display:flex}.custom-editor-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;min-width:0;display:grid}.custom-editor-cell{box-sizing:border-box;text-align:left;background:#fffffff2;border:1px solid #08060d2e;border-radius:12px;flex-direction:column;gap:6px;min-width:0;padding:10px;display:flex}.custom-editor-cell--interactive{cursor:pointer;transition:border-color .16s,box-shadow .16s,transform .16s}.custom-editor-cell--interactive:hover{border-color:var(--accent-border);transform:translateY(-1px);box-shadow:0 8px 20px #08060d1f}.custom-editor-cell--active{border-color:var(--accent-border);box-shadow:inset 0 0 0 2px #c8333c38}.custom-editor-cell--dragged{opacity:.6;border-style:dashed}.custom-editor-cell--free{letter-spacing:.04em;color:var(--civic-green);background:#2f8f4e1f;justify-content:center;align-items:center;font-weight:700}.custom-editor-cell-label{color:var(--text);font-size:.74rem;font-weight:700}.custom-editor-cell-value{color:var(--text-h);-webkit-line-clamp:3;overflow-wrap:anywhere;-webkit-box-orient:vertical;font-size:.84rem;line-height:1.25;display:-webkit-box;overflow:hidden}.custom-editor-picker{box-sizing:border-box;scrollbar-width:none;-ms-overflow-style:none;background:#ffffffdb;border:1px solid #08060d29;border-radius:14px;flex-direction:column;flex:auto;gap:10px;width:100%;min-width:0;min-height:0;padding:12px;display:flex;overflow:hidden auto}.custom-editor-picker::-webkit-scrollbar{display:none}.custom-editor-search-wrap{flex-direction:column;gap:6px;width:100%;min-width:0;display:flex}.custom-editor-search-label{color:var(--text);font-size:.74rem;font-weight:700}.custom-editor-search-meta{justify-content:space-between;align-items:baseline;gap:10px;display:flex}.custom-editor-search-count{color:var(--text);opacity:.85;font-size:.74rem;font-weight:600}.custom-editor-search{width:100%;min-height:40px;color:var(--text-h);box-sizing:border-box;background:#fff;border:1px solid #08060d33;border-radius:10px;min-width:0;padding:6px 8px}.custom-editor-values{grid-template-columns:1fr;gap:8px;min-width:0;display:grid}.custom-editor-value{text-align:left;color:var(--text-h);white-space:normal;overflow-wrap:anywhere;background:#fff;border:1px solid #08060d29;border-radius:10px;padding:10px 12px;transition:border-color .16s,box-shadow .16s,transform .16s}.custom-editor-value:not(:disabled){cursor:pointer}.custom-editor-value:disabled{cursor:not-allowed;opacity:1}.custom-editor-value:hover:not(:disabled){border-color:var(--accent-border);transform:translateY(-1px);box-shadow:0 6px 14px #08060d1a}.custom-editor-value--used{background:#2f8f4e14;border-color:#2f8f4e59}.custom-editor-value--selected{background:#c8333c29;border-color:#c8333c9e;box-shadow:inset 0 0 0 1px #c8333c59}.custom-editor-buttons{background:#fffffff7;flex-wrap:wrap;flex:none;justify-content:flex-end;gap:10px;margin-top:auto;padding-top:10px;display:flex}.share-button:hover,.modal-secondary-button:hover{color:#fff;background:#256f3d;border-color:#256f3d}@media (width<=520px){.custom-editor-overlay{padding:8px}.board-grid{gap:6px}.board-cell{border-radius:10px;gap:4px;padding:6px}.cell-text{justify-content:center;align-items:center;max-height:100%;font-size:.63rem;line-height:1.15;display:flex;overflow:hidden}.custom-editor-content{height:calc(100dvh - 16px);max-height:calc(100dvh - 16px);padding:14px}.custom-editor-scroll-area{width:100%;overflow:hidden auto}.custom-editor-selected-badge{box-sizing:border-box;text-align:center;width:100%;display:block}.custom-editor-layout{gap:10px}.custom-editor-grid{gap:6px}.custom-editor-cell{height:68px;min-height:68px;max-height:68px;padding:7px;overflow:hidden}.custom-editor-cell-value{-webkit-line-clamp:2;font-size:.72rem}.custom-editor-picker{flex:none;width:100%;max-width:100%;min-height:auto;max-height:none;padding:10px;overflow:hidden visible}.custom-editor-values{gap:7px;width:100%;max-width:100%}.custom-editor-buttons{flex-wrap:nowrap;gap:8px}.custom-editor-buttons .modal-secondary-button,.custom-editor-buttons .modal-close-button{padding:8px 12px;font-size:14px;line-height:1.1}}.modal-overlay{z-index:1000;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);background:#00000080;justify-content:center;align-items:center;display:flex;position:fixed;inset:0}.modal-content{background:var(--bg);text-align:center;border-radius:24px;width:90%;max-width:500px;padding:48px;animation:.3s ease-out slideIn;box-shadow:0 20px 60px #0000004d}.modal-content h2{color:var(--accent);margin:0 0 16px;font-size:48px}.modal-content p{color:var(--text);margin:0 0 32px;font-size:18px}.modal-buttons{justify-content:center;gap:12px;display:flex}.modal-close-button{padding-block:12px}@keyframes slideIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}
