/* MyMusic Studio v3 — original dark studio aesthetic */

:root {
  /* Surfaces */
  --bg:        #0E1014;
  --bg-1:     #14171D;
  --bg-2:     #1A1E26;
  --bg-3:     #232833;
  --line:      #2A3040;
  --line-2:    #353C4D;

  /* Text */
  --ink:       #E8EAEE;
  --ink-2:     #B5BAC6;
  --ink-3:     #7E8597;
  --ink-4:     #555C6E;

  /* Accents */
  --amber:     #E8A65C;
  --amber-2:   #F5C68B;
  --amber-deep:#B57B3A;
  --teal:      #4AB8A8;
  --rose:      #D86B7A;
  --violet:    #8A7BD0;
  --green:     #7CB987;
  --red:       #D86B6B;

  /* Section colors */
  --c-intro:   #6FA8C9;
  --c-verse:   #E8A65C;
  --c-chorus:  #D86B7A;
  --c-bridge:  #8A7BD0;
  --c-outro:   #7E8597;
  --c-build:   #4AB8A8;

  /* Type */
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;
  --f-sans: 'Inter Tight', 'Inter', system-ui, -apple-system, sans-serif;
  --f-display: 'Instrument Serif', 'Cormorant Garamond', serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-sans);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  overflow: hidden;
  height: 100vh;
}

button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; color: inherit; }
input:focus, textarea:focus, select:focus { outline: none; }

/* App shell */
.app {
  display: grid;
  grid-template-rows: 44px 1fr 88px;
  height: 100vh;
  background: var(--bg);
}

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  display: flex; align-items: center;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(to bottom, #14171D, #11141A);
  padding: 0 14px;
  gap: 16px;
  user-select: none;
}
.topbar .traffic {
  display: flex; gap: 6px;
  margin-right: 4px;
}
.topbar .traffic span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--bg-3);
}
.topbar .traffic span:nth-child(1) { background: #E0625B; }
.topbar .traffic span:nth-child(2) { background: #DEA13D; }
.topbar .traffic span:nth-child(3) { background: #6CB04A; }
.topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: .04em;
}
.topbar .brand .mark {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--amber);
}
.topbar .brand .mark svg { width: 18px; height: 18px; display: block; }
.topbar .brand .mark-old {
  width: 22px; height: 22px;
  background: var(--ink);
  color: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-style: italic; font-size: 16px;
  font-weight: 600;
  border-radius: 3px;
}
.topbar .brand .name { color: var(--ink); font-weight: 500; }
.topbar .brand .name em { color: var(--amber); font-style: italic; font-family: var(--f-display); font-weight: 500; font-size: 14px; padding-left: 2px; }
.topbar .crumbs {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-3);
  font-family: var(--f-mono); font-size: 11px;
  margin-left: 12px;
}
.topbar .crumbs .sep { opacity: .5; }
.topbar .crumbs .now { color: var(--ink); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.topbar .pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  color: var(--ink-2);
  letter-spacing: .03em;
}
.topbar .pill .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 5px var(--green);
}

/* ── Workspace (3 columns) ───────────────────────────────────── */
.workspace {
  display: grid;
  grid-template-columns: 360px 1fr 420px;
  height: 100%;
  min-height: 0;
}

