:root {
  --bg: #f5f7f8;
  --panel: #ffffff;
  --ink: #171a1f;
  --muted: #667085;
  --line: #d9e0e6;
  --accent: #08756f;
  --accent-soft: #ddf4ef;
  --success: #19784a;
  --error: #b13b2e;
  --warning: #98711b;
  --surface: #eef3f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Hiragino Sans GB", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f9fafb 0, var(--bg) 100%);
}

.shell {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.site-nav a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}

.site-nav a:hover {
  background: var(--accent-soft);
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tagline {
  margin: 8px 0 0;
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

h1,
h2 {
  margin-top: 0;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2,
.section-head p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.summary-pill {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
}

.summary-pill-accent {
  background: linear-gradient(180deg, rgba(217, 236, 238, 0.86) 0, rgba(255, 255, 255, 0.94) 100%);
  border-color: #bfd8db;
}

.summary-link {
  color: var(--ink);
  text-decoration: none;
}

.summary-link:hover {
  border-color: #9fc9cc;
}

.summary-label {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quick-console {
  display: grid;
  gap: 18px;
}

.quick-console-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.quick-console-main h2 {
  margin-bottom: 6px;
}

.quick-actions,
.player-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.quick-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.quick-actions a:last-child {
  color: var(--accent);
  background: var(--accent-soft);
}

.quick-summary {
  margin-bottom: 0;
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
  padding: 26px 0 10px;
}

.workspace-hero h1 {
  margin-bottom: 10px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
}

.workspace-health {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
}

.workspace-health > div {
  min-width: 0;
}

.workspace-health strong {
  display: block;
  margin-top: 6px;
  font-size: 24px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.action-card {
  display: grid;
  gap: 10px;
  min-height: 150px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  text-decoration: none;
  box-shadow: 0 10px 26px rgba(16, 24, 40, 0.05);
}

.action-card:hover {
  border-color: #9fc9cc;
  transform: translateY(-1px);
}

.action-card strong {
  font-size: 22px;
}

.action-card span:last-child {
  color: var(--muted);
  line-height: 1.55;
}

.action-card-primary {
  border-color: #9fc9cc;
  background: linear-gradient(180deg, rgba(221, 244, 239, 0.7) 0, #ffffff 100%);
}

.action-kicker {
  width: fit-content;
  padding: 4px 9px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.compact-list {
  display: grid;
  gap: 10px;
}

.compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.82);
}

.compact-row > span:first-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.compact-row:hover {
  border-color: #9fc9cc;
}

.page-intro .section-head {
  margin-bottom: 0;
}

.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}

.artifact-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.artifact-card strong {
  overflow-wrap: anywhere;
}

.artifact-filter-form {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.table-wrap {
  overflow-x: auto;
}

.artifact-table th:first-child,
.artifact-table td:first-child {
  width: 42px;
}

.artifact-name {
  overflow-wrap: anywhere;
}

.artifact-row-actions {
  justify-content: flex-end;
  min-width: 280px;
}

.artifact-select-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
}

.artifact-library-list,
.batch-list {
  display: grid;
  gap: 10px;
}

.artifact-library-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(170px, 0.45fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.artifact-library-main,
.artifact-library-meta {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.artifact-library-meta {
  justify-items: start;
}

.artifact-select-cell input {
  width: 18px;
  height: 18px;
}

.batch-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 220px) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  text-decoration: none;
}

.batch-list-row > span:first-child {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.batch-list-row .summary-pill {
  margin: 0;
  box-shadow: none;
}

.hidden-form {
  display: none;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.pagination-row a,
.recovery-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 12px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.failure-group-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.failure-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #f0c9c4;
  background: #fff5f3;
  color: var(--error);
}

.recovery-list {
  display: grid;
  gap: 12px;
}

.recovery-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.recovery-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.recovery-actions {
  display: flex;
  justify-content: flex-end;
}

.recovery-actions form {
  margin: 0;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
}

.filter-tabs a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}

.filter-tabs a strong {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(31, 111, 120, 0.12);
  color: var(--accent);
  text-align: center;
  font-size: 13px;
}

.filter-tabs a.is-active {
  border-color: #bfd8db;
  background: var(--accent-soft);
  color: var(--accent);
}

.guide-card {
  margin: 18px 0 20px;
  padding: 18px;
  border: 1px solid #bfd8db;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(217, 236, 238, 0.8) 0, rgba(255, 253, 248, 0.92) 100%);
}

.guide-card-compact {
  margin: 0;
  padding: 14px;
}

.guide-card h2 {
  margin-bottom: 12px;
  font-size: 20px;
}

.guide-steps {
  margin: 0 0 14px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.guide-steps li {
  line-height: 1.6;
}

.guide-note {
  margin-bottom: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px dashed var(--line);
}

.guide-note code {
  display: inline-block;
  margin-top: 8px;
}

.tiny {
  font-size: 13px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.details-body {
  margin-top: 14px;
}

.compact-details {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  padding: 12px 14px;
}

.compact-details summary,
.panel-details > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.compact-details summary {
  list-style-position: outside;
}

.panel-details > summary {
  font-size: 20px;
}

.panel-details[open] > summary {
  margin-bottom: 4px;
}

.job-meta-details {
  margin-top: 16px;
}

label {
  display: grid;
  gap: 8px;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

input,
textarea,
select,
button {
  font: inherit;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: white;
}

button {
  width: fit-content;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

button:hover {
  filter: brightness(1.05);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

.button-secondary {
  background: #59616f;
}

.artifact-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
}

.artifact-actions a,
.artifact-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: var(--accent);
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.artifact-actions a:last-child {
  background: #59616f;
}

.artifact-actions a:nth-child(3) {
  color: var(--accent);
  background: var(--accent-soft);
}

.player-panel {
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid #1f2933;
  border-radius: 8px;
  background: #111820;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.player-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 360px;
  background: #05080c;
}

.video-player {
  display: block;
  width: 100%;
  max-height: min(72vh, 720px);
  aspect-ratio: 16 / 9;
  background: #000000;
}

.player-stage .plyr {
  width: 100%;
  max-height: min(72vh, 720px);
  --plyr-color-main: #d7263d;
  --plyr-control-radius: 4px;
  --plyr-menu-radius: 4px;
}

.player-stage .plyr__video-wrapper {
  max-height: min(72vh, 720px);
}

.player-stage .plyr:fullscreen .plyr__video-wrapper,
.player-stage .plyr:-webkit-full-screen .plyr__video-wrapper,
.player-stage .plyr.plyr--fullscreen-fallback .plyr__video-wrapper {
  width: 100%;
  height: 100%;
  max-height: none;
}

.player-stage .plyr:fullscreen .video-player,
.player-stage .plyr:-webkit-full-screen .video-player,
.player-stage .plyr.plyr--fullscreen-fallback .video-player {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
}

.player-status {
  position: absolute;
  left: 16px;
  bottom: 16px;
  max-width: min(420px, calc(100% - 32px));
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.82);
  color: #f8fafc;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 4;
}

.player-status.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.player-control-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-height: 56px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #0c1219;
}

.player-icon-button,
.player-rate {
  min-width: 48px;
  height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid rgba(226, 232, 240, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-size: 13px;
  font-weight: 700;
}

.player-icon-button:hover,
.player-rate:hover,
.player-rate.is-active {
  background: #f8fafc;
  color: #111820;
  filter: none;
}

.player-time {
  min-width: 128px;
  color: #cbd5e1;
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 700;
}

.player-rate-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.player-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px 20px;
  color: #f8fafc;
}

.player-meta h1 {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.player-meta .muted {
  color: #b9c4d0;
}

.player-source {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-all;
}

.player-hint {
  margin: 10px 0 0;
  color: #d6dee8;
  font-size: 13px;
  line-height: 1.55;
}

.player-actions a {
  white-space: nowrap;
}

.button-danger {
  background: var(--error);
}

.confirm-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 22px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.34);
}

.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.58);
}

.confirm-dialog h2 {
  margin-bottom: 8px;
}

.confirm-dialog p {
  color: var(--muted);
  line-height: 1.6;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.logout-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-panel {
  max-width: 460px;
  margin: 48px auto 0;
}

.auth-form {
  margin-top: 18px;
}

.stop-form {
  margin-top: 14px;
}

.retry-form {
  margin-top: 12px;
}

.child-job-retry-form {
  margin-top: 10px;
}

.primary-choice-grid {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.primary-choice-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.primary-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.primary-choice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  align-items: center;
}

.primary-choice-feedback {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #bfd8db;
  background: var(--accent-soft);
  color: var(--ink);
}

button:disabled,
button.is-busy {
  opacity: 0.65;
  cursor: wait;
}

.child-job-list {
  display: grid;
  gap: 14px;
}

.child-job-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
}

.child-job-meta {
  margin-bottom: 12px;
}

.child-job-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.child-progress-card {
  margin: 0;
  padding: 14px 16px;
  background: #fff;
  box-shadow: none;
}

.child-job-notice {
  margin-top: 12px;
}

.batch-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.batch-download-form {
  display: grid;
  gap: 16px;
}

.batch-result-list,
.batch-item-list {
  display: grid;
  gap: 12px;
}

.batch-result-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.batch-result-row input {
  width: 18px;
  height: 18px;
}

.batch-result-row > span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.batch-item-row {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.batch-item-head,
.batch-child-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.batch-item-head {
  margin-bottom: 10px;
}

.batch-child-details {
  margin-top: 12px;
}

.batch-child-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 240px) auto;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.batch-child-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.batch-child-progress {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.batch-progress-card {
  margin-top: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-top: 1px solid var(--line);
  padding: 12px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-weight: 600;
}

.truncate {
  max-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-line,
.resource-inline {
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  word-break: break-all;
}

.resource-line {
  line-clamp: 2;
  -webkit-line-clamp: 2;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid rgba(217, 224, 230, 0.9);
}

.resource-line-compact {
  padding: 0;
  border: 0;
  background: transparent;
  line-clamp: 1;
  -webkit-line-clamp: 1;
}

.resource-inline {
  line-clamp: 1;
  -webkit-line-clamp: 1;
}

.status {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

a.status {
  text-decoration: none;
}

.status-pending,
.status-running,
.status-analyzing,
.status-downloading,
.status-transcoding,
.status-stopping {
  color: var(--warning);
  background: #f7edd2;
}

.status-success {
  color: var(--success);
  background: #dff2e6;
}

.status-failed {
  color: var(--error);
  background: #f7ddd9;
}

.status-candidate {
  color: var(--accent);
  background: var(--accent-soft);
}

.status-selected {
  color: var(--success);
  background: #dff2e6;
}

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

.meta-grid .wide {
  grid-column: 1 / -1;
}

dt {
  color: var(--muted);
  margin-bottom: 6px;
}

dd {
  margin: 0;
}

.break-all {
  word-break: break-all;
}

.notice {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 8px;
}

.notice.success {
  background: #dff2e6;
  color: var(--success);
}

.notice.error {
  background: #f7ddd9;
  color: var(--error);
}

.notice.warning {
  background: #fcf3dd;
  color: var(--warning);
}

.maintenance-form {
  margin-top: 18px;
}

.maintenance-confirm {
  margin-top: 18px;
}

.maintenance-details {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.maintenance-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.progress-card {
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(221, 244, 239, 0.62) 0, rgba(255, 255, 255, 0.96) 100%);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: #e4eaee;
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1f6f78 0, #3ca18b 100%);
  transition: width 0.8s ease;
}

.progress-detail {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

.notice.info {
  background: var(--accent-soft);
  color: var(--accent);
}

.candidate-card-list {
  display: grid;
  gap: 12px;
}

.candidate-card {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
}

.candidate-card-head,
.candidate-source,
.candidate-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.candidate-card-head {
  margin-bottom: 12px;
}

.candidate-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.candidate-score {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.candidate-source {
  margin-bottom: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.candidate-note {
  margin-top: 10px;
  line-height: 1.6;
}

.candidate-actions {
  margin-top: 12px;
  justify-content: flex-start;
}

.candidate-more {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.candidate-more summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
}

.candidate-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
}

.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.event {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.event-time,
.event-stage {
  color: var(--muted);
  font-size: 13px;
}

.event-info {
  background: #faf7f0;
}

.event-warning {
  background: #fcf3dd;
}

.event-error {
  background: #fce5e2;
}

code {
  font-family: "SFMono-Regular", Consolas, monospace;
}

@media (max-width: 720px) {
  .shell {
    width: min(100vw - 20px, 1080px);
    padding-top: 20px;
  }

  .site-header {
    align-items: stretch;
  }

  .site-nav {
    width: 100%;
    margin-left: 0;
    padding-bottom: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .workspace-hero,
  .action-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .workspace-hero {
    gap: 14px;
    padding-top: 8px;
  }

  .workspace-hero h1 {
    font-size: 36px;
  }

  .workspace-health {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .workspace-health strong {
    font-size: 20px;
  }

  .action-card {
    min-height: 0;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .section-head,
  .site-header,
  .candidate-card-head,
  .candidate-source,
  .batch-result-row,
  .batch-item-head,
  .batch-child-row,
  .quick-console-main,
  .player-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  .compact-row,
  .artifact-library-row,
  .batch-list-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .compact-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .player-stage {
    min-height: 220px;
  }

  .video-player {
    max-height: 58vh;
  }

  .player-control-bar {
    align-items: stretch;
  }

  .player-time {
    width: 100%;
    min-width: 0;
  }

  .player-actions,
  .artifact-actions {
    width: 100%;
  }

  .player-actions a,
  .player-actions button {
    flex: 1 1 auto;
  }

  .artifact-filter-form,
  .recovery-row {
    grid-template-columns: 1fr;
  }

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

  .artifact-row-actions {
    min-width: 0;
    justify-content: flex-start;
  }

  table {
    display: block;
    overflow-x: auto;
    max-width: 100%;
  }

  .batch-result-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .batch-child-row,
  .batch-child-progress {
    grid-template-columns: 1fr;
  }
}
