/* Final Forge layout: compact, legible controls without changing pass or groove behavior. */
.anvil-forge,
.forge-pad-groove {
  border-width: 1px;
  border-color: #9b8061;
  border-radius: 12px;
  background: linear-gradient(145deg, #252827, #172122 60%, #111d1e);
  box-shadow: inset 0 1px #f0d1a13d, 0 8px 24px #02070880;
}
.anvil-forge::before,
.forge-pad-groove::before {
  height: 3px;
  background: linear-gradient(90deg, #d88a56, #e9bd83 52%, #78b39c 100%);
  box-shadow: none;
}
.anvil-forge:not(.forge-locked) { overflow: visible; }
.anvil-forge { padding: 14px 16px 13px; }
/* Let the mixer end at Shape the Hit instead of reserving blank space above Forge. */
.heritage-ui #root .anvil-bank-mix-panel:has(+ .anvil-forge) {
  height: fit-content;
  min-height: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}
.heritage-ui #root .anvil-bank-mix-panel + .anvil-forge { margin-top: -10px; }
.forge-header,
.forge-pad-groove__heading {
  align-items: center;
  padding-bottom: 9px;
  border-bottom-color: #8e775c80;
}
.forge-header strong { font-size: clamp(18px, 1.7vw, 22px); letter-spacing: .085em; }
.forge-header strong::before,
.forge-pad-groove__heading strong::before {
  margin-right: 8px;
  color: #e6b47b;
  text-shadow: none;
}
.forge-header > div { gap: 8px; }
.forge-header span { font-size: 9px; letter-spacing: .07em; }
.forge-header .forge-unlocked,
.forge-pad-groove__heading b {
  padding: 4px 9px;
  border-radius: 999px;
  background: #19312d;
  color: #b9ebd1;
  font-size: 9px;
  letter-spacing: .07em;
}
.forge-help {
  max-width: none;
  margin: 9px 0 11px;
  padding: 8px 11px;
  border-left: 2px solid #b38a62;
  border-radius: 0 5px 5px 0;
  background: #101a1bb8;
  color: #cdd6cf;
  font-size: 10px;
  line-height: 1.45;
}
.forge-project-import {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 11px;
  padding: 11px 13px;
  border: 1px solid #756851;
  border-radius: 7px;
  background: linear-gradient(120deg, #141b1b, #26302b);
}
.forge-project-import__copy { display: grid; gap: 4px; min-width: 0; }
.forge-project-import__copy strong { color: #f2c58b; font-size: 11px; letter-spacing: .06em; }
.forge-project-import__copy span { color: #c2cbc5; font-size: 10px; line-height: 1.45; }
.forge-project-import__actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.forge-project-import__button {
  flex: 0 0 auto;
  min-height: 37px;
  padding: 8px 13px;
  border: 1px solid #e8b574;
  border-radius: 5px;
  background: linear-gradient(#edc387, #b9854e);
  color: #172020;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .035em;
  cursor: pointer;
}
.forge-project-import__button--secondary {
  border-color: #677a76;
  background: linear-gradient(#344947, #263735);
  color: #edf4ee;
}
.forge-project-import__button:hover { filter: brightness(1.08); }
.forge-project-import__button:focus-visible { outline: 3px solid #b5e5d3; outline-offset: 2px; }
.forge-project-import__button:disabled { cursor: wait; opacity: .65; }
.forge-project-import__guide { display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:7px 11px;border:1px solid #c69b66;border-radius:6px;background:#251e19;color:#ffe0b5;font:800 10px ui-monospace,monospace;letter-spacing:.04em;text-decoration:none;white-space:nowrap; }
.forge-project-import__guide:hover { background:#45301f;color:#fff0da; }
.forge-project-import__guide:focus-visible { outline:3px solid #b5e5d3;outline-offset:2px; }
@media (max-width: 680px) {
  .forge-project-import { align-items: stretch; flex-direction: column; }
  .forge-project-import__actions { width: 100%; }
  .forge-project-import__button { flex: 1 1 100%; }
}
.forge-tabs { gap: 7px; padding: 0; }
.forge-card {
  min-height: 0;
  gap: 5px;
  padding: 8px 9px;
  border-color: #536a62;
  border-radius: 7px;
  background: linear-gradient(180deg, #273a35, #1b2d2b);
  box-shadow: inset 0 1px #a9d8bc24, 0 2px 5px #0004;
}
.forge-card:hover { border-color: #d6ae7a; background: linear-gradient(#31443c, #23342e); }
.forge-card.is-active {
  border-color: #f0bd7d;
  background: linear-gradient(180deg, #634e35, #413629);
  box-shadow: inset 3px 0 #f0bd7d, 0 0 0 1px #d3a36455;
}
.forge-tab { min-height: 22px; }
.forge-tab span { font-size: 10px; letter-spacing: .045em; }
.forge-tab small { bottom: 4px; }
.forge-bank-picker summary {
  min-height: 31px;
  padding: 7px 8px;
  border-color: #86745c;
  border-radius: 5px;
  background: #0d1b1b;
  color: #f0c58e;
  font-size: 9px;
}
.forge-bank-picker[open] summary { border-color: #e5b579; border-radius: 5px 5px 0 0; }
.forge-bank-choice button.is-active {
  border-color: #a7dfbe;
  background: #1b3b31;
  color: #d4ffe5;
}
.forge-bank-choices {
  top: calc(100% + 2px);
  border-color: #bd9166;
  box-shadow: 0 14px 28px #000b;
}
.forge-bank-choice { min-height: 30px; }
.forge-bank-choice label { font-size: 10px; }
.forge-bank-choice button { min-height: 26px; padding: 4px 8px; }
.forge-audio-route {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #b28b5e;
  border-radius: 8px;
  background: linear-gradient(125deg, #182120, #121b1d 65%, #202322);
  box-shadow: inset 3px 0 #e2ad70, inset 0 1px #ffffff20;
}
.forge-audio-route__heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 13px; margin-bottom: 10px; }
.forge-audio-route__heading strong { color: #f5c98f; font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.forge-audio-route__heading span { color: #c8d0cb; font-size: 10px; line-height: 1.4; }
.forge-audio-route__controls { display: grid; grid-template-columns: minmax(175px, .85fr) minmax(0, 2fr); align-items: end; gap: 10px; }
.forge-audio-route__banks { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 5px; }
.forge-audio-route__banks label {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  min-height: 36px; padding: 4px; border: 1px solid #5e756c; border-radius: 5px;
  background: #20312e; color: #e7f2e9;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace; cursor: pointer;
}
.forge-audio-route__banks label:has(input:checked) { border-color: #e8bb7f; background: #57412c; color: #fff2da; box-shadow: inset 0 0 0 1px #e8bb7f55; }
.forge-audio-route__banks input { width: 15px; height: 15px; margin: 0; accent-color: #e8bb7f; }
.forge-audio-route__destinations { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.forge-audio-route__destinations button {
  min-height: 38px; padding: 7px 9px; border: 1px solid #a7855c; border-radius: 5px;
  background: linear-gradient(#3b4942, #273832); color: #fff0d8;
  font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .03em; cursor: pointer;
}
.forge-audio-route__destinations button:hover { border-color: #f4ca91; background: #4b5b4f; }
.forge-audio-route__destinations button:disabled { opacity: .55; cursor: wait; }
.forge-audio-route__destinations button:focus-visible,
.forge-audio-route__banks input:focus-visible { outline: 3px solid #b5e5d3; outline-offset: 2px; }
.forge-audio-route__status { min-height: 15px; margin: 8px 0 0; color: #b9d9c6; font-size: 10px; line-height: 1.4; }
.forge-copy {
  margin-top: 12px;
  padding: 11px 12px 10px;
  border: 1px solid #52665e;
  border-radius: 8px;
  background: linear-gradient(180deg, #172524, #111c1d);
}
.forge-copy-title { gap: 8px; margin-bottom: 8px; }
.forge-copy-title strong {
  color: #efbd7d;
  font-size: 11px;
  letter-spacing: .07em;
  white-space: nowrap;
}
.forge-copy-title span { color: #b9c9bf; font-size: 9px; line-height: 1.35; }
.forge-copy-controls {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) minmax(155px, 1.08fr);
  align-items: end;
  gap: 7px;
}
.forge-field { min-width: 0; gap: 3px; }
.forge-field span { color: #9fc6b0; font-size: 8px; letter-spacing: .09em; }
.forge-field select {
  min-height: 36px;
  padding: 5px 8px;
  border-color: #66796e;
  background: #0b1415;
  color: #f2ede2;
  font-size: 10px;
}
.anvil-forge:not(.forge-locked) .forge-copy-button {
  min-height: 36px;
  padding: 6px 9px;
  border-color: #ebbe85;
  border-radius: 6px;
  background: linear-gradient(#f2c58a, #dda35d);
  box-shadow: inset 0 1px #fff0cc, 0 2px 4px #0006;
  font-size: 9px;
}
.forge-status { margin-top: 7px; color: #b9c8be; font-size: 9px; }

.forge-pad-groove {
  margin: 12px 0 15px;
  padding: 14px 16px 12px;
}
.forge-pad-groove__heading strong { font-size: clamp(15px, 1.5vw, 18px); letter-spacing: .075em; }
.forge-pad-groove__heading span { font-size: 9px; }
.forge-pad-groove__target {
  margin: 10px 0;
  padding: 8px 10px;
  border-color: #528674;
  border-radius: 6px;
  background: linear-gradient(#0c2722, #0b211f);
  box-shadow: inset 0 1px #9ed4b92e;
  color: #f3d39c;
  font-size: 10px;
}
.forge-pad-groove__layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.05fr) minmax(0, .75fr);
  gap: 8px;
}
.forge-pad-groove__control {
  min-height: 0;
  gap: 5px;
  padding: 10px;
  border-color: #527569;
  border-radius: 7px;
  background: linear-gradient(#132b28, #0e201f);
  box-shadow: inset 0 1px #a0d6b72d;
}
.forge-pad-groove__control strong { color: #bdeed6; font-size: 10px; }
.forge-pad-groove__control small { color: #afc4b7; font-size: 9px; line-height: 1.3; }
.forge-pad-groove__control output { font-size: 10px; }
.forge-pad-groove__grid,
.forge-pad-groove__swing-presets,
.forge-pad-groove__feel { gap: 4px; }
.forge-pad-groove__control button {
  min-height: 29px;
  padding: 4px 6px;
  border-color: #618874;
  border-radius: 5px;
  background: linear-gradient(#254438, #1b322b);
  box-shadow: inset 0 1px #9bc7a631;
  font-size: 9px;
}
.forge-pad-groove__control button.is-active {
  border-color: #c5f1d6;
  background: linear-gradient(#a9e4bc, #78c6a0);
  box-shadow: inset 0 1px #e7ffe6, 0 0 0 1px #8bdaad55;
}
.forge-pad-groove__control input[type="range"] { min-height: 24px; margin: 0; }
.forge-pad-groove__footer {
  gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top-color: #698b795e;
}
.forge-pad-groove__footer button {
  min-height: 35px;
  padding: 7px 10px;
  border-radius: 6px;
  box-shadow: inset 0 1px #ffffff4d, 0 2px 4px #0005;
  font-size: 9px;
}
.forge-pad-groove__footer p { margin-top: 3px; color: #bbd0c2; font-size: 9px; }
.forge-pad-groove__locked { margin-top: 10px; }

@media (max-width: 1050px) {
  .forge-copy-controls { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .forge-pad-groove__layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-pad-groove__control:last-child { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .anvil-forge, .forge-pad-groove { padding: 12px; }
  .forge-audio-route__controls { grid-template-columns: minmax(0, 1fr); }
  .forge-audio-route__banks { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .forge-audio-route__destinations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-header, .forge-pad-groove__heading { align-items: flex-start; flex-wrap: wrap; }
  .forge-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-copy-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .forge-copy-button { grid-column: 1 / -1; }
  .forge-pad-groove__layout { grid-template-columns: minmax(0, 1fr); }
  .forge-pad-groove__control:last-child { grid-column: auto; }
  .forge-pad-groove__apply-bank { margin-left: 0; }
}
@media (max-width: 430px) {
  .forge-tabs { grid-template-columns: minmax(0, 1fr); }
  .forge-audio-route__destinations { grid-template-columns: minmax(0, 1fr); }
}
