:root {
  color-scheme: light;
  --bg: #f0f2f4;
  --surface: #ffffff;
  --surface-soft: #f8f9fa;
  --text: #18191c;
  --muted: #6f737a;
  --line: #dde1e6;
  --line-strong: #c9cdd3;
  --orange: #f45d22;
  --orange-dark: #d94713;
  --orange-soft: #fff1eb;
  --teal: #147d73;
  --teal-soft: #e9f6f3;
  --danger: #c93434;
  --danger-soft: #fff0f0;
  --warning: #a56400;
  --warning-soft: #fff7e6;
  --shadow: 0 14px 36px rgba(23, 26, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.hidden {
  display: none !important;
}

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

.mobile-only {
  display: none;
}

.workbench-shell {
  min-height: 100vh;
}

.landing-page {
  min-height: 100svh;
  overflow: hidden;
  background: #0b0c0e;
  color: #fff;
}

.landing-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto minmax(390px, 1fr) auto;
  isolation: isolate;
  background-color: #111315;
  background-image: url("/ecommerce-image/assets/hero-commerce-studio.webp");
  background-position: center center;
  background-size: cover;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(4, 5, 6, 0.12);
}

.landing-nav {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 5vw;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
}

.landing-brand img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}

.landing-brand > span {
  display: flex;
  flex-direction: column;
  line-height: 1.22;
}

.landing-brand strong {
  font-size: 18px;
}

.landing-brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 11px;
}

.landing-login,
.landing-primary,
.landing-secondary {
  min-height: 44px;
  border-radius: 6px;
  font-weight: 700;
  transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.landing-login {
  padding: 8px 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(10, 11, 13, 0.46);
  color: #fff;
  backdrop-filter: blur(10px);
}

.landing-login:hover,
.landing-secondary:hover {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.1);
}

.landing-content {
  align-self: center;
  width: min(690px, 54vw);
  margin-left: 7vw;
  padding: 56px 0 64px;
  animation: landing-rise 0.65s ease both;
}

.landing-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 800;
}

.landing-kicker span {
  width: 32px;
  height: 3px;
  background: var(--orange);
}

.landing-content h1 {
  max-width: 650px;
  margin: 0;
  font-size: 72px;
  line-height: 1.04;
  letter-spacing: 0;
}

.landing-content > p {
  max-width: 570px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 17px;
  line-height: 1.85;
}

.landing-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
}

.landing-primary,
.landing-secondary {
  padding: 10px 22px;
}

.landing-primary {
  min-width: 156px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border: 1px solid var(--orange);
  background: var(--orange);
  color: #fff;
}

.landing-primary span {
  font-size: 19px;
  line-height: 1;
}

.landing-primary:hover {
  border-color: #ff7440;
  background: #ff7440;
  transform: translateY(-2px);
}

.landing-secondary {
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(10, 11, 13, 0.38);
  color: #fff;
  backdrop-filter: blur(10px);
}

.landing-proof {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 40px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.landing-proof span {
  padding: 0 18px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.landing-proof span:first-child {
  padding-left: 0;
  border-left: 0;
}

.landing-feature-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  padding: 0 5vw;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(7, 8, 10, 0.86);
  backdrop-filter: blur(16px);
}

.landing-feature-item {
  min-width: 0;
  min-height: 98px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-feature-item:first-child {
  border-left: 0;
}

.landing-feature-item b {
  color: var(--orange);
  font-size: 11px;
}

.landing-feature-item > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.landing-feature-item strong,
.landing-feature-item small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.landing-feature-item strong {
  font-size: 14px;
}

.landing-feature-item small {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
}

@keyframes landing-rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(23, 26, 31, 0.03);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-copy strong {
  font-size: 17px;
}

.brand-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions,
.section-actions,
.task-panel-actions,
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.connection-state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.connection-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b5bac1;
}

.connection-state.online::before {
  background: #28a879;
}

.connection-state.offline::before {
  background: var(--danger);
}

.account-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 4px;
  color: var(--muted);
  white-space: nowrap;
}

.account-summary strong {
  color: var(--teal);
}

