/* Editor UI — functional, not trying to out-shine the character pages
   themselves. Neutral dark admin-panel look that works for any theme. */

.editor-wrap{
  max-width:820px;
  margin:0 auto;
  padding:90px 24px 100px 24px;
  color:#e7dcc4;
  font-family:'IBM Plex Mono', monospace;
}
.editor-wrap h1{
  font-family:'Cormorant Garamond', serif;
  font-size:36px;
  color:#f7edd6;
  margin:0 0 6px 0;
}
.editor-wrap .sub{ color:#a89a83; font-size:14px; margin:0 0 40px 0; }

.ed-section{
  background:#171320;
  border:1px solid rgba(232,194,106,0.14);
  border-radius:8px;
  padding:22px 24px;
  margin-bottom:22px;
}
.ed-section h2{
  font-family:'Cormorant Garamond', serif;
  font-weight:700;
  font-size:22px;
  color:#f0d488;
  margin:0 0 16px 0;
}
.ed-section h2 .hint{
  font-family:'IBM Plex Mono', monospace;
  font-weight:400;
  font-size:12px;
  color:#a89a83;
  margin-left:10px;
}

.ed-field{ margin-bottom:14px; }
.ed-field label{
  display:block;
  font-size:11.5px;
  letter-spacing:0.05em;
  text-transform:uppercase;
  color:#cdbfa3;
  margin-bottom:5px;
}
.ed-field .help{
  font-size:11.5px;
  color:#7d715c;
  margin-top:4px;
}
.ed-row{ display:flex; gap:14px; flex-wrap:wrap; }
.ed-row > .ed-field{ flex:1; min-width:160px; }

input[type=text], input[type=number], textarea, select{
  width:100%;
  background:#0d0b16;
  border:1px solid rgba(232,194,106,0.25);
  border-radius:4px;
  color:#f3e9d8;
  padding:9px 11px;
  font-family:'Lora', serif;
  font-size:14.5px;
}
textarea{ min-height:90px; resize:vertical; line-height:1.5; }
input[type=file]{
  color:#cdbfa3;
  font-size:13px;
}
input:focus, textarea:focus, select:focus{
  outline:none;
  border-color:#e8c26a;
}

.repeat-row{
  display:flex;
  gap:8px;
  align-items:flex-start;
  margin-bottom:8px;
}
.repeat-row > *{ flex:1; }
.repeat-row .rm-btn{
  flex:0 0 auto;
  width:32px;
  height:38px;
}

.btn{
  display:inline-block;
  background:#231d33;
  border:1px solid rgba(232,194,106,0.3);
  color:#e8c26a;
  padding:8px 14px;
  border-radius:4px;
  font-family:'IBM Plex Mono', monospace;
  font-size:12.5px;
  cursor:pointer;
  text-decoration:none;
}
.btn:hover{ background:#2c2540; }
.btn.small{ padding:5px 10px; font-size:12px; }
.btn.danger{ color:#e8886a; border-color:rgba(232,136,106,0.35); }
.btn.primary{ background:#e8c26a; color:#171320; border-color:#e8c26a; font-weight:600; }
.btn.primary:hover{ background:#f0d488; }

.add-row-btn{ margin-top:4px; }

.theme-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(150px, 1fr));
  gap:12px;
}
.theme-option{
  cursor:pointer;
  border:2px solid transparent;
  border-radius:6px;
  overflow:hidden;
  background:#0d0b16;
}
.theme-option.selected{ border-color:#e8c26a; }
.theme-option input{ display:none; }
.theme-swatch{ height:56px; display:flex; }
.theme-swatch span{ flex:1; }
.theme-option .theme-label{
  font-family:'Lora', serif;
  font-size:13px;
  color:#e7dcc4;
  padding:8px 10px 2px 10px;
}
.theme-option .theme-blurb{
  font-size:10.5px;
  color:#8c7f68;
  padding:0 10px 10px 10px;
  line-height:1.4;
}

.block-card{
  background:#0f0c18;
  border:1px solid rgba(232,194,106,0.18);
  border-radius:6px;
  padding:18px 20px;
  margin-bottom:16px;
}
.block-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.block-type-label{
  font-size:11px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:#e8c26a;
}
.block-card-actions{ display:flex; gap:6px; }

.person-card{
  background:#171320;
  border:1px dashed rgba(232,194,106,0.25);
  border-radius:6px;
  padding:16px 18px;
  margin-bottom:12px;
}
.person-card-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
}

.add-section-bar{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.form-actions{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:30px;
}

.image-current{
  font-size:12px;
  color:#8c7f68;
  margin-bottom:6px;
}

/* ---------- "new page" type picker ---------- */
.kind-grid{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(230px, 1fr));
  gap:12px; margin-bottom:26px;
}
.kind-option{
  display:block; text-decoration:none; background:#171327;
  border:1px solid #2c2544; border-radius:7px; padding:16px 16px 14px 16px;
  transition:border-color 0.15s ease, transform 0.15s ease;
}
.kind-option:hover{ border-color:#e8c26a; transform:translateY(-2px); }
.kind-option-label{
  font-family:'Lora', serif; font-weight:600; font-size:18px;
  color:#e8c26a; margin-bottom:5px;
}
.kind-option-blurb{ color:#a89a83; font-size:13.5px; line-height:1.5; }
.kind-option-count{
  font-family:'IBM Plex Mono', monospace; font-size:10.5px;
  letter-spacing:0.06em; text-transform:uppercase; color:#6f6455; margin-top:9px;
}

/* tiny button — used for the quick-fact suggestion chips */
.btn.tiny{
  font-size:11px; padding:3px 9px; margin:0 4px 4px 0; border-radius:100px;
}

/* ---------- voice enrolment ---------- */
.voice-list{ margin:10px 0 14px 0; }
.voice-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  background:#171327; border:1px solid #2c2544; border-radius:7px;
  padding:9px 13px; margin-bottom:7px; font-size:14px; color:#cdbfa3;
}
.voice-controls{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.voice-timer{
  font-family:'IBM Plex Mono', monospace; font-size:19px; color:#e8c26a;
  min-width:56px;
}
.voice-status{ font-size:14px; color:#a89a83; }
#voice-record{ min-width:170px; }

/* voice enrolment: passage to read + progress toward a usable profile */
.voice-passage{
  background:#171327; border-left:3px solid #e8c26a; border-radius:0 7px 7px 0;
  padding:13px 16px; margin:12px 0 14px 0;
}
.voice-passage-label{
  font-family:'IBM Plex Mono', monospace; font-size:10.5px; letter-spacing:0.08em;
  text-transform:uppercase; color:#e8c26a; margin:0 0 7px 0;
}
.voice-passage p{ margin:0; color:#cdbfa3; font-size:15.5px; line-height:1.6;
  /* passages are several paragraphs now — keep the blank lines */
  white-space:pre-line; }
.voice-progress{ margin:12px 0 6px 0; }
.voice-bar{
  height:6px; background:#221c38; border-radius:100px; overflow:hidden;
}
.voice-bar-fill{
  height:100%; width:0; border-radius:100px;
  background:linear-gradient(90deg,#8a6a2a,#e8c26a); transition:width 0.4s ease;
}
.voice-progress-note{ font-size:13px; color:#a89a83; margin:7px 0 0 0; }
