/* Guitar Mode Finder — Studio Rack theme */

@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&family=Inter:wght@400;600;700;800&display=swap');

/* ── Tokens ────────────────────────────────────────────────────────────────── */

:root {
  --bg:          #141416;
  --bg-deep:     #0d0d0f;
  --panel:       #2c2c32;
  --panel-hi:    #38383f;
  --panel-deep:  #1c1c20;
  --groove:      #0a0a0c;
  --text:        #e8e6e0;
  --dim:         #9c9aaa;
  --led:         #ffaa3b;
  --led-red:     #ff3b3b;
  --led-green:   #3bff8a;
  --led-bg:      #1a0d00;
  --led-border:  #3a2810;
  --copper:      #d49a4a;
  --chassis:     linear-gradient(180deg, #38383f 0%, #22222a 100%);
  --mod-shadow:  inset 0 1px 0 rgba(255,255,255,0.04), 0 4px 12px rgba(0,0,0,0.4);
  --knob-body:   radial-gradient(circle at 35% 30%, #4a4a50, #1a1a1c 70%);
  --knob-center: radial-gradient(circle at 40% 40%, #6a6a70, #1a1a1c);
  --knob-shadow: inset 0 -3px 6px rgba(0,0,0,0.6), 0 2px 4px rgba(0,0,0,0.6);
  --knob-tick:   #3a3a40;
  --screw-body:  radial-gradient(circle at 30% 30%, #6a6a70, #1a1a1c 70%);
  --screw-shadow: inset 0 0 1px #000, 0 1px 1px rgba(0,0,0,0.5);
  --screw-slot:  #0a0a0c;
  --sel-bg:      #0d0d0f;
  --sel-text:    #ffaa3b;
  --sel-border:  #3a2810;
  --card-unsel:  #1f1f23;
  --row-unsel:   #1f1f23;
  --mono:        'JetBrains Mono', ui-monospace, monospace;
  --sans:        'Inter', system-ui, sans-serif;
}

[data-theme="day"] {
  --bg:          #cbc4b3;
  --bg-deep:     #0d0d0f;
  --panel:       #dfd9c8;
  --panel-hi:    #ebe5d3;
  --panel-deep:  #a89f88;
  --groove:      #3a3530;
  --text:        #1a1612;
  --dim:         #52483e;
  --copper:      #8a4f1f;
  --chassis:     linear-gradient(180deg, #ebe5d3 0%, #c8c0a8 100%);
  --mod-shadow:  inset 0 1px 0 rgba(255,255,255,0.5), 0 4px 12px rgba(0,0,0,0.15);
  --knob-body:   radial-gradient(circle at 35% 30%, #f4f0e6, #6a6258 80%);
  --knob-center: radial-gradient(circle at 40% 40%, #ffffff, #8a8378);
  --knob-shadow: inset 0 -3px 6px rgba(0,0,0,0.25), 0 2px 4px rgba(0,0,0,0.3);
  --knob-tick:   #3a3530;
  --screw-body:  radial-gradient(circle at 30% 30%, #d4d0c4, #6a6660 80%);
  --screw-shadow: inset 0 0 1px rgba(0,0,0,0.4), 0 1px 1px rgba(0,0,0,0.3);
  --screw-slot:  #3a3530;
  --sel-bg:      #fffbe8;
  --sel-text:    #1a1612;
  --sel-border:  #3a3530;
  --card-unsel:  #e8e2d0;
  --row-unsel:   #e8e2d0;
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent 2px, rgba(255,255,255,0.012) 2px, rgba(255,255,255,0.012) 3px);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

[data-theme="day"] body {
  background-image: repeating-linear-gradient(180deg, transparent 0, transparent 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 3px);
}

a { color: var(--led); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Rack Header ────────────────────────────────────────────────────────────── */

.rack-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chassis);
  border-bottom: 2px solid var(--groove);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 12px rgba(0,0,0,0.5);
  transition: background 0.3s;
}

[data-theme="day"] .rack-header {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5), 0 2px 6px rgba(0,0,0,0.2);
}

.rack-header-inner {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rack-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  transition: opacity 0.15s;
}

a.rack-brand:hover { opacity: 0.82; }

.brand-logo {
  width: 90px;
  height: 70px;
  flex-shrink: 0;
  display: block;
}

.power-led-enclosure {
  width: 34px;
  height: 34px;
  background: var(--bg-deep);
  border: 1px solid var(--groove);
  border-radius: 3px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 4px rgba(0,0,0,0.7);
  flex-shrink: 0;
}

.power-led {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff3b3b 0%, #6a0000 70%);
  box-shadow: 0 0 10px #ff3b3b;
}

.brand-label-top {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--dim);
  font-weight: 600;
}

.brand-label-main {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  font-family: var(--mono);
  margin: 0;
}

.rack-nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.rack-nav a {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.15em;
  font-weight: 700;
  padding: 7px 14px;
  text-decoration: none;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 2px;
  transition: color 0.15s;
}

.rack-nav a.active {
  background: var(--bg-deep);
  color: var(--led);
  border-color: var(--groove);
  box-shadow: inset 0 0 6px rgba(255,170,59,0.2);
  text-shadow: 0 0 4px var(--led);
}

/* ── DAY/NIGHT Toggle ───────────────────────────────────────────────────────── */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  background: var(--bg-deep);
  border: 1px solid var(--groove);
  border-radius: 3px;
  cursor: pointer;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
  color: inherit;
  font: inherit;
  outline: none;
}

[data-theme="day"] .theme-toggle {
  background: var(--panel-deep);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--dim);
  transition: color 0.2s, text-shadow 0.2s;
}

.toggle-label.active {
  color: var(--led);
  text-shadow: 0 0 6px rgba(255,170,59,0.5);
}

.toggle-track {
  position: relative;
  width: 38px;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(90deg, #050507, #1a1a20);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.7);
  flex-shrink: 0;
  transition: background 0.22s;
}

[data-theme="day"] .toggle-track {
  background: linear-gradient(90deg, #6a6660, #aaa49a);
}

.toggle-ball {
  position: absolute;
  top: 2px;
  left: 22px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #d4d0c4, #6a6660);
  box-shadow: 0 1px 2px rgba(0,0,0,0.6);
  transition: left 0.22s;
}

[data-theme="day"] .toggle-ball { left: 2px; }

/* ── Screws ─────────────────────────────────────────────────────────────────── */

.screw {
  position: absolute;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--screw-body);
  box-shadow: var(--screw-shadow);
  pointer-events: none;
  overflow: hidden;
}

.screw::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 50%;
  background: linear-gradient(45deg, transparent 42%, var(--screw-slot) 42%, var(--screw-slot) 58%, transparent 58%);
}

.screw-tr::after { background: linear-gradient(75deg, transparent 42%, var(--screw-slot) 42%, var(--screw-slot) 58%, transparent 58%); }
.screw-bl::after { background: linear-gradient(120deg, transparent 42%, var(--screw-slot) 42%, var(--screw-slot) 58%, transparent 58%); }
.screw-br::after { background: linear-gradient(20deg, transparent 42%, var(--screw-slot) 42%, var(--screw-slot) 58%, transparent 58%); }

.screw-tl { top: 9px; left: 9px; }
.screw-tr { top: 9px; right: 9px; }
.screw-bl { bottom: 9px; left: 9px; }
.screw-br { bottom: 9px; right: 9px; }

/* ── Rack Layout ────────────────────────────────────────────────────────────── */

.rack {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rack-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── Rack Module ────────────────────────────────────────────────────────────── */

.rack-module {
  background: var(--panel);
  border: 1px solid var(--groove);
  border-radius: 4px;
  position: relative;
  box-shadow: var(--mod-shadow);
  transition: background 0.3s;
}

.rack-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid var(--groove);
  background: rgba(0,0,0,0.25);
}

[data-theme="day"] .rack-module-header {
  background: rgba(0,0,0,0.06);
}

.rack-module-title {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--text);
  font-weight: 700;
  margin-left: 8px;
}

.caged-toggle {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.15em;
  padding: 10px 8px;
  width: calc((100% - 60px) / 7);
  flex-shrink: 0;
  margin-right: 20px;
  outline: none;
}

.caged-toggle.is-selected {
  color: var(--led);
  text-shadow: 0 0 4px var(--led);
}

.caged-shape-nav {
  display: flex;
  gap: 8px;
  align-items: stretch;
  justify-content: flex-start;
  padding: 0 0 16px;
}

.caged-shape-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  width: 56px;
  color: var(--dim);
  border: 1px solid var(--groove);
  border-radius: 3px;
  cursor: pointer;
  outline: none;
  background: radial-gradient(circle at 50% 20%, #363640, #1c1c20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 3px 0 rgba(0,0,0,0.5),
    0 5px 8px rgba(0,0,0,0.25);
  transform: translateY(0);
  transition: background 0.1s, border-color 0.1s, box-shadow 0.1s, transform 0.1s;
}

[data-theme="day"] .caged-shape-btn {
  background: radial-gradient(circle at 50% 20%, #faf4e2, #c8c0a8);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 3px 0 rgba(0,0,0,0.22),
    0 5px 8px rgba(0,0,0,0.12);
}

.caged-shape-btn:hover {
  background: radial-gradient(circle at 50% 20%, #42424e, #26262e);
  border-color: var(--dim);
}

[data-theme="day"] .caged-shape-btn:hover {
  background: radial-gradient(circle at 50% 20%, #e0d8c4, #b8b0a0);
  border-color: var(--dim);
}


.caged-shape-btn.active {
  background: radial-gradient(circle at 50% 80%, #3e3e46, #2c2c34);
  border-color: var(--groove);
  box-shadow:
    inset 0 3px 5px rgba(0,0,0,0.55),
    inset 0 1px 2px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(2px);
  color: var(--led);
  text-shadow: 0 0 4px var(--led);
}

.rack-module-status {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--led);
  text-shadow: 0 0 4px var(--led);
}

.rack-module-body {
  padding: 18px;
}

.rack-module-body.no-pad {
  padding: 0;
}

/* ── Knob ───────────────────────────────────────────────────────────────────── */

.knob-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  user-select: none;
}

.knob-container {
  position: relative;
  width: 78px;
  height: 78px;
}

.knob-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.knob-body {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--knob-body);
  box-shadow: var(--knob-shadow);
  transition: transform 0.25s cubic-bezier(.5,1.5,.4,1);
}

.knob-pointer {
  position: absolute;
  top: 3px;
  left: 50%;
  width: 3px;
  height: 14px;
  background: var(--led);
  transform: translateX(-50%);
  border-radius: 1px;
  box-shadow: 0 0 6px var(--led);
}

.knob-cap {
  position: absolute;
  inset: 25%;
  border-radius: 50%;
  background: var(--knob-center);
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.knob-label {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--text);
  font-weight: 800;
}

.knob-select {
  background: var(--sel-bg);
  color: var(--sel-text);
  border: 1px solid var(--sel-border);
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 2px;
  min-width: 130px;
  width: 100%;
  text-align: center;
  cursor: pointer;
  letter-spacing: 0.05em;
}

/* ── CH·01 Layout ───────────────────────────────────────────────────────────── */

.lookup-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 32px;
  align-items: stretch;
}

.lookup-controls {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 0 28px;
}

.engage-btn {
  padding: 14px 22px;
  border: 1px solid var(--groove);
  border-radius: 2px;
  background: linear-gradient(180deg, #ff5530, #aa1a0d);
  color: #fff;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 0 #500, 0 0 12px rgba(255,85,48,0.3);
  cursor: pointer;
  height: 36px;
  align-self: flex-end;
  margin-bottom: 10px;
}

.engage-btn:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 1px 0 #500; }

.lookup-readout {
  display: block;
}

/* ── LED Display ────────────────────────────────────────────────────────────── */

.led-display {
  background: var(--led-bg);
  border: 1px solid rgba(255, 170, 59, 0.45);
  padding: 14px 18px;
  margin-bottom: 18px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), inset 0 0 24px rgba(255,170,59,0.04), 0 0 6px rgba(255,170,59,0.15);
  font-family: var(--mono);
  color: var(--led);
  text-shadow: none;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: box-shadow 0.1s;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

[data-theme="day"] .led-display {
  border-color: rgba(255, 140, 20, 0.85);
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), inset 0 0 24px rgba(255,170,59,0.04), 0 0 10px rgba(255, 140, 20, 0.4);
}

.led-parent-key {
  font-size: 16px;
  font-weight: 700;
  margin-top: 14px;
  letter-spacing: 0.08em;
}

.led-parent-notes {
  font-size: 16px;
  margin-top: 6px;
  letter-spacing: 0.05em;
}

@keyframes led-fire {
  0%   { box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), 0 0 0 rgba(255,170,59,0); }
  30%  { box-shadow: inset 0 2px 8px rgba(0,0,0,0.4), 0 0 24px rgba(255,170,59,0.6), 0 0 8px rgba(255,170,59,0.4); }
  100% { box-shadow: inset 0 2px 8px rgba(0,0,0,0.85), inset 0 0 24px rgba(255,170,59,0.04); }
}

.led-display.firing {
  animation: led-fire 0.55s ease-out forwards;
}

@keyframes status-blink {
  0%, 100% { opacity: 1; }
  40%       { opacity: 0.1; }
  60%       { opacity: 1; }
}

.rack-module-status.blinking {
  animation: status-blink 0.4s ease-in-out;
}

@keyframes engage-press {
  0%   { transform: translateY(0); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 0 #500, 0 0 12px rgba(255,85,48,0.3); }
  30%  { transform: translateY(2px); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 0 0 #500; }
  100% { transform: translateY(0); box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 0 #500, 0 0 12px rgba(255,85,48,0.3); }
}

.engage-btn.firing {
  animation: engage-press 0.35s ease-out forwards;
}

.led-header-row {
  font-size: 14px;
  letter-spacing: 0.2em;
  color: var(--led);
}

.led-mode-name {
  font-size: 40px;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-shadow: 0 0 12px var(--led), 0 0 4px var(--led);
}


/* ── VU Meter ───────────────────────────────────────────────────────────────── */

.vu-meter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
  padding: 8px 10px;
  background: var(--bg-deep);
  border: 1px solid var(--groove);
  border-radius: 2px;
}

.vu-bar-track {
  height: 5px;
  width: 90px;
  background: #000;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.9);
}

.vu-bar-fill {
  height: 100%;
}

/* ── Fretboard ──────────────────────────────────────────────────────────────── */

.fretboard-svg-wrap {
  overflow-x: auto;
  background: var(--led-bg);
  border: 1px solid rgba(255, 170, 59, 0.45);
  border-radius: 4px;
}

[data-theme="day"] .fretboard-svg-wrap {
  border-color: rgba(255, 140, 20, 0.85);
}

.fretboard-svg-wrap svg {
  width: 100%;
  height: auto;
  display: block;
}

.fretboard-legend {
  margin-top: 14px;
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.legend-label {
  font-family: var(--mono);
  font-size: 12px;
  color: #ffffff;
  letter-spacing: 0.15em;
  font-weight: 700;
}

[data-theme="day"] .legend-label {
  color: #1a1612;
}

/* ── Scale Strip ────────────────────────────────────────────────────────────── */

.scale-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
}

.scale-cell {
  border: 1px solid var(--groove);
  padding: 14px 6px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 2px 4px rgba(0,0,0,0.3);
  border-radius: 3px;
}

.scale-cell.is-root {
  background: radial-gradient(circle at 30% 30%, #4a1818, #1a0808);
}

.scale-cell.is-penta {
  background: radial-gradient(circle at 30% 30%, #4a3210, #1a0d00);
}

.scale-cell.is-scale {
  background: radial-gradient(circle at 30% 30%, #2e2e33, #1a1a1c);
}

[data-theme="day"] .scale-cell.is-scale {
  background: radial-gradient(circle at 30% 30%, #f4ecd6, #c8c0a8);
}

.scale-cell-interval {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  font-weight: 700;
}

.scale-cell.is-root .scale-cell-interval { color: var(--led-red); text-shadow: 0 0 4px var(--led-red); }
.scale-cell.is-penta .scale-cell-interval { color: var(--led); text-shadow: 0 0 4px var(--led); }
.scale-cell.is-scale .scale-cell-interval { color: var(--dim); }

.scale-cell-note {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  margin-top: 6px;
  line-height: 1;
}

.scale-cell.is-root .scale-cell-note { color: var(--led-red); text-shadow: 0 0 8px var(--led-red); }
.scale-cell.is-penta .scale-cell-note { color: var(--led); text-shadow: 0 0 8px var(--led); }
.scale-cell.is-scale .scale-cell-note { color: var(--text); }

.scale-cell-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.2em;
  font-weight: 700;
  margin-top: 4px;
  opacity: 0.85;
}

.scale-cell.is-root .scale-cell-tag { color: var(--led-red); }
.scale-cell.is-penta .scale-cell-tag { color: var(--led); }

/* ── Chord LED Display ──────────────────────────────────────────────────────── */

.chord-led {
  align-items: stretch;
  gap: 14px;
  text-align: left;
}

.chord-led-header {
  font-size: 14px;
  letter-spacing: 0.25em;
  color: var(--led);
  text-align: center;
}

.chord-led-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid rgba(255, 170, 59, 0.2);
  border-radius: 2px;
  overflow: hidden;
}

.chord-led-cell {
  padding: 10px 6px;
  text-align: center;
  border-right: 1px solid rgba(255, 170, 59, 0.15);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.chord-led-cell:last-child { border-right: none; }

.chord-led-roman {
  font-size: 9px;
  letter-spacing: 0.15em;
  color: #c8882a;
}

.chord-led-cell.is-tonic .chord-led-roman {
  color: var(--led);
  text-shadow: 0 0 4px var(--led);
}

.chord-led-name {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--led);
}

.chord-led-cell.is-tonic .chord-led-name {
  text-shadow: 0 0 8px var(--led);
}

.chord-led-divider {
  height: 1px;
  background: rgba(255, 170, 59, 0.18);
}

.chord-led-vamp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.chord-led-vamp-label {
  font-size: 14px;
  color: var(--led);
  letter-spacing: 0.25em;
  flex-shrink: 0;
}

.chord-led-vamp-chords {
  font-size: 28px;
  font-weight: 800;
  color: var(--led);
  text-shadow: 0 0 10px var(--led), 0 0 3px var(--led);
  display: flex;
  align-items: center;
  gap: 14px;
  letter-spacing: -0.01em;
}

.chord-led-sep {
  font-size: 20px;
  font-weight: 400;
  color: #c8882a;
}

/* ── Parent Family ──────────────────────────────────────────────────────────── */

.family-led {
  padding: 12px 0 10px;
  margin-bottom: 10px;
  justify-content: space-between;
}

.family-led-parent {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--led);
  text-shadow: 0 0 8px var(--led);
  margin-bottom: 12px;
}

.family-led-modes {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  width: 100%;
  padding: 0 14px;
}

.family-led-mode {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 170, 59, 0.35);
}

.family-led-mode.is-selected {
  color: var(--led);
  text-shadow: 0 0 4px var(--led);
}

.family-list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  margin-bottom: 10px;
}

.family-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 8px;
  border-radius: 3px;
  border: 1px solid var(--groove);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  color: inherit;
  text-align: center;
  transition: background 0.1s, border-color 0.1s, box-shadow 0.1s, transform 0.1s;
  background: radial-gradient(circle at 50% 20%, #363640, #1c1c20);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 3px 0 rgba(0,0,0,0.5),
    0 5px 8px rgba(0,0,0,0.25);
  transform: translateY(0);
}

[data-theme="day"] .family-btn {
  background: radial-gradient(circle at 50% 20%, #faf4e2, #c8c0a8);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.55),
    0 3px 0 rgba(0,0,0,0.22),
    0 5px 8px rgba(0,0,0,0.12);
}

.family-btn.is-selected {
  background: radial-gradient(circle at 50% 80%, #3e3e46, #2c2c34);
  border-color: var(--groove);
  box-shadow:
    inset 0 3px 5px rgba(0,0,0,0.55),
    inset 0 1px 2px rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.04);
  transform: translateY(2px);
}

.family-btn.is-other:hover {
  background: radial-gradient(circle at 50% 20%, #42424e, #26262e);
  border-color: var(--dim);
}

[data-theme="day"] .family-btn.is-other:hover {
  background: radial-gradient(circle at 50% 20%, #e0d8c4, #b8b0a0);
  border-color: var(--dim);
}

.family-btn-roman {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.family-btn.is-selected .family-btn-roman { color: var(--led); text-shadow: 0 0 4px var(--led); }
.family-btn.is-other .family-btn-roman { color: var(--dim); }

.family-btn-name {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
}

.family-btn.is-selected .family-btn-name { color: var(--led); text-shadow: 0 0 6px var(--led); }
.family-btn.is-other .family-btn-name { color: var(--text); }

/* ── Character ──────────────────────────────────────────────────────────────── */

.character-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.char-sounds-led,
.char-notes-led {
  margin-bottom: 12px;
  justify-content: center;
}

.char-mode-accent {
  color: var(--led);
  text-shadow: 0 0 6px var(--led);
}

.char-mood {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 700;
  color: var(--led);
  text-shadow: 0 0 6px var(--led);
  letter-spacing: 0.08em;
  margin-top: 14px;
  margin-bottom: 6px;
}

.char-genres {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--led);
  letter-spacing: 0.08em;
  margin-top: 0;
  margin-bottom: 6px;
}

.char-interval-row {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--led);
  letter-spacing: 0.05em;
}

.char-interval {
  color: var(--led);
  font-weight: 700;
  text-shadow: 0 0 4px var(--led);
}

.char-notes-led {
  align-items: stretch !important;
  text-align: left !important;
  min-height: 185px;
}

.char-sounds-led .led-header-row,
.char-notes-led .led-header-row {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.char-notes-led .led-header-row {
  text-align: center !important;
}

.char-note-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,170,59,0.08);
  width: 100%;
}

.char-note-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.char-note-tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--led);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 0 4px var(--led);
  min-width: 72px;
  padding-top: 2px;
  white-space: nowrap;
}

.char-note-text {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--led);
  line-height: 1.5;
}

