:root {
  --bg: #0a0a0a;
  --panel: #111111;
  --panel-alt: #161616;
  --ink: #ededed;
  --muted: #888888;
  --line: #242424;
  --line-hover: #3a3a3a;
  --accent: #ffffff;
  --accent-ink: #0a0a0a;
  --green: #22c55e;
  --amber: #f59e0b;
  --danger: #ef4444;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); }
button, input, textarea, select { font: inherit; color: inherit; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; transition: border-color 0.15s, background-color 0.15s, color 0.15s; }
button:disabled { cursor: not-allowed; opacity: 0.45; }
a { color: inherit; text-decoration: none; }

/* Topbar */
.topbar {
  height: 54px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--ink);
}

.status-pill {
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-inline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 4px 10px;
  border-radius: 6px;
  position: relative;
}

.wallet-balance {
  font-weight: 500;
  color: var(--ink);
}

.wallet-dropdown summary {
  cursor: pointer;
  color: var(--muted);
  user-select: none;
  list-style: none;
  border-left: 1px solid var(--line);
  padding-left: 10px;
}
.wallet-dropdown summary::-webkit-details-marker { display: none; }
.wallet-dropdown summary:hover { color: var(--ink); }

.wallet-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 280px;
  background: #141414;
  border: 1px solid var(--line-hover);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
  z-index: 50;
}

.redeem-inline {
  display: flex;
  gap: 6px;
}

.redeem-inline input {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 5px;
}

.redeem-inline button {
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 5px;
  white-space: nowrap;
}

#card-message {
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 0;
}

.ghost-btn {
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--ink);
}
.ghost-btn:hover:not(:disabled) {
  border-color: var(--line-hover);
  background: var(--panel-alt);
}

.text-button {
  font-size: 12px;
  color: var(--muted);
  padding: 4px 6px;
}
.text-button:hover { color: var(--ink); }

/* Layout */
.workspace {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 24px 48px;
}

.notice {
  font-size: 12px;
  line-height: 1.6;
  background: #19150e;
  border: 1px solid #423013;
  color: #fbbf24;
  border-radius: 6px;
  margin-bottom: 18px;
  padding: 10px 14px;
}
.notice:empty { display: none; }

.columns {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

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

.field-group {
  margin-bottom: 18px;
}

.field-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 8px;
}

.label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.label-row .field-label { margin: 0; }

.preset-links {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--muted);
}

.tpl-btn {
  font-size: 11px;
  color: var(--muted);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid transparent;
}
.tpl-btn:hover:not(:disabled) {
  color: var(--ink);
  background: var(--panel-alt);
  border-color: var(--line);
}

/* Tier Tabs */
.tier-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.tier-tab {
  text-align: left;
  padding: 10px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tier-tab:hover:not(:disabled) {
  border-color: var(--line-hover);
}
.tier-tab.active {
  border-color: var(--ink);
  background: var(--panel-alt);
}

.tier-tab-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.tier-tab-top strong {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
}
.tier-tab-top span {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 1px 5px;
  border-radius: 3px;
}
.tier-tab small {
  font-size: 11px;
  line-height: 1.4;
  color: var(--muted);
}

.tier-description {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}

.hidden-select { display: none !important; }

/* Inputs */
textarea, input, select {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 7px;
  outline: none;
  transition: border-color 0.15s;
}
textarea:focus, input:focus, select:focus {
  border-color: #666666;
}
textarea {
  resize: vertical;
  min-height: 118px;
  padding: 11px 12px;
  font-size: 13px;
  line-height: 1.65;
}
textarea::placeholder { color: #555555; }
input { padding: 9px 12px; font-size: 13px; }
select { padding: 9px 10px; font-size: 12.5px; }

.input-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
  margin: 6px 0 8px;
}

/* Camera & Style Chips */
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip {
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 4px;
}
.chip:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-hover);
}