.panel {
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex; flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.panel:last-child { border-right: 0; }

/* Panel header */
.panel-head {
  display: flex; align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  gap: 10px;
  min-height: 38px;
  flex-shrink: 0;
}
.panel-head .num {
  font-family: var(--f-mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: .08em;
}
.panel-head .title {
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--ink);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.panel-head .hint {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  margin-left: 4px;
}
.panel-head .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.panel-body {
  flex: 1; min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--bg-3) transparent;
}
.panel-body::-webkit-scrollbar { width: 8px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 4px; }
.panel-body::-webkit-scrollbar-track { background: transparent; }

/* ── Lyrics panel ────────────────────────────────────────────── */
.lyrics-area {
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 10px;
  height: 100%;
}
.lyrics-textarea {
  flex: 1;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.65;
  resize: none;
  min-height: 240px;
  caret-color: var(--amber);
  letter-spacing: .005em;
}
.lyrics-textarea::placeholder {
  color: var(--ink-4);
  font-style: italic;
}
.lyrics-textarea:focus {
  border-color: var(--amber-deep);
  box-shadow: inset 0 0 0 1px var(--amber-deep);
}

.lyrics-footer {
  display: flex; flex-direction: column; gap: 8px;
}
.preset-row {
  display: flex; gap: 6px; flex-wrap: wrap;
  align-items: center;
}
.preset-row .label {
  font-family: var(--f-mono);
  font-size: 9.5px; letter-spacing: .12em;
  color: var(--ink-4); text-transform: uppercase;
  margin-right: 4px;
}

.chip {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  padding: 4px 10px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  border-radius: 999px;
  letter-spacing: .02em;
  transition: all .12s;
}
.chip:hover { border-color: var(--amber-deep); color: var(--amber-2); background: rgba(232,166,92,.06); }
.chip.on, .chip.amber {
  background: rgba(232,166,92,.12);
  border-color: var(--amber-deep);
  color: var(--amber-2);
}
.chip.solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.meta-line {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: .03em;
}
.meta-line .led { display: inline-flex; gap: 8px; align-items: center; }
.meta-line .led b { color: var(--ink-2); font-weight: 500; }

/* ── Structure / XML panel ────────────────────────────────────── */
.structure-area {
  padding: 14px 16px 24px;
  display: flex; flex-direction: column; gap: 14px;
}

/* Title + genre tags */
.song-id {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
}
.song-id .label {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.song-id .title-input {
  background: transparent; border: 0;
  color: var(--ink);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 24px;
  width: 100%;
  padding: 2px 0;
  line-height: 1.2;
}
.song-id .genre-tags {
  display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap;
  align-items: center;
}
.song-id .genre-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px 3px 8px;
  border: 1px solid var(--amber-deep);
  background: rgba(232,166,92,.08);
  color: var(--amber-2);
  border-radius: 2px;
  font-family: var(--f-mono);
  font-size: 10.5px; letter-spacing: .02em;
}
.song-id .genre-tag .x {
  cursor: pointer; opacity: .6;
  font-size: 13px; line-height: 1; padding: 0 0 1px 2px;
}
.song-id .genre-tag .x:hover { opacity: 1; }
.song-id .add-tag {
  background: transparent; border: 1px dashed var(--line-2);
  color: var(--ink-4); padding: 3px 9px;
  border-radius: 2px;
  font-family: var(--f-mono); font-size: 10.5px;
}
.song-id .add-tag:hover { color: var(--amber-2); border-color: var(--amber-deep); }

/* XML structure */
.xml-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.xml-card .head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.xml-card .head .title {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink-2); letter-spacing: .05em;
}
.xml-card .head .by {
  font-family: var(--f-display); font-style: italic;
  font-size: 12px; color: var(--ink-4);
}
.xml-card .toggle-view {
  margin-left: auto;
  display: flex; gap: 0;
  border: 1px solid var(--line-2);
  border-radius: 3px;
  overflow: hidden;
}
.xml-card .toggle-view button {
  background: transparent;
  border: 0;
  color: var(--ink-3);
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .04em;
  padding: 4px 9px;
  text-transform: uppercase;
}
.xml-card .toggle-view button.on {
  background: var(--bg-3);
  color: var(--ink);
}

.xml-card .body { padding: 8px; }

