:root {
  color-scheme: light;
  --paper: #f6f3ed;
  --paper-light: #fbf9f5;
  --ink: #2e2b28;
  --muted: #8b837a;
  --line: #ded8cf;
  --accent: #c96b32;
  --accent-soft: #eee0d1;
  --card: #f1ede6;
  --shadow: 0 22px 70px rgba(76, 59, 40, .07);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 78% 23%, rgba(255,255,255,.67), transparent 42%),
    var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .5; }
a { color: inherit; text-decoration: none; }

.page-shell {
  width: min(1320px, calc(100% - 80px));
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 112px;
  gap: 58px;
  border-bottom: 1px solid rgba(121, 107, 92, .16);
}

.brand {
  flex: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 37px;
  letter-spacing: -.085em;
  line-height: 1;
}
.brand span:first-child { font-style: italic; font-weight: 400; }
.brand-dot { color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 34px; }
.nav-link {
  position: relative;
  padding: 10px 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .06em;
  transition: color .2s ease;
}
.nav-link:hover, .nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--accent);
}
.header-note {
  margin-left: auto;
  color: #a69e95;
  font-size: 10px;
  letter-spacing: .19em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.27fr) minmax(310px, .73fr);
  gap: 56px;
  min-height: 610px;
  padding: 80px 0 92px;
  align-items: stretch;
}
.hero-copy { align-self: center; }
.eyebrow, .section-kicker {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 0;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
}
.eyebrow-line { width: 30px; height: 1px; background: var(--accent); }

h1, h2, h3, p { margin-top: 0; }
.hero h1, .movie-hero h1 {
  margin: 34px 0 28px;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-size: clamp(64px, 6.2vw, 105px);
  font-weight: 400;
  letter-spacing: -.07em;
  line-height: 1.15;
}
.hero h1 em {
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -.075em;
}
.hero-description {
  max-width: 550px;
  color: #6f6760;
  font-size: 16px;
  line-height: 1.95;
}

