/* Template page additions on top of editorial.css */
.tpl { padding: 0.5rem 0 3rem; }
.tpl-section { margin-top: 2.25rem; }
.series-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.75rem; max-width: 48rem; margin: 0 auto; }
.field { display: flex; flex-direction: column; gap: 0.25rem; text-align: left; min-width: 0; }
.field > span:first-child { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-width: 0; min-height: 2.5rem; padding: 0.5rem 0.75rem; border-radius: 0.625rem;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: inherit; font-size: 1rem;
}
.field textarea { resize: vertical; min-height: 2.5rem; line-height: 1.45; overflow-y: hidden; }
.field input::placeholder, .field textarea::placeholder { color: var(--faint); opacity: 1; }
.field .hint { font-size: 0.8125rem; color: var(--muted); }
.tpl-grid { margin-top: 0.25rem; }
.tpl-card { display: flex; flex-direction: column; gap: 0.75rem; text-align: left; }
.tpl-card .card-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.screen-name { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.15; margin: 0; overflow-wrap: anywhere; }
.screen-sub { margin: 0; font-size: 0.875rem; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.625rem; }
.refs { border: 1px solid var(--line); border-radius: 0.75rem; padding: 0.5rem 0.75rem 0.625rem; margin: 0; min-width: 0; }
.refs legend { padding: 0 0.25rem; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.ref-opts { display: flex; flex-wrap: wrap; gap: 0.375rem 0.875rem; }
.ref-opts label { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.9375rem; min-height: 2rem; }
.ref-opts input { width: 1.125rem; height: 1.125rem; accent-color: #0b5f8a; }
.ref-opts label.off { color: var(--faint); }
.censor-preview { margin: 0; padding: 0.5rem 0.75rem; border-radius: 0.625rem; background: var(--surface-2); font-family: var(--font-body); font-weight: 700; overflow-wrap: anywhere; }
.clips { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; max-height: 22rem; overflow-y: auto; scrollbar-width: thin; padding-right: 0.25rem; }
.clips li { flex: none; padding: 0.5rem 0.625rem; border-radius: 0.625rem; background: var(--surface-2); font-size: 0.875rem; }
.clips .when { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.04em; color: var(--muted); text-transform: uppercase; }
.out-label { font-size: 0.75rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); margin: 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.add-row { margin-top: 1rem; display: flex; justify-content: center; }
.export-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.file-btn:focus-within { outline: 0.1875rem solid var(--aqua); outline-offset: 0.125rem; }
.status { min-height: 1.5rem; margin: 0.75rem 0 0; font-size: 0.9375rem; color: var(--muted); }
.status.bad { color: var(--coral); }
.stat-line { margin: 0.25rem 0 0; font-size: 0.875rem; color: var(--muted); }
@media (min-width: 700px) {
  .series-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .series-grid { margin-left: 0; }
  .add-row, .export-row { justify-content: flex-start; }
  .scenes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1700px) {
  .scenes-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
