:root {
  color-scheme: light;
  font-family: system-ui, "Microsoft YaHei", "PingFang SC", sans-serif;
  color: #172637;
  background: #eef3f8;
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.topbar { background: #14283d; color: #fff; }
.topbar-inner {
  max-width: 1120px;
  margin: auto;
  min-height: 64px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand strong { font-size: 1.35rem; letter-spacing: .02em; }
.brand span { color: #bdcddd; font-size: .9rem; }
.quiet {
  border: 1px solid #698197;
  color: #fff;
  background: transparent;
  border-radius: 8px;
  padding: 6px 12px;
}
.layout { max-width: 1120px; margin: auto; padding: 36px 24px 56px; }
.page-title { margin-bottom: 24px; }
h1, h2 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.15rem; }
.page-title p { color: #475a70; margin: 8px 0 0; }
.columns { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr); gap: 22px; align-items: start; }
.card {
  background: #fff;
  border: 1px solid #d7e2ed;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
}
label { display: block; font-weight: 650; margin: 15px 0 5px; }
.help { color: #516378; font-size: .9rem; margin: 4px 0 10px; }
input:not([type="hidden"]), textarea {
  border: 1px solid #aebfd0;
  border-radius: 8px;
  padding: 9px 11px;
  color: inherit;
  background: #fbfdff;
  width: 100%;
}
textarea { display: block; resize: vertical; }
:focus-visible { outline: 3px solid #00779f; outline-offset: 2px; }
fieldset { min-width: 0; border: 1px solid #d7e2ed; border-radius: 9px; margin: 14px 0 0; padding: 6px 13px 13px; }
legend { font-size: .9rem; color: #355672; padding: 0 6px; font-weight: 650; }
fieldset label { margin-top: 8px; }
.primary { background: #075e85; color: #fff; border: 0; border-radius: 8px; padding: 10px 19px; font-weight: 700; }
.primary:hover { background: #084962; }
.actions { display: flex; justify-content: flex-end; }
.preview { position: sticky; top: 20px; }
.preview-chat { margin-top: 14px; background: #dae8f3; border-radius: 10px; padding: 13px; }
.preview-message, .preview-button { overflow-wrap: anywhere; white-space: pre-wrap; }
.preview-message { margin: 0; padding: 10px 12px; background: #fff; border-radius: 9px 9px 9px 2px; }
.preview-button { text-align: center; margin-top: 6px; background: #f0f8ff; color: #095978; padding: 6px 9px; border-radius: 7px; }
.message { border-radius: 8px; margin: 0 0 14px; padding: 11px 14px; }
ul.message { padding-left: 32px; }
.success { background: #e5f6eb; color: #185731; }
.error { background: #fceceb; color: #8b251f; }
.login-shell { max-width: 440px; margin: 64px auto; padding: 0 20px; }
.login-card .primary { margin-top: 18px; width: 100%; }
.login-card .message { margin-top: 14px; }
@media (max-width: 720px) {
  .layout { padding: 24px 14px 40px; }
  .topbar-inner { padding: 0 14px; }
  .columns { grid-template-columns: 1fr; }
  .preview { position: static; grid-row: 1; margin-bottom: 0; }
  .card { padding: 16px; }
}
.topnav { display: flex; gap: 16px; }
.topnav a { color: #edf6ff; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; }
a.primary { display: inline-block; text-decoration: none; }
.movie-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.movie-card { margin: 0; display: flex; align-items: flex-start; gap: 14px; }
.movie-card > div { min-width: 0; }
.movie-cover { width: 80px; height: 112px; object-fit: cover; border-radius: 6px; flex: none; }
.editor-cover { width: 110px; height: auto; }
.editor { max-width: 780px; }
.editor .actions { margin-top: 18px; }
.editor .check { display: flex; align-items: center; gap: 7px; margin: 6px 0 12px; }
.editor input[type="checkbox"] { width: auto; }
.source { overflow-wrap: anywhere; color: #475a70; font-size: .9rem; }
.pagination { display: flex; gap: 14px; margin-top: 16px; }
.danger { color: #8b251f; background: #fceceb; border: 1px solid #e6a79f; border-radius: 7px; padding: 7px 12px; }
@media (max-width: 520px) {
  .topbar-inner { flex-wrap: wrap; gap: 8px 15px; padding-block: 10px; }
  .topnav { order: 3; width: 100%; }
}
.source-row { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-bottom: 8px; }
.episode-label { color: #355672; font-weight: 650; }
.secondary { color: #184b66; background: #f0f6fb; border: 1px solid #aebfd0; border-radius: 7px; padding: 7px 10px; }
.secondary:hover { background: #e2edf7; }
