:root {
  color-scheme: light;
  --bg: #f3f6f4;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #17211d;
  --muted: #65736e;
  --line: #dce4de;
  --soft: #edf2ee;
  --brand: #0c6b58;
  --brand-soft: #e8f3ef;
  --brand-strong: #084f41;
  --accent: #b7791f;
  --accent-soft: #fff4dd;
  --danger: #b3261e;
  --info: #2457a6;
  --info-soft: #eef4ff;
  --nav-height: 50px;
  --tab-height: 68px;
  --radius: 8px;
  --shadow: 0 14px 34px rgba(21, 35, 29, 0.1);
  --shadow-soft: 0 7px 18px rgba(21, 35, 29, 0.065);
  --app-width: 100vw;
  --app-height: 100vh;
  --keyboard-height: 0px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0;
  touch-action: manipulation;
}

body {
  position: fixed;
  inset: 0;
}

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

button,
a {
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  text-decoration: none;
}

button:disabled,
a.disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.sr-only {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.mp-shell {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: var(--app-width);
  height: var(--app-height);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(12, 107, 88, 0.1), rgba(12, 107, 88, 0) 190px),
    var(--bg);
}

.mp-window {
  z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(135deg, #075947, #0f7a63);
  box-shadow: 0 10px 24px rgba(7, 89, 71, 0.18);
}

.mp-status-bar {
  height: env(safe-area-inset-top, 0px);
}

.mp-nav-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--nav-height);
  padding: 0 16px;
}

.nav-avatar {
  position: absolute;
  left: 14px;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(6, 48, 39, 0.22);
}

.mp-nav-bar h1 {
  position: absolute;
  right: 16px;
  left: 16px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mp-page {
  min-height: 0;
  overflow: hidden;
}

.mp-page-scroll {
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
}

.keyboard-open .mp-page-scroll {
  padding-bottom: max(18px, var(--keyboard-height));
}

.mp-tabbar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tab-height) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  border-top: 1px solid rgba(220, 228, 222, 0.9);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 24px rgba(21, 35, 29, 0.06);
  backdrop-filter: blur(14px);
}