/* Upload */
.optional { font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.upload-dropzone {
  position: relative;
  border: 1px dashed var(--line-hover);
  border-radius: 7px;
  background: var(--bg);
  padding: 12px;
  text-align: center;
}
.upload-dropzone:hover { border-color: #666666; }
.upload-dropzone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.upload-placeholder span { font-size: 12px; color: var(--muted); }
.reference-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding: 8px 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.reference-preview img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
}
.reference-preview-info {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}
#upload-message { font-size: 11px; color: var(--muted); margin: 4px 0 0; }

/* Options */
.options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.seg-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 2px;
  gap: 2px;
}
.seg-pill {
  font-size: 11.5px;
  padding: 6px 4px;
  border-radius: 4px;
  color: var(--muted);
  text-align: center;
}
.seg-pill.active {
  background: var(--panel-alt);
  color: var(--ink);
  font-weight: 500;
}

.submit-footer {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.cost-note {
  font-size: 11.5px;
  color: var(--muted);
  margin: 0 0 10px;
}
.submit-btn, button[type=submit] {
  width: 100%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  font-size: 13px;
  padding: 11px 16px;
  border-radius: 7px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.submit-btn:hover:not(:disabled) {
  background: #dcdcdc;
}
#form-message, #message {
  font-size: 12px;
  color: var(--muted);
  margin: 8px 0 0;
}

/* Right Column: History */
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
h2 { font-size: 14px; font-weight: 600; margin: 0; }
#total { font-weight: 400; color: var(--muted); margin-left: 4px; }
.history-tools { display: flex; align-items: center; gap: 8px; }

.empty {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  text-align: center;
  padding: 24px;
}
.empty h3 { font-size: 14px; font-weight: 500; color: var(--ink); margin: 0 0 6px; }
.empty p { font-size: 12px; margin: 0; }

.job {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 14px;
}
.job-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.badge {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--panel-alt);
  border: 1px solid var(--line);
  color: var(--ink);
}
.badge.review {
  border-color: #523815;
  color: var(--amber);
}
.job time { font-size: 11px; color: var(--muted); }

/* Pipeline Stepper */
.pipeline-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 12px;
}
.pipe-step {
  font-size: 10.5px;
  padding: 4px 6px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: #555555;
  text-align: center;
}
.pipe-step.done {
  color: var(--muted);
  border-color: #2f2f2f;
}
.pipe-step.current {
  color: var(--ink);
  border-color: #666666;
  background: var(--panel-alt);
}

.job-prompt {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
  margin: 6px 0 10px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.job-meta {
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--muted);
}
.job-meta p { margin: 2px 0; }

.job video {
  display: block;
  width: 100%;
  max-height: 400px;
  border-radius: 7px;
  background: #000000;
  border: 1px solid var(--line);
  margin: 12px 0 10px;
}