/* Sections list (visual mode) */
.sections {
  display: flex; flex-direction: column; gap: 6px;
}
.section-row {
  display: grid;
  grid-template-columns: 18px 110px 1fr 64px 24px;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  background: var(--bg-2);
  border: 1px solid transparent;
  border-radius: 3px;
  transition: all .12s;
}
.section-row:hover { border-color: var(--line-2); }
.section-row.selected {
  border-color: var(--amber-deep);
  background: rgba(232,166,92,.04);
}
.section-row .grip {
  color: var(--ink-4);
  font-family: var(--f-mono); font-size: 12px;
  cursor: grab; line-height: 1;
  letter-spacing: -1px;
}
.section-row .typ {
  display: flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.section-row .typ .swatch {
  width: 7px; height: 7px; border-radius: 1px;
  flex-shrink: 0;
}
.section-row .type-select {
  background: transparent; border: 0;
  color: var(--ink-2);
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase;
  padding: 2px 14px 2px 2px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'><path fill='%237E8597' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0 center;
  cursor: pointer;
  border-radius: 2px;
}
.section-row .type-select:hover { color: var(--amber-2); }
.section-row .type-select option {
  background: var(--bg-2); color: var(--ink);
}
.section-row .desc-open {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0;
  padding: 4px 8px; border-radius: 2px;
  text-align: left; min-width: 0;
  color: var(--ink-2);
  font-family: var(--f-sans); font-size: 12px;
  border: 1px solid transparent;
  transition: all .12s;
}
.section-row .desc-open:hover {
  background: var(--bg-3);
  border-color: var(--line-2);
  color: var(--ink);
}
.section-row .desc-open .desc-text {
  flex: 1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.section-row .desc-open .desc-text em {
  color: var(--ink-4); font-style: italic;
  font-family: var(--f-display); font-size: 13px;
}
.section-row .desc-open .ctx-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 5px var(--amber);
  flex-shrink: 0;
}
.section-row .dur {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--ink-3);
  text-align: right;
  display: flex; gap: 4px; align-items: center; justify-content: flex-end;
}
.section-row .dur input {
  width: 32px; background: transparent; border: 0;
  color: var(--ink);
  font-family: var(--f-mono); font-size: 10.5px;
  text-align: right;
  border-bottom: 1px dotted var(--line-2);
}
.section-row .x {
  background: transparent; border: 0;
  color: var(--ink-4);
  width: 22px; height: 22px; border-radius: 2px;
  display: inline-flex; align-items: center; justify-content: center;
}
.section-row .x:hover { color: var(--red); background: rgba(216,107,107,.1); }

.add-section-row {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 8px 4px 2px;
}
.add-section-row .lbl {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4);
  align-self: center;
  padding: 0 6px;
}
.add-btn {
  background: transparent;
  border: 1px solid var(--line-2);
  color: var(--ink-2);
  padding: 4px 9px 4px 7px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .04em;
  border-radius: 2px;
  display: inline-flex; align-items: center; gap: 5px;
}
.add-btn .plus { color: var(--amber); font-size: 13px; line-height: 1; }
.add-btn:hover { border-color: var(--amber-deep); color: var(--ink); background: rgba(232,166,92,.05); }

/* Code/XML view */
.xml-code {
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-2);
  padding: 12px 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.xml-code .tag { color: #6FA8C9; }
.xml-code .attr { color: var(--amber-2); }
.xml-code .str { color: #B8D192; }
.xml-code .txt { color: var(--ink); }
.xml-code .com { color: var(--ink-4); font-style: italic; }

/* Timeline strip */
.timeline {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}
.timeline .row {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 8px;
}
.timeline .row .lbl {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-4);
}
.timeline .row .total {
  margin-left: auto;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink);
}
.timeline .row .total .lbl { margin-right: 6px; }
.timeline-bar {
  height: 32px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 2px;
  display: flex;
  overflow: hidden;
  position: relative;
}
.timeline-seg {
  height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .08em; text-transform: uppercase;
  color: rgba(0,0,0,.55);
  font-weight: 600;
  border-right: 1px solid rgba(0,0,0,.25);
  cursor: pointer;
  overflow: hidden; white-space: nowrap;
  transition: filter .12s;
}
.timeline-seg:hover { filter: brightness(1.1); }
.timeline-seg.dim { opacity: .55; }
.timeline-ticks {
  display: flex; justify-content: space-between;
  margin-top: 4px;
  font-family: var(--f-mono); font-size: 9px;
  color: var(--ink-4);
  letter-spacing: .04em;
}

/* ── Style panel (right) ─────────────────────────────────────── */
.style-area {
  padding: 14px 16px 24px;
  display: flex; flex-direction: column; gap: 16px;
}

/* mode picker */
.mode-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
}
.mode-picker.three { grid-template-columns: 1fr 1fr 1fr; }
.mode-picker button {
  background: transparent;
  border: 0;
  padding: 9px 8px;
  color: var(--ink-3);
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 2px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  position: relative;
}
.mode-picker .badge {
  font-family: var(--f-mono);
  font-size: 8px;
  letter-spacing: .12em;
  background: var(--amber);
  color: #1A1308;
  padding: 1px 4px;
  border-radius: 2px;
  margin-left: 2px;
  font-weight: 700;
}
.mode-picker button:hover { color: var(--ink); }
.mode-picker button.on {
  background: var(--bg-3);
  color: var(--ink);
}
.mode-picker button.on .dot { background: var(--amber); box-shadow: 0 0 5px var(--amber); }
.mode-picker .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink-4);
}

