/* 11/18/2026 - Style a responsive drag/drop board and rack editor using the existing SixCourts palette. */
.editor-shell{min-height:100dvh;max-width:1330px;margin:0 auto;padding:0 clamp(16px,3.3vw,42px) 48px;color:var(--ink);font-family:var(--font)}
.editor-nav{display:flex;align-items:center;gap:24px;border-bottom:1px solid var(--line);min-height:76px}
.editor-nav a{color:var(--ink);font-size:13px;text-decoration:none}
.editor-nav a:hover{color:var(--gold)}
.editor-nav .theme-picker{margin-left:auto}
.editor-wordmark{font-family:var(--display);font-size:24px!important}
.editor-heading{display:flex;justify-content:space-between;align-items:end;gap:28px;padding:28px 0 24px}
.editor-heading h1{font-family:var(--display);font-size:clamp(36px,5vw,60px);font-weight:400;letter-spacing:-.04em;margin:0 0 8px}
.editor-heading p:not(.editor-eyebrow){max-width:640px;color:var(--muted);font-size:14px;margin:0}
.editor-eyebrow{text-transform:uppercase;font-size:11px;letter-spacing:.18em;color:var(--gold);margin:0 0 8px}
.editor-head-actions{display:flex;flex-wrap:wrap;gap:8px}
.editor-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(330px,.85fr);gap:24px;align-items:start}
.editor-primary,.editor-sidebar{display:flex;flex-direction:column;gap:18px;min-width:0}
.editor-board-card,.editor-palette-card,.editor-panel{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:18px;min-width:0}
.editor-section-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.editor-section-head strong{font-family:var(--display);font-size:20px;font-weight:500}
.editor-section-head span,.editor-muted,.editor-hint{color:var(--muted);font-size:12px}
.editor-board{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));aspect-ratio:1;width:min(100%,590px);margin:auto;border:2px solid var(--line);border-radius:6px;overflow:hidden}
.editor-square{background:var(--board-light,#e8dcbf);border:1px solid var(--line);position:relative;display:grid;place-items:center;padding:4px;min-width:0;aspect-ratio:1;cursor:pointer;color:var(--ink)}
.editor-square:nth-child(12n+7),.editor-square:nth-child(12n+9),.editor-square:nth-child(12n+11),.editor-square:nth-child(12n+2),.editor-square:nth-child(12n+4),.editor-square:nth-child(12n+6){background:var(--board-dark,var(--gold-soft,#bcb195))}
.editor-square:hover,.editor-square-selected{outline:3px solid var(--gold);outline-offset:-3px;z-index:1}
.editor-square-coordinate{position:absolute;left:5px;top:3px;font-size:10px;font-weight:600;opacity:.75;pointer-events:none}
.editor-board-piece,.editor-palette-piece,.editor-rack-piece{display:grid;place-items:center;position:relative;background:var(--tile-face,#f3e8ce);color:var(--faction-color);border:1px solid var(--faction-dark,#777);border-radius:5px;box-shadow:0 2px 2px #0003;cursor:grab}
.editor-board-piece{width:80%;height:80%;touch-action:manipulation}
.editor-board-piece .piece-icon{width:60%;height:60%;fill:currentColor}
.editor-board-piece .sc-gem,.editor-palette-piece .sc-gem,.editor-rack-piece .sc-gem{pointer-events:none}
.editor-palette{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}
.editor-palette-cell{position:relative;padding:2px;background:transparent;border:1px solid var(--line);border-radius:6px;min-width:0;aspect-ratio:1;cursor:pointer}
.editor-palette-cell:disabled{opacity:.35;cursor:not-allowed}
.editor-palette-cell:hover:not(:disabled),.editor-palette-chosen{outline:2px solid var(--gold)}
.editor-palette-piece{width:92%;height:92%;margin:auto}
.editor-palette-piece .piece-icon{width:57%;height:57%;fill:currentColor}
.editor-copy-count{position:absolute;right:2px;bottom:1px;background:var(--surface);color:var(--ink);border-radius:8px;padding:0 3px;line-height:1.4;font-size:10px;font-weight:700}
.editor-tool-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:12px}
.editor-tool-actions .editor-hint{flex:1;min-width:160px}
.editor-panel h2{font-family:var(--display);font-weight:500;font-size:20px;margin:0 0 16px}
.editor-setting-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.editor-setting-grid label,.editor-import-export label{font-size:12px;color:var(--muted);display:block;margin-bottom:6px}
.editor-hidden{grid-column:1/-1;display:flex!important;align-items:center;gap:9px;color:var(--ink)!important;margin-top:4px}
.editor-current{float:right;color:var(--gold);font:600 11px var(--font);text-transform:uppercase;letter-spacing:.08em}
.editor-rack-heading{margin:16px 0 8px}
.editor-rack-heading strong{font:600 12px var(--font);color:var(--muted)}
.editor-rack{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:4px}
.editor-rack-slot{display:grid;place-items:center;min-width:0;aspect-ratio:.82;background:var(--gold-soft,#bcb195);border:1px dashed var(--line);border-radius:5px;padding:2px;cursor:pointer}
.editor-rack-slot:hover{outline:2px solid var(--gold)}
.editor-rack-piece{width:100%;height:100%;box-shadow:none}
.editor-rack-piece .piece-icon{width:60%;height:60%;fill:currentColor}
.editor-rack-empty{font-size:18px;color:var(--muted)}
.editor-import-export .editor-muted{margin:-6px 0 14px}
.editor-import-export textarea{width:100%;margin:0 0 10px}
.editor-code{font:12px/1.5 ui-monospace,SFMono-Regular,Consolas,monospace;overflow-wrap:anywhere}
.editor-output-label{margin-top:18px}
.editor-action{margin-bottom:4px}
.editor-error,.editor-warning,.editor-success,.editor-feedback{font-size:12px;margin:8px 0;line-height:1.45}
.editor-error{color:#e98181}.editor-warning{color:var(--gold)}.editor-success{color:var(--ink)}
.editor-bottom-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:13px}
.editor-bottom-actions .btn{flex:1;min-width:110px}
.editor-shell button:focus-visible,.editor-shell a:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
@media(max-width:970px){.editor-layout{grid-template-columns:1fr}.editor-heading{align-items:start;flex-direction:column}.editor-primary{max-width:690px;width:100%;margin:auto}.editor-sidebar{max-width:690px;width:100%;margin:auto}}
@media(max-width:480px){.editor-nav{gap:12px}.editor-board-card,.editor-palette-card,.editor-panel{padding:12px}.editor-palette{gap:4px}.editor-square-coordinate{font-size:8px;top:2px;left:2px}.editor-rack{gap:2px}.editor-heading{padding:20px 0}.editor-section-head strong{font-size:17px}.editor-section-head span{font-size:10px}}
