.protein-editor{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  max-width: 1240px;
  margin: 18px auto;
  padding: 0 14px;
  color: #111;
}
.pe-topbar{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px; padding: 10px 2px 14px 2px;
}
.pe-brand{ display:flex; align-items:center; gap:12px; }
.pe-logo{
  width: 54px; height: 54px; border-radius: 16px;
  display:flex; align-items:center; justify-content:center;
  background:#111; color:#fff; font-weight:800; letter-spacing:.5px;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.pe-title{ font-size: 18px; font-weight: 750; }
.pe-sub{ font-size: 12.5px; opacity: .75; margin-top: 2px; }
.pe-top-actions{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }

.pe-grid{ display:grid; grid-template-columns: 420px 1fr; gap:14px; }
@media (max-width: 1050px){ .pe-grid{ grid-template-columns: 1fr; } }

.pe-card{
  background:#fff; border:1px solid #e8e8e8; border-radius: 18px;
  padding: 14px; box-shadow: 0 1px 10px rgba(0,0,0,.04);
}
.pe-card h3{ margin: 6px 0 10px 0; font-size: 15px; }
.pe-divider{ height: 1px; background:#eee; margin: 14px 0; }

.pe-row{ display:flex; gap:10px; flex-wrap:wrap; align-items:end; }
.pe-col{ min-width: 170px; }
.pe-grow{ flex: 1; min-width: 220px; }

label{ display:block; font-size: 12px; opacity:.75; margin-bottom: 6px; }
select,input[type="text"],input[type="number"]{
  width:100%; padding: 9px 10px;
  border:1px solid #ddd; border-radius: 12px; background:#fafafa;
}

.pe-btn{
  border:1px solid #ddd; background:#f7f7f7; color:#111;
  padding: 9px 12px; border-radius: 12px; cursor:pointer;
  font-weight: 650; font-size: 13px;
}
.pe-btn:hover{ filter: brightness(.98); }
.pe-btn:disabled{ opacity:.5; cursor:not-allowed; }
.pe-btn-primary{ background:#111; color:#fff; border-color:#111; }
.pe-btn-ghost{ background:#fff; }
.pe-btn-danger{ background:#fff; border-color:#ffb9b9; color:#b80000; }

.pe-help{
  margin-top: 10px; padding: 10px 12px;
  background:#fafafa; border: 1px dashed #e3e3e3; border-radius: 14px;
  font-size: 12.8px; line-height: 1.35;
}
.pe-help-small{ margin-top: 6px; opacity: .8; font-size: 12px; }
.pe-note{
  margin-top: 10px; padding: 10px 12px;
  background:#fff8e6; border: 1px solid #ffe1a8; border-radius: 14px;
  font-size: 12.8px;
}

.pe-tabs{
  display:flex; gap:8px; flex-wrap:wrap;
  border-bottom:1px solid #eee; padding-bottom: 10px; margin-bottom: 12px;
}
.pe-tab{
  border:1px solid #e6e6e6; background:#fff;
  padding: 8px 10px; border-radius: 999px; cursor:pointer;
  font-weight: 700; font-size: 12.5px;
}
.pe-tab.is-active{ background:#111; color:#fff; border-color:#111; }

.pe-tabpane{ display:none; }
.pe-tabpane.is-active{ display:block; }

.pe-pane-head{
  display:flex; justify-content:space-between; align-items:center;
  gap:10px; flex-wrap:wrap;
  margin: 2px 0 10px 0;
}
.pe-pane-head h3{ margin:0; }
.pe-pane-actions{ display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.pe-pill{
  padding: 7px 10px; border-radius: 999px; background:#f3f3f3; border:1px solid #e7e7e7;
  font-weight: 750; font-size: 12px;
}

.pe-macros{
  display:grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 10px;
}
@media (max-width: 980px){ .pe-macros{ grid-template-columns: repeat(2, minmax(210px, 1fr)); } }
@media (max-width: 560px){ .pe-macros{ grid-template-columns: 1fr; } }

.pe-macro{
  border:1px solid #eee; border-radius: 16px; padding: 12px; background:#fcfcfc;
}
.pe-macro-head{ display:flex; justify-content:space-between; align-items:center; gap:8px; margin-bottom: 8px; }
.pe-macro-title{ font-weight: 800; font-size: 13px; }
.pe-mini{ font-size: 11.5px; opacity:.7; }
.pe-macro-grid{ display:grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pe-slider{ width:100%; }
.pe-val{ margin-top: 6px; font-size: 12px; opacity:.8; display:flex; justify-content:space-between; }

.pe-section{
  display:grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 10px;
}
@media (max-width: 980px){ .pe-section{ grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 560px){ .pe-section{ grid-template-columns: 1fr; } }

.pe-param{
  border:1px solid #eee; border-radius: 16px; padding: 12px; background:#fcfcfc;
}
.pe-param h4{ margin:0 0 8px 0; font-size: 13px; }
.pe-param .pe-minirow{ display:flex; gap:8px; align-items:center; }
.pe-param .pe-minirow input[type="number"]{ width: 90px; }

.pe-xy-wrap{ padding: 10px 6px; }
#pe-xy{
  width: 100%; max-width: 760px; height:auto;
  border-radius: 16px; border:1px solid #eee; background: #fafafa;
}
.pe-xy-readout{ display:flex; gap:14px; margin-top: 10px; font-size: 13px; }
.pe-xy-readout span{ opacity:.7; }
.pe-xy-assign{ display:flex; gap:8px; align-items:end; }
.pe-xy-assign label{ margin-bottom: 0; }
.pe-xy-assign input{ width: 80px; }

.pe-template-grid{
  display:grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 10px;
}
@media (max-width: 980px){ .pe-template-grid{ grid-template-columns: repeat(2, minmax(220px, 1fr)); } }
@media (max-width: 560px){ .pe-template-grid{ grid-template-columns: 1fr; } }
.pe-template{
  border:1px solid #eee; border-radius: 16px; padding: 12px; background:#fcfcfc;
}
.pe-template h4{ margin: 0 0 6px 0; }
.pe-template p{ margin: 0 0 8px 0; font-size: 12.8px; opacity:.85; }
.pe-template ul{ margin: 0; padding-left: 18px; font-size: 12.6px; opacity:.85; }

.pe-footer{ opacity:.7; padding: 10px 2px; }
