:root {
  color-scheme: dark;
  --bg: #10161c;
  --bg-deep: #0b1116;
  --panel: #192129;
  --panel-raised: #1d2933;
  --panel-soft: #162027;
  --border: #303d4a;
  --border-soft: #273541;
  --text: #eef3f8;
  --text-soft: #b4c0cc;
  --text-muted: #84919e;
  --red: #df4236;
  --red-soft: #ff7466;
  --green: #42d978;
  --green-deep: #1eaa59;
  --blue: #4e91ff;
  --blue-soft: #8bb9ff;
  --yellow: #e4b353;
  --shadow: 0 18px 44px rgba(0, 0, 0, .24);
  --radius: 8px;
  --radius-large: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -12%, rgba(78, 145, 255, .08), transparent 36rem),
    linear-gradient(180deg, #111920 0%, var(--bg) 58%, #0d1318 100%);
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
dialog:focus-visible {
  outline: 2px solid var(--blue-soft);
  outline-offset: 2px;
}

a {
  color: var(--blue-soft);
}

.app-root {
  min-height: 100vh;
  padding: 20px 24px 32px;
}

.app-shell,
.public-main {
  width: min(100%, 1880px);
  margin: 0 auto;
}

.startup-state,
.noscript-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 220px;
  color: var(--text-soft);
}

.noscript-state {
  min-height: 100vh;
  padding: 20px;
  text-align: center;
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(180, 192, 204, .28);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 0 2px 16px;
  border-bottom: 1px solid var(--border);
}

.brand,
.topbar-meta,
.brand-line,
.page-actions,
.panel-actions,
.button-with-icon,
.status-pill,
.mode-pill,
.status-chip,
.activity-meta,
.history-meta,
.modal-footer,
.version-card-head {
  display: flex;
  align-items: center;
}

.brand {
  min-width: 0;
  gap: 10px;
}

.brand-line {
  gap: 7px;
  min-width: 0;
}

.brand-mark {
  color: var(--text);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
}

.brand-version {
  color: var(--red-soft);
  font-size: 17px;
  font-weight: 700;
}

.brand-divider {
  width: 1px;
  height: 22px;
  margin: 0 3px 0 2px;
  background: var(--border);
}