.mp-tabbar[hidden] {
  display: none;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab-icon {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  color: inherit;
  font-size: 18px;
  line-height: 26px;
  text-align: center;
}

.tab.active {
  color: var(--brand);
}

.tab.active .tab-icon {
  background: #e6f3ee;
  box-shadow: inset 0 0 0 1px rgba(12, 107, 88, 0.08);
}

.page {
  min-height: 100%;
  padding: 16px 14px 30px;
}

.topbar {
  padding: 8px 0 14px;
}

.role-top {
  padding-top: 35px;
}

.eyebrow {
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.title {
  margin: 6px 0 0;
  font-size: 24px;
  font-weight: 850;
  line-height: 1.12;
}

.muted {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.topbar .muted {
  margin-top: 7px;
}

.section {
  margin-top: 14px;
}

.section-head,
.row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.row {
  align-items: center;
}

.row > div:first-child,
.row > p:first-child {
  flex: 1;
  min-width: 0;
}

.section-head {
  margin-bottom: 10px;
}

.section-title {
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.section-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.panel,
.item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}

.panel {
  padding: 15px;
}

.list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.item {
  display: block;
  width: 100%;
  padding: 13px;
  text-align: left;
}

.item-title {
  display: block;
  min-width: 0;
  font-size: 15px;
  font-weight: 760;
  line-height: 1.32;
  word-break: break-word;
}

.item-meta {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.48;
  word-break: break-word;
}

.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 9px;
  color: #ffffff;
  background: linear-gradient(135deg, #0c6b58, #08725d);
  box-shadow: 0 8px 18px rgba(12, 107, 88, 0.18);
  font-size: 14px;
  font-weight: 760;
  line-height: 1.25;
  white-space: nowrap;
}

.btn:active {
  background: var(--brand-strong);
}

.btn.secondary {
  color: var(--text);
  background: #ecefeb;
  box-shadow: none;
}

.btn.ghost {
  color: var(--brand);
  background: var(--brand-soft);
  box-shadow: none;
}

.btn.danger,
.danger {
  color: var(--danger);
  background: #fff5f4;
}

.btn.full {
  width: 100%;
}

.btn.mini,
.mini {
  min-height: 32px;
  padding: 0 11px;
  font-size: 12px;
}

.btn.small,
.small {
  min-height: 34px;
  padding: 0 11px;
  font-size: 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-label {
  color: #56605b;
  font-size: 12px;
  font-weight: 760;
}

.input,
.textarea,
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #d9e2dc;
  border-radius: var(--radius);
  background: #fbfdfb;
  color: var(--text);
  outline: none;
}

.input,
input {
  min-height: 46px;
  padding: 0 13px;
  font-size: 15px;
}

.textarea,
textarea {
  min-height: 118px;
  padding: 12px 13px;
  resize: vertical;
  font-size: 15px;
  line-height: 1.62;
}

input:focus,
textarea:focus {
  border-color: var(--brand);
}

.tag {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand);
  background: #edf6f2;
  font-size: 12px;
  font-weight: 760;
  line-height: 24px;
}

.empty {
  padding: 17px 10px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.login-page {
  display: flex;
  min-height: 100%;
  align-items: flex-start;
  justify-content: center;
  padding: 34px 16px 64px;
}

.keyboard-open .login-page {
  min-height: auto;
  padding-top: 14px;
  padding-bottom: max(24px, var(--keyboard-height));
}

.keyboard-open .login-brand-panel {
  padding-top: 14px;
  padding-bottom: 14px;
}

.keyboard-open .login-brand-panel .title,
.keyboard-open .login-brand-panel .muted {
  display: none;
}

.login-shell {
  width: 100%;
  max-width: 380px;
  padding: 4px 0;
}

.login-brand-panel {
  position: relative;
  padding: 20px 18px;
  border: 1px solid rgba(12, 107, 88, 0.14);
  border-radius: 14px;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(12, 107, 88, 0.12), rgba(255, 255, 255, 0.96) 58%),
    #ffffff;
  box-shadow: var(--shadow);
}

.brand-avatar {
  display: block;
  width: 78px;
  height: 78px;
  margin-bottom: 14px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  object-fit: cover;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(7, 89, 71, 0.18);
}

.login-brand-panel .title {
  font-size: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.form-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 850;
  line-height: 1.25;
}

.login-btn {
  margin-top: 4px;
}

.api-note {
  margin: 0;
  color: #8a8f8b;
  font-size: 12px;
  line-height: 1.4;
  word-break: break-all;
}

.role-row {
  margin-top: 10px;
}

.role-item {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.role-item.active {
  border-color: var(--brand);
  background: #f1faf6;
}

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

.metric {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, #ffffff, #fbfdfb);
  box-shadow: var(--shadow-soft);
}

.metric::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 11px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(12, 107, 88, 0.08);
}

.metric.wide {
  background: linear-gradient(180deg, #ffffff, #f7faf7);
}

.metric-value {
  position: relative;
  z-index: 1;
  font-size: 25px;
  font-weight: 850;
  line-height: 1.1;
}

.metric-label {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.35;
}

.capacity-note {
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #d9e6df;
  border-radius: var(--radius);
  color: #56605b;
  background: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  line-height: 1.5;
}

.production-panel,
.current-panel,
.preview-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.production-panel {
  border-color: #cfe2dc;
  background:
    linear-gradient(180deg, rgba(232, 243, 239, 0.52), rgba(255, 255, 255, 0) 112px),
    #ffffff;
}

.speed-tag {
  min-height: 30px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 850;
}

.speed-tag:disabled {
  opacity: 0.78;
  cursor: default;
}

.count-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-step {
  display: flex;
  flex: 0 0 38px;
  width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 18px;
  font-weight: 850;
}

.count-input {
  flex: 0 0 72px;
  min-height: 40px;
  padding: 0 6px;
  font-size: 17px;
  font-weight: 850;
  text-align: center;
}

.recommend-btn {
  flex: 1;
  min-height: 40px;
}

.brief-textarea {
  min-height: 104px;
}

.production-product-note {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: var(--radius);
  color: #56605b;
  background: #f5f8f6;
  font-size: 12px;
  line-height: 1.45;
}

.group-brief-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-brief-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.group-brief-label {
  flex: 0 0 62px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.group-brief-input {
  flex: 1;
  min-height: 40px;
  padding: 0 11px;
  font-size: 13px;
}

.production-actions,
.action-row {
  align-items: stretch;
}

.production-actions .btn,
.action-row .btn {
  flex: 1;
}

.active-job {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid #cfe2dc;
  border-radius: var(--radius);
  color: var(--brand);
  background: #f0f8f5;
  font-size: 13px;
  line-height: 1.45;
}

.active-job span:nth-child(2) {
  flex: 1;
  min-width: 0;
}

.active-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--brand);
}

.group-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.script-preview,
.angle-line,
.error-line {
  padding: 11px 12px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.55;
  word-break: break-word;
}

.script-preview {
  color: #24302b;
  background: #f7faf7;
}

.angle-line {
  color: #56605b;
  background: var(--accent-soft);
}

.error-line {
  color: var(--danger);
  background: #fff5f4;
}

.lang-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.video-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  width: 100%;
}

.video-action {
  display: inline-flex;
  min-height: 38px;
  width: 100%;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 760;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.video-action.preview {
  color: var(--brand);
  background: var(--brand-soft);
}

.video-action.save {
  color: #ffffff;
  background: linear-gradient(135deg, #0c6b58, #08725d);
}

.video-action.ghost {
  color: #3f4a45;
  background: #f1eee8;
}

.video-action.disabled {
  color: #98a09c;
  background: #e7e4dd;
}

.group-video-preview {
  display: grid;
  gap: 10px;
  width: 100%;
  padding: 10px;
  border: 1px solid #d8e5df;
  border-radius: var(--radius);
  background: #f8fbf9;
}

.group-preview-video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: min(58vh, 540px);
  border-radius: calc(var(--radius) - 2px);
  background: #111815;
  object-fit: contain;
}

.group-preview-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: 10px;
}

.download-panel {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #dfe8e2;
  border-radius: var(--radius);
  background: #f8fbf9;
}

.download-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #24302b;
  font-size: 13px;
  font-weight: 800;
}

