:root {
  color-scheme: light;
  --md-background: #ffffff;
  --md-surface: #ffffff;
  --md-surface-lowest: #ffffff;
  --md-surface-low: #fffdf8;
  --md-surface-container: #fffaf0;
  --md-surface-high: #fffdf0;
  --md-surface-highest: #f1eee4;
  --md-on-surface: #1b1b18;
  --md-on-surface-variant: #4a4840;
  --md-muted: #777268;
  --md-outline: #827d72;
  --md-outline-variant: #e7e4d9;
  --md-primary: #fef65b;
  --md-primary-hover: #f2e947;
  --md-on-primary: #1b1b18;
  --md-primary-container: #fffcc4;
  --md-on-primary-container: #302e00;
  --md-secondary-container: #fffdf0;
  --md-on-secondary-container: #4a4840;
  --md-focus: #a49c00;
  --md-success: #56705b;
  --md-success-container: #f7fbf7;
  --md-elevation-1: 0 1px 2px rgba(26, 27, 31, .16), 0 1px 3px 1px rgba(26, 27, 31, .08);
  --md-elevation-2: 0 2px 6px 2px rgba(26, 27, 31, .12), 0 1px 2px rgba(26, 27, 31, .12);
  --md-elevation-3: 0 6px 16px 4px rgba(26, 27, 31, .14), 0 2px 4px rgba(26, 27, 31, .12);
  --md-font: Roboto, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--md-on-surface);
  background: var(--md-background);
  font-family: var(--md-font);
}

button,
textarea,
input {
  font: inherit;
}

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

button {
  position: relative;
  color: inherit;
  cursor: pointer;
}

button::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: currentColor;
  opacity: 0;
  pointer-events: none;
  transition: opacity .16s ease;
}

button:hover::after {
  opacity: .07;
}

button:active::after {
  opacity: .12;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 3px solid var(--md-focus);
  outline-offset: 3px;
}

svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100vw;
  min-height: 100vh;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: var(--md-background);
  box-shadow: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 15;
  height: 72px;
  display: grid;
  grid-template-columns: 248px 1fr 248px;
  align-items: center;
  padding: 0 22px;
  border-bottom: 1px solid #eceae1;
  background: var(--md-surface);
}

.brand {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--md-on-surface);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--md-on-primary);
  background: var(--md-primary);
}

.brand-mark svg {
  width: 21px;
  height: 21px;
}

.nav-tabs {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 24px;
  background: var(--md-surface-low);
}

.nav-tab {
  min-width: 76px;
  height: 40px;
  border: 0;
  border-radius: 20px;
  color: var(--md-on-surface-variant);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  transition: color .16s ease, background .16s ease;
}

.nav-tab.active {
  color: var(--md-on-primary-container);
  background: var(--md-primary-container);
}

.account-area {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.avatar,
.round-button,
.more-button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 22px;
  color: var(--md-on-surface-variant);
  background: transparent;
  transition: background .16s ease, box-shadow .16s ease;
}

.icon-button:hover,
.round-button:hover,
.more-button:hover {
  background: var(--md-secondary-container);
}

.avatar {
  color: var(--md-surface);
  background: #343439;
  font-size: 13px;
  font-weight: 700;
}

.login-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 22px;
  color: var(--md-on-primary);
  background: var(--md-primary);
  box-shadow: var(--md-elevation-1);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  white-space: nowrap;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.login-button:hover {
  background: var(--md-primary-hover);
  box-shadow: var(--md-elevation-2);
}

.login-button svg {
  width: 18px;
  height: 18px;
}

.login-button.is-attention {
  animation: login-attention .9s cubic-bezier(.2, 0, 0, 1);
}

@keyframes login-attention {
  0%, 100% { transform: translateY(0); }
  34% { transform: translateY(-2px); box-shadow: 0 0 0 4px rgba(254, 246, 91, .42), var(--md-elevation-2); }
}

.account-menu {
  position: relative;
}

.account-chip {
  max-width: 210px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px 0 6px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 22px;
  color: var(--md-on-surface);
  background: var(--md-surface-lowest);
  box-shadow: none;
}

