:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  background: #f4f7f8;
  color: #162026;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.setup-panel {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: #246b5f;
  font-size: 16px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.03;
  letter-spacing: 0;
}

.summary {
  max-width: 560px;
  margin: 24px 0 0;
  color: #536168;
  font-size: 20px;
  line-height: 1.7;
}

.time-form {
  display: grid;
  gap: 20px;
  padding: 28px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(22, 32, 38, 0.08);
}

fieldset {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  border: 0;
}

legend,
.field span {
  margin-bottom: 10px;
  color: #536168;
  font-size: 15px;
  font-weight: 700;
}

.choice {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  cursor: pointer;
}

.choice:has(input:checked) {
  border-color: #2f8275;
  background: #eef8f5;
}

.field {
  display: grid;
}

.field input {
  width: 100%;
  min-height: 54px;
  padding: 0 14px;
  border: 1px solid #ccd9dc;
  border-radius: 6px;
  background: #ffffff;
  color: #162026;
}

.hidden {
  display: none;
}

.primary-action {
  min-height: 56px;
  border: 0;
  border-radius: 6px;
  background: #1d6f64;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.primary-action:hover {
  background: #16584f;
}

.primary-action:disabled,
.control-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: #a23b2a;
}

.sync-message {
  color: #536168;
}

.admin-entry {
  position: fixed;
  right: 14px;
  bottom: 12px;
  z-index: 10;
  color: #8b989d;
  font-size: 13px;
  text-decoration: none;
}

.subtle-link {
  color: #536168;
  text-align: center;
  text-decoration: none;
}

.admin-shell {
  min-height: 100vh;
  background: #f4f7f8;
  color: #162026;
}

.admin-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.8fr);
  gap: 40px;
  align-items: center;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 32px;
}

.admin-dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 24px 32px;
  border-bottom: 1px solid #d8e2e4;
  background: #ffffff;
}

.admin-topbar h1 {
  font-size: 34px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-actions .control-button {
  display: inline-flex;
  align-items: center;
  color: #162026;
  text-decoration: none;
  background: #f4f7f8;
  border-color: #ccd9dc;
}

.admin-actions .control-button.selected {
  color: #16584f;
  border-color: #2f8275;
  background: #eef8f5;
  font-weight: 800;
}

.admin-placeholder {
  width: min(920px, calc(100% - 40px));
  margin: 28px auto;
  padding: 28px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #ffffff;
}

.admin-placeholder h2 {
  margin: 0 0 12px;
  font-size: 26px;
}

.admin-placeholder p {
  color: #536168;
  font-size: 17px;
  line-height: 1.7;
}

.review-workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
}

.review-sidebar {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border-right: 1px solid #d8e2e4;
  background: #ffffff;
}

.review-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.review-tab,
.review-search,
.review-item {
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  background: #ffffff;
  color: #162026;
}

.review-tab {
  min-height: 42px;
  cursor: pointer;
}

.review-tab.active {
  border-color: #2f8275;
  background: #eef8f5;
  color: #16584f;
  font-weight: 800;
}

.review-search {
  min-height: 44px;
  padding: 0 12px;
}

.review-list {
  min-height: 0;
  overflow: auto;
}

.review-item {
  width: 100%;
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.review-item strong,
.review-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-item span {
  color: #647178;
}

.review-item.active {
  border-color: #2f8275;
  background: #eef8f5;
}

.review-detail {
  min-width: 0;
  overflow: auto;
  padding: 24px;
}

.detail-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.detail-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.detail-link {
  color: #162026;
  background: #ffffff;
  border-color: #ccd9dc;
  text-decoration: none;
}

.admin-preview {
  display: grid;
  place-items: center;
  min-height: 300px;
  margin-bottom: 18px;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #101719;
  overflow: hidden;
}

.admin-preview-video,
.admin-preview-frame,
.admin-preview-image {
  width: 100%;
  max-height: 520px;
  object-fit: contain;
}

.admin-preview-frame {
  height: 520px;
  border: 0;
  background: #000000;
}

.admin-preview-empty {
  color: #d9e2e4;
}

.video-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}

.video-facts div {
  padding: 12px;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  background: #ffffff;
}

.video-facts dt {
  color: #647178;
  font-size: 13px;
  font-weight: 800;
}