/* Section block (consistent within style area) */
.s-block {
  display: flex; flex-direction: column; gap: 8px;
}
.s-block .head {
  display: flex; align-items: baseline; gap: 8px;
}
.s-block .head .num {
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--amber); letter-spacing: .08em;
}
.s-block .head .ttl {
  font-family: var(--f-display); font-style: italic;
  font-size: 16px; color: var(--ink);
}
.s-block .head .sub {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: .04em;
  margin-left: auto;
}

/* Reference upload */
.ref-zone {
  background: var(--bg-1);
  border: 1px dashed var(--line-2);
  border-radius: 4px;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .15s;
}
.ref-zone:hover { border-color: var(--amber-deep); background: rgba(232,166,92,.03); }
.ref-zone.loaded { border-style: solid; border-color: var(--amber-deep); }

.upload-row {
  display: flex; align-items: center; gap: 10px;
  padding: 12px;
  background: var(--bg-2);
  border-radius: 3px;
  cursor: pointer;
}
.upload-row:hover { background: var(--bg-3); }
.upload-row .icn {
  width: 36px; height: 36px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--amber);
}
.upload-row .meta { flex: 1; }
.upload-row .meta .t {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink); letter-spacing: .02em;
}
.upload-row .meta .s {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-4); margin-top: 2px;
}

.divider-or {
  display: flex; align-items: center;
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--ink-4); letter-spacing: .12em; text-transform: uppercase;
  gap: 10px;
  margin: 2px 0;
}
.divider-or::before, .divider-or::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

.url-input {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
}
.url-input:focus-within { border-color: var(--amber-deep); }
.url-input input {
  background: transparent; border: 0;
  color: var(--ink);
  font-family: var(--f-mono); font-size: 11px;
  flex: 1;
}
.url-input input::placeholder { color: var(--ink-4); }

.btn {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 8px 14px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: all .12s;
}
.btn:hover:not(:disabled) { background: var(--bg-3); border-color: var(--ink-4); }
.btn:disabled { opacity: .35; cursor: not-allowed; }

.btn.primary {
  background: var(--amber);
  border-color: var(--amber);
  color: #1A1308;
  font-weight: 600;
}
.btn.primary:hover:not(:disabled) { background: var(--amber-2); border-color: var(--amber-2); }

.btn.ghost {
  background: transparent;
}

.btn.sm { padding: 5px 9px; font-size: 10px; }
.btn.lg { padding: 11px 18px; font-size: 12px; }
.btn.full { width: 100%; }

/* Analysis result */
.analysis-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.analysis-card .head {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.analysis-card .head .ttl {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink);
}
.analysis-card .head .by {
  font-family: var(--f-display); font-style: italic;
  font-size: 12px; color: var(--amber);
  margin-left: auto;
}

.analysis-words {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-family: var(--f-display);
  font-style: italic;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
}
.analysis-words em { font-style: normal; color: var(--amber-2); font-family: var(--f-sans); font-weight: 500; font-size: 13px; }

.analysis-grid {
  padding: 6px 0;
}
.analysis-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 5px 14px;
  align-items: baseline;
}
.analysis-row .k {
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--ink-4);
  letter-spacing: .12em; text-transform: uppercase;
}
.analysis-row .v {
  font-family: var(--f-sans); font-size: 12px;
  color: var(--ink);
}
.analysis-row .v input {
  background: transparent; border: 0;
  border-bottom: 1px dotted var(--line-2);
  color: var(--ink);
  font-family: var(--f-sans); font-size: 12px;
  width: 100%; padding: 2px 0;
}
.analysis-row .v input:focus { border-bottom-color: var(--amber); }
.analysis-row .v .note {
  display: block;
  font-family: var(--f-display); font-style: italic;
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

/* Manual builder */
.manual {
  display: flex; flex-direction: column; gap: 16px;
}

.field {
  display: flex; flex-direction: column; gap: 6px;
}
.field .lbl {
  display: flex; align-items: baseline; gap: 8px;
}
.field .lbl .k {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.field .lbl .hint {
  font-family: var(--f-display); font-style: italic;
  font-size: 12px;
  color: var(--ink-4);
}
.field .lbl .v {
  margin-left: auto;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--amber);
}

.text-input {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  color: var(--ink);
  font-family: var(--f-sans); font-size: 12.5px;
  width: 100%;
}
.text-input:focus { border-color: var(--amber-deep); }
.text-input::placeholder { color: var(--ink-4); font-style: italic; }

select.text-input {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%237E8597' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 28px;
}

/* Grid of selectable cards (instruments / vaab) */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }

.pick-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px;
  text-align: left;
  color: var(--ink-2);
  position: relative;
  transition: all .12s;
}
.pick-card .glyph {
  font-family: var(--f-mono); font-size: 18px;
  color: var(--ink-4);
  line-height: 1;
  margin-bottom: 4px;
}
.pick-card .name {
  font-family: var(--f-sans); font-size: 12px;
  font-weight: 500;
  color: var(--ink);
}
.pick-card .sub {
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--ink-4); letter-spacing: .04em;
  text-transform: uppercase;
}
.pick-card:hover { border-color: var(--line-2); }
.pick-card.on {
  border-color: var(--amber-deep);
  background: rgba(232,166,92,.06);
  color: var(--amber-2);
}
.pick-card.on .glyph { color: var(--amber); }
.pick-card.on .name { color: var(--amber-2); }
.pick-card.on .sub { color: var(--amber-deep); }
.pick-card .check {
  position: absolute; top: 6px; right: 6px;
  width: 12px; height: 12px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
}
.pick-card.on .check {
  background: var(--amber);
  border-color: var(--amber);
}
.pick-card.suggested .name::after {
  content: '★';
  color: var(--amber);
  font-size: 9px;
  margin-left: 4px;
  vertical-align: super;
}

.subhead {
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--ink-4);
  letter-spacing: .14em; text-transform: uppercase;
  margin: 4px 0;
  display: flex; align-items: center; gap: 8px;
}
.subhead::after {
  content: ''; flex: 1; height: 1px; background: var(--line);
}

/* tempo slider */
.tempo {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 12px 14px;
}
.tempo-row {
  display: flex; align-items: center; gap: 12px;
}
.tempo-row .num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 32px;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -.02em;
  min-width: 78px;
}
.tempo-row .num .unit {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: .12em;
  font-style: normal;
  margin-left: 4px;
}
.tempo-row .slider {
  flex: 1;
  position: relative;
  height: 32px;
  display: flex; align-items: center;
}
.tempo-row .slider input[type=range] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; background: var(--bg-3);
  border-radius: 2px;
  outline: none;
}
.tempo-row .slider input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: var(--amber);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 0 3px rgba(232,166,92,.18);
}
.tempo-row .slider input[type=range]::-moz-range-thumb {
  width: 14px; height: 14px;
  background: var(--amber);
  border: 0; border-radius: 50%;
  cursor: pointer;
}

.tempo-row .preview-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .12s;
}
.tempo-row .preview-btn:hover { background: var(--bg-3); border-color: var(--amber-deep); color: var(--amber); }
.tempo-row .preview-btn.on {
  background: var(--amber);
  border-color: var(--amber);
  color: #1A1308;
}

/* Beat grid (taal preview) */
.beat-grid {
  display: flex; gap: 2px;
  margin-top: 10px;
  padding: 8px;
  background: var(--bg);
  border-radius: 3px;
  border: 1px solid var(--line);
}
.beat-grid .vibhag {
  display: flex; gap: 2px;
}
.beat-grid .vibhag + .vibhag { margin-left: 6px; border-left: 1px solid var(--line-2); padding-left: 8px; }
.beat-grid .beat {
  width: 14px; height: 18px;
  background: var(--bg-3);
  border-radius: 1px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 8px;
  color: var(--ink-4);
  transition: background .08s;
}
.beat-grid .beat.sam {
  background: var(--bg-3);
  color: var(--amber);
}
.beat-grid .beat.active {
  background: var(--amber) !important;
  color: #1A1308 !important;
  box-shadow: 0 0 8px rgba(232,166,92,.5);
}
.beat-grid .beat.khali {
  color: var(--ink-3);
}

.taal-info {
  display: flex; gap: 12px;
  margin-top: 6px;
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--ink-4); letter-spacing: .04em;
}
.taal-info b { color: var(--ink-2); font-weight: 500; }