.brand-title {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 15px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-meta {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.topbar-link,
.mode-pill,
.status-pill {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(29, 41, 51, .75);
  color: var(--text-soft);
  font-size: 12px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-link:hover,
.topbar-link:focus-visible {
  border-color: var(--blue);
  color: var(--text);
}

.status-pill {
  gap: 7px;
}

.status-dot,
.activity-dot,
.version-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(132, 145, 158, .1);
}

.status-dot.success,
.activity-dot.success,
.version-dot.success {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(66, 217, 120, .12), 0 0 12px rgba(66, 217, 120, .35);
}

.status-dot.info,
.activity-dot.info,
.version-dot.info {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(78, 145, 255, .12), 0 0 12px rgba(78, 145, 255, .35);
}

.status-dot.warning,
.activity-dot.warning {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(228, 179, 83, .12);
}

.status-dot.error,
.activity-dot.error {
  background: var(--red-soft);
  box-shadow: 0 0 0 3px rgba(223, 66, 54, .12);
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 26px 2px 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--blue-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-title {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 2vw, 32px);
  font-weight: 750;
  letter-spacing: .02em;
}

.page-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.page-actions,
.panel-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.button,
.button-with-icon {
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  font-weight: 650;
  line-height: 1.2;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled),
.button-with-icon:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled,
.button-with-icon:disabled {
  cursor: not-allowed;
  opacity: .46;
  transform: none;
}

.button-primary {
  background: var(--red);
  box-shadow: 0 6px 18px rgba(223, 66, 54, .17);
}

.button-primary:hover:not(:disabled),
.button-primary:focus-visible {
  background: #ec5144;
}

.button-secondary,
.button-with-icon {
  border-color: var(--border);
  background: var(--panel-raised);
  color: var(--text-soft);
}

.button-secondary:hover:not(:disabled),
.button-secondary:focus-visible,
.button-with-icon:hover:not(:disabled),
.button-with-icon:focus-visible {
  border-color: var(--blue);
  color: var(--text);
}

.button-ghost {
  min-height: 30px;
  padding: 5px 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
}

.button-ghost:hover:not(:disabled),
.button-ghost:focus-visible {
  color: var(--blue-soft);
}

.button-with-icon {
  gap: 8px;
}

.button-with-icon.button-primary {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.icon {
  display: inline-flex;
  width: 16px;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-size: 15px;
  line-height: 1;
}

.feedback-banner,
.freshness-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(29, 41, 51, .74);
  color: var(--text-soft);
}

.feedback-banner.success,
.freshness-banner.fresh {
  border-color: rgba(66, 217, 120, .42);
  background: rgba(28, 84, 53, .22);
}

.feedback-banner.error,
.freshness-banner.stale {
  border-color: rgba(223, 66, 54, .52);
  background: rgba(98, 38, 34, .24);
}

.feedback-banner.info,
.freshness-banner.pending {
  border-color: rgba(78, 145, 255, .42);
  background: rgba(35, 66, 118, .2);
}

.feedback-copy,
.freshness-copy {
  min-width: 0;
}

.feedback-title,
.freshness-title {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

.feedback-detail,
.freshness-detail {
  margin: 2px 0 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.admin-current-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.admin-current-strip .version-card {
  min-height: 136px;
}

.current-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 76px;
  padding: 16px;
  border: 1px solid rgba(78, 145, 255, .4);
  border-radius: var(--radius-large);
  background: rgba(35, 66, 118, .2);
  color: var(--text-soft);
  box-shadow: var(--shadow);
}

.current-message.stale {
  border-color: rgba(228, 179, 83, .55);
  background: rgba(103, 77, 30, .2);
}

.current-message-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.admin-columns {
  display: grid;
  grid-template-columns: minmax(220px, .86fr) minmax(370px, 1.42fr) minmax(300px, 1.12fr);
  align-items: start;
  gap: 12px;
}

.panel,
.version-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: linear-gradient(150deg, rgba(29, 41, 51, .97), rgba(22, 32, 39, .97));
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  margin-bottom: 13px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--border-soft);
}

.panel-title {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 750;
}

.panel-subtitle {
  margin: 3px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.panel-header .status-chip {
  flex: 0 0 auto;
}

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

.job-item {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(21, 31, 39, .72);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.job-item:hover,
.job-item:focus-visible {
  border-color: var(--blue);
  background: rgba(31, 49, 72, .7);
}

.job-item.selected {
  border-color: var(--blue);
  background: linear-gradient(135deg, rgba(39, 73, 126, .56), rgba(25, 43, 60, .86));
  box-shadow: inset 3px 0 0 var(--blue), 0 0 0 1px rgba(78, 145, 255, .16);
}

.job-item-top,
.job-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.job-item-top {
  margin-bottom: 7px;
}

.job-item-name {
  min-width: 0;
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-item-product,
.job-item-meta {
  color: var(--text-muted);
  font-size: 12px;
}

.job-item-meta span:last-child {
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-chip {
  gap: 6px;
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(132, 145, 158, .08);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.status-chip.complete,
.status-chip.verified,
.status-chip.passed {
  border-color: rgba(66, 217, 120, .58);
  background: rgba(30, 170, 89, .14);
  color: var(--green);
}

.status-chip.active,
.status-chip.running,
.status-chip.info {
  border-color: rgba(78, 145, 255, .65);
  background: rgba(78, 145, 255, .14);
  color: var(--blue-soft);
}

.status-chip.failed,
.status-chip.error {
  border-color: rgba(223, 66, 54, .62);
  background: rgba(223, 66, 54, .14);
  color: var(--red-soft);
}

.status-chip.warning,
.status-chip.needs-attention {
  border-color: rgba(228, 179, 83, .62);
  background: rgba(228, 179, 83, .14);
  color: #f2c76a;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 7px;
  min-height: 142px;
  padding: 20px 10px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state.compact {
  min-height: 90px;
  padding: 15px 8px;
}

.empty-icon {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--blue-soft);
  font-size: 15px;
}

.empty-title {
  color: var(--text-soft);
  font-weight: 700;
}

.empty-copy {
  max-width: 34rem;
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.stepper {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  min-height: 57px;
  padding: 4px 2px 10px;
}

.step-item::before {
  position: absolute;
  top: 34px;
  bottom: -1px;
  left: 17px;
  width: 1px;
  background: var(--border);
  content: "";
}

.step-item:last-child::before {
  display: none;
}

.step-marker {
  position: relative;
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
}

.step-body {
  min-width: 0;
  padding: 2px 9px 6px;
  border: 1px solid transparent;
  border-radius: 7px;
}

.step-label {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text-soft);
  font-weight: 650;
}

.step-state {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
}

.step-item.complete .step-marker {
  border-color: var(--green);
  background: var(--green);
  color: #08130c;
}

.step-item.complete .step-label {
  color: var(--text);
}

.step-item.complete::before {
  background: var(--green-deep);
}

.step-item.active .step-marker {
  border-color: var(--blue-soft);
  background: rgba(78, 145, 255, .2);
  box-shadow: 0 0 0 3px rgba(78, 145, 255, .12), 0 0 14px rgba(78, 145, 255, .25);
  color: var(--blue-soft);
}

.step-item.active .step-body {
  border-color: rgba(78, 145, 255, .62);
  background: rgba(39, 73, 126, .34);
}

.step-item.active .step-label,
.step-item.active .step-state {
  color: var(--blue-soft);
}

.step-item.failed .step-marker {
  border-color: var(--red-soft);
  background: rgba(223, 66, 54, .2);
  color: var(--red-soft);
}

.step-item.failed .step-label,
.step-item.failed .step-state {
  color: var(--red-soft);
}

.flow-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-muted);
  font-size: 12px;
}

.detail-grid {
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  border-top: 1px solid var(--border-soft);
}

.detail-row,
.preview-row,
.result-row {
  display: grid;
  grid-template-columns: minmax(80px, .48fr) minmax(0, 1fr);
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(48, 61, 74, .58);
}

.detail-label,
.preview-label {
  color: var(--text-muted);
  font-size: 12px;
}

.detail-value,
.preview-value {
  min-width: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
  text-align: right;
}

.notes-block,
.local-box,
.result-box,
.checks-block,
.error-box {
  margin-top: 13px;
  padding: 11px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: rgba(16, 24, 30, .46);
}

.notes-title,
.checks-title,
.result-title,
.local-title {
  margin: 0 0 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.notes-copy,
.local-box p,
.error-box p {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

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

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  color: var(--text-soft);
}

.check-marker {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--panel-soft);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 800;
}

.check-item.passed .check-marker {
  border-color: var(--green);
  background: rgba(66, 217, 120, .16);
  color: var(--green);
}

.check-item.running .check-marker {
  border-color: var(--blue);
  background: rgba(78, 145, 255, .16);
  color: var(--blue-soft);
}

.check-item.failed .check-marker {
  border-color: var(--red-soft);
  background: rgba(223, 66, 54, .16);
  color: var(--red-soft);
}

.check-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.check-status {
  display: block;
  color: var(--text-muted);
  font-size: 11px;
}

.result-row {
  border-bottom: 0;
}

.result-row + .result-row {
  padding-top: 0;
}

.result-row .detail-value {
  font-weight: 700;
}

.result-positive {
  color: var(--green) !important;
}

.result-negative,
.error-box {
  color: var(--red-soft);
}

.error-box {
  border-color: rgba(223, 66, 54, .46);
  background: rgba(98, 38, 34, .18);
}

.local-box {
  border-color: rgba(228, 179, 83, .34);
}

.local-box p + p {
  margin-top: 5px;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.activity-panel {
  margin-top: 12px;
}

.activity-list,
.action-feed,
.history-list,
.command-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-item,
.action-item,
.history-item {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 9px 0;
  border-bottom: 1px solid rgba(48, 61, 74, .58);
}

.activity-item:last-child,
.action-item:last-child,
.history-item:last-child {
  border-bottom: 0;
}

.activity-content,
.activity-text {
  min-width: 0;
}

.activity-text {
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.activity-job {
  margin-left: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.activity-meta,
.history-date {
  justify-content: flex-end;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.action-feed {
  margin-bottom: 12px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--border-soft);
}

.action-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.action-status {
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(132, 145, 158, .1);
  color: var(--text-muted);
  font-size: 11px;
}

.action-status.done,
.action-status.complete {
  background: rgba(66, 217, 120, .12);
  color: var(--green);
}

.action-status.running,
.action-status.active {
  background: rgba(78, 145, 255, .12);
  color: var(--blue-soft);
}

.action-status.failed {
  background: rgba(223, 66, 54, .12);
  color: var(--red-soft);
}

.public-heading {
  padding: 30px 2px 20px;
}

.public-heading .page-title {
  font-size: clamp(28px, 3vw, 42px);
}

.public-heading .page-subtitle {
  font-size: 15px;
}

.public-grid,
.version-grid,
.public-lower-grid {
  display: grid;
  gap: 12px;
}

.version-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
}

.version-card {
  position: relative;
  min-height: 156px;
  padding: 18px;
  overflow: hidden;
}

.version-card::after {
  position: absolute;
  right: -36px;
  bottom: -60px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(78, 145, 255, .12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.version-card.current::after {
  border-color: rgba(66, 217, 120, .12);
}

.version-card-head {
  gap: 9px;
  margin-bottom: 14px;
}

.version-card-title {
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 700;
}

.version-value {
  position: relative;
  z-index: 1;
  min-height: 42px;
  color: var(--text);
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: .02em;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.version-value.empty {
  color: var(--text-muted);
  font-size: 18px;
  font-weight: 650;
}

.version-meta,
.version-caption {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.version-caption {
  margin-top: 4px;
}

.admin-current-strip .version-card {
  display: grid;
  grid-template-columns: minmax(130px, auto) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;
  row-gap: 3px;
  min-height: 0;
  padding: 12px 16px;
}

.admin-current-strip .version-card::after {
  display: none;
}

.admin-current-strip .version-card-head {
  margin: 0;
}

.admin-current-strip .version-value {
  min-height: 0;
  font-size: 25px;
}

.admin-current-strip .version-meta,
.admin-current-strip .version-caption {
  grid-column: 3;
  margin: 0;
}

.public-progress {
  margin-bottom: 12px;
}

.public-progress .stepper {
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 8px 2px 2px;
}

.public-progress .step-item {
  display: block;
  min-height: 120px;
  padding: 0 4px;
  text-align: center;
}

.public-progress .step-item::before {
  top: 15px;
  right: calc(50% + 15px);
  bottom: auto;
  left: auto;
  width: calc(100% - 30px);
  height: 1px;
}

.public-progress .step-item:first-child::before {
  display: none;
}

.public-progress .step-marker {
  margin: 0 auto 11px;
}

.public-progress .step-body {
  padding: 0 2px;
}

.public-progress .step-label {
  font-size: 12px;
  line-height: 1.35;
}

.public-progress .step-state {
  font-size: 11px;
}

.public-lower-grid {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.notice-card,
.history-card {
  min-width: 0;
}

.notice-title {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 17px;
}

.notice-body {
  margin: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.history-item {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.history-version {
  min-width: 0;
  color: var(--text-soft);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.history-version small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 400;
}

.public-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding: 13px 2px 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.readonly-note {
  color: var(--text-muted);
}

.published-updates {
  min-width: 0;
}

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

.release-item {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.release-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.release-title {
  min-width: 0;
  margin: 0;
  font-size: 18px;
  overflow-wrap: anywhere;
}

.release-version,
.release-time {
  display: block;
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.release-notes {
  margin: 14px 0 0;
  color: var(--text-soft);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.release-read-error {
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

dialog {
  width: min(720px, calc(100vw - 26px));
  max-width: min(720px, calc(100vw - 26px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-large);
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}

dialog::backdrop {
  background: rgba(4, 8, 12, .76);
  backdrop-filter: blur(2px);
}

.modal-card {
  display: flex;
  width: 100%;
  max-width: 100%;
  max-height: calc(100vh - 28px);
  flex-direction: column;
}

.modal-header,
.modal-body,
.modal-footer {
  padding: 16px 18px;
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid var(--border-soft);
  background: var(--panel);
}

.modal-title {
  margin: 0;
  color: var(--text);
  font-size: 18px;
}

.modal-description {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12px;
}

.modal-close {
  float: right;
  margin: -4px -7px 0 12px;
}

.modal-body {
  min-height: 0;
  overflow: auto;
}

.modal-footer {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--border-soft);
  background: var(--panel);
}

.cloud-upload-modal {
  width: min(1120px, calc(100vw - 26px));
  max-width: min(1120px, calc(100vw - 26px));
}

.cloud-upload-body {
  padding: 0;
}

.cloud-upload-frame {
  display: block;
  width: 100%;
  height: min(760px, calc(100vh - 150px));
  min-height: 560px;
  border: 0;
  background: var(--bg-deep);
}

.cloud-upload-footer {
  align-items: center;
}

.cloud-upload-direct-link {
  margin-right: auto;
  text-decoration: none;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field-label {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.text-input,
.text-area,
.file-drop {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--bg-deep);
  color: var(--text);
}

.text-input,
.text-area {
  padding: 9px 10px;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--blue);
  outline: 0;
}

.text-area {
  min-height: 130px;
  resize: vertical;
}

.file-drop {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-style: dashed;
}

.file-input {
  width: 100%;
  color: var(--text-soft);
}

.file-hint,
.modal-hint {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.modal-alert {
  margin: 0 0 13px;
  padding: 10px 11px;
  border: 1px solid rgba(228, 179, 83, .48);
  border-radius: 7px;
  background: rgba(228, 179, 83, .1);
  color: #f2c76a;
  font-size: 12px;
}

.modal-alert.error {
  border-color: rgba(223, 66, 54, .52);
  background: rgba(223, 66, 54, .12);
  color: var(--red-soft);
}

.preview-summary {
  display: grid;
  margin: 14px 0;
  border-top: 1px solid var(--border-soft);
}

.preview-row {
  grid-template-columns: minmax(96px, .36fr) minmax(0, 1fr);
}

.preview-row .preview-value {
  text-align: left;
}

.preview-title,
.json-title {
  margin: 17px 0 7px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.command-list {
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--bg-deep);
}

.command-item {
  padding: 6px 0;
  border-bottom: 1px solid rgba(48, 61, 74, .55);
  color: var(--text-muted);
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.command-item:last-child {
  border-bottom: 0;
}

.json-preview,
.data-preview {
  max-height: 48vh;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--bg-deep);
  color: var(--text-soft);
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.copy-status {
  margin-right: auto;
  color: var(--text-muted);
  font-size: 12px;
}

.resource-form {
  gap: 12px;
}

.resource-dropzone {
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.resource-dropzone:hover,
.resource-dropzone:focus-visible,
.resource-dropzone.drag-over {
  border-color: var(--blue);
  background: rgba(35, 66, 118, .24);
}

.resource-dropzone.busy {
  cursor: wait;
  opacity: .66;
}

.resource-section {
  min-width: 0;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}

.resource-section-title,
.resource-subtitle {
  margin: 0 0 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.resource-validation-summary,
.resource-muted,
.resource-ok,
.resource-status-error {
  margin: 0;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.resource-ok {
  color: var(--green);
}

.resource-status-error,
.error-list {
  color: var(--red-soft);
}

.warning-list {
  color: #f2c76a;
}

.resource-message-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding-left: 18px;
  overflow-wrap: anywhere;
}

.resource-file-container {
  max-height: 31vh;
  min-height: 54px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--bg-deep);
}

.resource-file-list,
.resource-check-list,
.resource-mapping-list,
.resource-session-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resource-file-item,
.resource-check-item,
.resource-mapping-row {
  display: grid;
  min-width: 0;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(48, 61, 74, .58);
}

.resource-file-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.resource-file-item:last-child,
.resource-check-item:last-child,
.resource-mapping-row:last-child {
  border-bottom: 0;
}

.resource-file-copy,
.resource-check-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.resource-file-path,
.resource-check-label {
  min-width: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}

.resource-file-meta,
.resource-check-detail {
  color: var(--text-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
}

.resource-file-status {
  max-width: 210px;
  color: var(--text-muted);
  font-size: 11px;
  overflow-wrap: anywhere;
  text-align: right;
}

.resource-file-item.ready .resource-file-status,
.resource-file-item.remote .resource-file-status {
  color: var(--blue-soft);
}

.resource-file-item.ignored .resource-file-status {
  color: #f2c76a;
}

.resource-file-item.error .resource-file-status {
  color: var(--red-soft);
}

.resource-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.resource-status-name {
  color: var(--text-soft);
  font-weight: 700;
}

.resource-detail-grid {
  display: grid;
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.resource-detail-grid .detail-row {
  grid-template-columns: minmax(80px, .48fr) minmax(0, 1fr);
}

.resource-check-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.resource-mapping-row {
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: baseline;
}

.resource-mapping-source,
.resource-mapping-target,
.resource-mapping-action {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resource-mapping-source,
.resource-mapping-target {
  color: var(--text-soft);
}

.resource-mapping-arrow {
  color: var(--blue-soft);
}

.resource-mapping-action {
  color: var(--text-muted);
  font-size: 11px;
  text-align: right;
}

.resource-result {
  max-height: 180px;
  margin: 0;
  padding: 9px;
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 7px;
  background: var(--bg-deep);
  color: var(--text-muted);
  font-family: Consolas, "Cascadia Code", monospace;
  font-size: 11px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.resource-session-list {
  gap: 7px;
}

.resource-session-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(21, 31, 39, .72);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.resource-session-item:hover,
.resource-session-item:focus-visible {
  border-color: var(--blue);
  background: rgba(31, 49, 72, .7);
}

.resource-session-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.resource-session-title,
.resource-session-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.resource-session-title {
  color: var(--text-soft);
  font-weight: 700;
}

.resource-session-meta {
  color: var(--text-muted);
  font-size: 11px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  .admin-columns {
    grid-template-columns: minmax(210px, .8fr) minmax(340px, 1.25fr);
  }

  .detail-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .app-root {
    padding: 14px 14px 24px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .topbar-meta {
    justify-content: flex-start;
    width: 100%;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    padding-top: 21px;
  }

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

  .admin-columns,
  .admin-current-strip,
  .version-grid,
  .public-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .detail-panel {
    grid-column: auto;
  }

  .public-progress .stepper {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }

  .public-progress .step-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    min-height: 56px;
    padding: 4px 2px 10px;
    text-align: left;
  }

  .public-progress .step-item::before,
  .public-progress .step-item:first-child::before {
    display: block;
    top: 34px;
    right: auto;
    bottom: -1px;
    left: 17px;
    width: 1px;
    height: auto;
  }

  .public-progress .step-item:last-child::before {
    display: none;
  }

  .public-progress .step-marker {
    margin: 0;
  }

  .public-progress .step-body {
    padding: 2px 9px 6px;
  }

  .public-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .admin-current-strip .version-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .admin-current-strip .version-meta,
  .admin-current-strip .version-caption {
    grid-column: 1 / -1;
  }

  body {
    font-size: 13px;
  }

  .brand-mark {
    font-size: 21px;
  }

  .brand-title {
    max-width: 43vw;
  }

  .topbar-meta {
    gap: 6px;
  }

  .topbar-link,
  .mode-pill,
  .status-pill {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .panel,
  .version-card {
    border-radius: 9px;
  }

  .panel {
    padding: 13px;
  }

  .page-actions,
  .page-actions .button,
  .detail-actions,
  .detail-actions .button {
    width: 100%;
  }

  .page-actions .button,
  .detail-actions .button {
    justify-content: center;
  }

  .button,
  .button-with-icon {
    min-height: 40px;
  }

  .detail-row,
  .preview-row,
  .result-row {
    grid-template-columns: minmax(72px, .4fr) minmax(0, 1fr);
  }

  .detail-value {
    text-align: left;
  }

  .activity-item {
    grid-template-columns: 10px minmax(0, 1fr);
  }

  .activity-meta {
    grid-column: 2;
    justify-content: flex-start;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: 14px;
  }

  .modal-footer {
    align-items: stretch;
  }

  .modal-footer .button {
    flex: 1 1 130px;
  }

  .resource-file-item,
  .resource-check-item {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-file-status {
    max-width: none;
    text-align: left;
  }

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

  .resource-mapping-arrow {
    grid-column: 2;
    grid-row: 1;
  }

  .resource-mapping-target {
    grid-column: 1;
    grid-row: 2;
  }

  .resource-mapping-action {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
  }

  .resource-session-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-status {
    flex-basis: 100%;
    margin-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