/* ── All Modes Strip ────────────────────────────────────────────────────────── */

.modes-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.mode-card {
  padding: 12px 10px;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid var(--groove);
  transition: all 0.15s;
}

.mode-card.is-selected {
  background: var(--bg-deep);
  border-color: var(--led-border);
  box-shadow: inset 0 0 12px rgba(255,170,59,0.15);
}

.mode-card.is-unselected {
  background: var(--card-unsel);
}

.mode-card-degree {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  font-weight: 700;
}

.mode-card.is-selected .mode-card-degree { color: var(--led); text-shadow: 0 0 4px var(--led); }
.mode-card.is-unselected .mode-card-degree { color: var(--dim); }

.mode-card-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  margin-top: 4px;
  letter-spacing: -0.01em;
}

.mode-card.is-selected .mode-card-name { color: var(--led); text-shadow: 0 0 6px var(--led); }
.mode-card.is-unselected .mode-card-name { color: var(--text); }

.mode-card-intervals {
  font-family: var(--mono);
  font-size: 9px;
  margin-top: 4px;
  letter-spacing: 0.05em;
}

.mode-card.is-selected .mode-card-intervals { color: var(--copper); }
.mode-card.is-unselected .mode-card-intervals { color: var(--dim); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */

.rack-footer {
  background: var(--chassis);
  border-top: 2px solid var(--groove);
  padding: 18px 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--dim);
  transition: background 0.3s;
}