/* ── Player bar ──────────────────────────────────────────────── */
.player {
  display: grid;
  grid-template-columns: 280px 1fr auto auto;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: linear-gradient(to top, #0B0D11, #14171D);
  border-top: 1px solid var(--line);
  min-height: 0;
}

.transport {
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}
.play-circ {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: #1A1308;
  border: 0;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.play-circ:hover { background: var(--amber-2); }
.play-circ.empty {
  background: var(--bg-3); color: var(--ink-4);
  cursor: default;
}
.play-circ.empty:hover { background: var(--bg-3); }

.track-meta { min-width: 0; flex: 1; }
.track-meta .ttl {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.15;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.track-meta .sub {
  font-family: var(--f-mono); font-size: 10.5px;
  color: var(--ink-3); letter-spacing: .04em;
  margin-top: 3px;
}

.wave-wrap {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0;
}
.player-wave {
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 44px;
  cursor: pointer;
  padding: 4px 0;
}
.player-wave .bar {
  flex: 1;
  background: var(--bg-3);
  border-radius: 1px;
  transition: background .05s;
}
.player-wave .bar.past { background: var(--amber); }
.player-wave .bar.now { background: var(--amber-2); box-shadow: 0 0 6px var(--amber); }

.timecode {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: .04em;
}
.timecode b { color: var(--ink); font-weight: 500; }

.player-actions {
  display: flex; gap: 8px;
}
.iconbtn {
  width: 34px; height: 34px;
  border-radius: 3px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.iconbtn:hover:not(:disabled) { color: var(--ink); border-color: var(--ink-4); }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }

.gen-btn {
  background: var(--amber);
  color: #1A1308;
  border: 1px solid var(--amber);
  padding: 9px 18px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 3px;
  display: inline-flex; align-items: center; gap: 8px;
  position: relative;
  overflow: hidden;
}
.gen-btn:hover:not(:disabled) { background: var(--amber-2); }
.gen-btn:disabled { opacity: .35; cursor: not-allowed; }
.gen-btn .star { font-size: 14px; }

/* Generation overlay */
.gen-overlay {
  position: fixed; inset: 0;
  background: rgba(8,10,14,.85);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
}
.gen-card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 36px;
  min-width: 380px;
  max-width: 460px;
  text-align: center;
}
.gen-card .ttl {
  font-family: var(--f-display); font-style: italic;
  font-size: 28px;
  color: var(--ink);
  margin-bottom: 4px;
}
.gen-card .sub {
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink-3); letter-spacing: .04em;
  margin-bottom: 20px;
}
.spin {
  width: 22px; height: 22px;
  border: 2px solid var(--line-2);
  border-top-color: var(--amber);
  border-radius: 50%;
  margin: 0 auto 18px;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.gen-steps {
  display: flex; flex-direction: column; gap: 6px;
  text-align: left;
  margin-top: 8px;
}
.gen-step {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px;
  background: var(--bg-2);
  border-radius: 3px;
  font-family: var(--f-mono); font-size: 11px;
  color: var(--ink-4);
  letter-spacing: .03em;
}
.gen-step .tick {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 8px;
}
.gen-step.done { color: var(--ink-2); }
.gen-step.done .tick { background: var(--green); border-color: var(--green); color: #fff; }
.gen-step.active { color: var(--ink); }
.gen-step.active .tick { border-color: var(--amber); background: rgba(232,166,92,.15); position: relative; }
.gen-step.active .tick::after {
  content: ''; position: absolute; inset: 2px;
  background: var(--amber); border-radius: 50%;
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

/* small overlay used inside Define */
.inline-loading {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  display: flex; align-items: center; gap: 12px;
}
.inline-loading .spin { margin: 0; width: 16px; height: 16px; border-width: 1.5px; }
.inline-loading .t {
  font-family: var(--f-display); font-style: italic;
  font-size: 15px; color: var(--ink);
}
.inline-loading .s {
  font-family: var(--f-mono); font-size: 10px; color: var(--ink-4);
  letter-spacing: .04em; margin-top: 1px;
}

/* tweaks panel override */
.tweaks-panel { font-family: var(--f-sans) !important; }

/* Auto mode hero */
.auto-hero {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px;
  background: linear-gradient(135deg, rgba(232,166,92,.12), rgba(232,166,92,.04) 60%, transparent);
  border: 1px solid var(--amber-deep);
  border-radius: 4px;
}
.auto-hero .auto-glyph {
  font-family: var(--f-display); font-style: italic;
  font-size: 36px; color: var(--amber);
  line-height: .9; flex-shrink: 0;
  text-shadow: 0 0 16px rgba(232,166,92,.4);
}
.auto-hero .auto-copy .t {
  font-family: var(--f-display); font-style: italic;
  font-size: 18px; color: var(--ink); margin-bottom: 4px;
}
.auto-hero .auto-copy .s {
  font-family: var(--f-sans); font-size: 12px;
  color: var(--ink-2); line-height: 1.5;
}
.auto-empty {
  padding: 14px; text-align: center;
  font-family: var(--f-display); font-style: italic;
  color: var(--ink-4); font-size: 13px;
  border: 1px dashed var(--line-2); border-radius: 4px;
}

/* ── Section Editor Dialog ────────────────────────────────────── */
.dialog-veil {
  position: fixed; inset: 0;
  background: rgba(8,10,14,.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 900;
  padding: 24px;
}
.dialog {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  width: 620px; max-width: 100%;
  max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0,0,0,.55);
}
.dialog-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 6px 6px 0 0;
}
.dialog-num {
  font-family: var(--f-mono); font-size: 9.5px;
  color: var(--amber); letter-spacing: .14em;
}
.dialog-typ {
  display: flex; align-items: center; gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 4px 6px 4px 8px;
}
.dialog-typ .swatch { width: 8px; height: 8px; border-radius: 1px; flex-shrink: 0; }
.dialog-typ select {
  background: transparent; border: 0;
  color: var(--ink);
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 0 16px 0 2px;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'><path fill='%23B5BAC6' d='M5 6L0 0h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 2px center;
  cursor: pointer;
}
.dialog-typ select option { background: var(--bg-2); }
.dialog-ttl {
  font-family: var(--f-display); font-style: italic;
  font-size: 17px; color: var(--ink-2);
}
.dialog-close {
  margin-left: auto;
  background: transparent; border: 0;
  width: 28px; height: 28px;
  border-radius: 3px;
  color: var(--ink-3);
  display: flex; align-items: center; justify-content: center;
}
.dialog-close:hover { background: var(--bg-3); color: var(--ink); }

.dialog-body {
  padding: 16px 18px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 16px;
}
.d-field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.d-field-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
}
.d-label, .d-label-row .d-label {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}
.d-label-row {
  display: flex; align-items: center;
  margin-bottom: 4px;
}
.d-label-row .btn { margin-left: auto; }

.d-textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--f-sans); font-size: 12.5px;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
  min-height: 70px;
}
.d-textarea.lyrics {
  font-family: var(--f-display);
  font-size: 14.5px;
  line-height: 1.6;
  min-height: 110px;
}
.d-textarea:focus { border-color: var(--amber-deep); }
.d-textarea::placeholder { color: var(--ink-4); font-style: italic; }