.search-form { max-width: 690px; margin-top: 52px; }
.search-form > label {
  display: block;
  margin-bottom: 13px;
  font-size: 13px;
  font-weight: 700;
}
.search-field {
  display: flex;
  min-height: 68px;
  padding: 6px;
  background: var(--paper-light);
  border: 1px solid #d8d0c7;
  border-radius: 5px;
  box-shadow: var(--shadow);
  transition: border .2s ease;
}
.search-field:focus-within { border-color: var(--accent); }
.search-field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 20px;
  color: var(--ink);
  font-size: 14px;
}
.search-field input::placeholder { color: #a9a096; }
.search-field button, .button-primary {
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  padding: 0 23px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  white-space: nowrap;
  transition: background .2s ease, transform .2s ease;
}
.search-field button:hover:not(:disabled), .button-primary:hover:not(:disabled) {
  background: #a95325;
  transform: translateY(-1px);
}
.search-field button span, .button-primary span { margin-left: 14px; font-size: 17px; font-weight: 400; }
.field-hint { margin: 12px 0 0; color: #978e84; font-size: 12px; }
.form-message { min-height: 18px; margin: 9px 0 0; font-size: 13px; }
.message-success { color: #607e61; }
.message-error { color: #ae4f37; }

.hero-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 438px;
  padding: 24px 28px 28px;
  background: #eae3d8;
  overflow: hidden;
}
.aside-index { color: #877a6b; font-family: Georgia, serif; font-size: 17px; }
.aside-art { position: absolute; inset: 60px 0 85px; display: grid; place-items: center; }
.record-circle {
  position: relative;
  display: grid;
  width: min(310px, 76%);
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid #b9aa98;
  border-radius: 50%;
  background: radial-gradient(circle at center, #f2ece3 0 22%, #e2d6c5 22.4% 23%, #eee7dc 23.4% 48%, #ddd1c1 48.4% 49%, #ebe2d6 49.4%);
  box-shadow: 16px 25px 35px rgba(115, 91, 70, .11);
}
.record-circle::after {
  content: "";
  position: absolute;
  width: 28%;
  aspect-ratio: 1;
  border: 1px solid #b9aa98;
  border-radius: 50%;
}
.record-circle span {
  z-index: 1;
  font-family: Georgia, serif;
  font-style: italic;
  font-size: 31px;
  letter-spacing: -.08em;
}
.art-accent {
  position: absolute;
  width: 58px;
  height: 58px;
  right: 17%;
  top: 11%;
  border: 1px solid #c98960;
  border-radius: 50%;
}
.aside-bottom {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  color: #756a5f;
}
.aside-bottom p { max-width: 190px; margin: 0; font-size: 13px; line-height: 1.55; }
.aside-bottom span { max-width: 82px; text-align: right; font-size: 9px; line-height: 1.7; letter-spacing: .1em; }

.section-block { padding: 24px 0 96px; scroll-margin-top: 30px; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.section-heading h2 {
  margin: 9px 0 0;
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-weight: 400;
  font-size: clamp(31px, 3vw, 43px);
  letter-spacing: -.04em;
}
.light-count {
  margin-left: 7px;
  color: #a7a097;
  font-family: Georgia, serif;
  font-size: .55em;
  vertical-align: top;
}
.section-note { margin: 0 0 3px; color: var(--muted); font-size: 12px; white-space: nowrap; }

.task-list { border-top: 1px solid var(--line); }
.task-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 86px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line);
  transition: background .2s ease;
}
.task-row:hover { background: rgba(255,255,255,.43); }
.task-main { display: flex; align-items: center; gap: 17px; min-width: 0; }
.task-icon {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d6c9bb;
  border-radius: 50%;
  color: var(--accent);
}
.task-label { margin: 0 0 4px; font-size: 14px; font-weight: 700; }
.task-id { margin: 0; color: #9b9187; font-family: Georgia, serif; font-size: 12px; letter-spacing: .04em; }
.task-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 12px; text-align: right; }
.status { display: inline-flex; align-items: center; min-height: 28px; border-radius: 2px; padding: 5px 10px; font-size: 11px; white-space: nowrap; }
.status-queued { background: #eee9df; color: #766a5e; }
.status-running { background: #f4e1ca; color: #a65b29; }
.status-success { background: #e4ebe2; color: #58745a; }
.status-empty { background: #eae8e4; color: #7a736c; }
.status-failed { background: #f4e4df; color: #a74c38; }
.text-link { color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.task-error { width: 100%; color: #aa5644; font-size: 11px; }
.task-progress { width: calc(100% - 59px); margin: -2px 0 4px 59px; }
.progress-caption { display: block; margin-bottom: 8px; color: #9a6b4e; font-size: 11px; }
.progress-track { width: 100%; height: 5px; overflow: hidden; border-radius: 9px; background: #e3d8cb; }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .3s ease; }

.library-section { padding-top: 16px; }
.library-search { max-width: 470px; margin: -7px 0 24px; }
.library-search label { display: block; margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.library-search-field { display: flex; align-items: center; min-height: 48px; border: 1px solid #d8d0c7; background: var(--paper-light); }
.library-search-field:focus-within { border-color: var(--accent); }
.library-search-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 11px 14px; color: var(--ink); font-size: 13px; }
.library-search-field button { border: 0; background: transparent; color: var(--accent); padding: 8px 14px; font-size: 12px; }
.library-search-field button[hidden] { display: none; }
.movie-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.movie-card {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  align-items: center;
  column-gap: 18px;
  min-height: 270px;
  padding: 24px 27px;
  border: 1px solid #e0d8cd;
  background: #f1ede6;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.movie-card:nth-child(3n+2) { background: #f8f6f1; }
.movie-card:nth-child(3n+3) { background: #eae5dd; }
.movie-card:hover { transform: translateY(-4px); border-color: #d0b69f; box-shadow: var(--shadow); }
.movie-card-top, .movie-card-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.movie-card-top, .movie-card-bottom { grid-column: 1 / -1; }
.movie-card-top { color: #94887c; font-size: 10px; letter-spacing: .15em; }
.movie-card-top span:last-child { color: var(--accent); font-size: 18px; letter-spacing: 0; }
.movie-poster, .movie-hero-poster { display: grid; place-items: center; overflow: hidden; background: #e3d9cc; color: #b59377; }
.movie-poster { width: 100px; height: 150px; margin: 15px 0; }
.movie-poster img, .movie-hero-poster img { width: 100%; height: 100%; object-fit: cover; }
.movie-poster-placeholder { font-family: Georgia, serif; font-style: italic; font-size: 24px; }
.movie-card-center { display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.movie-initial {
  font-family: Georgia, "Songti SC", serif;
  color: #d9cabb;
  font-size: 78px;
  line-height: .9;
}
.movie-card-center strong {
  overflow-wrap: anywhere;
  font-family: Georgia, "Songti SC", serif;
  font-size: 23px;
  font-weight: 400;
  line-height: 1.25;
}
.movie-english-title { overflow-wrap: anywhere; color: #8a7c6f; font-size: 12px; line-height: 1.5; }
.movie-card-bottom { padding-top: 15px; border-top: 1px solid #d9d0c5; color: #81776c; font-size: 12px; }
.movie-card-bottom span:last-child { color: var(--accent); }
.empty-state {
  display: flex;
  align-items: center;
  gap: 19px;
  min-height: 126px;
  padding: 26px;
  color: var(--muted);
  background: rgba(255,255,255,.35);
  border-bottom: 1px solid var(--line);
}
.empty-state p { margin: 0; font-size: 13px; line-height: 1.7; }
.empty-mark { color: #d4bca8; font-family: Georgia, serif; font-size: 54px; line-height: 1; }
.movie-empty { grid-column: 1 / -1; border: 1px solid var(--line); }

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 0 46px;
  border-top: 1px solid var(--line);
  color: #a39a91;
  font-size: 11px;
  letter-spacing: .04em;
}
.source-credit { display: flex; align-items: center; gap: 12px; padding: 0 0 30px; color: #968c82; }
.source-credit img { display: block; width: 52px; height: auto; }
.source-credit p { min-width: 0; margin: 0; font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }

.movie-hero { padding: 46px 0 80px; }
.back-link { display: inline-block; margin-bottom: 72px; color: var(--muted); font-size: 12px; }
.back-link:hover { color: var(--accent); }
.movie-title-row { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.movie-title-row > div:first-child { min-width: 0; }
.movie-hero h1 { max-width: 900px; margin: 24px 0 16px; font-size: clamp(56px, 6vw, 90px); overflow-wrap: anywhere; }
.movie-subline { color: #877d73; font-size: 14px; }
.movie-alt-title { margin: -6px 0 16px; color: #8a7c6f; font-family: Georgia, serif; font-size: 23px; }
.movie-subline span { margin: 0 11px; color: #c6b9aa; }
.movie-hero-poster { flex: none; width: 180px; height: 270px; }
.movie-hero-mark {
  display: grid;
  flex: none;
  width: 146px;
  height: 146px;
  place-items: center;
  border: 1px solid #e0d6ca;
  border-radius: 50%;
  color: #d0b8a5;
  font-family: Georgia, "Songti SC", serif;
  font-size: 75px;
}
.subtitle-section { padding-top: 0; }
.subtitle-toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 14px 17px;
  background: #ebe6de;
}
.select-all, .subtitle-select { display: flex; align-items: center; cursor: pointer; }
.select-all { gap: 9px; font-size: 13px; font-weight: 700; }
input[type="checkbox"] { accent-color: var(--accent); width: 17px; height: 17px; cursor: pointer; }
.selection-count { color: var(--muted); font-size: 12px; }
.toolbar-actions { display: flex; gap: 9px; margin-left: auto; }
.button-secondary, .button-primary { min-height: 42px; padding: 0 17px; }
.button-secondary { border: 1px solid #ccbdad; border-radius: 3px; background: transparent; color: #66594d; font-size: 12px; font-weight: 700; }
.button-secondary:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.subtitle-list { margin-top: 8px; border-top: 1px solid var(--line); }
.subtitle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 88px;
  padding: 17px;
  border-bottom: 1px solid var(--line);
}
.subtitle-select { min-width: 0; flex: 1; gap: 18px; }
.file-symbol {
  display: grid;
  flex: none;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #dacbbc;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 11px;
}
.file-info { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.file-info strong { overflow-wrap: anywhere; font-size: 13px; font-weight: 600; }
.file-info small { color: #9a9085; font-size: 11px; }
.file-download { flex: none; border: 0; background: transparent; color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.file-download span { margin-left: 9px; }
.file-download:hover { text-decoration: underline; }

@media (max-width: 970px) {
  .page-shell { width: min(100% - 48px, 1320px); }
  .hero { grid-template-columns: 1fr; gap: 30px; min-height: 0; padding: 65px 0 70px; }
  .hero-aside { min-height: 260px; }
  .aside-art { inset: 15px 20% 20px; }
  .record-circle { width: 200px; }
  .aside-bottom { margin-top: auto; }
  .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 650px) {
  .page-shell { width: min(100% - 30px, 1320px); }
  .site-header { min-height: 77px; gap: 28px; }
  .brand { font-size: 30px; }
  .main-nav { gap: 17px; }
  .nav-link { font-size: 12px; }
  .header-note { display: none; }
  .hero { padding: 50px 0 64px; }
  .hero h1 { font-size: clamp(58px, 13vw, 80px); }
  .hero-description { font-size: 14px; }
  .search-form { margin-top: 38px; }
  .search-field { display: block; padding: 7px; }
  .search-field input { width: 100%; min-height: 50px; padding: 0 10px; font-size: 13px; }
  .search-field button { width: 100%; min-height: 47px; }
  .hero-aside { min-height: 210px; padding: 18px; }
  .aside-art { inset: 0 25% 0; }
  .record-circle { width: 145px; }
  .record-circle span { font-size: 23px; }
  .section-block { padding-bottom: 72px; }
  .section-heading { display: block; }
  .section-note { margin-top: 11px; white-space: normal; line-height: 1.6; }
  .task-row { align-items: flex-start; flex-direction: column; gap: 12px; }
  .task-meta { justify-content: flex-start; text-align: left; padding-left: 59px; }
  .task-progress { width: calc(100% - 59px); }
  .movie-grid { grid-template-columns: 1fr; }
  .movie-card { min-height: 238px; }
  .movie-hero { padding: 25px 0 50px; }
  .back-link { margin-bottom: 55px; }
  .movie-hero-mark { display: none; }
  .movie-title-row { align-items: flex-start; }
  .movie-title-row { flex-direction: column-reverse; gap: 18px; }
  .movie-hero-poster { width: 120px; height: 180px; }
  .movie-hero-poster .movie-poster-placeholder { font-size: 17px; }
  .movie-hero h1 { font-size: clamp(40px, 10vw, 56px); }
  .subtitle-toolbar { align-items: flex-start; flex-wrap: wrap; gap: 12px; }
  .selection-count { margin-left: auto; }
  .toolbar-actions { width: 100%; min-width: 0; margin-left: 0; }
  .toolbar-actions button { flex: 1 1 0; min-width: 0; padding: 0 8px; }
  .button-primary span { margin-left: 5px; }
  .subtitle-select { gap: 10px; }
  .subtitle-row { padding: 15px 3px; }
  .file-symbol { width: 36px; height: 36px; }
  .file-download { padding-right: 5px; }
}