/* ── Mode navigation widget (static pages) ─────────────────────────────────── */

.mode-nav-widget {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.mode-nav-select {
  background: var(--sel-bg);
  color: var(--sel-text);
  border: 1px solid var(--sel-border);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 2px;
  cursor: pointer;
  min-width: 110px;
}

.mode-nav-sep {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--dim);
  letter-spacing: 0.15em;
}

.mode-nav-btn {
  padding: 6px 16px;
  border: 1px solid var(--groove);
  border-radius: 2px;
  background: linear-gradient(180deg, #ff5530, #aa1a0d);
  color: #fff;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 11px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 2px 0 #500;
  cursor: pointer;
}

/* ── Modes pages (static) ───────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--chassis);
  border-bottom: 2px solid var(--groove);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 2px 12px rgba(0,0,0,0.5);
}

.site-header .inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.site-nav { display: flex; gap: 10px; align-items: center; }

.site-nav a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  font-weight: 700;
  padding: 7px 14px;
  color: var(--dim);
  border: 1px solid transparent;
  border-radius: 2px;
  text-decoration: none;
}

.site-nav a:hover { color: var(--text); text-decoration: none; }

.site-footer {
  background: var(--chassis);
  border-top: 2px solid var(--groove);
  padding: 18px 32px;
  text-align: center;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--dim);
}

.site-footer a { color: var(--dim); }
.site-footer a:hover { color: var(--led); text-decoration: none; }

main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

/* Static mode page modules */
.page-rack { display: flex; flex-direction: column; gap: 20px; }

.page-module {
  background: var(--panel);
  border: 1px solid var(--groove);
  border-radius: 4px;
  position: relative;
  box-shadow: var(--mod-shadow);
}

.page-module-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  border-bottom: 1px solid var(--groove);
  background: rgba(0,0,0,0.25);
}