.download-row strong {
  color: var(--brand);
}

.download-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #dfe8e2;
}

.download-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0c6b58, #b7791f);
  transition: width 180ms ease;
}

.download-detail {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.speed-mask {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background: rgba(22, 32, 28, 0.45);
}

.speed-sheet {
  width: 100%;
  max-width: 460px;
  padding: 18px;
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 -12px 34px rgba(21, 35, 29, 0.16);
}

.speed-sheet-head,
.speed-adjust-row,
.speed-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.speed-sheet-title {
  font-size: 16px;
  font-weight: 850;
}

.speed-sheet-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.speed-sheet-value,
.speed-center-value {
  color: var(--brand);
  font-size: 18px;
  font-weight: 850;
}

.speed-adjust-row {
  margin-top: 18px;
}

.speed-step {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 22px;
  font-weight: 850;
}

.speed-actions {
  margin-top: 18px;
}

.speed-cancel,
.speed-confirm {
  flex: 1;
  min-height: 44px;
  border-radius: var(--radius);
  font-weight: 760;
}

.speed-cancel {
  color: var(--text);
  background: #e8e2d8;
}

.speed-confirm {
  color: #ffffff;
  background: var(--brand);
}

.segmented {
  display: flex;
  gap: 6px;
  padding: 5px;
  border-radius: 12px;
  background: var(--soft);
}

.seg {
  flex: 1;
  min-height: 38px;
  border-radius: 9px;
  color: #56605b;
  background: transparent;
  font-size: 14px;
  font-weight: 760;
}

.seg.active {
  color: var(--brand);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(21, 35, 29, 0.08);
}

.upload-note {
  margin-top: 8px;
}

.upload-progress-note {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 11px 12px;
  border: 1px solid #cfe2dc;
  border-radius: var(--radius);
  color: #0c6b58;
  background: #eff8f4;
  font-size: 13px;
  line-height: 1.45;
}

.upload-progress-note strong {
  font-size: 14px;
}

.asset-card {
  padding: 11px;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.asset-card.selected {
  border-color: #7eb4a4;
  background:
    linear-gradient(180deg, rgba(232, 243, 239, 0.7), rgba(255, 255, 255, 0) 96px),
    #ffffff;
  transform: translateY(-1px);
}

.asset-select-row {
  width: 100%;
  padding: 0;
  background: transparent;
  text-align: left;
}

.asset-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.thumb {
  position: relative;
  flex: 0 0 88px;
  width: 88px;
  height: 66px;
  overflow: hidden;
  border-radius: 8px;
  background: #d9ddd8;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.thumb-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-empty {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  color: #69736e;
  font-size: 11px;
  font-weight: 850;
}

.asset-info {
  flex: 1;
  min-width: 0;
}

.asset-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.tag-group {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.product-tag {
  background: #eef8f4;
}

.product-tag.untagged {
  color: #8b4b14;
  background: #fff4df;
}

.path-text {
  display: block;
  margin-top: 5px;
  color: #8a8f8b;
  font-size: 11px;
  line-height: 1.42;
  word-break: break-all;
}

.asset-card:not(.selected) .path-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.selected-path {
  margin-top: 5px;
}

.asset-inline-preview {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(136, 185, 170, 0.36);
  border-radius: var(--radius);
  background: #f8fbf9;
}

.asset-preview-video {
  width: 100%;
  height: min(64vw, 460px);
  min-height: 240px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #111815;
}

.audio-preview {
  display: flex;
  min-height: 88px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.audio-mark {
  color: #56605b;
  font-size: 14px;
  font-weight: 850;
}

.audio-btn {
  min-width: 84px;
  min-height: 36px;
}

.tag-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.tag-panel-title {
  color: #56605b;
  font-size: 13px;
  font-weight: 850;
}

.product-type-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.production-type-row,
.compact-type-row {
  margin-top: 0;
}

.upload-tag-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.type-btn {
  min-width: 64px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d8dcd8;
  border-radius: var(--radius);
  background: #ffffff;
  color: #2d3733;
  font-size: 13px;
  font-weight: 760;
}

.product-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.type-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #b6c1bc;
}

.type-btn.active {
  border-color: var(--brand);
  background: linear-gradient(135deg, #0c6b58, #08725d);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(12, 107, 88, 0.18);
}

.type-btn.active .type-dot {
  background: #ffffff;
}

.preview-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.delete-btn {
  min-width: 104px;
  min-height: 38px;
}

.current-head,
.compact-head,
.language-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.current-head > div,
.language-card-head > div {
  flex: 1;
  min-width: 0;
}

.script-text {
  padding: 12px 13px;
  border: 1px solid #e3ebe5;
  border-radius: var(--radius);
  color: #24302b;
  background: #f8fbf9;
  font-size: 14px;
  line-height: 1.65;
  word-break: break-word;
  white-space: pre-wrap;
}

.current-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.current-stats span {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--soft);
}

.script-tabs {
  width: 100%;
  overflow-x: auto;
  white-space: nowrap;
}

.script-tab-row {
  display: flex;
  gap: 8px;
  padding-bottom: 3px;
}

.script-tab {
  display: inline-flex;
  flex: 0 0 142px;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
}

.script-tab.active {
  border-color: #a7d3c6;
  background: #eef8f4;
}

.script-tab-title,
.script-tab-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-tab-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.script-tab-meta {
  margin-top: 3px;
  color: #7d8580;
  font-size: 11px;
}

.language-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.language-card.ready {
  border-color: #d3e4dc;
}

.play-btn {
  min-width: 68px;
  min-height: 34px;
}

.translated-text {
  color: #303a35;
  font-size: 14px;
  line-height: 1.62;
  word-break: break-word;
}

.empty-inline {
  padding: 11px 12px;
  border-radius: var(--radius);
  color: #7d8580;
  background: #f4efe7;
  font-size: 13px;
  line-height: 1.5;
}

.tag.running,
.tag.submitted {
  color: #8b4a00;
  background: #fff1d7;
}

.tag.completed {
  color: var(--brand);
  background: var(--brand-soft);
}

.tag.failed {
  color: #9d2e2e;
  background: #fde7e7;
}

.job-item {
  background: #ffffff;
}

.logs {
  max-height: 360px;
  overflow: auto;
  background: #101815;
  border-color: #22312b;
}

.logline {
  display: block;
  margin-top: 6px;
  color: #53605b;
  font-size: 12px;
  line-height: 1.55;
  word-break: break-word;
}

.logs .logline {
  color: #d6e2dc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.toast {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: calc(88px + env(safe-area-inset-bottom, 0px));
  left: 18px;
  max-width: 420px;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 12px;
  color: #ffffff;
  background: rgba(22, 32, 28, 0.9);
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
}

@media (min-width: 760px) {
  .mp-shell {
    position: relative;
    width: min(430px, var(--app-width));
    height: min(900px, var(--app-height));
    margin: 0 auto;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }

  body {
    display: flex;
    justify-content: center;
    background: #e8e2d8;
  }
}
