.scheme-main{background:var(--surface);padding:16px 24px 24px}
.scheme-main:focus-visible{outline:0}
.scheme-editor-page{max-width:1200px;container-type:inline-size}
.scheme-picker{--scheme-fill:#f7f9fc;--scheme-border:#dce4ef}
.scheme-picker-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.scheme-picker-header h2{font-size:16px}
.scheme-category+.scheme-category{margin-top:16px;padding-top:16px;border-top:1px solid var(--scheme-border)}
.scheme-groups{display:grid;gap:12px}
.scheme-groups-balls{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.scheme-pick-section{min-width:0;padding:0 0 12px;border-bottom:1px solid var(--line)}
.scheme-pick-section:not(.scheme-ball-section){display:grid;grid-template-columns:112px minmax(0,1fr);gap:12px;align-items:start}
.scheme-pick-section:last-child{border-bottom:0;padding-bottom:0}
.scheme-ball-section,.scheme-ball-section:last-child{border:1px solid var(--line);border-radius:8px;padding:12px;background:var(--surface)}
.scheme-group-heading{display:flex;align-items:center;gap:8px;margin-bottom:10px;min-height:32px}
.scheme-pick-section:not(.scheme-ball-section) .scheme-group-heading{margin-bottom:0;min-height:36px}
.scheme-group-heading h3{margin:0;font-size:13px;font-weight:600}
.scheme-ball-letter{display:grid;place-items:center;width:28px;height:28px;border-radius:5px;background:var(--blue-soft);color:var(--primary);font-size:16px;font-weight:650}
.scheme-option-block+.scheme-option-block{margin-top:10px}
.scheme-options{display:grid;grid-template-columns:repeat(14,minmax(0,1fr));gap:6px}
.scheme-options-basic{grid-template-columns:repeat(8,minmax(0,1fr))}
.scheme-options-shape,.scheme-options-combo{grid-template-columns:repeat(6,minmax(0,1fr))}
.scheme-options-tail{grid-template-columns:repeat(10,minmax(0,1fr))}
.scheme-options-ball{grid-template-columns:repeat(5,minmax(0,1fr))}
.scheme-options-ball-types{grid-template-columns:repeat(4,minmax(0,1fr))}
.scheme-pick{position:relative;min-width:0;min-height:36px;padding:4px 2px;border:1px solid transparent;border-radius:5px;background:var(--scheme-fill);color:var(--text);font-size:14px;font-variant-numeric:tabular-nums;transition:background .15s,border-color .15s,color .15s}
.scheme-pick:hover{background:var(--blue-soft);border-color:var(--scheme-border)}
.scheme-pick[aria-pressed=true]{background:var(--primary);border-color:var(--primary);color:#fff;font-weight:600}
.scheme-pick[aria-pressed=true]:hover{background:var(--primary-dark);border-color:var(--primary-dark)}
.scheme-selection{margin-top:16px;border:1px solid #e0e6ef;border-radius:5px;overflow:hidden}
.scheme-name-row,.scheme-selected-row{display:grid;grid-template-columns:84px minmax(0,1fr) auto;gap:16px;align-items:center}
.scheme-name-row{padding:12px 16px;background:#f7f9fc}
.scheme-name-row label,.scheme-selected-row h3{margin:0;color:#52637c;font-size:13px;font-weight:500;white-space:nowrap}
.scheme-name-row input{width:100%;max-width:420px;min-width:0;min-height:36px;padding:6px 10px;border:1px solid #d5deeb;border-radius:5px;background:#fff;color:var(--text);font-size:14px}
.scheme-name-row input:hover{border-color:#b9c8dd}
.scheme-name-row input:focus-visible{outline:2px solid #91b1e0;outline-offset:2px}
.scheme-save{justify-self:end;min-height:36px;padding:6px 22px;border:1px solid #315fa7;border-radius:5px;background:#315fa7;color:#fff;font-size:13px;white-space:nowrap}
.scheme-save:hover{background:#284e89}
.scheme-save:disabled{opacity:.65;cursor:wait}
.scheme-selected-row{padding:10px 16px;border-top:1px solid #e5eaf1}
.scheme-selected-row h3{display:flex;align-items:center;gap:7px}
.scheme-selected-row h3 span{min-width:22px;padding:0 5px;border-radius:3px;background:#edf3ff;color:#315fa7;font-size:12px;text-align:center;font-variant-numeric:tabular-nums}
.scheme-selected-content{min-width:0}
.scheme-save-feedback{margin:8px 0 0;font-size:13px;color:var(--primary)}
.scheme-clear{min-height:32px;padding:4px 0 4px 12px;background:transparent;color:var(--primary);font-size:13px}
.scheme-clear:hover{background:transparent;color:var(--primary-dark);text-decoration:underline}
.scheme-clear:disabled{color:var(--muted);opacity:.6;cursor:default;text-decoration:none}
.scheme-selection-empty{margin:0;font-size:12px;color:var(--muted)}
.scheme-selection-list{display:flex;flex-wrap:wrap;gap:7px}
.scheme-selection-chip{display:inline-flex;align-items:center;gap:8px;min-height:32px;padding:4px 8px;background:#f4f7fb;border:1px solid #e1e7ef;border-radius:4px;color:#335781;font-size:12px}
.scheme-selection-chip:hover{background:#e1ebff;border-color:var(--primary)}
.scheme-chip-group{color:var(--muted);font-size:12px}
.scheme-selection-chip svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round}
.scheme-picker button:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
.scheme-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
@container(max-width:600px){
 .scheme-groups-balls{grid-template-columns:1fr}
}
@media(min-width:768px) and (max-width:1050px){
 .scheme-groups-balls{gap:12px}
 .scheme-ball-section,.scheme-ball-section:last-child{padding:16px 12px}
 .scheme-groups-balls .scheme-options{gap:6px}
 .scheme-groups-balls .scheme-pick{font-size:14px}
 .scheme-group-heading{gap:8px}
 .scheme-ball-letter{width:28px;height:28px;font-size:16px}
}
@media(max-width:767px){
 .scheme-main{padding:12px}
 .scheme-pick-section:not(.scheme-ball-section){grid-template-columns:1fr;gap:6px}
 .scheme-pick-section:not(.scheme-ball-section) .scheme-group-heading{min-height:24px}
 .scheme-picker-header{gap:8px;margin-bottom:12px;flex-wrap:wrap}
 .scheme-groups{gap:12px}
 .scheme-groups-balls{grid-template-columns:1fr;gap:12px}
 .scheme-ball-section,.scheme-ball-section:last-child{padding:12px}
 .scheme-options{grid-template-columns:repeat(7,minmax(0,1fr))}
 .scheme-options-basic,.scheme-options-ball-types{grid-template-columns:repeat(4,minmax(0,1fr))}
 .scheme-options-shape,.scheme-options-combo{grid-template-columns:repeat(3,minmax(0,1fr))}
 .scheme-options-tail,.scheme-options-ball{grid-template-columns:repeat(5,minmax(0,1fr))}
 .scheme-pick{min-height:44px;font-size:16px}
 .scheme-name-row,.scheme-selected-row{grid-template-columns:84px minmax(0,1fr);gap:10px;padding:10px 12px}
 .scheme-name-row input{min-height:44px;font-size:16px}
 .scheme-save,.scheme-clear{grid-column:2;justify-self:end;min-height:44px}
 .scheme-selection-chip{min-height:36px}
}
@media(prefers-reduced-motion:reduce){.scheme-picker button{transition:none}}

.scheme-saved-row{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:16px 0}
.scheme-saved-row+.scheme-saved-row{border-top:1px solid var(--line)}
.scheme-saved-row>div{min-width:0}
.scheme-saved-row h3{margin:0 0 6px;font-size:14px;overflow-wrap:anywhere}
.scheme-saved-row p{margin:0;color:var(--muted);font-size:12px;overflow-wrap:anywhere}
.scheme-saved-row>a{flex-shrink:0}