[data-theme="day"] .page-module-header { background: rgba(0,0,0,0.06); }

.page-module-title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--dim);
  font-weight: 700;
}

.page-module-body { padding: 18px; }

/* Breadcrumb */
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--dim);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.breadcrumb a { color: var(--dim); }
.breadcrumb a:hover { color: var(--led); text-decoration: none; }
.breadcrumb .sep { margin: 0 6px; }

/* Mode hero in page */
.mode-degree-badge {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--led);
  border: 1px solid var(--led-border);
  background: var(--led-bg);
  border-radius: 2px;
  padding: 3px 10px;
  letter-spacing: 0.15em;
  display: inline-block;
  margin-bottom: 12px;
  text-shadow: 0 0 4px var(--led);
}

.page-hero-title {
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 6px;
  color: var(--text);
}

.page-hero-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--dim);
  letter-spacing: 0.1em;
}

/* Note pills (static pages) */
.note-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }

.note-pill {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 800;
  padding: 10px 14px;
  border: 1px solid var(--groove);
  border-radius: 3px;
  background: radial-gradient(circle at 30% 30%, #2e2e33, #1a1a1c);
  color: var(--text);
}

.note-pill.is-root {
  background: radial-gradient(circle at 30% 30%, #4a1818, #1a0808);
  color: var(--led-red);
  text-shadow: 0 0 8px var(--led-red);
  border-color: #3a1010;
}

.note-pill.is-penta {
  background: radial-gradient(circle at 30% 30%, #4a3210, #1a0d00);
  color: var(--led);
  text-shadow: 0 0 8px var(--led);
  border-color: var(--led-border);
}

/* Interval formula */
.interval-formula {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--led);
  background: var(--led-bg);
  border: 1px solid var(--led-border);
  border-radius: 2px;
  padding: 8px 14px;
  display: inline-block;
  margin: 10px 0;
  letter-spacing: 0.1em;
  text-shadow: 0 0 4px var(--led);
}

/* Characteristic note */
.characteristic-note {
  font-size: 13px;
  color: var(--dim);
  background: var(--panel-deep);
  border-left: 2px solid var(--led);
  padding: 10px 14px;
  border-radius: 0 2px 2px 0;
  margin-top: 10px;
  line-height: 1.6;
}

.characteristic-note strong { color: var(--text); }

/* Chord cards (static) */
.chord-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

.chord-card {
  background: radial-gradient(circle at 30% 30%, #2e2e33, #1a1a1c);
  border: 1px solid var(--groove);
  border-radius: 3px;
  padding: 10px 14px;
  text-align: center;
  min-width: 80px;
}

.chord-card.tonic {
  background: radial-gradient(circle at 30% 30%, #4a2618, #1a0d08);
  border-color: var(--led-border);
  box-shadow: 0 0 12px rgba(255,170,59,0.15);
}

.chord-card .degree {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 4px;
}

.chord-card.tonic .degree { color: var(--led); }
.chord-card:not(.tonic) .degree { color: var(--dim); }

.chord-card .chord-name {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.chord-card.tonic .chord-name { color: var(--led); text-shadow: 0 0 6px var(--led); }
.chord-card:not(.tonic) .chord-name { color: var(--text); }

/* Mode family table */
.mode-family-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  font-family: var(--mono);
}

.mode-family-table th {
  text-align: left;
  color: var(--dim);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 700;
  padding: 0 12px 8px;
  border-bottom: 1px solid var(--groove);
}

.mode-family-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--groove);
  vertical-align: middle;
}

.mode-family-table tr.selected td {
  background: var(--bg-deep);
  border-color: var(--led-border);
}

.mode-family-table tr.selected td { color: var(--led); text-shadow: 0 0 4px var(--led); }
.mode-family-table tr:not(.selected):hover td { background: var(--panel-deep); }

.mode-family-table a {
  color: var(--led);
  text-decoration: none;
}

/* Key list */
.key-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

.key-chip {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border: 1px solid var(--groove);
  border-radius: 2px;
  background: var(--panel-deep);
  color: var(--dim);
  text-decoration: none;
  transition: color 0.12s, border-color 0.12s;
}

.key-chip:hover { color: var(--led); border-color: var(--led-border); text-decoration: none; }

/* Mode grid (overview pages) */
.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.mode-overview-card {
  background: var(--panel-deep);
  border: 1px solid var(--groove);
  border-radius: 3px;
  padding: 16px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.12s;
}

.mode-overview-card:hover { border-color: var(--led-border); text-decoration: none; }

.mode-overview-card .mode-name {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}

.mode-overview-card:hover .mode-name { color: var(--led); }

.mode-overview-card .mode-desc {
  font-size: 12px;
  color: var(--dim);
}

/* Fretboard (static) */
.fretboard-full { overflow-x: auto; margin-top: 10px; }
.fretboard-full svg { width: 100%; height: auto; display: block; }

/* Mood block (static) */
.mood-block {
  background: var(--bg-deep);
  border: 1px solid var(--groove);
  border-radius: 3px;
  padding: 18px;
}

.mood-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--led);
  border: 1px solid var(--led-border);
  background: var(--led-bg);
  border-radius: 2px;
  padding: 3px 10px;
  margin-bottom: 12px;
  text-shadow: 0 0 4px var(--led);
}

