/* ---- the form in three panels: where it goes · the tale · also on the site ---- */
.panel {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 18px 20px 20px;
  margin-bottom: 16px;
}
h2.psec {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 4px;
  font-family: var(--display);
  font-weight: 400;
  font-size: 22px;
  color: var(--heading);
  text-transform: none;
  letter-spacing: 0;
}
h2.psec::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-warm);
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}

label.lbl {
  display: block;
  color: var(--text-dim);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 16px 0 6px;
}

/* fields: full width on their own, growing inside a row (base styling comes from ui.css) */
textarea {
  width: 100%;
}
.frow .grow {
  flex: 1;
  min-width: 180px;
}
.sitepub input[type="text"],
.sitepub select {
  min-width: 200px;
}

/* saved-mentions manager */
.mgr {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: grid;
  gap: 10px;
}
.mgr > .sub {
  margin: 0;
  line-height: 1.5;
}

/* image picker: a dashed drop zone */
input[type="file"].drop {
  width: 100%;
  padding: 14px;
  background: var(--field);
  border: 1px dashed var(--line-warm);
  border-radius: var(--radius-lg);
  color: var(--text-dim);
  cursor: pointer;
}
input[type="file"].drop:hover {
  border-color: var(--accent);
}

/* the post row */
.postbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.postbar .sub {
  margin: 0;
}
.postbar .sub a {
  color: var(--accent);
}
textarea {
  min-height: 240px;
  padding: 10px 12px;
  font-family: Consolas, monospace;
  resize: vertical;
  line-height: 1.5;
}

button.alt {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 13px;
}
button.alt:hover {
  border-color: var(--accent);
  color: var(--white);
  filter: none;
}

/* Post to Discord — dark Discord-blue (same as the comp + log post buttons) */
#postBtn {
  background: #3b4178;
  border: 1px solid #5865f2;
  color: #dfe2ff;
}
#postBtn:hover {
  filter: brightness(1.12);
  color: #fff;
}





/* native file picker styled to match (the "Choose Files" button) */
input[type="file"]::file-selector-button {
  background: var(--accent);
  color: var(--surface-2);
  border: 0;
  border-radius: var(--radius);
  height: 26px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  margin-right: 10px;
  font-family: inherit;
}
input[type="file"]::file-selector-button:hover {
  filter: brightness(1.1);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
@media (max-width: 760px) {
  .grid,
  .two {
    grid-template-columns: 1fr;
  }
}

.preview {
  background: #313338;
  border: 1px solid #2a2c31;
  border-radius: 8px;
  padding: 14px 16px;
  min-height: 240px;
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.5;
  color: #dbdee1;
}
.preview h3 {
  margin: 8px 0 4px;
  color: var(--white);
  font-size: 18px;
}
.preview strong {
  color: var(--white);
}

.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--field);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.thumb button {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 0;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
}
.msg {
  min-height: 18px;
  font-size: 13px;
  margin-top: 10px;
}
.count {
  color: var(--text-dim-2);
  font-size: 12px;
  float: right;
}

/* "Also on the site" box: publish the tale to the public Chronicles page */
.sitepub {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}
.sitepub .sub {
  margin: 0;
}
.sitepub .chk { display: flex; align-items: center; gap: 8px; color: var(--text); cursor: pointer }
.sitepub .chk a { color: var(--accent) }
