/* neon.css */
/* YiMoo public front-end theme (desktop + mobile).
   This is the single stylesheet for every public/user-facing flow: it replaces the
   earlier stacked prototype sheets for the public app so no light-theme rule can
   leak through. Admin sheets (admin.css and friends) are intentionally untouched. */

/* ============================================================ 1. tokens + base */

:root {
  color-scheme: dark;
  --bg: #0b0b10;
  --surface: #17171f;
  --surface-2: #1e1e28;
  --surface-3: #23232f;
  --text: #f4f4f7;
  --muted: #a0a3b0;
  --border: #292b36;
  --border-strong: #3a3d4b;
  --violet: #7132ff;
  --violet-2: #8847ff;
  --violet-soft: #241a44;
  --lime: #dfff40;
  --lime-2: #cbf22f;
  --on-lime: #0b0b10;
  --teal: #008b96;
  --teal-2: #007d87;
  --tile-purple: #6222ee;
  --tile-purple-2: #5a1ed8;
  --amber: #ffbb31;
  --amber-2: #f5ab1f;
  --on-amber: #14140f;
  --green: #35d39a;
  --red: #ff6b6b;
  --blue: #6aa8ff;
  --warning: #ffbc35;
  --accent: var(--lime);
  --accent-soft: #232a17;
  --on-accent: var(--on-lime);
  --focus: var(--lime);
  --radius: 16px;
  --sidebar-w: 216px;
  --topbar-h: 60px;
  font: 14px/1.6 "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC",
    "Hiragino Sans GB", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
  object-fit: cover;
}

svg {
  flex-shrink: 0;
  vertical-align: middle;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.35;
  letter-spacing: -1.2px;
}

h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
}

h3 {
  font-size: 16px;
}

p {
  line-height: 1.8;
}

small {
  font-size: 12px;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 6px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  padding: 12px;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #6f7280;
}

textarea {
  resize: vertical;
  min-height: 100px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--lime);
}

input[type="radio"] {
  accent-color: var(--lime);
}

input[type="range"] {
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--lime);
}

select option {
  background: var(--surface-2);
  color: var(--text);
}

label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  min-width: 0;
}

label small {
  font-weight: 400;
  color: var(--muted);
}

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

.skip-link {
  position: fixed;
  top: -80px;
  left: 10px;
  z-index: 200;
  background: var(--lime);
  color: var(--on-lime);
  padding: 12px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 10px;
}

/* The local demo entry is marked by the small 本地演示 chip in the footer and by
   the explanation in the help dialog. No developer banner is injected. */

/* ======================================================== 2. shared components */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  min-height: 42px;
  text-decoration: none;
  transition: background 0.18s, border-color 0.18s, color 0.18s, filter 0.18s;
}

.btn-primary {
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
}

.btn-primary:hover:not(:disabled) {
  background: var(--lime-2);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
}

.btn-secondary:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.btn-subtle {
  color: var(--muted);
  padding: 8px 0;
}

.btn-subtle:hover {
  color: var(--text);
}

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

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
}

.icon-btn:hover {
  border-color: var(--border-strong);
  background: var(--surface-3);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--muted);
  white-space: nowrap;
}

.badge.green {
  color: var(--green);
  background: #10291f;
}

.badge.amber {
  color: var(--amber);
  background: #2c2313;
}

.badge.red {
  color: var(--red);
  background: #2e1717;
}

.badge.blue {
  color: var(--blue);
  background: #16213a;
}

.panel {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  min-width: 0;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.8;
}

.notice svg {
  margin-top: 2px;
  color: var(--muted);
}

.notice.warn,
.notice.warning {
  background: #2a2110;
  border-color: #4a3a15;
  color: #ffd98a;
}

.notice.warning svg {
  color: var(--amber);
}

.notice.danger {
  background: #2c1618;
  border-color: #4d2226;
  color: #ffb3b3;
}

.notice.danger svg {
  color: var(--red);
}

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 30px 0 18px;
}

.section-heading h2,
.section-heading h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.3px;
}

.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.page-heading h1 {
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 8px;
}

.page-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
}

.avatar {
  background: linear-gradient(140deg, #2c2c3c, #1d1d27);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

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

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.empty p {
  margin: 12px 0 0;
}

.error-message {
  color: #ff9b9b;
  font-size: 12px;
  min-height: 18px;
  margin: 10px 0 0;
}

.demo-note {
  font-size: 11px;
  color: var(--muted);
  margin: 26px 0 0;
  line-height: 1.7;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 15px);
  background: var(--surface-3);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 14px 22px;
  z-index: 120;
  box-shadow: 0 12px 40px #0008;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  max-width: min(580px, 90vw);
  font-size: 13px;
  text-align: center;
}

.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.media-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: var(--muted);
  background: linear-gradient(135deg, #1c1c26, #14141c);
}

.task-type-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  color: var(--lime);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.real-video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #000;
  border-radius: 16px;
}

.result-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 40vh;
  overflow: auto;
}

/* ====================================================== 3. workspace shell */

.a-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--bg);
}

.a-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 18px 14px 16px;
  border-right: 1px solid var(--border);
  background: #0d0d13;
  display: flex;
  flex-direction: column;
  z-index: 30;
}

.a-sidebar > .brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 10px;
  align-self: flex-start;
}

.a-sidebar > .brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.a-sidebar > .brand .a-brand-dot {
  display: none;
}

.a-brand-word {
  display: inline-block;
}

.a-nav-label {
  font-size: 10px;
  letter-spacing: 0.14em;
  color: #6c7080;
  margin: 26px 12px 10px;
  text-transform: uppercase;
}

.a-sidebar nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  text-align: left;
  border-radius: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  transition: background 0.16s, color 0.16s;
}

.nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-item.active {
  background: #1d2415;
  color: var(--lime);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px #3d4a1f;
}

.a-sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 6px;
  padding-top: 18px;
}

.a-side-extra {
  display: grid;
  gap: 2px;
  margin-bottom: 10px;
}

.a-side-extra .nav-item {
  font-size: 12px;
  padding: 9px 12px;
}

.a-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  width: 100%;
  min-height: 56px;
}

.a-profile .avatar {
  width: 32px;
  height: 32px;
  flex: none;
}

.a-profile-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.a-profile-copy strong {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a-profile-copy small {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a-body {
  grid-column: 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.a-header {
  position: sticky;
  top: 0;
  z-index: 25;
  height: var(--topbar-h);
  padding: 0 30px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #0b0b10f2;
  backdrop-filter: blur(10px);
}

.a-breadcrumb {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.a-breadcrumb b {
  font-weight: 500;
  color: #d7d9e2;
}

.a-breadcrumb span {
  color: #4b4e5c;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.header-actions .region-btn {
  font-size: 12px;
  color: var(--muted);
}

.a-credits {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.a-credits svg {
  color: var(--lime);
}

.a-credits small {
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
}

.a-credits:hover {
  border-color: var(--border-strong);
}

.a-main {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 22px 32px 72px;
  flex: 1;
  min-width: 0;
}

.a-main:focus {
  outline: none;
}

.a-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  font-size: 11px;
  color: var(--muted);
}

.a-foot button {
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.a-foot button:hover {
  color: var(--text);
}

.a-foot .a-demo-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.a-bottomnav {
  display: none;
}

/* ============================================================== 4. home page */

.a-welcome {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 0 0 16px;
}

.a-welcome h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.6px;
  margin: 0;
  line-height: 1.15;
}

.a-welcome h1 .a-dot {
  color: var(--lime);
}

.a-date {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* --- clone hero --- */
.a-clone {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.35fr);
  gap: 20px;
  align-items: center;
  padding: 16px 22px;
  border-radius: 18px;
  border: 1px solid #7b3dff;
  background: radial-gradient(
      ellipse at 6% 0%,
      #7a35ff 0%,
      transparent 52%
    ),
    linear-gradient(120deg, #681eff 4%, #661eff 96%);
  overflow: hidden;
}

.a-clone-copy {
  min-width: 0;
}

.a-clone-copy h2 {
  margin: 0 0 6px;
  font-size: 45px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #fff;
}

.a-clone-copy h2 span {
  display: block;
}

.a-clone-copy p {
  margin: 0 0 14px;
  font-size: 18px;
  color: #efe7ff;
  letter-spacing: 0.02em;
}

.a-clone-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--on-lime);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 6px 18px #2b127a55;
}

.a-clone-cta:hover {
  background: var(--lime-2);
}

.a-clone-players {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  min-width: 0;
}

.a-player {
  position: relative;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  background: #101018;
  border: 1px solid #ffffff2e;
  aspect-ratio: 16 / 9;
  min-width: 0;
}

.a-player video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #101018;
}

.a-player-label {
  position: absolute;
  left: 10px;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: calc(100% - 20px);
  padding: 5px 10px;
  border-radius: 6px;
  background: #0b0b10c9;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  pointer-events: none;
}

.a-player-label small {
  color: #b9bcc9;
  font-size: 10px;
  font-weight: 500;
}

.a-player-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #0b0b10a6;
  border: 2px solid #ffffff;
  color: #fff;
  backdrop-filter: blur(2px);
  box-shadow: 0 8px 24px #00000066;
  transition: transform 0.16s, background 0.16s;
}

/* Quiet "demo material" marker: the hero players show licensed stock footage,
   never a claimed clone result. */
.a-player-demo {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #ffffff2e;
  background: #0b0b10a8;
  color: #d8d8e4;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  pointer-events: none;
}

.a-player-play:hover {
  transform: translate(-50%, -50%) scale(1.06);
  background: #0b0b10d9;
}

.a-player.is-playing .a-player-play {
  opacity: 0;
  pointer-events: none;
}

.a-player.is-playing:hover .a-player-play,
.a-player.is-playing .a-player-play:focus-visible {
  opacity: 1;
  pointer-events: auto;
}

.a-player-seek {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  width: auto;
  height: 4px;
  margin: 0;
  appearance: none;
  background: #ffffff45;
  border-radius: 999px;
  cursor: pointer;
}

.a-player-seek::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 0;
}

.a-player-seek::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

/* --- tool tiles --- */
.a-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.a-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 198px;
  padding: 24px 26px;
  border-radius: 16px;
  border: 0;
  text-align: left;
  color: #fff;
  overflow: hidden;
  transition: transform 0.18s, box-shadow 0.18s, filter 0.18s;
}

.a-tool:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px #00000059;
}

.a-tool:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.a-tool.teal {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-2) 100%);
}

.a-tool.purple {
  background: linear-gradient(135deg, var(--tile-purple) 0%, var(--tile-purple-2) 100%);
}

.a-tool.amber {
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-2) 100%);
  color: var(--on-amber);
}

/* The icon sits in the top-right corner so it never pushes the title down:
   the whole card stays a single clickable button with the title at top-left. */
.a-tool-top {
  position: absolute;
  top: 22px;
  right: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  max-width: 40%;
}

.a-tool-icon {
  display: grid;
  place-items: center;
  color: #ffffffd9;
}

/* The markup ships 30px inline SVGs; the desktop reference draws the corner
   icons noticeably larger, so scale the existing icon instead of adding art. */
.a-tool-icon svg {
  width: 48px;
  height: 48px;
}

.a-tool.amber .a-tool-icon {
  color: #1d1a0e;
}

.a-tool-diagram {
  display: none;
}

.a-tool h3 {
  font-size: 37px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin: 0 0 6px;
  padding-right: 84px;
}

.a-tool p {
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  color: #ffffffd9;
}

.a-tool.amber p {
  color: #1d1a0ed9;
}

.a-tool-tags {
  display: none;
}

.a-tool-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
  font-size: 20px;
  font-weight: 700;
}

/* Translucent dark circles so each tile tint shows through, instead of the
   previous opaque near-black disc. */
.a-tool-arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #0b0b1059;
  color: #fff;
  flex: none;
}

.a-tool.amber .a-tool-arrow {
  background: #4a320059;
  color: var(--on-amber);
}

/* --- upscale strip --- */
.a-upscale {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 16px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
  color: var(--text);
  min-height: 74px;
}

.a-upscale:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.a-upscale:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
}

.a-upscale-icon {
  display: none;
}

.a-upscale-hd {
  display: grid;
  place-items: center;
  width: 46px;
  height: 38px;
  border: 2px solid var(--lime);
  border-radius: 9px;
  color: var(--lime);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex: none;
}

.a-upscale-copy {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.a-upscale-copy > strong {
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 14px;
}

.a-aux-label {
  display: none;
}

.a-upscale-sep {
  width: 1px;
  height: 18px;
  background: var(--border-strong);
}

.a-upscale-copy > span {
  display: inline;
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.a-quality-art {
  display: none;
}

.a-upscale-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.a-upscale:hover .a-upscale-link {
  background: var(--surface-3);
  border-color: var(--border-strong);
}

/* --- recent projects --- */
.a-recent {
  min-width: 0;
}

/* Home thumbnails are short and wide like the reference so the recent captions
   still fit the first desktop viewport; the library grid keeps its own box. */
.a-recent .project-image {
  aspect-ratio: 2.9 / 1;
}

.a-recent .project-card p {
  display: none;
}

.a-heading-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 400;
}

.a-recent .section-heading {
  margin: 14px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.a-bottom-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 28px;
}

.a-bottom-note button {
  margin-left: auto;
  font-size: 11px;
  color: var(--lime);
  white-space: nowrap;
}

.a-creation-heading {
  margin: 20px 0 14px;
}

.a-creation-heading h2 {
  font-size: 19px;
  font-weight: 600;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-card {
  min-width: 0;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
}

.project-card-action {
  min-width: 0;
  text-align: left;
  padding: 0;
  display: block;
  width: 100%;
}

.project-image {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.project-image img,
.project-image video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.project-card:hover .project-image img,
.project-card:hover .project-image video {
  transform: scale(1.035);
}

.project-image .badge {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #0b0b10c4;
  color: #e9e9f2;
  border: 1px solid #ffffff1f;
}

.project-image .duration {
  position: absolute;
  right: 10px;
  bottom: 10px;
  color: #fff;
  background: #0b0b10b8;
  padding: 4px 7px;
  border-radius: 5px;
  font-size: 11px;
}

.project-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin: 12px 0 4px;
}

.project-card p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}

.project-play {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #0b0b10c4;
  border: 1px solid #ffffff29;
  color: #fff;
  opacity: 1;
  transition: opacity 0.18s, background 0.18s;
}

.project-play svg {
  width: 16px;
  height: 16px;
}

.project-card:hover .project-play {
  background: #0b0b10f2;
}

/* Demo-clip thumbnails in the compact lists keep the still-image box. */
.recent-row img,
.recent-row video {
  width: 57px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
  flex: none;
  background: #101018;
  pointer-events: none;
}

.task-card > img,
.task-card > video {
  width: 72px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: #101018;
  pointer-events: none;
}

.project-image.is-playing .project-play {
  opacity: 0;
}

.recent-list {
  display: grid;
}

.recent-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  width: 100%;
}

.recent-row:last-child {
  border-bottom: 0;
}

.recent-row img {
  width: 57px;
  height: 38px;
  border-radius: 8px;
}

.recent-title {
  flex: 1;
  min-width: 0;
}

.recent-title strong {
  display: block;
  font-size: 13px;
}

.recent-title small {
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

/* ==================================== 5. account menu / auth / wallet pages */

.account-control {
  position: relative;
  flex: none;
  z-index: 45;
}

.account-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  border: 1px solid var(--border);
  padding: 4px 10px 4px 5px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  white-space: nowrap;
}

.account-trigger:hover {
  border-color: var(--border-strong);
}

.account-trigger > svg {
  color: var(--muted);
}

.account-trigger .avatar {
  height: 30px;
  width: 30px;
}

.account-button-label {
  color: var(--text);
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 268px;
  padding: 8px;
  display: grid;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 22px 60px #000000a6;
  text-align: left;
  z-index: 50;
  max-height: calc(100dvh - 100px);
  overflow-y: auto;
}

.account-menu[hidden] {
  display: none !important;
}

.account-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  text-align: left;
  border-radius: 9px;
  font-size: 12px;
  color: var(--text);
}

.account-menu button:hover {
  background: var(--surface-2);
  color: var(--lime);
}

.account-menu-profile {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 5px;
  overflow-wrap: anywhere;
}

.account-menu-profile strong {
  display: block;
  font-size: 14px;
}

.account-menu-profile small {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  margin-top: 7px;
  color: var(--muted);
}

.account-menu-separator {
  height: 1px;
  background: var(--border);
  margin: 5px;
}

.account-wallet {
  margin: 8px 4px;
  padding: 15px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(120deg, #1d2415, #191922);
}

.account-wallet-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--muted);
}

.account-wallet-label .badge {
  margin-left: auto;
  font-size: 9px;
}

.account-wallet > strong {
  display: block;
  margin: 9px 0 5px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.7px;
  font-weight: 700;
  color: var(--lime);
}

.account-wallet > small {
  display: block;
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
}

.account-item-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
}

.creation-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.creation-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  padding: 22px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--text);
}

.creation-choice > svg:first-child {
  color: var(--lime);
}

.creation-choice strong {
  font-size: 17px;
}

.creation-choice small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
  min-height: 42px;
}

.creation-choice > svg:last-child {
  align-self: flex-end;
  color: var(--muted);
}

.creation-choice:hover {
  border-color: var(--lime);
  background: #1d2415;
}

.auxiliary-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding: 17px 0 0;
  width: 100%;
  font-size: 12px;
  color: var(--muted);
}

.auxiliary-tool > svg:last-child {
  margin-left: auto;
}

.auxiliary-tool:hover {
  color: var(--lime);
}

.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 5px;
  border-radius: 11px;
  background: var(--surface-2);
  margin-bottom: 22px;
}

.auth-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  color: var(--muted);
}

.auth-tabs button.active {
  background: var(--surface-3);
  color: var(--lime);
  font-weight: 700;
}

.wallet {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 22px;
  margin-bottom: 26px;
}

.balance-card {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #7b3dff;
  background: linear-gradient(120deg, var(--violet) 0%, var(--violet-2) 100%);
  color: #fff;
}

.balance-card:after {
  content: "";
  position: absolute;
  right: -40px;
  top: -70px;
  width: 260px;
  height: 260px;
  border: 45px solid #ffffff14;
  border-radius: 50%;
  pointer-events: none;
}

.balance-card > span {
  font-size: 13px;
  color: #f0e9ff;
}

.balance-number {
  font-size: 54px;
  letter-spacing: -2px;
  margin: 12px 0;
  font-weight: 700;
  color: #fff;
}

.balance-number small {
  font-size: 14px;
  font-weight: 500;
  color: #f0e9ff;
}

.balance-card .btn {
  background: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
}

.wallet-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.wallet-stats strong {
  font-size: 30px;
  display: block;
  margin-top: 12px;
}

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

.ledger {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.ledger th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
  background: var(--surface-2);
  padding: 13px;
}

.ledger td {
  padding: 16px 13px;
  border-bottom: 1px solid var(--border);
}

.ledger tbody tr:hover td {
  background: #1b1b24;
}

.amount-positive {
  color: var(--green);
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pack {
  border: 1px solid var(--border);
  padding: 24px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  text-align: center;
  color: var(--text);
}

.pack strong {
  font-size: 27px;
  display: block;
  margin-bottom: 6px;
}

.pack small {
  display: block;
  color: var(--muted);
}

.pack:hover {
  border-color: var(--lime);
  background: #1d2415;
}

.account-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.account-profile {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.account-profile .avatar {
  width: 56px;
  height: 56px;
  font-size: 22px;
}

.account-profile h3 {
  margin-bottom: 5px;
}

.form-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 25px;
}

.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
}

.check-field {
  align-items: flex-start;
}

.check-field span {
  display: grid;
  gap: 3px;
}

.check-field strong {
  font-size: 13px;
  font-weight: 600;
}

.check-field small {
  font-weight: 400;
  line-height: 1.6;
}

.worker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.worker-tile {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  min-width: 0;
  overflow-wrap: anywhere;
}

.worker-tile h3 {
  font-size: 14px;
  margin-top: 20px;
}

.worker-tile p {
  font-size: 12px;
  color: var(--muted);
}

.worker-tile .badge {
  white-space: normal;
  line-height: 1.6;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.reference-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.reference-card img {
  width: 100%;
  aspect-ratio: 1.44;
  object-fit: cover;
  object-position: top;
}

.reference-copy {
  padding: 20px;
}

.reference-copy p {
  font-size: 12px;
  color: var(--muted);
}

.reference-copy h2 {
  font-size: 20px;
}

/* =================================================== 6. tasks + library pages */

.toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-field {
  max-width: 280px;
}

.search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 280px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 400;
}

.search-input input {
  border: 0;
  background: none;
  padding: 11px 0;
  min-height: 42px;
}

.tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.tab {
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}

.tab:hover {
  color: var(--text);
  background: var(--surface);
}

.tab.active {
  background: #1d2415;
  color: var(--lime);
  font-weight: 700;
  border-color: #3d4a1f;
}

.task-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  min-width: 0;
}

.task-card > img {
  width: 72px;
  height: 54px;
  border-radius: 9px;
}

.task-card h3 {
  font-size: 14px;
  margin: 0 0 7px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 9px;
}

.task-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.task-card progress {
  width: 180px;
  max-width: 100%;
  height: 5px;
  accent-color: var(--lime);
}

.delivery-stage {
  font-size: 11px;
  color: var(--muted);
  margin: 8px 0 0;
}

.detail-events,
.detail-artifacts {
  margin-top: 22px;
  padding-top: 6px;
}

.detail-events h4,
.detail-artifacts h4 {
  font-size: 14px;
}

.artifact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.modal-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted);
}

/* ================================================ 7. wizard / creation pages */

.creation-page {
  max-width: 980px;
  margin: 0 auto;
}

.creation-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 0;
  margin-bottom: 22px;
}

.creation-back > svg {
  transform: rotate(180deg);
}

.creation-back:hover {
  color: var(--lime);
}

.creation-page-heading {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.creation-page-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-2);
  color: var(--lime);
}

.creation-page-heading h1 {
  font-size: 29px;
  margin: 0 0 7px;
  font-weight: 700;
  letter-spacing: -0.6px;
}

.creation-page-heading p {
  margin: 0;
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
}

.creation-workspace {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.creation-page-body {
  padding: 30px 34px 12px;
}

.creation-page .stepper {
  padding-bottom: 24px;
  margin-bottom: 26px;
  border-bottom: 1px solid var(--border);
  gap: 28px;
}

.creation-page .stack {
  gap: 22px;
}

.creation-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 34px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.creation-page-footer > .muted {
  font-size: 11px;
}

.creation-page .error-message {
  margin-top: 16px;
}

.stepper {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}

.step {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
}

.step span {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.step.active {
  color: var(--lime);
}

.step.active span {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--on-lime);
  font-weight: 700;
}

.upload-zone {
  display: grid;
  place-items: center;
  text-align: center;
  border: 1.5px dashed var(--border);
  border-radius: 14px;
  padding: 26px;
  background: var(--surface-2);
  gap: 10px;
}

.upload-zone input {
  max-width: 300px;
  font-size: 12px;
  background: var(--surface);
  padding: 8px;
}

.video-source,
.image-source {
  display: grid;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  background: var(--surface-2);
}

.source-platforms {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.source-platforms > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

.source-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  min-height: 24px;
  font-size: 11px;
}

.source-status small {
  font-size: 11px;
  line-height: 1.7;
}

.source-error {
  color: #ff9b9b;
}

.source-disclaimer {
  font-size: 10px;
  color: var(--muted);
  margin: 0;
  line-height: 1.8;
}

.sample-source {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  width: 100%;
  color: var(--text);
}

.sample-source img {
  width: 65px;
  height: 44px;
  border-radius: 8px;
}

.sample-source.selected {
  border-color: var(--lime);
  background: #1d2415;
}

.sample-source strong {
  display: block;
  font-size: 13px;
}

.sample-source small {
  color: var(--muted);
}

.generation-modes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.mode-choice {
  padding: 15px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.6;
  background: var(--surface-2);
  color: var(--text);
}

.mode-choice.selected {
  border-color: var(--lime);
  background: #1d2415;
  color: var(--lime);
  font-weight: 700;
}

.direction-field {
  padding: 0;
  border: 0;
  margin: 0;
  min-width: 0;
}

.direction-field legend {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
}

.direction-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.direction-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  cursor: pointer;
}