.d-input {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
  color: var(--ink);
  font-family: var(--f-sans); font-size: 12.5px;
  padding: 8px 10px;
  width: 100%;
}
.d-input:focus { border-color: var(--amber-deep); }
.d-meta {
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: .04em;
  color: var(--ink-4);
  margin-top: 2px;
}
.d-dur {
  display: flex; align-items: center; gap: 8px;
}
.d-dur .d-input { width: 80px; }
.d-unit {
  font-family: var(--f-mono); font-size: 10px;
  color: var(--ink-4); letter-spacing: .08em;
  text-transform: uppercase;
}

.dialog-foot {
  display: flex; gap: 10px; justify-content: space-between;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  border-radius: 0 0 6px 6px;
}

/* Backend error banner */
.mm-err {
  margin: 0 22px 8px;
  padding: 9px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: rgba(220, 80, 60, .08);
  border: .5px solid rgba(220, 80, 60, .35);
  border-radius: 6px;
  color: #a63522;
  font-family: var(--f-body, Georgia, serif);
  font-size: 12.5px;
  font-style: italic;
}
.mm-err button {
  appearance: none;
  background: transparent;
  border: 0;
  color: #a63522;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.mm-err button:hover { background: rgba(166, 53, 34, .12); }

/* ── AlternatesRow (per-parameter dropdown on AI-chosen / Detected style) ── */
.alt-input-wrap {
  display: flex; align-items: stretch; gap: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
}
.alt-input-wrap input {
  flex: 1;
  background: transparent;
  border: 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
  padding: 4px 0;
  font: inherit;
  outline: none;
}
.alt-input-wrap input:focus { border-bottom-color: var(--amber); }
.alt-chevron {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  width: 22px; height: 22px;
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px;
  cursor: pointer;
}
.alt-chevron:hover { background: var(--bg-3); color: var(--amber); }

.alt-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0,0,0,.35);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.alt-popover-head {
  font-family: var(--f-mono);
  font-size: 9px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
  padding: 8px 10px 4px;
}
.alt-opt {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  display: flex; flex-direction: column; gap: 2px;
  cursor: pointer;
  border-top: 1px solid var(--line);
  color: var(--ink);
}
.alt-opt:hover { background: var(--bg-3); }
.alt-opt.on { background: rgba(232, 166, 92, .08); }
.alt-opt.on .alt-val { color: var(--amber); }
.alt-opt.blank { color: var(--ink-4); font-style: italic; font-size: 11px; }
.alt-val {
  font-family: var(--f-body, Georgia, serif);
  font-size: 13px;
}
.alt-note {
  font-family: var(--f-body, Georgia, serif);
  font-style: italic;
  font-size: 11px;
  color: var(--ink-3);
}