.audio-track-box {
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 7px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.audio-track-head {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.audio-track-head span:last-child { color: var(--muted); }
.audio-track-box audio {
  width: 100%;
  height: 34px;
  margin-bottom: 8px;
}

.action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.project-download, .native-download, .remix-btn {
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--panel-alt);
  color: var(--ink);
}
.project-download:hover, .native-download:hover, .remix-btn:hover {
  border-color: var(--line-hover);
  background: #202020;
}

.storyboard { margin: 12px 0 !important; }
.storyboard > summary { cursor: pointer; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.storyboard figure, .project-reference figure { margin: 0 0 8px; }
.storyboard figure img {
  display: block;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  background: #050505;
  border-radius: 6px;
  border: 1px solid var(--line);
}
.storyboard figcaption, .project-reference figcaption {
  font-size: 10.5px;
  color: var(--muted);
  padding-top: 4px;
}
.storyboard-frames {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.storyboard-frames figure img { height: 96px; object-fit: contain; }
.project-reference img { width: 80px; max-height: 100px; object-fit: contain; border-radius: 5px; border: 1px solid var(--line); }

.project-clips {
  margin: 10px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
  line-height: 1.75;
}
.project-clips a { color: var(--ink); margin-left: 8px; text-decoration: underline; }

.job details { font-size: 11px; line-height: 1.7; color: var(--muted); margin-top: 8px; }
.job details summary { cursor: pointer; }
.job details p { white-space: pre-wrap; overflow-wrap: anywhere; }

footer {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-card {
  width: min(720px, 100%);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line-hover);
  border-radius: 10px;
  padding: 20px;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.modal-head h3 { margin: 0; font-size: 15px; }
.muted { font-size: 12px; color: var(--muted); line-height: 1.6; margin: 0; }
.api-grid { display: flex; flex-direction: column; gap: 12px; margin-top: 14px; }
.api-box { background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.api-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; }
.copy-btn { font-size: 11px; padding: 3px 8px; border-radius: 4px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); }
.api-box pre { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; line-height: 1.55; color: #b4b4b4; overflow-x: auto; white-space: pre-wrap; }

/* Login */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: min(380px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 28px; }
.login-card .brand { margin-bottom: 16px; display: block; }
.login-card h1 { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.login-card form { margin-top: 20px; }
.login-card button { margin-top: 12px; }

.hidden { display: none !important; }

@media (max-width: 860px) {
  .topbar { padding: 0 14px; }
  .workspace { padding: 16px 14px 36px; }
  .columns { grid-template-columns: 1fr; }
  .tier-tabs { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  .storyboard-frames { grid-template-columns: repeat(2, 1fr); }
}

/* Muse workstation refinement · 2026-10-24
   Presentation only. Original IDs, native controls and application logic are preserved. */
:root {
  --bg: #101113;
  --panel: #17181b;
  --panel-alt: #202226;
  --ink: #ececea;
  --muted: #96999f;
  --line: #2b2d32;
  --line-hover: #50535a;
  --accent: #e9e9e4;
  --accent-ink: #171819;
  --green: #96b4a1;
  --amber: #d7b681;
  --danger: #d99090;
  color-scheme: dark;
  font-size: 13px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
body { background: var(--bg); line-height: 1.5; }
button, a, summary, input, textarea, select { touch-action: manipulation; }
button, a { transition: background-color .14s ease, border-color .14s ease, color .14s ease; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #c9cec6;
  outline-offset: 3px;
}
button:disabled { opacity: .42; }
::selection { background: #43484b; color: #fff; }
* { scrollbar-width: thin; scrollbar-color: #44464d transparent; }
.topbar {
  height: 64px;
  padding: 0 32px;
  background: #131416;
  backdrop-filter: none;
  border-bottom-color: #303238;
}
.brand-wrap { gap: 16px; min-width: 0; }
.brand { font-size: 22px; font-weight: 650; letter-spacing: -.8px; }
.workspace-name { border-left: 1px solid #37393e; padding-left: 16px; color: #b3b5ba; font-size: 12px; }
.status-pill { background: transparent; border: 0; padding: 0; gap: 7px; font-size: 11px; white-space: nowrap; }
.status-pill::before { width: 5px; height: 5px; background: var(--green); }
.header-right { gap: 8px; }
.wallet-inline { padding: 0; gap: 12px; background: transparent; border: 0; margin-right: 12px; }
.wallet-balance { font-variant-numeric: tabular-nums; font-size: 12px; color: #d4d6d8; }
.wallet-dropdown summary { font-size: 11px; color: #a2a5ac; }
.wallet-popover { background: #1b1d21; border-color: #484b52; border-radius: 8px; padding: 16px; box-shadow: 0 12px 32px #0005; }
.redeem-inline input { min-width: 0; }
.redeem-inline button { width: auto; }
.ghost-btn, .text-button { min-height: 32px; padding: 6px 11px; font-size: 12px; border-radius: 5px; }
.ghost-btn { background: #1d1f23; border-color: #36383f; color: #d3d5d9; }
.ghost-btn:hover:not(:disabled) { background: #2a2c32; border-color: #555860; }
.text-button { color: #a5a8af; }
.text-button:hover:not(:disabled) { background: #222429; color: #efefed; }
.workspace { max-width: 1680px; padding: 28px 32px 20px; }
.columns { grid-template-columns: 368px minmax(0, 1fr); gap: 32px; align-items: start; }
.panel { border-radius: 8px; padding: 0; border-color: #34363c; background: var(--panel); overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid #34363c; }
.panel-heading h1 { font-size: 14px; font-weight: 600; margin: 0; letter-spacing: .02em; }
.panel-heading span { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; color: #82868d; font-size: 10px; letter-spacing: .14em; }
#job-form { padding: 20px; }
.field-group { margin-bottom: 22px; }
.field-label { font-size: 12px; font-weight: 550; color: #c9ccd1; margin-bottom: 10px; }
.tier-tabs { grid-template-columns: 1fr; gap: 7px; }
.tier-tab { position: relative; padding: 11px 12px 11px 43px; gap: 3px; border-radius: 5px; background: #141518; min-height: 65px; }
.tier-tab::before { content: '01'; position: absolute; top: 14px; left: 12px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; letter-spacing: -.5px; color: #737781; }
.tier-tab[data-tier="2"]::before { content: '02'; }
.tier-tab[data-tier="3"]::before { content: '03'; }
.tier-tab.active { border-color: #8d938d; background: #24282a; }
.tier-tab.active::before { color: #dce1d9; }
.tier-tab.active::after { content: ''; position: absolute; width: 2px; top: 11px; bottom: 11px; left: 0; background: #c8d0c2; }
.tier-tab-top { gap: 10px; }
.tier-tab-top strong { font-weight: 550; font-size: 12px; }
.tier-tab-top span { font-size: 10px; padding: 0; border: 0; white-space: nowrap; color: #b4b8bf; font-variant-numeric: tabular-nums; }
.tier-tab small { font-size: 10.5px; color: #969ca5; line-height: 1.6; }
.tier-description { color: #8f949c; font-size: 11px; line-height: 1.7; padding-left: 1px; margin-top: 10px; }
.label-row { gap: 7px; align-items: baseline; margin-bottom: 10px; }
.preset-links { width: 100%; gap: 0; flex-wrap: wrap; }
.preset-links > span { margin-right: 3px; color: #777d87; }
.tpl-btn { padding: 3px 5px; font-size: 10.5px; }
textarea, input, select { background: #111215; border-color: #35383f; border-radius: 5px; }
textarea { min-height: 148px; padding: 12px; font-size: 12.5px; line-height: 1.85; }
textarea::placeholder { color: #747b85; }
textarea:focus, input:focus, select:focus { border-color: #8b929c; }
.input-foot { margin: 7px 0 10px; gap: 8px; font-size: 10px; color: #888f98; }
#count { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chips-row { gap: 5px; }
.chip { min-height: 27px; font-size: 10.5px; padding: 4px 7px; border-radius: 4px; color: #a4aab2; background: #1c1e22; border-color: #32353b; }
.chip:hover:not(:disabled) { background: #2b2e34; border-color: #555b64; }
.optional { color: #858b95; font-size: 10px; }
.upload-dropzone { padding: 17px 12px; border-radius: 5px; border-color: #4a4e57; background: #141619; }
.upload-placeholder { display: flex; align-items: center; gap: 10px; text-align: left; }
.upload-placeholder::before { content: '+'; flex: 0 0 24px; line-height: 24px; text-align: center; font-size: 19px; font-weight: 300; color: #afb5bd; border: 1px solid #4c525b; border-radius: 3px; }
.upload-placeholder span { font-size: 10.5px; line-height: 1.65; color: #9299a4; }
.reference-preview { border-radius: 5px; padding: 10px; }
.reference-preview-info { gap: 10px; font-size: 11px; }
.options { grid-template-columns: 1fr; gap: 18px; }
.seg-pills { padding: 3px; gap: 3px; border-color: #35383f; border-radius: 6px; background: #101215; }
.seg-pill { min-height: 33px; font-size: 11px; padding: 7px 5px; border: 1px solid transparent; border-radius: 3px; }
.seg-pill.active { background: #30343a; color: #f0f1ed; border-color: #4b5058; font-weight: 500; }
.seg-pill:hover:not(:disabled) { color: #fff; background: #272b31; }
#size-pills .seg-pill::before { content: ''; display: inline-block; width: 7px; height: 11px; border: 1px solid currentColor; border-radius: 1px; vertical-align: -2px; margin-right: 6px; opacity: .7; }
#size-pills [data-size="16:9"]::before { width: 12px; height: 7px; vertical-align: 0; }
#size-pills [data-size="1:1"]::before { width: 9px; height: 9px; vertical-align: -1px; }
.submit-footer { border-top-color: #35383f; padding-top: 18px; }
.cost-note { font-size: 10.5px; line-height: 1.7; color: #a1a8b2; margin-bottom: 12px; }
.submit-btn, button[type=submit] { min-height: 42px; border-radius: 5px; padding: 12px 14px; font-size: 12px; letter-spacing: .01em; background: #e3e6df; color: #151719; }
.submit-btn:hover:not(:disabled), button[type=submit]:hover:not(:disabled) { background: #f6f7f2; }
#form-message:empty, #message:empty, #upload-message:empty, #card-message:empty { display: none; }
#form-message { line-height: 1.7; overflow-wrap: anywhere; }
.history { min-width: 0; }
.section-heading { min-height: 56px; align-items: center; margin: 0 0 18px; gap: 12px; }
.section-title h2 { font-size: 17px; font-weight: 550; line-height: 1.5; letter-spacing: -.02em; }
.section-description { margin: 4px 0 0; font-size: 11px; color: #858c96; }
#total { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; color: #858b95; }
.history-tools { gap: 5px; flex-shrink: 0; }
.empty { min-height: 480px; border-color: #2f3238; border-radius: 8px; background: #131518; padding: 36px; }
.empty::before { content: ''; display: block; width: 54px; height: 36px; border: 1px solid #5c626c; border-radius: 5px; margin-bottom: 22px; box-shadow: 7px 7px 0 -1px #131518, 7px 7px 0 0 #343942; }
.empty h3 { font-size: 14px; margin-bottom: 8px; color: #d1d5da; }
.empty p { max-width: 290px; font-size: 11.5px; line-height: 1.8; color: #7f8793; }
.job { border-color: #34373e; border-radius: 8px; background: #17191d; padding: 20px; margin-bottom: 22px; }
.job-head { margin-bottom: 17px; gap: 14px; }
.badge { background: #282c31; color: #c5ccd4; border-color: #464d57; font-size: 10px; border-radius: 4px; padding: 3px 7px; }
.badge.review { background: #29251e; border-color: #655135; }
.job time { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; color: #9199a5; font-variant-numeric: tabular-nums; }
.pipeline-bar { gap: 0; border: 1px solid #353942; border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.pipe-step { border: 0; border-radius: 0; padding: 6px; background: #131518; color: #757d88; font-size: 10px; border-right: 1px solid #30353d; }
.pipe-step:last-child { border-right: 0; }
.pipe-step.done { color: #a2aca5; background: #1d2220; border-color: #343d37; }
.pipe-step.current { background: #32373d; color: #edf0e9; }
.job-prompt { font-size: 13px; line-height: 1.8; color: #dce0e2; margin: 12px 0; }
.job-meta { color: #8d95a1; font-size: 10.5px; line-height: 1.8; }
.job video { width: 100%; aspect-ratio: 16 / 9; object-fit: contain; max-height: 560px; border-radius: 5px; border-color: #33373e; margin: 18px 0 12px; background: #08090a; }
.action-bar { gap: 7px; margin: 10px 0; align-items: center; }
.project-download, .native-download, .remix-btn { min-height: 32px; display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 4px; border-color: #444a54; color: #c9d0d9; background: #24282e; font-size: 11px; }
.project-download:hover, .native-download:hover, .remix-btn:hover { background: #323741; border-color: #66707d; }
.audio-track-box { margin: 18px 0; padding: 15px; background: #121518; border: 1px solid #3a4049; border-radius: 5px; }
.audio-track-head { font-size: 11px; line-height: 1.65; align-items: center; gap: 12px; margin-bottom: 12px; color: #c4cbd3; }
.audio-track-head span:last-child { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; color: #b2babf; border: 1px solid #48515b; border-radius: 3px; padding: 1px 5px; letter-spacing: .08em; }
.audio-track-box audio { display: block; width: 100%; height: 36px; margin: 0 0 10px; color-scheme: dark; }
.audio-track-box .action-bar { margin-bottom: 0; }
.storyboard { padding: 12px; background: #121417; border: 1px solid #30363e; border-radius: 5px; }
.storyboard > summary { font-size: 11px; color: #adb6c2; line-height: 1.6; }
.storyboard-frames { gap: 8px; }
.storyboard figure img { border-color: #343c46; border-radius: 3px; max-height: 300px; }
.storyboard-frames figure img { height: 108px; }
.storyboard figcaption, .project-reference figcaption { font-size: 10px; color: #8c97a4; padding-top: 7px; }
.project-clips { background: transparent; border: 0; border-top: 1px solid #30353d; border-bottom: 1px solid #30353d; border-radius: 0; padding: 10px 0; line-height: 1.8; font-size: 10.5px; }
.project-clips:empty { display: none; }
.project-clips > div { padding: 2px 0; }
.project-clips a { text-underline-offset: 3px; color: #b9c4d1; }
.job details { font-size: 10.5px; }
.job details summary { min-height: 28px; line-height: 28px; }
.notice { border-color: #60523b; color: #d1bc98; background: #211e18; font-size: 12px; border-radius: 5px; }
footer { margin-top: 30px; padding-top: 14px; border-color: #2e3238; color: #747d88; font-size: 10px; letter-spacing: .02em; gap: 18px; }
#usage { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; }
.modal-backdrop { background: #080a0cbd; padding: 24px; }
.modal-card { border-color: #545c66; background: #1a1d22; padding: 24px; border-radius: 8px; max-height: calc(100dvh - 48px); }
.modal-head { gap: 20px; margin-bottom: 16px; }
.modal-head h3 { font-size: 15px; line-height: 1.5; font-weight: 550; }
.api-box { border-color: #373f49; background: #12161b; padding: 16px; border-radius: 5px; }
.api-box-head { gap: 10px; flex-wrap: wrap; font-size: 11px; line-height: 1.6; }
.copy-btn { min-height: 28px; padding: 4px 8px; white-space: normal; }
.api-box pre { color: #b4c1d1; font-size: 11px; overflow-wrap: anywhere; }
#dev-code-editor { min-height: 240px !important; tab-size: 2; white-space: pre; overflow: auto; }
#dev-target-file { min-width: 0; }
.login-body { background: #101214; }
.login-card { width: min(410px, 100%); background: #181b1f; border-color: #3e444d; border-radius: 8px; padding: 36px; }
.login-card .brand { font-size: 25px; margin-bottom: 32px; }
.login-card h1 { font-size: 20px; font-weight: 500; }
.login-card .muted { color: #99a2ae; }
.login-card form { margin-top: 28px; }
.login-card input { min-height: 44px; }
.login-card button { margin-top: 16px; }
@media (min-width: 1440px) {
  .columns { grid-template-columns: 398px minmax(0, 1fr); gap: 40px; }
  #job-form { padding: 24px; }
  .panel-heading { padding: 20px 24px; }
  .job { padding: 24px; }
}
@media (min-width: 981px) {
  .compose { position: static; max-height: none; overflow: hidden; }
  .panel-heading { background: #1a1c20; }
}
@media (max-width: 1100px) and (min-width: 981px) {
  .topbar { padding: 0 24px; }
  .workspace { padding: 24px; }
  .columns { grid-template-columns: 340px minmax(0, 1fr); gap: 24px; }
  .workspace-name { display: none; }
  .job { padding: 16px; }
}
@media (max-width: 980px) {
  .topbar { padding: 0 20px; }
  .workspace { padding: 24px 20px; }
  .columns { grid-template-columns: 1fr; gap: 28px; }
  .compose { position: static; max-height: none; overflow: visible; }
  .panel-heading { padding: 18px 22px; }
  #job-form { padding: 22px; }
  .tier-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tier-tab { padding: 35px 12px 12px; }
  .tier-tab::before { top: 12px; }
  .tier-tab small { font-size: 11px; }
  .tier-tab-top { align-items: flex-start; }
  .options { grid-template-columns: 1fr 1fr; }
  .preset-links { width: auto; }
  .empty { min-height: 360px; }
}
@media (max-width: 620px) {
  .topbar { height: auto; min-height: 92px; padding: 12px 16px; gap: 12px; flex-wrap: wrap; align-content: center; }
  .brand-wrap { width: 100%; gap: 12px; }
  .brand { font-size: 20px; }
  .workspace-name { font-size: 11px; padding-left: 12px; }
  .status-pill { margin-left: auto; }
  .header-right { width: 100%; gap: 6px; }
  .wallet-inline { margin-right: auto; gap: 8px; }
  .wallet-balance { font-size: 11px; }
  .wallet-dropdown summary { padding-left: 8px; font-size: 10px; }
  .header-right .ghost-btn, .header-right .text-button { padding: 5px 8px; min-height: 29px; font-size: 11px; }
  .wallet-popover { left: 0; right: auto; max-width: calc(100vw - 32px); }
  .workspace { padding: 18px 14px 24px; }
  .panel-heading { padding: 16px; }
  #job-form { padding: 18px 16px; }
  .tier-tabs { grid-template-columns: 1fr; gap: 8px; }
  .tier-tab { min-height: 70px; padding: 12px 12px 12px 43px; }
  .tier-tab::before { top: 15px; }
  .tier-tab-top strong { font-size: 12px; }
  .tier-tab-top span { font-size: 11px; }
  .tier-tab small { font-size: 11px; }
  textarea { font-size: 16px; min-height: 165px; }
  input, select { font-size: 16px; }
  .preset-links { width: 100%; gap: 0; }
  .tpl-btn { min-height: 30px; padding: 4px 5px; font-size: 11px; }
  .chip { min-height: 32px; padding: 6px 8px; }
  .options { grid-template-columns: 1fr; }
  .seg-pill { min-height: 40px; font-size: 12px; }
  .submit-btn, button[type=submit] { min-height: 46px; }
  .section-heading { gap: 8px; align-items: flex-start; }
  .section-title h2 { font-size: 16px; }
  .section-description { font-size: 10px; }
  .history-tools { gap: 1px; }
  .history-tools button { padding: 6px 8px; font-size: 11px; }
  .job { padding: 14px; border-radius: 6px; }
  .job video { margin-top: 14px; }
  .job time { font-size: 9px; }
  .job-prompt { font-size: 12px; }
  .audio-track-box { padding: 12px; }
  .audio-track-head { font-size: 10px; gap: 8px; align-items: flex-start; }
  .audio-track-head span:last-child { flex-shrink: 0; }
  .storyboard-frames { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modal-backdrop { padding: 10px; }
  .modal-card { padding: 18px 14px; max-height: calc(100dvh - 20px); }
  .modal-head h3 { font-size: 13px; }
  .modal-head > button { flex-shrink: 0; }
  .api-box { padding: 12px; }
  .api-box-head { align-items: flex-start; }
  #dev-code-editor { font-size: 12px !important; }
  #dev-target-file { font-size: 12px; }
  #dev-rollback-btn { flex-shrink: 0; font-size: 10px; padding: 5px 7px; }
  .login-card { padding: 28px; }
  footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