.button,
.icon-button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.button {
  min-height: 38px;
  padding: 8px 15px;
  font-weight: 600;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

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

.button.primary:hover {
  background: var(--orange-dark);
  border-color: var(--orange-dark);
}

.button.secondary {
  background: var(--surface);
  border-color: var(--line-strong);
}

.button.secondary:hover {
  border-color: #9fa5ad;
  background: #fafafa;
}

.button.text-button {
  color: var(--muted);
  padding-left: 8px;
  padding-right: 8px;
}

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

.button.large {
  min-width: 156px;
  min-height: 44px;
  padding: 10px 22px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: var(--line);
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
}

.icon-button:hover {
  background: var(--surface-soft);
  border-color: var(--line-strong);
}

.app-layout {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 214px minmax(520px, 1fr) 380px;
  align-items: stretch;
}

.tool-sidebar {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  align-self: start;
  padding: 24px 16px;
  background: #181a1d;
  color: #fff;
  overflow-y: auto;
}

.sidebar-heading {
  padding: 0 10px 12px;
  color: #969ca4;
  font-size: 12px;
  font-weight: 700;
}

.sidebar-section-title {
  margin: 0 6px 8px;
  color: #9299a2;
  font-size: 10px;
  font-weight: 800;
}

.shortcut-section {
  margin-bottom: 18px;
}

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

.quick-tool,
.more-tool {
  min-width: 0;
  border: 1px solid #383c42;
  border-radius: 6px;
  background: #23262a;
  color: #e7eaee;
}

.quick-tool {
  min-height: 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 5px;
  font-size: 11px;
}

.quick-tool:hover,
.more-tool:hover {
  border-color: #565c64;
  background: #2b2f34;
}

.quick-tool-icon {
  width: 27px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: #343942;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.quick-tool-icon.yellow { background: #7b5817; }
.quick-tool-icon.blue { background: #285a86; }
.quick-tool-icon.green { background: #276953; }
.quick-tool-icon.orange { background: #9a4823; }
.quick-tool-icon.red { background: #883b45; }
.quick-tool-icon.purple { background: #67428b; }

.feature-section-title {
  margin-top: 4px;
}

.more-tools-panel {
  margin: 0 0 18px;
  padding: 10px 8px;
  border: 1px solid #3c4148;
  border-radius: 6px;
  background: #202327;
}

.more-tools-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}

.sidebar-close {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #34383e;
  color: #c7ccd2;
  font-size: 17px;
}

.more-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.more-tool {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  text-align: left;
}

.more-tool-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.more-tool-copy strong,
.more-tool-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-tool-copy strong { font-size: 11px; }
.more-tool-copy small { color: #9299a2; font-size: 9px; }

.sidebar-empty {
  padding: 10px 4px;
  color: #9299a2;
  font-size: 10px;
  line-height: 1.6;
}

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

.feature-button {
  width: 100%;
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #d8dce1;
  text-align: left;
}

.feature-button:hover {
  background: #2b2f34;
}

.feature-button.active {
  background: #303338;
  border-color: #484d54;
  color: #fff;
  box-shadow: inset 3px 0 var(--orange);
}

.feature-mark {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #41464d;
  color: #f6b092;
  font-size: 15px;
  font-weight: 800;
}

.feature-button.active .feature-mark {
  background: var(--orange);
  color: #fff;
}

.feature-button-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feature-button-copy strong,
.feature-button-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feature-button-copy strong {
  font-size: 14px;
}

.feature-button-copy small {
  color: #9299a2;
  font-size: 11px;
}

.workspace {
  min-width: 0;
  padding: 28px 30px 112px;
  background: var(--bg);
  scroll-padding-bottom: 140px;
}

.drag-overlay {
  position: fixed;
  inset: 68px 0 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  pointer-events: none;
  background: rgba(20, 24, 28, 0.28);
  backdrop-filter: blur(3px);
}

.drag-overlay-content {
  width: min(520px, 90vw);
  min-height: 180px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  border: 2px dashed var(--orange);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.97);
  color: var(--ink);
  box-shadow: 0 20px 60px rgba(18, 21, 25, 0.22);
}

.drag-overlay-content strong {
  font-size: 20px;
}

.drag-overlay-content span {
  color: var(--muted);
  font-size: 13px;
}

body.file-drag-active .drop-zone {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.workspace-heading,
.section-heading,
.task-panel-head,
.submit-bar,
.task-row,
.plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.workspace-heading {
  align-items: flex-start;
  margin-bottom: 24px;
}

.workspace-heading h1,
.section-heading h2,
.task-panel-head h2,
.modal-panel h2,
.plan-head h3 {
  margin: 0;
  letter-spacing: 0;
}

.workspace-heading h1 {
  margin-top: 4px;
  font-size: 25px;
}

.workspace-heading p,
.section-heading p,
.task-panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.eyebrow {
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 800;
}

.price-badge {
  flex-shrink: 0;
  padding: 7px 10px;
  border-radius: 4px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.upload-section,
.settings-section,
.plan-section {
  margin-bottom: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 3px 14px rgba(31, 35, 40, 0.035);
}

.section-heading.compact {
  align-items: flex-start;
  margin-bottom: 18px;
}

.section-heading h2,
.task-panel-head h2 {
  font-size: 17px;
}

.section-heading p {
  margin-top: 5px;
  font-size: 12px;
}

.drop-zone {
  min-height: 158px;
  padding: 14px;
  border: 1px dashed #bdc2c9;
  border-radius: 6px;
  background: var(--surface-soft);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.drop-zone.is-dragging {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.asset-empty {
  min-height: 128px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
}

.asset-empty strong {
  color: #4d5259;
  font-size: 15px;
}

.asset-empty span {
  font-size: 12px;
}

.asset-empty .button {
  margin-top: 8px;
}

.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(116px, 1fr));
  gap: 10px;
}

.asset-card {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eceff2;
}

.asset-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(18, 19, 21, 0.76);
  color: #fff;
  font-size: 18px;
}

.asset-index {
  position: absolute;
  left: 6px;
  bottom: 6px;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(18, 19, 21, 0.72);
  color: #fff;
  font-size: 10px;
}

.asset-grid.video-assets {
  grid-template-columns: 1fr;
}

.asset-grid.mixed-assets .video-asset-card {
  grid-column: 1 / -1;
}

.video-asset-card {
  min-width: 0;
  min-height: 62px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 30px;
  gap: 10px;
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.video-asset-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-dark);
  font-size: 12px;
}

.video-asset-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.video-asset-copy strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-asset-copy small {
  color: var(--muted);
  font-size: 10px;
}

.asset-remove.static {
  position: static;
  background: #eceff2;
  color: #50555c;
}

.upload-progress {
  position: relative;
  height: 26px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: #eceff2;
}

.upload-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: #ccebe5;
  transition: width 0.15s ease;
}

.upload-progress em {
  position: relative;
  z-index: 1;
  display: block;
  padding: 5px 9px;
  color: #245d57;
  font-size: 11px;
  font-style: normal;
}

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

.field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field > span,
.field-label {
  color: #3d4147;
  font-size: 12px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  outline: none;
}

.field input,
.field select {
  height: 42px;
  padding: 0 11px;
}

.field textarea {
  min-height: 104px;
  padding: 10px 11px;
  line-height: 1.6;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 93, 34, 0.11);
}

.field small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.exploration-material-upload-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.exploration-upload-button {
  min-width: 152px;
  height: 42px;
  justify-content: center;
  white-space: nowrap;
}

.feature-form > .full {
  grid-column: 1 / -1;
}

.selected-template {
  min-width: 0;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.selected-template img,
.template-placeholder {
  width: 104px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 5px;
  background: #e4e7ea;
  color: var(--muted);
  object-fit: cover;
}

.selected-template div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.selected-template strong {
  font-size: 13px;
}

.selected-template small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.consent-field {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #4b5057;
  font-size: 12px;
  line-height: 1.5;
}

.consent-field input {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--orange);
}

.generated-plan,
.form-notice,
.bgm-field,
.material-script-list {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.generated-plan-head,
.bgm-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.generated-plan-head {
  margin-bottom: 9px;
}

.generated-plan-head strong,
.bgm-field strong {
  font-size: 12px;
}

.generated-plan-head span {
  color: var(--teal);
  font-size: 10px;
  font-weight: 700;
}

.generated-plan textarea {
  width: 100%;
  min-height: 180px;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  line-height: 1.6;
  resize: vertical;
}

.form-notice {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.media-options {
  padding: 0 0 2px;
}

.media-options .consent-field + .consent-field {
  margin-top: 3px;
}

.bgm-field > div:first-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

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

.bgm-field .task-actions {
  flex: none;
  margin-top: 0;
}

.material-script-list .batch-edit-heading {
  padding-top: 0;
}

.material-script-item {
  display: grid;
  grid-template-columns: minmax(130px, 0.35fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.material-script-item > span {
  min-width: 0;
  overflow: hidden;
  color: #4d5259;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-script-item textarea {
  width: 100%;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  line-height: 1.5;
  resize: vertical;
}

.batch-edit-list {
  grid-column: 1 / -1;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.batch-edit-heading {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
}

.batch-edit-heading > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.batch-edit-heading strong {
  color: #3d4147;
  font-size: 12px;
}

.batch-edit-heading small,
.batch-edit-empty {
  color: var(--muted);
  font-size: 11px;
}

.batch-edit-heading > span {
  flex: none;
  color: var(--orange);
  font-size: 12px;
  font-weight: 700;
}

.batch-edit-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.batch-edit-thumb {
  width: 72px;
  height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #eceff2;
}

.batch-edit-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.batch-edit-item label {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.34fr) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.batch-edit-item label > span {
  min-width: 0;
  overflow: hidden;
  color: #4d5259;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-edit-item textarea {
  width: 100%;
  min-height: 72px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  line-height: 1.5;
  outline: none;
  resize: vertical;
}

.batch-edit-item textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 93, 34, 0.11);
}

.batch-edit-empty {
  padding: 14px 0 4px;
  border-top: 1px solid var(--line);
}

.template-options,
.preset-options {
  grid-column: 1 / -1;
}

.template-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 8px;
}

.template-option {
  min-height: 78px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  cursor: pointer;
}

.template-option:has(input:checked) {
  border-color: #f2a383;
  background: var(--orange-soft);
}

.template-option input {
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.template-option-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-option-copy strong {
  font-size: 12px;
}

.template-option-copy small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.custom-template-option {
  grid-column: span 3;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(240px, 1.6fr);
  align-items: stretch;
  gap: 10px;
}

.custom-template-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
}

.custom-template-head input {
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.custom-template-option textarea {
  width: 100%;
  min-height: 76px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  line-height: 1.55;
  resize: vertical;
}

.custom-template-option textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 93, 34, 0.11);
}

.custom-template-tip {
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.preset-button {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
  color: #4b5057;
}

.preset-button:hover {
  border-color: var(--orange);
  color: var(--orange-dark);
}

.background-list {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.background-field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface-soft);
}

.background-field span {
  flex-shrink: 0;
  color: var(--muted);
  font-size: 11px;
}

.background-field input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  outline: none;
}

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

.plan-item {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.plan-head {
  align-items: flex-start;
  margin-bottom: 9px;
}

.plan-head h3 {
  font-size: 14px;
}

.plan-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.plan-prompt {
  width: 100%;
  min-height: 82px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  line-height: 1.55;
  resize: vertical;
}

.plan-status {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.submit-bar {
  position: sticky;
  bottom: 16px;
  z-index: 15;
  padding: 14px 16px;
  border: 1px solid #2b2f34;
  border-radius: 8px;
  background: rgba(24, 26, 29, 0.97);
  color: #fff;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.submit-bar > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.submit-bar span {
  font-weight: 700;
}

.submit-bar small {
  color: #a9afb7;
  font-size: 11px;
}

.task-panel {
  position: sticky;
  top: 68px;
  height: calc(100vh - 68px);
  align-self: start;
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: #f8f9fa;
}

.task-panel-head {
  flex-shrink: 0;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.task-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.task-toolbar select {
  min-height: 30px;
  padding: 4px 28px 4px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
}

.task-toolbar span {
  color: var(--muted);
  font-size: 10px;
}

.task-list {
  min-height: 0;
  flex: 1;
  padding: 14px;
  overflow-y: auto;
}

.task-load-more {
  flex-shrink: 0;
  min-height: 40px;
  border: 0;
  border-top: 1px solid var(--line);
  background: #fff;
  color: var(--orange-dark);
  font-size: 11px;
  font-weight: 700;
}

.task-load-more:hover {
  background: var(--surface-soft);
}

.task-card {
  margin-bottom: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(31, 35, 40, 0.035);
}

.task-card:last-child {
  margin-bottom: 0;
}

.task-row {
  align-items: flex-start;
}

.task-title {
  font-size: 13px;
  font-weight: 700;
}

.task-time,
.task-cost,
.task-billing,
.task-message {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.task-billing {
  margin-top: 5px;
  padding: 7px 8px;
  border-radius: 5px;
  background: var(--surface-soft);
}

.task-time {
  margin-top: 4px;
}

.status-label {
  flex-shrink: 0;
  padding: 4px 7px;
  border-radius: 4px;
  background: #eef0f2;
  color: #5c626a;
  font-size: 10px;
  font-weight: 700;
}

.status-label.processing,
.status-label.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-label.completed {
  background: var(--teal-soft);
  color: var(--teal);
}

.status-label.failed {
  background: var(--danger-soft);
  color: var(--danger);
}

.task-progress {
  height: 5px;
  margin: 10px 0 7px;
  overflow: hidden;
  border-radius: 3px;
  background: #eceff2;
}

.task-progress span {
  display: block;
  height: 100%;
  background: var(--orange);
  transition: width 0.25s ease;
}

.task-message {
  margin-top: 7px;
}

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

.result-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #eef0f2;
  cursor: zoom-in;
}

.result-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.result-image.wide {
  grid-column: 1 / -1;
  aspect-ratio: 6 / 1;
}

.task-result-video {
  width: 100%;
  max-height: 300px;
  display: block;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111;
}

.wide-slices {
  grid-column: 1 / -1;
  display: flex;
  gap: 2px;
  overflow: hidden;
  border-radius: 4px;
  background: #e1e3e7;
}

.wide-slices button {
  min-width: 0;
  flex: 1 1 20%;
  aspect-ratio: 1.2 / 1;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #eef0f2;
}

.wide-slices img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.task-actions .button {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 10px;
}

.empty-state {
  min-height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(17, 19, 22, 0.56);
  backdrop-filter: blur(4px);
}

.modal-panel,
.preview-panel {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.24);
}

.auth-panel {
  padding: 28px;
}

.copy-panel {
  width: min(560px, 100%);
  padding: 28px;
}

.credit-confirm-panel {
  width: min(460px, 100%);
  padding: 28px;
}

.credit-confirm-panel h2 {
  margin: 5px 0 10px;
  font-size: 22px;
}

.credit-confirm-panel > p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.credit-confirm-cost {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 16px 0;
  border-width: 1px 0;
  border-style: solid;
  border-color: var(--line);
}

.credit-confirm-cost span {
  color: var(--muted);
  font-size: 13px;
}

.credit-confirm-cost strong {
  color: var(--accent);
  font-size: 24px;
}

.credit-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  margin-top: 20px;
}

.credit-confirm-actions .button {
  min-height: 44px;
  white-space: normal;
  line-height: 1.35;
}

.copy-panel h2 {
  margin: 5px 0 20px;
  font-size: 22px;
}

.copy-panel .field {
  margin-bottom: 13px;
}

.copy-actions {
  display: flex;
  gap: 9px;
  margin-top: 4px;
}

.copy-result {
  width: 100%;
  min-height: 170px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--text);
  line-height: 1.7;
  resize: vertical;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #eef0f2;
  color: #50555c;
  font-size: 22px;
  line-height: 1;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.auth-brand img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.auth-brand h2 {
  margin-top: 4px;
  font-size: 21px;
}

.auth-panel .field {
  margin-bottom: 14px;
}

.agreement-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.agreement-row input {
  margin: 2px 0 0;
  accent-color: var(--orange);
}

.agreement-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--orange-dark);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-panel {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow-y: auto;
}

.legal-subtitle {
  margin: 8px 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.legal-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.legal-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legal-section h3 {
  margin: 0 0 7px;
  font-size: 14px;
}

.legal-section p {
  margin: 0;
  color: #4f555d;
  font-size: 12px;
  line-height: 1.8;
  white-space: pre-wrap;
}

.auth-actions .button {
  flex: 1;
}

.auth-help {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.preview-panel {
  width: min(1100px, 100%);
  padding: 14px;
  background: #17191c;
}

.preview-panel img {
  width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
}

.preview-panel .button {
  display: table;
  margin: 12px auto 0;
}

.preview-close {
  z-index: 2;
  background: rgba(255, 255, 255, 0.9);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 150;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 15px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: #202327;
  color: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

@media (max-width: 1260px) {
  .landing-content {
    width: min(620px, 58vw);
    margin-left: 5vw;
  }

  .landing-content h1 {
    font-size: 58px;
  }

  .landing-feature-item {
    padding-left: 18px;
    padding-right: 18px;
  }

  .app-layout {
    grid-template-columns: 190px minmax(480px, 1fr) 340px;
  }

  .workspace {
    padding-left: 22px;
    padding-right: 22px;
  }

  .template-options-grid,
  .background-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .custom-template-option {
    grid-column: span 2;
  }
}

@media (max-width: 1020px) {
  .landing-hero::before {
    background: rgba(4, 5, 6, 0.32);
  }

  .landing-content {
    width: min(580px, 72vw);
  }

  .landing-content h1 {
    font-size: 52px;
  }

  .landing-feature-ribbon {
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 1fr);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .mobile-only {
    display: inline-flex;
  }

  .app-layout {
    grid-template-columns: 184px minmax(0, 1fr);
  }

  .task-panel {
    position: fixed;
    top: 68px;
    right: 0;
    z-index: 50;
    width: min(390px, 92vw);
    transform: translateX(102%);
    box-shadow: -16px 0 40px rgba(22, 24, 28, 0.17);
    transition: transform 0.2s ease;
  }

  .task-panel.open {
    transform: translateX(0);
  }
}

@media (max-width: 720px) {
  .landing-hero {
    grid-template-rows: auto minmax(420px, 1fr) auto;
    background-position: 64% center;
  }

  .landing-hero::before {
    background: rgba(4, 5, 6, 0.54);
  }

  .landing-nav {
    min-height: 68px;
    padding: 12px 16px;
  }

  .landing-brand {
    gap: 9px;
  }

  .landing-brand img {
    width: 38px;
    height: 38px;
  }

  .landing-brand strong {
    font-size: 16px;
  }

  .landing-login {
    min-height: 38px;
    padding: 7px 13px;
    font-size: 12px;
  }

  .landing-content {
    width: auto;
    margin: 0;
    padding: 52px 20px 44px;
  }

  .landing-kicker {
    margin-bottom: 14px;
  }

  .landing-content h1 {
    max-width: 360px;
    font-size: 40px;
    line-height: 1.1;
  }

  .landing-content > p {
    max-width: 430px;
    margin-top: 18px;
    font-size: 14px;
    line-height: 1.75;
  }

  .landing-actions {
    margin-top: 26px;
  }

  .landing-primary,
  .landing-secondary {
    min-height: 42px;
    padding: 9px 15px;
    font-size: 13px;
  }

  .landing-primary {
    min-width: 142px;
  }

  .landing-proof {
    margin-top: 30px;
  }

  .landing-proof span {
    padding: 0 10px;
  }

  .landing-feature-ribbon {
    padding: 0;
  }

  .landing-feature-item {
    min-height: 82px;
    padding: 14px 20px;
  }

  .topbar {
    height: 60px;
    padding: 0 12px;
    gap: 10px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand-copy small,
  .connection-state,
  .account-summary span,
  #logout-button {
    display: none;
  }

  .top-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .top-actions .button {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .app-layout {
    min-height: calc(100vh - 60px);
    display: block;
  }

  .tool-sidebar {
    position: sticky;
    top: 60px;
    z-index: 20;
    width: 100%;
    height: auto;
    padding: 8px 10px;
    overflow: visible;
  }

  .sidebar-heading {
    display: none;
  }

  .shortcut-section {
    margin-bottom: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
  }

  .shortcut-section .sidebar-section-title,
  .feature-section-title {
    display: none;
  }

  .quick-tools {
    min-width: max-content;
    display: flex;
    gap: 6px;
  }

  .quick-tool {
    min-width: 84px;
    min-height: 38px;
    flex-direction: row;
    padding: 5px 8px;
  }

  .quick-tool-icon {
    width: 25px;
    height: 25px;
  }

  .more-tools-panel {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 70;
    max-height: calc(100vh - 60px);
    margin: 0;
    padding: 14px;
    overflow-y: auto;
    border-width: 0 0 1px;
    border-radius: 0;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.32);
  }

  .more-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .feature-nav {
    display: none;
  }

  .feature-button {
    width: auto;
    min-height: 42px;
    grid-template-columns: 27px auto;
    padding: 6px 9px;
  }

  .feature-mark {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .feature-button-copy small {
    display: none;
  }

  .workspace {
    padding: 20px 12px 152px;
    scroll-padding-bottom: 170px;
  }

  .workspace-heading {
    margin-bottom: 18px;
  }

  .workspace-heading h1 {
    font-size: 22px;
  }

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

  .price-badge {
    max-width: 118px;
    text-align: right;
  }

  .upload-section,
  .settings-section,
  .plan-section {
    padding: 16px;
  }

  .section-heading.compact {
    gap: 10px;
    flex-wrap: wrap;
  }

  .section-heading.compact > div:first-child {
    min-width: 0;
    flex: 1 1 180px;
  }

  .section-heading.compact .section-actions {
    align-self: flex-start;
    flex: 0 1 auto;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .feature-form,
  .template-options-grid,
  .background-list {
    grid-template-columns: 1fr;
  }

  .exploration-material-upload-row {
    grid-template-columns: 1fr;
  }

  .exploration-upload-button {
    width: 100%;
  }

  .custom-template-option {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .custom-template-tip {
    grid-column: auto;
  }

  .selected-template {
    grid-template-columns: 84px minmax(0, 1fr);
  }

  .selected-template img,
  .template-placeholder {
    width: 84px;
  }

  .material-script-item {
    grid-template-columns: 1fr;
    gap: 7px;
  }

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

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

  .batch-edit-item {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
  }

  .batch-edit-thumb {
    width: 58px;
    height: 58px;
  }

  .batch-edit-item label {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .batch-edit-item textarea {
    min-height: 68px;
  }

  .submit-bar {
    bottom: max(8px, env(safe-area-inset-bottom));
    gap: 10px;
    padding: 11px;
    flex-wrap: wrap;
  }

  .submit-bar > div {
    flex: 1 1 150px;
  }

  .submit-bar small {
    display: none;
  }

  .submit-bar .button.large {
    min-width: 132px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .task-panel {
    top: 60px;
    height: calc(100vh - 60px);
  }

  .drag-overlay {
    inset: 60px 0 0;
  }
}

@media (max-width: 430px) {
  .submit-bar {
    align-items: stretch;
  }

  .submit-bar > div,
  .submit-bar .button.large {
    width: 100%;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .landing-actions {
    align-items: stretch;
  }

  .landing-primary,
  .landing-secondary {
    flex: 1;
  }

  .landing-content h1 {
    font-size: 37px;
  }

  .landing-proof {
    flex-wrap: wrap;
    gap: 8px 0;
  }

  .landing-proof span:nth-child(3) {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .account-summary {
    padding: 0;
    font-size: 11px;
  }

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

  .workspace-heading,
  .section-heading.compact {
    align-items: flex-start;
  }

  .workspace-heading p {
    max-width: 220px;
  }

  .auth-panel {
    padding: 24px 18px;
  }
}

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

.subaccounts-panel {
  width: min(980px, calc(100vw - 32px));
  max-height: min(860px, calc(100vh - 32px));
  overflow-y: auto;
}

.subaccounts-heading,
.subaccounts-list-head,
.subaccount-card-head,
.subaccount-identity,
.subaccount-actions,
.subaccount-credit-form {
  display: flex;
  align-items: center;
}

.subaccounts-heading {
  justify-content: space-between;
  gap: 24px;
  padding-right: 44px;
}

.subaccounts-heading h2 {
  margin: 3px 0 5px;
}

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

.subaccounts-balance {
  flex: 0 0 auto;
  min-width: 136px;
  text-align: right;
}

.subaccounts-balance span,
.subaccounts-balance strong {
  display: block;
}

.subaccounts-balance span {
  color: var(--muted);
  font-size: 12px;
}

.subaccounts-balance strong {
  margin-top: 3px;
  color: #ffb000;
  font-size: 28px;
}

.subaccounts-create-form {
  margin-top: 22px;
  padding: 18px;
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr 0.7fr auto;
  align-items: end;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17171a;
}

.subaccounts-create-form .field {
  margin: 0;
}

.subaccounts-create-form .field span {
  margin-bottom: 7px;
}

.subaccounts-create-form .button {
  min-height: 42px;
  white-space: nowrap;
}

.subaccounts-list-head {
  justify-content: space-between;
  gap: 16px;
  margin: 22px 0 12px;
}

.subaccounts-list-head > div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.subaccounts-list-head strong {
  font-size: 17px;
}

.subaccounts-list-head span {
  color: var(--muted);
  font-size: 12px;
}

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

.subaccount-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #17171a;
}

.subaccount-card-head {
  justify-content: space-between;
  gap: 18px;
}

.subaccount-identity {
  min-width: 0;
  gap: 12px;
}

.subaccount-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: #ffb000;
  background: rgba(255, 107, 0, 0.16);
  font-size: 17px;
  font-weight: 800;
  line-height: 42px;
  text-align: center;
}

.avatar-select-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.avatar-select-row select {
  width: 100%;
  min-width: 0;
}

.avatar-select-preview {
  display: block;
  width: 80px;
  height: 104px;
  border-radius: 8px;
  object-fit: contain;
  background: #202124;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.avatar-preview-button {
  display: block;
  width: 80px;
  height: 104px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.avatar-preview-button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

.avatar-placeholder {
  display: grid;
  place-items: center;
  color: #9ca3af;
  font-size: 12px;
}

.fixed-video-structure > div {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #161719;
}

.fixed-video-structure b {
  color: #ff8a2a;
}

.fixed-video-structure small {
  margin-left: auto;
}

.subaccount-name {
  min-width: 0;
}

.subaccount-name strong,
.subaccount-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subaccount-name strong {
  font-size: 15px;
}

.subaccount-name small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.subaccount-status {
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-style: normal;
}

.subaccount-status.active {
  color: #34d399;
  background: rgba(52, 211, 153, 0.1);
}

.subaccount-status.disabled {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
}

.subaccount-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(76px, auto));
  gap: 16px;
}

.subaccount-metrics span,
.subaccount-metrics strong {
  display: block;
  text-align: right;
}

.subaccount-metrics span {
  color: var(--muted);
  font-size: 10px;
}

.subaccount-metrics strong {
  margin-top: 3px;
  font-size: 14px;
}

.subaccount-card-body {
  margin-top: 14px;
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
}

.subaccount-credit-form {
  gap: 8px;
}

.subaccount-credit-form input {
  width: 124px;
  min-height: 36px;
}

.subaccount-credit-form .button,
.subaccount-actions .button {
  min-height: 36px;
  padding: 0 11px;
  font-size: 12px;
}

.subaccount-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.subaccount-actions .danger {
  color: #fca5a5;
}

.subaccount-actions .success {
  color: #6ee7b7;
}

@media (max-width: 900px) {
  .subaccounts-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .subaccounts-create-form .button {
    grid-column: 1 / -1;
  }

  .subaccount-card-head,
  .subaccount-card-body {
    align-items: stretch;
    flex-direction: column;
  }

  .subaccount-metrics {
    grid-template-columns: repeat(3, 1fr);
  }

  .subaccount-metrics span,
  .subaccount-metrics strong {
    text-align: left;
  }

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

@media (max-width: 560px) {
  .subaccounts-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 8px 8px 0 0;
  }

  .subaccounts-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .subaccounts-balance {
    text-align: left;
  }

  .subaccounts-create-form {
    grid-template-columns: 1fr;
  }

  .subaccounts-create-form .button {
    grid-column: auto;
  }

  .subaccount-credit-form {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .subaccount-credit-form input {
    width: 100%;
  }
}