.direction-option input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--lime);
  flex: none;
}

.direction-option.selected {
  border-color: var(--lime);
  background: #1d2415;
}

.direction-option strong {
  font-size: 13px;
}

.direction-option small {
  display: block;
  margin-top: 7px;
  line-height: 1.7;
  font-size: 11px;
  color: var(--muted);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.summary-row span {
  color: var(--muted);
  flex-shrink: 0;
  max-width: 48%;
}

.summary-row strong {
  text-align: right;
  overflow-wrap: anywhere;
  min-width: 0;
}

.summary-row.total strong {
  font-size: 24px;
  color: var(--lime);
}

.preview-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #101018;
}

.preview-frame img,
.preview-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-frame > span {
  position: absolute;
  bottom: 16px;
  left: 16px;
  background: #0b0b10c9;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
}

.preview-frame .comparison-before {
  position: absolute;
  inset: 0;
  filter: blur(3px) saturate(0.6);
  clip-path: inset(0 50% 0 0);
}

.preview-caption {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  color: var(--muted);
  font-size: 12px;
}

.workflow-steps {
  display: flex;
  gap: 8px;
  margin: 22px 0;
}

.workflow-stage {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  padding: 12px 4px;
  border-top: 3px solid var(--border);
}

.workflow-stage.done {
  border-color: var(--lime);
  color: var(--lime);
}

.advanced-options {
  grid-column: 1 / -1;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
}

.advanced-options summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  user-select: none;
}

.advanced-options summary::-webkit-details-marker {
  display: none;
}

.advanced-options summary small {
  color: var(--muted);
  font-weight: 400;
}

.advanced-options summary::after {
  content: "";
  margin-left: auto;
  border: solid var(--muted);
  border-width: 0 2px 2px 0;
  display: inline-block;
  padding: 4px;
  transform: rotate(45deg);
  transition: transform 0.18s;
}

.advanced-options[open] summary::after {
  transform: rotate(225deg);
}

.advanced-options[open] summary {
  border-bottom: 1px solid var(--border);
}

.advanced-grid {
  display: grid;
  gap: 14px;
  padding: 16px;
}

/* --- H3 generation controls (live module markup) --- */
.h3-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.h3-mode-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  overflow: hidden;
}

.h3-mode-track::before {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 29px;
  height: 1px;
  background: var(--border);
}

.h3-mode {
  position: relative;
  z-index: 1;
  min-height: 94px;
  padding: 16px 10px 13px;
  border-right: 1px solid var(--border);
  text-align: center;
  color: var(--text);
}

.h3-mode:last-child {
  border-right: 0;
}

.h3-mode i {
  width: 23px;
  height: 23px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border: 4px solid var(--surface-2);
  border-radius: 50%;
  background: #565a68;
  box-shadow: 0 0 0 1px var(--border-strong);
}

.h3-mode strong,
.h3-mode small {
  display: block;
}

.h3-mode strong {
  font-size: 12px;
}

.h3-mode small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.h3-mode.selected {
  background: #1d2415;
  color: var(--lime);
}

.h3-mode.selected i {
  background: var(--lime);
  border-color: #1d2415;
  box-shadow: 0 0 0 1px var(--lime);
}

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

.h3-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}

.h3-field small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}

.h3-field-error {
  display: block;
  color: #ff9b9b;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.h3-field-error[hidden] {
  display: none;
}

.h3-material {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
}

.h3-material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.h3-material-head strong {
  font-size: 13px;
}

.h3-material-head span {
  color: var(--muted);
  font-size: 11px;
}

.h3-frame-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 17px;
}

.h3-frame-choice button,
.h3-resolution button {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-size: 12px;
  color: var(--text);
}

.h3-frame-choice button.selected,
.h3-resolution button.selected {
  border-color: var(--lime);
  background: #1d2415;
  color: var(--lime);
  font-weight: 700;
}

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

.h3-image-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  gap: 9px;
  align-items: center;
}

.h3-image-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.h3-remove {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}

.h3-remove:disabled {
  visibility: hidden;
}

.h3-add-material {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--lime);
  font-size: 11px;
  font-weight: 700;
}

.h3-input-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}

.h3-settings {
  display: grid;
  gap: 24px;
}

.h3-setting-block {
  min-width: 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.h3-setting-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.h3-setting-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}

.h3-setting-block > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.h3-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 18px;
  align-items: center;
}

.h3-duration-number {
  position: relative;
}

.h3-duration-number input {
  padding-right: 34px;
}

.h3-duration-number span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}

.h3-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

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

.h3-resolution button {
  min-height: 58px;
  text-align: left;
}

.h3-resolution strong,
.h3-resolution small {
  display: block;
}

.h3-resolution small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.h3-inline-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #2a2110;
  color: #ffd98a;
  font-size: 11px;
  line-height: 1.65;
}

.h3-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}

.h3-review-list {
  min-width: 0;
  border-top: 1px solid var(--border);
}

.h3-review-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.h3-review-row span {
  color: var(--muted);
}

.h3-review-row strong {
  max-width: 62%;
  text-align: right;
  overflow-wrap: anywhere;
}

.h3-review-aside {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.h3-review-aside strong {
  display: block;
  margin-bottom: 8px;
  color: var(--lime);
  font-size: 13px;
}

.h3-review-aside p {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.h3-review-aside p:last-child {
  margin-bottom: 0;
}

/* clone-specific form blocks */
.clone-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid #4b2fa8;
  border-radius: 12px;
  background: #1c1440;
  color: #e5dcff;
  font-size: 12px;
  line-height: 1.8;
}

.clone-note svg {
  color: var(--violet-2);
  margin-top: 2px;
}

.clone-steps {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0 0 0 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.9;
}

/* ============================================================ 8. dialogs */

dialog {
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
  width: min(820px, calc(100vw - 32px));
  max-width: calc(100vw - 24px);
  max-height: min(88dvh, 920px);
  overflow: auto;
  box-shadow: 0 30px 100px #000000b8;
}

dialog::backdrop {
  background: #05050ac9;
  backdrop-filter: blur(6px);
}

.dialog-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.dialog-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
}

.dialog-body {
  padding: 24px 26px;
}

.dialog-footer {
  position: sticky;
  bottom: 0;
  padding: 18px 26px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--surface-2);
}

/* =========================================================== 9. motion */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* ====================================================== 10. tablet widths */

@media (max-width: 1240px) {
  .a-clone {
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.2fr);
  }
  .a-clone-copy h2 {
    font-size: 34px;
  }
  .a-welcome h1 {
    font-size: 33px;
  }
  .a-tool h3 {
    font-size: 24px;
  }
  .a-tool-icon svg {
    width: 36px;
    height: 36px;
  }
  .a-tool p {
    font-size: 14px;
  }
  .a-main {
    padding: 24px 26px 72px;
  }
  .a-header {
    padding: 0 26px;
  }
}

@media (max-width: 1080px) {
  .a-tools {
    gap: 14px;
  }
  .a-tool {
    padding: 22px;
    min-height: 190px;
  }
  .a-tool h3 {
    font-size: 22px;
  }
  .a-tool-icon svg {
    width: 30px;
    height: 30px;
  }
  .worker-grid {
    grid-template-columns: 1fr 1fr;
  }
  .references-grid {
    grid-template-columns: 1fr;
  }
  .reference-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .wallet,
  .account-grid {
    grid-template-columns: 1fr;
  }
  .project-grid {
    gap: 14px;
  }
  .h3-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}

/* ==================== 11. compact shell (<= 980px: phones + tablets) */

/* The shell collapses to the single-column layout all the way to 980px so a
   768px-wide tablet gets the full content width (no 216px sidebar eating into
   it). The stacked home geometry further down is re-tuned for 721-980px in
   the dedicated block after this one; <=720px keeps its previous appearance. */

@media (max-width: 980px) {
  .a-layout {
    display: block;
    min-height: 100dvh;
  }

  .a-sidebar {
    display: none;
  }

  .a-body {
    display: block;
    min-height: 0;
  }

  .a-header {
    position: sticky;
    top: 0;
    height: auto;
    min-height: 56px;
    padding: 8px 12px;
    gap: 10px;
    flex-wrap: nowrap;
  }

  .a-header .brand {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    flex: none;
  }

  .a-header .brand img {
    width: 24px;
    height: 24px;
    object-fit: contain;
  }

  .a-breadcrumb {
    display: none;
  }

  .a-mobile-brand {
    display: inline-flex !important;
  }

  .a-header-right {
    margin-left: auto;
    gap: 8px;
  }

  .a-credits {
    min-height: 38px;
    padding: 0 10px;
    font-size: 12px;
  }

  .a-credits small {
    display: none;
  }

  .header-actions {
    gap: 6px;
  }

  .header-actions .btn {
    padding: 8px;
    min-height: 38px;
    min-width: 38px;
  }

  .header-actions .btn span,
  .header-actions .btn {
    font-size: 12px;
  }

  .account-trigger {
    min-height: 38px;
    padding-right: 6px;
  }

  .account-trigger .avatar {
    width: 28px;
    height: 28px;
  }

  .account-button-label {
    display: none;
  }

  .account-menu {
    width: min(280px, calc(100vw - 24px));
  }

  .a-main {
    max-width: none;
    padding: 6px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .a-welcome {
    margin: 0 0 6px;
    align-items: flex-start;
  }

  .a-welcome h1 {
    font-size: 26px;
    letter-spacing: -1px;
  }

  .a-date {
    display: none;
  }

  .a-clone {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 8px 12px;
    border-radius: 14px;
  }

  .a-clone-copy h2 {
    font-size: 26px;
    line-height: 1.15;
    letter-spacing: -0.6px;
    margin: 0 0 4px;
  }

  .a-clone-copy p {
    font-size: 12px;
    line-height: 1.35;
    margin: 0 0 8px;
  }

  .a-clone-cta {
    width: auto;
    align-self: flex-start;
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 16px;
    gap: 8px;
    font-size: 14px;
  }

  .a-clone-players {
    gap: 8px;
  }

  .a-player {
    aspect-ratio: 3 / 2;
    border-radius: 10px;
  }

  .a-player-play {
    width: 42px;
    height: 42px;
  }

  .a-player-play svg {
    width: 18px;
    height: 18px;
  }

  .a-player-demo {
    top: 6px;
    left: 6px;
    padding: 2px 6px;
    font-size: 9px;
    background: #0b0b1073;
    border-color: #ffffff24;
  }

  .a-player-label {
    left: 6px;
    bottom: 16px;
    gap: 1px;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 9px;
  }

  .a-player-label small {
    font-size: 8px;
  }

  .a-player-seek {
    left: 6px;
    right: 6px;
    bottom: 6px;
    height: 4px;
  }

  .a-creation-heading {
    margin: 12px 0 6px;
  }

  .a-creation-heading h2,
  .a-recent .section-heading h2 {
    font-size: 18px;
  }

  .a-tools {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  /* Compact stacked tiles: each one lands in a ~110px row, with the footer
     kept inside the card padding instead of an inherited 20px gap. */
  .a-tool {
    min-height: 108px;
    padding: 10px 16px;
    border-radius: 14px;
  }

  .a-tool h3 {
    font-size: 26px;
    line-height: 1.1;
    margin: 0 0 2px;
    padding-right: 50px;
  }

  .a-tool p {
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
  }

  .a-tool-top {
    position: absolute;
    right: 16px;
    top: 12px;
    max-width: none;
  }

  .a-tool-icon svg {
    width: 32px;
    height: 32px;
  }

  .a-tool-footer {
    gap: 8px;
    padding-top: 0;
    margin-top: 2px;
    font-size: 14px;
    line-height: 1.2;
  }

  .a-tool-arrow {
    width: 32px;
    height: 32px;
  }

  /* One compact horizontal strip: HD badge, a two-line copy column and a small
     trailing action. Nothing stretches to the full width. */
  .a-upscale {
    flex-wrap: nowrap;
    gap: 10px;
    margin-top: 8px;
    padding: 10px 14px;
    min-height: 58px;
  }

  .a-upscale-hd {
    width: 40px;
    height: 30px;
    font-size: 13px;
    border-radius: 8px;
  }

  .a-upscale-copy {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 2px;
    min-width: 0;
  }

  .a-upscale-copy > strong {
    font-size: 15px;
    line-height: 1.2;
    gap: 0;
  }

  /* Must out-specify the base `.a-upscale-copy > span { display: inline }`
     rule, otherwise the empty separator keeps an 18px phantom row. */
  .a-upscale-copy > .a-upscale-sep {
    display: none;
  }

  .a-upscale-copy > span {
    max-width: 100%;
    font-size: 10.5px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .a-upscale-link {
    flex: none;
    width: auto;
    min-height: 32px;
    padding: 0 10px;
    gap: 5px;
    font-size: 12px;
  }

  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .project-grid .project-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  /* Home only: a two-card viewport that scrolls sideways, so the third recent
     project stays reachable instead of spanning the full width. */
  .a-recent .project-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc(50% - 6px);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .a-recent .project-grid .project-card {
    grid-column: auto;
    scroll-snap-align: start;
  }

  /* Home-only: out-specify the generic `.project-grid .project-card
     :last-child:nth-child(odd)` full-width rule (0,4) so the three recent
     cards keep source order city -> coast -> music inside the side-scrolling
     strip instead of the third card spanning the row. */
  .a-recent .project-grid .project-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .a-recent .project-image {
    aspect-ratio: 2.1 / 1;
  }

  .a-recent .section-heading {
    margin: 12px 0 6px;
    padding-top: 8px;
  }

  .a-recent .section-heading .btn-subtle {
    min-height: 0;
    padding: 4px 0;
  }

  .page-heading {
    flex-direction: column;
    gap: 14px;
  }

  .page-heading h1 {
    font-size: 25px;
  }

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

  .task-card {
    grid-template-columns: 52px minmax(0, 1fr);
    padding: 15px;
    gap: 12px;
  }

  .task-card > img {
    width: 52px;
    height: 44px;
  }

  .task-actions {
    grid-column: 2;
    flex-wrap: wrap;
  }

  .task-actions .btn {
    min-height: 44px;
  }

  .wallet-stats .panel {
    padding: 18px;
  }

  .reference-card {
    display: block;
  }

  .worker-tile {
    padding: 15px;
  }

  .panel {
    padding: 18px;
  }

  .toolbar .search-field,
  .toolbar .search-input {
    max-width: none;
    width: 100%;
  }

  .search-input input {
    font-size: 16px;
  }

  .toolbar {
    align-items: stretch;
  }

  .tabs {
    gap: 6px;
  }

  .tab {
    padding: 10px 14px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .recent-row .badge {
    max-width: 110px;
    white-space: normal;
  }

  .balance-number {
    font-size: 44px;
  }

  .creation-choices {
    grid-template-columns: 1fr;
  }

  .creation-choice {
    display: grid;
    grid-template-columns: 28px 1fr 20px;
    gap: 9px 13px;
    padding: 17px;
  }

  .creation-choice > svg:first-child {
    grid-row: 1 / 3;
  }

  .creation-choice strong {
    font-size: 15px;
  }

  .creation-choice small {
    grid-column: 2;
    grid-row: 2;
    min-height: 0;
  }

  .creation-choice > svg:last-child {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
  }

  .video-source,
  .image-source,
  .h3-material {
    padding: 15px;
  }

  .generation-modes {
    gap: 6px;
  }

  .mode-choice {
    flex-direction: column;
    font-size: 11px;
    padding: 12px 7px;
    min-height: 56px;
  }

  .direction-options {
    grid-template-columns: 1fr;
  }

  .direction-option {
    padding: 13px;
  }

  .source-platforms {
    gap: 6px;
  }

  .source-platforms > span {
    padding: 4px 8px;
    font-size: 10px;
  }

  .source-status .badge {
    white-space: normal;
  }

  .auxiliary-tool {
    font-size: 11px;
  }

  .creation-page-body {
    padding: 20px 16px 8px;
  }

  .creation-page .stepper {
    gap: 10px;
    justify-content: space-between;
    padding-bottom: 18px;
    margin-bottom: 20px;
  }

  .creation-page .step {
    gap: 5px;
    font-size: 11px;
  }

  .creation-page .step span {
    width: 23px;
    height: 23px;
  }

  .creation-page-footer {
    padding: 16px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .creation-page-footer > .muted {
    width: 100%;
    order: 3;
    text-align: center;
  }

  .creation-page-footer .btn {
    flex: 1;
    min-height: 46px;
  }

  .creation-page-heading {
    gap: 13px;
    margin-bottom: 20px;
  }

  .creation-page-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .creation-page-heading h1 {
    font-size: 24px;
  }

  .creation-page-heading p {
    font-size: 12px;
  }

  .creation-workspace {
    border-radius: 16px;
  }

  .h3-mode-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .h3-mode-track::before {
    display: none;
  }

  .h3-mode {
    border-bottom: 1px solid var(--border);
    min-height: 84px;
  }

  .h3-mode:nth-child(2n) {
    border-right: 0;
  }

  .h3-mode:nth-child(n + 3) {
    border-bottom: 0;
  }

  .h3-field-grid,
  .h3-frame-grid,
  .h3-resolution {
    grid-template-columns: minmax(0, 1fr);
  }

  .h3-duration-control {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }

  .h3-image-row {
    grid-template-columns: 26px minmax(0, 1fr) 34px;
    gap: 7px;
  }

  .h3-review-row {
    display: grid;
    gap: 6px;
  }

  .h3-review-row strong {
    max-width: none;
    text-align: left;
  }

  .task-type-icon {
    width: 48px;
    height: 48px;
  }

  .task-meta {
    overflow-wrap: anywhere;
  }

  .real-video {
    max-height: 50vh;
  }

  .option-grid {
    gap: 8px;
  }

  .pack {
    padding: 18px 7px;
  }

  .pack strong {
    font-size: 22px;
  }

  .stepper {
    gap: 9px;
  }

  .step {
    font-size: 11px;
    gap: 5px;
  }

  .step span {
    width: 20px;
    height: 20px;
  }

  dialog {
    width: calc(100vw - 16px);
    max-width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 16px;
  }

  .dialog-header,
  .dialog-body {
    padding: 16px;
  }

  .dialog-footer {
    padding: 14px 16px;
    flex-wrap: wrap;
  }

  .dialog-footer .btn {
    flex: 1;
    min-height: 44px;
  }

  .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .btn {
    min-height: 44px;
  }

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

  .a-foot {
    padding-bottom: 4px;
  }

  .toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 24px);
  }

  /* bottom navigation */
  .a-bottomnav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 2px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: #0d0d13f7;
    backdrop-filter: blur(12px);
  }

  .a-bottomnav button {
    display: grid;
    justify-items: center;
    gap: 3px;
    min-height: 52px;
    padding: 6px 4px;
    border-radius: 12px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
  }

  .a-bottomnav button[aria-current="page"] {
    color: var(--lime);
    font-weight: 700;
  }

  .a-bottomnav button:active {
    background: var(--surface);
  }
}

/* ============================== 11b. tablet home (721-980px) */

/* The compact shell above already gives this range a full-width header with
   no sidebar, a hidden breadcrumb, the mobile brand and the 3-control bottom
   nav. Only the home hero and the tool tiles need tablet geometry, because
   the <=720px stacked/one-column versions look wrong on a 768px screen.
   Declared after the <=980px block so these win at equal specificity. */

@media (min-width: 721px) and (max-width: 980px) {
  /* Hero keeps two columns: the copy column shrinks, the two 16:9 players keep
     enough width for their centre play buttons to stay fully visible. */
  .a-clone {
    grid-template-columns: minmax(200px, 0.75fr) minmax(0, 1.3fr);
    gap: 18px;
    align-items: center;
    padding: 16px;
  }

  .a-clone-copy h2 {
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.8px;
    margin: 0 0 6px;
  }

  .a-clone-copy p {
    font-size: 13px;
    line-height: 1.4;
    margin: 0 0 10px;
  }

  .a-clone-cta {
    width: auto;
    align-self: flex-start;
    justify-content: flex-start;
    min-height: 40px;
    padding: 0 16px;
    gap: 8px;
    font-size: 14px;
  }

  .a-clone-players {
    gap: 10px;
  }

  .a-player {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
  }

  .a-player-play {
    width: 44px;
    height: 44px;
  }

  .a-player-play svg {
    width: 18px;
    height: 18px;
  }

  .a-player-demo {
    top: 8px;
    left: 8px;
    padding: 2px 6px;
    font-size: 9px;
  }

  .a-player-label {
    left: 8px;
    bottom: 18px;
    gap: 1px;
    padding: 3px 7px;
    font-size: 10px;
  }

  .a-player-label small {
    font-size: 9px;
  }

  .a-player-seek {
    left: 8px;
    right: 8px;
    bottom: 6px;
    height: 4px;
  }

  /* Three tiles per row again: at 768px this leaves each card ~238px, enough
     for a 4-character Chinese title on one line once the 40px icon gutter is
     reserved. */
  .a-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .a-tool {
    min-height: 170px;
    padding: 16px;
    border-radius: 14px;
  }

  .a-tool h3 {
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.5px;
    margin: 0 0 4px;
    padding-right: 40px;
  }

  .a-tool p {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
  }

  .a-tool-top {
    position: absolute;
    right: 14px;
    top: 14px;
    max-width: none;
  }

  .a-tool-icon svg {
    width: 32px;
    height: 32px;
  }

  .a-tool-footer {
    gap: 8px;
    padding-top: 12px;
    margin-top: auto;
    font-size: 14px;
    line-height: 1.2;
  }

  .a-tool-arrow {
    width: 34px;
    height: 34px;
  }
}

/* ============================================ 12. narrow phones (<= 380px) */

/* At 320-380px the ≤980px header still overflows horizontally (credits +
   language + account). Tighten spacing and type only: every control stays
   visible, keeps a >=40px touch target and keeps its label/aria wiring.
   390px and wider keeps the previous appearance untouched. */

@media (max-width: 380px) {
  .a-header {
    padding: 0 10px;
    gap: 6px;
  }

  .a-header .brand {
    gap: 4px;
    font-size: 18px;
  }

  .a-header .brand img {
    width: 22px;
    height: 22px;
  }

  .a-header-right {
    gap: 4px;
  }

  .a-credits {
    gap: 4px;
    min-height: 40px;
    padding: 0 6px;
    font-size: 12px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .btn {
    gap: 4px;
    min-width: 0;
    min-height: 40px;
    padding: 0 4px;
    font-size: 10px;
  }

  .header-actions .btn span {
    font-size: 10px;
  }

  .header-actions .btn svg {
    display: none;
  }

  .account-trigger {
    width: 36px;
    min-width: 34px;
    min-height: 40px;
    gap: 0;
    padding: 2px;
    justify-content: center;
  }

  .account-trigger .avatar {
    width: 24px;
    height: 24px;
  }

  .account-trigger > svg {
    display: none;
  }
}

@media (min-width: 981px) {
  .a-mobile-brand {
    display: none;
  }
}


/* pagination.css */
/* Scoped pagination chrome shared by the selected public and admin designs. */
.ym-pagination { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px 20px; width:100%; min-width:0; margin:14px 0 0; padding:14px 16px; border:1px solid var(--border); border-radius:10px; background:var(--surface); color:var(--text); font:inherit; box-sizing:border-box; }
.ym-pagination * { box-sizing:border-box; }
.ym-pagination .ym-page-summary { margin:0; color:var(--muted); font-size:12px; line-height:1.6; }
.ym-pagination .ym-page-options { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:10px 14px; min-width:0; }
.ym-pagination .ym-page-size { display:flex; align-items:center; gap:6px; margin:0; color:var(--muted); font-size:12px; font-weight:400; white-space:nowrap; }
.ym-pagination select[data-page-size] { width:auto; min-width:58px; min-height:36px; margin:0; padding:6px 8px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text); font:inherit; }
.ym-pagination .ym-page-buttons { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:5px; }
.ym-pagination button { display:inline-flex; align-items:center; justify-content:center; min-width:34px; min-height:36px; margin:0; padding:6px 10px; border:1px solid var(--border); border-radius:7px; background:var(--surface); color:var(--text); font:inherit; font-size:12px; line-height:1.4; white-space:nowrap; cursor:pointer; }
.ym-pagination button[aria-current="page"] { border-color:var(--accent); background:var(--accent-soft); color:var(--accent); font-weight:700; }
.ym-pagination button:hover:not(:disabled) { border-color:var(--accent); }
.ym-pagination button:disabled { opacity:.45; cursor:not-allowed; }
.ym-pagination :where(button,select):focus-visible { outline:3px solid var(--focus,var(--accent)); outline-offset:3px; }
.ym-pagination .ym-page-gap, .ym-pagination .ym-page-position { color:var(--muted); font-size:12px; white-space:nowrap; }
.ym-history-label { display:inline-block; margin:3px 4px; padding:2px 6px; border:1px solid var(--border); border-radius:5px; color:var(--muted); background:var(--surface-2); font-size:11px; font-weight:400; }
.ym-history-note { margin:12px 0; color:var(--muted); font-size:12px; line-height:1.7; }
@media (max-width:620px) {
 .ym-pagination { padding:12px; gap:10px; }
 .ym-pagination .ym-page-options { width:100%; justify-content:flex-start; }
 .ym-pagination .ym-page-buttons { justify-content:flex-start; gap:4px; }
 .ym-pagination button { min-width:34px; min-height:44px; padding-inline:8px; }
 .ym-pagination select[data-page-size] { min-height:44px; font-size:16px; }
}
@media (forced-colors:active) { .ym-pagination button[aria-current="page"] { outline:2px solid Highlight; } }

/* live.css */
/* Presentation for unavailable media and actual provider results. */
.media-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 100%;
  min-height: 140px;
  color: var(--muted, #718078);
  background: linear-gradient(135deg, #eef3ef, #e4ece9);
}
.task-type-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: 16px;
  color: #127c65;
  background: #edf5f0;
}
.real-video {
  display: block;
  width: 100%;
  max-height: 62vh;
  background: #17201c;
  border-radius: 16px;
}
.result-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 40vh;
  overflow: auto;
}
.summary-row strong {
  overflow-wrap: anywhere;
  min-width: 0;
}
.pack small {
  display: block;
}
/* Video generation wizard (MiniMax H3). Only the interaction inside the existing
   creation workspace is styled here; the standalone design preview shell,
   scenario controls and demo affordances are deliberately not part of the live UI. */
.h3-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.h3-mode-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.h3-mode-track::before {
  content: "";
  position: absolute;
  left: 12.5%;
  right: 12.5%;
  top: 29px;
  height: 1px;
  background: var(--border);
}
.h3-mode {
  position: relative;
  z-index: 1;
  min-height: 94px;
  padding: 16px 10px 13px;
  border-right: 1px solid var(--border);
  text-align: center;
}
.h3-mode:last-child {
  border-right: 0;
}
.h3-mode i {
  width: 23px;
  height: 23px;
  margin: 0 auto 9px;
  display: grid;
  place-items: center;
  border: 4px solid var(--surface-2);
  border-radius: 50%;
  background: #b7c4be;
  box-shadow: 0 0 0 1px #c8d2cd;
}
.h3-mode strong,
.h3-mode small {
  display: block;
}
.h3-mode strong {
  font-size: 12px;
}
.h3-mode small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.h3-mode.selected {
  background: var(--accent-soft);
  color: var(--accent);
}
.h3-mode.selected i {
  background: var(--accent);
  border-color: var(--accent-soft);
  box-shadow: 0 0 0 1px var(--accent);
}
.h3-field-grid,
.h3-frame-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.h3-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}
.h3-field small {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.65;
}
.h3-field-error {
  display: block;
  color: #b23f39;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.h3-field-error[hidden] {
  display: none;
}
.h3-material {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-2);
}
.h3-material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.h3-material-head strong {
  font-size: 13px;
}
.h3-material-head span {
  color: var(--muted);
  font-size: 11px;
}
.h3-material .h3-field small {
  color: var(--muted);
}
.h3-frame-choice {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 17px;
}
.h3-frame-choice button,
.h3-resolution button {
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-size: 12px;
}
.h3-frame-choice button.selected,
.h3-resolution button.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
}
.h3-image-list {
  display: grid;
  gap: 10px;
}
.h3-image-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 36px;
  gap: 9px;
  align-items: center;
}
.h3-image-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #e8efeb;
  color: #5d7369;
  font-size: 11px;
  font-weight: 700;
}
.h3-remove {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: #7d8a84;
  font-size: 18px;
  line-height: 1;
}
.h3-remove:disabled {
  visibility: hidden;
}
.h3-add-material {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #bdd1c7;
  border-radius: 8px;
  background: var(--surface);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}
