:root {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #2e2419;
  background: #eee8dc;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { border: 0; border-radius: 12px; padding: 10px 14px; background: #efe1cf; color: #3d2f20; font-weight: 700; cursor: pointer; }
button:hover { filter: brightness(.97); }
button.active, button.primary { background: #254834; color: white; }
.app { min-height: 100vh; }
header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 38px; background: linear-gradient(90deg, #f7f4ed, #eadfcd); border-bottom: 1px solid #d9cab7; position: sticky; top: 0; z-index: 5; }
h1 { margin: 0; font-size: 28px; }
header p { margin: 8px 0 0; color: #765f48; }
code { background: #f3eadb; color: #613b18; border-radius: 8px; padding: 2px 6px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.toolbar label { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border-radius: 14px; background: #fbf8f0; border: 1px solid #e3d2bd; }
main { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 96px); align-items: start; }
nav {
  padding: 22px;
  background: #faf7ef;
  border-right: 1px solid #decfbd;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 106px;
  height: calc(100vh - 106px);
  overflow-y: auto;
  z-index: 4;
}
nav::-webkit-scrollbar { width: 8px; }
nav::-webkit-scrollbar-thumb { background: #d9cab7; border-radius: 999px; }
nav button { text-align: left; }
section { padding: 28px; }
.grid { display: grid; grid-template-columns: minmax(350px, 1fr) minmax(350px, 1fr); gap: 24px; align-items: start; }
.card { background: #fffaf3; border: 1px solid #deceb9; border-radius: 22px; padding: 22px; box-shadow: 0 18px 60px rgba(68,45,20,.08); margin-bottom: 22px; }
.card h2 { margin-top: 0; }
.field { display: grid; gap: 8px; margin: 14px 0; font-weight: 700; color: #5b452e; }
.field input, .field select, .field textarea, select { width: 100%; border: 1px solid #cdb89f; background: white; border-radius: 14px; padding: 12px; color: #22180e; }
.field textarea { min-height: 120px; resize: vertical; }
.check { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px; background: #f3eadc; border-radius: 14px; font-weight: 700; }
.rowCard { padding: 16px; margin: 16px 0; border: 1px solid #e1d2bf; border-radius: 18px; background: #fffdf8; }
.textureGroup { background: #f7efe4; border-radius: 18px; padding: 14px; margin: 16px 0; }
.textureGroup h3 { margin: 0 0 10px; }
.drop { display: grid; gap: 8px; padding: 16px; border: 2px dashed #c9b69e; border-radius: 18px; background: rgba(255,255,255,.64); margin: 10px 0; min-height: 95px; align-content: center; cursor: pointer; }
.drop input { display: none; }
.drop.dragOver { background: #e6f4ea; border-color: #2d7a46; }
.drop span { color: #735a40; }
.asset { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #deceb9; }
.errors { color: #aa2a1c; font-weight: 700; }
.chips { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.chips label { background: #fff; border: 1px solid #e4d5c5; border-radius: 14px; padding: 12px; }
pre { white-space: pre-wrap; background: #f4eadb; border-radius: 14px; padding: 18px; }
@media (max-width: 900px) { main { grid-template-columns: 1fr; } nav { position: sticky; top: 0; height: auto; max-height: 45vh; overflow-y: auto; border-right: 0; border-bottom: 1px solid #decfbd; } .grid { grid-template-columns: 1fr; } header { align-items: flex-start; flex-direction: column; position: static; } }
.rowHeader { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rowHeader h3 { margin: 0; }
button.danger { background: #f4d6d1; color: #8a1f12; }
.rowLine { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.selectedGenes { margin: 10px 0 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: #dff3e8; border-radius: 999px; padding: 6px 10px; font-weight: 700; }
.chip button { padding: 0 6px; border-radius: 999px; background: transparent; }
.geneCategory { margin: 16px 0; padding: 14px; border-radius: 18px; background: #f7efe4; }
.geneCategory h3 { margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.geneOption { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.geneOption span { display: grid; gap: 4px; }
.geneOption em { color: #765f48; font-style: normal; font-size: .92em; }
@media (max-width: 700px) { .rowLine { grid-template-columns: 1fr; } .rowHeader { align-items: stretch; flex-direction: column; } }
.toolbarInline { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.accordionCard { padding: 0; overflow: hidden; }
.accordionHeader { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 16px; cursor: pointer; background: #f8efe2; border-bottom: 1px solid #e3d3c0; }
.accordionHeader:hover { filter: brightness(.985); }
.accordionHeader h3 { margin: 0 0 4px; }
.accordionHeader p { margin: 0; color: #765f48; font-size: .92rem; }
.accordionBody { padding: 16px; }
.hint { color: #765f48; font-size: .95rem; }
@media (max-width: 700px) { .accordionHeader { align-items: stretch; flex-direction: column; } .toolbarInline { width: 100%; } }