.mood-block h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.mood-block p { font-size: 13px; color: var(--dim); line-height: 1.65; }

.examples-list-static { list-style: none; margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.examples-list-static li { font-family: var(--mono); font-size: 12px; color: var(--dim); padding: 4px 0; }
.examples-list-static li::before { content: '▸ '; color: var(--led); }

/* Related links */
.related-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

/* Utility */
.text-led { color: var(--led); text-shadow: 0 0 4px var(--led); }
.font-mono { font-family: var(--mono); }
.play-over-hint {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  margin-top: 10px;
  padding: 8px 12px;
  border-left: 2px solid var(--led);
  background: var(--bg-deep);
}

/* Guide pages */
.guide-content { max-width: 720px; }
.guide-content h2 { font-size: 18px; font-weight: 700; margin: 32px 0 12px; color: var(--text); }
.guide-content p { margin-bottom: 14px; color: var(--dim); line-height: 1.75; font-size: 14px; }
.guide-content strong { color: var(--text); }
.guide-content ul, .guide-content ol { padding-left: 20px; margin-bottom: 14px; color: var(--dim); }
.guide-content li { margin-bottom: 6px; line-height: 1.65; font-size: 14px; }

/* ── Doc/Guide pages ────────────────────────────────────────────────────────── */

.doc-banner {
  background: var(--chassis);
  border-bottom: 2px solid var(--groove);
  padding: 40px 32px;
  transition: background 0.3s;
}

.doc-banner-inner {
  max-width: 800px;
  margin: 0 auto;
}

.doc-path {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--dim);
  margin-bottom: 16px;
}