.account-avatar {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  color: var(--md-on-primary);
  background: var(--md-primary);
  font-size: 12px;
  font-weight: 750;
}

.account-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 650;
}

.account-chip svg {
  width: 15px;
  height: 15px;
  color: var(--md-muted);
}

.account-popover {
  position: absolute;
  top: 52px;
  right: 0;
  z-index: 30;
  width: 232px;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 18px;
  background: var(--md-surface-lowest);
  box-shadow: var(--md-elevation-3);
}

.account-popover strong,
.account-popover small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-popover strong {
  font-size: 13px;
}

.account-popover small {
  color: var(--md-muted);
  font-size: 11px;
}

.account-popover button {
  min-height: 38px;
  margin-top: 4px;
  border: 0;
  border-radius: 19px;
  color: var(--md-on-surface);
  background: var(--md-surface-container);
  font-size: 12px;
  font-weight: 700;
}

.workspace {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: start;
  padding: 20px 22px 24px;
}

.library,
.task-panel {
  min-width: 0;
  height: calc(100vh - 116px);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--md-outline-variant) transparent;
}

.library {
  padding: 20px 16px 18px;
  border: 1px solid #e7e4d9;
  border-radius: 24px;
  background: var(--md-surface-low);
}

.section-head,
.preview-head,
.task-panel-head,
.task-panel-title {
  display: flex;
  align-items: center;
}

.section-head,
.preview-head,
.task-panel-head {
  justify-content: space-between;
}

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

.eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--md-muted);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .08em;
}

.section-head h2,
.preview-head h2,
.task-panel-head h2 {
  font-size: 21px;
  line-height: 1.22;
  letter-spacing: -.03em;
  font-weight: 650;
}

.round-button {
  color: var(--md-on-primary);
  background: var(--md-primary);
}

.search-field {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 15px;
  margin-bottom: 14px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 14px;
  background: var(--md-surface-lowest);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.search-field:focus-within {
  border-color: var(--md-focus);
  box-shadow: 0 0 0 1px var(--md-focus);
}

.search-field svg {
  width: 18px;
  height: 18px;
  color: var(--md-muted);
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--md-on-surface);
  background: transparent;
  font-size: 13px;
}

.search-field input::placeholder {
  color: var(--md-muted);
}

.asset-list {
  display: grid;
  gap: 6px;
}

.asset-item {
  width: 100%;
  min-height: 70px;
  display: grid;
  grid-template-columns: 62px 1fr 18px;
  gap: 11px;
  align-items: center;
  padding: 8px;
  border: 0;
  border-radius: 16px;
  color: var(--md-on-surface);
  text-align: left;
  background: transparent;
  transition: color .16s ease, background .16s ease;
}

.asset-item:hover {
  background: var(--md-surface-high);
}

.asset-item.active {
  color: var(--md-on-primary-container);
  background: var(--md-primary-container);
}