/* BPM slider row */
.alt-bpm-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 4px 0;
}
.alt-bpm-wrap input[type="range"] {
  flex: 1;
  accent-color: var(--amber);
  height: 18px;
}
.alt-bpm-readout {
  min-width: 42px; text-align: right;
  font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ── Eavesdropper overlay ──────────────────────────────────────────────── */
.eav-overlay {
  position: fixed; inset: 0; z-index: 2147483600;
  background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center;
  padding: 4vh 5vw;
}
.eav-panel {
  width: 100%; max-width: 880px; max-height: 92vh;
  display: flex; flex-direction: column;
  background: var(--bg-1, #14110b);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.5);
  overflow: hidden;
}
.eav-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.eav-title {
  font-family: var(--f-display, Georgia, serif);
  font-style: italic;
  font-size: 18px; font-weight: 500;
  color: var(--ink);
}
.eav-sub {
  font-family: var(--f-body, Georgia, serif);
  font-size: 11.5px;
  color: var(--ink-3);
  margin-top: 2px;
}
.eav-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--bg-3);
  color: var(--ink-2);
  border-radius: 4px;
  padding: 5px 10px;
  font: 500 11.5px var(--f-mono);
  letter-spacing: .04em;
  cursor: pointer;
}
.eav-btn:hover { color: var(--amber); border-color: var(--amber); }
.eav-body {
  overflow-y: auto;
  padding: 6px;
}
.eav-empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--ink-4);
  font-style: italic;
  font-size: 13px;
}

.eav-entry { border-bottom: 1px solid var(--line); }
.eav-entry:last-child { border-bottom: 0; }
.eav-row {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--f-mono);
  font-size: 11.5px;
}
.eav-row:hover { background: var(--bg-2); }
.eav-entry.open .eav-row { background: var(--bg-2); }
.eav-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.eav-prompt { font-weight: 600; min-width: 130px; color: var(--amber); }
.eav-model  { color: var(--ink-3); min-width: 170px; }
.eav-time   { color: var(--ink-4); min-width: 100px; font-size: 10.5px; }
.eav-dur    { color: var(--ink-3); min-width: 70px; text-align: right; font-size: 10.5px; }
.eav-tag {
  background: var(--bg-3);
  color: var(--ink-3);
  font-size: 9.5px;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 1px 6px;
  border-radius: 3px;
}
.eav-tag.err { background: rgba(225,59,59,.14); color: #ff8888; }
.eav-caret { margin-left: auto; color: var(--ink-3); }

.eav-detail {
  padding: 4px 14px 14px;
  background: var(--bg-2);
}
.eav-block { margin-top: 10px; }
.eav-label {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-4);
  margin-bottom: 4px;
}
.eav-pre {
  margin: 0;
  padding: 10px 12px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: var(--f-body, Georgia, serif);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  max-height: 320px;
  overflow: auto;
}
.eav-pre.mono {
  font-family: var(--f-mono);
  font-size: 11px;
  line-height: 1.5;
}
.eav-pre.err { color: #ff9898; border-color: rgba(225,59,59,.3); }
.eav-copybar { margin-top: 10px; display: flex; gap: 6px; }