.doc-path a { color: var(--dim); text-decoration: none; }
.doc-path a:hover { color: var(--led); }
.doc-path .sep { margin: 0 6px; opacity: 0.4; }

.doc-title {
  font-family: var(--mono);
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.15;
}

.doc-subtitle {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--dim);
  letter-spacing: 0.1em;
}

.doc-body {
  max-width: 800px;
  margin: 0 auto;
  padding: 36px 32px 80px;
}

.doc-section { margin-bottom: 44px; }

.doc-section-label {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.28em;
  color: var(--copper);
  text-transform: uppercase;
  border-bottom: 1px solid var(--groove);
  padding-bottom: 10px;
  margin-bottom: 22px;
}

.doc-body p { color: var(--dim); line-height: 1.8; font-size: 16px; margin-bottom: 16px; }
.doc-body p strong { color: var(--text); }
.doc-body ul, .doc-body ol { padding-left: 22px; margin-bottom: 16px; color: var(--dim); }
.doc-body li { font-size: 16px; line-height: 1.7; margin-bottom: 8px; }

.doc-divider { border: none; border-top: 1px solid var(--groove); margin: 32px 0; }

.doc-callout {
  background: var(--panel-deep);
  border-left: 3px solid var(--led);
  padding: 16px 20px;
  border-radius: 0 3px 3px 0;
  margin: 20px 0;
  font-size: 16px;
  color: var(--dim);
  line-height: 1.75;
}
.doc-callout strong { color: var(--text); }