.asset-thumb {
  position: relative;
  width: 62px;
  height: 50px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(circle at 74% 26%, rgba(255,255,255,.62) 0 8%, transparent 9%),
    linear-gradient(145deg, #b7bec4, #747f89);
}

.thumb-two { background: linear-gradient(140deg, #c3c1bd, #88837d); }
.thumb-three { background: linear-gradient(140deg, #bcc2c8, #747f8a); }
.thumb-four { background: linear-gradient(140deg, #c9c2b9, #897f75); }

.asset-thumb::before,
.asset-thumb::after {
  content: "";
  position: absolute;
  background: rgba(42, 47, 51, .34);
}

.asset-thumb::before {
  width: 18px;
  height: 18px;
  left: 14px;
  top: 10px;
  border-radius: 50%;
}

.asset-thumb::after {
  width: 34px;
  height: 25px;
  left: 6px;
  bottom: -10px;
  border-radius: 18px 18px 5px 5px;
}

.asset-thumb i {
  position: absolute;
  right: 5px;
  bottom: 5px;
  z-index: 1;
  padding: 2px 5px;
  border-radius: 5px;
  color: #fff;
  background: rgba(27, 27, 31, .66);
  font-size: 9px;
  font-style: normal;
}

.asset-copy {
  min-width: 0;
}

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

.asset-copy strong {
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 650;
}

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

.asset-item.active .asset-copy small {
  color: rgba(55, 52, 0, .7);
}

.selected-dot {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--md-outline);
  border-radius: 50%;
}

.asset-item.active .selected-dot {
  border: 5px solid #aba400;
  background: var(--md-primary);
}

.empty-search {
  padding: 24px 8px;
  color: var(--md-muted);
  text-align: center;
  font-size: 12px;
}

.soft-link {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 14px auto 0;
  padding: 0 10px;
  border: 0;
  border-radius: 20px;
  color: #686200;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
}

.soft-link svg {
  width: 15px;
  height: 15px;
}

.creation-stage {
  width: 100%;
  min-width: 0;
  padding-top: 4px;
}

.stage-intro {
  margin-bottom: 16px;
}

.stage-intro h1 {
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.08;
  letter-spacing: -.045em;
  font-weight: 600;
}

.login-hint {
  margin-top: 10px;
  color: var(--md-muted);
  font-size: 12px;
  line-height: 1.45;
}

[data-requires-auth][aria-disabled="true"] {
  cursor: pointer;
}

.is-guest .find-button.is-locked,
.is-guest .generate-button.is-locked {
  border: 1px dashed #d8d2b4;
  color: #615d4b;
  background: var(--md-surface-container);
  box-shadow: none;
}

.is-guest .round-button.is-locked {
  color: #5f5a00;
  background: var(--md-primary-container);
  box-shadow: none;
}

.is-guest .task-item button.is-locked {
  color: #615d4b;
  background: var(--md-surface-container);
}

.prompt-surface {
  padding: 16px 18px 14px;
  margin-bottom: 20px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 24px;
  background: var(--md-surface-lowest);
  box-shadow: var(--md-elevation-1);
  transition: border-color .16s ease, box-shadow .16s ease;
}

.prompt-surface:focus-within {
  border-color: var(--md-focus);
  box-shadow: 0 0 0 1px rgba(164, 156, 0, .42), var(--md-elevation-1);
}

.prompt-surface textarea {
  width: 100%;
  height: 58px;
  resize: none;
  overflow: auto;
  border: 0;
  outline: 0;
  color: var(--md-on-surface);
  background: transparent;
  font-size: 15px;
  line-height: 1.62;
}

.prompt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 11px;
  border-top: 1px solid #eceae1;
}

.quick-prompts {
  display: flex;
  gap: 8px;
}

.quick-prompts button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--md-outline-variant);
  border-radius: 18px;
  color: var(--md-on-surface-variant);
  background: var(--md-surface);
  font-size: 11px;
  font-weight: 600;
}

.find-button,
.generate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 0;
  color: var(--md-on-primary);
  background: var(--md-primary);
  box-shadow: var(--md-elevation-1);
  font-weight: 700;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.find-button:hover,
.generate-button:hover {
  background: var(--md-primary-hover);
  box-shadow: var(--md-elevation-2);
}

.find-button:active,
.generate-button:active {
  transform: translateY(1px);
  box-shadow: var(--md-elevation-1);
}

.find-button {
  min-width: 112px;
  height: 44px;
  padding: 0 19px;
  border-radius: 22px;
  font-size: 13px;
}

.find-button svg,
.generate-button svg {
  width: 17px;
  height: 17px;
}

.preview-section {
  min-width: 0;
}

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

.more-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.more-button span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 8.15;
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(80, 83, 90, .36);
  border-radius: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 72% 25%, rgba(218, 224, 226, .5), transparent 22%),
    linear-gradient(125deg, #8f979b 0%, #5f696d 48%, #30383b 100%);
  box-shadow: var(--md-elevation-2);
}

.video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(22, 25, 27, .7) 100%);
}

.ambient-shape {
  position: absolute;
  opacity: .48;
}

.shape-one {
  width: 250px;
  height: 250px;
  top: -95px;
  left: 12%;
  border-radius: 50%;
  background: rgba(227, 228, 218, .36);
}

.shape-two {
  width: 180px;
  height: 300px;
  right: 13%;
  bottom: -175px;
  border-radius: 96px 96px 0 0;
  background: rgba(22, 27, 28, .5);
}

