/* PathLab / second edition: quiet furniture, expressive ink. */
:root { --paper:#f5f0e6; --paper-raised:#faf8f2; --blue:#294ed0; --rule:#d9d5ca; --muted:#6d6b63; --shadow:0 4px 24px #27251f05; --sans:'Avenir Next',Avenir,'Segoe UI',sans-serif; }
body::after { opacity:.12; }
.paper-panel { box-shadow:none; }
.panel-rail { background:var(--paper-raised); color:#817e73; border-color:var(--rule); font-size:10px; }
.panel-rail[aria-expanded=true] { background:var(--paper-raised); color:var(--blue); }
.panel-rail::after,.masthead::before,.settings-header::after,.canvas-shell::before,.canvas-shell::after,.brush-card[aria-pressed=true]::after { display:none; }
.brush-panel { padding:30px 20px 20px; gap:24px; }
.masthead { padding-top:0; }
.eyebrow { white-space:nowrap; font-size:9px; letter-spacing:.12em; margin-bottom:18px; color:#757368; }
h1 { font-size:49px; line-height:.89; letter-spacing:-.055em; margin-bottom:18px; }
.intro { font-size:16px; line-height:1.4; }
.brush-list { gap:12px; }
.brush-card,.brush-list>button { grid-template-columns:1fr; padding:0; gap:0; border-radius:8px; border:1px solid transparent; background:transparent; transition:background .18s,border-color .18s,transform .18s; }
.brush-card:hover { transform:translateY(-2px); }
.brush-card[aria-pressed=true] { background:#fffdf7; border-color:var(--blue); box-shadow:0 3px 12px #294ed009; }
.brush-preview { height:95px; border-radius:6px; background:transparent; }
.brush-card__copy { padding:0 12px 12px; }
.brush-card strong { font-family:var(--sans); font-size:12px; font-weight:600; }
.brush-card small { font-size:10px; line-height:1.45; }
.panel-note { font-size:12px; border-color:var(--rule); }
.workspace { padding:12px; background:#eeece4; }
.canvas-shell { height:calc(100dvh - 24px); border-radius:3px; border:0; background:var(--paper); box-shadow:0 2px 8px #3027190a; }
.canvas-toolbar { padding:4px; gap:2px; border:1px solid #dedbd1; border-radius:12px; background:#fffdf5ed; box-shadow:0 3px 14px #30271907; }
.tool-button,.icon-button,.text-button,.quiet-button { border:0; box-shadow:none; backdrop-filter:none; background:transparent; border-radius:8px; font-size:11px; }
.tool-button[aria-pressed=true] { background:#294ed0; }
.text-button--blue { background:#294ed0; }
.settings-panel { padding:30px 22px 20px; gap:24px; }
.settings-header { padding-bottom:20px; }
.settings-header h2 { font-size:34px; }
.settings-header>p:last-child { font-size:11px; line-height:1.6; }
.section-mark { font-size:9px; letter-spacing:.14em; margin-bottom:12px; }
.settings-controls { gap:10px; }
.setting-control label,.palette-group legend { font-size:11px; font-weight:500; }
.setting-control output { font-family:var(--sans); font-size:11px; }
.palette-button { border:1px solid transparent; border-radius:6px; min-height:38px; }
.palette-button[aria-pressed=true] { box-shadow:none; background:#efeee7; border-color:#dad7cc; }
.swatch { width:15px; height:15px; border:0; }
.action-button { min-height:52px; border-radius:8px; padding:12px 14px; }
.action-button span { font-size:12px; }
.action-button small { font-size:10px; }
.empty-invitation { position:absolute; z-index:2; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; pointer-events:none; text-align:center; color:#294ed0; }
.empty-invitation[hidden] { display:none; }
.empty-invitation>span { font-size:9px; letter-spacing:.2em; margin-bottom:22px; }
.empty-invitation strong { font-family:var(--serif); font-weight:400; font-style:italic; font-size:clamp(42px,5.5vw,86px); line-height:.95; letter-spacing:-.05em; }
.empty-invitation p { color:#7d7a70; font-size:11px; line-height:1.8; margin:24px 0 10px; }
.empty-invitation svg { width:140px; height:45px; fill:none; stroke:#294ed0; stroke-width:1.2; }
@media(min-width:1051px) { .studio { grid-template-columns:28px 220px minmax(0,1fr) 28px 240px; } .panel-rail { width:28px; min-width:28px; } body.brushes-closed .studio { grid-template-columns:28px 0 minmax(0,1fr) 28px 240px; } body.settings-closed .studio { grid-template-columns:28px 220px minmax(0,1fr) 28px 0; } body.brushes-closed.settings-closed .studio { grid-template-columns:28px 0 minmax(0,1fr) 28px 0; } }
@media(max-width:820px) { .workspace { padding:0; } .canvas-shell { height:100dvh; border-radius:0; } .brush-panel,.settings-panel { padding:24px 18px; } .empty-invitation strong { font-size:48px; } .canvas-toolbar { padding:2px; gap:0; } }
@media(prefers-reduced-motion:reduce) { .brush-card { transition:none; } }

/* Brush collections share the same sheet and composition. */
.mode-switch { display:flex; padding:3px; gap:2px; border:1px solid var(--rule); border-radius:8px; background:#eeece4; }
.mode-switch button { flex:1; min-height:38px; padding:7px 4px; border:0; border-radius:5px; background:transparent; color:var(--muted); font:600 10px var(--sans); cursor:pointer; }
.mode-switch button[aria-pressed="true"] { color:var(--blue); background:var(--paper-raised); box-shadow:0 1px 4px #30271910; }
.mode-switch button:focus-visible { outline:2px solid var(--blue); outline-offset:2px; }
.brush-card[hidden] { display:none; }

h1[data-mode="networks"] { font-size:42px; }
@media (min-height:650px) and (max-height:850px) {
  .brush-panel { gap:16px; padding-top:22px; }
  .brush-preview { height:68px; }
  .eyebrow { margin-bottom:12px; }
  .masthead h1 { margin-bottom:12px; }
  .brush-card__copy { padding-bottom:8px; }
}

.mode-switch { flex-wrap:wrap; }
.mode-switch button { flex:1 1 70px; }
.mode-switch button:last-child:nth-child(3) { flex-basis:100%; }
#format { cursor:pointer; min-height:32px; padding:4px 8px; border:1px solid var(--rule); background:var(--paper-raised); }

h1[data-mode="undergrowth"] { font-size:31px; overflow-wrap:normal; letter-spacing:-.055em; }
.mode-switch { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }

.notation-toggle { display:flex; align-items:center; justify-content:space-between; gap:12px; font:500 11px var(--sans); padding:10px 0; cursor:pointer; }
.notation-toggle[hidden] { display:none; }
.notation-toggle input { accent-color:var(--blue); width:16px; height:16px; cursor:pointer; }

/* Compact paint selectors in PathLab. */
.water-option { align-items:center; gap:12px; }
.water-option > span { font-size:11px; font-weight:500; }
.water-option select { max-width:112px; min-width:0; font:12px var(--sans); color:var(--ink); padding:7px 8px; border:1px solid #cbc8bf; border-radius:5px; background:transparent; }

.water-option[hidden] { display:none !important; }

/* A small, reusable ink set beside the drawing controls. */
.cipher-palette-editor { min-width:0; display:grid; gap:8px; margin:8px 0 0; padding:14px 0 0; border:0; border-top:1px solid var(--rule); font:11px var(--sans); }
.cipher-palette-editor[hidden],.cipher-palette-editor [hidden] { display:none; }
.cipher-palette-editor legend { padding:0 6px 0 0; font-weight:600; }
.cipher-palette-editor label { font-size:10px; font-weight:500; }
.cipher-palette-editor input[type="text"],.cipher-palette-editor select { width:100%; min-width:0; min-height:34px; padding:7px 8px; color:var(--ink); border:1px solid #cbc8bf; border-radius:5px; background:transparent; font:11px var(--sans); }
.cipher-palette-editor input[type="text"] { margin-top:-3px; }
.cipher-palette-editor input[type="text"]::placeholder { color:var(--muted); }
.cipher-palette-row { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.cipher-palette-picker { margin-bottom:2px; }
.cipher-palette-picker select { flex:1; }
.cipher-palette-details { min-width:0; }
.cipher-palette-details summary { padding:7px 0; color:var(--blue); font-weight:500; cursor:pointer; }
.cipher-palette-details summary:focus-visible { outline:2px solid var(--blue); outline-offset:3px; border-radius:3px; }
.cipher-palette-details[open] summary { margin-bottom:8px; }
.cipher-palette-fields { display:grid; gap:8px; }
.cipher-palette-editor button { min-height:32px; min-width:0; font:500 11px var(--sans); border-radius:5px; }
.cipher-palette-link { padding:4px 0; color:var(--blue); background:transparent; text-align:left; white-space:nowrap; }
.cipher-palette-colors { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px 7px; }
.cipher-palette-swatch { min-width:0; }
.cipher-palette-swatch input[type="color"] { display:block; width:100%; height:34px; padding:2px; border:1px solid #cbc8bf; border-radius:5px; background:var(--paper-raised); cursor:pointer; }
.cipher-palette-swatch input[type="color"]::-webkit-color-swatch-wrapper { padding:1px; }
.cipher-palette-swatch input[type="color"]::-webkit-color-swatch { border:0; border-radius:2px; }
.cipher-palette-swatch input[type="color"]::-moz-color-swatch { border:0; border-radius:2px; }
.cipher-palette-swatch-detail { display:flex; justify-content:space-between; align-items:center; padding-left:4px; color:var(--muted); }
.cipher-palette-swatch-detail button { min-width:24px; min-height:24px; padding:0; background:transparent; color:var(--muted); font-size:16px; }
.cipher-palette-count { font-size:10px; color:var(--muted); white-space:nowrap; }
.cipher-palette-save { width:100%; min-height:36px !important; padding:8px 10px; color:var(--paper-raised); background:var(--blue); }
#cipher-palette-delete { justify-self:start; color:var(--muted); }
#cipher-palette-status { margin:0; font-size:10px; line-height:1.5; color:var(--muted); overflow-wrap:anywhere; }
.mode-switch button:last-child:nth-child(7) { grid-column:1/-1; }

.notation-paper-controls { border-top:1px solid var(--rule); margin-top:4px; }
.notation-paper-controls[hidden],.notation-paper-controls [hidden] { display:none; }
.notation-paper-color { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:0 0 8px; font:11px var(--sans); }
.notation-paper-color input { width:44px; height:30px; padding:2px; border:1px solid var(--rule); border-radius:5px; background:var(--paper-raised); cursor:pointer; }