/* Mode entries */
.mode-entries { display: flex; flex-direction: column; gap: 3px; }

.mode-entry {
  display: grid;
  grid-template-columns: 228px 1fr;
  border: 1px solid var(--groove);
  border-radius: 3px;
  overflow: hidden;
  background: var(--panel-deep);
}

.mode-entry-left {
  background: rgba(0,0,0,0.22);
  padding: 16px 18px;
  border-right: 1px solid var(--groove);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.mode-entry-right { padding: 16px 18px; }

.mode-entry-name {
  font-family: var(--mono);
  font-size: 19px;
  font-weight: 800;
  line-height: 1;
}

.mode-entry-degree {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--text);
  opacity: 0.55;
  font-weight: 700;
  margin-top: 6px;
  white-space: nowrap;
}

.mode-entry-formula {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.formula-deg {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.formula-int {
  font-size: 14px;
  opacity: 0.6;
  letter-spacing: 0.12em;
  white-space: nowrap;
}

.mode-entry.major .mode-entry-name { color: var(--led); text-shadow: 0 0 6px var(--led); }
.mode-entry.major .mode-entry-formula { color: var(--led); }
.mode-entry.minor .mode-entry-name { color: #7ab0ff; }
.mode-entry.minor .mode-entry-formula { color: #7ab0ff; }
.mode-entry.diminished .mode-entry-name { color: var(--led-red); }
.mode-entry.diminished .mode-entry-formula { color: var(--led-red); }

.mode-entry-mood {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text);
  margin-bottom: 8px;
}

.mode-entry-desc { font-size: 15px; color: var(--dim); line-height: 1.7; margin-bottom: 10px; }

.mode-entry-examples {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dim);
  letter-spacing: 0.03em;
}
.mode-entry-examples em { color: var(--copper); font-style: normal; }

/* CAGED shapes */
.caged-shapes-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 16px 0;
}

.caged-shape-card {
  background: var(--panel-deep);
  border: 1px solid var(--groove);
  border-radius: 3px;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
}

.caged-shape-card-visual {
  width: 100%;
  text-align: left;
}

.caged-shape-card-letter {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 800;
  color: var(--led);
  text-shadow: 0 0 12px var(--led);
  margin-bottom: 10px;
  line-height: 1;
}

.caged-shape-card img {
  width: 100%;
  border-radius: 3px;
  border: 1px solid var(--groove);
  display: block;
}

.caged-shape-card p { font-size: 15px; color: var(--dim); line-height: 1.7; margin: 14px 0 0; }

/* About stats */
.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--groove);
  border: 1px solid var(--groove);
  border-radius: 3px;
  overflow: hidden;
  margin: 20px 0;
}