.video-wordmark {
  position: absolute;
  top: 24px;
  right: 26px;
  color: rgba(255, 255, 255, .28);
  font-size: clamp(34px, 4.6vw, 66px);
  font-weight: 750;
  letter-spacing: -.06em;
}

.video-caption {
  position: absolute;
  left: 30px;
  bottom: 54px;
  z-index: 2;
  max-width: 72%;
}

.video-caption p {
  margin-bottom: 8px;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
}

.video-caption strong {
  display: block;
  font-size: clamp(23px, 2.6vw, 36px);
  line-height: 1.18;
  letter-spacing: -.045em;
  font-weight: 650;
}

.play-button {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 0;
  border-radius: 50%;
  color: var(--md-on-primary);
  background: var(--md-primary);
  box-shadow: var(--md-elevation-3);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.play-button:hover {
  transform: translate(-50%, -50%) scale(1.05);
  background: var(--md-primary-hover);
  box-shadow: 0 8px 20px 5px rgba(20, 23, 27, .2);
}

.play-button svg {
  width: 25px;
  height: 25px;
}

.play-button .play-icon {
  margin-left: 3px;
}

.pause-icon,
.video-frame.is-playing .play-icon {
  display: none;
}

.video-frame.is-playing .pause-icon {
  display: block;
}

.video-frame.is-playing .progress-track i {
  animation: play-progress 5s linear forwards;
}

@keyframes play-progress {
  from { width: 31%; }
  to { width: 67%; }
}

.video-controls {
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 21px;
  z-index: 2;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 13px;
  align-items: center;
  color: rgba(255, 255, 255, .76);
  font-size: 10px;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(255, 255, 255, .28);
}

.progress-track i {
  display: block;
  width: 31%;
  height: 100%;
  border-radius: inherit;
  background: var(--md-primary);
}

.candidate-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-top: 14px;
}

.candidate-count {
  color: var(--md-muted);
  font-size: 11px;
  white-space: nowrap;
}

.candidate-tabs {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid var(--md-outline-variant);
  border-radius: 20px;
  background: var(--md-surface-lowest);
}

.candidate {
  min-width: 0;
  min-height: 42px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 0;
  border-right: 1px solid var(--md-outline-variant);
  border-radius: 0;
  color: var(--md-on-surface-variant);
  background: transparent;
  font-size: 10px;
  transition: color .16s ease, background .16s ease;
}

.candidate:first-child {
  border-radius: 19px 0 0 19px;
}

.candidate:last-child {
  border-right: 0;
  border-radius: 0 19px 19px 0;
}

.candidate.active {
  color: var(--md-on-primary-container);
  background: var(--md-primary-container);
}

.candidate strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 650;
}

.candidate small {
  color: var(--md-muted);
  font-size: 9px;
}

.generate-button {
  height: 42px;
  padding: 0 16px;
  border-radius: 21px;
  font-size: 12px;
  white-space: nowrap;
}

.task-panel {
  padding: 20px 16px 18px;
  border: 1px solid #e7e4d9;
  border-radius: 24px;
  background: var(--md-surface-low);
  transition: border-color .22s ease, box-shadow .22s ease;
}

.task-panel.is-updated {
  border-color: #b3aa00;
  box-shadow: 0 0 0 2px rgba(254, 246, 91, .5), var(--md-elevation-2);
}

.task-panel-title {
  min-width: 0;
  gap: 11px;
}

.task-panel-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--md-on-primary);
  background: var(--md-primary);
}

.task-panel-mark svg {
  width: 20px;
  height: 20px;
}

.task-count {
  min-width: 48px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 10px;
  border-radius: 16px;
  color: var(--md-on-primary-container);
  background: var(--md-primary-container);
  font-size: 11px;
}

.task-count strong {
  font-size: 13px;
}

.task-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}

.task-item {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid #eceae1;
  border-radius: 18px;
  background: var(--md-surface-lowest);
}

.task-item.running::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--md-primary);
}

.task-item.new-task {
  animation: task-arrive .36s cubic-bezier(.2, 0, 0, 1);
}