.video-facts dd {
  margin: 8px 0 0;
  overflow-wrap: anywhere;
}

.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.primary-action.compact {
  min-height: 42px;
  padding: 0 18px;
}

.control-button.light {
  color: #162026;
  border-color: #ccd9dc;
  background: #ffffff;
}

.control-button.danger {
  color: #9f2f22;
  border-color: #f0b5ab;
  background: #fff4f2;
}

.review-empty {
  padding: 18px;
  color: #647178;
}

.review-empty.big {
  display: grid;
  min-height: 300px;
  place-items: center;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #ffffff;
}

.review-bulk-button {
  width: 100%;
  margin: 10px 0 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(15 23 26 / 0.48);
}

.bulk-dialog {
  width: min(760px, 100%);
  display: grid;
  gap: 14px;
  padding: 22px;
  border: 1px solid #c9d7da;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgb(22 32 38 / 0.22);
}

.bulk-dialog h2 {
  margin: 0;
  font-size: 24px;
}

.bulk-dialog p {
  margin: 0;
  color: #536168;
}

.bulk-dialog textarea {
  width: 100%;
  min-height: 240px;
  resize: vertical;
  padding: 12px;
  border: 1px solid #c9d7da;
  border-radius: 6px;
  color: #162026;
  font: inherit;
  line-height: 1.5;
}

.accounts-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 24px;
  padding: 24px;
}

.account-form-panel,
.account-list-panel {
  min-width: 0;
  border: 1px solid #d8e2e4;
  border-radius: 8px;
  background: #ffffff;
}

.account-form-panel {
  align-self: start;
  padding: 20px;
}

.account-form-panel h2,
.account-list-header h2 {
  margin: 0;
  font-size: 24px;
}

.account-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.choice.inline {
  min-height: 42px;
}

.account-list-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #d8e2e4;
}

.account-list-header span {
  color: #647178;
}

.account-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.account-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  border: 1px solid #d8e2e4;
  border-radius: 6px;
  background: #fbfdfd;
}

.account-row-card.is-syncing {
  border-color: #95c7be;
  background: #f2faf8;
}

.account-main {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.account-main span {
  overflow: hidden;
  color: #647178;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-error {
  color: #9f2f22 !important;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.player-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  background: #101719;
  color: #ffffff;
}

.player-stage {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  background: #000000;
}

.video-player {
  width: 100%;
  height: 100%;
  min-height: 0;
  background: #000000;
}

.player-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding: 18px 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: #162026;
}

.player-bar h2 {
  max-width: 720px;
  margin: 0;
  overflow: hidden;
  font-size: 24px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-bar p {
  margin: 6px 0 0;
  color: #aebbc0;
}

.player-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
}

.player-actions span {
  min-width: 120px;
  color: #d9e2e4;
  font-weight: 700;
  text-align: right;
}

.control-button {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  cursor: pointer;
}

.control-button.primary {
  border-color: #36a190;
  background: #258477;
}

.queue-panel {
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  background: #182326;
}

.queue-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.queue-header span {
  color: #aebbc0;
}

.queue-list {
  overflow: auto;
  padding: 12px;
}

.queue-item {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  text-align: left;
  cursor: pointer;
}

.queue-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-item em {
  color: #aebbc0;
  font-style: normal;
}

.queue-item.playing {
  border-color: #36a190;
  background: rgba(54, 161, 144, 0.2);
}

.queue-item.done {
  opacity: 0.55;
}

@media (max-width: 760px) {
  .shell {
    padding: 20px;
    place-items: start;
  }

  .setup-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  h1 {
    font-size: 44px;
  }

  .summary {
    font-size: 17px;
  }

  .admin-login {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .admin-topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 20px;
  }

  .review-workspace {
    grid-template-columns: 1fr;
  }

  .accounts-workspace {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .account-row-card {
    grid-template-columns: 1fr;
  }

  .review-sidebar {
    border-right: 0;
    border-bottom: 1px solid #d8e2e4;
  }

  .video-facts {
    grid-template-columns: 1fr;
  }

  .player-shell {
    grid-template-columns: 1fr;
  }

  .queue-panel {
    max-height: 42vh;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .player-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .player-actions {
    justify-content: flex-start;
  }
}