.about-stat {
  background: var(--panel-deep);
  padding: 20px 16px;
  text-align: center;
}

.about-stat-value {
  font-family: var(--mono);
  font-size: 30px;
  font-weight: 800;
  color: var(--led);
  text-shadow: 0 0 10px var(--led);
  margin-bottom: 6px;
  line-height: 1;
}

.about-stat-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--dim);
  font-weight: 700;
}

/* Feedback form */
.doc-form { display: flex; flex-direction: column; gap: 20px; max-width: 640px; }

.doc-field { display: flex; flex-direction: column; gap: 7px; }

.doc-field label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--dim);
  font-weight: 700;
}

.doc-field input,
.doc-field textarea,
.doc-field select {
  background: var(--bg-deep);
  border: 1px solid var(--groove);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 2px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}

.doc-field input:focus,
.doc-field textarea:focus,
.doc-field select:focus { border-color: var(--copper); }

.doc-field textarea { resize: vertical; min-height: 160px; }

.doc-submit {
  padding: 13px 28px;
  background: linear-gradient(180deg, #ff5530, #aa1a0d);
  color: #fff;
  font-family: var(--mono);
  font-weight: 800;
  letter-spacing: 0.15em;
  font-size: 12px;
  border: 1px solid #600;
  border-radius: 2px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 2px 0 #400;
  cursor: pointer;
  align-self: flex-start;
  transition: opacity 0.15s;
}

.doc-submit:hover { opacity: 0.88; }

.feedback-success {
  background: var(--panel-deep);
  border: 1px solid var(--led-border);
  border-left: 3px solid var(--led-green);
  border-radius: 3px;
  padding: 20px 24px;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--led-green);
  letter-spacing: 0.05em;
  display: none;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
  .rack-row { grid-template-columns: 1fr; }
  .lookup-grid { grid-template-columns: 1fr; }
  .character-grid { grid-template-columns: 1fr; }
  .modes-strip { grid-template-columns: repeat(4, 1fr); }
  .family-list { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 640px) {
  .rack, main { padding: 16px 16px 40px; }
  .rack-header-inner { padding: 10px 16px; }
  .rack-nav { display: none; }
  .modes-strip { grid-template-columns: repeat(3, 1fr); }
  .chord-pad-grid { grid-template-columns: repeat(3, 1fr); }
  .brand-label-main { font-size: 14px; }
  .doc-banner { padding: 24px 16px; }
  .doc-body { padding: 24px 16px 60px; }
  .mode-entry { grid-template-columns: 1fr; }
  .mode-entry-left { border-right: none; border-bottom: 1px solid var(--groove); }
  .caged-shape-card-letter { font-size: 26px; }
  .about-stats { grid-template-columns: repeat(2, 1fr); }
}