@keyframes task-arrive {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.task-item .task-state {
  width: max-content;
  color: #6f6900;
  font-size: 10px;
  font-weight: 700;
}

.task-item.done {
  background: #ffffff;
  border-color: #dbe5dc;
  box-shadow: inset 3px 0 #a9b9aa;
}

.task-item.done .task-state {
  color: var(--md-success);
}

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

.task-item small {
  color: var(--md-muted);
  font-size: 11px;
}

.task-item button {
  width: max-content;
  min-height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 18px;
  color: #676100;
  background: var(--md-primary-container);
  font-size: 11px;
  font-weight: 700;
}

.task-progress {
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--md-surface-highest);
}

.task-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--md-primary);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 50;
  max-width: min(420px, calc(100vw - 34px));
  padding: 13px 18px;
  border-radius: 12px;
  color: var(--md-surface);
  background: #303035;
  box-shadow: var(--md-elevation-3);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  font-size: 12px;
  transition: opacity .18s ease, transform .22s cubic-bezier(.2, 0, 0, 1);
}

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

@media (max-width: 1260px) {
  .workspace {
    grid-template-columns: 220px minmax(0, 1fr) 280px;
    gap: 16px;
    padding-inline: 16px;
  }

  .library,
  .task-panel {
    padding-inline: 12px;
  }

  .candidate-count {
    display: none;
  }

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

  .asset-item {
    grid-template-columns: 56px 1fr 16px;
    gap: 8px;
  }

  .asset-thumb {
    width: 56px;
  }
}

@media (max-width: 1020px) {
  .workspace {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .task-panel {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
  }

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

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .nav-tabs {
    display: none;
  }

  .workspace {
    display: block;
    padding: 16px;
  }

  .library,
  .task-panel {
    width: 100%;
    height: auto;
    margin-bottom: 22px;
  }

  .creation-stage {
    margin-bottom: 24px;
  }

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

@media (max-width: 620px) {
  .account-area .icon-button,
  .quick-prompts,
  .candidate-count {
    display: none;
  }

  .login-button {
    width: 44px;
    padding: 0;
  }

  .login-button span,
  .account-label {
    display: none;
  }

  .account-chip {
    padding: 0 8px 0 6px;
  }

  .account-popover {
    right: -4px;
  }

  .asset-list,
  .task-list,
  .candidate-tabs {
    grid-template-columns: 1fr;
  }

  .candidate-tabs {
    overflow: visible;
    border: 0;
    gap: 6px;
    background: transparent;
  }

  .candidate,
  .candidate:first-child,
  .candidate:last-child {
    border: 1px solid var(--md-outline-variant);
    border-radius: 16px;
    background: var(--md-surface-lowest);
  }

  .candidate.active {
    background: var(--md-primary-container);
  }

  .candidate-row {
    grid-template-columns: 1fr;
  }

  .generate-button {
    width: 100%;
  }

  .video-frame {
    min-height: 280px;
    aspect-ratio: 4 / 3;
  }

  .video-caption {
    left: 23px;
    max-width: 80%;
  }

  .video-controls {
    left: 23px;
    right: 23px;
  }
}

@media (prefers-contrast: more) {
  .library,
  .prompt-surface,
  .candidate-tabs,
  .task-panel,
  .task-item {
    border-color: var(--md-outline);
  }
}

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


/* White-surface variant: keep the 8733 geometry while replacing cold gray slabs. */
.workspace,
.creation-stage {
  background: #ffffff;
}

.library,
.task-panel {
  background: #fffdf8;
  border-color: #e7e4d9;
}

.search-field,
.prompt-surface,
.candidate-tabs,
.task-item {
  background: #ffffff;
}

.asset-item:hover,
.icon-button:hover,
.round-button:hover,
.more-button:hover {
  background: #fffdf0;
}

.asset-item.active,
.candidate.active,
.nav-tab.active {
  background: #fffcc4;
}

.quick-prompts button {
  border-color: #e7e4d9;
  background: #ffffff;
}

.task-item.done {
  background: #ffffff;
  border-color: #dbe5dc;
}

.task-progress {
  background: #f1eee4;
}