.h3-input-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 10px;
}
.h3-settings {
  display: grid;
  gap: 24px;
}
.h3-setting-block {
  min-width: 0;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}
.h3-setting-block:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}
.h3-setting-block h3 {
  margin: 0 0 6px;
  font-size: 14px;
}
.h3-setting-block > p {
  margin: 0 0 15px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.h3-duration-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 18px;
  align-items: center;
}
.h3-duration-number {
  position: relative;
}
.h3-duration-number input {
  padding-right: 34px;
}
.h3-duration-number span {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 11px;
  pointer-events: none;
}
.h3-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}
.h3-resolution {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.h3-resolution button {
  min-height: 58px;
  text-align: left;
}
.h3-resolution strong,
.h3-resolution small {
  display: block;
}
.h3-resolution small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}
.h3-inline-note {
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: 8px;
  background: #fff4df;
  color: #9a5a08;
  font-size: 11px;
  line-height: 1.65;
}
.h3-review {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 28px;
  align-items: start;
}
.h3-review-list {
  min-width: 0;
  border-top: 1px solid var(--border);
}
.h3-review-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.h3-review-row span {
  color: var(--muted);
}
.h3-review-row strong {
  max-width: 62%;
  text-align: right;
  overflow-wrap: anywhere;
}
.h3-review-aside {
  padding: 18px;
  border-radius: 12px;
  background: var(--accent-soft);
}
.h3-review-aside strong {
  display: block;
  margin-bottom: 8px;
  color: #276a55;
  font-size: 13px;
}
.h3-review-aside p {
  margin: 0 0 11px;
  color: #526c62;
  font-size: 11px;
  line-height: 1.75;
}
.h3-review-aside p:last-child {
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .h3-review {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 620px) {
  .h3-mode-track {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .h3-mode-track::before {
    display: none;
  }
  .h3-mode {
    border-bottom: 1px solid var(--border);
  }
  .h3-mode:nth-child(2n) {
    border-right: 0;
  }
  .h3-mode:nth-child(n + 3) {
    border-bottom: 0;
  }
  .h3-field-grid,
  .h3-frame-grid,
  .h3-resolution {
    grid-template-columns: minmax(0, 1fr);
  }
  .h3-duration-control {
    grid-template-columns: minmax(0, 1fr) 92px;
    gap: 12px;
  }
  .h3-material {
    padding: 15px;
  }
  .h3-material-head {
    align-items: flex-start;
  }
  .h3-image-row {
    grid-template-columns: 26px minmax(0, 1fr) 34px;
    gap: 7px;
  }
  .h3-review-row {
    display: grid;
    gap: 6px;
  }
  .h3-review-row strong {
    max-width: none;
    text-align: left;
  }
}
@media (max-width: 640px) {
  .task-type-icon {
    width: 48px;
    height: 48px;
  }
  .task-meta {
    overflow-wrap: anywhere;
  }
  .real-video {
    max-height: 50vh;
  }
}
/* Business availability affects new submissions, never task history or results. */
.business-availability-notice { grid-column:1/-1; margin:0 0 20px; }
.business-availability-notice strong { display:block; margin-bottom:7px; }
.business-availability-notice p { margin:0 0 12px; }

/* neon-live.css */
/* Production-only presentation of existing H3 forms and real result states.
   No preview toolbar, fixture state or demonstration media is included. */
.media-unavailable {
  color: var(--muted);
  background: var(--surface-2);
}
.task-type-icon {
  color: var(--lime);
  background: var(--violet-soft);
}
.real-video { background: var(--bg); }
/* Approved clip-coming-soon-preview-20261019-v1. */
.clip-coming-soon { max-width:660px; margin:12px auto 0; padding:clamp(24px,5vw,48px); border:1px solid var(--border); border-radius:18px; background:var(--surface); text-align:center; }
.clip-coming-soon-icon { display:inline-grid; place-items:center; width:68px; height:68px; border-radius:18px; color:var(--lime); background:var(--surface-2); margin-bottom:20px; }
.clip-coming-soon h2 { font-size:30px; margin:0 0 12px; }
.clip-coming-soon p, .clip-coming-soon-dialog p { color:var(--muted); line-height:1.8; margin:0; }
.clip-coming-soon .btn { margin-top:26px; }
#dialog.clip-coming-soon-dialog { width:min(480px,calc(100vw - 32px)); max-height:calc(100dvh - 32px); padding:0; }
#dialog.clip-coming-soon-dialog[open] { display:flex; flex-direction:column; }
.clip-coming-soon-dialog .dialog-header { flex:none; padding:20px 24px; gap:16px; }
.clip-coming-soon-dialog .dialog-header h2 { font-size:22px; }
.clip-coming-soon-dialog .dialog-body { overflow-y:auto; min-height:0; padding:26px 24px; }
.clip-coming-soon-dialog .dialog-footer { flex:none; justify-content:flex-end; padding:16px 24px; }
.clip-coming-soon-dialog .dialog-footer .btn { min-width:108px; }
.clip-coming-soon-dialog .icon-btn { min-width:40px; min-height:40px; }
html:has(.clip-coming-soon-dialog[open]) { overflow:hidden; }
@media(max-width:440px) { .clip-coming-soon-dialog .dialog-header { padding:16px 18px; } .clip-coming-soon-dialog .dialog-body { padding:22px 18px; } .clip-coming-soon-dialog .dialog-footer { padding:14px 18px; } }
/* Approved single-link analysis. Reuses the existing workspace palette. */
.single-link-source { display:grid; gap:10px; padding:24px; }
.single-link-source label { margin:0; font-size:14px; font-weight:600; }
.single-link-source>input { width:100%; min-width:0; margin:0; }
.single-link-source>small { font-size:13px; line-height:1.6; color:var(--muted); }
.single-link-source .source-status { margin:0; min-height:0; }
.single-link-source .source-status:empty { display:none; }
.single-link-source input[aria-invalid="true"] { border-color:var(--red); }
.source-analysis { display:flex; align-items:flex-start; gap:12px; width:100%; margin-top:6px; padding-top:16px; border-top:1px solid var(--border); color:var(--muted); font-size:13px; line-height:1.6; }
.source-analysis-copy { flex:1; min-width:0; display:grid; gap:3px; overflow-wrap:anywhere; }
.source-analysis-copy strong { font-size:13px; color:var(--text); font-weight:600; }
.source-analysis-copy small { font-size:13px; }
.source-analysis-mark { display:grid; place-items:center; flex:none; width:20px; height:20px; margin-top:1px; border:1px solid currentColor; border-radius:50%; font-size:12px; line-height:1; }
[data-analysis-state="analyzing"] .source-analysis-mark { border-color:var(--border); border-top-color:var(--lime); animation:source-analysis-spin 1s linear infinite; }
[data-analysis-state="supported"] .source-analysis-mark,[data-analysis-state="supported"] strong { color:#35d39a; }
[data-analysis-state="unsupported"] .source-analysis-mark,[data-analysis-state="invalid"] .source-analysis-mark { color:var(--red); }
.source-analysis-retry { min-height:38px; flex:none; padding:8px 12px; font-size:12px; }
@keyframes source-analysis-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce) { [data-analysis-state="analyzing"] .source-analysis-mark { animation:none; } }
@media(max-width:600px) { .single-link-source { padding:18px; } .source-analysis { flex-wrap:wrap; } .source-analysis-retry { margin-left:32px; } .source-analysis-copy { flex-basis:calc(100% - 32px); } }

/* Approved v4 local-video input, shared by clipping, translation, upscaling and reference video. */
.local-source-switch { display:inline-flex; flex-wrap:wrap; gap:5px; width:max-content; max-width:100%; padding:5px; border:1px solid var(--border); border-radius:11px; background:var(--surface-2); }
.local-source-switch button { min-height:38px; padding:7px 17px; border:1px solid transparent; border-radius:8px; color:var(--muted); font-weight:650; }
.local-source-switch button[aria-pressed="true"] { border-color:var(--lime); color:var(--lime); background:var(--surface); }
.local-video-dropzone { padding:23px; border:1px dashed var(--lime); border-radius:12px; background:var(--surface-2); }
.local-video-dropzone.is-dragging { box-shadow:inset 0 0 0 1px var(--lime); background:var(--surface); }
.local-video-dropzone h2 { margin:0 0 6px; font-size:18px; }
.local-video-dropzone p { margin:0; max-width:58ch; color:var(--muted); font-size:13px; line-height:1.55; }
.local-video-dropzone small { display:block; margin-top:14px; color:var(--muted); font-size:12px; line-height:1.5; }
.local-video-actions { display:flex; flex-wrap:wrap; gap:9px; margin-top:18px; align-items:center; }
.local-video-actions input[type="file"] { position:absolute; width:1px; height:1px; overflow:hidden; opacity:0; }
.local-video-actions input[type="file"]:focus-visible + label { outline:2px solid var(--lime); outline-offset:3px; }
.local-video-trigger { display:inline-flex; align-items:center; justify-content:center; min-height:42px; padding:8px 16px; border:1px solid var(--lime); border-radius:8px; color:var(--bg); background:var(--lime); font-weight:700; cursor:pointer; }
.local-video-file { display:grid; gap:3px; min-width:0; margin-top:18px; padding:12px 14px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
.local-video-file strong { overflow-wrap:anywhere; }
.local-video-file span { color:var(--muted); font-size:12px; }
.local-video-dropzone .local-video-error { margin-top:13px; color:var(--red); }
.local-upload-task { display:grid; gap:8px; min-width:0; margin-top:14px; padding:13px; border:1px solid var(--border); border-radius:9px; background:var(--surface-2); }
.local-upload-task strong { font-size:13px; }
.local-upload-task p { margin:0; color:var(--muted); font-size:12px; line-height:1.5; }
.local-upload-task .local-video-error { color:var(--red); }
.local-upload-task progress { width:100%; accent-color:var(--lime); }
.local-upload-task small { color:var(--muted); }
.local-upload-actions { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.local-upload-actions input[type="file"] { max-width:100%; color:var(--muted); font-size:12px; }
@media(max-width:600px) { .local-source-switch { display:flex; width:100%; } .local-source-switch button { flex:1; } .local-video-dropzone { padding:17px; } }
.h3-mode i { background: var(--muted); box-shadow: 0 0 0 1px var(--border-strong); }
.h3-mode.selected i { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.h3-field-error, .h3-field .h3-field-error { color: var(--red); }
.h3-image-index { background: var(--surface-3); color: var(--text); }
.h3-remove { color: var(--muted); }
.h3-add-material { border-color: var(--border-strong); }
.h3-inline-note { background: #332916; color: var(--warning); }
.h3-review-aside strong { color: var(--lime); }
.h3-review-aside p { color: var(--muted); }
.h3-material, .h3-settings, .h3-review { min-width: 0; }
.h3-review-row strong { white-space: pre-wrap; }
.a-feature-illustration { margin: 0; }
.a-feature-illustration img { width: 100%; height: 100%; object-fit: cover; }
.a-feature-illustration .a-player-label { pointer-events: none; }
.a-feature-illustration .a-player-label small {
  display: block; margin-top: 4px; font-size: 10px; font-weight: 400; color: #fff;
}
@media (max-width: 480px) {
  .a-feature-illustration .a-player-label { padding: 8px; font-size: 11px; }
  .a-feature-illustration .a-player-label small { font-size: 9px; line-height: 1.35; }
  .h3-material-head { flex-wrap: wrap; gap: 6px; }
  .h3-input-meta { flex-wrap: wrap; gap: 6px; }
}

/* user-api-image-live.css */
.ai-speech-templates {overflow-x:auto}
.ai-speech-templates table {width:100%;border-collapse:collapse;text-align:left}
.ai-speech-templates th,.ai-speech-templates td {padding:10px 14px;border-bottom:1px solid #ffffff16}
.ai-key-panel .table-wrap {overflow-x:auto}
.ai-key-panel table {min-width:750px;width:100%;text-align:left}
.ai-key-panel th,.ai-key-panel td {padding:16px 12px;border-bottom:1px solid var(--line,#292936)}
.ai-key-panel th {color:var(--muted,#aaaab9);font-size:12px}
.ai-pagination {display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 12px}
.ai-pagination>span:first-child {margin-right:auto}
.ai-pagination select {width:auto;min-width:65px}
#new-api-key {width:100%;margin-top:16px;font-size:14px}
[data-ai-root] label {display:block}
[data-ai-root] .notice {margin:20px 0}
#api-key-error,#api-key-revoke-error {color:#ff8787}
/* Image controls follow the approved workspace palette and type scale. */
.ai-image-layout{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}
.ai-image-layout .panel{padding:24px;min-width:0}.ai-image-layout textarea{width:100%;box-sizing:border-box;resize:vertical;min-height:130px}
.ai-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.ai-size-presets{display:flex;gap:8px;flex-wrap:wrap}
.ai-image-aside p{line-height:1.7}.ai-image-price strong{font-size:40px;color:var(--text,#f7f7fa)}
.ai-reference{display:flex;gap:14px;align-items:center;flex-wrap:wrap;overflow-wrap:anywhere}.ai-reference img{max-width:100px;max-height:100px;object-fit:contain}
.ai-reference-list{display:grid;gap:12px}.ai-reference-list .ai-reference{padding:12px 0;border-bottom:1px solid var(--border,#292936)}
.ai-reference-thumb{flex:none;width:100px;height:100px;overflow:hidden;border-radius:6px;background:#252530}.ai-reference-thumb img{display:block;width:100%;height:100%;object-fit:contain}
.ai-reference-copy{flex:1;min-width:110px;font-size:12px;overflow-wrap:anywhere}.ai-reference-copy strong{display:block;margin-bottom:3px}.ai-reference-copy small{display:block;color:var(--muted,#a3a3b4);font-size:11px}.ai-reference-copy .ai-reference-error{color:#ff7a89}
.ai-reference-actions{display:flex;flex-wrap:wrap;gap:6px}.ai-reference-actions .btn{min-height:34px;padding:7px 10px;font-size:11px}.ai-reference-count{font-size:11px;color:var(--muted)}
#dialog .ai-reference-order{font-size:12px;line-height:1.9;overflow-wrap:anywhere}
.ai-result-image{display:block;max-width:100%;max-height:65vh;margin:auto;object-fit:contain}.project-image img{width:100%;height:100%;object-fit:contain}
.ai-code{white-space:pre-wrap;overflow-wrap:anywhere;background:#0b0b10;border:1px solid #292936;border-radius:8px;padding:16px;font-size:13px;line-height:1.6}
#image-error,#image-submit-error{color:#ff9098;line-height:1.6}.ai-image-aside h3{margin-top:24px}
@media(max-width:900px){.ai-image-layout{grid-template-columns:1fr}.ai-image-layout .panel{padding:18px}}
@media(max-width:540px){.ai-reference-actions{width:100%}.ai-reference-actions .btn{flex:1}.ai-reference-thumb{width:90px;height:90px}}
/* New request pixel budget; values are supplied by the authenticated capability API. */
.ai-pixel-budget{border:1px solid #363b29;background:#1d2117;border-radius:10px;padding:14px 16px;margin:4px 0;font-size:13px;line-height:1.8}
.ai-pixel-budget strong{color:#d4ff00}.ai-pixel-budget small{display:block;color:#aaaaba}
.ai-pixel-budget.invalid{border-color:#68414e;background:#2b1d25}.ai-pixel-budget.invalid strong{color:#ffacb8}
.ai-pixel-limit{font-size:26px;color:#d4ff00;letter-spacing:-.5px}.ai-pixel-limit small{font-size:12px}
#image-form input::-webkit-inner-spin-button{opacity:1}
.ai-image-api-limits{padding:16px;border:1px solid var(--line,#343440);border-radius:10px;line-height:1.9}
.ai-image-api-limits p{overflow-wrap:anywhere}

/* h3-v2-live.css */
.h3-v2-live{max-width:1080px}.h3-v2-live fieldset{border:0;padding:0;margin:0;min-width:0;display:grid;gap:20px}.h3-v2-live label{display:grid;gap:8px;color:var(--text-secondary,#b4b5c4)}.h3-v2-live textarea,.h3-v2-live input,.h3-v2-live select{width:100%;min-height:44px;background:#101015;color:#f3f3f7;border:1px solid #2b2b37;border-radius:10px;padding:11px 13px;font:inherit}.h3-v2-live textarea{resize:vertical;line-height:1.65}.h3-v2-live :disabled{opacity:.55;cursor:not-allowed}.h3-v2-modes,.h3-v2-actions{display:flex;gap:10px;flex-wrap:wrap}.h3-v2-dimensions{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.h3-v2-assets{background:#121219;border:1px solid #2b2b37;border-radius:14px;padding:20px;display:grid;gap:16px}.h3-v2-section-title,.h3-v2-submit{display:flex;align-items:center;justify-content:space-between;gap:16px}.h3-v2-section-title small,.h3-v2-asset small,.h3-v2-submit small{display:block;color:#9899ac;font-size:13px;line-height:1.7}.h3-v2-asset{display:grid;grid-template-columns:1fr auto;gap:15px;padding-top:16px;border-top:1px solid #292932}.h3-v2-asset strong{overflow-wrap:anywhere}.h3-v2-asset label{grid-column:1/-1}.h3-v2-asset small.h3-v2-error{color:#ffa5a5}.h3-v2-submit{padding-top:26px;margin-top:24px;border-top:1px solid #2b2b37}.h3-v2-submit strong{color:#d6ef49}.h3-v2-live pre{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:13px;background:#101015;padding:20px;border-radius:12px}.h3-v2-review{display:grid;gap:16px}@media(max-width:640px){.h3-v2-dimensions{grid-template-columns:1fr}.h3-v2-submit,.h3-v2-section-title{align-items:flex-start;flex-direction:column}.h3-v2-asset{grid-template-columns:1fr}.h3-v2-assets{padding:16px}.h3-v2-live{padding:20px}}

.vg-page .h3-duration-setting{display:block;min-width:0}.h3-duration-controls{display:flex;align-items:center;gap:16px}.h3-duration-controls input[type=range]{flex:1;min-width:0;width:100%;accent-color:var(--accent,#d6ef49);cursor:pointer}.h3-duration-value{display:flex;align-items:center;gap:8px;flex-shrink:0}.h3-duration-value input{width:86px;min-height:42px;padding:8px 10px;border:1px solid #3a3b43;border-radius:10px;background:#101015;color:#f3f3f7;font:inherit;color-scheme:dark}.h3-duration-ticks{display:flex;justify-content:space-between;margin-right:118px;color:var(--text-secondary,#999ba9);font-size:12px}.h3-duration-setting small,.h3-output-limits{display:block;color:var(--text-secondary,#999ba9);font-size:12px;line-height:1.7}.h3-output-limits{margin-top:12px}.h3-duration-controls :disabled{opacity:.55;cursor:not-allowed}

/* home-workspace.css */
/* Approved home-restore-20261009-v2. Reuse the original neon theme; scope additions to home. */
.home-workspace .hw-video { grid-template-columns: minmax(260px, .86fr) minmax(0, 1.35fr); padding: 22px 26px; }
.home-workspace .hw-video h2 { font-size: 42px; }
.home-workspace .hw-video .a-clone-cta { margin-top: 4px; }
.home-workspace .hw-media { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; min-width: 0; }
.home-workspace .hw-concept { position: relative; margin: 0; aspect-ratio: 16/9; overflow: hidden; border-radius: 13px; border: 1px solid #ffffff2e; background: #211235; }
.home-workspace .hw-concept img { width: 100%; height: 100%; object-fit: cover; }
.home-workspace .hw-concept figcaption { position: absolute; bottom: 9px; left: 9px; padding: 5px 8px; border-radius: 6px; background: #0b0b10d6; color: #eee; font-size: 11px; }
.home-workspace .hw-concept figcaption small { display: block; font-size: 9px; color: #cac7d1; }
[lang="en"] .home-workspace .a-tool h3 { font-size: clamp(24px, 2.5vw, 34px); padding-right: 52px; }
.home-workspace .hw-empty { display: grid; justify-items: center; gap: 10px; padding: 32px 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); text-align: center; }
.home-workspace .hw-empty h3 { margin: 0; font-size: 16px; }
.home-workspace .hw-empty p { color: var(--muted); margin: 0; font-size: 13px; }
.home-workspace .hw-empty button { padding: 8px 14px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-2); }
.home-workspace .hw-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.home-workspace .hw-skeleton { aspect-ratio: 16/9; border-radius: 12px; background: var(--surface-2); }
.home-workspace .hw-recent .project-card { display: block; }
.home-workspace .hw-recent .project-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .home-workspace .hw-video h2 { font-size: 34px; }
  .home-workspace .hw-video .a-clone-copy p { font-size: 15px; }
  .home-workspace .hw-video .a-clone-cta { font-size: 17px; }
}
@media (max-width: 700px) {
  .home-workspace .hw-video { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 22px; }
  .home-workspace .hw-video h2 { font-size: 31px; }
  .home-workspace .hw-media { gap: 9px; }
  .home-workspace .hw-concept { border-radius: 9px; }
  .home-workspace .hw-concept figcaption { left: 5px; bottom: 5px; padding: 3px 5px; font-size: 9px; }
  .home-workspace .hw-concept figcaption small { font-size: 8px; }
  .home-workspace .hw-tools { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .home-workspace .a-tool { min-height: 158px; padding: 20px; }
  .home-workspace .a-tool h3 { font-size: 30px; padding-right: 52px; }
  .home-workspace .a-tool-icon svg { width: 36px; height: 36px; }
  .home-workspace .a-tool-top { top: 20px; right: 20px; }
  .home-workspace .a-tool p { font-size: 14px; }
  .home-workspace .hw-recent .project-grid, .home-workspace .hw-projects { grid-template-columns: minmax(0, 1fr); gap: 23px; }
  .home-workspace .hw-recent .project-grid { grid-auto-flow: row; grid-auto-columns: auto; overflow: visible; }
  .home-workspace .hw-recent .project-image { aspect-ratio: 16/9; }
  .home-workspace .hw-recent .project-grid .project-card:last-child:nth-child(odd) { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) { .home-workspace *, .home-workspace *::before, .home-workspace *::after { transition: none !important; } }

/* Approved frontend-handoff-20261019-v2 */
/* Home tools: two equal columns in reading and keyboard order, on every screen. */
.home-workspace .hw-tools-paired {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.home-workspace .hw-tools-paired .a-tool {
  min-height: 200px;
  padding: 26px;
}

.home-workspace .hw-tools-paired .a-tool h3 {
  font-size: 32px;
  line-height: 1.2;
  padding-right: 60px;
  letter-spacing: -.5px;
}

.home-workspace .hw-tools-paired .a-tool-top {
  top: 25px;
  right: 26px;
}

.home-workspace .hw-tools-paired .a-tool-icon svg {
  width: 38px;
  height: 38px;
}

.home-workspace .hw-tools-paired .a-tool p {
  max-width: 90%;
  margin-top: 2px;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.home-workspace .hw-tools-paired .a-tool-footer {
  margin-top: auto;
}

.home-workspace .hw-tools-paired .a-tool.lime {
  background: linear-gradient(135deg, #d9fa38, #bfdf23);
  color: #172004;
}

.home-workspace .hw-tools-paired .lime p,
.home-workspace .hw-tools-paired .lime .a-tool-icon {
  color: #283510;
}

.home-workspace .hw-tools-paired .lime .a-tool-arrow {
  background: #17200420;
  color: #172004;
}

.hw-upscale-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border: 2px solid currentColor;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.5px;
}

/* Keep equal breathing room beside the home content, including landscape safe areas. */
@media (max-width: 980px) {
  .home-main:has(.hw-tools-paired) {
    padding-left: max(20px, env(safe-area-inset-left, 0px));
    padding-right: max(20px, env(safe-area-inset-right, 0px));
  }
}

@media (max-width: 700px) {
  .home-workspace .hw-tools-paired { gap: 12px; }
  .home-workspace .hw-tools-paired .a-tool {
    min-height: 202px;
    padding: 17px;
    border-radius: 14px;
  }
  .home-workspace .hw-tools-paired .a-tool-top {
    position: static;
    justify-content: flex-start;
    max-width: none;
    margin-bottom: 14px;
  }
  .home-workspace .hw-tools-paired .a-tool-icon svg { width: 28px; height: 28px; }
  .home-workspace .hw-tools-paired .hw-upscale-icon {
    width: 30px;
    height: 28px;
    border-radius: 6px;
    font-size: 13px;
  }
  .home-workspace .hw-tools-paired .a-tool h3 {
    padding-right: 0;
    font-size: clamp(20px, 5.5vw, 27px);
    letter-spacing: -.5px;
  }
  .home-workspace .hw-tools-paired .a-tool p {
    max-width: none;
    font-size: 12px;
    line-height: 1.55;
  }
  .home-workspace .hw-tools-paired .a-tool-footer {
    gap: 6px;
    padding-top: 18px;
    font-size: 14px;
  }
  .home-workspace .hw-tools-paired .a-tool-arrow { width: 32px; height: 32px; }
  .home-workspace .hw-tools-paired .a-tool-arrow svg { width: 16px; height: 16px; }
  [lang="en"] .home-workspace .hw-tools-paired .a-tool h3 { font-size: 20px; }
}

@media (max-width: 360px) {
  .home-workspace .hw-tools-paired { gap: 10px; }
  .home-workspace .hw-tools-paired .a-tool { padding: 13px; }
  .home-workspace .hw-tools-paired .a-tool-footer { font-size: 13px; }
}

.home-workspace button.hw-video{width:100%;border:0;text-align:left;color:inherit;font:inherit;cursor:pointer}
.home-workspace button.hw-video:focus-visible{outline:2px solid var(--a-lime,#d4ff2b);outline-offset:4px}

/* task-center-live.css */
/* Approved task center presentation; production records only. */
.tc-dialog .dialog-header { flex-shrink: 0; padding: 20px 26px; border-bottom: 1px solid var(--border); background: var(--surface); }
.tc-dialog .dialog-header h2 { margin: 0; font-size: 20px; }
.tc-dialog .dialog-body { overflow-y: auto; padding: 22px 26px; min-height: 0; }
.tc-dialog .dialog-footer { flex-shrink: 0; padding: 14px 26px; border-top: 1px solid var(--border); background: var(--surface); }
.tc-detail-title { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.tc-progress { margin-top: 18px; font-size: 12px; color: var(--muted); }
.tc-progress summary { cursor: pointer; padding: 6px 0; }
.tc-feedback { min-height: 18px; color: var(--lime); font-size: 12px; padding-top: 12px; }
.tc-result-choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tc-result-choices button { font-size: 11px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; color: var(--muted); }
.tc-result-choices button[aria-pressed="true"] { color: var(--lime); border-color: var(--lime); background: #dfff4008; }
.tc-result-media audio { width: 100%; height: 42px; margin: 30px 0; }
.tc-reference-placeholder { display: flex; justify-content: center; align-items: center; width: 100px; height: 66px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); }
.tc-reference small { font-size: 10px; }
.tc-reference-refresh { font-size: 10px; color: var(--lime); }
.tc-lightbox { width: min(1000px,calc(100vw - 24px)); max-height: 90dvh; border-radius: 14px; padding: 18px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.tc-lightbox::backdrop { background: #050508cf; }
.tc-lightbox-heading { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tc-lightbox-heading h2 { font-size: 14px; margin: 0; }
.tc-lightbox img,.tc-lightbox video { display: block; max-width: 100%; max-height: 72dvh; object-fit: contain; margin: 0 auto; }
.tc-lightbox audio { width: 100%; }
.tc-lightbox button { font-size: 12px; }
.tc-icon-button:focus-visible,.tc-detail-button:focus-visible,.tc-id-text:focus-visible,.tc-reference button:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.tc-list-panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tc-table-scroll { overflow-x: auto; }
.tc-table { border-collapse: collapse; width: 100%; text-align: left; font-size: 13px; }
.tc-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tc-table th { padding: 16px 20px; font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; background: #ffffff02; border-bottom: 1px solid var(--border); }
.tc-table th:first-child { width: 29%; }
.tc-table th:nth-child(2) { width: 15%; }
.tc-table th:nth-child(3) { width: 17%; }
.tc-table th:nth-child(4) { width: 11%; }
.tc-table th:nth-child(5) { width: 10%; }
.tc-table th:nth-child(6) { width: 13%; }
.tc-table th:last-child { width: 72px; }
.tc-table th .tc-hint { display: inline-block; vertical-align: middle; margin-left: 4px; cursor: help; color: #717587; }
.tc-table td { height: 66px; padding: 10px 20px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tc-table tbody tr:last-child td { border-bottom: 0; }
.tc-table tbody tr:hover { background: #ffffff03; }
.tc-id { display: flex; align-items: center; gap: 9px; }
.tc-id-text { color: #c8c9d5; font: 11px/1.65 Consolas, "SFMono-Regular", monospace; white-space: nowrap; padding: 0; text-align: left; }
.tc-id-text:hover { color: var(--lime); }
.tc-icon-button { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 7px; color: #8c8f9f; flex-shrink: 0; }
.tc-icon-button:hover { background: var(--surface-3); color: var(--text); }
.tc-type { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.tc-type-icon { display: inline-flex; color: #b29aff; }
.tc-sub { display: block; font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.tc-type .tc-sub { font-size: 10px; }
.tc-time, .tc-duration, .tc-credits { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tc-duration { color: #d9dae3; }
.tc-credits { font-weight: 600; }
.tc-credits.tc-zero { color: var(--muted); font-weight: 400; }
.tc-status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px; white-space: nowrap; font-size: 11px; line-height: 1.4; background: #ffffff06; color: #b6b8c7; }
.tc-status::before { content: ""; width: 5px; height: 5px; background: currentColor; border-radius: 50%; flex-shrink: 0; }
.tc-status-completed { color: #54dba6; background: #35d39a13; }
.tc-status-processing { color: #b8a2ff; background: #8a65ff17; }
.tc-status-awaiting_verification, .tc-status-result_error { color: #efbe67; background: #efbe6712; }
.tc-status-failed { color: #ff8b8b; background: #ff6b6b12; }
.tc-detail-button { color: var(--lime); font-size: 12px; white-space: nowrap; padding: 6px 0; }
.tc-detail-button:hover { text-decoration: underline; text-underline-offset: 4px; }
.tc-dialog { width: min(1120px, calc(100vw - 48px)); max-width: none; max-height: min(900px, 90vh); border: 1px solid var(--border-strong); padding: 0; border-radius: 16px; background: var(--bg); color: var(--text); box-shadow: 0 25px 100px #0008; }
.tc-dialog[open] { display: flex; flex-direction: column; }
.tc-dialog::backdrop { background: #050508bd; }
.tc-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 26px 18px; border-bottom: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.tc-dialog-title-line { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tc-dialog-title-line h2 { margin: 0; font-size: 20px; }
.tc-dialog-id { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font: 12px/1.5 Consolas, "SFMono-Regular", monospace; word-break: break-all; }
.tc-dialog-scroll { overflow-y: auto; padding: 22px 26px 26px; }
.tc-facts { display: grid; grid-template-columns: 1.5fr 1fr .75fr 1fr; padding: 0 0 22px; gap: 16px; }
.tc-fact { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tc-fact-label { font-size: 11px; color: var(--muted); }
.tc-fact strong { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tc-fact .tc-charge { font-size: 18px; font-weight: 600; }
.tc-detail-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tc-section { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.tc-section-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.tc-section-head h3 { margin: 0; font-size: 14px; }
.tc-section-head small { font-size: 11px; color: var(--muted); }
.tc-section-body { padding: 18px; }
.tc-param { margin-bottom: 18px; }
.tc-param:last-child { margin-bottom: 0; }
.tc-param-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.tc-prompt { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.9; margin: 0; }
.tc-params { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; margin: 20px 0 0; }
.tc-params dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.tc-params dd { margin: 0; color: #dbdce5; font-size: 12px; overflow-wrap: anywhere; }
.tc-json { border-top: 1px solid var(--border); margin-top: 20px; padding-top: 13px; }
.tc-json summary { font-size: 11px; color: #b5b8c8; cursor: pointer; padding: 4px 0; }
.tc-json pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; max-height: 240px; overflow-y: auto; background: var(--bg); border-radius: 8px; font-size: 11px; line-height: 1.7; color: #bec1d4; }
.tc-json .btn { min-height: 32px; padding: 6px 10px; font-size: 11px; }
.tc-references { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.tc-reference { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 0; font-size: 10px; color: var(--muted); max-width: 110px; text-align: left; }
.tc-reference img { width: 100px; height: 66px; object-fit: cover; border-radius: 7px; border: 1px solid var(--border); }
.tc-reference span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-result-media { position: relative; overflow: hidden; background: var(--bg); border: 1px solid var(--border); border-radius: 9px; }
.tc-result-media img { width: 100%; max-height: 320px; object-fit: contain; }
.tc-result-media video { display: block; width: 100%; max-height: 320px; background: #000; }
.tc-image-open { padding: 0; display: block; width: 100%; }
.tc-image-open:hover img { filter: brightness(1.04); }
.tc-result-caption { color: var(--muted); font-size: 10px; margin: 10px 0 12px; }
.tc-result-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; margin-bottom: 12px; }
.tc-result-meta span { color: var(--muted); font-size: 11px; }
.tc-result-actions { display: flex; align-items: center; gap: 9px; }
.tc-result-actions .btn { padding: 8px 11px; font-size: 11px; min-height: 34px; }
.tc-result-note { border: 1px solid #efbe672a; background: #efbe6707; padding: 11px 13px; border-radius: 8px; color: #d2b07a; font-size: 11px; margin: 16px 0 0; }
.tc-result-state { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 44px 18px; text-align: center; }
.tc-result-state h4 { margin: 0; font-size: 14px; }
.tc-result-state p { margin: 0; font-size: 12px; color: var(--muted); max-width: 270px; }
.tc-result-state .btn { margin-top: 8px; font-size: 12px; }
.tc-result-state small { color: var(--muted); font-size: 11px; }
.tc-result-page { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }
.tc-result-page button { display: inline-flex; align-items: center; justify-content: center; padding: 5px 7px; border: 1px solid var(--border); border-radius: 6px; }
.tc-result-page-controls { display: flex; gap: 10px; align-items: center; }
.tc-audio { display: grid; justify-items: center; padding: 24px 12px 18px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.tc-audio-art { display: inline-flex; align-items: center; justify-content: center; width: 96px; height: 96px; border-radius: 22px; color: #b39aff; background: #241a44; margin-bottom: 16px; }
.tc-audio h4 { font-size: 13px; margin: 0 0 5px; }
.tc-audio small { color: var(--muted); font-size: 11px; }
.tc-audio audio { width: 100%; height: 40px; margin-top: 22px; }
.tc-billing { margin-top: 20px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 15px 18px; }
.tc-billing summary { font-size: 12px; color: var(--muted); cursor: pointer; }
.tc-billing-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 15px; margin-top: 18px; }
.tc-billing-grid dt { color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.tc-billing-grid dd { margin: 0; font-size: 12px; }
.tc-detail-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 26px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.tc-detail-footer small { color: var(--muted); font-size: 10px; }
.tc-detail-footer .btn { font-size: 12px; min-height: 36px; }
.tc-media-dialog { width: min(1000px, calc(100vw - 36px)); }
.tc-media-dialog .tc-dialog-scroll { display: flex; flex-direction: column; gap: 15px; align-items: center; }
.tc-media-dialog img { max-height: 65vh; object-fit: contain; }
.tc-media-dialog video { max-width: 100%; max-height: 65vh; }
.tc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; clip-path: inset(50%); overflow: hidden; }
@media (min-width: 1440px) { .tc-table td, .tc-table th { padding-left: 24px; padding-right: 24px; } .tc-id-text { font-size: 12px; } }
@media (max-width: 1200px) { [data-task-center-live] .a-main { padding: 28px 24px 40px; } .tc-table { min-width: 960px; } .tc-toolbar { gap: 12px; } .tc-tools { margin-left: 0; } }
@media (max-width: 800px) {
  [data-task-center-live] .a-main { padding: 24px 20px 90px; }
  .tc-heading { margin-bottom: 22px; gap: 12px; }
  .tc-heading h1 { font-size: 26px; }
  .tc-heading p { font-size: 12px; max-width: 230px; }
  .tc-heading .btn { font-size: 12px; min-height: 38px; padding: 9px 12px; }
  .tc-filters { gap: 4px; }
  .tc-filter { font-size: 11px; padding: 8px 9px; min-height: 34px; }
  .tc-tools { width: 100%; gap: 8px; }
  .tc-search { flex: 1; width: auto; min-width: 0; }
  .tc-source select { width: 113px; }
  .tc-table { min-width: 0; display: block; }
  .tc-table thead { position: absolute; height: 1px; width: 1px; overflow: hidden; clip-path: inset(50%); }
  .tc-table tbody { display: block; }
  .tc-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; border-bottom: 1px solid var(--border); padding: 18px; }
  .tc-table tbody tr:last-child { border-bottom: 0; }
  .tc-table td { display: block; border: 0; padding: 0; height: auto; min-width: 0; }
  .tc-table td::before { content: attr(data-label); display: block; font-size: 10px; color: var(--muted); margin-bottom: 5px; }
  .tc-table td:first-child { grid-column: 1 / -1; }
  .tc-id { justify-content: space-between; }
  .tc-id-text { font-size: 10.5px; white-space: normal; overflow-wrap: anywhere; }
  .tc-table td:nth-child(2) { grid-column: 1; }
  .tc-table td:nth-child(6) { grid-column: 2; grid-row: 2; }
  .tc-table td:nth-child(3) { grid-column: 1; grid-row: 3; }
  .tc-table td:nth-child(4) { grid-column: 2; grid-row: 3; }
  .tc-table td:last-child { display: flex; align-items: flex-end; justify-content: flex-end; }
  .tc-table td:last-child::before { display: none; }
  .tc-pagination { padding: 14px 18px; gap: 14px; }
  .tc-pagination-controls { flex-wrap: wrap; gap: 12px; }
  .tc-review { align-items: flex-start; gap: 8px; }
  .tc-review > span { width: 100%; }
  .tc-review label { margin-left: 0; }
  .tc-dialog { width: calc(100vw - 20px); max-height: 94dvh; border-radius: 12px; }
  .tc-dialog-head, .tc-dialog-scroll { padding: 18px; }
  .tc-dialog-title-line { gap: 9px; }
  .tc-dialog-title-line h2 { font-size: 18px; }
  .tc-dialog-id { font-size: 10px; }
  .tc-facts { grid-template-columns: 1fr 1fr; gap: 18px; }
  .tc-detail-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tc-section-body { padding: 16px; }
  .tc-billing-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tc-detail-footer { padding: 12px 18px; }
  .tc-detail-footer small { max-width: 180px; }
  [data-task-center-live] .a-bottomnav a { display: flex; flex-direction: column; gap: 3px; align-items: center; padding: 5px 20px; color: var(--muted); font-size: 11px; }
  [data-task-center-live] .a-bottomnav a[aria-current="page"] { color: var(--lime); }
  .tc-header-control { padding: 7px 9px; font-size: 11px; gap: 5px; }
  .tc-header-account { display: none; }
}
@media (prefers-reduced-motion: reduce) { [data-task-center-live] *, [data-task-center-live] *::before, [data-task-center-live] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* queue-display-live.css */
/* Approved compact summary v1, responsive within existing task layouts. */
.queue-row-info{display:block;font-size:11px;line-height:1.8;margin-top:5px;color:#aeb9c9;min-width:0;overflow-wrap:anywhere;white-space:normal}
.tc-status-queued{color:#ddca8e!important;background:#d8b55412!important}
.task-queue-card{min-width:0;border:1px solid #38434f;border-radius:12px;padding:20px 22px;margin:18px 0 22px;background:#151c24;color:#e0e7f2;overflow-wrap:anywhere}
.queue-card-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-bottom:14px}
.task-queue-card h3{font-size:19px;line-height:1.8;font-weight:500;margin:0;letter-spacing:-.25px}
.task-queue-card h3 strong{font-size:inherit;font-variant-numeric:tabular-nums;font-weight:650;color:#ddf39c}
.queue-stage-note{margin:7px 0 0;color:#a9b4c6;font-size:12px;line-height:1.8}
.queue-card-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-top:17px;padding-top:14px;border-top:1px solid #303a47}
.queue-card-foot small{font-size:11px;color:#95a3b6}
.queue-card-actions{display:flex;gap:14px;align-items:center;flex-wrap:wrap;min-width:0}
.queue-link{padding:6px 0;color:var(--lime,#d4f34a);font-size:12px;min-height:36px;text-align:start;white-space:normal}
.queue-link:focus-visible{outline:2px solid var(--lime,#d4f34a);outline-offset:3px;border-radius:3px}
.recent-tasks .task-queue-card{margin-top:14px}
@media(min-width:761px) and (max-width:1100px){.tc-table td:nth-child(6){min-width:150px}.queue-row-info{max-width:200px}}
@media(max-width:760px){.task-queue-card{padding:17px 16px;margin:15px 0 18px}.task-queue-card h3{font-size:16px}.queue-card-foot{align-items:flex-start}.queue-link{min-height:44px}.queue-row-info{font-size:11px;max-width:100%}.queue-card-actions{column-gap:18px}}
@media(max-width:380px){.task-queue-card{padding:16px 13px}.queue-card-foot{display:block}.queue-card-actions{margin-top:8px;justify-content:space-between}}

/* works-live.css */
/* Approved works-navigation-20261012-v1, live API records. */
/* Approved asset-storage-20261027-v1: authenticated storage and file cleanup. */
.works-storage-summary{padding:22px 24px;margin-bottom:24px;border:1px solid var(--border);border-radius:14px;background:var(--surface);font-size:12px;color:var(--muted)}
.works-storage-summary h2{font-size:14px;color:var(--text);margin:0 0 9px}.works-storage-top{display:flex;justify-content:space-between;gap:18px}.works-storage-top>p{text-align:right;margin:0}.works-storage-top strong{display:block;color:var(--text);font-size:17px;margin-top:7px}.works-storage-value{font-size:26px;color:var(--text);margin:0}.works-storage-value>span{font-size:15px;color:var(--muted)}
.works-storage-summary meter{width:100%;height:10px;margin:20px 0 14px}.works-storage-summary meter::-webkit-meter-bar{border:0;background:var(--surface-3);border-radius:5px}.works-storage-summary meter::-webkit-meter-optimum-value{background:var(--violet-2)}.works-storage-breakdown{display:flex;gap:10px 25px;flex-wrap:wrap}.works-storage-policy{margin:16px 0 0;padding-top:14px;border-top:1px solid var(--border);line-height:1.8}.works-storage-summary [role=alert]{color:#ffb5b5}.works-storage-summary [role=status]{line-height:1.8}
.works-file-size{font-size:11px;color:var(--muted);padding:10px 0;line-height:1.7}.works-file-size small{display:block;font-size:10px}.works-file-actions,.works-storage-selection{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}.works-file-actions label,.works-storage-selection label{display:flex;align-items:center;gap:7px;cursor:pointer}.works-file-actions input,.works-storage-selection input{width:16px;height:16px;accent-color:var(--lime)}.works-file-actions .btn{font-size:11px;min-height:34px;padding:6px 10px}.works-storage-selection{margin:0 0 20px;padding:12px 15px;border:1px solid var(--border);border-radius:10px;background:var(--surface);flex-wrap:wrap}.works-storage-selection>span{margin-left:auto;color:var(--muted)}
.works-storage-dialog{max-width:min(500px,calc(100vw - 32px));padding:26px;border:1px solid var(--border);border-radius:14px;background:var(--surface);color:var(--text)}.works-storage-dialog::backdrop{background:#05050bbd}.works-storage-dialog h2{font-size:20px;margin:0 0 18px}.works-storage-dialog p{font-size:13px;line-height:1.8;color:var(--muted)}.works-storage-dialog>div{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.works-storage-dialog [data-storage-confirm]{background:#ff6b6b;color:#171015}.works-storage-notice{padding:0 24px;font-size:12px;line-height:1.8;color:var(--muted)}
@media(max-width:680px){.works-storage-summary{padding:18px}.works-storage-top{flex-wrap:wrap}.works-storage-value{font-size:23px}.works-storage-selection{gap:10px}.works-storage-selection>span{margin-left:0}.works-storage-selection>.btn{margin-left:auto}.works-file-actions{flex-wrap:wrap;gap:4px}.works-file-actions .btn{padding-left:0}.works-storage-dialog{padding:20px}}
.works-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:23px}
@media(max-width:430px){.works-grid[data-storage-grid]{grid-template-columns:minmax(0,1fr)}}
.works-filters{display:flex;gap:6px}.works-filter{min-height:39px;padding:9px 15px;border-radius:9px;font-size:13px;color:var(--muted)}
.works-filter:hover{background:var(--surface);color:var(--text)}.works-filter[aria-pressed=true]{color:var(--lime);background:#dfff4010;box-shadow:inset 0 0 0 1px #dfff4025;font-weight:600}
.works-search{display:flex;align-items:center;gap:9px;width:252px;padding:0 12px;background:var(--surface-2);border:1px solid var(--border);border-radius:10px;color:var(--muted)}
.works-search input{border:0;background:transparent;padding:10px 0;min-height:39px;font-size:12px;min-width:0;width:100%}.works-search:focus-within{outline:2px solid var(--focus);outline-offset:2px}
.works-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px 22px}.works-card{min-width:0}.works-card-button{display:block;width:100%;padding:0;text-align:left;border-radius:12px}
.works-art{position:relative;display:flex;align-items:center;justify-content:center;width:100%;aspect-ratio:16/10;overflow:hidden;border-radius:12px;background:#1b1b24;border:1px solid #ffffff06}
.works-art img,.works-art canvas{width:100%;height:100%;object-fit:contain}.works-badge{position:absolute;left:11px;top:11px;padding:4px 8px;border-radius:6px;background:#0b0b10d9;color:#eeeef5;font-size:10px}
.works-media-action{display:flex;justify-content:center;align-items:center;position:absolute;left:11px;bottom:11px;width:35px;height:35px;border:1px solid #ffffff2b;border-radius:50%;background:#0b0b10ba;color:white}.works-media-action svg{width:19px;height:19px}
.works-card-button:hover .works-media-action{color:var(--lime);border-color:#dfff4060}.works-card h3{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:14px;line-height:1.65;min-height:46px;margin:11px 0 4px;font-weight:600;overflow-wrap:anywhere}.works-card p{margin:0;color:var(--muted);font-size:11px}
.works-no-cover{display:flex;flex-direction:column;align-items:center;gap:9px;color:#9498a9;font-size:12px}.works-audio-art{background:#211a32}.works-audio svg{color:#b9a0ff;width:53px;height:53px}
.works-state{min-height:260px;padding:38px 24px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;text-align:center;border:1px solid var(--border);background:var(--surface);border-radius:12px}.works-state h3,.works-state p{margin:0}.works-state p{max-width:420px;color:var(--muted);font-size:13px}
.creation-back{display:inline-flex;align-items:center;gap:8px;margin:0 0 22px;color:var(--muted);font-size:13px;min-height:34px}.creation-back svg{transform:rotate(180deg)}.creation-back:hover{color:var(--lime)}
.works-dialog .dialog-body{padding:0}.works-detail-layout{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(250px,1fr)}.works-preview-pane{min-width:0;padding:24px;background:#121219}.works-info-pane{min-width:0;padding:24px}
.works-dialog .tc-section{border:0;background:transparent}.works-dialog .tc-section-body{padding:0}.works-dialog .tc-section-head{padding:0 0 16px;border:0}.works-dialog .tc-result-media{height:min(50vh,460px);min-height:280px;background:#09090e;border-radius:10px;overflow:hidden;display:flex;align-items:center;justify-content:center}.works-dialog .tc-result-media img,.works-dialog .tc-result-media video{width:100%;height:100%;max-height:none;object-fit:contain}.works-dialog .tc-image-open{height:100%;width:100%}.works-dialog .tc-result-media audio{width:90%}
.works-info-pane h3{font-size:14px;margin:0 0 17px}.works-info{display:grid;grid-template-columns:74px minmax(0,1fr);gap:12px;font-size:12px;margin:0 0 22px}.works-info dt{color:var(--muted)}.works-info dd{margin:0;overflow-wrap:anywhere}.works-input{border-top:1px solid var(--border);padding:17px 0;margin-bottom:17px}.works-input>summary{cursor:pointer;font-size:13px}.works-input>.tc-section{margin-top:18px}.works-info-pane>.btn{width:100%;font-size:12px}.works-dialog .tc-feedback{padding:0 24px}
@media(max-width:1100px){.works-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:680px){.works-toolbar{flex-direction:column;align-items:stretch;gap:12px}.works-search{width:100%}.works-filters{justify-content:space-between}.works-filter{flex:1;padding:9px 10px}.works-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 13px}.works-card h3{font-size:12px;min-height:40px;margin-top:8px}.works-card p{font-size:10px}.works-badge{left:7px;top:7px;padding:3px 5px;font-size:9px}.works-media-action{left:7px;bottom:7px;width:29px;height:29px}.works-detail-layout{grid-template-columns:minmax(0,1fr)}.works-preview-pane,.works-info-pane{padding:18px}.works-dialog .tc-result-media{height:40vh;min-height:230px}}

/* agent-workspace-live.css */
/* Approved v2.2 hierarchy inside the authenticated public shell. */
.a-bottomnav.a-bottomnav-agent {grid-template-columns:repeat(4,minmax(0,1fr));}
.ag-sidebar {border-top:1px solid var(--border);margin-top:24px;padding-top:17px;min-height:0;overflow:hidden;display:flex;flex-direction:column;flex:1;}
.ag-history-head {display:flex;align-items:center;justify-content:space-between;gap:5px;padding:0 7px 8px 11px;flex-shrink:0;}
.ag-history-head h2 {font-size:11px;font-weight:500;color:var(--muted);margin:0;}
.ag-history-head button {display:flex;align-items:center;gap:4px;padding:6px;border-radius:5px;min-height:32px;color:#c2b2dc;font-size:11px;}
.ag-history-head button:hover {background:var(--surface);}
.ag-session-list {display:grid;grid-template-columns:minmax(0,1fr);gap:3px;min-width:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;}
.ag-session {display:flex;width:100%;min-width:0;min-height:36px;padding:8px 11px;font-size:12px;text-align:left;color:var(--muted);border-radius:6px;}
.ag-session>span {min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.ag-session:hover {background:var(--surface);color:var(--text);}
.ag-session.active {background:#22202b;color:var(--text);}
.ag-paging {display:flex;align-items:center;gap:5px;flex-shrink:0;margin-top:12px;font-size:10px;color:var(--muted);}
.ag-paging label {display:none;}
.ag-paging select {width:43px;padding:3px;border-radius:5px;font-size:10px;}
.ag-paging button {padding:5px;display:flex;align-items:center;justify-content:center;min-width:24px;min-height:28px;}
.ag-paging span {white-space:nowrap;}
body[data-workspace="agent"] {overflow:hidden;}
body[data-workspace="agent"] .a-layout {height:100dvh;min-height:0;}
body[data-workspace="agent"] .a-sidebar {height:100dvh;min-height:0;}
body[data-workspace="agent"] .a-sidebar>nav {flex-shrink:0;}
body[data-workspace="agent"] .a-body {height:100dvh;min-height:0;display:flex;flex-direction:column;}
body[data-workspace="agent"] .a-header {flex-shrink:0;}
body[data-workspace="agent"] .a-main {flex:1;min-height:0;max-width:none;margin:0;padding:0;display:flex;overflow:hidden;}
body[data-workspace="agent"] .a-foot {display:none;}
.ag-workspace {display:flex;flex-direction:column;flex:1;min-width:0;min-height:0;}
.ag-frame {display:flex;flex:1;min-width:0;min-height:0;}
.ag-taskbar>button {border:1px solid var(--border-strong);border-radius:7px;padding:5px 10px;font-size:11px;flex-shrink:0;}
.ag-task-controls {display:flex;align-items:center;gap:7px;margin-left:auto;flex-shrink:0;}
.ag-task-controls button {border:1px solid var(--border-strong);border-radius:7px;padding:5px 9px;font-size:11px;min-height:32px;}
.ag-task-status {font-size:10px;color:var(--muted);}
.ag-occupancy {max-width:800px;margin:0 auto 10px;padding:10px 12px;border:1px solid #5a486b;border-radius:8px;background:#231b2e;display:flex;align-items:center;gap:10px;font-size:11px;color:#cfb9e2;}
.ag-occupancy span {flex:1;}
.ag-occupancy button {text-decoration:underline;white-space:nowrap;font-size:10px;}
.ag-dialog>p {font-size:12px;color:var(--muted);line-height:1.9;max-width:64ch;}
@media(max-width:680px){.ag-task-controls{gap:4px;}.ag-task-controls button{font-size:10px;padding:5px 7px;}.ag-task-status{max-width:85px;}.ag-taskbar>span{display:none;}}
.ag-file-card {display:flex;align-items:center;gap:12px;width:100%;max-width:800px;margin:12px auto;padding:12px 14px;background:#201a2b;border:1px solid #40324f;border-radius:10px;text-align:left;min-width:0;}
.ag-file-card>span:nth-child(2){min-width:0;flex:1;overflow-wrap:anywhere;}
.ag-file-card strong {font-size:12px;font-weight:500;display:block;}
.ag-file-card small {font-size:10px;color:var(--muted);display:block;margin-top:3px;}
.ag-file-icon {border:1px solid #65527a;border-radius:5px;padding:8px 5px;font-size:9px;color:#cfb3ed;flex-shrink:0;}
.ag-workbench {width:340px;flex-shrink:0;display:flex;flex-direction:column;min-width:0;background:#15121c;border-left:1px solid var(--border);}
.ag-workbench>header {display:flex;align-items:center;justify-content:space-between;padding:14px 18px;border-bottom:1px solid var(--border);font-size:12px;}
.ag-workbench button:not(.ag-file-card){border:1px solid var(--border-strong);padding:6px 10px;border-radius:7px;font-size:11px;min-height:32px;}
.ag-workbench>header button {border:0!important;font-size:20px!important;}
.ag-file-tabs {display:flex;gap:7px;padding:12px 16px;border-bottom:1px solid var(--border);}
.ag-file-tabs [aria-selected="true"] {background:#30243e;color:#ddc9f6;}
.ag-workbench-content {overflow:auto;flex:1;padding:20px 18px;min-height:0;overflow-wrap:anywhere;}
.ag-workbench h2 {font-size:15px;line-height:1.6;font-weight:500;}
.ag-workbench p,.ag-workbench>footer {font-size:11px;color:var(--muted);}
.ag-file-meta {padding-bottom:12px;border-bottom:1px solid var(--border);}
.ag-document {white-space:pre-wrap;font-family:inherit;font-size:12px;line-height:1.9;overflow-wrap:anywhere;}
.ag-file-gallery {max-width:800px;margin:18px auto;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;}
.ag-media-card {min-width:0;padding:12px;background:#1d1826;border:1px solid #40324f;border-radius:12px;}
.ag-media-card>header {color:var(--muted);font-size:10px;margin-bottom:9px;}
.ag-media-card>strong {font-size:12px;font-weight:500;display:block;margin-top:9px;}
.ag-media-card video,.ag-workbench video {width:100%;max-height:50dvh;aspect-ratio:16/9;background:#08070b;border-radius:8px;}
.ag-media-card audio,.ag-workbench audio {display:block;width:100%;max-width:100%;color-scheme:dark;}
.ag-image-button {display:block;border:0!important;background:transparent;padding:0!important;width:100%;cursor:zoom-in;}
.ag-image-button img {display:block;width:100%;aspect-ratio:16/9;object-fit:contain;background:#0c0b11;border-radius:8px;}
.ag-media-state {display:block;color:var(--muted);font-size:10px;margin-top:7px;}
.ag-file-actions {display:flex;gap:8px;flex-wrap:wrap;margin-top:10px;}
.ag-file-actions button {padding:6px 9px;border:1px solid #514060;border-radius:7px;font-size:10px;min-height:32px;}
.ag-media-error {border:1px dashed #6c4c54;border-radius:8px;background:#271b24;padding:18px 12px;text-align:center;color:#f0bfca;font-size:12px;}
.ag-media-error p {font-size:11px;color:#c8a9b5;}
.ag-media-error button {border:1px solid #6c4c54;border-radius:7px;padding:6px 10px;font-size:11px;}
.ag-dialog {width:min(1150px,calc(100vw - 30px));max-height:92dvh;padding:24px;border:1px solid var(--border-strong);border-radius:14px;background:#1b1624;color:var(--text);}
.ag-dialog::backdrop {background:#000b;}
.ag-dialog>header {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.ag-dialog h2 {font-size:16px;font-weight:500;}
.ag-dialog>header button {font-size:24px;padding:0 8px;}
.ag-enlarged-image {display:block;max-width:100%;max-height:67dvh;object-fit:contain;margin:15px auto;background:#0c0b11;border-radius:8px;}
@media(max-width:1180px){.ag-file-gallery{grid-template-columns:minmax(0,1fr);}}
.ag-workbench>footer {padding:11px 18px;border-top:1px solid var(--border);}
@media(max-width:1180px){.ag-workbench{width:300px;}}
@media(max-width:980px){.ag-workbench{position:fixed;inset:0 0 0 auto;width:min(420px,100vw);z-index:110;box-shadow:-25px 0 80px #0008;}}
@media(max-width:680px){.ag-workbench{width:100vw;}.ag-taskbar{flex-wrap:wrap;}}
.ag-history-mobile {display:none;}
.ag-taskbar {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:15px 25px;min-height:63px;border-bottom:1px solid var(--border);}
.ag-taskbar h1 {font-size:15px;line-height:1.5;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;}
.ag-taskbar h1 {flex:1;min-width:0;}
.ag-mobile-menu {display:none;}
.ag-task-list-dialog {width:min(300px,90vw);max-height:100dvh;height:100dvh;margin:0;padding:18px 14px;border-radius:0;}
.ag-task-list-dialog .ag-session-list {max-height:70dvh;overflow:auto;}
.ag-task-list-dialog .ag-paging {justify-content:center;}
@media(max-width:980px){.ag-mobile-menu{display:block;}.ag-taskbar>span{display:none;}}
.ag-taskbar>span {flex-shrink:0;color:var(--muted);font-size:11px;}
.ag-log {overflow:auto;flex:1;min-height:0;padding:25px;}
.ag-welcome,.ag-state {text-align:center;max-width:660px;margin:clamp(30px,10vh,130px) auto 25px;}
.ag-mark {display:grid;place-items:center;width:48px;height:48px;background:#2d2048;color:#c8abff;border-radius:15px;margin:0 auto 22px;}
.ag-welcome h2,.ag-state h2 {font-size:28px;line-height:1.5;margin:0 0 13px;letter-spacing:-.5px;}
.ag-welcome p,.ag-state p {max-width:48ch;margin:0 auto;color:var(--muted);font-size:13px;line-height:1.9;}
.ag-state .btn {margin-top:18px;}
.ag-composer-wrap {padding:10px 26px 13px;}
.ag-availability {display:flex;align-items:center;gap:6px;max-width:800px;margin:0 auto 10px;color:#b5a5ca;font-size:11px;}
.ag-composer {max-width:800px;margin:0 auto;padding:12px 15px;background:var(--surface);border:1px solid var(--border-strong);border-radius:14px;}
.ag-composer textarea {border:0;padding:0;resize:none;box-shadow:none;background:transparent;min-height:66px;max-height:150px;font-size:13px;line-height:1.8;}
.ag-composer textarea:focus-visible {outline:0;}
.ag-composer:focus-within {border-color:#9471be;box-shadow:0 0 0 2px #6d43962b;}
.ag-composer-tools {display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;font-size:10px;color:var(--muted);}
.ag-composer-tools button {display:grid;place-items:center;width:34px;height:34px;background:var(--lime);color:var(--on-lime);border-radius:10px;}
.ag-composer-tools [data-agent-action="attach"] {color:#d7c1e9;background:transparent;border:1px solid var(--border-strong);}
.ag-composer-tools>span {flex:1;}
.ag-pending-materials {display:flex;flex-wrap:wrap;gap:7px;}
.ag-material-chip {display:flex;align-items:center;gap:7px;max-width:100%;background:#292134;border:1px solid #4d3a5f;border-radius:7px;padding:4px 8px;margin-bottom:9px;font-size:11px;}
.ag-material-chip>span {max-width:220px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
.ag-material-chip small {font-size:9px;color:var(--muted);}
.ag-material-chip button {font-size:11px;color:#d3b9ea;}
.ag-draft-state {max-width:800px;margin:6px auto 0;font-size:10px;color:var(--muted);min-height:18px;}
.ag-draft-state button {margin-left:8px;text-decoration:underline;color:#c2a5ed;}
.ag-conflict {padding:10px;margin-top:8px;background:#282333;border:1px solid #55436a;border-radius:8px;max-height:180px;overflow:auto;}
.ag-conflict p {margin:0 0 5px;}
.ag-conflict pre {white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;}
.ag-auth {margin:auto;padding:32px;max-width:600px;}
.ag-auth h1 {font-size:26px;}
.ag-auth p {color:var(--muted);}
.ag-visually-hidden {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
.ag-message,.ag-plan,.ag-turn {max-width:800px;margin:0 auto 22px;min-width:0;overflow-wrap:anywhere;}
.ag-message-user .ag-message-text {margin-left:12%;background:#24202f;border:1px solid #3a304c;border-radius:14px 14px 3px 14px;padding:13px 17px;}
.ag-message-label {font-size:11px;color:var(--muted);margin:0 0 8px;}
.ag-message-user .ag-message-label {text-align:right;}
.ag-message-text {font-size:14px;line-height:1.9;white-space:pre-wrap;}
.ag-message-materials {display:flex;justify-content:flex-end;flex-wrap:wrap;gap:7px;margin-top:8px;color:var(--muted);font-size:10px;}
.ag-message-materials span {padding:4px 7px;border:1px solid var(--border);border-radius:6px;}
.ag-run-summary {max-width:800px;margin:15px auto;border:1px solid var(--border);border-radius:10px;background:#14121c;}
.ag-run-summary summary {cursor:pointer;padding:11px 14px;font-size:12px;color:#d8c9e6;}
.ag-run-summary ol {list-style:none;margin:0;padding:0 15px 10px;border-top:1px solid var(--border);}
.ag-run-summary li {display:flex;align-items:center;gap:10px;justify-content:space-between;padding-top:10px;font-size:11px;}
.ag-run-summary small {color:var(--muted);font-size:10px;}
.ag-plan {margin-top:18px;padding:20px;background:var(--surface);border:1px solid var(--border-strong);border-radius:14px;}
.ag-plan.ag-budget {border-color:#596637;background:#1b2015;}
.ag-budget>p strong {color:var(--lime);font-size:18px;}
.ag-service-inputs {margin:10px 0;font-size:12px;line-height:1.8;}
.ag-service-inputs dt {color:var(--muted);font-size:10px;margin-top:10px;}
.ag-service-inputs dd {margin:2px 0;white-space:pre-wrap;overflow-wrap:anywhere;color:#ddd1e6;}
.ag-source-state {font-size:11px;color:var(--muted);line-height:1.8;}
.ag-plan>header,.ag-plan-step>div:first-child {display:flex;align-items:center;justify-content:space-between;gap:12px;}
.ag-plan h3 {font-size:15px;margin:0;}
.ag-plan>header>span,.ag-plan-explain {color:var(--muted);font-size:11px;line-height:1.7;}
.ag-plan>p {font-size:12px;line-height:1.8;}
.ag-plan-step {padding:15px 0;border-top:1px solid var(--border);font-size:12px;}
.ag-plan-step>div:first-child>span {white-space:nowrap;color:#d0b4f6;}
.ag-plan details {margin:10px 0;color:var(--muted);}
.ag-plan pre {white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.8 monospace;padding:10px;background:var(--bg);border-radius:6px;}
.ag-plan button,.ag-turn button,.ag-log>button {padding:8px 12px;border:1px solid var(--border-strong);border-radius:7px;margin:4px 7px 4px 0;font-size:11px;color:#dbd2eb;}
.ag-plan button:hover,.ag-turn button:hover {background:#30243e;}
.ag-plan button[data-agent-action="approve-plan"],.ag-plan button[data-agent-action="confirm-step"] {background:var(--lime);color:var(--on-lime);border-color:transparent;}
.ag-plan-review {padding:15px;background:#231c2e;border-radius:10px;margin-top:13px;}
.ag-plan-review>p {font-size:11px;line-height:1.8;color:var(--muted);}
.ag-plan-review label {display:grid;gap:7px;font-size:12px;margin-bottom:14px;}
.ag-plan-review select,.ag-plan-review input {width:100%;min-width:0;}
.ag-service-result {display:grid;gap:9px;min-width:0;}
.ag-service-result img,.ag-service-result video {display:block;max-width:100%;max-height:420px;border-radius:10px;object-fit:contain;background:#08070b;}
.ag-service-result audio {width:100%;max-width:100%;}
.ag-service-result a {font-size:11px;color:#cdb0ef;}
.ag-turn {padding:12px 15px;border-left:2px solid #9d77c6;background:#241e2d;font-size:12px;}
.ag-log [role="alert"] {max-width:800px;margin:12px auto;color:#e6c296;font-size:12px;line-height:1.8;}
.ag-composer-tools button {min-width:34px;width:auto;padding:0 8px;}
@media(max-width:980px){
  body[data-workspace="agent"] .a-body {padding-bottom:calc(70px + env(safe-area-inset-bottom));}
  .ag-history-mobile {display:flex;align-items:center;gap:6px;padding:7px 14px;border-bottom:1px solid var(--border);}
  .ag-history-mobile .ag-history-head {padding:0;flex-shrink:0;}
  .ag-history-mobile h2 {display:none;}
  .ag-history-mobile .ag-session-list {display:flex;flex:1;overflow-x:auto;scrollbar-width:none;}
  .ag-history-mobile .ag-session {width:auto;max-width:150px;flex-shrink:0;padding:6px 9px;min-height:31px;font-size:10px;}
  .ag-history-mobile .ag-paging {margin:0;font-size:9px;gap:1px;}
  .ag-history-mobile .ag-paging select {width:35px;}
  .ag-taskbar {padding:10px 16px;min-height:50px;}
  .ag-taskbar h1 {font-size:13px;}
  .ag-taskbar>span {display:none;}
  .ag-welcome h2,.ag-state h2 {font-size:24px;}
  .ag-log {padding:18px;}
  .ag-composer-wrap {padding:8px 13px;}
  .ag-availability {font-size:10px;}
  .ag-composer {padding:11px 12px;}
  .ag-composer textarea {min-height:56px;font-size:12px;}
  .ag-plan {padding:13px;}
  .ag-plan>header {align-items:flex-start;}
  .ag-message-text {font-size:13px;}
}

/* workspace-refresh-live.css */
/* Approved v2 presentation. No fixture records or preview runtime. */
.single-video-fields{border:0;padding:0;margin:0;min-width:0}
.vg-submit-action [role="status"]{font-size:12px;line-height:1.5;color:#b9c4d4;margin:0 0 8px}
.vg-submit-action{display:flex;flex-direction:column}
.vg-submit-action #vg-submit-hint{order:2;margin:5px 0 0}
.workspace-refresh .source-heading{display:flex;align-items:center;gap:8px}
.workspace-refresh .tr-source-panel h2{font-size:17px;margin:0 0 14px}
@media(max-width:980px){
 .a-main:has(.workspace-refresh){padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 .vg-submit-action [role="status"]{font-size:10px}
}

/* Single-page video enhancement, matching the selected desktop/mobile design. */
.up-page{--up-lime:#d5fc31}
.up-page [hidden]{display:none!important}
.up-page .up-main{max-width:1280px;padding:22px 30px 35px}
.up-hero{position:relative;isolation:isolate;overflow:hidden;display:flex;align-items:center;min-height:132px;margin-bottom:20px;border-radius:14px;background:#720aff}
.up-hero>img{position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:cover}
.up-hero>div{padding:22px 27px;max-width:75%}
.up-hero h1{margin:0 0 7px;font-size:42px;font-weight:850;line-height:1.2;letter-spacing:-.8px;color:#fff}
.up-hero p{margin:0;color:#fff;font-size:18px;line-height:1.5}
.up-main h2{margin:0 0 14px;font-size:17px;font-weight:750;line-height:1.5}
.up-workspace{display:grid;grid-template-columns:minmax(0,1.58fr) minmax(310px,1fr);gap:14px}
.up-source-panel,.up-settings{min-width:0;border:1px solid #343b49;border-radius:12px;padding:18px;background:#141820}
.up-sources{display:grid;grid-template-columns:minmax(0,1.2fr) 24px minmax(0,1fr);gap:10px;padding:17px;border:1px solid #343b49;border-radius:10px;background:#1b202a}
.up-sources h3{display:flex;align-items:center;gap:8px;margin:0 0 12px;color:#f2f4f7;font-size:14px;font-weight:650;line-height:1.5;min-height:24px;flex-wrap:wrap}
.up-sources h3>.vg-icon{height:22px;width:22px;flex:none}
.up-selected{color:#c9e98f;font-size:10px;line-height:1.4;font-weight:500}
.up-link-source,.up-file-source{min-width:0}
.up-link-source textarea{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:78px;height:78px;resize:vertical;padding:11px 12px;border:1px solid #40495a;border-radius:8px;color:#edf1f7;background:#171d27;font:inherit;font-size:13px;line-height:23px;overflow-wrap:anywhere;word-break:break-all}
.up-link-source textarea::placeholder{color:#a5b0c3}
.up-link-source textarea[aria-invalid="true"]{border-color:#ee9999}
.up-parse,.up-start{border:0;border-radius:8px;color:#101504;background:var(--up-lime);font:inherit;font-weight:750;cursor:pointer;min-height:44px}
.up-parse{display:block;width:100%;margin-top:10px;font-size:14px;padding:8px 15px}
.up-parse:disabled,.up-start:disabled{background:#465022;color:#bbc591;cursor:not-allowed}
.up-or{align-self:center;text-align:center;color:#c4ccda;font-size:13px}
.up-file-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}
.up-drop{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;min-height:132px;padding:14px 8px;border:1px dashed #68748a;border-radius:8px;background:#181e28;text-align:center;color:#edf1f7;cursor:pointer}
.up-drop>.vg-icon{width:32px;height:32px;margin-bottom:4px}
.up-drop strong{font-size:13px;line-height:1.6;font-weight:650}
.up-drop small{color:#b8c3d7;font-size:11px;line-height:1.5}
.up-drop:hover,.up-drop.is-dragging{border-color:var(--up-lime);background:#222b25}
.up-file-source:has(.up-file-input:focus-visible) .up-drop{outline:2px solid var(--up-lime);outline-offset:4px}
.up-media-list{min-width:0}
.up-file-source .mp-preview video{height:145px}
.up-file-source .mp-content{padding:8px}
.up-file-source .mp-actions{gap:6px}
.up-file-source .mp-actions button{min-height:34px;font-size:11px}
.up-file-source .mp-detail{font-size:10px}
.up-settings{display:flex;flex-direction:column}
.up-settings-content{display:flex;flex-direction:column;flex:1;min-width:0}
.up-settings fieldset{min-width:0;padding:0;border:0;margin:0 0 18px}
.up-settings legend{padding:0;margin-bottom:10px;font-size:13px;font-weight:650}
.up-options{display:grid;gap:7px}
.up-resolutions{grid-template-columns:repeat(3,minmax(0,1fr))}
.up-framerates{grid-template-columns:repeat(3,minmax(0,1fr))}
.up-options label{position:relative;display:flex;align-items:center;justify-content:center;min-height:42px;gap:6px;min-width:0;padding:7px 5px;border:1px solid #414b5e;border-radius:8px;background:#1c232e;cursor:pointer;color:#eef3fa;font-size:13px;white-space:nowrap}
.up-options input{margin:0;width:15px;height:15px;flex:none;accent-color:var(--up-lime);cursor:pointer}
.up-options label:has(input:checked){border-color:var(--up-lime);background:#262f19;color:#f4fbdc}
.up-options label:has(input:focus-visible){outline:2px solid var(--up-lime);outline-offset:3px}
.up-action{display:grid;grid-template-columns:minmax(0,1fr) minmax(145px,1fr);align-items:center;gap:10px;border-top:1px solid #374151;padding-top:16px;margin-top:auto}
.up-cost{display:flex;flex-direction:column;gap:5px;min-width:0;font-size:12px;line-height:1.5;color:#b6c2d6}
.up-cost strong{font-weight:500;color:#f1f4fa;font-size:13px}
.up-start{display:flex;align-items:center;justify-content:center;gap:10px;font-size:15px;padding:9px 12px}
.up-start .vg-icon{width:18px;height:18px}
.up-start-hint{font-size:11px;color:#b4c0d3;text-align:right;line-height:1.5;margin:7px 0 0}
.up-output{font-size:12px;line-height:1.6;color:#c5d5ae;margin:0 0 14px;overflow-wrap:anywhere}
.up-feedback{grid-column:1/-1;padding:12px 15px;border:1px solid #5b7145;border-radius:8px;background:#202b1a;color:#d9ebc4;font-size:13px;line-height:1.7;margin:0;overflow-wrap:anywhere}
.up-note{font-size:11px;line-height:1.7;color:#becbdc;margin:10px 0 0;overflow-wrap:anywhere}
.up-clear{border:0;background:none;color:#ffb5b5;padding:5px 0;margin-top:5px;font:inherit;font-size:11px;cursor:pointer;min-height:30px}
.up-comparison{margin-top:23px}
.up-section-heading{display:flex;align-items:center;gap:16px;margin-bottom:12px;flex-wrap:wrap}
.up-section-heading h2{margin:0}
.up-section-heading p{font-size:12px;line-height:1.5;color:#b7c5db;margin:0}
.up-player{position:relative;isolation:isolate;margin:0;overflow:hidden;border:1px solid #454b43;border-radius:12px;background:#080c0b;aspect-ratio:8/3}
.up-player>video,.up-before-clip,.up-before-clip>video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}
.up-before-clip{clip-path:inset(0 calc(100% - var(--up-split)) 0 0)}
.up-before-label,.up-after-label{position:absolute;top:15px;z-index:3;border:1px solid #8d9b7680;background:#10190be0;color:#fff;padding:7px 14px;border-radius:9px;font-size:13px;font-weight:650;line-height:1.5;pointer-events:none}
.up-before-label{left:15px}.up-after-label{right:15px}
.up-divider{position:absolute;top:0;bottom:46px;left:var(--up-split);border-left:2px solid #fff;pointer-events:none}
.up-divider>span{position:absolute;top:50%;left:-1px;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:40px;height:40px;border:2px solid #eee;border-radius:50%;background:#171a14bd;gap:0;color:#fff}
.up-divider .vg-icon{width:17px;height:17px}.up-divider .vg-icon:first-child{transform:rotate(180deg)}
.up-split{appearance:none;position:absolute;inset:0 0 46px;width:100%;height:calc(100% - 46px);padding:0;margin:0;opacity:0;cursor:ew-resize;z-index:4;touch-action:pan-y}
.up-player:has(.up-split:focus-visible){outline:3px solid var(--up-lime);outline-offset:4px}
.up-big-play{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;width:54px;height:54px;border:1px solid #ffffffb0;border-radius:50%;background:#10150bbd;color:#fff;cursor:pointer;z-index:5}
.up-big-play .vg-icon{width:25px;height:25px}
.up-player.is-playing .up-big-play{display:none}
.up-player-controls{position:absolute;left:0;right:0;bottom:0;z-index:6;display:flex;align-items:center;gap:12px;min-height:46px;padding:0 12px;background:#080d0cda;color:#fff}
.up-player-controls button{display:flex;align-items:center;justify-content:center;gap:6px;flex:none;min-width:42px;min-height:44px;border:0;background:none;color:#fff;font:inherit;font-size:12px;padding:5px;cursor:pointer}
.up-player-controls button:disabled{opacity:.5;cursor:wait}
.up-player-controls .vg-icon{width:18px;height:18px}
.up-player-controls #up-time{white-space:nowrap;flex:none;font-size:12px;font-variant-numeric:tabular-nums}
.up-player-controls input[type="range"]{min-width:0;width:100%;height:30px;accent-color:var(--up-lime);cursor:pointer;margin:0}
.up-player-status{position:absolute;bottom:55px;left:15px;right:15px;z-index:8;padding:9px 12px;background:#10150ee8;color:#fff;font-size:12px;line-height:1.5;text-align:center;border-radius:6px}
.up-player:fullscreen{width:100vw;height:100vh;aspect-ratio:auto;border:0;border-radius:0}
.up-player:fullscreen>video,.up-player:fullscreen .up-before-clip>video{object-fit:contain}
.up-demo-note{margin:7px 0 0;color:#a9b8ca;font-size:11px;line-height:1.5}
.up-recent{margin-top:25px}
.up-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;gap:6px;padding:18px;border:1px solid #343d4c;border-radius:10px;background:#141a23;color:#b9c6d9;text-align:center}
.up-empty>.vg-icon{width:25px;height:25px}.up-empty strong{font-size:13px;font-weight:500}.up-empty p{margin:0;font-size:12px;line-height:1.6}
.up-page .a-foot{margin-top:25px}
.up-page .export-toolbar{position:static;width:fit-content;max-width:calc(100% - 40px);margin:15px 20px 22px auto;box-shadow:none}
.up-page :is(button,a,textarea,input):focus-visible{outline:2px solid var(--up-lime);outline-offset:3px}
@media(min-width:981px) and (max-width:1250px){
 .up-page .up-main{padding-inline:24px}.up-workspace{grid-template-columns:minmax(0,1.4fr) minmax(300px,1fr)}
 .up-source-panel,.up-settings{padding:14px}.up-sources{padding:13px;gap:8px;grid-template-columns:minmax(0,1.1fr) 14px minmax(0,1fr)}
 .up-options{gap:5px}.up-options label{font-size:12px;gap:4px;padding-inline:3px}.up-sources h3{font-size:13px;gap:5px}.up-hero h1{font-size:38px}
}
@media(max-width:980px){
 .up-page .up-main{padding:18px max(20px,env(safe-area-inset-right)) 95px max(20px,env(safe-area-inset-left))}
 .up-workspace{grid-template-columns:minmax(0,1.3fr) minmax(260px,1fr);gap:12px}
 .up-source-panel,.up-settings{padding:13px}.up-sources{padding:12px;grid-template-columns:minmax(0,1fr);gap:10px}
 .up-or{display:flex;align-items:center;gap:12px;font-size:12px}.up-or::before,.up-or::after{content:"";height:1px;flex:1;background:#414b5b}
 .up-action{grid-template-columns:minmax(0,1fr);gap:10px}.up-cost{flex-direction:row;justify-content:space-between;flex-wrap:wrap}
 .up-resolutions{grid-template-columns:repeat(3,minmax(0,1fr))}.up-options label{min-height:44px}
 .up-hero{min-height:110px}.up-hero h1{font-size:34px}.up-hero p{font-size:15px}.up-hero>div{padding:20px 22px}
 .up-player{aspect-ratio:16/9}
 .up-page .a-bottomnav{min-height:calc(64px + env(safe-area-inset-bottom));height:calc(64px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);z-index:100}
 .up-page .a-foot{display:none}.up-page .export-toolbar{margin-bottom:90px}
}
@media(max-width:600px){
 .up-page .up-main{padding-top:15px}.up-hero{min-height:94px;margin-bottom:17px;border-radius:11px}.up-hero>div{padding:16px;max-width:78%}
 .up-hero h1{font-size:32px;letter-spacing:-.5px;margin-bottom:5px}.up-hero p{font-size:12px;line-height:1.6}.up-hero>img{left:-100%;right:auto;width:200%;max-width:none;object-position:center}
 .up-workspace{grid-template-columns:minmax(0,1fr);gap:18px}.up-main h2{font-size:16px;margin-bottom:10px}
 .up-source-panel,.up-settings{padding:0;background:none;border:0}.up-sources,.up-settings-content{padding:13px;border-radius:10px;border:1px solid #343b49;background:#141820;gap:12px}
 .up-settings-content{gap:0}
 .up-sources h3{font-size:14px;gap:8px;margin-bottom:8px}.up-sources h3>.vg-icon{width:20px;height:20px}
 .up-link-source textarea{min-height:64px;height:64px;padding:9px 11px;line-height:22px}
 .up-parse{margin-top:8px}.up-drop{min-height:112px;gap:5px;padding:12px}.up-drop>.vg-icon{width:28px;height:28px;margin-bottom:1px}
 .up-drop strong{font-size:14px}.up-drop small{font-size:12px}.up-options label{font-size:14px;min-height:44px}
 .up-settings fieldset{margin-bottom:16px}.up-settings legend{font-size:14px;margin-bottom:8px}.up-options{gap:7px}
 .up-action{grid-template-columns:minmax(0,1fr) minmax(145px,1fr);padding-top:12px}.up-cost{flex-direction:column;gap:4px;font-size:11px}.up-cost strong{font-size:12px}
 .up-start{font-size:14px;gap:5px}.up-start-hint{font-size:10px;margin-top:6px}.up-section-heading{gap:4px;margin-bottom:10px}.up-section-heading h2{margin:0;font-size:15px}.up-section-heading p{font-size:11px}
 .up-comparison{margin-top:21px}.up-player{border-radius:10px}.up-before-label,.up-after-label{top:9px;padding:5px 8px;font-size:10px;border-radius:6px}.up-before-label{left:9px}.up-after-label{right:9px}
 .up-player-controls{gap:5px;min-height:44px;padding:0 7px}.up-player-controls #up-time{font-size:10px}.up-player-controls button{padding:3px;min-width:36px}.up-player-controls #up-play span:not(.vg-icon){display:none}.up-player.is-playing #up-play span:not(.vg-icon){display:inline}
 .up-divider{bottom:44px}.up-divider>span{width:32px;height:32px}.up-divider .vg-icon{width:14px;height:14px}.up-split{bottom:44px;height:calc(100% - 44px)}.up-big-play{width:43px;height:43px}.up-big-play .vg-icon{width:21px;height:21px}
 .up-recent{margin-top:21px}.up-empty{padding:15px}.up-empty p{font-size:11px}.up-demo-note{font-size:10px}
 .up-file-source .mp-preview video{height:180px}
}

/* Shared local media state: actual read progress, metadata and contained preview. */
.mp-card{min-width:0;overflow:hidden;border:1px solid #373d4b;border-radius:10px;background:#151922;color:#edf0f6}
.mp-preview{display:flex;align-items:center;justify-content:center;min-height:80px;background:#080a0e;color:#b9c3d4}
.mp-preview>.vg-icon{width:32px;height:32px}
.mp-preview video,.mp-preview img{display:block;width:100%;height:180px;object-fit:contain;background:#080a0e}
.mp-zoom{display:block;width:100%;padding:0;border:0;background:#080a0e;cursor:zoom-in}
.mp-content{padding:10px 11px;display:grid;gap:5px;min-width:0}
.mp-filename{display:block;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:1.5;font-weight:600}
.mp-status{font-size:12px;line-height:1.4;color:#c4ccda}
.mp-card[data-state="ready"] .mp-status{color:#a5e783}
.mp-card[data-state="error"] .mp-status,.mp-card[data-state="error"] .mp-detail{color:#ffb1b1}
.mp-detail{font-size:11px;line-height:1.5;overflow-wrap:anywhere;color:#aeb9cc}
.mp-progress{width:100%;height:8px;accent-color:#d5fc31;border:0;border-radius:8px;overflow:hidden;background:#373f51}
.mp-progress::-webkit-progress-bar{background:#373f51;border-radius:8px}
.mp-progress::-webkit-progress-value{background:#d5fc31;border-radius:8px}
.mp-actions{display:flex;gap:7px;flex-wrap:wrap;align-items:center;margin-top:1px}
.mp-actions button{min-height:32px;padding:4px 7px;background:none;border:1px solid #454e60;border-radius:6px;font:inherit;font-size:11px;color:#dbe2f0;cursor:pointer}
.mp-actions button:hover{border-color:#d5fc31;color:#d5fc31}
.mp-actions button.mp-remove{color:#ffb8b8}
.mp-actions [hidden],.mp-content [hidden]{display:none!important}
.mp-lightbox{max-width:94vw;max-height:94vh;padding:48px 12px 12px;border:1px solid #596377;border-radius:12px;background:#10141d;color:#fff}
.mp-lightbox::backdrop{background:#000c}
.mp-lightbox img{display:block;max-width:86vw;max-height:76vh;object-fit:contain}
.mp-lightbox-close{position:absolute;right:12px;top:10px;min-height:32px;padding:5px 14px;background:#252d3c;color:#fff;border:1px solid #596377;border-radius:6px;cursor:pointer}
.vg-file-list .mp-preview img,.vg-file-list .mp-preview video{height:160px}
[data-vg-group="images"] .mp-preview img{height:100px}
[data-vg-group="images"] .mp-content{padding:7px;gap:4px}
[data-vg-group="images"] .mp-filename{font-size:11px}
[data-vg-group="images"] .mp-detail{font-size:10px}
[data-vg-group="images"] .mp-card{position:relative}
[data-vg-group="images"] .mp-card[data-state="ready"] .mp-detail{display:none}
[data-vg-group="images"] .mp-card[data-state="ready"] .mp-status{position:absolute;left:4px;top:76px;padding:2px 4px;border-radius:4px;background:#0b160ee8;font-size:9px}
[data-vg-group="images"] .mp-card[data-state="ready"] .mp-actions{position:absolute;right:4px;top:4px;margin:0}
[data-vg-group="images"] .mp-card[data-state="ready"] .mp-actions button{min-height:27px;background:#151922eb;font-size:10px;padding:3px 5px}
[data-vg-group="images"] .mp-card[data-state="ready"] .mp-content{padding:6px 7px;display:block}
.vg-file-list .mp-card{align-self:start}

/* Approved compact translation workspace, shared by all existing translate routes. */
.tr-page{--lime:#d5fc31}
.tr-page [hidden]{display:none!important}
.tr-page .tr-main{max-width:1180px;padding:26px 30px 35px}
.tr-hero{position:relative;isolation:isolate;overflow:hidden;min-height:150px;border-radius:15px;background:#6d02ff;display:flex;align-items:center;margin-bottom:22px}
.tr-hero>img{position:absolute;inset:0;z-index:-1;width:100%;height:100%;object-fit:cover;object-position:center}
.tr-hero>div{padding:22px 30px;max-width:70%}
.tr-hero h1{font-size:50px;line-height:1.2;letter-spacing:-1px;margin:0 0 8px;font-weight:850;color:#fff}
.tr-hero p{font-size:19px;line-height:1.5;margin:0;color:#fff}
.tr-form.creation-workspace{display:block;padding:0;background:none;border:0;border-radius:0;box-shadow:none;max-width:none}
.tr-main h2{font-size:17px;line-height:1.5;margin:0 0 12px;font-weight:700}
.tr-sources{display:grid;grid-template-columns:minmax(0,1fr) 32px minmax(0,1fr);gap:14px;align-items:stretch}
.tr-source{min-width:0;padding:16px 18px;background:#171a23;border:1px solid #373b48;border-radius:12px;min-height:174px}
.tr-source.is-selected{border-color:#69794b}
.tr-source h3{display:flex;align-items:center;justify-content:space-between;gap:7px;margin:0 0 14px;font-size:16px;line-height:1.5;font-weight:650}
.tr-source h3 label{display:flex;align-items:center;gap:9px;cursor:pointer;min-width:0}
.tr-source h3 input{position:absolute;width:1px;height:1px;opacity:0}
.tr-source h3 label:has(input:focus-visible){outline:2px solid #d5fc31;outline-offset:4px;border-radius:4px}
.tr-selected{font-size:10px;color:#c6e887;white-space:nowrap;font-weight:400}
.vg-icon-link{--vg-icon:url('assets/workspace-refresh/link.fc61234a78d3.svg')}
.vg-icon-file{--vg-icon:url('assets/workspace-refresh/file.07be73221931.svg')}
.tr-source h3 .vg-icon{width:22px;height:22px}
.tr-link-row{display:flex;flex-direction:column;gap:9px;align-items:stretch}
.tr-link-row textarea{box-sizing:border-box;min-width:0;width:100%;border:1px solid #444b5b;border-radius:9px;background:#20232e;color:#f1f3f7;padding:11px 13px;font:inherit;font-size:14px;line-height:22px;height:68px;min-height:68px;resize:vertical;overflow-wrap:anywhere;word-break:break-all;outline-offset:2px}
.tr-link-row textarea::placeholder{color:#a0a9bb}
.tr-link-row textarea[aria-invalid="true"]{border-color:#ed8a8a}
.tr-link-row textarea:focus-visible{outline:2px solid #d5fc31;outline-offset:3px}
.tr-parse{align-self:flex-end;flex:none;width:78px;height:46px;padding:10px 12px;border:0;border-radius:9px;background:var(--lime);color:#121703;font:inherit;font-size:14px;font-weight:750;cursor:pointer}
.tr-parse:disabled{background:#455222;color:#bcc896;cursor:not-allowed}
.tr-link-note{font-size:12px;color:#bec8da;line-height:1.7;margin:14px 0 0;overflow-wrap:anywhere}
.tr-clear{margin-top:8px;border:0;background:none;padding:4px 0;color:#ffb8b8;font:inherit;font-size:12px;cursor:pointer;min-height:28px}
.tr-or{display:flex;align-items:center;justify-content:center;font-size:14px;color:#b7c0d0}
.tr-page .tr-drop{min-height:110px;padding:12px;gap:5px;background:#1c202b}
.tr-drop>.vg-icon{width:29px;height:29px}
.tr-drop strong{font-size:14px}
.tr-source-file:has(.tr-media-list:not([hidden])){padding:14px}
.tr-source-file .mp-preview video{height:180px}
.tr-source-file .mp-card{background:#141923}
.tr-source-file .mp-content{padding:9px 11px}
.tr-source-file .mp-filename{font-size:13px}
.tr-source-file .mp-preview:has(>.vg-icon){min-height:54px}
.tr-source-file .mp-status{font-size:12px}
.tr-source-file .mp-actions{justify-content:flex-end;gap:8px}
.tr-source-file .mp-actions button{min-height:30px}
.tr-controls{display:grid;grid-template-columns:minmax(200px,1.2fr) minmax(140px,.8fr) minmax(175px,1fr) minmax(160px,.9fr);align-items:center;gap:18px;margin-top:22px;padding:20px 0;border-top:1px solid #2d333e;border-bottom:1px solid #2d333e}
.tr-language{display:flex;align-items:center;gap:13px;min-width:0;font-size:16px;font-weight:650;white-space:nowrap}
.tr-language select{width:100%;min-width:85px;flex:1;height:46px;background:#1e222d;border:1px solid #50586a;border-radius:8px;color:#f3f4f6;padding:8px 11px;font:inherit;cursor:pointer;color-scheme:dark}
.tr-subtitle{display:flex;align-items:center;gap:10px;font-size:14px;white-space:nowrap;cursor:pointer;min-height:44px}
[lang="en"] .tr-subtitle{white-space:normal;line-height:1.4}
.tr-subtitle input{appearance:auto;accent-color:var(--lime);width:21px;height:21px;flex:none;cursor:pointer;margin:0}
.tr-price{padding-left:18px;border-left:1px solid #333946;min-width:0;font-size:13px}
.tr-price strong{color:var(--lime);font-size:26px;font-weight:800;vertical-align:-1px}
.tr-price small{display:block;color:#bac4d7;font-size:10px;line-height:1.6;margin-top:3px}
.tr-submit{position:relative;min-width:0}
.tr-start{display:flex;gap:12px;align-items:center;justify-content:center;width:100%;min-height:46px;padding:10px 12px;font:inherit;font-size:16px;font-weight:800;border:0;border-radius:9px;background:var(--lime);color:#111702;cursor:pointer}
.tr-start:disabled{background:#46521f;color:#bac58e;cursor:not-allowed}
.tr-submit>p{margin:6px 0 0;color:#b4bfd2;text-align:center;font-size:10px;line-height:1.4}
.tr-feedback{padding:13px 15px;border:1px solid #4d6035;border-radius:8px;background:#1d2817;color:#d4ecb2;font-size:13px;line-height:1.7;margin:14px 0 0;overflow-wrap:anywhere}
.tr-recent{margin-top:21px}
.tr-empty{min-height:120px;padding:17px 20px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;border:1px solid #353c49;border-radius:10px;background:#151922;color:#b9c5d8;text-align:center}
.tr-empty>.vg-icon{width:26px;height:26px}
.tr-empty strong{font-size:14px;font-weight:500}
.tr-empty p{font-size:12px;margin:0;line-height:1.5;color:#aab6cc}
.tr-page .a-foot{margin-top:25px}
.tr-page .export-toolbar{position:static;width:fit-content;max-width:calc(100% - 40px);margin:12px 20px 25px auto;box-shadow:none}
.tr-page button:focus-visible,.tr-page input:focus-visible,.tr-page select:focus-visible,.mp-actions button:focus-visible,.mp-zoom:focus-visible{outline:2px solid #d5fc31;outline-offset:3px}
@media(min-width:981px) and (max-width:1240px){
 .tr-page .tr-main{padding-inline:24px}
 .tr-controls{gap:13px;grid-template-columns:minmax(180px,1.1fr) minmax(130px,.8fr) minmax(125px,.8fr) minmax(140px,.9fr)}
 .tr-language{gap:10px;font-size:13px}
 .tr-price{padding-left:12px}
 .tr-subtitle{font-size:12px;gap:7px}
 .tr-hero h1{font-size:38px}.tr-hero p{font-size:16px}
}
@media(max-width:980px){
 .tr-page .tr-main{padding:20px max(20px,env(safe-area-inset-right)) 100px max(20px,env(safe-area-inset-left))}
 .tr-hero{min-height:116px;margin-bottom:18px}
 .tr-hero>div{padding:18px 22px;max-width:75%}
 .tr-hero h1{font-size:34px}.tr-hero p{font-size:14px}
 .tr-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px 20px;padding:17px 0;margin-top:18px}
 .tr-price{padding-left:0;border-left:0}
 .tr-language{justify-content:space-between}
 .tr-language select{max-width:210px}
 .tr-subtitle{justify-self:end;font-size:13px}
 .tr-start{min-height:44px}
 .tr-page .a-bottomnav{min-height:calc(64px + env(safe-area-inset-bottom));height:calc(64px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);z-index:100}
 .tr-page .a-foot{display:none}
 .tr-page .export-toolbar{margin-bottom:90px}
 .vg-file-list .mp-content{padding:7px}.vg-file-list .mp-preview img,.vg-file-list .mp-preview video{height:135px}
 .mp-actions button{min-height:34px}
}
@media(max-width:600px){
 .tr-page .tr-main{padding-top:16px}
 .tr-hero{min-height:94px;border-radius:12px;margin-bottom:17px}
 .tr-hero>div{padding:17px 16px;max-width:100%}
 .tr-hero>img{opacity:.8;object-position:65% center}
 .tr-hero h1{font-size:30px;letter-spacing:-.5px;margin-bottom:5px}
 .tr-hero p{font-size:11px;max-width:225px;line-height:1.6}
 .tr-main h2{font-size:14px;margin-bottom:9px}
 .tr-sources{grid-template-columns:minmax(0,1fr);gap:10px}
 .tr-source{min-height:0;padding:12px;border-radius:10px}
 .tr-source h3{font-size:13px;margin-bottom:9px;gap:5px}
 .tr-source h3 label{gap:7px}.tr-source h3 .vg-icon{width:19px;height:19px}
 .tr-link-row textarea{height:62px;min-height:62px;padding:9px 10px;font-size:13px;line-height:21px}
 .tr-parse{height:44px;width:78px;font-size:13px;padding-inline:8px}
 .tr-or{font-size:12px;gap:12px;line-height:14px}
 .tr-or::before,.tr-or::after{content:"";height:1px;flex:1;background:#333946}
 .tr-page .tr-drop{min-height:85px;padding:9px;gap:3px}
 .tr-drop>.vg-icon{width:24px;height:24px}
 .tr-drop strong{font-size:13px}.tr-drop small{font-size:11px}
 .tr-controls{gap:10px 14px;margin-top:16px;padding-top:15px}
 .tr-language{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr);justify-content:stretch;gap:7px;font-size:13px;line-height:1.4}
 .tr-language select{max-width:none;width:100%;height:44px;font-size:14px}
 .tr-subtitle{grid-column:1/-1;justify-self:start;min-height:34px;font-size:13px}
 .tr-subtitle input{width:22px;height:22px}
 .tr-price{grid-column:1/-1;font-size:13px;padding-top:8px;border-top:1px solid #303743}
 .tr-price strong{font-size:24px}.tr-price small{font-size:10px;margin-top:0}
 .tr-submit{grid-column:1/-1}
 .tr-start{min-height:44px;font-size:15px}
 .tr-submit>p{font-size:10px;margin-top:4px}
 .tr-recent{margin-top:18px}.tr-empty{min-height:95px;padding:13px 16px;gap:5px}
 .tr-empty strong{font-size:12px}.tr-empty p{font-size:11px}
 .tr-source-file .mp-preview video{height:155px}
 .tr-source-file:has(.tr-media-list:not([hidden])){padding:12px}
 .tr-source-file .mp-content{padding:8px}.tr-source-file .mp-filename{font-size:12px}
 .tr-source-file .mp-detail{font-size:10px}.tr-source-file .mp-actions{gap:7px}
 .tr-link-note{font-size:11px;margin-top:9px}
 [data-vg-group="images"] .vg-file-list{grid-template-columns:repeat(2,minmax(0,1fr))}
 [data-vg-group="images"] .mp-preview img{height:80px}
 .vg-references:has(.has-files){grid-template-columns:minmax(0,1fr)}
 .vg-references:has(.has-files) [data-vg-group="images"] .vg-file-list{grid-template-columns:repeat(3,minmax(0,1fr))}
 [data-vg-group="images"] .mp-card[data-state="ready"] .mp-status{top:57px;font-size:9px}
 [data-vg-group="images"] .mp-actions{gap:4px}
 [data-vg-group="images"] .mp-actions button{padding-inline:4px;font-size:10px;min-height:32px}
 .vg-file-list .mp-filename{font-size:10px}.vg-file-list .mp-status,.vg-file-list .mp-detail{font-size:10px}
 .vg-file-list .mp-actions{gap:4px}.vg-file-list .mp-actions button{font-size:10px;padding:4px;min-height:32px}
}

/* Approved video workspace, scoped to the editable handoff pages. */
.vg-page { --lime: #d5fc31; }
.vg-page [hidden] { display: none !important; }
.vg-page .vg-main { max-width: 1180px; padding: 24px 36px 38px; }
.vg-heading { margin-bottom: 18px; }
.vg-heading h1 { margin: 0; font-size: 34px; line-height: 1.25; letter-spacing: -1px; font-weight: 800; }
.vg-heading p { margin: 8px 0 0; color: #b3b7c4; font-size: 15px; }
.vg-form { margin: 0; padding: 22px 28px 20px; border: 1px solid #292d38; border-radius: 16px; background: #161920; }
.vg-icon { display: inline-block; width: 20px; height: 20px; flex: none; background: currentColor; mask: var(--vg-icon) center / contain no-repeat; }
.vg-icon-upload { --vg-icon: url('assets/workspace-refresh/upload.4cd4ed661d41.svg'); }
.vg-icon-arrow { --vg-icon: url('assets/workspace-refresh/arrow.9b964a8b204b.svg'); }
.vg-icon-close { --vg-icon: url('assets/workspace-refresh/close.f60e6cebd40c.svg'); }
.vg-icon-play { --vg-icon: url('assets/workspace-refresh/play.d4d7e592c32e.svg'); }
.vg-icon-plus { --vg-icon: url('assets/workspace-refresh/plus.b0083ad0edf6.svg'); }
.vg-icon-expand { --vg-icon: url('assets/workspace-refresh/expand.6c199585ed80.svg'); }
.vg-modes { display: flex; align-items: stretch; gap: 10px; margin-bottom: 18px; }
.vg-mode { min-height: 46px; padding: 10px 25px; border-radius: 10px; border: 1px solid #313542; background: #1d2029; color: #f3f4f7; font: inherit; font-weight: 700; cursor: pointer; }
.vg-mode[aria-selected="true"] { background: var(--lime); color: #101405; border-color: var(--lime); }
.vg-mode:hover:not([aria-selected="true"]) { background: #282d38; }
.vg-page button:focus-visible, .vg-page a:focus-visible, .vg-choice:has(input:focus-visible), .vg-drop:focus-within { outline: 2px solid var(--lime); outline-offset: 4px; }
.vg-assets { margin-bottom: 14px; }
.vg-section-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; flex-wrap: wrap; }
.vg-section-heading h2 { margin: 0; font-size: 16px; line-height: 1.5; color: #f5f6f8; font-weight: 700; }
.vg-section-heading p { margin: 0; font-size: 13px; color: #afb5c3; }
.vg-keyframes { display: grid; grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr); gap: 14px; }
.vg-keyframes:has(.has-files) .vg-transition { align-self: start; height: 188px; }
.vg-transition { display: flex; justify-content: center; align-items: center; padding-top: 25px; color: #d8dce6; }
.vg-transition .vg-icon { width: 24px; height: 24px; }
.vg-references { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.vg-upload-group { min-width: 0; }
.vg-upload-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.vg-upload-heading h3 { font-size: 14px; line-height: 1.4; margin: 0; font-weight: 600; }
.vg-upload-heading > span { color: #adb7ca; font-size: 12px; white-space: nowrap; }
.vg-drop { position: relative; min-height: 128px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 7px; border: 1px dashed #677284; border-radius: 12px; background: #1b1f28; padding: 18px 12px; color: #cbd2df; text-align: center; cursor: pointer; transition: background .15s, border-color .15s; }
.vg-drop:hover, .vg-drop.is-dragging { border-color: var(--lime); background: #22282b; }
.vg-drop > .vg-icon { width: 34px; height: 34px; margin-bottom: 2px; }
.vg-drop strong { font-size: 15px; font-weight: 600; color: #f1f3f8; }
.vg-drop small { font-size: 12px; color: #b4bdce; line-height: 1.5; }
.vg-file-input, .vg-choice input { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.vg-help { color: #adb5c5; font-size: 12px; line-height: 1.6; margin: 7px 0 0; }
.vg-prompt-group > label { display: block; margin-bottom: 8px; color: #eff1f6; font-size: 14px; font-weight: 600; }
.vg-textarea-wrap { position: relative; }
.vg-textarea-wrap textarea { display: block; width: 100%; height: 176px; min-height: 110px; resize: vertical; background: #11141b; border: 1px solid #3b4250; border-radius: 11px; color: #f1f3f7; padding: 14px 15px 33px; font: inherit; font-size: 15px; line-height: 1.75; }
.vg-main[data-vg-mode="keyframe"] textarea, .vg-main[data-vg-mode="reference"] textarea { height: 92px; min-height: 92px; }
.vg-textarea-wrap textarea::placeholder { color: #929bad; }
.vg-textarea-wrap textarea:focus { outline: 2px solid var(--lime); outline-offset: 2px; }
.vg-description-count { position: absolute; right: 14px; bottom: 8px; color: #acb6c9; font-size: 12px; pointer-events: none; }
.vg-settings { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 26px; margin-top: 16px; }
.vg-form .vg-setting { display: block; min-width: 0; margin: 0; padding: 0; border: 0; }
.vg-setting + .vg-setting { padding-left: 26px; border-left: 1px solid #303542; }
.vg-setting legend { padding: 0; margin-bottom: 7px; font-size: 14px; line-height: 1.5; font-weight: 600; }
.vg-choices { display: flex; align-items: stretch; gap: 10px; }
.vg-choice { position: relative; display: flex; flex: 1; min-width: 0; min-height: 44px; padding: 8px 12px; gap: 10px; align-items: center; justify-content: center; color: #e8ebf2; background: #1d222c; border: 1px solid #363d4b; border-radius: 9px; cursor: pointer; font-size: 14px; font-weight: 600; }
.vg-choice:has(input:checked) { color: #f0f7d2; background: #242c18; border-color: var(--lime); box-shadow: inset 0 0 0 1px #d5fc3130; }
.vg-choice:has(input:checked) .vg-icon { color: var(--lime); }
.vg-choice input[value="portrait"] + .vg-icon { transform: rotate(90deg); }
.vg-submit { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-top: 16px; }
.vg-price { min-width: 0; font-size: 14px; }
.vg-price strong { color: var(--lime); font-size: 25px; font-weight: 800; margin: 0 3px; }
.vg-price small { display: block; color: #acb4c4; font-size: 12px; line-height: 1.6; }
.vg-submit-action { flex: 0 0 32%; position: relative; min-width: 190px; }
.vg-generate { display: flex; width: 100%; align-items: center; justify-content: center; gap: 14px; min-height: 50px; padding: 11px 22px; border: 1px solid var(--lime); border-radius: 10px; background: var(--lime); color: #101405; font: inherit; font-size: 18px; font-weight: 800; cursor: pointer; transition: filter .15s; }
.vg-generate:hover:not(:disabled) { filter: brightness(1.09); }
.vg-generate:disabled { color: #b5c18d; background: #4d5b1f; border-color: #4d5b1f; cursor: not-allowed; }
.vg-submit-hint { margin: 6px 0 0; font-size: 11px; color: #aeb8ca; text-align: center; line-height: 1.5; }
.vg-recent { border-top: 1px solid #292e39; margin-top: 24px; padding-top: 16px; }
.vg-recent .vg-section-heading { justify-content: space-between; }
.vg-recent .vg-section-heading > button { display: flex; align-items: center; gap: 7px; padding: 0; min-height: 32px; background: none; border: 0; color: #b5bdcb; font: inherit; font-size: 12px; cursor: pointer; }
.vg-recent .vg-section-heading > button:hover { color: var(--lime); }
.vg-work-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.vg-work { display: flex; min-width: 0; align-items: center; text-align: left; gap: 13px; padding: 0; color: #f1f2f6; border: 0; background: none; cursor: pointer; }
.vg-work-image { width: 44%; max-width: 145px; aspect-ratio: 16/9; object-fit: cover; border-radius: 7px; }
.vg-crop-2 { object-position: 75% 70%; }
.vg-crop-3 { object-position: 20% 50%; }
.vg-work-copy { display: grid; min-width: 0; gap: 4px; font-size: 13px; }
.vg-work-copy strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 600; }
.vg-work-copy small { color: #aeb7ca; white-space: nowrap; font-size: 10px; }
.vg-complete { color: #90dd77; font-size: 11px; }
.vg-work:hover strong { color: var(--lime); }
.vg-page .a-foot { margin-top: 28px; padding-top: 18px; }
.vg-page .export-toolbar, body:has(.hw-tools-paired) .export-toolbar { position: static; width: fit-content; margin: 12px 20px 22px auto; box-shadow: none; }
.vg-error { margin: 14px 0 0; padding: 10px 12px; border: 1px solid #9c4b4b; border-radius: 8px; background: #382125; color: #ffc1c1; font-size: 13px; }
.vg-feedback { margin: 15px 0 0; border-top: 1px solid #3b4234; padding-top: 12px; color: #d3e7ad; font-size: 13px; }
.vg-file-list { display: grid; gap: 10px; grid-template-columns: repeat(3,minmax(0,1fr)); margin-bottom: 9px; }
[data-vg-group="first"] .vg-file-list, [data-vg-group="last"] .vg-file-list, [data-vg-group="videos"] .vg-file-list { grid-template-columns: 1fr; }
.vg-media { position: relative; min-width: 0; overflow: hidden; border: 1px solid #343c49; border-radius: 10px; background: #10141b; }
.vg-media img, .vg-media video { display: block; width: 100%; aspect-ratio: 16/9; max-height: 190px; object-fit: cover; }
.vg-media video { object-fit: contain; }
.vg-media-caption { display: block; padding: 7px 9px; font-size: 11px; color: #cbd3df; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg-media-remove { position: absolute; top: 5px; right: 5px; display: grid; place-items: center; width: 30px; height: 30px; background: #12161ce8; border: 1px solid #7f8996; border-radius: 50%; color: white; cursor: pointer; }
.vg-media-remove .vg-icon { width: 17px; height: 17px; }
.vg-upload-group.has-files .vg-drop { min-height: 38px; flex-direction: row; gap: 7px; padding: 8px; }
.vg-upload-group.has-files .vg-drop > .vg-icon { width: 17px; height: 17px; margin: 0; }
.vg-upload-group.has-files .vg-drop strong { font-size: 12px; }
.vg-upload-group.has-files .vg-drop small { display: none; }
@media (max-width: 1100px) and (min-width: 981px) {
  .vg-page .vg-main { padding-inline: 26px; }
  .vg-form { padding-inline: 22px; }
  .vg-mode { padding-inline: 18px; }
  .vg-work-image { width: 38%; }
}
@media (max-width: 980px) {
  .vg-page .vg-main { padding: 22px max(20px, env(safe-area-inset-right)) 180px max(20px, env(safe-area-inset-left)); }
  .vg-page .export-toolbar { margin-bottom: 175px; }
  body:has(.hw-tools-paired) .export-toolbar { margin-bottom: 95px; }
  .vg-heading { margin-bottom: 18px; }
  .vg-heading h1 { font-size: 29px; letter-spacing: -.5px; }
  .vg-heading p { font-size: 13px; margin-top: 6px; }
  .vg-submit { position: fixed; left: 0; right: 0; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 90; margin: 0; padding: 10px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left)); border-top: 1px solid #343a47; background: #151920; box-shadow: 0 -5px 18px #00000020; gap: 12px; }
  .vg-price { font-size: 12px; }
  .vg-price strong { font-size: 21px; }
  .vg-price small { font-size: 10px; max-width: 210px; }
  .vg-submit-action { min-width: 142px; flex-basis: 40%; }
  .vg-generate { min-height: 46px; padding: 10px 14px; font-size: 15px; gap: 9px; }
  .vg-submit-hint { font-size: 10px; margin-top: 4px; }
  .vg-page .a-bottomnav { z-index: 100; min-height: calc(64px + env(safe-area-inset-bottom)); height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); }
  .vg-page .a-foot { display: none; }
}
@media (max-width: 600px) {
  .vg-page .vg-main { padding-top: 20px; }
  .vg-heading h1 { font-size: 28px; }
  .vg-heading p { display: none; }
  .vg-form { border: 0; padding: 0; background: none; border-radius: 0; }
  .vg-modes { display: grid; grid-template-columns: .95fr 1.2fr 1.05fr; gap: 5px; margin-bottom: 14px; }
  .vg-mode { padding: 9px 5px; min-height: 44px; font-size: 12px; white-space: nowrap; border-radius: 9px; }
  [lang="en"] .vg-mode { font-size: 11px; white-space: normal; line-height: 1.25; }
  .vg-section-heading { gap: 6px 10px; margin-bottom: 10px; }
  .vg-section-heading h2 { font-size: 14px; }
  .vg-section-heading p { font-size: 11px; line-height: 1.55; }
  .vg-assets { margin-bottom: 17px; }
  .vg-keyframes { grid-template-columns: minmax(0,1fr) 15px minmax(0,1fr); gap: 8px; }
  .vg-keyframes:has(.has-files) .vg-transition { height: 160px; }
  .vg-references { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .vg-transition .vg-icon { width: 17px; height: 17px; }
  .vg-upload-heading { gap: 4px; margin-bottom: 7px; }
  .vg-upload-heading h3 { font-size: 12px; }
  .vg-upload-heading > span { font-size: 10px; }
  .vg-drop { min-height: 112px; padding: 12px 8px; gap: 6px; border-radius: 10px; }
  .vg-drop > .vg-icon { width: 29px; height: 29px; }
  .vg-drop strong { font-size: 12px; }
  .vg-drop small { font-size: 10px; }
  .vg-help { font-size: 11px; line-height: 1.6; margin-top: 7px; }
  .vg-prompt-group > label { font-size: 13px; margin-bottom: 7px; }
  .vg-textarea-wrap textarea { height: 150px; min-height: 110px; padding: 12px 12px 28px; font-size: 14px; line-height: 1.7; }
  .vg-main[data-vg-mode="keyframe"] textarea, .vg-main[data-vg-mode="reference"] textarea { height: 96px; min-height: 96px; }
  .vg-prompt-group > .vg-help { display: none; }
  [data-vg-assets="reference"] > .vg-help { display: none; }
  .vg-description-count { right: 12px; font-size: 11px; bottom: 7px; }
  .vg-settings { grid-template-columns: 1fr; gap: 14px; margin-top: 17px; }
  .vg-setting + .vg-setting { padding: 0; border: 0; }
  .vg-setting legend { font-size: 13px; margin-bottom: 7px; }
  .vg-choices { gap: 10px; }
  .vg-choice { min-height: 44px; padding: 9px; font-size: 13px; gap: 9px; }
  .vg-recent { margin-top: 22px; padding-top: 14px; }
  .vg-work-list { grid-template-columns: 1fr; gap: 13px; }
  .vg-work { gap: 15px; }
  .vg-work-image { width: 116px; }
  .vg-work-copy { gap: 3px; }
  .vg-work-copy strong { font-size: 12px; }
  .vg-file-list { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
  .vg-media img, .vg-media video { max-height: 130px; }
  .vg-media-remove { width: 32px; height: 32px; }
  .vg-media-caption { padding: 6px; font-size: 10px; }
}
@media (max-width: 360px) {
  .vg-page .vg-main { padding-inline: 20px; }
  .vg-mode { font-size: 11px; padding-inline: 3px; }
  .vg-keyframes { gap: 6px; grid-template-columns: minmax(0,1fr) 12px minmax(0,1fr); }
  .vg-references { gap: 10px; }
  .vg-drop { padding-inline: 6px; }
  .vg-drop small { font-size: 9px; }
  .vg-submit { padding-inline: 20px; }
  .vg-submit-action { min-width: 132px; }
  .vg-price small { max-width: 125px; }
}
@media (prefers-reduced-motion: reduce) { .vg-page * { transition: none !important; } }

/* Shared mobile action dock: the primary action always sits above navigation. */
.tr-action{display:contents}
.up-submit-action{min-width:0}
.up-submit-action>.up-start{width:100%}
.image-action{display:contents}
@media(min-width:981px){
 .up-action.mobile-action-dock{row-gap:0}
 .up-action.mobile-action-dock .up-submit-action{display:contents}
 .up-action.mobile-action-dock .up-start-hint{grid-column:1/-1}
}
@media(max-width:980px){
 body:has(.mobile-action-dock){--mobile-nav-height:calc(64px + env(safe-area-inset-bottom));--mobile-action-height:96px;--mobile-content-clearance:calc(var(--mobile-nav-height) + var(--mobile-action-height) + 24px);padding-bottom:var(--mobile-content-clearance)}
 body:has(.mobile-action-dock) .a-bottomnav{height:var(--mobile-nav-height);min-height:var(--mobile-nav-height);padding-bottom:calc(6px + env(safe-area-inset-bottom));z-index:100;box-sizing:border-box}
 body:has(.mobile-action-dock) .a-main{padding-bottom:24px}
 body:has(.mobile-action-dock) .export-toolbar{position:static;width:fit-content;max-width:calc(100% - 40px);margin:15px 20px 24px auto;box-shadow:none}
 body:has(.mobile-action-dock) .a-foot{display:none}
 body:has(.mobile-action-dock) :is(input,textarea,select,[role="status"],.mp-card,.up-player,.tr-empty,.vg-work){scroll-margin-bottom:var(--mobile-content-clearance)}
 .mobile-action-dock{position:fixed;left:0;right:0;bottom:var(--mobile-nav-height);z-index:90;box-sizing:border-box;margin:0;padding:10px max(20px,env(safe-area-inset-right)) 10px max(20px,env(safe-area-inset-left));border:0;border-top:1px solid #343a47;border-radius:0;background:#151920;box-shadow:0 -5px 18px #00000020;max-height:calc(100dvh - var(--mobile-nav-height) - 64px);overflow-y:auto}
 .tr-action,.up-action.mobile-action-dock{display:grid;grid-template-columns:minmax(0,1fr) minmax(142px,40%);align-items:center;gap:12px}
 .tr-action .tr-price{grid-column:auto;border:0;padding:0;font-size:12px}
 .tr-action .tr-price strong{font-size:21px}
 .tr-action .tr-price small{font-size:10px;line-height:1.5;max-width:210px}
 .tr-action .tr-submit{grid-column:auto;min-width:0}
 .tr-action .tr-start,.up-action .up-start{width:100%;min-height:46px;font-size:15px;padding:10px 12px}
 .tr-action .tr-submit>p,.up-action .up-start-hint{margin:4px 0 0;text-align:center;font-size:10px;line-height:1.5}
 .up-action .up-cost{display:flex;flex-direction:column;align-items:flex-start;gap:4px;font-size:12px}
 .up-action .up-cost strong{font-size:13px}
 .image-action.mobile-action-dock{display:block}
 .image-action.mobile-action-dock>button{width:100%;min-height:46px}
 .image-action #image-error{margin:0 0 8px;line-height:1.5;max-height:72px;overflow:auto}
 .image-action #image-error:empty{display:none}
 .creation-page-footer.mobile-action-dock{display:flex;gap:10px;flex-wrap:wrap}
 .creation-page-footer.mobile-action-dock>.muted{font-size:10px;line-height:1.5}
 .h3-v2-submit.mobile-action-dock{display:grid;grid-template-columns:minmax(0,1fr) minmax(142px,40%);gap:12px}
 .h3-v2-submit.mobile-action-dock>p{margin:0;font-size:12px}
 .h3-v2-submit.mobile-action-dock>p small{font-size:10px}
 .h3-v2-submit.mobile-action-dock>.btn{min-height:46px;width:100%}
}

.vg-page{--lime:#d5fc31}.tr-page{--tr-lime:#d5fc31}.workspace-refresh{max-width:1280px;margin:auto}.workspace-refresh [hidden]{display:none!important}.workspace-refresh .mp-preview img,.workspace-refresh .mp-preview video{width:100%;max-height:220px;object-fit:contain}.workspace-refresh .mp-preview button{width:100%;border:0;background:none;padding:0;color:inherit}.workspace-refresh .local-preview-note{color:#aab6ca;font-size:12px;line-height:1.6}.workspace-refresh .tr-sources{display:grid;grid-template-columns:minmax(0,1fr) 24px minmax(0,1fr);gap:18px}.workspace-refresh .source-heading{border:0;background:none;color:inherit;font:inherit;text-align:left;cursor:pointer;padding:0}.workspace-refresh .up-main,.workspace-refresh .tr-main,.workspace-refresh .vg-main{padding:0!important;max-width:none!important}.workspace-refresh .recent-tasks{margin-top:26px}.workspace-refresh .recent-task{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 0;border-bottom:1px solid #303642}.workspace-refresh .recent-task button{border:0;background:none;color:inherit;text-align:left;cursor:pointer}.workspace-refresh .recent-task small{display:block;margin-top:5px;color:#9eaabe}.workspace-refresh .vg-modes{flex-wrap:wrap}.workspace-refresh .h3-v2-assets{padding:0;border:0;background:none}.workspace-refresh .vg-submit-action{min-width:0}.workspace-refresh fieldset:disabled{opacity:.75}.workspace-refresh .h3-compatibility{padding:12px 0;font-size:12px;color:#b4c0d3}.workspace-refresh .mp-status{font-size:12px}.workspace-refresh .mp-actions{display:flex;flex-wrap:wrap;gap:8px}.workspace-refresh .mp-actions button{border:1px solid #424b5a;background:#202733;color:#edf1f8;border-radius:6px;min-height:32px;padding:5px 10px;cursor:pointer}.workspace-refresh .up-source-panel h2{font-size:17px}.has-action-dock .a-foot{margin-bottom:18px}@media(max-width:980px){.workspace-refresh .tr-sources{grid-template-columns:1fr}.workspace-refresh .tr-or{margin:0}.workspace-refresh .tr-hero,.workspace-refresh .up-hero{margin-top:4px}.workspace-refresh .creation-page-footer.mobile-action-dock{margin:0}.workspace-refresh .vg-setting+.vg-setting{padding-left:0}.has-action-dock{padding-bottom:calc(64px + env(safe-area-inset-bottom) + var(--mobile-action-height,96px) + 24px)}.has-action-dock .a-main{padding-bottom:24px}.workspace-refresh .vg-keyframes{grid-template-columns:minmax(0,1fr) 20px minmax(0,1fr)}}
.source-meter {margin-top:20px;padding:18px 20px;border:1px solid var(--border,#30343e);border-radius:14px;background:#171a22;overflow-wrap:anywhere}
.source-meter p {margin:0 0 9px;color:#e7ecf2;font-size:14px}
.source-meter small {display:block;color:#9daabd;line-height:1.6}
.source-meter .btn {margin-top:13px}
.source-meter[data-source-meter-state="failed"] {border-color:#8c3d45}
.source-meter[data-source-meter-state="preparing"] {border-color:#787e37}
.task-price-facts {display:flex;flex-wrap:wrap;gap:5px 16px;margin:0 0 12px;max-width:100%;color:#aab6ca;line-height:1.6;overflow-wrap:anywhere}
.task-price-facts [data-task-unit-price],.task-price-facts [data-task-quantity] {display:block;font-size:13px;font-weight:400;color:#aab6ca}
.task-price-facts small {display:block;flex-basis:100%;margin:0;font-size:11px;color:#8995a8}

/* task-price-sheet-live.css */
/* Approved task price sheet; no preview data or workspace restyling. */
html:has(.tps-sheet[open]){overflow:hidden}
.tps-link{display:inline-flex;align-self:flex-start;padding:5px 0;border:0;background:none;color:#dfff40;font-family:inherit;font-size:12px;font-weight:500;line-height:1.6;cursor:pointer;white-space:nowrap}
.tps-link:hover{text-decoration:underline;text-underline-offset:4px}
.tps-sheet{--tps-line:#2c303a;padding:0;width:min(830px,calc(100vw - 48px));max-width:none;max-height:calc(100dvh - 52px);margin:auto;border:1px solid #353945;border-radius:17px;background:#14161d;color:#edf0f6;box-shadow:0 30px 100px #0008;overflow:hidden}
.tps-sheet[open]{display:flex;flex-direction:column}
.tps-sheet::backdrop{background:#06070bcc;backdrop-filter:blur(4px)}
.tps-sheet :focus-visible,.tps-link:focus-visible{outline:2px solid #dfff40;outline-offset:4px}
.tps-sheet button{cursor:pointer}
.tps-sheet-head{padding:25px 28px 21px;border-bottom:1px solid var(--tps-line);position:relative;flex-shrink:0}
.tps-sheet-head h2{font-size:23px;letter-spacing:-.4px;line-height:1.4;margin:0 40px 0 0;font-weight:650}
.tps-sheet-head p{font-size:12px;line-height:1.8;margin:8px 38px 0 0;color:#aab3c2}
.tps-close{position:absolute;top:21px;right:21px;width:34px;height:34px;display:grid;place-items:center;color:#b7bfcd;border:1px solid #363c48;background:#1d212b;border-radius:8px;font-size:24px;line-height:1}
.tps-close:hover{color:#fff;background:#2a303c}
.tps-sheet-body{min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 28px 23px;scrollbar-color:#414957 #151820;scrollbar-width:thin}
.tps-price-table{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px;line-height:1.6}
.tps-price-table col:first-child{width:25%}
.tps-price-table col:nth-child(2){width:43%}
.tps-price-table col:last-child{width:32%}
.tps-price-table thead th{padding:13px 0 10px;font-size:11px;color:#a3aebf;font-weight:400;text-align:left}
.tps-price-table thead th:last-child{text-align:right}
.tps-price-table td,.tps-price-table tbody th{padding:10px 0;text-align:left;font-weight:400;vertical-align:top;overflow-wrap:anywhere}
.tps-price-table tbody th[scope="rowgroup"]{padding-top:14px;color:#e8edf6;font-weight:500}
.tps-price-table tbody th small{display:block;font-size:10px;font-weight:400;color:#a3aebf;margin-top:4px}
.tps-price-table tbody td:nth-last-child(2){color:#aeb8c8;padding-right:12px}
.tps-price-table tbody td:last-child{text-align:right;font-variant-numeric:tabular-nums;color:#f1f4fb}
.tps-price-table tbody td:last-child b{font-size:14px;font-weight:600}
.tps-price-table tbody td:last-child span{color:#a3aebf;font-size:11px;margin-left:5px}
.tps-price-table .tps-group-start>*{border-top:1px solid var(--tps-line);padding-top:14px}
.tps-price-table .tps-group-end>*{padding-bottom:14px}
.tps-current-name{display:flex;align-items:center;gap:7px}
.tps-current-name::before{content:'';width:4px;height:13px;background:#dfff40;border-radius:2px;flex-shrink:0}
.tps-upscale{border-top:1px solid var(--tps-line);padding-top:19px;margin-top:1px}
.tps-section-title{display:flex;align-items:baseline;justify-content:space-between;gap:15px;margin-bottom:10px}
.tps-section-title h3{font-size:14px;font-weight:550;margin:0}
.tps-section-title p{margin:0;font-size:11px;color:#a3aebf}
.tps-matrix{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;border:1px solid #303641;border-radius:9px;overflow:hidden;font-size:13px;font-variant-numeric:tabular-nums}
.tps-matrix th,.tps-matrix td{text-align:right;padding:11px 16px;overflow-wrap:anywhere}
.tps-matrix th:first-child,.tps-matrix td:first-child{text-align:left;width:24%}
.tps-matrix thead th{background:#1c2029;font-weight:400;font-size:11px;color:#a3aebf}
.tps-matrix tbody th{font-weight:500;color:#b9c3d3}
.tps-matrix tbody tr:not(:last-child)>*{border-bottom:1px solid #292f3a}
.tps-matrix td{color:#edf1f9;font-weight:550}
.tps-matrix td.tps-selected{color:#dfff40;background:#232a18}
.tps-matrix td.tps-selected span{display:block;font-size:10px;font-weight:400;color:#bfd886;margin-top:2px}
.tps-compact-rate{padding:13px 15px;background:#1c2029;border:1px solid #303641;border-radius:8px;display:flex;justify-content:space-between;gap:12px;font-size:13px;color:#bdc7d7}
.tps-compact-rate strong{color:#f0f3fa;font-weight:550}
.tps-unknown{font-size:11px;color:#c6b28b}
.tps-rules{padding-top:17px;margin-top:9px;border-top:1px solid var(--tps-line);color:#a3aebf;font-size:11px;line-height:1.9}
.tps-rules p{margin:0 0 5px}
.tps-rules p:last-child{margin:0}
.tps-sheet-foot{padding:14px 28px;border-top:1px solid var(--tps-line);background:#181b23;display:flex;align-items:center;justify-content:space-between;gap:16px;flex-shrink:0}
.tps-sheet-foot p{font-size:11px;line-height:1.7;margin:0;color:#a3aebf}
.tps-return{border:1px solid #3d4655;border-radius:8px;background:#262d39;color:#e6ebf4;padding:9px 18px;font-size:12px;font-weight:550;white-space:nowrap}
.tps-return:hover{background:#323c4a}
.tps-unavailable{padding:48px 10px 35px;display:grid;justify-items:center;text-align:center;gap:12px}
.tps-unavailable h3{font-size:17px;margin:0}
.tps-unavailable p{font-size:12px;line-height:1.8;color:#a3aebf;margin:0 0 7px}
@media(max-width:700px){
  .tps-sheet{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:13px}
  .tps-sheet-head{padding:20px 17px 16px}.tps-sheet-head h2{font-size:21px}
  .tps-close{top:16px;right:13px;width:30px;height:30px}.tps-sheet-head p{font-size:11px;margin-top:7px}
  .tps-sheet-body{padding:0 17px 18px}.tps-price-table{font-size:11px}
  .tps-price-table col:first-child{width:26%}.tps-price-table col:nth-child(2){width:34%}.tps-price-table col:last-child{width:40%}
  .tps-price-table thead th{font-size:10px}.tps-price-table tbody th[scope="rowgroup"]{font-size:11px}
  .tps-price-table tbody th small{font-size:10px}.tps-price-table tbody td:last-child b{font-size:13px}
  .tps-price-table tbody td:last-child span{font-size:10px;margin-left:3px}.tps-price-table tbody td:nth-last-child(2){padding-right:7px}
  .tps-current-name{gap:5px}.tps-current-name::before{width:3px}.tps-section-title h3{font-size:12px}.tps-section-title p{font-size:10px}
  .tps-matrix th,.tps-matrix td{padding:10px 8px;font-size:12px}.tps-matrix thead th{font-size:10px}.tps-matrix th:first-child{width:26%}
  .tps-rules{font-size:11px}.tps-sheet-foot{padding:12px 17px;gap:12px}.tps-sheet-foot p{font-size:10px;max-width:200px}
  .tps-return{font-size:11px;padding:9px 14px}.tps-unavailable{padding:45px 5px 28px}.tps-unavailable p{font-size:11px}
}

/* inline-auth-live.css */
/* Approved inline authentication v2; the workspace shell remains independent. */
body[data-auth-view="true"] {padding-bottom:0;}
.ia-auth-layout {min-height:100dvh;display:flex;flex-direction:column;}
.ia-auth-header {position:sticky;top:0;z-index:20;display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:76px;padding:16px 32px;background:var(--bg);border-bottom:1px solid var(--border);}
.ia-auth-header .btn {min-height:38px;padding:6px 13px;}
.ia-auth-home {display:inline-flex;align-items:center;gap:9px;padding:0;font-size:24px;font-weight:800;}
.ia-auth-home img {object-fit:contain;}
.ia-auth-main {display:grid;place-items:center;flex:1;width:100%;min-width:0;padding:32px 24px;}
.ia-auth-footer {text-align:center;padding:16px 24px 24px;color:var(--muted);font-size:12px;}
.ia-auth-card {width:min(100%,440px);padding:30px 32px 32px;border:1px solid var(--border);border-radius:18px;background:var(--surface);box-shadow:0 16px 48px #0002;}
.ia-back {display:inline-flex;align-items:center;gap:7px;color:var(--muted);padding:0;min-height:34px;font-size:13px;text-align:left;}
.ia-back:hover,.ia-text-button:hover {color:var(--text);}
.ia-auth-card h1 {margin:20px 0 0;font-size:28px;line-height:1.3;letter-spacing:-.5px;}
.ia-auth-card h1:focus {outline:none;}
.ia-auth-description {margin:10px 0 24px;color:var(--muted);line-height:1.7;}
.ia-auth-form {display:grid;gap:18px;}
.ia-field {display:grid;gap:7px;font-size:13px;min-width:0;}
.ia-field input {width:100%;min-width:0;background:#101017;border:1px solid #3b3e4c;border-radius:9px;padding:12px 13px;min-height:46px;color:var(--text);}
.ia-field input:focus-visible,.ia-eye:focus-visible,.ia-back:focus-visible,.ia-text-button:focus-visible,.ia-auth-home:focus-visible {outline:2px solid var(--lime);outline-offset:2px;}
.ia-field small {color:var(--muted);font-size:12px;}
.ia-password-wrap {display:flex;position:relative;}
.ia-password-wrap input {padding-right:50px;}
.ia-email-code-row {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:8px;}
.ia-email-code-row .btn {min-height:46px;max-width:160px;padding:9px 12px;white-space:normal;font-size:12px;line-height:1.4;}
.ia-field small {line-height:1.65;overflow-wrap:anywhere;}
#auth-code {letter-spacing:.18em;font-variant-numeric:tabular-nums;}
.ia-auth-form .ia-notice.warning {margin:0;}
.ia-eye {position:absolute;right:4px;top:4px;width:39px;height:38px;display:grid;place-items:center;border-radius:6px;color:var(--muted);}
.ia-auth-submit {width:100%;min-height:46px;margin-top:4px;}
.ia-auth-switch {display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:24px 0 0;color:var(--muted);font-size:13px;}
.ia-text-button {padding:0;color:var(--lime);font-weight:650;}
.ia-notice {padding:12px 14px;border:1px solid #3c523b;background:#1d2a22;color:#d1e5d3;border-radius:9px;line-height:1.65;font-size:13px;overflow-wrap:anywhere;}
.ia-notice.warning {margin:0 0 20px;border-color:#675337;background:#30291d;color:#f1d9a5;}
.ia-notice.error {margin:0;border-color:#63383d;background:#301e24;color:#ffb7bf;}
.ia-auth-form [hidden] {display:none!important;}
@media(max-width:560px){
  .ia-auth-header {min-height:60px;padding:10px 16px;}
  .ia-auth-home {font-size:22px;}
  .ia-auth-home img {width:26px;height:26px;}
  .ia-auth-main {padding:20px 16px;align-items:start;}
  .ia-auth-footer {padding:12px 16px 20px;}
  .ia-auth-card {border:0;box-shadow:none;background:transparent;padding:10px 0 22px;margin:0 auto;}
  .ia-auth-card h1 {font-size:25px;}
  .ia-auth-description {margin-bottom:22px;}
}

/* public-help-live.css */
/* Approved public help. All content selectors are scoped to the help page. */
.a-foot .home-help-link {
  color: var(--muted);
  font-size: 11px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.a-foot .home-help-link:hover { color: var(--text); }
.home-help-link:focus-visible,
.home-help-back:focus-visible { outline: 2px solid #dfff40; outline-offset: 5px; }
.home-help-main { max-width: 1440px; }
.home-help-heading { margin: 0; padding-top: 7px; }
.home-help-back {
  color: #a9a9b8;
  font-size: 12px;
  text-decoration: none;
  text-underline-offset: 4px;
}
.home-help-back:hover { color: #f4f4f7; text-decoration: underline; }
.home-help-heading h1 { margin: 23px 0 8px; font-size: 28px; line-height: 1.4; letter-spacing: -.03em; }
.home-help-heading > p { margin: 0; color: #a9a9b8; font-size: 13px; line-height: 1.8; }
.home-help-main .home-search-info { margin-top: 28px; padding-top: 28px; }
.home-search-info {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #f4f4f7;
}
.home-search-info * { box-sizing: border-box; }
.home-search-info .hsi-overview,
.home-search-info .hsi-faq {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.55fr);
  gap: 44px;
  align-items: start;
}
.home-search-info h2 {
  margin: 0 0 14px;
  color: #f4f4f7;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.4;
  text-wrap: balance;
}
.home-search-info p {
  margin: 0;
  color: #a9a9b8;
  font-size: 13px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.home-search-info .hsi-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px 30px;
}
.home-search-info h3 {
  margin: 0 0 7px;
  color: #e3e3eb;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.5;
}
.home-search-info .hsi-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 18px;
  margin-top: 9px;
}
.home-search-info a {
  color: #d6c5ff;
  font-size: 12px;
  line-height: 1.8;
  text-decoration: none;
  text-underline-offset: 4px;
}
.home-search-info a::after { content: " ↗"; font-size: 11px; }
.home-search-info a:hover { color: #e7dcff; text-decoration: underline; }
.home-search-info a:focus-visible,
.home-search-info summary:focus-visible {
  outline: 2px solid #dfff40;
  outline-offset: 5px;
  border-radius: 3px;
}
.home-search-info .hsi-pricing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 36px;
  padding: 17px 20px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  background: rgba(255, 255, 255, .025);
}
.home-search-info .hsi-pricing h3 { margin-bottom: 3px; font-size: 13px; }
.home-search-info .hsi-pricing p { font-size: 12px; }
.home-search-info .hsi-pricing > a { flex-shrink: 0; color: #dfff40; }
.home-search-info .hsi-faq-list { border-top: 1px solid rgba(255, 255, 255, .08); }
.home-search-info details { border-bottom: 1px solid rgba(255, 255, 255, .08); }
.home-search-info summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  color: #d8d8e2;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  list-style: none;
  cursor: pointer;
}
.home-search-info summary::-webkit-details-marker { display: none; }
.home-search-info summary::after {
  content: "+";
  flex: 0 0 16px;
  color: #a9a9b8;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}
.home-search-info details[open] summary { color: #f4f4f7; }
.home-search-info details[open] summary::after { content: "−"; color: #dfff40; }
.home-search-info .hsi-answer { max-width: 72ch; padding: 0 26px 19px 0; }
.home-search-info .hsi-answer p { font-size: 12px; }
.home-search-info .hsi-answer a { display: inline-block; margin-top: 9px; }
@media (max-width: 1050px) {
  .home-search-info .hsi-overview,
  .home-search-info .hsi-faq { grid-template-columns: 1fr; gap: 23px; }
  .home-search-info .hsi-heading > p { max-width: 68ch; }
  .home-search-info h2 { font-size: 21px; }
}
@media (max-width: 600px) {
  .home-search-info { margin-top: 29px; padding-top: 27px; }
  .home-search-info .hsi-features { gap: 21px 20px; }
  .home-search-info h2 { font-size: 20px; }
  .home-search-info h3 { font-size: 13px; }
  .home-search-info p { font-size: 12px; }
  .home-search-info .hsi-pricing {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin: 25px 0 28px;
    padding: 16px;
  }
  .home-search-info summary { gap: 14px; padding: 16px 0; font-size: 12px; }
  .home-search-info .hsi-answer { padding-right: 10px; }
}
@media (max-width: 374px) {
  .home-search-info .hsi-features { grid-template-columns: 1fr; gap: 20px; }
}

